overtime-live-trading-utils 0.0.2 → 0.0.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/main.js +1 -1
- package/package.json +1 -1
- package/src/constants/sports.ts +290 -136
- package/src/enums/sports.ts +141 -0
- package/src/utils/gameMatching.ts +1 -1
- package/src/utils/sports.ts +10 -2
package/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see main.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.thalesUtils=t():e.thalesUtils=t()}(self,(()=>(()=>{var e={9669:(e,t,r)=>{e.exports=r(1609)},5448:(e,t,r)=>{"use strict";var n=r(4867),i=r(6026),o=r(4372),s=r(5327),a=r(4097),u=r(4109),f=r(7985),l=r(5061),c=r(5655),h=r(5263);e.exports=function(e){return new Promise((function(t,r){var d,p=e.data,g=e.headers,y=e.responseType;function m(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}n.isFormData(p)&&delete g["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var _=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(_+":"+w)}var v=a(e.baseURL,e.url);function E(){if(b){var n="getAllResponseHeaders"in b?u(b.getAllResponseHeaders()):null,o={data:y&&"text"!==y&&"json"!==y?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:n,config:e,request:b};i((function(e){t(e),m()}),(function(e){r(e),m()}),o),b=null}}if(b.open(e.method.toUpperCase(),s(v,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=E:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(E)},b.onabort=function(){b&&(r(l("Request aborted",e,"ECONNABORTED",b)),b=null)},b.onerror=function(){r(l("Network Error",e,null,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||c.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",b)),b=null},n.isStandardBrowserEnv()){var S=(e.withCredentials||f(v))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;S&&(g[e.xsrfHeaderName]=S)}"setRequestHeader"in b&&n.forEach(g,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete g[t]:b.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),y&&"json"!==y&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(d=function(e){b&&(r(!e||e&&e.type?new h("canceled"):e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d))),p||(p=null),b.send(p)}))}},1609:(e,t,r)=>{"use strict";var n=r(4867),i=r(1849),o=r(321),s=r(7185),a=function e(t){var r=new o(t),a=i(o.prototype.request,r);return n.extend(a,o.prototype,r),n.extend(a,r),a.create=function(r){return e(s(t,r))},a}(r(5655));a.Axios=o,a.Cancel=r(5263),a.CancelToken=r(4972),a.isCancel=r(6502),a.VERSION=r(7288).version,a.all=function(e){return Promise.all(e)},a.spread=r(8713),a.isAxiosError=r(6268),e.exports=a,e.exports.default=a},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,r)=>{"use strict";var n=r(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,r)=>{"use strict";var n=r(4867),i=r(5327),o=r(782),s=r(3572),a=r(7185),u=r(4875),f=u.validators;function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:f.transitional(f.boolean),forcedJSONParsing:f.transitional(f.boolean),clarifyTimeoutError:f.transitional(f.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!n){var l=[s,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(o),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var c=e;r.length;){var h=r.shift(),d=r.shift();try{c=h(c)}catch(e){d(e);break}}try{i=s(c)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},l.prototype.getUri=function(e){return e=a(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(a(n||{},{method:e,url:t,data:r}))}})),e.exports=l},782:(e,t,r)=>{"use strict";var n=r(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,r)=>{"use strict";var n=r(1793),i=r(7303);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},5061:(e,t,r)=>{"use strict";var n=r(481);e.exports=function(e,t,r,i,o){var s=new Error(e);return n(s,t,r,i,o)}},3572:(e,t,r)=>{"use strict";var n=r(4867),i=r(8527),o=r(6502),s=r(5655),a=r(5263);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return u(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},7185:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function s(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function a(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function u(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var f={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=f[e]||o,i=t(e);n.isUndefined(i)&&t!==u||(r[e]=i)})),r}},6026:(e,t,r)=>{"use strict";var n=r(5061);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},8527:(e,t,r)=>{"use strict";var n=r(4867),i=r(5655);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,(function(r){e=r.call(o,e,t)})),e}},5655:(e,t,r)=>{"use strict";var n=r(4867),i=r(6016),o=r(481),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,f={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=r(5448)),u),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(0,JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||f.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,s=!r&&"json"===this.responseType;if(s||i&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){f.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){f.headers[e]=n.merge(s)})),e.exports=f},7288:e=>{e.exports={version:"0.24.0"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},5327:(e,t,r)=>{"use strict";var n=r(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(i)&&a.push("path="+i),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},6016:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},4109:(e,t,r)=>{"use strict";var n=r(4867),i=["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"];e.exports=function(e){var t,r,o,s={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,r)=>{"use strict";var n=r(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var o={};i.transitional=function(e,t,r){function i(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,s){if(!1===e)throw new Error(i(n," has been removed"+(t?" in "+t:"")));return t&&!o[n]&&(o[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],s=t[o];if(s){var a=e[o],u=void 0===a||s(a,o,e);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},4867:(e,t,r)=>{"use strict";var n=r(1849),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function f(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:f,isStream:function(e){return a(e)&&f(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):o(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,i){e[i]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],u=o[1],f=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,u)),l=0,c=u>0?s-4:s;for(r=0;r<c;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],f[l++]=t>>16&255,f[l++]=t>>8&255,f[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[l++]=t>>8&255,f[l++]=255&t),f},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,f=n-i;a<f;a+=s)o.push(u(e,a,a+s>f?f:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(i)return n?-1:$(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return R(this,t,r);case"ascii":return L(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){let o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(f(e,o)===f(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(f(e,o+n)!==f(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(X(n))return s;e[r+s]=n}return s}function v(e,t,r,n){return Y($(t,e.length-r),e,r,n)}function E(e,t,r,n){return Y(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return Y(z(t),e,r,n)}function N(e,t,r,n){return Y(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function R(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=I));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return f(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return c(e)},u.allocUnsafeSlow=function(e){return c(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(J(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?R(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),f=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<a;++e)if(f[e]!==l[e]){o=f[e],s=l[e];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function L(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function O(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=K[e[n]];return i}function M(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function P(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function B(e,t,r,n,i){F(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function x(e,t,r,n,i){F(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function k(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,o){return t=+t,r>>>=0,o||k(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,o){return t=+t,r>>>=0,o||k(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Z((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=Z((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Z((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=Z((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Z((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Z((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Z((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Z((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const V={};function G(e,t,r){V[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function D(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function F(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new V.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||W(t,e.length-(r+1))}(n,i,o)}function q(e,t){if("number"!=typeof e)throw new V.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,r){if(Math.floor(e)!==e)throw q(e,r),new V.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new V.ERR_BUFFER_OUT_OF_BOUNDS;throw new V.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}G("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),G("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),G("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=D(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=D(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},3562:(e,t,r)=>{const{Transform:n}=r(2830),[i]=Buffer.from("\r"),[o]=Buffer.from("\n"),s={escape:'"',headers:null,mapHeaders:({header:e})=>e,mapValues:({value:e})=>e,newline:"\n",quote:'"',raw:!1,separator:",",skipComments:!1,skipLines:null,maxRowBytes:Number.MAX_SAFE_INTEGER,strict:!1};class a extends n{constructor(e={}){super({objectMode:!0,highWaterMark:16}),Array.isArray(e)&&(e={headers:e});const t=Object.assign({},s,e);t.customNewline=t.newline!==s.newline;for(const e of["newline","quote","separator"])void 0!==t[e]&&([t[e]]=Buffer.from(t[e]));t.escape=(e||{}).escape?Buffer.from(t.escape)[0]:t.quote,this.state={empty:t.raw?Buffer.alloc(0):"",escaped:!1,first:!0,lineNumber:0,previousEnd:0,rowLength:0,quoted:!1},this._prev=null,!1===t.headers&&(t.strict=!1),(t.headers||!1===t.headers)&&(this.state.first=!1),this.options=t,this.headers=t.headers}parseCell(e,t,r){const{escape:n,quote:i}=this.options;e[t]===i&&e[r-1]===i&&(t++,r--);let o=t;for(let s=t;s<r;s++)e[s]===n&&s+1<r&&e[s+1]===i&&s++,o!==s&&(e[o]=e[s]),o++;return this.parseValue(e,t,o)}parseLine(e,t,r){const{customNewline:n,escape:o,mapHeaders:s,mapValues:a,quote:u,separator:f,skipComments:l,skipLines:c}=this.options;r--,!n&&e.length&&e[r-1]===i&&r--;const h=f,d=[];let p=!1,g=t;if(l){const r="string"==typeof l?l:"#";if(e[t]===Buffer.from(r)[0])return}const y=e=>{if(this.state.first)return e;const t=d.length,r=this.headers[t];return a({header:r,index:t,value:e})};for(let n=t;n<r;n++){const t=!p&&e[n]===u,i=p&&e[n]===u&&n+1<=r&&e[n+1]===h,s=p&&e[n]===o&&n+1<r&&e[n+1]===u;if(t||i)p=!p;else if(s)n++;else if(e[n]===h&&!p){let t=this.parseCell(e,g,n);t=y(t),d.push(t),g=n+1}}if(g<r){let t=this.parseCell(e,g,r);t=y(t),d.push(t)}e[r-1]===h&&d.push(y(this.state.empty));const m=c&&c>this.state.lineNumber;if(this.state.lineNumber++,this.state.first&&!m)return this.state.first=!1,this.headers=d.map(((e,t)=>s({header:e,index:t}))),void this.emit("headers",this.headers);if(!m&&this.options.strict&&d.length!==this.headers.length){const e=new RangeError("Row length does not match headers");this.emit("error",e)}else m||this.writeRow(d)}parseValue(e,t,r){return this.options.raw?e.slice(t,r):e.toString("utf-8",t,r)}writeRow(e){const t=!1===this.headers?e.map(((e,t)=>t)):this.headers,r=e.reduce(((e,r,n)=>{const i=t[n];return null===i||(void 0!==i?e[i]=r:e[`_${n}`]=r),e}),{});this.push(r)}_flush(e){if(this.state.escaped||!this._prev)return e();this.parseLine(this._prev,this.state.previousEnd,this._prev.length+1),e()}_transform(e,t,r){"string"==typeof e&&(e=Buffer.from(e));const{escape:n,quote:s}=this.options;let a=0,u=e;this._prev&&(a=this._prev.length,u=Buffer.concat([this._prev,e]),this._prev=null);const f=u.length;for(let e=a;e<f;e++){const t=u[e],l=e+1<f?u[e+1]:null;if(this.state.rowLength++,this.state.rowLength>this.options.maxRowBytes)return r(new Error("Row exceeds the maximum size"));this.state.escaped||t!==n||l!==s||e===a?t!==s?this.state.quoted||(this.state.first&&!this.options.customNewline&&(t===o?this.options.newline=o:t===i&&l!==o&&(this.options.newline=i)),t===this.options.newline&&(this.parseLine(u,this.state.previousEnd,e+1),this.state.previousEnd=e+1,this.state.rowLength=0)):this.state.escaped?this.state.escaped=!1:this.state.quoted=!this.state.quoted:this.state.escaped=!0}return this.state.previousEnd===f?(this.state.previousEnd=0,r()):f-this.state.previousEnd<e.length?(this._prev=e,this.state.previousEnd-=f-e.length,r()):(this._prev=u,void r())}}e.exports=e=>new a(e)},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var i,o,s,f;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,f=l,console&&console.warn&&console.warn(f)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var f=u.length,l=p(u,f);for(r=0;r<f;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return f(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return f(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,c(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,c(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>1,l=-7,c=r?i-1:0,h=r?-1:1,d=e[t+c];for(c+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+c],c+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+c],c+=h,l-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=f}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,f=8*o-i-1,l=(1<<f)-1,c=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=l?(a=0,s=l):s+c>=1?(a=(t*u-1)*Math.pow(2,i),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;e[r+d]=255&s,d+=p,s/=256,f-=8);e[r+d-p]|=128*g}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},4281:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,a,u;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var f=("number"!=typeof u&&(u=0),u+1>(a=e).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(e,'" ').concat(f," ").concat(i," ").concat(n(t,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6753:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var i=r(9481),o=r(4229);r(5717)(f,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];f.prototype[u]||(f.prototype[u]=o.prototype[u])}function f(e){if(!(this instanceof f))return new f(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},2725:(e,t,r)=>{"use strict";e.exports=i;var n=r(4605);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(5717)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},9481:(e,t,r)=>{"use strict";var n;e.exports=N,N.ReadableState=S,r(7187).EventEmitter;var i,o=function(e,t){return e.listeners(t).length},s=r(2503),a=r(8764).Buffer,u=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(4616);i=f&&f.debuglog?f.debuglog("stream"):function(){};var l,c,h,d=r(7327),p=r(1195),g=r(2457).getHighWaterMark,y=r(4281).q,m=y.ERR_INVALID_ARG_TYPE,b=y.ERR_STREAM_PUSH_AFTER_EOF,_=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(N,s);var v=p.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(6753),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(2553).s),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function N(e){if(n=n||r(6753),!(this instanceof N))return new N(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function A(e,t,r,n,o){i("readableAddChunk",t);var s,f=e._readableState;if(null===t)f.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,f);else if(o||(s=function(e,t){var r,n;return n=t,a.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new m("chunk",["string","Buffer","Uint8Array"],t)),r}(f,t)),s)v(e,s);else if(f.objectMode||t&&t.length>0)if("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)f.endEmitted?v(e,new w):R(e,f,t,!0);else if(f.ended)v(e,new b);else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?R(e,f,t,!1):M(e,f)):R(e,f,t,!1)}else n||(f.reading=!1,M(e,f));return!f.ended&&(f.length<f.highWaterMark||0===f.length)}function R(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&T(e)),M(e,t)}Object.defineProperty(N.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),N.prototype.destroy=p.destroy,N.prototype._undestroy=p.undestroy,N.prototype._destroy=function(e,t){t(e)},N.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),A(this,e,t,!1,r)},N.prototype.unshift=function(e){return A(this,e,null,!0,!1)},N.prototype.isPaused=function(){return!1===this._readableState.flowing},N.prototype.setEncoding=function(e){l||(l=r(2553).s);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var I=1073741824;function L(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(O,e))}function O(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,k(e)}function M(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function C(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function B(e){i("readable nexttick read 0"),e.read(0)}function x(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),k(e),t.flowing&&!t.reading&&e.read(0)}function k(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function U(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function j(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(V,t,e))}function V(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function G(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}N.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):T(this),null;if(0===(e=L(e,t))&&t.ended)return 0===t.length&&j(this),null;var n,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",o=!0),t.ended||t.reading?i("reading or ended",o=!1):o&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=L(r,t))),null===(n=e>0?U(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&j(this)),null!==n&&this.emit("data",n),n},N.prototype._read=function(e){v(this,new _("_read()"))},N.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===process.stdout||e===process.stderr?p:a;function a(){i("onend"),e.end()}n.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",(function t(o,s){i("onunpipe"),o===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,i("cleanup"),e.removeListener("close",h),e.removeListener("finish",d),e.removeListener("drain",u),e.removeListener("error",c),e.removeListener("unpipe",t),r.removeListener("end",a),r.removeListener("end",p),r.removeListener("data",l),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,k(e))}}(r);e.on("drain",u);var f=!1;function l(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==G(n.pipes,e))&&!f&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function c(t){i("onerror",t),p(),e.removeListener("error",c),0===o(e,"error")&&v(e,t)}function h(){e.removeListener("finish",d),p()}function d(){i("onfinish"),e.removeListener("close",h),p()}function p(){i("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",c),e.once("close",h),e.once("finish",d),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},N.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=G(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},N.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?T(this):n.reading||process.nextTick(B,this))),r},N.prototype.addListener=N.prototype.on,N.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(C,this),r},N.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(C,this),t},N.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(x,e,t))}(this,e)),e.paused=!1,this},N.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},N.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var s=0;s<E.length;s++)e.on(E[s],this.emit.bind(this,E[s]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(N.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(5850)),c(this)}),Object.defineProperty(N.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(N.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(N.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),N._fromList=U,Object.defineProperty(N.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(N.from=function(e,t){return void 0===h&&(h=r(5167)),h(N,e,t)})},4605:(e,t,r)=>{"use strict";e.exports=l;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6753);function f(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}r(5717)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},4229:(e,t,r)=>{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=N,N.WritableState=S;var o,s={deprecate:r(4927)},a=r(2503),u=r(8764).Buffer,f=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(1195),c=r(2457).getHighWaterMark,h=r(4281).q,d=h.ERR_INVALID_ARG_TYPE,p=h.ERR_METHOD_NOT_IMPLEMENTED,g=h.ERR_MULTIPLE_CALLBACK,y=h.ERR_STREAM_CANNOT_PIPE,m=h.ERR_STREAM_DESTROYED,b=h.ERR_STREAM_NULL_VALUES,_=h.ERR_STREAM_WRITE_AFTER_END,w=h.ERR_UNKNOWN_ENCODING,v=l.errorOrDestroy;function E(){}function S(e,t,o){i=i||r(6753),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=c(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(O,e,t),e._writableState.errorEmitted=!0,v(e,n)):(i(n),e._writableState.errorEmitted=!0,v(e,n),O(e,t))}(e,r,n,t,i);else{var o=L(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||I(e,r),n?process.nextTick(R,e,r,o,i):R(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function N(e){var t=this instanceof(i=i||r(6753));if(!t&&!o.call(N,this))return new N(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function A(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new m("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function R(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function I(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,o=new Array(i),s=t.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,A(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,l=r.encoding,c=r.callback;if(A(e,t,!1,t.objectMode?1:f.length,f,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function L(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function T(e,t){e._final((function(r){t.pendingcb--,r&&v(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var r=L(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(T,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(5717)(N,a),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(N,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===N&&e&&e._writableState instanceof S}})):o=function(e){return e instanceof this},N.prototype.pipe=function(){v(this,new y)},N.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=e,u.isBuffer(n)||n instanceof f);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=E),i.ending?function(e,t){var r=new _;v(e,r),process.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i;return null===r?i=new b:"string"==typeof r||t.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i||(v(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r)),t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else A(e,t,!1,a,n,i,o);return f}(this,i,s,e,t,r)),o},N.prototype.cork=function(){this._writableState.corked++},N.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||I(this,e))},N.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(N.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),N.prototype._write=function(e,t,r){r(new p("_write()"))},N.prototype._writev=null,N.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(N.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(N.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),N.prototype.destroy=l.destroy,N.prototype._undestroy=l.undestroy,N.prototype._destroy=function(e,t){t(e)}},5850:(e,t,r)=>{"use strict";var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(8610),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var r=e[h].read();null!==r&&(e[l]=null,e[s]=null,e[a]=null,t(d(r,!1)))}}function g(e){process.nextTick(p,e)}var y=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[u]?r(e[u]):t(d(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[f]?r(d(void 0,!0)):t[c](r,n)}),n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[c])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),y);e.exports=function(e){var t,r=Object.create(m,(i(t={},h,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,f,{value:e._readableState.endEmitted,writable:!0}),i(t,c,{value:function(e,t){var n=r[h].read();n?(r[l]=null,r[s]=null,r[a]=null,e(d(n,!1))):(r[s]=e,r[a]=t)},writable:!0}),t));return r[l]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[l]=null,r[s]=null,r[a]=null,t(e)),void(r[u]=e)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[f]=!0})),e.on("readable",g.bind(null,r)),r}},7327:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var u=r(8764).Buffer,f=r(2361).inspect,l=f&&f.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,u.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return f(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},1195:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(r,o),i(e)):process.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},8610:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},f=t._writableState&&t._writableState.finished,l=function(){a=!1,f=!0,s||o.call(t)},c=t._readableState&&t._readableState.endEmitted,h=function(){s=!1,c=!0,a||o.call(t)},d=function(e){o.call(t,e)},p=function(){var e;return s&&!c?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):a&&!f?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},g=function(){t.req.on("finish",l)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",l),t.on("abort",p),t.req?g():t.on("request",g)):a&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",h),t.on("finish",l),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},5167:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(e,t,r)=>{"use strict";var n,i=r(4281).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e){e()}function f(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var l,c=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var h=t.map((function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;e.on("close",(function(){a=!0})),void 0===n&&(n=r(8610)),n(e,{readable:t,writable:i},(function(e){if(e)return o(e);a=!0,o()}));var u=!1;return function(t){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new s("pipe"))}}(e,o,i>0,(function(e){l||(l=e),e&&h.forEach(u),o||(h.forEach(u),c(l))}))}));return t.reduce(f)}},2457:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},2503:(e,t,r)=>{e.exports=r(7187).EventEmitter},9509:(e,t,r)=>{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2830:(e,t,r)=>{e.exports=i;var n=r(7187).EventEmitter;function i(){n.call(this)}r(5717)(i,n),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),e.removeListener("error",f),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",f),e.on("error",f),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=f,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},2361:()=>{},4616:()=>{}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{NetworkId:()=>u,adjustSpreadOnOdds:()=>B,allowGame:()=>O,allowGameSportWithPeriodConstraint:()=>M,allowSoccerGame:()=>P,allowTennisMatch:()=>C,calculateImpliedOddsDifference:()=>h,checkOddsFromBookmakers:()=>c,findOddsForTeam:()=>T,gamesDatesMatching:()=>L,getBookmakersArray:()=>l,getSpreadData:()=>x,parseCsv:()=>w,readCsvFromUrl:()=>_,teamNamesMatching:()=>I}),"function"!=typeof Object.assign&&(Object.assign=function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])}return r});var e=function(e){return parseFloat(e.toPrecision(12))};function t(e,r,n){return void 0===n||0==+n?Math[e](r):(r=+r,n=+n,isNaN(r)||"number"!=typeof n||n%1!=0?NaN:r<0?-t(e,-r,n):(r=r.toString().split("e"),+((r=(r=Math[e](+(r[0]+"e"+(r[1]?+r[1]-n:-n)))).toString().split("e"))[0]+"e"+(r[1]?+r[1]+n:n))))}var i,o,s={decimal:{from:function(e){if((e=parseFloat(e))<=1)throw new Error("Outside valid range.");return e},to:function(){return this.decimalValue}},moneyline:{from:function(e){return(e=parseFloat(e))>=0?e/100+1:100/-e+1},to:function(){return this.decimalValue>=2?e(100*(this.decimalValue-1)):e(-100/(this.decimalValue-1))}},hongKong:{from:function(e){if((e=parseFloat(e))<0)throw new Error("Outside valid range.");return e+1},to:function(){return e(this.decimalValue-1)}},impliedProbability:{from:function(e){if((e="string"==typeof e&&"%"==e.slice(-1)?parseFloat(e)/100:parseFloat(e))<=0||e>=1)throw new Error("Outside valid range");return 1/e},to:function(r){if(r.percentage){var n=e(100/this.decimalValue);return null!==r.precision&&(n=t("round",n,-r.precision)),n.toString()+"%"}return e(1/this.decimalValue)}},fractional:{from:function(e){var t,r=e.toString().split("/");if(e=parseFloat(r[0]),2===r.length)t=parseFloat(r[1]);else{if(1!==r.length)throw new Error("Invalid fraction");t=1}if(0===e||0===t||e/t<=0)throw new Error("Outside valid range");return 1+e/t},to:function(e){return function(e,t){for(var r,n=[0,1],i=[1,0],o=function(e){var t=null,r=e.toString().indexOf("E");-1==r&&(r=e.toString().indexOf("e"));var n=null,i=(t=-1==r?e.toString():e.toString().substring(0,r)).toString().indexOf(".");-1==i?n=t:0===i?n=t.substring(1,t.length):i<t.length&&(n=t.substring(0,i)+t.substring(i+1,t.length));var o=n,s=o.toString().length,a=e,u=a.toString().length;0===a&&(u=0);var f,l=s-u;for(f=l;f>0&&o%2==0;f--)o/=2;for(f=l;f>0&&o%5==0;f--)o/=5;return o}(e),s=e,a=Math.pow(10,-t)/2,u=2;u<1e3;u++){var f=Math.floor(s);if(n[u]=f*n[u-1]+n[u-2],Math.abs(n[u])>o)return;if(i[u]=f*i[u-1]+i[u-2],r=n[u]/i[u],Math.abs(r-e)<a||NaN==r)return n[u].toString()+"/"+i[u].toString();s=1/(s-f)}}(this.decimalValue-1,e.precision||12)}},malay:{from:function(e){if((e=parseFloat(e))<=-1||e>1)throw new Error("Outside valid range.");return e<0&&(e=-1/e),e+1},to:function(){return this.decimalValue<=2?e(this.decimalValue-1):e(-1/(this.decimalValue-1))}},indonesian:{from:function(e){if(0===(e=parseFloat(e)))throw new Error("Outside valid range.");return e>=1?e+1:-1/e+1},to:function(){return this.decimalValue<2?e(-1/(this.decimalValue-1)):e(this.decimalValue-1)}}},a=((o=function(t){if("number"!=typeof t||isNaN(t))throw new Error("Invalid odds");this.decimalValue=e(t)}).prototype=(i=function(){throw new Error("This constructor is private, please use the from* functions")}).prototype,i.from=function(e,t){if(!s.hasOwnProperty(e))throw new Error("Unknown format "+e+".");var r=s[e].from(t);return new o(r)},i);a.prototype.to=function(e,r){if(!s.hasOwnProperty(e))throw new Error("Unknown format "+e+".");r=Object.assign({precision:null,percentage:!1},r);var n=s[e].to.call(this,r);return"number"==typeof n&&null!==r.precision&&(n=t("round",n,-r.precision)),n};var u,f=a.from,l=function(e,t,r){var n=e.find((function(e){return Number(e.sportId)===Number(t)}));if(n){if(""==n.primaryBookmaker)return r;var i=[];return n.primaryBookmaker&&i.push(n.primaryBookmaker),n.secondaryBookmaker&&i.push(n.secondaryBookmaker),n.tertiaryBookmaker&&i.push(n.tertiaryBookmaker),i}return r},c=function(e,t,r,n,i){var o=t.some((function(t){var n=e.get(t);return!!n&&(0===n.homeOdds||0===n.awayOdds||!r&&0===n.drawOdds||1===n.homeOdds||1===n.awayOdds||!r&&1===n.drawOdds)}));if(1==t.length){if(o)return[{homeOdds:0,awayOdds:0,drawOdds:0}];var s=t[0],a=e.get(s);return[{homeOdds:a.homeOdds,awayOdds:a.awayOdds,drawOdds:r?0:a.drawOdds}]}if(o)return[{homeOdds:0,awayOdds:0,drawOdds:0}];var u=e.get(t[0]),l=u.homeOdds,c=u.awayOdds,d=u.drawOdds;if(t.slice(1).some((function(t){var o=e[t];if(o){var s=o.homeOdds,a=o.awayOdds,u=o.drawOdds,p=f("decimal",l).to("impliedProbability"),g=f("decimal",c).to("impliedProbability"),y=r?0:f("decimal",d).to("impliedProbability"),m=f("decimal",s).to("impliedProbability"),b=f("decimal",a).to("impliedProbability"),_=r?0:f("decimal",u).to("impliedProbability"),w=h(p,m),v=h(g,b),E=r?0:h(y,_);if(w>n&&p>i&&m>i||v>n&&g>i&&b>i||!r&&E>n&&y>i&&_>i)return!0}return!1})))return console.log("Returning zero odds due to percentage difference"),[{homeOdds:0,awayOdds:0,drawOdds:0}];var p=[];return t.forEach((function(t){return p.push(e.get(t))})),null!=p[0]?p.map((function(e){return{homeOdds:e.homeOdds,awayOdds:e.awayOdds,drawOdds:r?0:e.drawOdds}})):(console.log("Returning zero odds cause no matching bookmakers have been found"),[{homeOdds:0,awayOdds:0,drawOdds:0}])},h=function(e,t){var r=Math.abs(e-t)/e*100;return console.log("% diff: "+r),r},d=r(9669),p=r.n(d),g=r(3562),y=r.n(g),m=r(2830),b=r.n(m),_=function(e){return t=void 0,r=void 0,i=function(){var t,r,n,i;return function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,p().get(e)];case 1:return t=o.sent(),r=t.data,(n=new(b().Readable)).push(r),n.push(null),[4,w(n)];case 2:return[2,o.sent()];case 3:throw i=o.sent(),console.error("Failed to read CSV from URL: ".concat(e),i),i;case 4:return[2]}}))},new((n=void 0)||(n=Promise))((function(e,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(s,a)}u((i=i.apply(t,r||[])).next())}));var t,r,n,i},w=function(e){return new Promise((function(t,r){var n=[];e.pipe(y()()).on("data",(function(e){return n.push(e)})).on("end",(function(){return t(n)})).on("error",(function(e){return r(e)}))}))},v="Soccer",E="Basketball",S="Baseball",N="Hockey",A={NCAAF:1,NFL:2,MLB:3,NBA:4,NCAAB:5,NHL:6,UFC:7,WNBA:8,MLS:10,EPL:11,LIGUE_ONE:12,BUNDESLIGA:13,LA_LIGA:14,SERIE_A:15,UEFA_CL:16,UEFA_EL:17,FIFA_WC:18,J1_LEAGUE:19,IPL:20,T20_BLAST:21,IIHF_WORLD_CHAMPIONSHIP:33,COPA_AMERICA:44,COPA_LIBERTADORES:45,UEFA_EURO:50,EREDIVISIE:57,PRIMEIRA_LIGA:61,FIFA_WC_WOMEN:76,ENGLAND_CUP:132,FRANCE_CUP:134,SPAIN_CUP:138,ITALY_CUP:141,TENNIS_GS:153,TENNIS_MASTERS:156,GERMANY_CUP:209,LIGA_MX:230,BRAZIL_1:268,UEFA_EURO_U21:288,FIFA_WORLD_CUP_U20:296,EUROLEAGUE:399,FIBA_WORLD_CUP:409,FORMULA1:445,MOTOGP:497,SAUDI_PROFESSIONAL_LEAGUE:536,BOXING:9196,UEFA_NATIONS_LEAGUE:9806,CONCACAF_NATIONS_LEAGUE:9821,CSGO:9977,DOTA2:9983,SUMMER_OLYMPICS_QUALIFICATION:10502,LOL:10138,CONMEBOL_WC_QUALIFICATIONS:10199,UEFA_CONFERENCE_LEAGUE:10216,NON_TITLE_BOXING:10595,GOLF_H2H:100021,GOLF_WINNER:100121,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_1:15312,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_2:15313,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_3:15314,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_4:15315,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_5:15316,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_6:15317,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_7:15318,TENNIS_MASTERS_LIVE_MAPPING_V2_1:15622,TENNIS_MASTERS_LIVE_MAPPING_V2_2:15623,TENNIS_MASTERS_LIVE_MAPPING_V2_3:15624,TENNIS_MASTERS_LIVE_MAPPING_V2_4:15625,TENNIS_MASTERS_LIVE_MAPPING_V2_5:15626,TENNIS_MASTERS_LIVE_MAPPING_V2_6:15627,TENNIS_MASTERS_LIVE_MAPPING_V2_7:15628,TENNIS_MASTERS_LIVE_MAPPING_V2_8:15632,TENNIS_MASTERS_LIVE_MAPPING_V2_9:15633,TENNIS_MASTERS_LIVE_MAPPING_V2_10:15634,TENNIS_MASTERS_LIVE_MAPPING_V2_11:15635,TENNIS_MASTERS_LIVE_MAPPING_V2_12:15636,TENNIS_MASTERS_LIVE_MAPPING_V2_13:15637,TENNIS_MASTERS_LIVE_MAPPING_V2_14:15638,TENNIS_MASTERS_LIVE_MAPPING_V2_15:15641,TENNIS_MASTERS_LIVE_MAPPING_V2_16:15642,TENNIS_MASTERS_LIVE_MAPPING_V2_17:15643,TENNIS_MASTERS_LIVE_MAPPING_V2_18:15644,TENNIS_MASTERS_LIVE_MAPPING_V2_19:15645,TENNIS_MASTERS_LIVE_MAPPING_V2_20:15646,TENNIS_MASTERS_LIVE_MAPPING_V2_21:15647,TENNIS_MASTERS_LIVE_MAPPING_V2_22:15648},R=[A.CSGO,A.DOTA2,A.LOL,A.TENNIS_GS,A.TENNIS_MASTERS,A.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_1,A.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_2,A.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_3,A.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_4,A.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_5,A.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_6,A.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_7,A.TENNIS_MASTERS_LIVE_MAPPING_V2_1,A.TENNIS_MASTERS_LIVE_MAPPING_V2_2,A.TENNIS_MASTERS_LIVE_MAPPING_V2_3,A.TENNIS_MASTERS_LIVE_MAPPING_V2_4,A.TENNIS_MASTERS_LIVE_MAPPING_V2_5,A.TENNIS_MASTERS_LIVE_MAPPING_V2_6,A.TENNIS_MASTERS_LIVE_MAPPING_V2_7,A.TENNIS_MASTERS_LIVE_MAPPING_V2_8,A.TENNIS_MASTERS_LIVE_MAPPING_V2_9,A.TENNIS_MASTERS_LIVE_MAPPING_V2_10,A.TENNIS_MASTERS_LIVE_MAPPING_V2_11,A.TENNIS_MASTERS_LIVE_MAPPING_V2_12,A.TENNIS_MASTERS_LIVE_MAPPING_V2_13,A.TENNIS_MASTERS_LIVE_MAPPING_V2_14,A.TENNIS_MASTERS_LIVE_MAPPING_V2_15,A.TENNIS_MASTERS_LIVE_MAPPING_V2_16,A.TENNIS_MASTERS_LIVE_MAPPING_V2_17,A.TENNIS_MASTERS_LIVE_MAPPING_V2_18,A.TENNIS_MASTERS_LIVE_MAPPING_V2_19,A.TENNIS_MASTERS_LIVE_MAPPING_V2_20,A.TENNIS_MASTERS_LIVE_MAPPING_V2_21,A.TENNIS_MASTERS_LIVE_MAPPING_V2_22],I=function(e,t,r,n,i,o){var s,a;if(R.includes(e)?(s=n.toLowerCase()==t.toLowerCase()||n.toLowerCase()==r.toLowerCase(),a=i.toLowerCase()==t.toLowerCase()||i.toLowerCase()==r.toLowerCase()):(s=n.toLowerCase()==t.toLowerCase(),a=i.toLowerCase()==r.toLowerCase()),!0!==s){var u=o.get(n.toLowerCase()),f=o.get(t.toLowerCase()),l=o.get(r.toLowerCase());if([u,f].some((function(e){return null==e})))return!1;s=R.includes(e)?u==f||u==l:u==f}if(!0!==a){var c=o.get(i.toLowerCase());if(f=o.get(t.toLowerCase()),[c,l=o.get(r.toLowerCase())].some((function(e){return null==e})))return!1;a=R.includes(e)&&c==f||c==l}return s&&a},L=function(e,t,r,n){var i;if(r.toString().startsWith(A.TENNIS_GS.toString())||r.toString().startsWith(A.TENNIS_MASTERS.toString())){var o=t.getTime(),s=e.getTime();i=Math.abs(s-o)<=Number(60*n*1e3)}else i=t.toUTCString()==e.toUTCString();return i},T=function(e,t,r,n,i){var o=new Map;return e.forEach((function(e){var s,a,u=t.odds.filter((function(t){return t.sports_book_name.toLowerCase()==e.toLowerCase()})),f=n.get(r.homeTeam.toLowerCase()),l=n.get(r.awayTeam.toLowerCase()),c=0;null!=(s=null==f?u.find((function(e){var t=n.get(e.name.toLowerCase());return null==t?e.name.toLowerCase()==r.homeTeam.toLowerCase():t==r.homeTeam.toLowerCase()})):u.find((function(e){var t=n.get(e.name.toLowerCase());return null==t?e.name.toLowerCase()==f:t==f})))&&(c=s.price);var h=0;null!=(a=null==l?u.find((function(e){var t=n.get(e.name.toLowerCase());return null==t?e.name.toLowerCase()==r.awayTeam.toLowerCase():t==r.awayTeam.toLowerCase()})):u.find((function(e){var t=n.get(e.name.toLowerCase());return null==t?e.name.toLowerCase()==l:t==l})))&&(h=a.price);var d=0;if(i){var p=u.find((function(e){return"draw"==e.name.toLowerCase()}));null!=p&&(d=p.price)}o.set(e.toLowerCase(),{homeOdds:c,awayOdds:h,drawOdds:d})})),o},O=function(e,t,r,n){var i,o=e.score_home_total,s=e.score_away_total,a=e.clock,u=e.period,f=e.status,l=e.home_team,c=e.away_team;return"completed"==f.toLowerCase()?(console.log("Blocking game ".concat(l," - ").concat(c," because it is no longer live.")),null):(r===E&&(i=M(l,c,u,n.get(E))),r===N&&(i=M(l,c,u,n.get(N))),r===S&&(i=M(l,c,u,n.get(S))),r===v&&(i=P(l,c,a,n.get(v))),"Tennis"===r&&(i=C(e,l,c,u,o,s,t)),i)},M=function(e,t,r,n){return Number(r)>=n?{allow:!1,message:"Blocking game ".concat(e," - ").concat(t," due to period: ").concat(r,". period")}:{allow:!0,message:""}},P=function(e,t,r,n){var i=Number(r);return!Number.isNaN(i)&&i>=n||Number.isNaN(i)&&"HALF"!=r?{allow:!1,message:"Blocking game ".concat(e," - ").concat(t," due to clock: ").concat(r,"min")}:{allow:!0,message:""}},C=function(e,t,r,n,i,o,s){var a,u,f=Number(n),l="atp"==e.league.toLowerCase();if(s==A.TENNIS_GS&&l){if(2==Number(i)||2==Number(o)){switch(f){case 3:a=Number(e.score_home_period_3),u=Number(e.score_away_period_3);break;case 4:a=Number(e.score_home_period_4),u=Number(e.score_away_period_4);break;case 5:a=Number(e.score_home_period_5),u=Number(e.score_away_period_5)}return 2==Number(i)&&a>=5||2==Number(o)&&u>=5?{allow:!1,message:"Blocking game ".concat(t," - ").concat(r," due to current result: ").concat(i," - ").concat(o," (").concat(a," - ").concat(u,")")}:{allow:!0,message:"",currentHomeGameScore:a,currentAwayGameScore:u}}}else if(1==Number(i)||1==Number(o)){switch(f){case 2:a=Number(e.score_home_period_2),u=Number(e.score_away_period_2);break;case 3:a=Number(e.score_home_period_3),u=Number(e.score_away_period_3)}return 1==Number(i)&&a>=5||1==Number(o)&&u>=5?{allow:!1,message:"Blocking game ".concat(t," - ").concat(r," due to current result: ").concat(i," - ").concat(o," (").concat(a," - ").concat(u,")")}:{allow:!0,message:"",currentHomeGameScore:a,currentAwayGameScore:u}}},B=function(e,t,r){if(e.some((function(e){return 0===e})))return e;var n=e.reduce((function(e,t){return e+t}),0);if(n<=1)return Array(e.length).fill(0);if(0===r){if(!(t>100*(n-1)))return e;r=t}var i=1+r/100,o=i/n,s=e.map((function(e){return e*o}));if(s.some((function(e){return e>=1})))return Array(e.length).fill(0);var a=s.reduce((function(e,t){return e+t}),0);if(a<1)return Array(e.length).fill(0);var u=i/a;return s.map((function(e){return e*u}))},x=function(e,t,r,n){var i=e.find((function(e){return Number(e.typeId)===Number(r)&&Number(e.sportId)===Number(t)}));return i?{minSpread:i.minSpread?Number(i.minSpread):n,targetSpread:i.targetSpread?Number(i.targetSpread):0}:{minSpread:n,targetSpread:0}};!function(e){e[e.Mainnet=1]="Mainnet",e[e.OptimismMainnet=10]="OptimismMainnet",e[e.PolygonMainnet=137]="PolygonMainnet",e[e.ZkSyncSepolia=300]="ZkSyncSepolia",e[e.ZkSync=324]="ZkSync",e[e.Base=8453]="Base",e[e.Arbitrum=42161]="Arbitrum",e[e.OptimismSepolia=11155420]="OptimismSepolia",e[e.BlastSepolia=168587773]="BlastSepolia"}(u||(u={}))})(),n})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.thalesUtils=t():e.thalesUtils=t()}(self,(()=>(()=>{var e={9669:(e,t,r)=>{e.exports=r(1609)},5448:(e,t,r)=>{"use strict";var n=r(4867),i=r(6026),o=r(4372),s=r(5327),a=r(4097),u=r(4109),f=r(7985),l=r(5061),c=r(5655),h=r(5263);e.exports=function(e){return new Promise((function(t,r){var d,p=e.data,g=e.headers,_=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}n.isFormData(p)&&delete g["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(m+":"+w)}var E=a(e.baseURL,e.url);function v(){if(b){var n="getAllResponseHeaders"in b?u(b.getAllResponseHeaders()):null,o={data:_&&"text"!==_&&"json"!==_?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:n,config:e,request:b};i((function(e){t(e),y()}),(function(e){r(e),y()}),o),b=null}}if(b.open(e.method.toUpperCase(),s(E,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=v:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(v)},b.onabort=function(){b&&(r(l("Request aborted",e,"ECONNABORTED",b)),b=null)},b.onerror=function(){r(l("Network Error",e,null,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||c.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",b)),b=null},n.isStandardBrowserEnv()){var S=(e.withCredentials||f(E))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;S&&(g[e.xsrfHeaderName]=S)}"setRequestHeader"in b&&n.forEach(g,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete g[t]:b.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),_&&"json"!==_&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(d=function(e){b&&(r(!e||e&&e.type?new h("canceled"):e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d))),p||(p=null),b.send(p)}))}},1609:(e,t,r)=>{"use strict";var n=r(4867),i=r(1849),o=r(321),s=r(7185),a=function e(t){var r=new o(t),a=i(o.prototype.request,r);return n.extend(a,o.prototype,r),n.extend(a,r),a.create=function(r){return e(s(t,r))},a}(r(5655));a.Axios=o,a.Cancel=r(5263),a.CancelToken=r(4972),a.isCancel=r(6502),a.VERSION=r(7288).version,a.all=function(e){return Promise.all(e)},a.spread=r(8713),a.isAxiosError=r(6268),e.exports=a,e.exports.default=a},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,r)=>{"use strict";var n=r(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,r)=>{"use strict";var n=r(4867),i=r(5327),o=r(782),s=r(3572),a=r(7185),u=r(4875),f=u.validators;function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:f.transitional(f.boolean),forcedJSONParsing:f.transitional(f.boolean),clarifyTimeoutError:f.transitional(f.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!n){var l=[s,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(o),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var c=e;r.length;){var h=r.shift(),d=r.shift();try{c=h(c)}catch(e){d(e);break}}try{i=s(c)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},l.prototype.getUri=function(e){return e=a(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(a(n||{},{method:e,url:t,data:r}))}})),e.exports=l},782:(e,t,r)=>{"use strict";var n=r(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,r)=>{"use strict";var n=r(1793),i=r(7303);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},5061:(e,t,r)=>{"use strict";var n=r(481);e.exports=function(e,t,r,i,o){var s=new Error(e);return n(s,t,r,i,o)}},3572:(e,t,r)=>{"use strict";var n=r(4867),i=r(8527),o=r(6502),s=r(5655),a=r(5263);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return u(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},7185:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function s(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function a(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function u(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var f={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=f[e]||o,i=t(e);n.isUndefined(i)&&t!==u||(r[e]=i)})),r}},6026:(e,t,r)=>{"use strict";var n=r(5061);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},8527:(e,t,r)=>{"use strict";var n=r(4867),i=r(5655);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,(function(r){e=r.call(o,e,t)})),e}},5655:(e,t,r)=>{"use strict";var n=r(4867),i=r(6016),o=r(481),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,f={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=r(5448)),u),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(0,JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||f.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,s=!r&&"json"===this.responseType;if(s||i&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){f.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){f.headers[e]=n.merge(s)})),e.exports=f},7288:e=>{e.exports={version:"0.24.0"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},5327:(e,t,r)=>{"use strict";var n=r(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(i)&&a.push("path="+i),n.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,r)=>{"use strict";var n=r(4867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},6016:(e,t,r)=>{"use strict";var n=r(4867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},4109:(e,t,r)=>{"use strict";var n=r(4867),i=["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"];e.exports=function(e){var t,r,o,s={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,r)=>{"use strict";var n=r(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var o={};i.transitional=function(e,t,r){function i(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,s){if(!1===e)throw new Error(i(n," has been removed"+(t?" in "+t:"")));return t&&!o[n]&&(o[n]=!0,console.warn(i(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],s=t[o];if(s){var a=e[o],u=void 0===a||s(a,o,e);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},4867:(e,t,r)=>{"use strict";var n=r(1849),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function f(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:f,isStream:function(e){return a(e)&&f(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):o(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,i){e[i]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],u=o[1],f=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,u)),l=0,c=u>0?s-4:s;for(r=0;r<c;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],f[l++]=t>>16&255,f[l++]=t>>8&255,f[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[l++]=t>>8&255,f[l++]=255&t),f},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,f=n-i;a<f;a+=s)o.push(u(e,a,a+s>f?f:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||X(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(e).length;default:if(i)return n?-1:$(e).length;t=(""+t).toLowerCase(),i=!0}}function _(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return N(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){let o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(f(e,o)===f(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(f(e,o+n)!==f(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(X(n))return s;e[r+s]=n}return s}function E(e,t,r,n){return z($(t,e.length-r),e,r,n)}function v(e,t,r,n){return z(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return z(Y(t),e,r,n)}function A(e,t,r,n){return z(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function N(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=L)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=L));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return f(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return c(e)},u.allocUnsafeSlow=function(e){return c(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(J(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?I(this,0,e):_.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),f=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<a;++e)if(f[e]!==l[e]){o=f[e],s=l[e];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return v(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const L=4096;function R(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function O(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Q[e[n]];return i}function M(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function P(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function U(e,t,r,n,i){V(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function B(e,t,r,n,i){V(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function x(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(e,t,r,n,o){return t=+t,r>>>=0,o||x(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return t=+t,r>>>=0,o||x(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=K((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=K((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=K((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=K((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||q(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=K((function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=K((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=K((function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=K((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const F={};function j(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function G(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||q(t,e.length-(r+1))}(n,i,o)}function W(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,r){if(Math.floor(e)!==e)throw W(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=G(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=G(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Y(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function K(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},3562:(e,t,r)=>{const{Transform:n}=r(2830),[i]=Buffer.from("\r"),[o]=Buffer.from("\n"),s={escape:'"',headers:null,mapHeaders:({header:e})=>e,mapValues:({value:e})=>e,newline:"\n",quote:'"',raw:!1,separator:",",skipComments:!1,skipLines:null,maxRowBytes:Number.MAX_SAFE_INTEGER,strict:!1};class a extends n{constructor(e={}){super({objectMode:!0,highWaterMark:16}),Array.isArray(e)&&(e={headers:e});const t=Object.assign({},s,e);t.customNewline=t.newline!==s.newline;for(const e of["newline","quote","separator"])void 0!==t[e]&&([t[e]]=Buffer.from(t[e]));t.escape=(e||{}).escape?Buffer.from(t.escape)[0]:t.quote,this.state={empty:t.raw?Buffer.alloc(0):"",escaped:!1,first:!0,lineNumber:0,previousEnd:0,rowLength:0,quoted:!1},this._prev=null,!1===t.headers&&(t.strict=!1),(t.headers||!1===t.headers)&&(this.state.first=!1),this.options=t,this.headers=t.headers}parseCell(e,t,r){const{escape:n,quote:i}=this.options;e[t]===i&&e[r-1]===i&&(t++,r--);let o=t;for(let s=t;s<r;s++)e[s]===n&&s+1<r&&e[s+1]===i&&s++,o!==s&&(e[o]=e[s]),o++;return this.parseValue(e,t,o)}parseLine(e,t,r){const{customNewline:n,escape:o,mapHeaders:s,mapValues:a,quote:u,separator:f,skipComments:l,skipLines:c}=this.options;r--,!n&&e.length&&e[r-1]===i&&r--;const h=f,d=[];let p=!1,g=t;if(l){const r="string"==typeof l?l:"#";if(e[t]===Buffer.from(r)[0])return}const _=e=>{if(this.state.first)return e;const t=d.length,r=this.headers[t];return a({header:r,index:t,value:e})};for(let n=t;n<r;n++){const t=!p&&e[n]===u,i=p&&e[n]===u&&n+1<=r&&e[n+1]===h,s=p&&e[n]===o&&n+1<r&&e[n+1]===u;if(t||i)p=!p;else if(s)n++;else if(e[n]===h&&!p){let t=this.parseCell(e,g,n);t=_(t),d.push(t),g=n+1}}if(g<r){let t=this.parseCell(e,g,r);t=_(t),d.push(t)}e[r-1]===h&&d.push(_(this.state.empty));const y=c&&c>this.state.lineNumber;if(this.state.lineNumber++,this.state.first&&!y)return this.state.first=!1,this.headers=d.map(((e,t)=>s({header:e,index:t}))),void this.emit("headers",this.headers);if(!y&&this.options.strict&&d.length!==this.headers.length){const e=new RangeError("Row length does not match headers");this.emit("error",e)}else y||this.writeRow(d)}parseValue(e,t,r){return this.options.raw?e.slice(t,r):e.toString("utf-8",t,r)}writeRow(e){const t=!1===this.headers?e.map(((e,t)=>t)):this.headers,r=e.reduce(((e,r,n)=>{const i=t[n];return null===i||(void 0!==i?e[i]=r:e[`_${n}`]=r),e}),{});this.push(r)}_flush(e){if(this.state.escaped||!this._prev)return e();this.parseLine(this._prev,this.state.previousEnd,this._prev.length+1),e()}_transform(e,t,r){"string"==typeof e&&(e=Buffer.from(e));const{escape:n,quote:s}=this.options;let a=0,u=e;this._prev&&(a=this._prev.length,u=Buffer.concat([this._prev,e]),this._prev=null);const f=u.length;for(let e=a;e<f;e++){const t=u[e],l=e+1<f?u[e+1]:null;if(this.state.rowLength++,this.state.rowLength>this.options.maxRowBytes)return r(new Error("Row exceeds the maximum size"));this.state.escaped||t!==n||l!==s||e===a?t!==s?this.state.quoted||(this.state.first&&!this.options.customNewline&&(t===o?this.options.newline=o:t===i&&l!==o&&(this.options.newline=i)),t===this.options.newline&&(this.parseLine(u,this.state.previousEnd,e+1),this.state.previousEnd=e+1,this.state.rowLength=0)):this.state.escaped?this.state.escaped=!1:this.state.quoted=!this.state.quoted:this.state.escaped=!0}return this.state.previousEnd===f?(this.state.previousEnd=0,r()):f-this.state.previousEnd<e.length?(this._prev=e,this.state.previousEnd-=f-e.length,r()):(this._prev=u,void r())}}e.exports=e=>new a(e)},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var i,o,s,f;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,f=l,console&&console.warn&&console.warn(f)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var f=u.length,l=p(u,f);for(r=0;r<f;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return f(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return f(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,c(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,c(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>1,l=-7,c=r?i-1:0,h=r?-1:1,d=e[t+c];for(c+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+c],c+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+c],c+=h,l-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=f}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,f=8*o-i-1,l=(1<<f)-1,c=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=l?(a=0,s=l):s+c>=1?(a=(t*u-1)*Math.pow(2,i),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;e[r+d]=255&s,d+=p,s/=256,f-=8);e[r+d-p]|=128*g}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},4281:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,a,u;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var f=("number"!=typeof u&&(u=0),u+1>(a=e).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(e,'" ').concat(f," ").concat(i," ").concat(n(t,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6753:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var i=r(9481),o=r(4229);r(5717)(f,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];f.prototype[u]||(f.prototype[u]=o.prototype[u])}function f(e){if(!(this instanceof f))return new f(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},2725:(e,t,r)=>{"use strict";e.exports=i;var n=r(4605);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(5717)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},9481:(e,t,r)=>{"use strict";var n;e.exports=A,A.ReadableState=S,r(7187).EventEmitter;var i,o=function(e,t){return e.listeners(t).length},s=r(2503),a=r(8764).Buffer,u=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(4616);i=f&&f.debuglog?f.debuglog("stream"):function(){};var l,c,h,d=r(7327),p=r(1195),g=r(2457).getHighWaterMark,_=r(4281).q,y=_.ERR_INVALID_ARG_TYPE,b=_.ERR_STREAM_PUSH_AFTER_EOF,m=_.ERR_METHOD_NOT_IMPLEMENTED,w=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(A,s);var E=p.errorOrDestroy,v=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(6753),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(2553).s),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function A(e){if(n=n||r(6753),!(this instanceof A))return new A(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function N(e,t,r,n,o){i("readableAddChunk",t);var s,f=e._readableState;if(null===t)f.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,f);else if(o||(s=function(e,t){var r,n;return n=t,a.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t)),r}(f,t)),s)E(e,s);else if(f.objectMode||t&&t.length>0)if("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)f.endEmitted?E(e,new w):I(e,f,t,!0);else if(f.ended)E(e,new b);else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?I(e,f,t,!1):M(e,f)):I(e,f,t,!1)}else n||(f.reading=!1,M(e,f));return!f.ended&&(f.length<f.highWaterMark||0===f.length)}function I(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&T(e)),M(e,t)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=p.destroy,A.prototype._undestroy=p.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=a.from(e,t),t=""),r=!0),N(this,e,t,!1,r)},A.prototype.unshift=function(e){return N(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){l||(l=r(2553).s);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var L=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=L?e=L:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(O,e))}function O(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,x(e)}function M(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function C(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function U(e){i("readable nexttick read 0"),e.read(0)}function B(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function k(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(F,t,e))}function F(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function j(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}A.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):T(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",o=!0),t.ended||t.reading?i("reading or ended",o=!1):o&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(r,t))),null===(n=e>0?k(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){E(this,new m("_read()"))},A.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===process.stdout||e===process.stderr?p:a;function a(){i("onend"),e.end()}n.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",(function t(o,s){i("onunpipe"),o===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,i("cleanup"),e.removeListener("close",h),e.removeListener("finish",d),e.removeListener("drain",u),e.removeListener("error",c),e.removeListener("unpipe",t),r.removeListener("end",a),r.removeListener("end",p),r.removeListener("data",l),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,x(e))}}(r);e.on("drain",u);var f=!1;function l(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==j(n.pipes,e))&&!f&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function c(t){i("onerror",t),p(),e.removeListener("error",c),0===o(e,"error")&&E(e,t)}function h(){e.removeListener("finish",d),p()}function d(){i("onfinish"),e.removeListener("close",h),p()}function p(){i("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",c),e.once("close",h),e.once("finish",d),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=j(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},A.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?T(this):n.reading||process.nextTick(U,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(C,this),r},A.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(C,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(B,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var s=0;s<v.length;s++)e.on(v[s],this.emit.bind(this,v[s]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(5850)),c(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=k,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===h&&(h=r(5167)),h(A,e,t)})},4605:(e,t,r)=>{"use strict";e.exports=l;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6753);function f(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}r(5717)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},4229:(e,t,r)=>{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=A,A.WritableState=S;var o,s={deprecate:r(4927)},a=r(2503),u=r(8764).Buffer,f=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(1195),c=r(2457).getHighWaterMark,h=r(4281).q,d=h.ERR_INVALID_ARG_TYPE,p=h.ERR_METHOD_NOT_IMPLEMENTED,g=h.ERR_MULTIPLE_CALLBACK,_=h.ERR_STREAM_CANNOT_PIPE,y=h.ERR_STREAM_DESTROYED,b=h.ERR_STREAM_NULL_VALUES,m=h.ERR_STREAM_WRITE_AFTER_END,w=h.ERR_UNKNOWN_ENCODING,E=l.errorOrDestroy;function v(){}function S(e,t,o){i=i||r(6753),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=c(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(O,e,t),e._writableState.errorEmitted=!0,E(e,n)):(i(n),e._writableState.errorEmitted=!0,E(e,n),O(e,t))}(e,r,n,t,i);else{var o=R(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||L(e,r),n?process.nextTick(I,e,r,o,i):I(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function A(e){var t=this instanceof(i=i||r(6753));if(!t&&!o.call(A,this))return new A(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function N(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function I(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function L(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,o=new Array(i),s=t.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,N(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,l=r.encoding,c=r.callback;if(N(e,t,!1,t.objectMode?1:f.length,f,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function T(e,t){e._final((function(r){t.pendingcb--,r&&E(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var r=R(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(T,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(5717)(A,a),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===A&&e&&e._writableState instanceof S}})):o=function(e){return e instanceof this},A.prototype.pipe=function(){E(this,new _)},A.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=e,u.isBuffer(n)||n instanceof f);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=v),i.ending?function(e,t){var r=new m;E(e,r),process.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i;return null===r?i=new b:"string"==typeof r||t.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i||(E(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r)),t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else N(e,t,!1,a,n,i,o);return f}(this,i,s,e,t,r)),o},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||L(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new p("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(e,t){t(e)}},5850:(e,t,r)=>{"use strict";var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(8610),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var r=e[h].read();null!==r&&(e[l]=null,e[s]=null,e[a]=null,t(d(r,!1)))}}function g(e){process.nextTick(p,e)}var _=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[u]?r(e[u]):t(d(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[f]?r(d(void 0,!0)):t[c](r,n)}),n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[c])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),_);e.exports=function(e){var t,r=Object.create(y,(i(t={},h,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,f,{value:e._readableState.endEmitted,writable:!0}),i(t,c,{value:function(e,t){var n=r[h].read();n?(r[l]=null,r[s]=null,r[a]=null,e(d(n,!1))):(r[s]=e,r[a]=t)},writable:!0}),t));return r[l]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[l]=null,r[s]=null,r[a]=null,t(e)),void(r[u]=e)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[f]=!0})),e.on("readable",g.bind(null,r)),r}},7327:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var u=r(8764).Buffer,f=r(2361).inspect,l=f&&f.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,u.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return f(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},1195:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(r,o),i(e)):process.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},8610:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},f=t._writableState&&t._writableState.finished,l=function(){a=!1,f=!0,s||o.call(t)},c=t._readableState&&t._readableState.endEmitted,h=function(){s=!1,c=!0,a||o.call(t)},d=function(e){o.call(t,e)},p=function(){var e;return s&&!c?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):a&&!f?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},g=function(){t.req.on("finish",l)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",l),t.on("abort",p),t.req?g():t.on("request",g)):a&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",h),t.on("finish",l),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},5167:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(e,t,r)=>{"use strict";var n,i=r(4281).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e){e()}function f(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var l,c=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var h=t.map((function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;e.on("close",(function(){a=!0})),void 0===n&&(n=r(8610)),n(e,{readable:t,writable:i},(function(e){if(e)return o(e);a=!0,o()}));var u=!1;return function(t){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new s("pipe"))}}(e,o,i>0,(function(e){l||(l=e),e&&h.forEach(u),o||(h.forEach(u),c(l))}))}));return t.reduce(f)}},2457:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},2503:(e,t,r)=>{e.exports=r(7187).EventEmitter},9509:(e,t,r)=>{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2830:(e,t,r)=>{e.exports=i;var n=r(7187).EventEmitter;function i(){n.call(this)}r(5717)(i,n),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),e.removeListener("error",f),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",f),e.on("error",f),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=f,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},2361:()=>{},4616:()=>{}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{NetworkId:()=>f,adjustSpreadOnOdds:()=>q,allowGame:()=>j,allowGameSportWithPeriodConstraint:()=>G,allowSoccerGame:()=>V,allowTennisMatch:()=>W,calculateImpliedOddsDifference:()=>d,checkOddsFromBookmakers:()=>h,findOddsForTeam:()=>k,gamesDatesMatching:()=>x,getBookmakersArray:()=>c,getLeagueSport:()=>F,getSpreadData:()=>H,parseCsv:()=>E,readCsvFromUrl:()=>w,teamNamesMatching:()=>B}),"function"!=typeof Object.assign&&(Object.assign=function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])}return r});var e=function(e){return parseFloat(e.toPrecision(12))};function t(e,r,n){return void 0===n||0==+n?Math[e](r):(r=+r,n=+n,isNaN(r)||"number"!=typeof n||n%1!=0?NaN:r<0?-t(e,-r,n):(r=r.toString().split("e"),+((r=(r=Math[e](+(r[0]+"e"+(r[1]?+r[1]-n:-n)))).toString().split("e"))[0]+"e"+(r[1]?+r[1]+n:n))))}var i,o,s={decimal:{from:function(e){if((e=parseFloat(e))<=1)throw new Error("Outside valid range.");return e},to:function(){return this.decimalValue}},moneyline:{from:function(e){return(e=parseFloat(e))>=0?e/100+1:100/-e+1},to:function(){return this.decimalValue>=2?e(100*(this.decimalValue-1)):e(-100/(this.decimalValue-1))}},hongKong:{from:function(e){if((e=parseFloat(e))<0)throw new Error("Outside valid range.");return e+1},to:function(){return e(this.decimalValue-1)}},impliedProbability:{from:function(e){if((e="string"==typeof e&&"%"==e.slice(-1)?parseFloat(e)/100:parseFloat(e))<=0||e>=1)throw new Error("Outside valid range");return 1/e},to:function(r){if(r.percentage){var n=e(100/this.decimalValue);return null!==r.precision&&(n=t("round",n,-r.precision)),n.toString()+"%"}return e(1/this.decimalValue)}},fractional:{from:function(e){var t,r=e.toString().split("/");if(e=parseFloat(r[0]),2===r.length)t=parseFloat(r[1]);else{if(1!==r.length)throw new Error("Invalid fraction");t=1}if(0===e||0===t||e/t<=0)throw new Error("Outside valid range");return 1+e/t},to:function(e){return function(e,t){for(var r,n=[0,1],i=[1,0],o=function(e){var t=null,r=e.toString().indexOf("E");-1==r&&(r=e.toString().indexOf("e"));var n=null,i=(t=-1==r?e.toString():e.toString().substring(0,r)).toString().indexOf(".");-1==i?n=t:0===i?n=t.substring(1,t.length):i<t.length&&(n=t.substring(0,i)+t.substring(i+1,t.length));var o=n,s=o.toString().length,a=e,u=a.toString().length;0===a&&(u=0);var f,l=s-u;for(f=l;f>0&&o%2==0;f--)o/=2;for(f=l;f>0&&o%5==0;f--)o/=5;return o}(e),s=e,a=Math.pow(10,-t)/2,u=2;u<1e3;u++){var f=Math.floor(s);if(n[u]=f*n[u-1]+n[u-2],Math.abs(n[u])>o)return;if(i[u]=f*i[u-1]+i[u-2],r=n[u]/i[u],Math.abs(r-e)<a||NaN==r)return n[u].toString()+"/"+i[u].toString();s=1/(s-f)}}(this.decimalValue-1,e.precision||12)}},malay:{from:function(e){if((e=parseFloat(e))<=-1||e>1)throw new Error("Outside valid range.");return e<0&&(e=-1/e),e+1},to:function(){return this.decimalValue<=2?e(this.decimalValue-1):e(-1/(this.decimalValue-1))}},indonesian:{from:function(e){if(0===(e=parseFloat(e)))throw new Error("Outside valid range.");return e>=1?e+1:-1/e+1},to:function(){return this.decimalValue<2?e(-1/(this.decimalValue-1)):e(this.decimalValue-1)}}},a=((o=function(t){if("number"!=typeof t||isNaN(t))throw new Error("Invalid odds");this.decimalValue=e(t)}).prototype=(i=function(){throw new Error("This constructor is private, please use the from* functions")}).prototype,i.from=function(e,t){if(!s.hasOwnProperty(e))throw new Error("Unknown format "+e+".");var r=s[e].from(t);return new o(r)},i);a.prototype.to=function(e,r){if(!s.hasOwnProperty(e))throw new Error("Unknown format "+e+".");r=Object.assign({precision:null,percentage:!1},r);var n=s[e].to.call(this,r);return"number"==typeof n&&null!==r.precision&&(n=t("round",n,-r.precision)),n};var u,f,l=a.from,c=function(e,t,r){var n=e.find((function(e){return Number(e.sportId)===Number(t)}));if(n){if(""==n.primaryBookmaker)return r;var i=[];return n.primaryBookmaker&&i.push(n.primaryBookmaker),n.secondaryBookmaker&&i.push(n.secondaryBookmaker),n.tertiaryBookmaker&&i.push(n.tertiaryBookmaker),i}return r},h=function(e,t,r,n,i){var o=t.some((function(t){var n=e.get(t);return!!n&&(0===n.homeOdds||0===n.awayOdds||!r&&0===n.drawOdds||1===n.homeOdds||1===n.awayOdds||!r&&1===n.drawOdds)}));if(1==t.length){if(o)return[{homeOdds:0,awayOdds:0,drawOdds:0}];var s=t[0],a=e.get(s);return[{homeOdds:a.homeOdds,awayOdds:a.awayOdds,drawOdds:r?0:a.drawOdds}]}if(o)return[{homeOdds:0,awayOdds:0,drawOdds:0}];var u=e.get(t[0]),f=u.homeOdds,c=u.awayOdds,h=u.drawOdds;if(t.slice(1).some((function(t){var o=e[t];if(o){var s=o.homeOdds,a=o.awayOdds,u=o.drawOdds,p=l("decimal",f).to("impliedProbability"),g=l("decimal",c).to("impliedProbability"),_=r?0:l("decimal",h).to("impliedProbability"),y=l("decimal",s).to("impliedProbability"),b=l("decimal",a).to("impliedProbability"),m=r?0:l("decimal",u).to("impliedProbability"),w=d(p,y),E=d(g,b),v=r?0:d(_,m);if(w>n&&p>i&&y>i||E>n&&g>i&&b>i||!r&&v>n&&_>i&&m>i)return!0}return!1})))return console.log("Returning zero odds due to percentage difference"),[{homeOdds:0,awayOdds:0,drawOdds:0}];var p=[];return t.forEach((function(t){return p.push(e.get(t))})),null!=p[0]?p.map((function(e){return{homeOdds:e.homeOdds,awayOdds:e.awayOdds,drawOdds:r?0:e.drawOdds}})):(console.log("Returning zero odds cause no matching bookmakers have been found"),[{homeOdds:0,awayOdds:0,drawOdds:0}])},d=function(e,t){var r=Math.abs(e-t)/e*100;return console.log("% diff: "+r),r},p=r(9669),g=r.n(p),_=r(3562),y=r.n(_),b=r(2830),m=r.n(b),w=function(e){return t=void 0,r=void 0,i=function(){var t,r,n,i;return function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,g().get(e)];case 1:return t=o.sent(),r=t.data,(n=new(m().Readable)).push(r),n.push(null),[4,E(n)];case 2:return[2,o.sent()];case 3:throw i=o.sent(),console.error("Failed to read CSV from URL: ".concat(e),i),i;case 4:return[2]}}))},new((n=void 0)||(n=Promise))((function(e,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(s,a)}u((i=i.apply(t,r||[])).next())}));var t,r,n,i},E=function(e){return new Promise((function(t,r){var n=[];e.pipe(y()()).on("data",(function(e){return n.push(e)})).on("end",(function(){return t(n)})).on("error",(function(e){return r(e)}))}))},v="Soccer",S="Football",A="Basketball",N="Baseball",I="Hockey",L="Fighting",R="Tennis",T="eSports",O="Cricket",M="Motosport",P="Golf",C={NCAAF:1,NFL:2,MLB:3,NBA:4,NCAAB:5,NHL:6,UFC:7,WNBA:8,MLS:10,EPL:11,LIGUE_ONE:12,BUNDESLIGA:13,LA_LIGA:14,SERIE_A:15,UEFA_CL:16,UEFA_EL:17,FIFA_WC:18,J1_LEAGUE:19,IPL:20,T20_BLAST:21,IIHF_WORLD_CHAMPIONSHIP:33,COPA_AMERICA:44,COPA_LIBERTADORES:45,UEFA_EURO:50,EREDIVISIE:57,PRIMEIRA_LIGA:61,FIFA_WC_WOMEN:76,ENGLAND_CUP:132,FRANCE_CUP:134,SPAIN_CUP:138,ITALY_CUP:141,TENNIS_GS:153,TENNIS_MASTERS:156,GERMANY_CUP:209,LIGA_MX:230,BRAZIL_1:268,UEFA_EURO_U21:288,FIFA_WORLD_CUP_U20:296,EUROLEAGUE:399,FIBA_WORLD_CUP:409,FORMULA1:445,MOTOGP:497,SAUDI_PROFESSIONAL_LEAGUE:536,BOXING:9196,UEFA_NATIONS_LEAGUE:9806,CONCACAF_NATIONS_LEAGUE:9821,CSGO:9977,DOTA2:9983,SUMMER_OLYMPICS_QUALIFICATION:10502,LOL:10138,CONMEBOL_WC_QUALIFICATIONS:10199,UEFA_CONFERENCE_LEAGUE:10216,NON_TITLE_BOXING:10595,GOLF_H2H:100021,GOLF_WINNER:100121,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_1:15312,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_2:15313,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_3:15314,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_4:15315,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_5:15316,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_6:15317,TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_7:15318,TENNIS_MASTERS_LIVE_MAPPING_V2_1:15622,TENNIS_MASTERS_LIVE_MAPPING_V2_2:15623,TENNIS_MASTERS_LIVE_MAPPING_V2_3:15624,TENNIS_MASTERS_LIVE_MAPPING_V2_4:15625,TENNIS_MASTERS_LIVE_MAPPING_V2_5:15626,TENNIS_MASTERS_LIVE_MAPPING_V2_6:15627,TENNIS_MASTERS_LIVE_MAPPING_V2_7:15628,TENNIS_MASTERS_LIVE_MAPPING_V2_8:15632,TENNIS_MASTERS_LIVE_MAPPING_V2_9:15633,TENNIS_MASTERS_LIVE_MAPPING_V2_10:15634,TENNIS_MASTERS_LIVE_MAPPING_V2_11:15635,TENNIS_MASTERS_LIVE_MAPPING_V2_12:15636,TENNIS_MASTERS_LIVE_MAPPING_V2_13:15637,TENNIS_MASTERS_LIVE_MAPPING_V2_14:15638,TENNIS_MASTERS_LIVE_MAPPING_V2_15:15641,TENNIS_MASTERS_LIVE_MAPPING_V2_16:15642,TENNIS_MASTERS_LIVE_MAPPING_V2_17:15643,TENNIS_MASTERS_LIVE_MAPPING_V2_18:15644,TENNIS_MASTERS_LIVE_MAPPING_V2_19:15645,TENNIS_MASTERS_LIVE_MAPPING_V2_20:15646,TENNIS_MASTERS_LIVE_MAPPING_V2_21:15647,TENNIS_MASTERS_LIVE_MAPPING_V2_22:15648,UEFA_CHAMPIONS_LEAGUE_QUALIFICATION:10611,UEFA_EUROPA_LEAGUE_QUALIFICATION:10613,UEFA_CONFERENCE_LEAGUE_QUALIFICATION:10615},U=[C.CSGO,C.DOTA2,C.LOL,C.TENNIS_GS,C.TENNIS_MASTERS,C.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_1,C.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_2,C.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_3,C.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_4,C.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_5,C.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_6,C.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_7,C.TENNIS_MASTERS_LIVE_MAPPING_V2_1,C.TENNIS_MASTERS_LIVE_MAPPING_V2_2,C.TENNIS_MASTERS_LIVE_MAPPING_V2_3,C.TENNIS_MASTERS_LIVE_MAPPING_V2_4,C.TENNIS_MASTERS_LIVE_MAPPING_V2_5,C.TENNIS_MASTERS_LIVE_MAPPING_V2_6,C.TENNIS_MASTERS_LIVE_MAPPING_V2_7,C.TENNIS_MASTERS_LIVE_MAPPING_V2_8,C.TENNIS_MASTERS_LIVE_MAPPING_V2_9,C.TENNIS_MASTERS_LIVE_MAPPING_V2_10,C.TENNIS_MASTERS_LIVE_MAPPING_V2_11,C.TENNIS_MASTERS_LIVE_MAPPING_V2_12,C.TENNIS_MASTERS_LIVE_MAPPING_V2_13,C.TENNIS_MASTERS_LIVE_MAPPING_V2_14,C.TENNIS_MASTERS_LIVE_MAPPING_V2_15,C.TENNIS_MASTERS_LIVE_MAPPING_V2_16,C.TENNIS_MASTERS_LIVE_MAPPING_V2_17,C.TENNIS_MASTERS_LIVE_MAPPING_V2_18,C.TENNIS_MASTERS_LIVE_MAPPING_V2_19,C.TENNIS_MASTERS_LIVE_MAPPING_V2_20,C.TENNIS_MASTERS_LIVE_MAPPING_V2_21,C.TENNIS_MASTERS_LIVE_MAPPING_V2_22],B=function(e,t,r,n,i,o){var s,a;if(U.includes(e)?(s=n.toLowerCase()==t.toLowerCase()||n.toLowerCase()==r.toLowerCase(),a=i.toLowerCase()==t.toLowerCase()||i.toLowerCase()==r.toLowerCase()):(s=n.toLowerCase()==t.toLowerCase(),a=i.toLowerCase()==r.toLowerCase()),!0!==s){var u=o.get(n.toLowerCase()),f=o.get(t.toLowerCase()),l=o.get(r.toLowerCase());if([u,f].some((function(e){return null==e})))return!1;s=U.includes(e)?u==f||u==l:u==f}if(!0!==a){var c=o.get(i.toLowerCase());if(f=o.get(t.toLowerCase()),[c,l=o.get(r.toLowerCase())].some((function(e){return null==e})))return!1;a=U.includes(e)&&c==f||c==l}return s&&a},x=function(e,t,r,n){var i;if(r.toString().startsWith(C.TENNIS_GS.toString())||r.toString().startsWith(C.TENNIS_MASTERS.toString())){var o=t.getTime(),s=e.getTime();i=Math.abs(s-o)<=Number(60*n*1e3)}else i=t.toUTCString()==e.toUTCString();return i},k=function(e,t,r,n,i){var o=new Map;return e.forEach((function(e){var s,a,u=t.odds.filter((function(t){return t.sports_book_name.toLowerCase()==e.toLowerCase()})),f=n.get(r.homeTeam.toLowerCase()),l=n.get(r.awayTeam.toLowerCase()),c=0;null!=(s=null==f?u.find((function(e){var t=n.get(e.name.toLowerCase());return null==t?e.name.toLowerCase()==r.homeTeam.toLowerCase():t==r.homeTeam.toLowerCase()})):u.find((function(e){var t=n.get(e.name.toLowerCase());return null==t?e.name.toLowerCase()==f:t==f})))&&(c=s.price);var h=0;null!=(a=null==l?u.find((function(e){var t=n.get(e.name.toLowerCase());return null==t?e.name.toLowerCase()==r.awayTeam.toLowerCase():t==r.awayTeam.toLowerCase()})):u.find((function(e){var t=n.get(e.name.toLowerCase());return null==t?e.name.toLowerCase()==l:t==l})))&&(h=a.price);var d=0;if(i){var p=u.find((function(e){return"draw"==e.name.toLowerCase()}));null!=p&&(d=p.price)}o.set(e.toLowerCase(),{homeOdds:c,awayOdds:h,drawOdds:d})})),o},D=((u={})[C.NCAAF]={sport:S,id:C.NCAAF,isDrawAvailable:!1},u[C.NFL]={sport:S,id:C.NFL,isDrawAvailable:!1},u[C.MLB]={sport:N,id:C.MLB,isDrawAvailable:!1},u[C.NBA]={sport:A,id:C.NBA,isDrawAvailable:!1},u[C.NCAAB]={sport:A,id:C.NCAAB,isDrawAvailable:!1},u[C.NHL]={sport:I,id:C.NHL,isDrawAvailable:!1},u[C.UFC]={sport:L,id:C.UFC,isDrawAvailable:!1},u[C.WNBA]={sport:A,id:C.WNBA,isDrawAvailable:!1},u[C.MLS]={sport:v,id:C.MLS,isDrawAvailable:!0},u[C.EPL]={sport:v,id:C.EPL,isDrawAvailable:!0},u[C.LIGUE_ONE]={sport:v,id:C.LIGUE_ONE,isDrawAvailable:!0},u[C.BUNDESLIGA]={sport:v,id:C.BUNDESLIGA,isDrawAvailable:!0},u[C.LA_LIGA]={sport:v,id:C.LA_LIGA,isDrawAvailable:!0},u[C.SERIE_A]={sport:v,id:C.SERIE_A,isDrawAvailable:!0},u[C.UEFA_CL]={sport:v,id:C.UEFA_CL,isDrawAvailable:!0},u[C.UEFA_EL]={sport:v,id:C.UEFA_EL,isDrawAvailable:!0,priority:104},u[C.FIFA_WC]={sport:v,id:C.FIFA_WC,isDrawAvailable:!0},u[C.J1_LEAGUE]={sport:v,id:C.J1_LEAGUE,isDrawAvailable:!0},u[C.IPL]={sport:O,id:C.IPL,isDrawAvailable:!1},u[C.T20_BLAST]={sport:O,id:C.T20_BLAST,isDrawAvailable:!1},u[C.IIHF_WORLD_CHAMPIONSHIP]={sport:I,id:C.IIHF_WORLD_CHAMPIONSHIP,isDrawAvailable:!0},u[C.COPA_AMERICA]={sport:v,id:C.COPA_AMERICA,isDrawAvailable:!0},u[C.COPA_LIBERTADORES]={sport:v,id:C.COPA_LIBERTADORES,isDrawAvailable:!0},u[C.UEFA_EURO]={sport:v,id:C.UEFA_EURO,isDrawAvailable:!0},u[C.EREDIVISIE]={sport:v,id:C.EREDIVISIE,isDrawAvailable:!0},u[C.PRIMEIRA_LIGA]={sport:v,id:C.PRIMEIRA_LIGA,isDrawAvailable:!0},u[C.FIFA_WC_WOMEN]={sport:v,id:C.FIFA_WC_WOMEN,priority:112},u[C.ENGLAND_CUP]={sport:v,id:C.ENGLAND_CUP,isDrawAvailable:!0},u[C.FRANCE_CUP]={sport:v,isDrawAvailable:!0},u[C.SPAIN_CUP]={sport:v,id:C.SPAIN_CUP,isDrawAvailable:!0},u[C.ITALY_CUP]={sport:v,isDrawAvailable:!0},u[C.TENNIS_GS]={sport:R,id:C.TENNIS_GS,isDrawAvailable:!1},u[C.TENNIS_MASTERS]={sport:R,id:C.TENNIS_MASTERS,isDrawAvailable:!1},u[C.GERMANY_CUP]={sport:v,id:C.GERMANY_CUP,isDrawAvailable:!0},u[C.BRAZIL_1]={sport:v,id:C.BRAZIL_1,isDrawAvailable:!0},u[C.UEFA_EURO_U21]={sport:v,id:C.UEFA_EURO_U21,isDrawAvailable:!0},u[C.FIFA_WORLD_CUP_U20]={sport:v,id:C.FIFA_WORLD_CUP_U20,isDrawAvailable:!0},u[C.EUROLEAGUE]={sport:A,id:C.EUROLEAGUE,isDrawAvailable:!1},u[C.FIBA_WORLD_CUP]={sport:A,id:C.FIBA_WORLD_CUP,isDrawAvailable:!1},u[C.FORMULA1]={sport:M,id:C.FORMULA1,isDrawAvailable:!1},u[C.MOTOGP]={sport:M,id:C.MOTOGP,isDrawAvailable:!1},u[C.SAUDI_PROFESSIONAL_LEAGUE]={sport:v,id:C.SAUDI_PROFESSIONAL_LEAGUE,isDrawAvailable:!0},u[C.BOXING]={sport:L,id:C.BOXING,isDrawAvailable:!1},u[C.UEFA_NATIONS_LEAGUE]={sport:v,id:C.UEFA_NATIONS_LEAGUE,isDrawAvailable:!0},u[C.CONCACAF_NATIONS_LEAGUE]={sport:v,id:C.CONCACAF_NATIONS_LEAGUE,isDrawAvailable:!0},u[C.CSGO]={sport:T,id:C.CSGO,isDrawAvailable:!1},u[C.DOTA2]={sport:T,id:C.DOTA2,isDrawAvailable:!1},u[C.SUMMER_OLYMPICS_QUALIFICATION]={sport:A,id:C.SUMMER_OLYMPICS_QUALIFICATION,isDrawAvailable:!1},u[C.LOL]={sport:T,id:C.LOL,isDrawAvailable:!1},u[C.CONMEBOL_WC_QUALIFICATIONS]={sport:v,id:C.CONMEBOL_WC_QUALIFICATIONS,isDrawAvailable:!0},u[C.UEFA_CONFERENCE_LEAGUE]={sport:v,id:C.UEFA_CONFERENCE_LEAGUE,isDrawAvailable:!0},u[C.NON_TITLE_BOXING]={sport:L,isDrawAvailable:!1},u[C.UEFA_CHAMPIONS_LEAGUE_QUALIFICATION]={sport:v,id:C.UEFA_CHAMPIONS_LEAGUE_QUALIFICATION,isDrawAvailable:!0},u[C.UEFA_EUROPA_LEAGUE_QUALIFICATION]={sport:v,id:C.UEFA_EUROPA_LEAGUE_QUALIFICATION,isDrawAvailable:!0},u[C.UEFA_CONFERENCE_LEAGUE_QUALIFICATION]={sport:v,isDrawAvailable:!0},u[C.GOLF_H2H]={sport:P,id:C.GOLF_H2H,isDrawAvailable:!1},u[C.GOLF_WINNER]={sport:P,id:C.GOLF_WINNER,isDrawAvailable:!1},u[C.LIGA_MX]={sport:v,id:C.LIGA_MX,isDrawAvailable:!0},u),F=function(e){var t=D[e];return t?t.sport:""},j=function(e,t,r,n){var i,o=e.score_home_total,s=e.score_away_total,a=e.clock,u=e.period,f=e.status,l=e.home_team,c=e.away_team,h=F(r);return"completed"==f.toLowerCase()?(console.log("Blocking game ".concat(l," - ").concat(c," because it is no longer live.")),null):(h===A&&(i=G(l,c,u,n.get(A))),h===I&&(i=G(l,c,u,n.get(I))),h===N&&(i=G(l,c,u,n.get(N))),h===v&&(i=V(l,c,a,n.get(v))),h===R&&(i=W(e,l,c,u,o,s,t)),i)},G=function(e,t,r,n){return Number(r)>=n?{allow:!1,message:"Blocking game ".concat(e," - ").concat(t," due to period: ").concat(r,". period")}:{allow:!0,message:""}},V=function(e,t,r,n){var i=Number(r);return!Number.isNaN(i)&&i>=n||Number.isNaN(i)&&"HALF"!=r?{allow:!1,message:"Blocking game ".concat(e," - ").concat(t," due to clock: ").concat(r,"min")}:{allow:!0,message:""}},W=function(e,t,r,n,i,o,s){var a,u,f=Number(n),l="atp"==e.league.toLowerCase();if(s==C.TENNIS_GS&&l){if(2==Number(i)||2==Number(o)){switch(f){case 3:a=Number(e.score_home_period_3),u=Number(e.score_away_period_3);break;case 4:a=Number(e.score_home_period_4),u=Number(e.score_away_period_4);break;case 5:a=Number(e.score_home_period_5),u=Number(e.score_away_period_5)}return 2==Number(i)&&a>=5||2==Number(o)&&u>=5?{allow:!1,message:"Blocking game ".concat(t," - ").concat(r," due to current result: ").concat(i," - ").concat(o," (").concat(a," - ").concat(u,")")}:{allow:!0,message:"",currentHomeGameScore:a,currentAwayGameScore:u}}}else if(1==Number(i)||1==Number(o)){switch(f){case 2:a=Number(e.score_home_period_2),u=Number(e.score_away_period_2);break;case 3:a=Number(e.score_home_period_3),u=Number(e.score_away_period_3)}return 1==Number(i)&&a>=5||1==Number(o)&&u>=5?{allow:!1,message:"Blocking game ".concat(t," - ").concat(r," due to current result: ").concat(i," - ").concat(o," (").concat(a," - ").concat(u,")")}:{allow:!0,message:"",currentHomeGameScore:a,currentAwayGameScore:u}}},q=function(e,t,r){if(e.some((function(e){return 0===e})))return e;var n=e.reduce((function(e,t){return e+t}),0);if(n<=1)return Array(e.length).fill(0);if(0===r){if(!(t>100*(n-1)))return e;r=t}var i=1+r/100,o=i/n,s=e.map((function(e){return e*o}));if(s.some((function(e){return e>=1})))return Array(e.length).fill(0);var a=s.reduce((function(e,t){return e+t}),0);if(a<1)return Array(e.length).fill(0);var u=i/a;return s.map((function(e){return e*u}))},H=function(e,t,r,n){var i=e.find((function(e){return Number(e.typeId)===Number(r)&&Number(e.sportId)===Number(t)}));return i?{minSpread:i.minSpread?Number(i.minSpread):n,targetSpread:i.targetSpread?Number(i.targetSpread):0}:{minSpread:n,targetSpread:0}};!function(e){e[e.Mainnet=1]="Mainnet",e[e.OptimismMainnet=10]="OptimismMainnet",e[e.PolygonMainnet=137]="PolygonMainnet",e[e.ZkSyncSepolia=300]="ZkSyncSepolia",e[e.ZkSync=324]="ZkSync",e[e.Base=8453]="Base",e[e.Arbitrum=42161]="Arbitrum",e[e.OptimismSepolia=11155420]="OptimismSepolia",e[e.BlastSepolia=168587773]="BlastSepolia"}(f||(f={}))})(),n})()));
|
package/package.json
CHANGED
package/src/constants/sports.ts
CHANGED
|
@@ -1,138 +1,292 @@
|
|
|
1
|
-
|
|
2
|
-
SOCCER: 'Soccer',
|
|
3
|
-
FOOTBALL: 'Football',
|
|
4
|
-
BASKETBALL: 'Basketball',
|
|
5
|
-
BASEBALL: 'Baseball',
|
|
6
|
-
HOCKEY: 'Hockey',
|
|
7
|
-
FIGHTING: 'Fighting',
|
|
8
|
-
TENNIS: 'Tennis',
|
|
9
|
-
ESPORTS: 'eSports',
|
|
10
|
-
CRICKET: 'Cricket',
|
|
11
|
-
MOTOSPORT: 'Motosport',
|
|
12
|
-
GOLF: 'Golf',
|
|
13
|
-
EMPTY: '',
|
|
14
|
-
};
|
|
1
|
+
import { League, Sport } from '../enums/sports';
|
|
15
2
|
|
|
16
|
-
export const
|
|
17
|
-
NCAAF:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_1: 15312,
|
|
73
|
-
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_2: 15313,
|
|
74
|
-
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_3: 15314,
|
|
75
|
-
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_4: 15315,
|
|
76
|
-
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_5: 15316,
|
|
77
|
-
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_6: 15317,
|
|
78
|
-
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_7: 15318,
|
|
79
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_1: 15622,
|
|
80
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_2: 15623,
|
|
81
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_3: 15624,
|
|
82
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_4: 15625,
|
|
83
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_5: 15626,
|
|
84
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_6: 15627,
|
|
85
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_7: 15628,
|
|
86
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_8: 15632,
|
|
87
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_9: 15633,
|
|
88
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_10: 15634,
|
|
89
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_11: 15635,
|
|
90
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_12: 15636,
|
|
91
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_13: 15637,
|
|
92
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_14: 15638,
|
|
93
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_15: 15641,
|
|
94
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_16: 15642,
|
|
95
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_17: 15643,
|
|
96
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_18: 15644,
|
|
97
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_19: 15645,
|
|
98
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_20: 15646,
|
|
99
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_21: 15647,
|
|
100
|
-
TENNIS_MASTERS_LIVE_MAPPING_V2_22: 15648,
|
|
101
|
-
};
|
|
3
|
+
export const LeagueMap: Record<number, any> = {
|
|
4
|
+
[League.NCAAF]: {
|
|
5
|
+
sport: Sport.FOOTBALL,
|
|
6
|
+
id: League.NCAAF,
|
|
7
|
+
isDrawAvailable: false,
|
|
8
|
+
},
|
|
9
|
+
[League.NFL]: {
|
|
10
|
+
sport: Sport.FOOTBALL,
|
|
11
|
+
id: League.NFL,
|
|
12
|
+
isDrawAvailable: false,
|
|
13
|
+
},
|
|
14
|
+
[League.MLB]: {
|
|
15
|
+
sport: Sport.BASEBALL,
|
|
16
|
+
id: League.MLB,
|
|
17
|
+
isDrawAvailable: false,
|
|
18
|
+
},
|
|
19
|
+
[League.NBA]: {
|
|
20
|
+
sport: Sport.BASKETBALL,
|
|
21
|
+
id: League.NBA,
|
|
22
|
+
isDrawAvailable: false,
|
|
23
|
+
},
|
|
24
|
+
[League.NCAAB]: {
|
|
25
|
+
sport: Sport.BASKETBALL,
|
|
26
|
+
id: League.NCAAB,
|
|
27
|
+
isDrawAvailable: false,
|
|
28
|
+
},
|
|
29
|
+
[League.NHL]: {
|
|
30
|
+
sport: Sport.HOCKEY,
|
|
31
|
+
id: League.NHL,
|
|
32
|
+
isDrawAvailable: false,
|
|
33
|
+
},
|
|
34
|
+
[League.UFC]: {
|
|
35
|
+
sport: Sport.FIGHTING,
|
|
36
|
+
id: League.UFC,
|
|
37
|
+
isDrawAvailable: false,
|
|
38
|
+
},
|
|
39
|
+
[League.WNBA]: {
|
|
40
|
+
sport: Sport.BASKETBALL,
|
|
41
|
+
id: League.WNBA,
|
|
42
|
+
isDrawAvailable: false,
|
|
43
|
+
},
|
|
44
|
+
[League.MLS]: {
|
|
45
|
+
sport: Sport.SOCCER,
|
|
46
|
+
id: League.MLS,
|
|
47
|
+
isDrawAvailable: true,
|
|
48
|
+
},
|
|
49
|
+
[League.EPL]: {
|
|
50
|
+
sport: Sport.SOCCER,
|
|
51
|
+
id: League.EPL,
|
|
52
|
+
isDrawAvailable: true,
|
|
53
|
+
},
|
|
54
|
+
[League.LIGUE_ONE]: {
|
|
55
|
+
sport: Sport.SOCCER,
|
|
56
|
+
id: League.LIGUE_ONE,
|
|
57
|
+
isDrawAvailable: true,
|
|
58
|
+
},
|
|
102
59
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
League.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
League.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
League.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
League.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
League.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
League.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
60
|
+
[League.BUNDESLIGA]: {
|
|
61
|
+
sport: Sport.SOCCER,
|
|
62
|
+
id: League.BUNDESLIGA,
|
|
63
|
+
isDrawAvailable: true,
|
|
64
|
+
},
|
|
65
|
+
[League.LA_LIGA]: {
|
|
66
|
+
sport: Sport.SOCCER,
|
|
67
|
+
id: League.LA_LIGA,
|
|
68
|
+
isDrawAvailable: true,
|
|
69
|
+
},
|
|
70
|
+
[League.SERIE_A]: {
|
|
71
|
+
sport: Sport.SOCCER,
|
|
72
|
+
id: League.SERIE_A,
|
|
73
|
+
isDrawAvailable: true,
|
|
74
|
+
},
|
|
75
|
+
[League.UEFA_CL]: {
|
|
76
|
+
sport: Sport.SOCCER,
|
|
77
|
+
id: League.UEFA_CL,
|
|
78
|
+
isDrawAvailable: true,
|
|
79
|
+
},
|
|
80
|
+
[League.UEFA_EL]: {
|
|
81
|
+
sport: Sport.SOCCER,
|
|
82
|
+
id: League.UEFA_EL,
|
|
83
|
+
isDrawAvailable: true,
|
|
84
|
+
priority: 104,
|
|
85
|
+
},
|
|
86
|
+
[League.FIFA_WC]: {
|
|
87
|
+
sport: Sport.SOCCER,
|
|
88
|
+
id: League.FIFA_WC,
|
|
89
|
+
isDrawAvailable: true,
|
|
90
|
+
},
|
|
91
|
+
[League.J1_LEAGUE]: {
|
|
92
|
+
sport: Sport.SOCCER,
|
|
93
|
+
id: League.J1_LEAGUE,
|
|
94
|
+
isDrawAvailable: true,
|
|
95
|
+
},
|
|
96
|
+
[League.IPL]: {
|
|
97
|
+
sport: Sport.CRICKET,
|
|
98
|
+
id: League.IPL,
|
|
99
|
+
isDrawAvailable: false,
|
|
100
|
+
},
|
|
101
|
+
[League.T20_BLAST]: {
|
|
102
|
+
sport: Sport.CRICKET,
|
|
103
|
+
id: League.T20_BLAST,
|
|
104
|
+
isDrawAvailable: false,
|
|
105
|
+
},
|
|
106
|
+
[League.IIHF_WORLD_CHAMPIONSHIP]: {
|
|
107
|
+
sport: Sport.HOCKEY,
|
|
108
|
+
id: League.IIHF_WORLD_CHAMPIONSHIP,
|
|
109
|
+
isDrawAvailable: true,
|
|
110
|
+
},
|
|
111
|
+
[League.COPA_AMERICA]: {
|
|
112
|
+
sport: Sport.SOCCER,
|
|
113
|
+
id: League.COPA_AMERICA,
|
|
114
|
+
isDrawAvailable: true,
|
|
115
|
+
},
|
|
116
|
+
[League.COPA_LIBERTADORES]: {
|
|
117
|
+
sport: Sport.SOCCER,
|
|
118
|
+
id: League.COPA_LIBERTADORES,
|
|
119
|
+
isDrawAvailable: true,
|
|
120
|
+
},
|
|
121
|
+
[League.UEFA_EURO]: {
|
|
122
|
+
sport: Sport.SOCCER,
|
|
123
|
+
id: League.UEFA_EURO,
|
|
124
|
+
isDrawAvailable: true,
|
|
125
|
+
},
|
|
126
|
+
[League.EREDIVISIE]: {
|
|
127
|
+
sport: Sport.SOCCER,
|
|
128
|
+
id: League.EREDIVISIE,
|
|
129
|
+
isDrawAvailable: true,
|
|
130
|
+
},
|
|
131
|
+
[League.PRIMEIRA_LIGA]: {
|
|
132
|
+
sport: Sport.SOCCER,
|
|
133
|
+
id: League.PRIMEIRA_LIGA,
|
|
134
|
+
isDrawAvailable: true,
|
|
135
|
+
},
|
|
136
|
+
[League.FIFA_WC_WOMEN]: {
|
|
137
|
+
sport: Sport.SOCCER,
|
|
138
|
+
id: League.FIFA_WC_WOMEN,
|
|
139
|
+
priority: 112,
|
|
140
|
+
},
|
|
141
|
+
[League.ENGLAND_CUP]: {
|
|
142
|
+
sport: Sport.SOCCER,
|
|
143
|
+
id: League.ENGLAND_CUP,
|
|
144
|
+
isDrawAvailable: true,
|
|
145
|
+
},
|
|
146
|
+
[League.FRANCE_CUP]: {
|
|
147
|
+
sport: Sport.SOCCER,
|
|
148
|
+
isDrawAvailable: true,
|
|
149
|
+
},
|
|
150
|
+
[League.SPAIN_CUP]: {
|
|
151
|
+
sport: Sport.SOCCER,
|
|
152
|
+
id: League.SPAIN_CUP,
|
|
153
|
+
isDrawAvailable: true,
|
|
154
|
+
},
|
|
155
|
+
[League.ITALY_CUP]: {
|
|
156
|
+
sport: Sport.SOCCER,
|
|
157
|
+
isDrawAvailable: true,
|
|
158
|
+
},
|
|
159
|
+
[League.TENNIS_GS]: {
|
|
160
|
+
sport: Sport.TENNIS,
|
|
161
|
+
id: League.TENNIS_GS,
|
|
162
|
+
isDrawAvailable: false,
|
|
163
|
+
},
|
|
164
|
+
[League.TENNIS_MASTERS]: {
|
|
165
|
+
sport: Sport.TENNIS,
|
|
166
|
+
id: League.TENNIS_MASTERS,
|
|
167
|
+
isDrawAvailable: false,
|
|
168
|
+
},
|
|
169
|
+
[League.GERMANY_CUP]: {
|
|
170
|
+
sport: Sport.SOCCER,
|
|
171
|
+
id: League.GERMANY_CUP,
|
|
172
|
+
isDrawAvailable: true,
|
|
173
|
+
},
|
|
174
|
+
[League.BRAZIL_1]: {
|
|
175
|
+
sport: Sport.SOCCER,
|
|
176
|
+
id: League.BRAZIL_1,
|
|
177
|
+
isDrawAvailable: true,
|
|
178
|
+
},
|
|
179
|
+
[League.UEFA_EURO_U21]: {
|
|
180
|
+
sport: Sport.SOCCER,
|
|
181
|
+
id: League.UEFA_EURO_U21,
|
|
182
|
+
isDrawAvailable: true,
|
|
183
|
+
},
|
|
184
|
+
[League.FIFA_WORLD_CUP_U20]: {
|
|
185
|
+
sport: Sport.SOCCER,
|
|
186
|
+
id: League.FIFA_WORLD_CUP_U20,
|
|
187
|
+
isDrawAvailable: true,
|
|
188
|
+
},
|
|
189
|
+
[League.EUROLEAGUE]: {
|
|
190
|
+
sport: Sport.BASKETBALL,
|
|
191
|
+
id: League.EUROLEAGUE,
|
|
192
|
+
isDrawAvailable: false,
|
|
193
|
+
},
|
|
194
|
+
[League.FIBA_WORLD_CUP]: {
|
|
195
|
+
sport: Sport.BASKETBALL,
|
|
196
|
+
id: League.FIBA_WORLD_CUP,
|
|
197
|
+
isDrawAvailable: false,
|
|
198
|
+
},
|
|
199
|
+
[League.FORMULA1]: {
|
|
200
|
+
sport: Sport.MOTOSPORT,
|
|
201
|
+
id: League.FORMULA1,
|
|
202
|
+
isDrawAvailable: false,
|
|
203
|
+
},
|
|
204
|
+
[League.MOTOGP]: {
|
|
205
|
+
sport: Sport.MOTOSPORT,
|
|
206
|
+
id: League.MOTOGP,
|
|
207
|
+
isDrawAvailable: false,
|
|
208
|
+
},
|
|
209
|
+
[League.SAUDI_PROFESSIONAL_LEAGUE]: {
|
|
210
|
+
sport: Sport.SOCCER,
|
|
211
|
+
id: League.SAUDI_PROFESSIONAL_LEAGUE,
|
|
212
|
+
isDrawAvailable: true,
|
|
213
|
+
},
|
|
214
|
+
[League.BOXING]: {
|
|
215
|
+
sport: Sport.FIGHTING,
|
|
216
|
+
id: League.BOXING,
|
|
217
|
+
isDrawAvailable: false,
|
|
218
|
+
},
|
|
219
|
+
[League.UEFA_NATIONS_LEAGUE]: {
|
|
220
|
+
sport: Sport.SOCCER,
|
|
221
|
+
id: League.UEFA_NATIONS_LEAGUE,
|
|
222
|
+
isDrawAvailable: true,
|
|
223
|
+
},
|
|
224
|
+
[League.CONCACAF_NATIONS_LEAGUE]: {
|
|
225
|
+
sport: Sport.SOCCER,
|
|
226
|
+
id: League.CONCACAF_NATIONS_LEAGUE,
|
|
227
|
+
isDrawAvailable: true,
|
|
228
|
+
},
|
|
229
|
+
[League.CSGO]: {
|
|
230
|
+
sport: Sport.ESPORTS,
|
|
231
|
+
id: League.CSGO,
|
|
232
|
+
isDrawAvailable: false,
|
|
233
|
+
},
|
|
234
|
+
[League.DOTA2]: {
|
|
235
|
+
sport: Sport.ESPORTS,
|
|
236
|
+
id: League.DOTA2,
|
|
237
|
+
isDrawAvailable: false,
|
|
238
|
+
},
|
|
239
|
+
[League.SUMMER_OLYMPICS_QUALIFICATION]: {
|
|
240
|
+
sport: Sport.BASKETBALL,
|
|
241
|
+
id: League.SUMMER_OLYMPICS_QUALIFICATION,
|
|
242
|
+
isDrawAvailable: false,
|
|
243
|
+
},
|
|
244
|
+
[League.LOL]: {
|
|
245
|
+
sport: Sport.ESPORTS,
|
|
246
|
+
id: League.LOL,
|
|
247
|
+
isDrawAvailable: false,
|
|
248
|
+
},
|
|
249
|
+
[League.CONMEBOL_WC_QUALIFICATIONS]: {
|
|
250
|
+
sport: Sport.SOCCER,
|
|
251
|
+
id: League.CONMEBOL_WC_QUALIFICATIONS,
|
|
252
|
+
isDrawAvailable: true,
|
|
253
|
+
},
|
|
254
|
+
[League.UEFA_CONFERENCE_LEAGUE]: {
|
|
255
|
+
sport: Sport.SOCCER,
|
|
256
|
+
id: League.UEFA_CONFERENCE_LEAGUE,
|
|
257
|
+
isDrawAvailable: true,
|
|
258
|
+
},
|
|
259
|
+
[League.NON_TITLE_BOXING]: {
|
|
260
|
+
sport: Sport.FIGHTING,
|
|
261
|
+
isDrawAvailable: false,
|
|
262
|
+
},
|
|
263
|
+
[League.UEFA_CHAMPIONS_LEAGUE_QUALIFICATION]: {
|
|
264
|
+
sport: Sport.SOCCER,
|
|
265
|
+
id: League.UEFA_CHAMPIONS_LEAGUE_QUALIFICATION,
|
|
266
|
+
isDrawAvailable: true,
|
|
267
|
+
},
|
|
268
|
+
[League.UEFA_EUROPA_LEAGUE_QUALIFICATION]: {
|
|
269
|
+
sport: Sport.SOCCER,
|
|
270
|
+
id: League.UEFA_EUROPA_LEAGUE_QUALIFICATION,
|
|
271
|
+
isDrawAvailable: true,
|
|
272
|
+
},
|
|
273
|
+
[League.UEFA_CONFERENCE_LEAGUE_QUALIFICATION]: {
|
|
274
|
+
sport: Sport.SOCCER,
|
|
275
|
+
isDrawAvailable: true,
|
|
276
|
+
},
|
|
277
|
+
[League.GOLF_H2H]: {
|
|
278
|
+
sport: Sport.GOLF,
|
|
279
|
+
id: League.GOLF_H2H,
|
|
280
|
+
isDrawAvailable: false,
|
|
281
|
+
},
|
|
282
|
+
[League.GOLF_WINNER]: {
|
|
283
|
+
sport: Sport.GOLF,
|
|
284
|
+
id: League.GOLF_WINNER,
|
|
285
|
+
isDrawAvailable: false,
|
|
286
|
+
},
|
|
287
|
+
[League.LIGA_MX]: {
|
|
288
|
+
sport: Sport.SOCCER,
|
|
289
|
+
id: League.LIGA_MX,
|
|
290
|
+
isDrawAvailable: true,
|
|
291
|
+
},
|
|
292
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
export const Sport = {
|
|
2
|
+
SOCCER: 'Soccer',
|
|
3
|
+
FOOTBALL: 'Football',
|
|
4
|
+
BASKETBALL: 'Basketball',
|
|
5
|
+
BASEBALL: 'Baseball',
|
|
6
|
+
HOCKEY: 'Hockey',
|
|
7
|
+
FIGHTING: 'Fighting',
|
|
8
|
+
TENNIS: 'Tennis',
|
|
9
|
+
ESPORTS: 'eSports',
|
|
10
|
+
CRICKET: 'Cricket',
|
|
11
|
+
MOTOSPORT: 'Motosport',
|
|
12
|
+
GOLF: 'Golf',
|
|
13
|
+
EMPTY: '',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const League = {
|
|
17
|
+
NCAAF: 1,
|
|
18
|
+
NFL: 2,
|
|
19
|
+
MLB: 3,
|
|
20
|
+
NBA: 4,
|
|
21
|
+
NCAAB: 5,
|
|
22
|
+
NHL: 6,
|
|
23
|
+
UFC: 7,
|
|
24
|
+
WNBA: 8,
|
|
25
|
+
MLS: 10,
|
|
26
|
+
EPL: 11,
|
|
27
|
+
LIGUE_ONE: 12,
|
|
28
|
+
BUNDESLIGA: 13,
|
|
29
|
+
LA_LIGA: 14,
|
|
30
|
+
SERIE_A: 15,
|
|
31
|
+
UEFA_CL: 16,
|
|
32
|
+
UEFA_EL: 17,
|
|
33
|
+
FIFA_WC: 18,
|
|
34
|
+
J1_LEAGUE: 19,
|
|
35
|
+
IPL: 20,
|
|
36
|
+
T20_BLAST: 21,
|
|
37
|
+
IIHF_WORLD_CHAMPIONSHIP: 33,
|
|
38
|
+
COPA_AMERICA: 44,
|
|
39
|
+
COPA_LIBERTADORES: 45,
|
|
40
|
+
UEFA_EURO: 50,
|
|
41
|
+
EREDIVISIE: 57,
|
|
42
|
+
PRIMEIRA_LIGA: 61,
|
|
43
|
+
FIFA_WC_WOMEN: 76,
|
|
44
|
+
ENGLAND_CUP: 132,
|
|
45
|
+
FRANCE_CUP: 134,
|
|
46
|
+
SPAIN_CUP: 138,
|
|
47
|
+
ITALY_CUP: 141,
|
|
48
|
+
TENNIS_GS: 153,
|
|
49
|
+
TENNIS_MASTERS: 156,
|
|
50
|
+
GERMANY_CUP: 209,
|
|
51
|
+
LIGA_MX: 230,
|
|
52
|
+
BRAZIL_1: 268,
|
|
53
|
+
UEFA_EURO_U21: 288,
|
|
54
|
+
FIFA_WORLD_CUP_U20: 296,
|
|
55
|
+
EUROLEAGUE: 399,
|
|
56
|
+
FIBA_WORLD_CUP: 409,
|
|
57
|
+
FORMULA1: 445,
|
|
58
|
+
MOTOGP: 497,
|
|
59
|
+
SAUDI_PROFESSIONAL_LEAGUE: 536,
|
|
60
|
+
BOXING: 9196,
|
|
61
|
+
UEFA_NATIONS_LEAGUE: 9806,
|
|
62
|
+
CONCACAF_NATIONS_LEAGUE: 9821,
|
|
63
|
+
CSGO: 9977,
|
|
64
|
+
DOTA2: 9983,
|
|
65
|
+
SUMMER_OLYMPICS_QUALIFICATION: 10502,
|
|
66
|
+
LOL: 10138,
|
|
67
|
+
CONMEBOL_WC_QUALIFICATIONS: 10199,
|
|
68
|
+
UEFA_CONFERENCE_LEAGUE: 10216,
|
|
69
|
+
NON_TITLE_BOXING: 10595,
|
|
70
|
+
GOLF_H2H: 100021,
|
|
71
|
+
GOLF_WINNER: 100121,
|
|
72
|
+
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_1: 15312,
|
|
73
|
+
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_2: 15313,
|
|
74
|
+
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_3: 15314,
|
|
75
|
+
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_4: 15315,
|
|
76
|
+
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_5: 15316,
|
|
77
|
+
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_6: 15317,
|
|
78
|
+
TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_7: 15318,
|
|
79
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_1: 15622,
|
|
80
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_2: 15623,
|
|
81
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_3: 15624,
|
|
82
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_4: 15625,
|
|
83
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_5: 15626,
|
|
84
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_6: 15627,
|
|
85
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_7: 15628,
|
|
86
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_8: 15632,
|
|
87
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_9: 15633,
|
|
88
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_10: 15634,
|
|
89
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_11: 15635,
|
|
90
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_12: 15636,
|
|
91
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_13: 15637,
|
|
92
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_14: 15638,
|
|
93
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_15: 15641,
|
|
94
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_16: 15642,
|
|
95
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_17: 15643,
|
|
96
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_18: 15644,
|
|
97
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_19: 15645,
|
|
98
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_20: 15646,
|
|
99
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_21: 15647,
|
|
100
|
+
TENNIS_MASTERS_LIVE_MAPPING_V2_22: 15648,
|
|
101
|
+
UEFA_CHAMPIONS_LEAGUE_QUALIFICATION: 10611,
|
|
102
|
+
UEFA_EUROPA_LEAGUE_QUALIFICATION: 10613,
|
|
103
|
+
UEFA_CONFERENCE_LEAGUE_QUALIFICATION: 10615,
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const LEAGUES_NO_FORMAL_HOME_AWAY = [
|
|
107
|
+
League.CSGO,
|
|
108
|
+
League.DOTA2,
|
|
109
|
+
League.LOL,
|
|
110
|
+
League.TENNIS_GS,
|
|
111
|
+
League.TENNIS_MASTERS,
|
|
112
|
+
League.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_1,
|
|
113
|
+
League.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_2,
|
|
114
|
+
League.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_3,
|
|
115
|
+
League.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_4,
|
|
116
|
+
League.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_5,
|
|
117
|
+
League.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_6,
|
|
118
|
+
League.TENNIS_GRAND_SLAM_LIVE_MAPPING_V2_7,
|
|
119
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_1,
|
|
120
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_2,
|
|
121
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_3,
|
|
122
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_4,
|
|
123
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_5,
|
|
124
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_6,
|
|
125
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_7,
|
|
126
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_8,
|
|
127
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_9,
|
|
128
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_10,
|
|
129
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_11,
|
|
130
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_12,
|
|
131
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_13,
|
|
132
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_14,
|
|
133
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_15,
|
|
134
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_16,
|
|
135
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_17,
|
|
136
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_18,
|
|
137
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_19,
|
|
138
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_20,
|
|
139
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_21,
|
|
140
|
+
League.TENNIS_MASTERS_LIVE_MAPPING_V2_22,
|
|
141
|
+
];
|
package/src/utils/sports.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LeagueMap } from '../constants/sports';
|
|
2
|
+
import { League, Sport } from '../enums/sports';
|
|
2
3
|
|
|
3
|
-
export const
|
|
4
|
+
export const getLeagueSport = (league: number) => {
|
|
5
|
+
const leagueInfo = LeagueMap[league];
|
|
6
|
+
return leagueInfo ? leagueInfo.sport : Sport.EMPTY;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const allowGame = (opticOddsScoresApiResponse, marketLeague, marketId, constraintsMap) => {
|
|
4
10
|
const currentScoreHome = opticOddsScoresApiResponse.score_home_total;
|
|
5
11
|
const currentScoreAway = opticOddsScoresApiResponse.score_away_total;
|
|
6
12
|
const currentClock = opticOddsScoresApiResponse.clock;
|
|
@@ -9,6 +15,8 @@ export const allowGame = (opticOddsScoresApiResponse, marketLeague, marketSport,
|
|
|
9
15
|
const homeTeam = opticOddsScoresApiResponse.home_team;
|
|
10
16
|
const awayTeam = opticOddsScoresApiResponse.away_team;
|
|
11
17
|
|
|
18
|
+
const marketSport = getLeagueSport(marketId);
|
|
19
|
+
|
|
12
20
|
if (currentGameStatus.toLowerCase() == 'completed') {
|
|
13
21
|
console.log(`Blocking game ${homeTeam} - ${awayTeam} because it is no longer live.`);
|
|
14
22
|
return null;
|