@helia/verified-fetch
Version:
A fetch-like API for obtaining verified & trustless IPFS content on the web
3 lines • 1.2 MB
JavaScript
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.HeliaVerifiedFetch = factory()}(typeof self !== 'undefined' ? self : this, function () {
"use strict";var HeliaVerifiedFetch=(()=>{var KF=Object.create;var _0=Object.defineProperty;var zF=Object.getOwnPropertyDescriptor;var qF=Object.getOwnPropertyNames;var jF=Object.getPrototypeOf,WF=Object.prototype.hasOwnProperty;var ut=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Ot=(r,e)=>{for(var t in e)_0(r,t,{get:e[t],enumerable:!0})},TE=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of qF(e))!WF.call(r,o)&&o!==t&&_0(r,o,{get:()=>e[o],enumerable:!(n=zF(e,o))||n.enumerable});return r};var at=(r,e,t)=>(t=r!=null?KF(jF(r)):{},TE(e||!r||!r.__esModule?_0(t,"default",{value:r,enumerable:!0}):t,r)),GF=r=>TE(_0({},"__esModule",{value:!0}),r);var nC=ut((Wue,P7)=>{"use strict";var BK=Object.prototype.hasOwnProperty,wn="~";function Ap(){}Object.create&&(Ap.prototype=Object.create(null),new Ap().__proto__||(wn=!1));function LK(r,e,t){this.fn=r,this.context=e,this.once=t||!1}function rC(r,e,t,n,o){if(typeof t!="function")throw new TypeError("The listener must be a function");var i=new LK(t,n||r,o),s=wn?wn+e:e;return r._events[s]?r._events[s].fn?r._events[s]=[r._events[s],i]:r._events[s].push(i):(r._events[s]=i,r._eventsCount++),r}function Og(r,e){--r._eventsCount===0?r._events=new Ap:delete r._events[e]}function tn(){this._events=new Ap,this._eventsCount=0}tn.prototype.eventNames=function(){var e=[],t,n;if(this._eventsCount===0)return e;for(n in t=this._events)BK.call(t,n)&&e.push(wn?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};tn.prototype.listeners=function(e){var t=wn?wn+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,s=new Array(i);o<i;o++)s[o]=n[o].fn;return s};tn.prototype.listenerCount=function(e){var t=wn?wn+e:e,n=this._events[t];return n?n.fn?1:n.length:0};tn.prototype.emit=function(e,t,n,o,i,s){var a=wn?wn+e:e;if(!this._events[a])return!1;var c=this._events[a],l=arguments.length,u,f;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,o),!0;case 5:return c.fn.call(c.context,t,n,o,i),!0;case 6:return c.fn.call(c.context,t,n,o,i,s),!0}for(f=1,u=new Array(l-1);f<l;f++)u[f-1]=arguments[f];c.fn.apply(c.context,u)}else{var h=c.length,d;for(f=0;f<h;f++)switch(c[f].once&&this.removeListener(e,c[f].fn,void 0,!0),l){case 1:c[f].fn.call(c[f].context);break;case 2:c[f].fn.call(c[f].context,t);break;case 3:c[f].fn.call(c[f].context,t,n);break;case 4:c[f].fn.call(c[f].context,t,n,o);break;default:if(!u)for(d=1,u=new Array(l-1);d<l;d++)u[d-1]=arguments[d];c[f].fn.apply(c[f].context,u)}}return!0};tn.prototype.on=function(e,t,n){return rC(this,e,t,n,!1)};tn.prototype.once=function(e,t,n){return rC(this,e,t,n,!0)};tn.prototype.removeListener=function(e,t,n,o){var i=wn?wn+e:e;if(!this._events[i])return this;if(!t)return Og(this,i),this;var s=this._events[i];if(s.fn)s.fn===t&&(!o||s.once)&&(!n||s.context===n)&&Og(this,i);else{for(var a=0,c=[],l=s.length;a<l;a++)(s[a].fn!==t||o&&!s[a].once||n&&s[a].context!==n)&&c.push(s[a]);c.length?this._events[i]=c.length===1?c[0]:c:Og(this,i)}return this};tn.prototype.removeAllListeners=function(e){var t;return e?(t=wn?wn+e:e,this._events[t]&&Og(this,t)):(this._events=new Ap,this._eventsCount=0),this};tn.prototype.off=tn.prototype.removeListener;tn.prototype.addListener=tn.prototype.on;tn.prefixed=wn;tn.EventEmitter=tn;typeof P7<"u"&&(P7.exports=tn)});var cC=ut((gfe,aC)=>{aC.exports=function(r){if(!r)throw Error("hashlru must have a max value, of type number, greater than 0");var e=0,t=Object.create(null),n=Object.create(null);function o(i,s){t[i]=s,e++,e>=r&&(e=0,n=t,t=Object.create(null))}return{has:function(i){return t[i]!==void 0||n[i]!==void 0},remove:function(i){t[i]!==void 0&&(t[i]=void 0),n[i]!==void 0&&(n[i]=void 0)},get:function(i){var s=t[i];if(s!==void 0)return s;if((s=n[i])!==void 0)return o(i,s),s},set:function(i,s){t[i]!==void 0?t[i]=s:o(i,s)},clear:function(){t=Object.create(null),n=Object.create(null)}}}});var pT=ut(qp=>{(function(){var r,e,t,n,o,i,s,a;a=function(c){var l,u,f,h;return l=(c&255<<24)>>>24,u=(c&255<<16)>>>16,f=(c&65280)>>>8,h=c&255,[l,u,f,h].join(".")},s=function(c){var l,u,f,h,d,m;for(l=[],f=h=0;h<=3&&c.length!==0;f=++h){if(f>0){if(c[0]!==".")throw new Error("Invalid IP");c=c.substring(1)}m=e(c),d=m[0],u=m[1],c=c.substring(u),l.push(d)}if(c.length!==0)throw new Error("Invalid IP");switch(l.length){case 1:if(l[0]>4294967295)throw new Error("Invalid IP");return l[0]>>>0;case 2:if(l[0]>255||l[1]>16777215)throw new Error("Invalid IP");return(l[0]<<24|l[1])>>>0;case 3:if(l[0]>255||l[1]>255||l[2]>65535)throw new Error("Invalid IP");return(l[0]<<24|l[1]<<16|l[2])>>>0;case 4:if(l[0]>255||l[1]>255||l[2]>255||l[3]>255)throw new Error("Invalid IP");return(l[0]<<24|l[1]<<16|l[2]<<8|l[3])>>>0;default:throw new Error("Invalid IP")}},t=function(c){return c.charCodeAt(0)},n=t("0"),i=t("a"),o=t("A"),e=function(c){var l,u,f,h,d;for(h=0,l=10,u="9",f=0,c.length>1&&c[f]==="0"&&(c[f+1]==="x"||c[f+1]==="X"?(f+=2,l=16):"0"<=c[f+1]&&c[f+1]<="9"&&(f++,l=8,u="7")),d=f;f<c.length;){if("0"<=c[f]&&c[f]<=u)h=h*l+(t(c[f])-n)>>>0;else if(l===16)if("a"<=c[f]&&c[f]<="f")h=h*l+(10+t(c[f])-i)>>>0;else if("A"<=c[f]&&c[f]<="F")h=h*l+(10+t(c[f])-o)>>>0;else break;else break;if(h>4294967295)throw new Error("too large");f++}if(f===d)throw new Error("empty octet");return[h,f]},r=function(){function c(l,u){var f,h,d,m;if(typeof l!="string")throw new Error("Missing `net' parameter");if(u||(m=l.split("/",2),l=m[0],u=m[1]),u||(u=32),typeof u=="string"&&u.indexOf(".")>-1){try{this.maskLong=s(u)}catch(g){throw f=g,new Error("Invalid mask: "+u)}for(h=d=32;d>=0;h=--d)if(this.maskLong===4294967295<<32-h>>>0){this.bitmask=h;break}}else if(u||u===0)this.bitmask=parseInt(u,10),this.maskLong=0,this.bitmask>0&&(this.maskLong=4294967295<<32-this.bitmask>>>0);else throw new Error("Invalid mask: empty");try{this.netLong=(s(l)&this.maskLong)>>>0}catch(g){throw f=g,new Error("Invalid net address: "+l)}if(!(this.bitmask<=32))throw new Error("Invalid mask for ip4: "+u);this.size=Math.pow(2,32-this.bitmask),this.base=a(this.netLong),this.mask=a(this.maskLong),this.hostmask=a(~this.maskLong),this.first=this.bitmask<=30?a(this.netLong+1):this.base,this.last=this.bitmask<=30?a(this.netLong+this.size-2):a(this.netLong+this.size-1),this.broadcast=this.bitmask<=30?a(this.netLong+this.size-1):void 0}return c.prototype.contains=function(l){return typeof l=="string"&&(l.indexOf("/")>0||l.split(".").length!==4)&&(l=new c(l)),l instanceof c?this.contains(l.base)&&this.contains(l.broadcast||l.last):(s(l)&this.maskLong)>>>0===(this.netLong&this.maskLong)>>>0},c.prototype.next=function(l){return l==null&&(l=1),new c(a(this.netLong+this.size*l),this.mask)},c.prototype.forEach=function(l){var u,f,h;for(h=s(this.first),f=s(this.last),u=0;h<=f;)l(a(h),h,u),u++,h++},c.prototype.toString=function(){return this.base+"/"+this.bitmask},c}(),qp.ip2long=s,qp.long2ip=a,qp.Netmask=r}).call(qp)});var Q2=ut((G0e,Fx)=>{var W0e=function(){typeof Fx<"u"&&(Fx.exports=g);var r=86400,e=3200,t=146097*e/400,n=r*t,o=1e3*n,i=864e13,s=4294967296,a=1e6,c="000000000",l=Math.trunc||function(P){var E=P-P%1;return E==0&&(P<0||P===0&&1/P!=1/0)?-0:E},u=g.prototype,f=(g.fromDate=function(P){return new g(+P)},g.fromInt64BE=S(0,1,2,3,0,4),g.fromInt64LE=S(3,2,1,0,4,0),g.fromString=function(C){var E,D=new g,C=(C+="").replace(/^\s*[+\-]?\d+/,function(T){var T=+T,V=1970+(T-1970)%400;return D.year=T-V,V}).replace(/(?:Z|([+\-]\d{2}):?(\d{2}))$/,function(R,T,V){return T<0&&(V*=-1),E=6e4*(60*+T+ +V),""}).replace(/\.\d+$/,function(R){return D.nano=+(R+c).substr(1,9),""}).split(/\D+/);if(1<C.length?C[1]--:C[1]=0,D.time=E=Date.UTC.apply(Date,C)-(E||0),isNaN(E))throw new TypeError("Invalid Date");return w(D)},g.fromTimeT=function(P){return v(P,0)},u.year=0,u.time=0,u.nano=0,u.addNano=function(P){return this.nano+=+P||0,this},u.getNano=function(){var P=w(this);return(P.time%1e3*a+ +P.nano+1e9)%1e9},u.getTimeT=function(){var E=w(this),P=Math.floor(E.time/1e3),E=E.year;return E&&(P+=E*t*r/e),P},u.getYear=function(){return this.toDate().getUTCFullYear()+this.year},u.toDate=function(){return x(w(this).time)},u.toJSON=function(){return this.toString().replace(/0{1,6}Z$/,"Z")},u.toString=function(P){var E=this,D=E.toDate(),C={H:function(){return U(D.getUTCHours())},L:function(){return k(D.getUTCMilliseconds(),3)},M:function(){return U(D.getUTCMinutes())},N:function(){return k(E.getNano(),9)},S:function(){return U(D.getUTCSeconds())},Y:function(){var R=E.getYear();return 999999<R?"+"+R:9999<R?"+"+k(R,6):0<=R?k(R,4):-999999<=R?"-"+k(-R,6):R},a:function(){return d[D.getUTCDay()]},b:function(){return h[D.getUTCMonth()]},d:function(){return U(D.getUTCDate())},e:function(){return function(R){return(9<R?"":" ")+(0|R)}(D.getUTCDate())},m:function(){return U(D.getUTCMonth()+1)}};return function R(T){return T.replace(/%./g,function(V){var $=V[1],F=m[$],$=C[$];return F?R(F):$?$():V})}(P||f)},u.writeInt64BE=A(0,1,2,3,0,4),u.writeInt64LE=A(3,2,1,0,4,0),"%Y-%m-%dT%H:%M:%S.%NZ"),h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],d=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],m={"%":"%",F:"%Y-%m-%d",n:`
`,R:"%H:%M",T:"%H:%M:%S",t:" ",X:"%T",Z:"GMT",z:"+0000"};return g;function g(P,E,D){var C=this;if(!(C instanceof g))return new g(P,E,D);C.time=+P||0,C.nano=+E||0,C.year=+D||0,w(C)}function w(P){var E,D,C,R=P.year,T=P.time,V=P.nano,F=((V<0||a<=V)&&(V-=(D=Math.floor(V/a))*a,T+=D,D=1),R%e);return(T<-i||i<T||F)&&((E=l(T/o))&&(R+=E*e,T-=E*o),(C=x(T)).setUTCFullYear(F+C.getUTCFullYear()),C=(T=+C)+(E=l((R-=F)/e))*o,E&&-i<=C&&C<=i&&(R-=E*e,T=C),D=1),D&&(P.year=R,P.time=T,P.nano=V),P}function x(P){var E=new Date(0);return E.setTime(P),E}function v(R,C){R=+R||0;var D=l((C=(C|0)*s)/n)+l(R/n),C=C%n+R%n,R=l(C/n);return R&&(D+=R,C-=R*n),new g(1e3*C,0,D*e)}function A(P,E,D,C,R,T){return function(F,$){var Q=w(this);F=F||new Array(8),_(F,$|=0);var X=Math.floor(Q.time/1e3),Q=Q.year*(t*r/e),Y=l(Q/s)+l(X/s),Q=Q%s+X%s,X=Math.floor(Q/s);return X&&(Y+=X,Q-=X*s),V(F,$+R,Y),V(F,$+T,Q),F};function V(F,$,Y){F[$+P]=Y>>24&255,F[$+E]=Y>>16&255,F[$+D]=Y>>8&255,F[$+C]=255&Y}}function S(P,E,D,C,R,T){return function(F,$){_(F,$|=0);var Y=V(F,$+R);return v(V(F,$+T),Y)};function V(F,$){return 16777216*F[$+P]+(F[$+E]<<16|F[$+D]<<8|F[$+C])}}function _(P,E){if(P=P&&P.length,P==null)throw new TypeError("Invalid Buffer");if(P<E+8)throw new RangeError("Out of range")}function U(P){return(9<P?"":"0")+(0|P)}function k(P,E){return(c+(0|P)).substr(-E)}}()});var ek=ut((g3e,JT)=>{"use strict";function tW(r){return r>=55296&&r<=56319}function rW(r){return r>=56320&&r<=57343}JT.exports=function(e,t,n){if(typeof t!="string")throw new Error("Input must be string");for(var o=t.length,i=0,s,a,c=0;c<o;c+=1){if(s=t.charCodeAt(c),a=t[c],tW(s)&&rW(t.charCodeAt(c+1))&&(c+=1,a+=t[c]),i+=e(a),i===n)return t.slice(0,c+1);if(i>n)return t.slice(0,c-a.length+1)}return t}});var rk=ut((y3e,tk)=>{"use strict";function nW(r){return r>=55296&&r<=56319}function oW(r){return r>=56320&&r<=57343}tk.exports=function(e){if(typeof e!="string")throw new Error("Input must be string");for(var t=e.length,n=0,o=null,i=null,s=0;s<t;s++)o=e.charCodeAt(s),oW(o)?i!=null&&nW(i)?n+=1:n+=3:o<=127?n+=1:o>=128&&o<=2047?n+=2:o>=2048&&o<=65535&&(n+=3),i=o;return n}});var ok=ut((w3e,nk)=>{"use strict";var iW=ek(),sW=rk();nk.exports=iW.bind(null,sW)});var ak=ut((x3e,sk)=>{"use strict";var aW=ok(),cW=/[\/\?<>\\:\*\|"]/g,lW=/[\x00-\x1f\x80-\x9f]/g,uW=/^\.+$/,fW=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,dW=/[\. ]+$/;function ik(r,e){if(typeof r!="string")throw new Error("Input must be string");var t=r.replace(cW,e).replace(lW,e).replace(uW,e).replace(fW,e).replace(dW,e);return aW(t,255)}sk.exports=function(r,e){var t=e&&e.replacement||"",n=ik(r,t);return t===""?n:ik(n,"")}});var qs=ut(od=>{"use strict";var pW="[object ArrayBuffer]",zs=class r{static isArrayBuffer(e){return Object.prototype.toString.call(e)===pW}static toArrayBuffer(e){return this.isArrayBuffer(e)?e:e.byteLength===e.buffer.byteLength||e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:this.toUint8Array(e.buffer).slice(e.byteOffset,e.byteOffset+e.byteLength).buffer}static toUint8Array(e){return this.toView(e,Uint8Array)}static toView(e,t){if(e.constructor===t)return e;if(this.isArrayBuffer(e))return new t(e);if(this.isArrayBufferView(e))return new t(e.buffer,e.byteOffset,e.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(e){return this.isArrayBufferView(e)||this.isArrayBuffer(e)}static isArrayBufferView(e){return ArrayBuffer.isView(e)||e&&this.isArrayBuffer(e.buffer)}static isEqual(e,t){let n=r.toUint8Array(e),o=r.toUint8Array(t);if(n.length!==o.byteLength)return!1;for(let i=0;i<n.length;i++)if(n[i]!==o[i])return!1;return!0}static concat(...e){let t;Array.isArray(e[0])&&!(e[1]instanceof Function)||Array.isArray(e[0])&&e[1]instanceof Function?t=e[0]:e[e.length-1]instanceof Function?t=e.slice(0,e.length-1):t=e;let n=0;for(let s of t)n+=s.byteLength;let o=new Uint8Array(n),i=0;for(let s of t){let a=this.toUint8Array(s);o.set(a,i),i+=a.length}return e[e.length-1]instanceof Function?this.toView(o,e[e.length-1]):o.buffer}},Qx="string",mW=/^[0-9a-f\s]+$/i,gW=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,yW=/^[a-zA-Z0-9-_]+$/,gy=class{static fromString(e){let t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n.buffer}static toString(e){let t=zs.toUint8Array(e),n="";for(let i=0;i<t.length;i++)n+=String.fromCharCode(t[i]);return decodeURIComponent(escape(n))}},Po=class{static toString(e,t=!1){let n=zs.toArrayBuffer(e),o=new DataView(n),i="";for(let s=0;s<n.byteLength;s+=2){let a=o.getUint16(s,t);i+=String.fromCharCode(a)}return i}static fromString(e,t=!1){let n=new ArrayBuffer(e.length*2),o=new DataView(n);for(let i=0;i<e.length;i++)o.setUint16(i*2,e.charCodeAt(i),t);return n}},yy=class r{static isHex(e){return typeof e===Qx&&mW.test(e)}static isBase64(e){return typeof e===Qx&&gW.test(e)}static isBase64Url(e){return typeof e===Qx&&yW.test(e)}static ToString(e,t="utf8"){let n=zs.toUint8Array(e);switch(t.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);case"utf16le":return Po.toString(n,!0);case"utf16":case"utf16be":return Po.toString(n);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromString(e,t="utf8"){if(!e)return new ArrayBuffer(0);switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);case"utf16le":return Po.fromString(e,!0);case"utf16":case"utf16be":return Po.fromString(e);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToBase64(e){let t=zs.toUint8Array(e);if(typeof btoa<"u"){let n=this.ToString(t,"binary");return btoa(n)}else return Buffer.from(t).toString("base64")}static FromBase64(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!r.isBase64(t))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return typeof atob<"u"?this.FromBinary(atob(t)):new Uint8Array(Buffer.from(t,"base64")).buffer}static FromBase64Url(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!r.isBase64Url(t))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(t.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(e,t=r.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.FromBinary(e);case"utf8":return gy.fromString(e);case"utf16":case"utf16be":return Po.fromString(e);case"utf16le":case"usc2":return Po.fromString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToUtf8String(e,t=r.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.ToBinary(e);case"utf8":return gy.toString(e);case"utf16":case"utf16be":return Po.toString(e);case"utf16le":case"usc2":return Po.toString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromBinary(e){let t=e.length,n=new Uint8Array(t);for(let o=0;o<t;o++)n[o]=e.charCodeAt(o);return n.buffer}static ToBinary(e){let t=zs.toUint8Array(e),n="";for(let o=0;o<t.length;o++)n+=String.fromCharCode(t[o]);return n}static ToHex(e){let t=zs.toUint8Array(e),n="",o=t.length;for(let i=0;i<o;i++){let s=t[i];s<16&&(n+="0"),n+=s.toString(16)}return n}static FromHex(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!r.isHex(t))throw new TypeError("Argument 'hexString' is not HEX encoded");t.length%2&&(t=`0${t}`);let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o=o+2){let i=t.slice(o,o+2);n[o/2]=parseInt(i,16)}return n.buffer}static ToUtf16String(e,t=!1){return Po.toString(e,t)}static FromUtf16String(e,t=!1){return Po.fromString(e,t)}static Base64Padding(e){let t=4-e.length%4;if(t<4)for(let n=0;n<t;n++)e+="=";return e}static formatString(e){return e?.replace(/[\n\r\t ]/g,"")||""}};yy.DEFAULT_UTF8_ENCODING="utf8";function wW(r,...e){let t=arguments[0];for(let n=1;n<arguments.length;n++){let o=arguments[n];for(let i in o)t[i]=o[i]}return t}function xW(...r){let e=r.map(o=>o.byteLength).reduce((o,i)=>o+i),t=new Uint8Array(e),n=0;return r.map(o=>new Uint8Array(o)).forEach(o=>{for(let i of o)t[n++]=i}),t.buffer}function bW(r,e){if(!(r&&e)||r.byteLength!==e.byteLength)return!1;let t=new Uint8Array(r),n=new Uint8Array(e);for(let o=0;o<r.byteLength;o++)if(t[o]!==n[o])return!1;return!0}od.BufferSourceConverter=zs;od.Convert=yy;od.assign=wW;od.combine=xW;od.isEqual=bW});var RP=ut((v5e,PP)=>{function Oo(r,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(r)),this._timeouts=r,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}PP.exports=Oo;Oo.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};Oo.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};Oo.prototype.retry=function(r){if(this._timeout&&clearTimeout(this._timeout),!r)return!1;var e=new Date().getTime();if(r&&e-this._operationStart>=this._maxRetryTime)return this._errors.push(r),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(r);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var n=this;return this._timer=setTimeout(function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout(function(){n._operationTimeoutCb(n._attempts)},n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)},t),this._options.unref&&this._timer.unref(),!0};Oo.prototype.attempt=function(r,e){this._fn=r,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};Oo.prototype.try=function(r){console.log("Using RetryOperation.try() is deprecated"),this.attempt(r)};Oo.prototype.start=function(r){console.log("Using RetryOperation.start() is deprecated"),this.attempt(r)};Oo.prototype.start=Oo.prototype.try;Oo.prototype.errors=function(){return this._errors};Oo.prototype.attempts=function(){return this._attempts};Oo.prototype.mainError=function(){if(this._errors.length===0)return null;for(var r={},e=null,t=0,n=0;n<this._errors.length;n++){var o=this._errors[n],i=o.message,s=(r[i]||0)+1;r[i]=s,s>=t&&(e=o,t=s)}return e}});var DP=ut(Vl=>{var RG=RP();Vl.operation=function(r){var e=Vl.timeouts(r);return new RG(e,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})};Vl.timeouts=function(r){if(r instanceof Array)return[].concat(r);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in r)e[t]=r[t];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var n=[],o=0;o<e.retries;o++)n.push(this.createTimeout(o,e));return r&&r.forever&&!n.length&&n.push(this.createTimeout(o,e)),n.sort(function(i,s){return i-s}),n};Vl.createTimeout=function(r,e){var t=e.randomize?Math.random()+1:1,n=Math.round(t*Math.max(e.minTimeout,1)*Math.pow(e.factor,r));return n=Math.min(n,e.maxTimeout),n};Vl.wrap=function(r,e,t){if(e instanceof Array&&(t=e,e=null),!t){t=[];for(var n in r)typeof r[n]=="function"&&t.push(n)}for(var o=0;o<t.length;o++){var i=t[o],s=r[i];r[i]=function(c){var l=Vl.operation(e),u=Array.prototype.slice.call(arguments,1),f=u.pop();u.push(function(h){l.retry(h)||(h&&(arguments[0]=l.mainError()),f.apply(this,arguments))}),l.attempt(function(){c.apply(r,u)})}.bind(r,s),r[i].options=e}}});var OP=ut((E5e,NP)=>{NP.exports=DP()});var RN=ut(()=>{var PN;(function(r){(function(e){var t=typeof globalThis=="object"||typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof this=="object"?this:a(),n=o(r);typeof t.Reflect<"u"&&(n=o(t.Reflect,n)),e(n,t),typeof t.Reflect>"u"&&(t.Reflect=r);function o(c,l){return function(u,f){Object.defineProperty(c,u,{configurable:!0,writable:!0,value:f}),l&&l(u,f)}}function i(){try{return Function("return this;")()}catch{}}function s(){try{return(0,eval)("(function() { return this; })()")}catch{}}function a(){return i()||s()}})(function(e,t){var n=Object.prototype.hasOwnProperty,o=typeof Symbol=="function",i=o&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",s=o&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",a=typeof Object.create=="function",c={__proto__:[]}instanceof Array,l=!a&&!c,u={create:a?function(){return z5(Object.create(null))}:c?function(){return z5({__proto__:null})}:function(){return z5({})},has:l?function(N,L){return n.call(N,L)}:function(N,L){return L in N},get:l?function(N,L){return n.call(N,L)?N[L]:void 0}:function(N,L){return N[L]}},f=Object.getPrototypeOf(Function),h=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:UF(),d=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:FF(),m=typeof WeakMap=="function"?WeakMap:$F(),g=o?Symbol.for("@reflect-metadata:registry"):void 0,w=BF(),x=LF(w);function v(N,L,z,ee){if(G(z)){if(!un(N))throw new TypeError;if(!Nh(L))throw new TypeError;return R(N,L)}else{if(!un(N))throw new TypeError;if(!ue(L))throw new TypeError;if(!ue(ee)&&!G(ee)&&!Te(ee))throw new TypeError;return Te(ee)&&(ee=void 0),z=pr(z),T(N,L,z,ee)}}e("decorate",v);function A(N,L){function z(ee,Ee){if(!ue(ee))throw new TypeError;if(!G(Ee)&&!NF(Ee))throw new TypeError;Q(N,L,ee,Ee)}return z}e("metadata",A);function S(N,L,z,ee){if(!ue(z))throw new TypeError;return G(ee)||(ee=pr(ee)),Q(N,L,z,ee)}e("defineMetadata",S);function _(N,L,z){if(!ue(L))throw new TypeError;return G(z)||(z=pr(z)),V(N,L,z)}e("hasMetadata",_);function U(N,L,z){if(!ue(L))throw new TypeError;return G(z)||(z=pr(z)),F(N,L,z)}e("hasOwnMetadata",U);function k(N,L,z){if(!ue(L))throw new TypeError;return G(z)||(z=pr(z)),$(N,L,z)}e("getMetadata",k);function P(N,L,z){if(!ue(L))throw new TypeError;return G(z)||(z=pr(z)),Y(N,L,z)}e("getOwnMetadata",P);function E(N,L){if(!ue(N))throw new TypeError;return G(L)||(L=pr(L)),X(N,L)}e("getMetadataKeys",E);function D(N,L){if(!ue(N))throw new TypeError;return G(L)||(L=pr(L)),me(N,L)}e("getOwnMetadataKeys",D);function C(N,L,z){if(!ue(L))throw new TypeError;if(G(z)||(z=pr(z)),!ue(L))throw new TypeError;G(z)||(z=pr(z));var ee=Oh(L,z,!1);return G(ee)?!1:ee.OrdinaryDeleteMetadata(N,L,z)}e("deleteMetadata",C);function R(N,L){for(var z=N.length-1;z>=0;--z){var ee=N[z],Ee=ee(L);if(!G(Ee)&&!Te(Ee)){if(!Nh(Ee))throw new TypeError;L=Ee}}return L}function T(N,L,z,ee){for(var Ee=N.length-1;Ee>=0;--Ee){var Gt=N[Ee],mr=Gt(L,z,ee);if(!G(mr)&&!Te(mr)){if(!ue(mr))throw new TypeError;ee=mr}}return ee}function V(N,L,z){var ee=F(N,L,z);if(ee)return!0;var Ee=K5(L);return Te(Ee)?!1:V(N,Ee,z)}function F(N,L,z){var ee=Oh(L,z,!1);return G(ee)?!1:Mt(ee.OrdinaryHasOwnMetadata(N,L,z))}function $(N,L,z){var ee=F(N,L,z);if(ee)return Y(N,L,z);var Ee=K5(L);if(!Te(Ee))return $(N,Ee,z)}function Y(N,L,z){var ee=Oh(L,z,!1);if(!G(ee))return ee.OrdinaryGetOwnMetadata(N,L,z)}function Q(N,L,z,ee){var Ee=Oh(z,ee,!0);Ee.OrdinaryDefineOwnMetadata(N,L,z,ee)}function X(N,L){var z=me(N,L),ee=K5(N);if(ee===null)return z;var Ee=X(ee,L);if(Ee.length<=0)return z;if(z.length<=0)return Ee;for(var Gt=new d,mr=[],Ue=0,ie=z;Ue<ie.length;Ue++){var ce=ie[Ue],fe=Gt.has(ce);fe||(Gt.add(ce),mr.push(ce))}for(var ge=0,$e=Ee;ge<$e.length;ge++){var ce=$e[ge],fe=Gt.has(ce);fe||(Gt.add(ce),mr.push(ce))}return mr}function me(N,L){var z=Oh(N,L,!1);return z?z.OrdinaryOwnMetadataKeys(N,L):[]}function oe(N){if(N===null)return 1;switch(typeof N){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return N===null?1:6;default:return 6}}function G(N){return N===void 0}function Te(N){return N===null}function et(N){return typeof N=="symbol"}function ue(N){return typeof N=="object"?N!==null:typeof N=="function"}function it(N,L){switch(oe(N)){case 0:return N;case 1:return N;case 2:return N;case 3:return N;case 4:return N;case 5:return N}var z=L===3?"string":L===5?"number":"default",ee=AE(N,i);if(ee!==void 0){var Ee=ee.call(N,z);if(ue(Ee))throw new TypeError;return Ee}return rr(N,z==="default"?"number":z)}function rr(N,L){if(L==="string"){var z=N.toString;if(gs(z)){var ee=z.call(N);if(!ue(ee))return ee}var Ee=N.valueOf;if(gs(Ee)){var ee=Ee.call(N);if(!ue(ee))return ee}}else{var Ee=N.valueOf;if(gs(Ee)){var ee=Ee.call(N);if(!ue(ee))return ee}var Gt=N.toString;if(gs(Gt)){var ee=Gt.call(N);if(!ue(ee))return ee}}throw new TypeError}function Mt(N){return!!N}function Ut(N){return""+N}function pr(N){var L=it(N,3);return et(L)?L:Ut(L)}function un(N){return Array.isArray?Array.isArray(N):N instanceof Object?N instanceof Array:Object.prototype.toString.call(N)==="[object Array]"}function gs(N){return typeof N=="function"}function Nh(N){return typeof N=="function"}function NF(N){switch(oe(N)){case 3:return!0;case 4:return!0;default:return!1}}function V5(N,L){return N===L||N!==N&&L!==L}function AE(N,L){var z=N[L];if(z!=null){if(!gs(z))throw new TypeError;return z}}function EE(N){var L=AE(N,s);if(!gs(L))throw new TypeError;var z=L.call(N);if(!ue(z))throw new TypeError;return z}function SE(N){return N.value}function _E(N){var L=N.next();return L.done?!1:L}function CE(N){var L=N.return;L&&L.call(N)}function K5(N){var L=Object.getPrototypeOf(N);if(typeof N!="function"||N===f||L!==f)return L;var z=N.prototype,ee=z&&Object.getPrototypeOf(z);if(ee==null||ee===Object.prototype)return L;var Ee=ee.constructor;return typeof Ee!="function"||Ee===N?L:Ee}function OF(){var N;!G(g)&&typeof t.Reflect<"u"&&!(g in t.Reflect)&&typeof t.Reflect.defineMetadata=="function"&&(N=MF(t.Reflect));var L,z,ee,Ee=new m,Gt={registerProvider:mr,getProvider:ie,setProvider:fe};return Gt;function mr(ge){if(!Object.isExtensible(Gt))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case N===ge:break;case G(L):L=ge;break;case L===ge:break;case G(z):z=ge;break;case z===ge:break;default:ee===void 0&&(ee=new d),ee.add(ge);break}}function Ue(ge,$e){if(!G(L)){if(L.isProviderFor(ge,$e))return L;if(!G(z)){if(z.isProviderFor(ge,$e))return L;if(!G(ee))for(var St=EE(ee);;){var Xt=_E(St);if(!Xt)return;var Go=SE(Xt);if(Go.isProviderFor(ge,$e))return CE(St),Go}}}if(!G(N)&&N.isProviderFor(ge,$e))return N}function ie(ge,$e){var St=Ee.get(ge),Xt;return G(St)||(Xt=St.get($e)),G(Xt)&&(Xt=Ue(ge,$e),G(Xt)||(G(St)&&(St=new h,Ee.set(ge,St)),St.set($e,Xt))),Xt}function ce(ge){if(G(ge))throw new TypeError;return L===ge||z===ge||!G(ee)&&ee.has(ge)}function fe(ge,$e,St){if(!ce(St))throw new Error("Metadata provider not registered.");var Xt=ie(ge,$e);if(Xt!==St){if(!G(Xt))return!1;var Go=Ee.get(ge);G(Go)&&(Go=new h,Ee.set(ge,Go)),Go.set($e,St)}return!0}}function BF(){var N;return!G(g)&&ue(t.Reflect)&&Object.isExtensible(t.Reflect)&&(N=t.Reflect[g]),G(N)&&(N=OF()),!G(g)&&ue(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,g,{enumerable:!1,configurable:!1,writable:!1,value:N}),N}function LF(N){var L=new m,z={isProviderFor:function(ce,fe){var ge=L.get(ce);return G(ge)?!1:ge.has(fe)},OrdinaryDefineOwnMetadata:mr,OrdinaryHasOwnMetadata:Ee,OrdinaryGetOwnMetadata:Gt,OrdinaryOwnMetadataKeys:Ue,OrdinaryDeleteMetadata:ie};return w.registerProvider(z),z;function ee(ce,fe,ge){var $e=L.get(ce),St=!1;if(G($e)){if(!ge)return;$e=new h,L.set(ce,$e),St=!0}var Xt=$e.get(fe);if(G(Xt)){if(!ge)return;if(Xt=new h,$e.set(fe,Xt),!N.setProvider(ce,fe,z))throw $e.delete(fe),St&&L.delete(ce),new Error("Wrong provider for target.")}return Xt}function Ee(ce,fe,ge){var $e=ee(fe,ge,!1);return G($e)?!1:Mt($e.has(ce))}function Gt(ce,fe,ge){var $e=ee(fe,ge,!1);if(!G($e))return $e.get(ce)}function mr(ce,fe,ge,$e){var St=ee(ge,$e,!0);St.set(ce,fe)}function Ue(ce,fe){var ge=[],$e=ee(ce,fe,!1);if(G($e))return ge;for(var St=$e.keys(),Xt=EE(St),Go=0;;){var IE=_E(Xt);if(!IE)return ge.length=Go,ge;var HF=SE(IE);try{ge[Go]=HF}catch(VF){try{CE(Xt)}finally{throw VF}}Go++}}function ie(ce,fe,ge){var $e=ee(fe,ge,!1);if(G($e)||!$e.delete(ce))return!1;if($e.size===0){var St=L.get(fe);G(St)||(St.delete(ge),St.size===0&&L.delete(St))}return!0}}function MF(N){var L=N.defineMetadata,z=N.hasOwnMetadata,ee=N.getOwnMetadata,Ee=N.getOwnMetadataKeys,Gt=N.deleteMetadata,mr=new m,Ue={isProviderFor:function(ie,ce){var fe=mr.get(ie);return!G(fe)&&fe.has(ce)?!0:Ee(ie,ce).length?(G(fe)&&(fe=new d,mr.set(ie,fe)),fe.add(ce),!0):!1},OrdinaryDefineOwnMetadata:L,OrdinaryHasOwnMetadata:z,OrdinaryGetOwnMetadata:ee,OrdinaryOwnMetadataKeys:Ee,OrdinaryDeleteMetadata:Gt};return Ue}function Oh(N,L,z){var ee=w.getProvider(N,L);if(!G(ee))return ee;if(z){if(w.setProvider(N,L,x))return x;throw new Error("Illegal state.")}}function UF(){var N={},L=[],z=function(){function Ue(ie,ce,fe){this._index=0,this._keys=ie,this._values=ce,this._selector=fe}return Ue.prototype["@@iterator"]=function(){return this},Ue.prototype[s]=function(){return this},Ue.prototype.next=function(){var ie=this._index;if(ie>=0&&ie<this._keys.length){var ce=this._selector(this._keys[ie],this._values[ie]);return ie+1>=this._keys.length?(this._index=-1,this._keys=L,this._values=L):this._index++,{value:ce,done:!1}}return{value:void 0,done:!0}},Ue.prototype.throw=function(ie){throw this._index>=0&&(this._index=-1,this._keys=L,this._values=L),ie},Ue.prototype.return=function(ie){return this._index>=0&&(this._index=-1,this._keys=L,this._values=L),{value:ie,done:!0}},Ue}(),ee=function(){function Ue(){this._keys=[],this._values=[],this._cacheKey=N,this._cacheIndex=-2}return Object.defineProperty(Ue.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Ue.prototype.has=function(ie){return this._find(ie,!1)>=0},Ue.prototype.get=function(ie){var ce=this._find(ie,!1);return ce>=0?this._values[ce]:void 0},Ue.prototype.set=function(ie,ce){var fe=this._find(ie,!0);return this._values[fe]=ce,this},Ue.prototype.delete=function(ie){var ce=this._find(ie,!1);if(ce>=0){for(var fe=this._keys.length,ge=ce+1;ge<fe;ge++)this._keys[ge-1]=this._keys[ge],this._values[ge-1]=this._values[ge];return this._keys.length--,this._values.length--,V5(ie,this._cacheKey)&&(this._cacheKey=N,this._cacheIndex=-2),!0}return!1},Ue.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=N,this._cacheIndex=-2},Ue.prototype.keys=function(){return new z(this._keys,this._values,Ee)},Ue.prototype.values=function(){return new z(this._keys,this._values,Gt)},Ue.prototype.entries=function(){return new z(this._keys,this._values,mr)},Ue.prototype["@@iterator"]=function(){return this.entries()},Ue.prototype[s]=function(){return this.entries()},Ue.prototype._find=function(ie,ce){if(!V5(this._cacheKey,ie)){this._cacheIndex=-1;for(var fe=0;fe<this._keys.length;fe++)if(V5(this._keys[fe],ie)){this._cacheIndex=fe;break}}return this._cacheIndex<0&&ce&&(this._cacheIndex=this._keys.length,this._keys.push(ie),this._values.push(void 0)),this._cacheIndex},Ue}();return ee;function Ee(Ue,ie){return Ue}function Gt(Ue,ie){return ie}function mr(Ue,ie){return[Ue,ie]}}function FF(){var N=function(){function L(){this._map=new h}return Object.defineProperty(L.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),L.prototype.has=function(z){return this._map.has(z)},L.prototype.add=function(z){return this._map.set(z,z),this},L.prototype.delete=function(z){return this._map.delete(z)},L.prototype.clear=function(){this._map.clear()},L.prototype.keys=function(){return this._map.keys()},L.prototype.values=function(){return this._map.keys()},L.prototype.entries=function(){return this._map.entries()},L.prototype["@@iterator"]=function(){return this.keys()},L.prototype[s]=function(){return this.keys()},L}();return N}function $F(){var N=16,L=u.create(),z=ee();return function(){function ie(){this._key=ee()}return ie.prototype.has=function(ce){var fe=Ee(ce,!1);return fe!==void 0?u.has(fe,this._key):!1},ie.prototype.get=function(ce){var fe=Ee(ce,!1);return fe!==void 0?u.get(fe,this._key):void 0},ie.prototype.set=function(ce,fe){var ge=Ee(ce,!0);return ge[this._key]=fe,this},ie.prototype.delete=function(ce){var fe=Ee(ce,!1);return fe!==void 0?delete fe[this._key]:!1},ie.prototype.clear=function(){this._key=ee()},ie}();function ee(){var ie;do ie="@@WeakMap@@"+Ue();while(u.has(L,ie));return L[ie]=!0,ie}function Ee(ie,ce){if(!n.call(ie,z)){if(!ce)return;Object.defineProperty(ie,z,{value:u.create()})}return ie[z]}function Gt(ie,ce){for(var fe=0;fe<ce;++fe)ie[fe]=Math.random()*255|0;return ie}function mr(ie){if(typeof Uint8Array=="function"){var ce=new Uint8Array(ie);return typeof crypto<"u"?crypto.getRandomValues(ce):typeof msCrypto<"u"?msCrypto.getRandomValues(ce):Gt(ce,ie),ce}return Gt(new Array(ie),ie)}function Ue(){var ie=mr(N);ie[6]=ie[6]&79|64,ie[8]=ie[8]&191|128;for(var ce="",fe=0;fe<N;++fe){var ge=ie[fe];(fe===4||fe===6||fe===8)&&(ce+="-"),ge<16&&(ce+="0"),ce+=ge.toString(16).toLowerCase()}return ce}}function z5(N){return N.__=void 0,delete N.__,N}})})(PN||(PN={}))});var $O=ut((lVe,H6)=>{var bO,vO,AO,EO,SO,_O,CO,IO,TO,$6,$v,kO,PO,nh,RO,DO,NO,OO,BO,LO,MO,UO,FO;(function(r){var e=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof H6=="object"&&typeof H6.exports=="object"?r(t(e,t(H6.exports))):r(t(e));function t(n,o){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(i,s){return n[i]=o?o(i,s):s}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)n.hasOwnProperty(o)&&(t[o]=n[o])};bO=function(t,n){e(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)},vO=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},AO=function(t,n){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.indexOf(i)<0&&(o[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s<i.length;s++)n.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(o[i[s]]=t[i[s]]);return o},EO=function(t,n,o,i){var s=arguments.length,a=s<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,o):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,n,o,i);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(a=(s<3?c(a):s>3?c(n,o,a):c(n,o))||a);return s>3&&a&&Object.defineProperty(n,o,a),a},SO=function(t,n){return function(o,i){n(o,i,t)}},_O=function(t,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,n)},CO=function(t,n,o,i){function s(a){return a instanceof o?a:new o(function(c){c(a)})}return new(o||(o=Promise))(function(a,c){function l(h){try{f(i.next(h))}catch(d){c(d)}}function u(h){try{f(i.throw(h))}catch(d){c(d)}}function f(h){h.done?a(h.value):s(h.value).then(l,u)}f((i=i.apply(t,n||[])).next())})},IO=function(t,n){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,s,a,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(f){return function(h){return u([f,h])}}function u(f){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,s&&(a=f[0]&2?s.return:f[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,f[1])).done)return a;switch(s=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,s=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(f[0]===6&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=n.call(t,o)}catch(h){f=[6,h],s=0}finally{i=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},FO=function(t,n,o,i){i===void 0&&(i=o),t[i]=n[o]},TO=function(t,n){for(var o in t)o!=="default"&&!n.hasOwnProperty(o)&&(n[o]=t[o])},$6=function(t){var n=typeof Symbol=="function"&&Symbol.iterator,o=n&&t[n],i=0;if(o)return o.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},$v=function(t,n){var o=typeof Symbol=="function"&&t[Symbol.iterator];if(!o)return t;var i=o.call(t),s,a=[],c;try{for(;(n===void 0||n-- >0)&&!(s=i.next()).done;)a.push(s.value)}catch(l){c={error:l}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(c)throw c.error}}return a},kO=function(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat($v(arguments[n]));return t},PO=function(){for(var t=0,n=0,o=arguments.length;n<o;n++)t+=arguments[n].length;for(var i=Array(t),s=0,n=0;n<o;n++)for(var a=arguments[n],c=0,l=a.length;c<l;c++,s++)i[s]=a[c];return i},nh=function(t){return this instanceof nh?(this.v=t,this):new nh(t)},RO=function(t,n,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=o.apply(t,n||[]),s,a=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(m){i[m]&&(s[m]=function(g){return new Promise(function(w,x){a.push([m,g,w,x])>1||l(m,g)})})}function l(m,g){try{u(i[m](g))}catch(w){d(a[0][3],w)}}function u(m){m.value instanceof nh?Promise.resolve(m.value.v).then(f,h):d(a[0][2],m)}function f(m){l("next",m)}function h(m){l("throw",m)}function d(m,g){m(g),a.shift(),a.length&&l(a[0][0],a[0][1])}},DO=function(t){var n,o;return n={},i("next"),i("throw",function(s){throw s}),i("return"),n[Symbol.iterator]=function(){return this},n;function i(s,a){n[s]=t[s]?function(c){return(o=!o)?{value:nh(t[s](c)),done:s==="return"}:a?a(c):c}:a}},NO=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t[Symbol.asyncIterator],o;return n?n.call(t):(t=typeof $6=="function"?$6(t):t[Symbol.iterator](),o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o);function i(a){o[a]=t[a]&&function(c){return new Promise(function(l,u){c=t[a](c),s(l,u,c.done,c.value)})}}function s(a,c,l,u){Promise.resolve(u).then(function(f){a({value:f,done:l})},c)}},OO=function(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t},BO=function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var o in t)Object.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n.default=t,n},LO=function(t){return t&&t.__esModule?t:{default:t}},MO=function(t,n){if(!n.has(t))throw new TypeError("attempted to get private field on non-instance");return n.get(t)},UO=function(t,n,o){if(!n.has(t))throw new TypeError("attempted to set private field on non-instance");return n.set(t,o),o},r("__extends",bO),r("__assign",vO),r("__rest",AO),r("__decorate",EO),r("__param",SO),r("__metadata",_O),r("__awaiter",CO),r("__generator",IO),r("__exportStar",TO),r("__createBinding",FO),r("__values",$6),r("__read",$v),r("__spread",kO),r("__spreadArrays",PO),r("__await",nh),r("__asyncGenerator",RO),r("__asyncDelegator",DO),r("__asyncValues",NO),r("__makeTemplateObject",OO),r("__importStar",BO),r("__importDefault",LO),r("__classPrivateFieldGet",MO),r("__classPrivateFieldSet",UO)})});var wL=ut(w8=>{"use strict";Object.defineProperty(w8,"__esModule",{value:!0});var PA=class{constructor(){this.pullQueue=[],this.pushQueue=[],this.eventHandlers={},this.isPaused=!1,this.isStopped=!1}push(e){if(this.isStopped)return;let t={value:e,done:!1};if(this.pullQueue.length){let n=this.pullQueue.shift();n&&n.resolve(t)}else this.pushQueue.push(Promise.resolve(t)),this.highWaterMark!==void 0&&this.pushQueue.length>=this.highWaterMark&&!this.isPaused&&(this.isPaused=!0,this.eventHandlers.highWater?this.eventHandlers.highWater():console&&console.warn(`EventIterator queue reached ${this.pushQueue.length} items`))}stop(){if(!this.isStopped){this.isStopped=!0,this.remove();for(let e of this.pullQueue)e.resolve({value:void 0,done:!0});this.pullQueue.length=0}}fail(e){if(!this.isStopped)if(this.isStopped=!0,this.remove(),this.pullQueue.length){for(let t of this.pullQueue)t.reject(e);this.pullQueue.length=0}else{let t=Promise.reject(e);t.catch(()=>{}),this.pushQueue.push(t)}}remove(){Promise.resolve().then(()=>{this.removeCallback&&this.removeCallback()})}[Symbol.asyncIterator](){return{next:e=>{let t=this.pushQueue.shift();return t?(this.lowWaterMark!==void 0&&this.pushQueue.length<=this.lowWaterMark&&this.isPaused&&(this.isPaused=!1,this.eventHandlers.lowWater&&this.eventHandlers.lowWater()),t):this.isStopped?Promise.resolve({value:void 0,done:!0}):new Promise((n,o)=>{this.pullQueue.push({resolve:n,reject:o})})},return:()=>(this.isStopped=!0,this.pushQueue.length=0,this.remove(),Promise.resolve({value:void 0,done:!0}))}}},y8=class{constructor(e,{highWaterMark:t=100,lowWaterMark:n=1}={}){let o=new PA;o.highWaterMark=t,o.lowWaterMark=n,o.removeCallback=e({push:i=>o.push(i),stop:()=>o.stop(),fail:i=>o.fail(i),on:(i,s)=>{o.eventHandlers[i]=s}})||(()=>{}),this[Symbol.asyncIterator]=()=>o[Symbol.asyncIterator](),Object.freeze(this)}};w8.EventIterator=y8;w8.default=y8});var xL=ut(X1=>{"use strict";Object.defineProperty(X1,"__esModule",{value:!0});var RA=wL();X1.EventIterator=RA.EventIterator;function aZ(r,e,t){return new RA.EventIterator(({push:n})=>(this.addEventListener(r,n,e),()=>this.removeEventListener(r,n,e)),t)}X1.subscribe=aZ;X1.default=RA.EventIterator});var JL=ut((tQe,ZL)=>{ZL.exports=$A;var QL=128,xZ=127,bZ=~xZ,vZ=Math.pow(2,31);function $A(r,e,t){if(Number.MAX_SAFE_INTEGER&&r>Number.MAX_SAFE_INTEGER)throw $A.bytes=0,new RangeError("Could not encode varint");e=e||[],t=t||0;for(var n=t;r>=vZ;)e[t++]=r&255|QL,r/=128;for(;r&bZ;)e[t++]=r&255|QL,r>>>=7;return e[t]=r|0,$A.bytes=t-n+1,e}});var rM=ut((rQe,tM)=>{tM.exports=HA;var AZ=128,eM=127;function HA(r,n){var t=0,n=n||0,o=0,i=n,s,a=r.length;do{if(i>=a||o>49)throw HA.bytes=0,new RangeError("Could not decode varint");s=r[i++],t+=o<28?(s&eM)<<o:(s&eM)*Math.pow(2,o),o+=7}while(s>=AZ);return HA.bytes=i-n,t}});var oM=ut((nQe,nM)=>{var EZ=Math.pow(2,7),SZ=Math.pow(2,14),_Z=Math.pow(2,21),CZ=Math.pow(2,28),IZ=Math.pow(2,35),TZ=Math.pow(2,42),kZ=Math.pow(2,49),PZ=Math.pow(2,56),RZ=Math.pow(2,63);nM.exports=function(r){return r<EZ?1:r<SZ?2:r<_Z?3:r<CZ?4:r<IZ?5:r<TZ?6:r<kZ?7:r<PZ?8:r<RZ?9:10}});var L8=ut((oQe,iM)=>{iM.exports={encode:JL(),decode:rM(),encodingLength:oM()}});var SM=ut((s0,J8)=>{(function(r,e){"use strict";var t={version:"3.0.0",x86:{},x64:{},inputValidation:!0};function n(d){if(!Array.isArray(d)&&!ArrayBuffer.isView(d))return!1;for(var m=0;m<d.length;m++)if(!Number.isInteger(d[m])||d[m]<0||d[m]>255)return!1;return!0}function o(d,m){return(d&65535)*m+(((d>>>16)*m&65535)<<16)}function i(d,m){return d<<m|d>>>32-m}function s(d){return d^=d>>>16,d=o(d,2246822507),d^=d>>>13,d=o(d,3266489909),d^=d>>>16,d}function a(d,m){d=[d[0]>>>16,d[0]&65535,d[1]>>>16,d[1]&65535],m=[m[0]>>>16,m[0]&65535,m[1]>>>16,m[1]&65535];var g=[0,0,0,0];return g[3]+=d[3]+m[3],g[2]+=g[3]>>>16,g[3]&=65535,g[2]+=d[2]+m[2],g[1]+=g[2]>>>16,g[2]&=65535,g[1]+=d[1]+m[1],g[0]+=g[1]>>>16,g[1]&=65535,g[0]+=d[0]+m[0],g[0]&=65535,[g[0]<<16|g[1],g[2]<<16|g[3]]}function c(d,m){d=[d[0]>>>16,d[0]&65535,d[1]>>>16,d[1]&65535],m=[m[0]>>>16,m[0]&65535,m[1]>>>16,m[1]&65535];var g=[0,0,0,0];return g[3]+=d[3]*m[3],g[2]+=g[3]>>>16,g[3]&=65535,g[2]+=d[2]*m[3],g[1]+=g[2]>>>16,g[2]&=65535,g[2]+=d[3]*m[2],g[1]+=g[2]>>>16,g[2]&=65535,g[1]+=d[1]*m[3],g[0]+=g[1]>>>16,g[1]&=65535,g[1]+=d[2]*m[2],g[0]+=g[1]>>>16,g[1]&=65535,g[1]+=d[3]*m[1],g[0]+=g[1]>>>16,g[1]&=65535,g[0]+=d[0]*m[3]+d[1]*m[2]+d[2]*m[1]+d[3]*m[0],g[0]&=65535,[g[0]<<16|g[1],g[2]<<16|g[3]]}function l(d,m){return m%=64,m===32?[d[1],d[0]]:m<32?[d[0]<<m|d[1]>>>32-m,d[1]<<m|d[0]>>>32-m]:(m-=32,[d[1]<<m|d[0]>>>32-m,d[0]<<m|d[1]>>>32-m])}function u(d,m){return m%=64,m===0?d:m<32?[d[0]<<m|d[1]>>>32-m,d[1]<<m]:[d[1]<<m-32,0]}function f(d,m){return[d[0]^m[0],d[1]^m[1]]}function h(d){return d=f(d,[0,d[0]>>>1]),d=c(d,[4283543511,3981806797]),d=f(d,[0,d[0]>>>1]),d=c(d,[3301882366,444984403]),d=f(d,[0,d[0]>>>1]),d}t.x86.hash32=function(d,m){if(t.inputValidation&&!n(d))return e;m=m||0;for(var g=d.length%4,w=d.length-g,x=m,v=0,A=3432918353,S=461845907,_=0;_<w;_=_+4)v=d[_]|d[_+1]<<8|d[_+2]<<16|d[_+3]<<24,v=o(v,A),v=i(v,15),v=o(v,S),x^=v,x=i(x,13),x=o(x,5)+3864292196;switch(v=0,g){case 3:v^=d[_+2]<<16;case 2:v^=d[_+1]<<8;case 1:v^=d[_],v=o(v,A),v=i(v,15),v=o(v,S),x^=v}return x^=d.length,x=s(x),x>>>0},t.x86.hash128=function(d,m){if(t.inputValidation&&!n(d))return e;m=m||0;for(var g=d.length%16,w=d.length-g,x=m,v=m,A=m,S=m,_=0,U=0,k=0,P=0,E=597399067,D=2869860233,C=951274213,R=2716044179,T=0;T<w;T=T+16)_=d[T]|d[T+1]<<8|d[T+2]<<16|d[T+3]<<24,U=d[T+4]|d[T+5]<<8|d[T+6]<<16|d[T+7]<<24,k=d[T+8]|d[T+9]<<8|d[T+10]<<16|d[T+11]<<24,P=d[T+12]|d[T+13]<<8|d[T+14]<<16|d[T+15]<<24,_=o(_,E),_=i(_,15),_=o(_,D),x^=_,x=i(x,19),x+=v,x=o(x,5)+1444728091,U=o(U,D),U=i(U,16),U=o(U,C),v^=U,v=i(v,17),v+=A,v=o(v,5)+197830471,k=o(k,C),k=i(k,17),k=o(k,R),A^=k,A=i(A,15),A+=S,A=o(A,5)+2530024501,P=o(P,R),P=i(P,18),P=o(P,E),S^=P,S=i(S,13),S+=x,S=o(S,5)+850148119;switch(_=0,U=0,k=0,P=0,g){case 15:P^=d[T+14]<<16;case 14:P^=d[T+13]<<8;case 13:P^=d[T+12],P=o(P,R),P=i(P,18),P=o(P,E),S^=P;case 12:k^=d[T+11]<<24;case 11:k^=d[T+10]<<16;case 10:k^=d[T+9]<<8;case 9:k^=d[T+8],k=o(k,C),k=i(k,17),k=o(k,R),A^=k;case 8:U^=d[T+7]<<24;case 7:U^=d[T+6]<<16;case 6:U^=d[T+5]<<8;case 5:U^=d[T+4],U=o(U,D),U=i(U,16),U=o(U,C),v^=U;case 4:_^=d[T+3]<<24;case 3:_^=d[T+2]<<16;case 2:_^=d[T+1]<<8;case 1:_^=d[T],_=o(_,E),_=i(_,15),_=o(_,D),x^=_}return x^=d.length,v^=d.length,A^=d.length,S^=d.length,x+=v,x+=A,x+=S,v+=x,A+=x,S+=x,x=s(x),v=s(v),A=s(A),S=s(S),x+=v,x+=A,x+=S,v+=x,A+=x,S+=x,("00000000"+(x>>>0).toString(16)).slice(-8)+("00000000"+(v>>>0).toString(16)).slice(-8)+("00000000"+(A>>>0).toString(16)).slice(-8)+("00000000"+(S>>>0).toString(16)).slice(-8)},t.x64.hash128=function(d,m){if(t.inputValidation&&!n(d))return e;m=m||0;for(var g=d.length%16,w=d.length-g,x=[0,m],v=[0,m],A=[0,0],S=[0,0],_=[2277735313,289559509],U=[1291169091,658871167],k=0;k<w;k=k+16)A=[d[k+4]|d[k+5]<<8|d[k+6]<<16|d[k+7]<<24,d[k]|d[k+1]<<8|d[k+2]<<16|d[k+3]<<24],S=[d[k+12]|d[k+13]<<8|d[k+14]<<16|d[k+15]<<24,d[k+8]|d[k+9]<<8|d[k+10]<<16|d[k+11]<<24],A=c(A,_),A=l(A,31),A=c(A,U),x=f(x,A),x=l(x,27),x=a(x,v),x=a(c(x,[0,5]),[0,1390208809]),S=c(S,U),S=l(S,33),S=c(S,_),v=f(v,S),v=l(v,31),v=a(v,x),v=a(c(v,[0,5]),[0,944331445]);switch(A=[0,0],S=[0,0],g){case 15:S=f(S,u([0,d[k+14]],48));case 14:S=f(S,u([0,d[k+13]],40));case 13:S=f(S,u([0,d[k+12]],32));case 12:S=f(S,u([0,d[k+11]],24));case 11:S=f(S,u([0,d[k+10]],16));case 10:S=f(S,u([0,d[k+9]],8));case 9:S=f(S,[0,d[k+8]]),S=c(S,U),S=l(S,33),S=c(S,_),v=f(v,S);case 8:A=f(A,u([0,d[k+7]],56));case 7:A=f(A,u([0,d[k+6]],48));case 6:A=f(A,u([0,d[k+5]],40));case 5:A=f(A,u([0,d[k+4]],32));case 4:A=f(A,u([0,d[k+3]],24));case 3:A=f(A,u([0,d[k+2]],16));case 2:A=f(A,u([0,d[k+1]],8));case 1:A=f(A,[0,d[k]]),A=c(A,_),A=l(A,31),A=c(A,U),x=f(x,A)}return x=f(x,[0,d.length]),v=f(v,[0,d.length]),x=a(x,v),v=a(v,x),x=h(x),v=h(v),x=a(x,v),v=a(v,x),("00000000"+(x[0]>>>0).toString(16)).slice(-8)+("00000000"+(x[1]>>>0).toString(16)).slice(-8)+("00000000"+(v[0]>>>0).toString(16)).slice(-8)+("00000000"+(v[1]>>>0).toString(16)).slice(-8)},typeof s0<"u"?(typeof J8<"u"&&J8.exports&&(s0=J8.exports=t),s0.murmurHash3=t):typeof define=="function"&&define.amd?define([],function(){return t}):(t._murmurHash3=r.murmurHash3,t.noConflict=function(){return r.murmurHash3=t._murmurHash3,t._murmurHash3=e,t.noConflict=e,t},r.murmu