UNPKG

diffusion

Version:

Diffusion JavaScript client

8 lines 435 kB
var diffusion=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=212)}([function(t,e,r){var n=r(6),o=r(78).f,i=r(44),s=r(38),a=r(101),u=r(223),c=r(83);t.exports=function(t,e){var r,l,f,p,h,d=t.target,y=t.global,v=t.stat;if(r=y?n:v?n[d]||a(d,{}):(n[d]||{}).prototype)for(l in e){if(p=e[l],f=t.noTargetGet?(h=o(r,l))&&h.value:r[l],!c(y?l:d+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;u(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),s(r,l,p,t)}}},function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.InternalError=e.IllegalStateError=e.RetryLimitError=e.SchemaParseError=e.SchemaViolationError=e.InvalidFilterError=e.OutOfBoundsError=e.IllegalArgumentError=e.SessionError=e.IOError=e.InvalidDataError=e.AssertionError=e.RuntimeError=e.NullValueError=void 0;var i=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getType=function(){return e.type},e.type="null_value_error",e}(Error);e.NullValueError=i;var s=function(t){function e(e,r){var n=t.call(this,e)||this;return n.cause=r,n}return o(e,t),e.prototype.getType=function(){return e.type},e.type="runtime_error",e}(Error);e.RuntimeError=s;var a=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getType=function(){return e.type},e.type="assertion_error",e}(Error);e.AssertionError=a;var u=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getType=function(){return e.type},e.type="invalid_data_error",e}(Error);e.InvalidDataError=u;var c=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getType=function(){return e.type},e.type="io_error",e}(Error);e.IOError=c;var l=function(t){function e(e,r){var n=t.call(this,e)||this;return n.cause=r,n}return o(e,t),e.prototype.getType=function(){return e.type},e.type="session_error",e}(Error);e.SessionError=l;var f=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getType=function(){return e.type},e.type="illegal_argument_error",e}(Error);e.IllegalArgumentError=f;var p=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getType=function(){return e.type},e.type="out_of_bounds_error",e}(Error);e.OutOfBoundsError=p;var h=function(t){function e(e,r){var n=t.call(this,e)||this;return n.errors=r,n}return o(e,t),e.prototype.getType=function(){return e.type},e.type="invalid_filter_error",e}(Error);e.InvalidFilterError=h;var d=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getType=function(){return e.type},e.type="schema_violation_error",e}(Error);e.SchemaViolationError=d;var y=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getType=function(){return e.type},e.type="schema_parse_error",e}(Error);e.SchemaParseError=y;var v=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getType=function(){return e.type},e.type="retry_limit_error",e}(Error);e.RetryLimitError=v;var m=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getType=function(){return e.type},e.type="illegal_state_error",e}(Error);e.IllegalStateError=m;var g=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.getType=function(){return e.type},e.type="internal_error",e}(Error);e.InternalError=g},function(t,e,r){var n=r(17);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e){t.exports=!1},function(t,e,r){var n=r(2),o=r(141),i=r(7),s=r(8),a=r(108),u=r(140),c=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,r){var l,f,p,h,d,y,v,m=r&&r.that,g=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_ITERATOR),w=!(!r||!r.INTERRUPTED),S=s(e,m,1+g+w),_=function(t){return l&&u(l),new c(!0,t)},b=function(t){return g?(n(t),w?S(t[0],t[1],_):S(t[0],t[1])):w?S(t,_):S(t)};if(E)l=t;else{if("function"!=typeof(f=a(t)))throw TypeError("Target is not iterable");if(o(f)){for(p=0,h=i(t.length);h>p;p++)if((d=b(t[p]))&&d instanceof c)return d;return new c(!1)}l=f.call(t)}for(y=l.next;!(v=y.call(l)).done;){try{d=b(v.value)}catch(t){throw u(l),t}if("object"==typeof d&&d&&d instanceof c)return d}return new c(!1)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,r(77))},function(t,e,r){var n=r(26),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(5);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){"use strict";(function(t){var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},o=this&&this.__spreadArray||function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t};function i(t){for(var e=[],r=0;r<t.length;r+=128)e.push(t.subarray(r,Math.min(r+128,t.length)));return e.map((function(t){return String.fromCharCode.apply(String,o([],n(t)))})).join("")}Object.defineProperty(e,"__esModule",{value:!0}),e.isUint8Array=e.isEqualUint8Arrays=e.uint8toUtf8=e.uint8ToBase64=e.uint8ToAscii=e.uint8FromDoubleBE=e.uint8FromBase64=e.uint8FromUtf8=e.uint8FromBinary=e.writeInt32BE=e.writeInt8=e.readDoubleBE=e.readFloatBE=e.readInt32BE=e.readUInt32BE=e.readUInt16BE=e.readInt8=e.concatUint8Arrays=void 0,e.concatUint8Arrays=function(t){var e,n,o=t.reduce((function(t,e){return t+e.length}),0),i=new Uint8Array(o),s=0;try{for(var a=r(t),u=a.next();!u.done;u=a.next()){var c=u.value;i.set(c,s),s+=c.length}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return i},e.readInt8=function(t,e){return new DataView(t.buffer,t.byteOffset,t.byteLength).getInt8(e)},e.readUInt16BE=function(t,e){return new DataView(t.buffer,t.byteOffset,t.byteLength).getUint16(e,!1)},e.readUInt32BE=function(t,e){return new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(e,!1)},e.readInt32BE=function(t,e){return new DataView(t.buffer,t.byteOffset,t.byteLength).getInt32(e,!1)},e.readFloatBE=function(t,e){return new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat32(e,!1)},e.readDoubleBE=function(t,e){return new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat64(e,!1)},e.writeInt8=function(t,e,r){t[e]=r},e.writeInt32BE=function(t,e,r){new DataView(t.buffer,t.byteOffset,t.byteLength).setInt32(e,r,!1)},e.uint8FromBinary=function(t){for(var e=new Uint8Array(t.length),r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e},e.uint8FromUtf8=function(t){return(new TextEncoder).encode(t)},e.uint8FromBase64="undefined"==typeof window||void 0===window.atob?function(e){return new Uint8Array(t.from(e,"base64"))}:function(t){return new Uint8Array(window.atob(t).split("").map((function(t){return t.charCodeAt(0)})))},e.uint8FromDoubleBE=function(t){var e=new ArrayBuffer(8);return new DataView(e).setFloat64(0,t,!1),new Uint8Array(e)},e.uint8ToAscii=i,e.uint8ToBase64="undefined"==typeof window||void 0===window.btoa?function(e){return t.from(e).toString("base64")}:function(t){return window.btoa(i(t))},e.uint8toUtf8=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=t.length),(new TextDecoder).decode(t.subarray(e,r))},e.isEqualUint8Arrays=function(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0},e.isUint8Array=function(t){return"function"==typeof Uint8Array&&t instanceof Uint8Array||"[object Uint8Array]"===Object.prototype.toString.call(t)}}).call(this,r(32).Buffer)},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.setLevel=e.create=e.LoggingLevel=void 0;var o,i=r(377);function s(t,e){var r="|"+t.toUpperCase()+"|"+e+"|",n=function(){return new Date};return function(e,o){o?i[t](n()+r+e,o):i[t](n()+r+e)}}!function(t){t.trace="trace",t.debug="debug",t.info="info",t.warn="warn",t.error="error"}(o=e.LoggingLevel||(e.LoggingLevel={})),e.create=function(t){var e,r,i={};try{for(var a=n(Object.keys(o)),u=a.next();!u.done;u=a.next()){var c=u.value;i[c]=s(c,t)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return i},e.setLevel=i.setLevel},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){var n=r(6),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},function(t,e,r){var n=r(6),o=r(137),i=r(22),s=r(102),a=r(136),u=r(135),c=o("wks"),l=n.Symbol,f=u?l:l&&l.withoutSetter||s;t.exports=function(t){return i(c,t)&&(a||"string"==typeof c[t])||(a&&i(l,t)?c[t]=l[t]:c[t]=f("Symbol."+t)),c[t]}},function(t,e,r){var n=r(62);t.exports=function(t){return Object(n(t))}},function(t,e,r){var n=r(13),o=r(54),i=r(20),s=n("unscopables"),a=Array.prototype;null==a[s]&&i.f(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.readOptional=e.writeOptional=e.writeBoolean=e.readBoolean=e.writeMap=e.readMap=e.readObject=e.writeObject=e.writeDictionary=e.readDictionary=e.readCollection=e.writeCollection=e.writeString=e.readString=e.writeBytes=e.readBytes=e.writeByte=e.writeInt32=e.readInt32=e.writeInt64=e.readInt64=e.readByte=void 0;var o=r(1),i=r(24),s=r(9),a=i.fromNumber(128),u=i.fromNumber(127),c=u.not();function l(t){var e=t.read();if(-1===e)throw new o.IOError("End of stream");return e}function f(t){for(var e=0,r=0;e<32;){var n=l(t);if(r|=(127&n)<<e,0==(128&n))return r;e+=7}throw new o.IOError("Malformed int32")}function p(t,e){for(;0!=(-128&e);)t.write(127&e|128),e>>>=7;t.write(e)}function h(t,e){t.write(e)}function d(t){var e=f(t);return t.readMany(e)}function y(t,e){p(t,e.length),t.writeMany(e)}function v(t){var e=d(t);return e?s.uint8toUtf8(e):""}function m(t,e){y(t,s.uint8FromUtf8(e))}function g(t,e,r,o){var i,s;p(t,Object.keys(e).length);try{for(var a=n(Object.getOwnPropertyNames(e)),u=a.next();!u.done;u=a.next()){var c=u.value;r(t,c),o(t,e[c])}}catch(t){i={error:t}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}}function E(t,e,r){for(var n=f(t),o={},i=0;i<n;++i){o[e(t)]=r(t)}return o}e.readByte=l,e.readInt64=function(t){for(var e=i.fromNumber(0),r=0;r<64;){var n=l(t),s=i.fromNumber(n);if(e=e.or(s.and(u).shiftLeft(r)),s.and(a).equals(0))return e;r+=7}throw new o.IOError("Malformed int64")},e.writeInt64=function(t,e){for(var r=e instanceof i?e:i.fromNumber(e,!1);!r.and(c).equals(0);)t.write(r.and(u).or(a).toInt()),r=r.shiftRightUnsigned(7);t.write(r.toInt())},e.readInt32=f,e.writeInt32=p,e.writeByte=h,e.readBytes=d,e.writeBytes=y,e.readString=v,e.writeString=m,e.writeCollection=function(t,e,r){var o,i;p(t,e.length);try{for(var s=n(e),a=s.next();!a.done;a=s.next()){r(t,a.value)}}catch(t){o={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}},e.readCollection=function(t,e){for(var r=f(t),n=[],o=0;o<r;++o)n.push(e(t));return n},e.readDictionary=function(t,e){return E(t,v,e)},e.writeDictionary=function(t,e,r){g(t,e,m,r)},e.writeObject=g,e.readObject=E,e.readMap=function(t,e,r){for(var n=f(t),o=new Map,i=0;i<n;++i){var s=e(t);o.set(s,r(t))}return o},e.writeMap=function(t,e,r,n){p(t,e.size),e.forEach((function(e,o){r(t,o),n(t,e)}))},e.readBoolean=function(t){return 0!==t.readInt8()},e.writeBoolean=function(t,e){t.writeInt8(e?1:0)},e.writeOptional=function(t,e,r,n){void 0===n&&(n=function(t){return null!=t}),n(e)?(h(t,1),r(t,e)):h(t,0)},e.readOptional=function(t,e){return l(t)?e(t):void 0}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.requireNonNull=void 0;var n=r(1);e.requireNonNull=function(t,e){if(null==t)throw new n.NullValueError(e+" is null");return t}},function(t,e,r){var n=r(11);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){var n=r(19),o=r(138),i=r(2),s=r(79),a=Object.defineProperty;e.f=n?a:function(t,e,r){if(i(t),e=s(e),i(r),o)try{return a(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractSerialiser=void 0;var n=r(1),o=function(){function t(){}return t.prototype.read=function(t){throw new n.InternalError("AbstractSerialiser#read is not implemented")},t.prototype.write=function(t,e){throw new n.InternalError("AbstractSerialiser#write is not implemented")},t}();e.AbstractSerialiser=o},function(t,e,r){var n=r(14),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(n(t),e)}},function(t,e,r){var n=r(2),o=r(5),i=r(13)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||null==(r=n(s)[i])?e:o(r)}},function(t,e){t.exports=n;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(t){}function n(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function o(t){return!0===(t&&t.__isLong__)}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=o;var i={},s={};function a(t,e){var r,n,o;return e?(o=0<=(t>>>=0)&&t<256)&&(n=s[t])?n:(r=c(t,(0|t)<0?-1:0,!0),o&&(s[t]=r),r):(o=-128<=(t|=0)&&t<128)&&(n=i[t])?n:(r=c(t,t<0?-1:0,!1),o&&(i[t]=r),r)}function u(t,e){if(isNaN(t))return e?g:m;if(e){if(t<0)return g;if(t>=d)return b}else{if(t<=-y)return T;if(t+1>=y)return _}return t<0?u(-t,e).neg():c(t%h|0,t/h|0,e)}function c(t,e,r){return new n(t,e,r)}n.fromInt=a,n.fromNumber=u,n.fromBits=c;var l=Math.pow;function f(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return m;if("number"==typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return f(t.substring(1),e,r).neg();for(var o=u(l(r,8)),i=m,s=0;s<t.length;s+=8){var a=Math.min(8,t.length-s),c=parseInt(t.substring(s,s+a),r);if(a<8){var p=u(l(r,a));i=i.mul(p).add(u(c))}else i=(i=i.mul(o)).add(u(c))}return i.unsigned=e,i}function p(t,e){return"number"==typeof t?u(t,e):"string"==typeof t?f(t,e):c(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}n.fromString=f,n.fromValue=p;var h=4294967296,d=h*h,y=d/2,v=a(1<<24),m=a(0);n.ZERO=m;var g=a(0,!0);n.UZERO=g;var E=a(1);n.ONE=E;var w=a(1,!0);n.UONE=w;var S=a(-1);n.NEG_ONE=S;var _=c(-1,2147483647,!1);n.MAX_VALUE=_;var b=c(-1,-1,!0);n.MAX_UNSIGNED_VALUE=b;var T=c(0,-2147483648,!1);n.MIN_VALUE=T;var I=n.prototype;I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},I.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(T)){var e=u(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=u(l(t,6),this.unsigned),i=this,s="";;){var a=i.div(o),c=(i.sub(a.mul(o)).toInt()>>>0).toString(t);if((i=a).isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(T)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<<e);e--);return 0!=this.high?e+33:e+1},I.isZero=function(){return 0===this.high&&0===this.low},I.eqz=I.isZero,I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return 1==(1&this.low)},I.isEven=function(){return 0==(1&this.low)},I.equals=function(t){return o(t)||(t=p(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},I.eq=I.equals,I.notEquals=function(t){return!this.eq(t)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(t){return this.comp(t)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(t){return this.comp(t)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(t){return this.comp(t)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(t){return this.comp(t)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(t){if(o(t)||(t=p(t)),this.eq(t))return 0;var e=this.isNegative(),r=t.isNegative();return e&&!r?-1:!e&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(T)?T:this.not().add(E)},I.neg=I.negate,I.add=function(t){o(t)||(t=p(t));var e=this.high>>>16,r=65535&this.high,n=this.low>>>16,i=65535&this.low,s=t.high>>>16,a=65535&t.high,u=t.low>>>16,l=0,f=0,h=0,d=0;return h+=(d+=i+(65535&t.low))>>>16,f+=(h+=n+u)>>>16,l+=(f+=r+a)>>>16,l+=e+s,c((h&=65535)<<16|(d&=65535),(l&=65535)<<16|(f&=65535),this.unsigned)},I.subtract=function(t){return o(t)||(t=p(t)),this.add(t.neg())},I.sub=I.subtract,I.multiply=function(t){if(this.isZero())return m;if(o(t)||(t=p(t)),r)return c(r.mul(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned);if(t.isZero())return m;if(this.eq(T))return t.isOdd()?T:m;if(t.eq(T))return this.isOdd()?T:m;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(v)&&t.lt(v))return u(this.toNumber()*t.toNumber(),this.unsigned);var e=this.high>>>16,n=65535&this.high,i=this.low>>>16,s=65535&this.low,a=t.high>>>16,l=65535&t.high,f=t.low>>>16,h=65535&t.low,d=0,y=0,g=0,E=0;return g+=(E+=s*h)>>>16,y+=(g+=i*h)>>>16,g&=65535,y+=(g+=s*f)>>>16,d+=(y+=n*h)>>>16,y&=65535,d+=(y+=i*f)>>>16,y&=65535,d+=(y+=s*l)>>>16,d+=e*h+n*f+i*l+s*a,c((g&=65535)<<16|(E&=65535),(d&=65535)<<16|(y&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(t){if(o(t)||(t=p(t)),t.isZero())throw Error("division by zero");var e,n,i;if(r)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?c((this.unsigned?r.div_u:r.div_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?g:m;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return g;if(t.gt(this.shru(1)))return w;i=g}else{if(this.eq(T))return t.eq(E)||t.eq(S)?T:t.eq(T)?E:(e=this.shr(1).div(t).shl(1)).eq(m)?t.isNegative()?E:S:(n=this.sub(t.mul(e)),i=e.add(n.div(t)));if(t.eq(T))return this.unsigned?g:m;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();i=m}for(n=this;n.gte(t);){e=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(e)/Math.LN2),a=s<=48?1:l(2,s-48),f=u(e),h=f.mul(t);h.isNegative()||h.gt(n);)h=(f=u(e-=a,this.unsigned)).mul(t);f.isZero()&&(f=E),i=i.add(f),n=n.sub(h)}return i},I.div=I.divide,I.modulo=function(t){return o(t)||(t=p(t)),r?c((this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return c(~this.low,~this.high,this.unsigned)},I.and=function(t){return o(t)||(t=p(t)),c(this.low&t.low,this.high&t.high,this.unsigned)},I.or=function(t){return o(t)||(t=p(t)),c(this.low|t.low,this.high|t.high,this.unsigned)},I.xor=function(t){return o(t)||(t=p(t)),c(this.low^t.low,this.high^t.high,this.unsigned)},I.shiftLeft=function(t){return o(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?c(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):c(0,this.low<<t-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(t){return o(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?c(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):c(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(t){if(o(t)&&(t=t.toInt()),0===(t&=63))return this;var e=this.high;return t<32?c(this.low>>>t|e<<32-t,e>>>t,this.unsigned):c(32===t?e:e>>>t-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},I.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},I.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},n.fromBytes=function(t,e,r){return r?n.fromBytesLE(t,e):n.fromBytesBE(t,e)},n.fromBytesLE=function(t,e){return new n(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},n.fromBytesBE=function(t,e){return new n(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}},function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.StreamImpl=void 0;var o=function(){function t(t){this.listeners=t.getListeners(),this.errorCallback=t.getErrorCallback(),this.closeCallback=t.getCloseCallback()}return t.prototype.on=function(t,e){return this.attach(t,e),this},t.prototype.off=function(t,e){return this.remove(t,e),this},t.prototype.close=function(t){return this.closeCallback(t),this},t.prototype.error=function(t){return this.errorCallback(t),this},t.prototype.attach=function(t,e){var r,o;if("object"==typeof t)try{for(var i=n(Object.keys(t)),s=i.next();!s.done;s=i.next()){var a=s.value;this.attach(a,t[a])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}else e&&(this.listeners.hasOwnProperty(t)||(this.listeners[t]=[]),this.listeners[t].push(e))},t.prototype.remove=function(t,e){var r,o;if("object"==typeof t)try{for(var i=n(Object.keys(t)),s=i.next();!s.done;s=i.next()){var a=s.value;this.remove(a,t[a])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}else this.listeners.hasOwnProperty(t)&&(this.listeners[t]=e?this.listeners[t].filter((function(t){return t!==e})):[])},t}();e.StreamImpl=o},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e){t.exports=function(t){return Map.prototype.entries.call(t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BufferOutputStream=void 0;var n=r(1),o=r(9),i=function(){function t(t){void 0===t&&(t=32),"number"==typeof t?(this.buffer=new Uint8Array(t),this.count=0):(this.buffer=t,this.count=t.length)}return t.prototype.write=function(t){this.ensureCapacity(this.count+1),this.buffer[this.count++]=t},t.prototype.writeMany=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=t.length),0!==r&&(this.ensureCapacity(this.count+r),this.buffer.set(t.subarray(e,e+r),this.count),this.count+=r)},t.prototype.writeString=function(t){var e=o.uint8FromUtf8(t),r=e.length;this.ensureCapacity(this.count+r),this.buffer.set(e,this.count),this.count+=r},t.prototype.writeInt8=function(t){this.ensureCapacity(this.count+1),o.writeInt8(this.buffer,this.count++,t)},t.prototype.writeInt32=function(t){this.ensureCapacity(this.count+4),o.writeInt32BE(this.buffer,this.count,t),this.count+=4},t.prototype.writeInt64=function(t){this.ensureCapacity(this.count+8),o.writeInt32BE(this.buffer,this.count,t.getHighBits()),o.writeInt32BE(this.buffer,this.count+4,t.getLowBits()),this.count+=8},t.prototype.getBuffer=function(){return this.buffer.subarray(0,this.count)},t.prototype.getBase64=function(){return o.uint8ToBase64(this.getBuffer())},t.prototype.ensureCapacity=function(t){t-this.buffer.length>0&&this.grow(t)},t.prototype.grow=function(t){var e=this.buffer.length<<1;e-t<0&&(e=t);try{var r=new Uint8Array(e);r.set(this.buffer),this.buffer=r}catch(t){throw new n.IOError("Unable to resize BufferOutputStream to "+e)}},t}();e.BufferOutputStream=i},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TopicTypeEnum=e.TopicType=void 0;var n=r(70),o=function(t,e,r){this.id=t,this.stateful=e,this.functional=r};e.TopicType=o,e.TopicTypeEnum={BINARY:new o(14,!0,!1),JSON:new o(15,!0,!1),STRING:new o(17,!0,!1),INT64:new o(18,!0,!1),DOUBLE:new o(19,!0,!1),TIME_SERIES:new o(16,!0,!1),RECORD_V2:new o(20,!0,!1),UNKNOWN_TOPIC_TYPE:new o(21,!1,!1)},n.enumerize(e.TopicTypeEnum)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTypes=e.DataTypesImpl=void 0;var n=r(1),o=r(92),i=r(383),s=r(182),a=r(384),u=r(122),c=r(388),l=r(389),f=r(71),p=r(390),h=r(391),d=r(124),y=r(72),v=r(9),m=r(29),g=function(){function t(){this.recordv2Impl=new h.RecordV2DataTypeImpl,this.binaryImpl=new i.BinaryDataTypeImpl,this.stringImpl=new p.StringDataTypeImpl,this.doubleImpl=new c.DoubleDataTypeImpl,this.int64Impl=new l.Int64DataTypeImpl,this.jsonImpl=new a.JSONDataTypeImpl,this.anyImpl=new o.AnyDataTypeImpl}return t.prototype.binary=function(){return this.binaryImpl},t.prototype.string=function(){return this.stringImpl},t.prototype.double=function(){return this.doubleImpl},t.prototype.int64=function(){return this.int64Impl},t.prototype.json=function(){return this.jsonImpl},t.prototype.recordv2=function(){return this.recordv2Impl},t.prototype.any=function(){return this.anyImpl},t.prototype.timeseries=function(t){return y.TimeSeriesEventDataType.create(t)},t.prototype.getByName=function(t){switch(t.toLowerCase()){case"json":return this.json();case"int64":return this.int64();case"binary":return this.binary();case"string":return this.string();case"double":return this.double();case"record_v2":return this.recordv2();default:return}},t.prototype.getByValue=function(t){return t===m.TopicTypeEnum.BINARY||t instanceof s.BinaryImpl||v.isUint8Array(t)?this.binary():t===m.TopicTypeEnum.JSON||t instanceof u.JSONImpl||t.constructor===Object||"boolean"==typeof t?this.json():t===m.TopicTypeEnum.STRING||"string"==typeof t?this.string():t===m.TopicTypeEnum.DOUBLE||"number"==typeof t?this.double():t===m.TopicTypeEnum.INT64||t instanceof f.Int64Impl?this.int64():t===m.TopicTypeEnum.RECORD_V2||t instanceof d.RecordV2Impl?this.recordv2():void 0},t.prototype.get=function(t){var e;return"string"==typeof t&&(e=this.getByName(t)),e||(e=this.getByValue(t)),e||(e=this.getByClassSafely(t)),e||null},t.prototype.getChecked=function(t){if(null==t)throw new n.IllegalArgumentError("No data type for "+t);if(t instanceof h.RecordV2DataTypeImpl||t instanceof i.BinaryDataTypeImpl||t instanceof p.StringDataTypeImpl||t instanceof c.DoubleDataTypeImpl||t instanceof l.Int64DataTypeImpl||t instanceof a.JSONDataTypeImpl)return t;var e=this.get(t);if(null===e)throw new n.IllegalArgumentError("No data type for "+t);return e},t.prototype.getValueClassChecked=function(t){switch(this.getChecked(t)){case this.jsonImpl:return u.JSONImpl;case this.binaryImpl:return s.BinaryImpl;case this.stringImpl:return String;case this.doubleImpl:return Number;case this.int64Impl:return f.Int64Impl;case this.recordv2Impl:return d.RecordV2Impl;default:return}},t.prototype.getByClassSafely=function(t){switch(t){case u.JSONImpl:return this.jsonImpl;case s.BinaryImpl:return this.binaryImpl;case String:return this.stringImpl;case Number:return this.doubleImpl;case f.Int64Impl:return this.int64Impl;case d.RecordV2Impl:return this.recordv2Impl;default:return}},t.prototype.getByClass=function(t){var e=this.getByClassSafely(t);if(e)return e;throw new n.IllegalArgumentError("No data type for "+t)},t}();e.DataTypesImpl=g;var E=new g;e.DataTypes=E},function(t,e,r){"use strict";(function(t){var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=void 0;var o=r(1),i=r(25),s=r(36),a=new(function(){function e(){this.pendingEvents=[],this.events=[],this.busy=!1}return e.prototype.addEmitterEvent=function(e){var r=this;this.pendingEvents.push(e),this.busy||(this.busy=!0,t.nextTick((function(){r.drainEmitterQueue()})))},e.prototype.drainEmitterQueue=function(){var e,r,o=this;this.events=this.pendingEvents,this.pendingEvents=[];try{for(var i=n(this.events),s=i.next();!s.done;s=i.next()){var a=s.value;try{a()}catch(t){}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}this.pendingEvents.length>0?t.nextTick((function(){o.drainEmitterQueue()})):this.busy=!1},e}()),u=function(){function t(t){var e=this;if(this.listeners={},this.closed=!1,this.listener=function(){},void 0===t||void 0===t.stream){var r={getListeners:function(){return e.listeners},getErrorCallback:function(){return e.error.bind(e)},getCloseCallback:function(){return e.close.bind(e)}};this.stream=new i.StreamImpl(r)}else{if(this.stream=t.stream,void 0===t.listeners)throw new o.InternalError("Listeners must be defined when supplying a stream");this.listeners=t.listeners}void 0!==t&&void 0!==t.event&&this.stream.on(t.event,t.callback)}return t.create=function(){var e={},r=function(){},n=function(){};return{getListeners:function(){return e},getErrorCallback:function(){return function(t){r(t)}},getCloseCallback:function(){return function(t){n(t)}},emitter:function(o){var i=new t({stream:o,listeners:e});return r=i.error.bind(i),n=i.close.bind(i),i}}},t.prototype.emitUnsafe=function(t,e){var r=this,n=function(t){s.callWithArguments(t,e||[])};a.addEmitterEvent((function(){r.listeners.hasOwnProperty(t)&&r.listeners[t].forEach(n)})),this.listener(t,e)},t.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];!this.closed&&t&&this.emitUnsafe(t,e)},t.prototype.immediate=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(!this.closed&&t){var n=function(t){try{s.callWithArguments(t,e||[])}catch(t){}};this.listeners.hasOwnProperty(t)&&this.listeners[t].forEach(n)}},t.prototype.error=function(t){this.closed||(this.emitUnsafe("error",[t]),this.close(t?t.message:void 0))},t.prototype.close=function(t){this.closed||(this.closed=!0,this.emitUnsafe("close",[t]))},t.prototype.listen=function(t){this.listener=t},t.prototype.get=function(){return this.stream},t}();e.Emitter=u}).call(this,r(127))},function(t,e,r){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <http://feross.org> * @license MIT */ var n=r(214),o=r(215),i=r(216);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=p(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),o=(t=a(t,n)).write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|h(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):p(t,e);if("Buffer"===e.type&&i(e.data))return p(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=a(t,e<0?0:0|h(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function p(t,e){var r=e.length<0?0:0|h(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function h(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,o){var i,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var l=-1;for(i=r;i<a;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){for(var f=!0,p=0;p<u;p++)if(c(t,i+p)!==c(e,p)){f=!1;break}if(f)return i}return-1}function E(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function w(t,e,r,n){return q(F(e,t.length-r),t,r,n)}function S(t,e,r,n){return q(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function _(t,e,r,n){return S(t,e,r,n)}function b(t,e,r,n){return q(V(e),t,r,n)}function T(t,e,r,n){return q(function(t,e){for(var r,n,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function I(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,s,a,u,c=t[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return l(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return f(null,t)},u.allocUnsafeSlow=function(t){return f(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?O(this,0,t):y.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(i,s),c=this.slice(n,o),l=t.slice(e,r),f=0;f<a;++f)if(c[f]!==l[f]){i=c[f],s=l[f];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return E(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return S(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return b(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function R(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function N(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=j(t[i]);return o}function A(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function P(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function x(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function M(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function D(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function L(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,i){return i||L(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,i){return i||L(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var o=e-t;r=new u(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||x(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||x(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e