@chillicream/nitro-embedded
Version:
Nitro GraphQL IDE
6 lines • 1.28 MB
JavaScript
import{p as process$1,B as Buffer}from"./monaco.3bb3e100.BcYI0mkj.js";const APP_NAME="Nitro",APP_VERSION="31.0.0",APP_GRAPHQL_CLIENT_ID="Q2xpZW50Cmc5ZjAwOTFmNTY5NmQ0NTZkOWUwZDQ0ZDMzYjJhZDJlOA==",cloudUriPattern=new RegExp("^https?:\\/\\/.*?\\.(bananacakepop\\.com|chillicream\\.com|chillicream\\.cloud)","i"),IS_RUNNING_IN_CLOUD=cloudUriPattern?.test(self.origin)??!1,IS_RUNNING_IN_ELECTRON=navigator.userAgent.indexOf("Electron")>=0,APP_TYPE=IS_RUNNING_IN_CLOUD?"cloud":IS_RUNNING_IN_ELECTRON?"app":"middleware",APP_AGENT=`${APP_NAME}/${APP_VERSION} (${APP_TYPE})`;getOsName();isMacLike();function getOsName(){return navigator.userAgent.indexOf("Win")>=0?"Windows":navigator.userAgent.indexOf("Mac")>=0?"macOS":navigator.userAgent.indexOf("X11")>=0||navigator.userAgent.indexOf("Linux")>=0?"Linux":"Unknown"}function isMacLike(){const r=navigator.userAgent.toLowerCase();return r.includes("mac os")||r.includes("ipad")}const HEADER_CONTENT_TYPE="Content-Type",HTTP_SCHEME_PATTERN=/^https?:\/\//i,INTROSPECTION_PREFIX=/^_{2}(?!_)/i,FIFTY_MILLISECONDS=50,ONE_SECOND=1e3,FIVE_SECONDS=5e3,ONE_MINUTE=6e4,ABORT_ERROR_NAME="AbortError",ABORT_ERROR=new DOMException("Action cancelled",ABORT_ERROR_NAME),TIMEOUT_ABORT_ERROR_MESSAGE="Action timed out",TIMEOUT_ABORT_ERROR=new DOMException(TIMEOUT_ABORT_ERROR_MESSAGE,ABORT_ERROR_NAME);class TimeoutAbortSignal{#e;#t;#r;constructor(t,n){this.#e=t,this.#t=n}get aborted(){return this.#e.aborted}get cancelled(){return this.#t()}get onabort(){return this.#e.onabort}get reason(){return this.#e.reason}dispatchEvent(t){return this.#e.dispatchEvent(t)}throwIfAborted(){this.#e.throwIfAborted()}toAbortSignal(){return this.#e}toPromise(){if(this.#r)return this.#r;const t=this;let n=!1;return this.#r=new Promise((i,s)=>{if(t.aborted){n=!0,s(TIMEOUT_ABORT_ERROR);return}if(t.cancelled){n=!0,i();return}function a(){t.removeEventListener("abort",a),t.removeEventListener("cancelled",l),n||(n=!0,s(TIMEOUT_ABORT_ERROR))}function l(){t.removeEventListener("abort",a),t.removeEventListener("cancelled",l),n||(n=!0,i())}t.addEventListener("abort",a),t.addEventListener("cancelled",l)}),this.#r}addEventListener(t,n,i){this.#e.addEventListener(t,n,i)}removeEventListener(t,n,i){this.#e.removeEventListener(t,n,i)}}class TimeoutAbortController{_controller=new AbortController;_signal=new TimeoutAbortSignal(this._controller.signal,()=>this._cancelled);_cancelled=!1;_timeoutHandle;constructor(t){this._timeoutHandle=self.setTimeout(()=>{this.abort(TIMEOUT_ABORT_ERROR_MESSAGE)},t)}get signal(){return this._signal}abort(t){this._controller.abort(t)}cancel(){this._cancelled=!0,self.clearTimeout(this._timeoutHandle),this._signal.dispatchEvent(new Event("cancelled"))}}function isAbortError(r){return r instanceof DOMException&&r.name===ABORT_ERROR_NAME}function isTimeoutAbortError(r){return isAbortError(r)&&r.message===TIMEOUT_ABORT_ERROR_MESSAGE}function createAbortScope(r,t,n){return n?n.aborted?Promise.reject(ABORT_ERROR):(n.addEventListener("abort",r),t().finally(()=>{n.removeEventListener("abort",r)})):t()}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getAugmentedNamespace(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var t=r.default;if(typeof t=="function"){var n=function i(){var s=!1;try{s=this instanceof i}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var s=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return r[i]}})}),n}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(t,n){if(n){t.super_=n;var i=function(){};i.prototype=n.prototype,t.prototype=new i,t.prototype.constructor=t}}),inherits_browser.exports}var safeBuffer$1={exports:{}},dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(r){Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},n={};n.byteLength=h,n.toByteArray=D,n.fromByteArray=jn;for(var i=[],s=[],a=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=0,on=l.length;v<on;++v)i[v]=l[v],s[l.charCodeAt(v)]=v;s[45]=62,s[95]=63;function u(gi){var Ri=gi.length;if(Ri%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var Si=gi.indexOf("=");Si===-1&&(Si=Ri);var Ai=Si===Ri?0:4-Si%4;return[Si,Ai]}function h(gi){var Ri=u(gi),Si=Ri[0],Ai=Ri[1];return(Si+Ai)*3/4-Ai}function Rn(gi,Ri,Si){return(Ri+Si)*3/4-Si}function D(gi){var Ri,Si=u(gi),Ai=Si[0],Ii=Si[1],Ni=new a(Rn(gi,Ai,Ii)),Ci=0,Oi=Ii>0?Ai-4:Ai,ki;for(ki=0;ki<Oi;ki+=4)Ri=s[gi.charCodeAt(ki)]<<18|s[gi.charCodeAt(ki+1)]<<12|s[gi.charCodeAt(ki+2)]<<6|s[gi.charCodeAt(ki+3)],Ni[Ci++]=Ri>>16&255,Ni[Ci++]=Ri>>8&255,Ni[Ci++]=Ri&255;return Ii===2&&(Ri=s[gi.charCodeAt(ki)]<<2|s[gi.charCodeAt(ki+1)]>>4,Ni[Ci++]=Ri&255),Ii===1&&(Ri=s[gi.charCodeAt(ki)]<<10|s[gi.charCodeAt(ki+1)]<<4|s[gi.charCodeAt(ki+2)]>>2,Ni[Ci++]=Ri>>8&255,Ni[Ci++]=Ri&255),Ni}function Mn(gi){return i[gi>>18&63]+i[gi>>12&63]+i[gi>>6&63]+i[gi&63]}function Ln(gi,Ri,Si){for(var Ai,Ii=[],Ni=Ri;Ni<Si;Ni+=3)Ai=(gi[Ni]<<16&16711680)+(gi[Ni+1]<<8&65280)+(gi[Ni+2]&255),Ii.push(Mn(Ai));return Ii.join("")}function jn(gi){for(var Ri,Si=gi.length,Ai=Si%3,Ii=[],Ni=16383,Ci=0,Oi=Si-Ai;Ci<Oi;Ci+=Ni)Ii.push(Ln(gi,Ci,Ci+Ni>Oi?Oi:Ci+Ni));return Ai===1?(Ri=gi[Si-1],Ii.push(i[Ri>>2]+i[Ri<<4&63]+"==")):Ai===2&&(Ri=(gi[Si-2]<<8)+gi[Si-1],Ii.push(i[Ri>>10]+i[Ri>>4&63]+i[Ri<<2&63]+"=")),Ii.join("")}var hi={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */hi.read=function(gi,Ri,Si,Ai,Ii){var Ni,Ci,Oi=Ii*8-Ai-1,ki=(1<<Oi)-1,Fi=ki>>1,bi=-7,Yn=Si?Ii-1:0,In=Si?-1:1,Hn=gi[Ri+Yn];for(Yn+=In,Ni=Hn&(1<<-bi)-1,Hn>>=-bi,bi+=Oi;bi>0;Ni=Ni*256+gi[Ri+Yn],Yn+=In,bi-=8);for(Ci=Ni&(1<<-bi)-1,Ni>>=-bi,bi+=Ai;bi>0;Ci=Ci*256+gi[Ri+Yn],Yn+=In,bi-=8);if(Ni===0)Ni=1-Fi;else{if(Ni===ki)return Ci?NaN:(Hn?-1:1)*(1/0);Ci=Ci+Math.pow(2,Ai),Ni=Ni-Fi}return(Hn?-1:1)*Ci*Math.pow(2,Ni-Ai)},hi.write=function(gi,Ri,Si,Ai,Ii,Ni){var Ci,Oi,ki,Fi=Ni*8-Ii-1,bi=(1<<Fi)-1,Yn=bi>>1,In=Ii===23?Math.pow(2,-24)-Math.pow(2,-77):0,Hn=Ai?0:Ni-1,yi=Ai?1:-1,mi=Ri<0||Ri===0&&1/Ri<0?1:0;for(Ri=Math.abs(Ri),isNaN(Ri)||Ri===1/0?(Oi=isNaN(Ri)?1:0,Ci=bi):(Ci=Math.floor(Math.log(Ri)/Math.LN2),Ri*(ki=Math.pow(2,-Ci))<1&&(Ci--,ki*=2),Ci+Yn>=1?Ri+=In/ki:Ri+=In*Math.pow(2,1-Yn),Ri*ki>=2&&(Ci++,ki/=2),Ci+Yn>=bi?(Oi=0,Ci=bi):Ci+Yn>=1?(Oi=(Ri*ki-1)*Math.pow(2,Ii),Ci=Ci+Yn):(Oi=Ri*Math.pow(2,Yn-1)*Math.pow(2,Ii),Ci=0));Ii>=8;gi[Si+Hn]=Oi&255,Hn+=yi,Oi/=256,Ii-=8);for(Ci=Ci<<Ii|Oi,Fi+=Ii;Fi>0;gi[Si+Hn]=Ci&255,Hn+=yi,Ci/=256,Fi-=8);gi[Si+Hn-yi]|=mi*128};/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/(function(gi){const Ri=n,Si=hi,Ai=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;gi.Buffer=bi,gi.SlowBuffer=Ti,gi.INSPECT_MAX_BYTES=50;const Ii=2147483647;gi.kMaxLength=Ii;const{Uint8Array:Ni,ArrayBuffer:Ci,SharedArrayBuffer:Oi}=globalThis;bi.TYPED_ARRAY_SUPPORT=ki(),!bi.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function ki(){try{const Gi=new Ni(1),Li={foo:function(){return 42}};return Object.setPrototypeOf(Li,Ni.prototype),Object.setPrototypeOf(Gi,Li),Gi.foo()===42}catch{return!1}}Object.defineProperty(bi.prototype,"parent",{enumerable:!0,get:function(){if(bi.isBuffer(this))return this.buffer}}),Object.defineProperty(bi.prototype,"offset",{enumerable:!0,get:function(){if(bi.isBuffer(this))return this.byteOffset}});function Fi(Gi){if(Gi>Ii)throw new RangeError('The value "'+Gi+'" is invalid for option "size"');const Li=new Ni(Gi);return Object.setPrototypeOf(Li,bi.prototype),Li}function bi(Gi,Li,$i){if(typeof Gi=="number"){if(typeof Li=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return yi(Gi)}return Yn(Gi,Li,$i)}bi.poolSize=8192;function Yn(Gi,Li,$i){if(typeof Gi=="string")return mi(Gi,Li);if(Ci.isView(Gi))return wi(Gi);if(Gi==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Gi);if(Ba(Gi,Ci)||Gi&&Ba(Gi.buffer,Ci)||typeof Oi<"u"&&(Ba(Gi,Oi)||Gi&&Ba(Gi.buffer,Oi)))return Ei(Gi,Li,$i);if(typeof Gi=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Wi=Gi.valueOf&&Gi.valueOf();if(Wi!=null&&Wi!==Gi)return bi.from(Wi,Li,$i);const ra=xi(Gi);if(ra)return ra;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Gi[Symbol.toPrimitive]=="function")return bi.from(Gi[Symbol.toPrimitive]("string"),Li,$i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Gi)}bi.from=function(Gi,Li,$i){return Yn(Gi,Li,$i)},Object.setPrototypeOf(bi.prototype,Ni.prototype),Object.setPrototypeOf(bi,Ni);function In(Gi){if(typeof Gi!="number")throw new TypeError('"size" argument must be of type number');if(Gi<0)throw new RangeError('The value "'+Gi+'" is invalid for option "size"')}function Hn(Gi,Li,$i){return In(Gi),Gi<=0?Fi(Gi):Li!==void 0?typeof $i=="string"?Fi(Gi).fill(Li,$i):Fi(Gi).fill(Li):Fi(Gi)}bi.alloc=function(Gi,Li,$i){return Hn(Gi,Li,$i)};function yi(Gi){return In(Gi),Fi(Gi<0?0:Wn(Gi)|0)}bi.allocUnsafe=function(Gi){return yi(Gi)},bi.allocUnsafeSlow=function(Gi){return yi(Gi)};function mi(Gi,Li){if((typeof Li!="string"||Li==="")&&(Li="utf8"),!bi.isEncoding(Li))throw new TypeError("Unknown encoding: "+Li);const $i=qi(Gi,Li)|0;let Wi=Fi($i);const ra=Wi.write(Gi,Li);return ra!==$i&&(Wi=Wi.slice(0,ra)),Wi}function _i(Gi){const Li=Gi.length<0?0:Wn(Gi.length)|0,$i=Fi(Li);for(let Wi=0;Wi<Li;Wi+=1)$i[Wi]=Gi[Wi]&255;return $i}function wi(Gi){if(Ba(Gi,Ni)){const Li=new Ni(Gi);return Ei(Li.buffer,Li.byteOffset,Li.byteLength)}return _i(Gi)}function Ei(Gi,Li,$i){if(Li<0||Gi.byteLength<Li)throw new RangeError('"offset" is outside of buffer bounds');if(Gi.byteLength<Li+($i||0))throw new RangeError('"length" is outside of buffer bounds');let Wi;return Li===void 0&&$i===void 0?Wi=new Ni(Gi):$i===void 0?Wi=new Ni(Gi,Li):Wi=new Ni(Gi,Li,$i),Object.setPrototypeOf(Wi,bi.prototype),Wi}function xi(Gi){if(bi.isBuffer(Gi)){const Li=Wn(Gi.length)|0,$i=Fi(Li);return $i.length===0||Gi.copy($i,0,0,Li),$i}if(Gi.length!==void 0)return typeof Gi.length!="number"||Fa(Gi.length)?Fi(0):_i(Gi);if(Gi.type==="Buffer"&&Array.isArray(Gi.data))return _i(Gi.data)}function Wn(Gi){if(Gi>=Ii)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ii.toString(16)+" bytes");return Gi|0}function Ti(Gi){return+Gi!=Gi&&(Gi=0),bi.alloc(+Gi)}bi.isBuffer=function(Li){return Li!=null&&Li._isBuffer===!0&&Li!==bi.prototype},bi.compare=function(Li,$i){if(Ba(Li,Ni)&&(Li=bi.from(Li,Li.offset,Li.byteLength)),Ba($i,Ni)&&($i=bi.from($i,$i.offset,$i.byteLength)),!bi.isBuffer(Li)||!bi.isBuffer($i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Li===$i)return 0;let Wi=Li.length,ra=$i.length;for(let aa=0,sa=Math.min(Wi,ra);aa<sa;++aa)if(Li[aa]!==$i[aa]){Wi=Li[aa],ra=$i[aa];break}return Wi<ra?-1:ra<Wi?1:0},bi.isEncoding=function(Li){switch(String(Li).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}},bi.concat=function(Li,$i){if(!Array.isArray(Li))throw new TypeError('"list" argument must be an Array of Buffers');if(Li.length===0)return bi.alloc(0);let Wi;if($i===void 0)for($i=0,Wi=0;Wi<Li.length;++Wi)$i+=Li[Wi].length;const ra=bi.allocUnsafe($i);let aa=0;for(Wi=0;Wi<Li.length;++Wi){let sa=Li[Wi];if(Ba(sa,Ni))aa+sa.length>ra.length?(bi.isBuffer(sa)||(sa=bi.from(sa)),sa.copy(ra,aa)):Ni.prototype.set.call(ra,sa,aa);else if(bi.isBuffer(sa))sa.copy(ra,aa);else throw new TypeError('"list" argument must be an Array of Buffers');aa+=sa.length}return ra};function qi(Gi,Li){if(bi.isBuffer(Gi))return Gi.length;if(Ci.isView(Gi)||Ba(Gi,Ci))return Gi.byteLength;if(typeof Gi!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Gi);const $i=Gi.length,Wi=arguments.length>2&&arguments[2]===!0;if(!Wi&&$i===0)return 0;let ra=!1;for(;;)switch(Li){case"ascii":case"latin1":case"binary":return $i;case"utf8":case"utf-8":return Ta(Gi).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $i*2;case"hex":return $i>>>1;case"base64":return Ia(Gi).length;default:if(ra)return Wi?-1:Ta(Gi).length;Li=(""+Li).toLowerCase(),ra=!0}}bi.byteLength=qi;function Vi(Gi,Li,$i){let Wi=!1;if((Li===void 0||Li<0)&&(Li=0),Li>this.length||(($i===void 0||$i>this.length)&&($i=this.length),$i<=0)||($i>>>=0,Li>>>=0,$i<=Li))return"";for(Gi||(Gi="utf8");;)switch(Gi){case"hex":return ua(this,Li,$i);case"utf8":case"utf-8":return Yi(this,Li,$i);case"ascii":return Zi(this,Li,$i);case"latin1":case"binary":return Ji(this,Li,$i);case"base64":return Qi(this,Li,$i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xi(this,Li,$i);default:if(Wi)throw new TypeError("Unknown encoding: "+Gi);Gi=(Gi+"").toLowerCase(),Wi=!0}}bi.prototype._isBuffer=!0;function ji(Gi,Li,$i){const Wi=Gi[Li];Gi[Li]=Gi[$i],Gi[$i]=Wi}bi.prototype.swap16=function(){const Li=this.length;if(Li%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let $i=0;$i<Li;$i+=2)ji(this,$i,$i+1);return this},bi.prototype.swap32=function(){const Li=this.length;if(Li%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let $i=0;$i<Li;$i+=4)ji(this,$i,$i+3),ji(this,$i+1,$i+2);return this},bi.prototype.swap64=function(){const Li=this.length;if(Li%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let $i=0;$i<Li;$i+=8)ji(this,$i,$i+7),ji(this,$i+1,$i+6),ji(this,$i+2,$i+5),ji(this,$i+3,$i+4);return this},bi.prototype.toString=function(){const Li=this.length;return Li===0?"":arguments.length===0?Yi(this,0,Li):Vi.apply(this,arguments)},bi.prototype.toLocaleString=bi.prototype.toString,bi.prototype.equals=function(Li){if(!bi.isBuffer(Li))throw new TypeError("Argument must be a Buffer");return this===Li?!0:bi.compare(this,Li)===0},bi.prototype.inspect=function(){let Li="";const $i=gi.INSPECT_MAX_BYTES;return Li=this.toString("hex",0,$i).replace(/(.{2})/g,"$1 ").trim(),this.length>$i&&(Li+=" ... "),"<Buffer "+Li+">"},Ai&&(bi.prototype[Ai]=bi.prototype.inspect),bi.prototype.compare=function(Li,$i,Wi,ra,aa){if(Ba(Li,Ni)&&(Li=bi.from(Li,Li.offset,Li.byteLength)),!bi.isBuffer(Li))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Li);if($i===void 0&&($i=0),Wi===void 0&&(Wi=Li?Li.length:0),ra===void 0&&(ra=0),aa===void 0&&(aa=this.length),$i<0||Wi>Li.length||ra<0||aa>this.length)throw new RangeError("out of range index");if(ra>=aa&&$i>=Wi)return 0;if(ra>=aa)return-1;if($i>=Wi)return 1;if($i>>>=0,Wi>>>=0,ra>>>=0,aa>>>=0,this===Li)return 0;let sa=aa-ra,Ra=Wi-$i;const xa=Math.min(sa,Ra),pa=this.slice(ra,aa),Na=Li.slice($i,Wi);for(let _a=0;_a<xa;++_a)if(pa[_a]!==Na[_a]){sa=pa[_a],Ra=Na[_a];break}return sa<Ra?-1:Ra<sa?1:0};function Bi(Gi,Li,$i,Wi,ra){if(Gi.length===0)return-1;if(typeof $i=="string"?(Wi=$i,$i=0):$i>2147483647?$i=2147483647:$i<-2147483648&&($i=-2147483648),$i=+$i,Fa($i)&&($i=ra?0:Gi.length-1),$i<0&&($i=Gi.length+$i),$i>=Gi.length){if(ra)return-1;$i=Gi.length-1}else if($i<0)if(ra)$i=0;else return-1;if(typeof Li=="string"&&(Li=bi.from(Li,Wi)),bi.isBuffer(Li))return Li.length===0?-1:Pi(Gi,Li,$i,Wi,ra);if(typeof Li=="number")return Li=Li&255,typeof Ni.prototype.indexOf=="function"?ra?Ni.prototype.indexOf.call(Gi,Li,$i):Ni.prototype.lastIndexOf.call(Gi,Li,$i):Pi(Gi,[Li],$i,Wi,ra);throw new TypeError("val must be string, number or Buffer")}function Pi(Gi,Li,$i,Wi,ra){let aa=1,sa=Gi.length,Ra=Li.length;if(Wi!==void 0&&(Wi=String(Wi).toLowerCase(),Wi==="ucs2"||Wi==="ucs-2"||Wi==="utf16le"||Wi==="utf-16le")){if(Gi.length<2||Li.length<2)return-1;aa=2,sa/=2,Ra/=2,$i/=2}function xa(Na,_a){return aa===1?Na[_a]:Na.readUInt16BE(_a*aa)}let pa;if(ra){let Na=-1;for(pa=$i;pa<sa;pa++)if(xa(Gi,pa)===xa(Li,Na===-1?0:pa-Na)){if(Na===-1&&(Na=pa),pa-Na+1===Ra)return Na*aa}else Na!==-1&&(pa-=pa-Na),Na=-1}else for($i+Ra>sa&&($i=sa-Ra),pa=$i;pa>=0;pa--){let Na=!0;for(let _a=0;_a<Ra;_a++)if(xa(Gi,pa+_a)!==xa(Li,_a)){Na=!1;break}if(Na)return pa}return-1}bi.prototype.includes=function(Li,$i,Wi){return this.indexOf(Li,$i,Wi)!==-1},bi.prototype.indexOf=function(Li,$i,Wi){return Bi(this,Li,$i,Wi,!0)},bi.prototype.lastIndexOf=function(Li,$i,Wi){return Bi(this,Li,$i,Wi,!1)};function zi(Gi,Li,$i,Wi){$i=Number($i)||0;const ra=Gi.length-$i;Wi?(Wi=Number(Wi),Wi>ra&&(Wi=ra)):Wi=ra;const aa=Li.length;Wi>aa/2&&(Wi=aa/2);let sa;for(sa=0;sa<Wi;++sa){const Ra=parseInt(Li.substr(sa*2,2),16);if(Fa(Ra))return sa;Gi[$i+sa]=Ra}return sa}function Hi(Gi,Li,$i,Wi){return ba(Ta(Li,Gi.length-$i),Gi,$i,Wi)}function Ui(Gi,Li,$i,Wi){return ba(ya(Li),Gi,$i,Wi)}function Mi(Gi,Li,$i,Wi){return ba(Ia(Li),Gi,$i,Wi)}function Ki(Gi,Li,$i,Wi){return ba(Pa(Li,Gi.length-$i),Gi,$i,Wi)}bi.prototype.write=function(Li,$i,Wi,ra){if($i===void 0)ra="utf8",Wi=this.length,$i=0;else if(Wi===void 0&&typeof $i=="string")ra=$i,Wi=this.length,$i=0;else if(isFinite($i))$i=$i>>>0,isFinite(Wi)?(Wi=Wi>>>0,ra===void 0&&(ra="utf8")):(ra=Wi,Wi=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const aa=this.length-$i;if((Wi===void 0||Wi>aa)&&(Wi=aa),Li.length>0&&(Wi<0||$i<0)||$i>this.length)throw new RangeError("Attempt to write outside buffer bounds");ra||(ra="utf8");let sa=!1;for(;;)switch(ra){case"hex":return zi(this,Li,$i,Wi);case"utf8":case"utf-8":return Hi(this,Li,$i,Wi);case"ascii":case"latin1":case"binary":return Ui(this,Li,$i,Wi);case"base64":return Mi(this,Li,$i,Wi);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ki(this,Li,$i,Wi);default:if(sa)throw new TypeError("Unknown encoding: "+ra);ra=(""+ra).toLowerCase(),sa=!0}},bi.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Qi(Gi,Li,$i){return Li===0&&$i===Gi.length?Ri.fromByteArray(Gi):Ri.fromByteArray(Gi.slice(Li,$i))}function Yi(Gi,Li,$i){$i=Math.min(Gi.length,$i);const Wi=[];let ra=Li;for(;ra<$i;){const aa=Gi[ra];let sa=null,Ra=aa>239?4:aa>223?3:aa>191?2:1;if(ra+Ra<=$i){let xa,pa,Na,_a;switch(Ra){case 1:aa<128&&(sa=aa);break;case 2:xa=Gi[ra+1],(xa&192)===128&&(_a=(aa&31)<<6|xa&63,_a>127&&(sa=_a));break;case 3:xa=Gi[ra+1],pa=Gi[ra+2],(xa&192)===128&&(pa&192)===128&&(_a=(aa&15)<<12|(xa&63)<<6|pa&63,_a>2047&&(_a<55296||_a>57343)&&(sa=_a));break;case 4:xa=Gi[ra+1],pa=Gi[ra+2],Na=Gi[ra+3],(xa&192)===128&&(pa&192)===128&&(Na&192)===128&&(_a=(aa&15)<<18|(xa&63)<<12|(pa&63)<<6|Na&63,_a>65535&&_a<1114112&&(sa=_a))}}sa===null?(sa=65533,Ra=1):sa>65535&&(sa-=65536,Wi.push(sa>>>10&1023|55296),sa=56320|sa&1023),Wi.push(sa),ra+=Ra}return ia(Wi)}const ea=4096;function ia(Gi){const Li=Gi.length;if(Li<=ea)return String.fromCharCode.apply(String,Gi);let $i="",Wi=0;for(;Wi<Li;)$i+=String.fromCharCode.apply(String,Gi.slice(Wi,Wi+=ea));return $i}function Zi(Gi,Li,$i){let Wi="";$i=Math.min(Gi.length,$i);for(let ra=Li;ra<$i;++ra)Wi+=String.fromCharCode(Gi[ra]&127);return Wi}function Ji(Gi,Li,$i){let Wi="";$i=Math.min(Gi.length,$i);for(let ra=Li;ra<$i;++ra)Wi+=String.fromCharCode(Gi[ra]);return Wi}function ua(Gi,Li,$i){const Wi=Gi.length;(!Li||Li<0)&&(Li=0),(!$i||$i<0||$i>Wi)&&($i=Wi);let ra="";for(let aa=Li;aa<$i;++aa)ra+=Da[Gi[aa]];return ra}function Xi(Gi,Li,$i){const Wi=Gi.slice(Li,$i);let ra="";for(let aa=0;aa<Wi.length-1;aa+=2)ra+=String.fromCharCode(Wi[aa]+Wi[aa+1]*256);return ra}bi.prototype.slice=function(Li,$i){const Wi=this.length;Li=~~Li,$i=$i===void 0?Wi:~~$i,Li<0?(Li+=Wi,Li<0&&(Li=0)):Li>Wi&&(Li=Wi),$i<0?($i+=Wi,$i<0&&($i=0)):$i>Wi&&($i=Wi),$i<Li&&($i=Li);const ra=this.subarray(Li,$i);return Object.setPrototypeOf(ra,bi.prototype),ra};function na(Gi,Li,$i){if(Gi%1!==0||Gi<0)throw new RangeError("offset is not uint");if(Gi+Li>$i)throw new RangeError("Trying to access beyond buffer length")}bi.prototype.readUintLE=bi.prototype.readUIntLE=function(Li,$i,Wi){Li=Li>>>0,$i=$i>>>0,Wi||na(Li,$i,this.length);let ra=this[Li],aa=1,sa=0;for(;++sa<$i&&(aa*=256);)ra+=this[Li+sa]*aa;return ra},bi.prototype.readUintBE=bi.prototype.readUIntBE=function(Li,$i,Wi){Li=Li>>>0,$i=$i>>>0,Wi||na(Li,$i,this.length);let ra=this[Li+--$i],aa=1;for(;$i>0&&(aa*=256);)ra+=this[Li+--$i]*aa;return ra},bi.prototype.readUint8=bi.prototype.readUInt8=function(Li,$i){return Li=Li>>>0,$i||na(Li,1,this.length),this[Li]},bi.prototype.readUint16LE=bi.prototype.readUInt16LE=function(Li,$i){return Li=Li>>>0,$i||na(Li,2,this.length),this[Li]|this[Li+1]<<8},bi.prototype.readUint16BE=bi.prototype.readUInt16BE=function(Li,$i){return Li=Li>>>0,$i||na(Li,2,this.length),this[Li]<<8|this[Li+1]},bi.prototype.readUint32LE=bi.prototype.readUInt32LE=function(Li,$i){return Li=Li>>>0,$i||na(Li,4,this.length),(this[Li]|this[Li+1]<<8|this[Li+2]<<16)+this[Li+3]*16777216},bi.prototype.readUint32BE=bi.prototype.readUInt32BE=function(Li,$i){return Li=Li>>>0,$i||na(Li,4,this.length),this[Li]*16777216+(this[Li+1]<<16|this[Li+2]<<8|this[Li+3])},bi.prototype.readBigUInt64LE=La(function(Li){Li=Li>>>0,Ca(Li,"offset");const $i=this[Li],Wi=this[Li+7];($i===void 0||Wi===void 0)&&wa(Li,this.length-8);const ra=$i+this[++Li]*2**8+this[++Li]*2**16+this[++Li]*2**24,aa=this[++Li]+this[++Li]*2**8+this[++Li]*2**16+Wi*2**24;return BigInt(ra)+(BigInt(aa)<<BigInt(32))}),bi.prototype.readBigUInt64BE=La(function(Li){Li=Li>>>0,Ca(Li,"offset");const $i=this[Li],Wi=this[Li+7];($i===void 0||Wi===void 0)&&wa(Li,this.length-8);const ra=$i*2**24+this[++Li]*2**16+this[++Li]*2**8+this[++Li],aa=this[++Li]*2**24+this[++Li]*2**16+this[++Li]*2**8+Wi;return(BigInt(ra)<<BigInt(32))+BigInt(aa)}),bi.prototype.readIntLE=function(Li,$i,Wi){Li=Li>>>0,$i=$i>>>0,Wi||na(Li,$i,this.length);let ra=this[Li],aa=1,sa=0;for(;++sa<$i&&(aa*=256);)ra+=this[Li+sa]*aa;return aa*=128,ra>=aa&&(ra-=Math.pow(2,8*$i)),ra},bi.prototype.readIntBE=function(Li,$i,Wi){Li=Li>>>0,$i=$i>>>0,Wi||na(Li,$i,this.length);let ra=$i,aa=1,sa=this[Li+--ra];for(;ra>0&&(aa*=256);)sa+=this[Li+--ra]*aa;return aa*=128,sa>=aa&&(sa-=Math.pow(2,8*$i)),sa},bi.prototype.readInt8=function(Li,$i){return Li=Li>>>0,$i||na(Li,1,this.length),this[Li]&128?(255-this[Li]+1)*-1:this[Li]},bi.prototype.readInt16LE=function(Li,$i){Li=Li>>>0,$i||na(Li,2,this.length);const Wi=this[Li]|this[Li+1]<<8;return Wi&32768?Wi|4294901760:Wi},bi.prototype.readInt16BE=function(Li,$i){Li=Li>>>0,$i||na(Li,2,this.length);const Wi=this[Li+1]|this[Li]<<8;return Wi&32768?Wi|4294901760:Wi},bi.prototype.readInt32LE=function(Li,$i){return Li=Li>>>0,$i||na(Li,4,this.length),this[Li]|this[Li+1]<<8|this[Li+2]<<16|this[Li+3]<<24},bi.prototype.readInt32BE=function(Li,$i){return Li=Li>>>0,$i||na(Li,4,this.length),this[Li]<<24|this[Li+1]<<16|this[Li+2]<<8|this[Li+3]},bi.prototype.readBigInt64LE=La(function(Li){Li=Li>>>0,Ca(Li,"offset");const $i=this[Li],Wi=this[Li+7];($i===void 0||Wi===void 0)&&wa(Li,this.length-8);const ra=this[Li+4]+this[Li+5]*2**8+this[Li+6]*2**16+(Wi<<24);return(BigInt(ra)<<BigInt(32))+BigInt($i+this[++Li]*2**8+this[++Li]*2**16+this[++Li]*2**24)}),bi.prototype.readBigInt64BE=La(function(Li){Li=Li>>>0,Ca(Li,"offset");const $i=this[Li],Wi=this[Li+7];($i===void 0||Wi===void 0)&&wa(Li,this.length-8);const ra=($i<<24)+this[++Li]*2**16+this[++Li]*2**8+this[++Li];return(BigInt(ra)<<BigInt(32))+BigInt(this[++Li]*2**24+this[++Li]*2**16+this[++Li]*2**8+Wi)}),bi.prototype.readFloatLE=function(Li,$i){return Li=Li>>>0,$i||na(Li,4,this.length),Si.read(this,Li,!0,23,4)},bi.prototype.readFloatBE=function(Li,$i){return Li=Li>>>0,$i||na(Li,4,this.length),Si.read(this,Li,!1,23,4)},bi.prototype.readDoubleLE=function(Li,$i){return Li=Li>>>0,$i||na(Li,8,this.length),Si.read(this,Li,!0,52,8)},bi.prototype.readDoubleBE=function(Li,$i){return Li=Li>>>0,$i||na(Li,8,this.length),Si.read(this,Li,!1,52,8)};function ta(Gi,Li,$i,Wi,ra,aa){if(!bi.isBuffer(Gi))throw new TypeError('"buffer" argument must be a Buffer instance');if(Li>ra||Li<aa)throw new RangeError('"value" argument is out of bounds');if($i+Wi>Gi.length)throw new RangeError("Index out of range")}bi.prototype.writeUintLE=bi.prototype.writeUIntLE=function(Li,$i,Wi,ra){if(Li=+Li,$i=$i>>>0,Wi=Wi>>>0,!ra){const Ra=Math.pow(2,8*Wi)-1;ta(this,Li,$i,Wi,Ra,0)}let aa=1,sa=0;for(this[$i]=Li&255;++sa<Wi&&(aa*=256);)this[$i+sa]=Li/aa&255;return $i+Wi},bi.prototype.writeUintBE=bi.prototype.writeUIntBE=function(Li,$i,Wi,ra){if(Li=+Li,$i=$i>>>0,Wi=Wi>>>0,!ra){const Ra=Math.pow(2,8*Wi)-1;ta(this,Li,$i,Wi,Ra,0)}let aa=Wi-1,sa=1;for(this[$i+aa]=Li&255;--aa>=0&&(sa*=256);)this[$i+aa]=Li/sa&255;return $i+Wi},bi.prototype.writeUint8=bi.prototype.writeUInt8=function(Li,$i,Wi){return Li=+Li,$i=$i>>>0,Wi||ta(this,Li,$i,1,255,0),this[$i]=Li&255,$i+1},bi.prototype.writeUint16LE=bi.prototype.writeUInt16LE=function(Li,$i,Wi){return Li=+Li,$i=$i>>>0,Wi||ta(this,Li,$i,2,65535,0),this[$i]=Li&255,this[$i+1]=Li>>>8,$i+2},bi.prototype.writeUint16BE=bi.prototype.writeUInt16BE=function(Li,$i,Wi){return Li=+Li,$i=$i>>>0,Wi||ta(this,Li,$i,2,65535,0),this[$i]=Li>>>8,this[$i+1]=Li&255,$i+2},bi.prototype.writeUint32LE=bi.prototype.writeUInt32LE=function(Li,$i,Wi){return Li=+Li,$i=$i>>>0,Wi||ta(this,Li,$i,4,4294967295,0),this[$i+3]=Li>>>24,this[$i+2]=Li>>>16,this[$i+1]=Li>>>8,this[$i]=Li&255,$i+4},bi.prototype.writeUint32BE=bi.prototype.writeUInt32BE=function(Li,$i,Wi){return Li=+Li,$i=$i>>>0,Wi||ta(this,Li,$i,4,4294967295,0),this[$i]=Li>>>24,this[$i+1]=Li>>>16,this[$i+2]=Li>>>8,this[$i+3]=Li&255,$i+4};function oa(Gi,Li,$i,Wi,ra){va(Li,Wi,ra,Gi,$i,7);let aa=Number(Li&BigInt(4294967295));Gi[$i++]=aa,aa=aa>>8,Gi[$i++]=aa,aa=aa>>8,Gi[$i++]=aa,aa=aa>>8,Gi[$i++]=aa;let sa=Number(Li>>BigInt(32)&BigInt(4294967295));return Gi[$i++]=sa,sa=sa>>8,Gi[$i++]=sa,sa=sa>>8,Gi[$i++]=sa,sa=sa>>8,Gi[$i++]=sa,$i}function fa(Gi,Li,$i,Wi,ra){va(Li,Wi,ra,Gi,$i,7);let aa=Number(Li&BigInt(4294967295));Gi[$i+7]=aa,aa=aa>>8,Gi[$i+6]=aa,aa=aa>>8,Gi[$i+5]=aa,aa=aa>>8,Gi[$i+4]=aa;let sa=Number(Li>>BigInt(32)&BigInt(4294967295));return Gi[$i+3]=sa,sa=sa>>8,Gi[$i+2]=sa,sa=sa>>8,Gi[$i+1]=sa,sa=sa>>8,Gi[$i]=sa,$i+8}bi.prototype.writeBigUInt64LE=La(function(Li,$i=0){return oa(this,Li,$i,BigInt(0),BigInt("0xffffffffffffffff"))}),bi.prototype.writeBigUInt64BE=La(function(Li,$i=0){return fa(this,Li,$i,BigInt(0),BigInt("0xffffffffffffffff"))}),bi.prototype.writeIntLE=function(Li,$i,Wi,ra){if(Li=+Li,$i=$i>>>0,!ra){const xa=Math.pow(2,8*Wi-1);ta(this,Li,$i,Wi,xa-1,-xa)}let aa=0,sa=1,Ra=0;for(this[$i]=Li&255;++aa<Wi&&(sa*=256);)Li<0&&Ra===0&&this[$i+aa-1]!==0&&(Ra=1),this[$i+aa]=(Li/sa>>0)-Ra&255;return $i+Wi},bi.prototype.writeIntBE=function(Li,$i,Wi,ra){if(Li=+Li,$i=$i>>>0,!ra){const xa=Math.pow(2,8*Wi-1);ta(this,Li,$i,Wi,xa-1,-xa)}let aa=Wi-1,sa=1,Ra=0;for(this[$i+aa]=Li&255;--aa>=0&&(sa*=256);)Li<0&&Ra===0&&this[$i+aa+1]!==0&&(Ra=1),this[$i+aa]=(Li/sa>>0)-Ra&255;return $i+Wi},bi.prototype.writeInt8=function(Li,$i,Wi){return Li=+Li,$i=$i>>>0,Wi||ta(this,Li,$i,1,127,-128),Li<0&&(Li=255+Li+1),this[$i]=Li&255,$i+1},bi.prototype.writeInt16LE=function(Li,$i,Wi){return Li=+Li,$i=$i>>>0,Wi||ta(this,Li,$i,2,32767,-32768),this[$i]=Li&255,this[$i+1]=Li>>>8,$i+2},bi.prototype.writeInt16BE=function(Li,$i,Wi){return Li=+Li,$i=$i>>>0,Wi||ta(this,Li,$i,2,32767,-32768),this[$i]=Li>>>8,this[$i+1]=Li&255,$i+2},bi.prototype.writeInt32LE=function(Li,$i,Wi){return Li=+Li,$i=$i>>>0,Wi||ta(this,Li,$i,4,2147483647,-2147483648),this[$i]=Li&255,this[$i+1]=Li>>>8,this[$i+2]=Li>>>16,this[$i+3]=Li>>>24,$i+4},bi.prototype.writeInt32BE=function(Li,$i,Wi){return Li=+Li,$i=$i>>>0,Wi||ta(this,Li,$i,4,2147483647,-2147483648),Li<0&&(Li=4294967295+Li+1),this[$i]=Li>>>24,this[$i+1]=Li>>>16,this[$i+2]=Li>>>8,this[$i+3]=Li&255,$i+4},bi.prototype.writeBigInt64LE=La(function(Li,$i=0){return oa(this,Li,$i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),bi.prototype.writeBigInt64BE=La(function(Li,$i=0){return fa(this,Li,$i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ca(Gi,Li,$i,Wi,ra,aa){if($i+Wi>Gi.length)throw new RangeError("Index out of range");if($i<0)throw new RangeError("Index out of range")}function la(Gi,Li,$i,Wi,ra){return Li=+Li,$i=$i>>>0,ra||ca(Gi,Li,$i,4),Si.write(Gi,Li,$i,Wi,23,4),$i+4}bi.prototype.writeFloatLE=function(Li,$i,Wi){return la(this,Li,$i,!0,Wi)},bi.prototype.writeFloatBE=function(Li,$i,Wi){return la(this,Li,$i,!1,Wi)};function ga(Gi,Li,$i,Wi,ra){return Li=+Li,$i=$i>>>0,ra||ca(Gi,Li,$i,8),Si.write(Gi,Li,$i,Wi,52,8),$i+8}bi.prototype.writeDoubleLE=function(Li,$i,Wi){return ga(this,Li,$i,!0,Wi)},bi.prototype.writeDoubleBE=function(Li,$i,Wi){return ga(this,Li,$i,!1,Wi)},bi.prototype.copy=function(Li,$i,Wi,ra){if(!bi.isBuffer(Li))throw new TypeError("argument should be a Buffer");if(Wi||(Wi=0),!ra&&ra!==0&&(ra=this.length),$i>=Li.length&&($i=Li.length),$i||($i=0),ra>0&&ra<Wi&&(ra=Wi),ra===Wi||Li.length===0||this.length===0)return 0;if($i<0)throw new RangeError("targetStart out of bounds");if(Wi<0||Wi>=this.length)throw new RangeError("Index out of range");if(ra<0)throw new RangeError("sourceEnd out of bounds");ra>this.length&&(ra=this.length),Li.length-$i<ra-Wi&&(ra=Li.length-$i+Wi);const aa=ra-Wi;return this===Li&&typeof Ni.prototype.copyWithin=="function"?this.copyWithin($i,Wi,ra):Ni.prototype.set.call(Li,this.subarray(Wi,ra),$i),aa},bi.prototype.fill=function(Li,$i,Wi,ra){if(typeof Li=="string"){if(typeof $i=="string"?(ra=$i,$i=0,Wi=this.length):typeof Wi=="string"&&(ra=Wi,Wi=this.length),ra!==void 0&&typeof ra!="string")throw new TypeError("encoding must be a string");if(typeof ra=="string"&&!bi.isEncoding(ra))throw new TypeError("Unknown encoding: "+ra);if(Li.length===1){const sa=Li.charCodeAt(0);(ra==="utf8"&&sa<128||ra==="latin1")&&(Li=sa)}}else typeof Li=="number"?Li=Li&255:typeof Li=="boolean"&&(Li=Number(Li));if($i<0||this.length<$i||this.length<Wi)throw new RangeError("Out of range index");if(Wi<=$i)return this;$i=$i>>>0,Wi=Wi===void 0?this.length:Wi>>>0,Li||(Li=0);let aa;if(typeof Li=="number")for(aa=$i;aa<Wi;++aa)this[aa]=Li;else{const sa=bi.isBuffer(Li)?Li:bi.from(Li,ra),Ra=sa.length;if(Ra===0)throw new TypeError('The value "'+Li+'" is invalid for argument "value"');for(aa=0;aa<Wi-$i;++aa)this[aa+$i]=sa[aa%Ra]}return this};const ha={};function da(Gi,Li,$i){ha[Gi]=class extends $i{constructor(){super(),Object.defineProperty(this,"message",{value:Li.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Gi}]`,this.stack,delete this.name}get code(){return Gi}set code(ra){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ra,writable:!0})}toString(){return`${this.name} [${Gi}]: ${this.message}`}}}da("ERR_BUFFER_OUT_OF_BOUNDS",function(Gi){return Gi?`${Gi} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),da("ERR_INVALID_ARG_TYPE",function(Gi,Li){return`The "${Gi}" argument must be of type number. Received type ${typeof Li}`},TypeError),da("ERR_OUT_OF_RANGE",function(Gi,Li,$i){let Wi=`The value of "${Gi}" is out of range.`,ra=$i;return Number.isInteger($i)&&Math.abs($i)>2**32?ra=Aa(String($i)):typeof $i=="bigint"&&(ra=String($i),($i>BigInt(2)**BigInt(32)||$i<-(BigInt(2)**BigInt(32)))&&(ra=Aa(ra)),ra+="n"),Wi+=` It must be ${Li}. Received ${ra}`,Wi},RangeError);function Aa(Gi){let Li="",$i=Gi.length;const Wi=Gi[0]==="-"?1:0;for(;$i>=Wi+4;$i-=3)Li=`_${Gi.slice($i-3,$i)}${Li}`;return`${Gi.slice(0,$i)}${Li}`}function Ea(Gi,Li,$i){Ca(Li,"offset"),(Gi[Li]===void 0||Gi[Li+$i]===void 0)&&wa(Li,Gi.length-($i+1))}function va(Gi,Li,$i,Wi,ra,aa){if(Gi>$i||Gi<Li){const sa=typeof Li=="bigint"?"n":"";let Ra;throw Li===0||Li===BigInt(0)?Ra=`>= 0${sa} and < 2${sa} ** ${(aa+1)*8}${sa}`:Ra=`>= -(2${sa} ** ${(aa+1)*8-1}${sa}) and < 2 ** ${(aa+1)*8-1}${sa}`,new ha.ERR_OUT_OF_RANGE("value",Ra,Gi)}Ea(Wi,ra,aa)}function Ca(Gi,Li){if(typeof Gi!="number")throw new ha.ERR_INVALID_ARG_TYPE(Li,"number",Gi)}function wa(Gi,Li,$i){throw Math.floor(Gi)!==Gi?(Ca(Gi,$i),new ha.ERR_OUT_OF_RANGE("offset","an integer",Gi)):Li<0?new ha.ERR_BUFFER_OUT_OF_BOUNDS:new ha.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Li}`,Gi)}const ma=/[^+/0-9A-Za-z-_]/g;function ka(Gi){if(Gi=Gi.split("=")[0],Gi=Gi.trim().replace(ma,""),Gi.length<2)return"";for(;Gi.length%4!==0;)Gi=Gi+"=";return Gi}function Ta(Gi,Li){Li=Li||1/0;let $i;const Wi=Gi.length;let ra=null;const aa=[];for(let sa=0;sa<Wi;++sa){if($i=Gi.charCodeAt(sa),$i>55295&&$i<57344){if(!ra){if($i>56319){(Li-=3)>-1&&aa.push(239,191,189);continue}else if(sa+1===Wi){(Li-=3)>-1&&aa.push(239,191,189);continue}ra=$i;continue}if($i<56320){(Li-=3)>-1&&aa.push(239,191,189),ra=$i;continue}$i=(ra-55296<<10|$i-56320)+65536}else ra&&(Li-=3)>-1&&aa.push(239,191,189);if(ra=null,$i<128){if((Li-=1)<0)break;aa.push($i)}else if($i<2048){if((Li-=2)<0)break;aa.push($i>>6|192,$i&63|128)}else if($i<65536){if((Li-=3)<0)break;aa.push($i>>12|224,$i>>6&63|128,$i&63|128)}else if($i<1114112){if((Li-=4)<0)break;aa.push($i>>18|240,$i>>12&63|128,$i>>6&63|128,$i&63|128)}else throw new Error("Invalid code point")}return aa}function ya(Gi){const Li=[];for(let $i=0;$i<Gi.length;++$i)Li.push(Gi.charCodeAt($i)&255);return Li}function Pa(Gi,Li){let $i,Wi,ra;const aa=[];for(let sa=0;sa<Gi.length&&!((Li-=2)<0);++sa)$i=Gi.charCodeAt(sa),Wi=$i>>8,ra=$i%256,aa.push(ra),aa.push(Wi);return aa}function Ia(Gi){return Ri.toByteArray(ka(Gi))}function ba(Gi,Li,$i,Wi){let ra;for(ra=0;ra<Wi&&!(ra+$i>=Li.length||ra>=Gi.length);++ra)Li[ra+$i]=Gi[ra];return ra}function Ba(Gi,Li){return Gi instanceof Li||Gi!=null&&Gi.constructor!=null&&Gi.constructor.name!=null&&Gi.constructor.name===Li.name}function Fa(Gi){return Gi!==Gi}const Da=function(){const Gi="0123456789abcdef",Li=new Array(256);for(let $i=0;$i<16;++$i){const Wi=$i*16;for(let ra=0;ra<16;++ra)Li[Wi+ra]=Gi[$i]+Gi[ra]}return Li}();function La(Gi){return typeof BigInt>"u"?Oa:Gi}function Oa(){throw new Error("BigInt not supported")}})(t);const vi=t.Buffer;r.Blob=t.Blob,r.BlobOptions=t.BlobOptions,r.Buffer=t.Buffer,r.File=t.File,r.FileOptions=t.FileOptions,r.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,r.SlowBuffer=t.SlowBuffer,r.TranscodeEncoding=t.TranscodeEncoding,r.atob=t.atob,r.btoa=t.btoa,r.constants=t.constants,r.default=vi,r.isAscii=t.isAscii,r.isUtf8=t.isUtf8,r.kMaxLength=t.kMaxLength,r.kStringMaxLength=t.kStringMaxLength,r.resolveObjectURL=t.resolveObjectURL,r.transcode=t.transcode}(dist)),dist}/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var hasRequiredSafeBuffer$1;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,function(r,t){var n=requireDist(),i=n.Buffer;function s(l,v){for(var on in l)v[on]=l[on]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?r.exports=n:(s(n,t),t.Buffer=a);function a(l,v,on){return i(l,v,on)}a.prototype=Object.create(i.prototype),s(i,a),a.from=function(l,v,on){if(typeof l=="number")throw new TypeError("Argument must not be a number");return i(l,v,on)},a.alloc=function(l,v,on){if(typeof l!="number")throw new TypeError("Argument must be a number");var u=i(l);return v!==void 0?typeof on=="string"?u.fill(v,on):u.fill(v):u.fill(0),u},a.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return i(l)},a.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(l)}}(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}var readableBrowser$1={exports:{}},events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var r=typeof Reflect=="object"?Reflect:null,t=r&&typeof r.apply=="function"?r.apply:function(Ai,Ii,Ni){return Function.prototype.apply.call(Ai,Ii,Ni)},n;r&&typeof r.ownKeys=="function"?n=r.ownKeys:Object.getOwnPropertySymbols?n=function(Ai){return Object.getOwnPropertyNames(Ai).concat(Object.getOwnPropertySymbols(Ai))}:n=function(Ai){return Object.getOwnPropertyNames(Ai)};function i(Si){console&&console.warn&&console.warn(Si)}var s=Number.isNaN||function(Ai){return Ai!==Ai};function a(){a.init.call(this)}events.exports=a,events.exports.once=vi,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function v(Si){if(typeof Si!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Si)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(Si){if(typeof Si!="number"||Si<0||s(Si))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Si+".");l=Si}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(Ai){if(typeof Ai!="number"||Ai<0||s(Ai))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Ai+".");return this._maxListeners=Ai,this};function on(Si){return Si._maxListeners===void 0?a.defaultMaxListeners:Si._maxListeners}a.prototype.getMaxListeners=function(){return on(this)},a.prototype.emit=function(Ai){for(var Ii=[],Ni=1;Ni<arguments.length;Ni++)Ii.push(arguments[Ni]);var Ci=Ai==="error",Oi=this._events;if(Oi!==void 0)Ci=Ci&&Oi.error===void 0;else if(!Ci)return!1;if(Ci){var ki;if(Ii.length>0&&(ki=Ii[0]),ki instanceof Error)throw ki;var Fi=new Error("Unhandled error."+(ki?" ("+ki.message+")":""));throw Fi.context=ki,Fi}var bi=Oi[Ai];if(bi===void 0)return!1;if(typeof bi=="function")t(bi,this,Ii);else for(var Yn=bi.length,In=Ln(bi,Yn),Ni=0;Ni<Yn;++Ni)t(In[Ni],this,Ii);return!0};function u(Si,Ai,Ii,Ni){var Ci,Oi,ki;if(v(Ii),Oi=Si._events,Oi===void 0?(Oi=Si._events=Object.create(null),Si._eventsCount=0):(Oi.newListener!==void 0&&(Si.emit("newListener",Ai,Ii.listener?Ii.listener:Ii),Oi=Si._events),ki=Oi[Ai]),ki===void 0)ki=Oi[Ai]=Ii,++Si._eventsCount;else if(typeof ki=="function"?ki=Oi[Ai]=Ni?[Ii,ki]:[ki,Ii]:Ni?ki.unshift(Ii):ki.push(Ii),Ci=on(Si),Ci>0&&ki.length>Ci&&!ki.warned){ki.warned=!0;var Fi=new Error("Possible EventEmitter memory leak detected. "+ki.length+" "+String(Ai)+" listeners added. Use emitter.setMaxListeners() to increase limit");Fi.name="MaxListenersExceededWarning",Fi.emitter=Si,Fi.type=Ai,Fi.count=ki.length,i(Fi)}return Si}a.prototype.addListener=function(Ai,Ii){return u(this,Ai,Ii,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(Ai,Ii){return u(this,Ai,Ii,!0)};function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Rn(Si,Ai,Ii){var Ni={fired:!1,wrapFn:void 0,target:Si,type:Ai,listener:Ii},Ci=h.bind(Ni);return Ci.listener=Ii,Ni.wrapFn=Ci,Ci}a.prototype.once=function(Ai,Ii){return v(Ii),this.on(Ai,Rn(this,Ai,Ii)),this},a.prototype.prependOnceListener=function(Ai,Ii){return v(Ii),this.prependListener(Ai,Rn(this,Ai,Ii)),this},a.prototype.removeListener=function(Ai,Ii){var Ni,Ci,Oi,ki,Fi;if(v(Ii),Ci=this._events,Ci===void 0)return this;if(Ni=Ci[Ai],Ni===void 0)return this;if(Ni===Ii||Ni.listener===Ii)--this._eventsCount===0?this._events=Object.create(null):(delete Ci[Ai],Ci.removeListener&&this.emit("removeListener",Ai,Ni.listener||Ii));else if(typeof Ni!="function"){for(Oi=-1,ki=Ni.length-1;ki>=0;ki--)if(Ni[ki]===Ii||Ni[ki].listener===Ii){Fi=Ni[ki].listener,Oi=ki;break}if(Oi<0)return this;Oi===0?Ni.shift():jn(Ni,Oi),Ni.length===1&&(Ci[Ai]=Ni[0]),Ci.removeListener!==void 0&&this.emit("removeListener",Ai,Fi||Ii)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(Ai){var Ii,Ni,Ci;if(Ni=this._events,Ni===void 0)return this;if(Ni.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Ni[Ai]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Ni[Ai]),this;if(arguments.length===0){var Oi=Object.keys(Ni),ki;for(Ci=0;Ci<Oi.length;++Ci)ki=Oi[Ci],ki!=="removeListener"&&this.removeAllListeners(ki);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Ii=Ni[Ai],typeof Ii=="function")this.removeListener(Ai,Ii);else if(Ii!==void 0)for(Ci=Ii.length-1;Ci>=0;Ci--)this.removeListener(Ai,Ii[Ci]);return this};function D(Si,Ai,Ii){var Ni=Si._events;if(Ni===void 0)return[];var Ci=Ni[Ai];return Ci===void 0?[]:typeof Ci=="function"?Ii?[Ci.listener||Ci]:[Ci]:Ii?hi(Ci):Ln(Ci,Ci.length)}a.prototype.listeners=function(Ai){return D(this,Ai,!0)},a.prototype.rawListeners=function(Ai){return D(this,Ai,!1)},a.listenerCount=function(Si,Ai){return typeof Si.listenerCount=="function"?Si.listenerCount(Ai):Mn.call(Si,Ai)},a.prototype.listenerCount=Mn;function Mn(Si){var Ai=this._events;if(Ai!==void 0){var Ii=Ai[Si];if(typeof Ii=="function")return 1;if(Ii!==void 0)return Ii.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function Ln(Si,Ai){for(var Ii=new Array(Ai),Ni=0;Ni<Ai;++Ni)Ii[Ni]=Si[Ni];return Ii}function jn(Si,Ai){for(;Ai+1<Si.length;Ai++)Si[Ai]=Si[Ai+1];Si.pop()}function hi(Si){for(var Ai=new Array(Si.length),Ii=0;Ii<Ai.length;++Ii)Ai[Ii]=Si[Ii].listener||Si[Ii];return Ai}function vi(Si,Ai){return new Promise(function(Ii,Ni){function Ci(ki){Si.removeListener(Ai,Oi),Ni(ki)}function Oi(){typeof Si.removeListener=="function"&&Si.removeListener("error",Ci),Ii([].slice.call(arguments))}Ri(Si,Ai,Oi,{once:!0}),Ai!=="error"&&gi(Si,Ci,{once:!0})})}function gi(Si,Ai,Ii){typeof Si.on=="function"&&Ri(Si,"error",Ai,Ii)}function Ri(Si,Ai,Ii,Ni){if(typeof Si.on=="function")Ni.once?Si.once(Ai,Ii):Si.on(Ai,Ii);else if(typeof Si.addEventListener=="function")Si.addEventListener(Ai,function Ci(Oi){Ni.once&&Si.removeEventListener(Ai,Ci),Ii(Oi)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Si)}return events.exports}var streamBrowser$1,hasRequiredStreamBrowser$1;function requireStreamBrowser$1(){return hasRequiredStreamBrowser$1||(hasRequiredStreamBrowser$1=1,streamBrowser$1=requireEvents().EventEmitter),streamBrowser$1}var util$1={},types$1={},shams$3,hasRequiredShams$3;function requireShams$3(){return hasRequiredShams$3||(hasRequiredShams$3=1,shams$3=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),i=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var s=42;t[n]=s;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,n);if(l.value!==s||l.enumerable!==!0)return!1}return!0}),shams$3}var shams$2,hasRequiredShams$2;function requireShams$2(){if(hasRequiredShams$2)return shams$2;hasRequiredShams$2=1;var r=requireShams$3();return shams$2=function(){return r()&&!!Symbol.toStringTag},shams$2}var esObjectAtoms$1,hasRequiredEsObjectAtoms$1;function requireEsObjectAtoms$1(){return hasRequiredEsObjectAtoms$1||(hasRequiredEsObjectAtoms$1=1,esObjectAtoms$1=Object),esObjectAtoms$1}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range,hasRequiredRange;function requireRange(){return hasRequiredRange||(hasRequiredRange=1,range=RangeError),range}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var type,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type=TypeError),type}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var abs,hasRequiredAbs;function requireAbs(){return hasRequiredAbs||(hasRequiredAbs=1,abs=Math.abs),abs}var floor,hasRequiredFloor;function requireFloor(){return hasRequiredFloor||(hasRequiredFloor=1,floor=Math.floor),floor}var max,hasRequiredMax;function requireMax(){return hasRequiredMax||(hasRequiredMax=1,max=Math.max),max}var min,hasRequiredMin;function requireMin(){return hasRequiredMin||(hasRequiredMin=1,min=Math.min),min}var pow,hasRequiredPow;function requirePow(){return hasRequiredPow||(hasRequiredPow=1,pow=Math.pow),pow}var round,hasRequiredRound;function requireRound(){return hasRequiredRound||(hasRequiredRound=1,round=Math.round),round}var _isNaN,hasRequired_isNaN;function require_isNaN(){return hasRequired_isNaN||(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(t){return t!==t}),_isNaN}var sign$1,hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$1;hasRequiredSign$1=1;var r=require_isNaN();return sign$1=function(n){return r(n)||n===0?n:n<0?-1:1},sign$1}var gOPD,hasRequiredGOPD;function requireGOPD(){return hasRequiredGOPD||(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor),gOPD}var gopd$2,hasRequiredGopd$2;function requireGopd$2(){if(hasRequiredGopd$2)return gopd$2;hasRequiredGopd$2=1;var r=requireGOPD();if(r)try{r([],"length")}catch{r=null}return gopd$2=r,gopd$2}var esDefineProperty$1,hasRequiredEsDefineProperty$1;function requireEsDefineProperty$1(){if(hasRequiredEsDefineProperty$1)return esDefineProperty$1;hasRequiredEsDefineProperty$1=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return esDefineProperty$1=r,esDefineProperty$1}var shams$1,hasRequiredShams$1;function requireShams$1(){return hasRequiredShams$1||(hasRequiredShams$1=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),i=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var s=42;t[n]=s;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var l=Object.getOwnPropertySymbols(t);if(l.length!==1||l[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(t,n);if(v.value!==s||v.enumerable!==!0)return!1}return!0}),shams$1}var hasSymbols$1,hasRequiredHasSymbols$1;function requireHasSymbols$1(){if(hasRequiredHasSymbols$1)return hasSymbols$1;hasRequiredHasSymbols$1=1;var r=typeof Symbol<"u"&&Symbol,t=requireShams$1();return hasSymbols$1=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},hasSymbols$1}var Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf;function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf||(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Reflect_getPrototypeOf}var esObjectAtoms,hasRequiredEsObjectAtoms;function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms||(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object),esObjectAtoms}var Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireObject_getPrototypeOf(){if(hasRequiredObject_getPrototypeOf)return Object_getPrototypeOf;hasRequiredObject_getPrototypeOf=1;var r=requireEsObjectAtoms();return Object_getPrototypeOf=r.getPrototypeOf||null,Object_getPrototypeOf}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var r="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,i="[object Function]",s=function(on,u){for(var h=[],Rn=0;Rn<on.length;Rn+=1)h[Rn]=on[Rn];for(var D=0;D<u.length;D+=1)h[D+on.length]=u[D];return h},a=function(on,u){for(var h=[],Rn=u,D=0;Rn<on.length;Rn+=1,D+=1)h[D]=on[Rn];return h},l=function(v,on){for(var u="",h=0;h<v.length;h+=1)u+=v[h],h+1<v.length&&(u+=on);return u};return implementation=function(on){var u=this;if(typeof u!="function"||t.apply(u)!==i)throw new TypeError(r+u);for(var h=a(arguments,1),Rn,D=function(){if(this instanceof Rn){var vi=u.apply(this,s(h,arguments));return Object(vi)===vi?vi:this}return u.apply(on,s(h,arguments))},Mn=n(0,u.length-h.length),Ln=[],jn=0;jn<Mn;jn++)Ln[jn]="$"+jn;if(Rn=Function("binder","return function ("+l(Ln,",")+"){ return binder.apply(this,arguments); }")(D),u.protot