UNPKG

diffusion

Version:

Diffusion JavaScript client

2 lines 57.3 kB
/*! For license information please see diffusion-feature-topic-views.js.LICENSE.txt */ (()=>{var t={526:(t,r)=>{"use strict";r.byteLength=function(t){var r=s(t),e=r[0],n=r[1];return 3*(e+n)/4-n},r.toByteArray=function(t){var r,e,o=s(t),u=o[0],a=o[1],f=new i(function(t,r,e){return 3*(r+e)/4-e}(0,u,a)),l=0,c=a>0?u-4:u;for(e=0;e<c;e+=4)r=n[t.charCodeAt(e)]<<18|n[t.charCodeAt(e+1)]<<12|n[t.charCodeAt(e+2)]<<6|n[t.charCodeAt(e+3)],f[l++]=r>>16&255,f[l++]=r>>8&255,f[l++]=255&r;return 2===a&&(r=n[t.charCodeAt(e)]<<2|n[t.charCodeAt(e+1)]>>4,f[l++]=255&r),1===a&&(r=n[t.charCodeAt(e)]<<10|n[t.charCodeAt(e+1)]<<4|n[t.charCodeAt(e+2)]>>2,f[l++]=r>>8&255,f[l++]=255&r),f},r.fromByteArray=function(t){for(var r,n=t.length,i=n%3,o=[],u=16383,s=0,f=n-i;s<f;s+=u)o.push(a(t,s,s+u>f?f:s+u));return 1===i?(r=t[n-1],o.push(e[r>>2]+e[r<<4&63]+"==")):2===i&&(r=(t[n-2]<<8)+t[n-1],o.push(e[r>>10]+e[r>>4&63]+e[r<<2&63]+"=")),o.join("")};for(var e=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0;u<64;++u)e[u]=o[u],n[o.charCodeAt(u)]=u;function s(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function a(t,r,n){for(var i,o,u=[],s=r;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),u.push(e[(o=i)>>18&63]+e[o>>12&63]+e[o>>6&63]+e[63&o]);return u.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},287:(t,r,e)=>{"use strict";var n=e(526),i=e(251);r.hp=s,r.IS=50;var o=2147483647;function u(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return r.__proto__=s.prototype,r}function s(t,r,e){if("number"==typeof t){if("string"==typeof r)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return a(t,r,e)}function a(t,r,e){if("string"==typeof t)return function(t,r){if("string"==typeof r&&""!==r||(r="utf8"),!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var e=0|p(t,r),n=u(e),i=n.write(t,r);return i!==e&&(n=n.slice(0,i)),n}(t,r);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(D(t,ArrayBuffer)||t&&D(t.buffer,ArrayBuffer))return function(t,r,e){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(e||0))throw new RangeError('"length" is outside of buffer bounds');var n;return(n=void 0===r&&void 0===e?new Uint8Array(t):void 0===e?new Uint8Array(t,r):new Uint8Array(t,r,e)).__proto__=s.prototype,n}(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,r,e);var i=function(t){if(s.isBuffer(t)){var r=0|h(t.length),e=u(r);return 0===e.length||t.copy(e,0,0,r),e}return void 0!==t.length?"number"!=typeof t.length||F(t.length)?u(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return f(t),u(t<0?0:0|h(t))}function c(t){for(var r=t.length<0?0:0|h(t.length),e=u(r),n=0;n<r;n+=1)e[n]=255&t[n];return e}function h(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function p(t,r){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||D(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var e=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===e)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return x(t).length;default:if(i)return n?-1:j(t).length;r=(""+r).toLowerCase(),i=!0}}function g(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,r,e);case"utf8":case"utf-8":return T(this,r,e);case"ascii":return A(this,r,e);case"latin1":case"binary":return B(this,r,e);case"base64":return I(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function d(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),F(e=+e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=s.from(r,n)),s.isBuffer(r))return 0===r.length?-1:w(t,r,e,n,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):w(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,r,e,n,i){var o,u=1,s=t.length,a=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,s/=2,a/=2,e/=2}function f(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var l=-1;for(o=e;o<s;o++)if(f(t,o)===f(r,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===a)return l*u}else-1!==l&&(o-=o-l),l=-1}else for(e+a>s&&(e=s-a),o=e;o>=0;o--){for(var c=!0,h=0;h<a;h++)if(f(t,o+h)!==f(r,h)){c=!1;break}if(c)return o}return-1}function v(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;n>o/2&&(n=o/2);for(var u=0;u<n;++u){var s=parseInt(r.substr(2*u,2),16);if(F(s))return u;t[e+u]=s}return u}function b(t,r,e,n){return q(j(r,t.length-e),t,e,n)}function m(t,r,e,n){return q(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function _(t,r,e,n){return m(t,r,e,n)}function E(t,r,e,n){return q(x(r),t,e,n)}function S(t,r,e,n){return q(function(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(n);return o}(r,t.length-e),t,e,n)}function I(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function T(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,s,a,f=t[i],l=null,c=f>239?4:f>223?3:f>191?2:1;if(i+c<=e)switch(c){case 1:f<128&&(l=f);break;case 2:128==(192&(o=t[i+1]))&&(a=(31&f)<<6|63&o)>127&&(l=a);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(a=(15&f)<<12|(63&o)<<6|63&u)>2047&&(a<55296||a>57343)&&(l=a);break;case 4:o=t[i+1],u=t[i+2],s=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&s)&&(a=(15&f)<<18|(63&o)<<12|(63&u)<<6|63&s)>65535&&a<1114112&&(l=a)}null===l?(l=65533,c=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=c}return function(t){var r=t.length;if(r<=O)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=O));return e}(n)}s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(t,r,e){return a(t,r,e)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(t,r,e){return function(t,r,e){return f(t),t<=0?u(t):void 0!==r?"string"==typeof e?u(t).fill(r,e):u(t).fill(r):u(t)}(t,r,e)},s.allocUnsafe=function(t){return l(t)},s.allocUnsafeSlow=function(t){return l(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,r){if(D(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),D(r,Uint8Array)&&(r=s.from(r,r.offset,r.byteLength)),!s.isBuffer(t)||!s.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},s.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}},s.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=s.allocUnsafe(r),i=0;for(e=0;e<t.length;++e){var o=t[e];if(D(o,Uint8Array)&&(o=s.from(o)),!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.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 r=0;r<t;r+=2)y(this,r,r+1);return this},s.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 r=0;r<t;r+=4)y(this,r,r+3),y(this,r+1,r+2);return this},s.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 r=0;r<t;r+=8)y(this,r,r+7),y(this,r+1,r+6),y(this,r+2,r+5),y(this,r+3,r+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):g.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=r.IS;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},s.prototype.compare=function(t,r,e,n,i){if(D(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),a=Math.min(o,u),f=this.slice(n,i),l=t.slice(r,e),c=0;c<a;++c)if(f[c]!==l[c]){o=f[c],u=l[c];break}return o<u?-1:u<o?1:0},s.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},s.prototype.indexOf=function(t,r,e){return d(this,t,r,e,!0)},s.prototype.lastIndexOf=function(t,r,e){return d(this,t,r,e,!1)},s.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(e)?(e>>>=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,t,r,e);case"utf8":case"utf-8":return b(this,t,r,e);case"ascii":return m(this,t,r,e);case"latin1":case"binary":return _(this,t,r,e);case"base64":return E(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function A(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function B(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function C(t,r,e){var n,i=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>i)&&(e=i);for(var o="",u=r;u<e;++u)o+=(n=t[u])<16?"0"+n.toString(16):n.toString(16);return o}function R(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function N(t,r,e,n,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function U(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function V(t,r,e,n,o){return r=+r,e>>>=0,o||U(t,0,e,4),i.write(t,r,e,n,23,4),e+4}function P(t,r,e,n,o){return r=+r,e>>>=0,o||U(t,0,e,8),i.write(t,r,e,n,52,8),e+8}s.prototype.slice=function(t,r){var e=this.length;(t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(r=void 0===r?e:~~r)<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t);var n=this.subarray(t,r);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(t,r,e){t>>>=0,r>>>=0,e||L(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},s.prototype.readUIntBE=function(t,r,e){t>>>=0,r>>>=0,e||L(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},s.prototype.readUInt8=function(t,r){return t>>>=0,r||L(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,r){return t>>>=0,r||L(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,r){return t>>>=0,r||L(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,r){return t>>>=0,r||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,r){return t>>>=0,r||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||L(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},s.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||L(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},s.prototype.readInt8=function(t,r){return t>>>=0,r||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,r){t>>>=0,r||L(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt16BE=function(t,r){t>>>=0,r||L(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt32LE=function(t,r){return t>>>=0,r||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,r){return t>>>=0,r||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,r){return t>>>=0,r||L(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,r){return t>>>=0,r||L(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,r){return t>>>=0,r||L(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,r){return t>>>=0,r||L(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||N(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},s.prototype.writeUIntBE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||N(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},s.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||N(this,t,r,1,255,0),this[r]=255&t,r+1},s.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||N(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},s.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||N(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},s.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||N(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},s.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||N(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},s.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*e-1);N(this,t,r,e,i-1,-i)}var o=0,u=1,s=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===s&&0!==this[r+o-1]&&(s=1),this[r+o]=(t/u|0)-s&255;return r+e},s.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*e-1);N(this,t,r,e,i-1,-i)}var o=e-1,u=1,s=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===s&&0!==this[r+o+1]&&(s=1),this[r+o]=(t/u|0)-s&255;return r+e},s.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||N(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=255&t,r+1},s.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||N(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},s.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||N(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},s.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||N(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},s.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||N(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},s.prototype.writeFloatLE=function(t,r,e){return V(this,t,r,!0,e)},s.prototype.writeFloatBE=function(t,r,e){return V(this,t,r,!1,e)},s.prototype.writeDoubleLE=function(t,r,e){return P(this,t,r,!0,e)},s.prototype.writeDoubleBE=function(t,r,e){return P(this,t,r,!1,e)},s.prototype.copy=function(t,r,e,n){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i=n-e;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,e,n);else if(this===t&&e<r&&r<n)for(var o=i-1;o>=0;--o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,n),r);return i},s.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=s.isBuffer(t)?t:s.from(t,n),a=u.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<e-r;++o)this[o+r]=u[o%a]}return this};var M=/[^+/0-9A-Za-z-_]/g;function j(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function x(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function D(t,r){return t instanceof r||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===r.name}function F(t){return t!=t}},251:(t,r)=>{r.read=function(t,r,e,n,i){var o,u,s=8*i-n-1,a=(1<<s)-1,f=a>>1,l=-7,c=e?i-1:0,h=e?-1:1,p=t[r+c];for(c+=h,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+t[r+c],c+=h,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=n;l>0;u=256*u+t[r+c],c+=h,l-=8);if(0===o)o=1-f;else{if(o===a)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),o-=f}return(p?-1:1)*u*Math.pow(2,o-n)},r.write=function(t,r,e,n,i,o){var u,s,a,f=8*o-i-1,l=(1<<f)-1,c=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,y=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-u))<1&&(u--,a*=2),(r+=u+c>=1?h/a:h*Math.pow(2,1-c))*a>=2&&(u++,a/=2),u+c>=l?(s=0,u=l):u+c>=1?(s=(r*a-1)*Math.pow(2,i),u+=c):(s=r*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;t[e+p]=255&s,p+=g,s/=256,i-=8);for(u=u<<i|s,f+=i;f>0;t[e+p]=255&u,p+=g,u/=256,f-=8);t[e+p-g]|=128*y}},65:function(t,r,e){var n,i;!function(o,u){"use strict";n=function(){var t=function(){},r="undefined",e=typeof window!==r&&typeof window.navigator!==r&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function i(t,r){var e=t[r];if("function"==typeof e.bind)return e.bind(t);try{return Function.prototype.bind.call(e,t)}catch(r){return function(){return Function.prototype.apply.apply(e,[t,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(r,e){for(var i=0;i<n.length;i++){var o=n[i];this[o]=i<r?t:this.methodFactory(o,r,e)}this.log=this.debug}function s(t,e,n){return function(){typeof console!==r&&(u.call(this,e,n),this[t].apply(this,arguments))}}function a(n,u,a){return function(n){return"debug"===n&&(n="log"),typeof console!==r&&("trace"===n&&e?o:void 0!==console[n]?i(console,n):void 0!==console.log?i(console,"log"):t)}(n)||s.apply(this,arguments)}function f(t,e,i){var o,s=this,f="loglevel";function l(){var t;if(typeof window!==r&&f){try{t=window.localStorage[f]}catch(t){}if(typeof t===r)try{var e=window.document.cookie,n=e.indexOf(encodeURIComponent(f)+"=");-1!==n&&(t=/^([^;]+)/.exec(e.slice(n))[1])}catch(t){}return void 0===s.levels[t]&&(t=void 0),t}}"string"==typeof t?f+=":"+t:"symbol"==typeof t&&(f=void 0),s.name=t,s.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},s.methodFactory=i||a,s.getLevel=function(){return o},s.setLevel=function(e,i){if("string"==typeof e&&void 0!==s.levels[e.toUpperCase()]&&(e=s.levels[e.toUpperCase()]),!("number"==typeof e&&e>=0&&e<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(o=e,!1!==i&&function(t){var e=(n[t]||"silent").toUpperCase();if(typeof window!==r&&f){try{return void(window.localStorage[f]=e)}catch(t){}try{window.document.cookie=encodeURIComponent(f)+"="+e+";"}catch(t){}}}(e),u.call(s,e,t),typeof console===r&&e<s.levels.SILENT)return"No console available for logging"},s.setDefaultLevel=function(t){l()||s.setLevel(t,!1)},s.enableAll=function(t){s.setLevel(s.levels.TRACE,t)},s.disableAll=function(t){s.setLevel(s.levels.SILENT,t)};var c=l();null==c&&(c=null==e?"WARN":e),s.setLevel(c,!1)}var l=new f,c={};l.getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var r=c[t];return r||(r=c[t]=new f(t,l.getLevel(),l.methodFactory)),r};var h=typeof window!==r?window.log:void 0;return l.noConflict=function(){return typeof window!==r&&window.log===l&&(window.log=h),l},l.getLoggers=function(){return c},l.default=l,l},void 0===(i=n.call(r,e,r,t))||(t.exports=i)}()},570:t=>{t.exports=e;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 e(t,r,e){this.low=0|t,this.high=0|r,this.unsigned=!!e}function n(t){return!0===(t&&t.__isLong__)}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0}),e.isLong=n;var i={},o={};function u(t,r){var e,n,u;return r?(u=0<=(t>>>=0)&&t<256)&&(n=o[t])?n:(e=a(t,(0|t)<0?-1:0,!0),u&&(o[t]=e),e):(u=-128<=(t|=0)&&t<128)&&(n=i[t])?n:(e=a(t,t<0?-1:0,!1),u&&(i[t]=e),e)}function s(t,r){if(isNaN(t))return r?w:d;if(r){if(t<0)return w;if(t>=p)return E}else{if(t<=-g)return S;if(t+1>=g)return _}return t<0?s(-t,r).neg():a(t%h|0,t/h|0,r)}function a(t,r,n){return new e(t,r,n)}e.fromInt=u,e.fromNumber=s,e.fromBits=a;var f=Math.pow;function l(t,r,e){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return d;if("number"==typeof r?(e=r,r=!1):r=!!r,(e=e||10)<2||36<e)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return l(t.substring(1),r,e).neg();for(var i=s(f(e,8)),o=d,u=0;u<t.length;u+=8){var a=Math.min(8,t.length-u),c=parseInt(t.substring(u,u+a),e);if(a<8){var h=s(f(e,a));o=o.mul(h).add(s(c))}else o=(o=o.mul(i)).add(s(c))}return o.unsigned=r,o}function c(t,r){return"number"==typeof t?s(t,r):"string"==typeof t?l(t,r):a(t.low,t.high,"boolean"==typeof r?r:t.unsigned)}e.fromString=l,e.fromValue=c;var h=4294967296,p=h*h,g=p/2,y=u(1<<24),d=u(0);e.ZERO=d;var w=u(0,!0);e.UZERO=w;var v=u(1);e.ONE=v;var b=u(1,!0);e.UONE=b;var m=u(-1);e.NEG_ONE=m;var _=a(-1,2147483647,!1);e.MAX_VALUE=_;var E=a(-1,-1,!0);e.MAX_UNSIGNED_VALUE=E;var S=a(0,-2147483648,!1);e.MIN_VALUE=S;var I=e.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(S)){var r=s(t),e=this.div(r),n=e.mul(r).sub(this);return e.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=s(f(t,6),this.unsigned),o=this,u="";;){var a=o.div(i),l=(o.sub(a.mul(i)).toInt()>>>0).toString(t);if((o=a).isZero())return l+u;for(;l.length<6;)l="0"+l;u=""+l+u}},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(S)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,r=31;r>0&&!(t&1<<r);r--);return 0!=this.high?r+33:r+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&~this.low)},I.isEven=function(){return!(1&this.low)},I.equals=function(t){return n(t)||(t=c(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(n(t)||(t=c(t)),this.eq(t))return 0;var r=this.isNegative(),e=t.isNegative();return r&&!e?-1:!r&&e?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(S)?S:this.not().add(v)},I.neg=I.negate,I.add=function(t){n(t)||(t=c(t));var r=this.high>>>16,e=65535&this.high,i=this.low>>>16,o=65535&this.low,u=t.high>>>16,s=65535&t.high,f=t.low>>>16,l=0,h=0,p=0,g=0;return p+=(g+=o+(65535&t.low))>>>16,h+=(p+=i+f)>>>16,l+=(h+=e+s)>>>16,l+=r+u,a((p&=65535)<<16|(g&=65535),(l&=65535)<<16|(h&=65535),this.unsigned)},I.subtract=function(t){return n(t)||(t=c(t)),this.add(t.neg())},I.sub=I.subtract,I.multiply=function(t){if(this.isZero())return d;if(n(t)||(t=c(t)),r)return a(r.mul(this.low,this.high,t.low,t.high),r.get_high(),this.unsigned);if(t.isZero())return d;if(this.eq(S))return t.isOdd()?S:d;if(t.eq(S))return this.isOdd()?S:d;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(y)&&t.lt(y))return s(this.toNumber()*t.toNumber(),this.unsigned);var e=this.high>>>16,i=65535&this.high,o=this.low>>>16,u=65535&this.low,f=t.high>>>16,l=65535&t.high,h=t.low>>>16,p=65535&t.low,g=0,w=0,v=0,b=0;return v+=(b+=u*p)>>>16,w+=(v+=o*p)>>>16,v&=65535,w+=(v+=u*h)>>>16,g+=(w+=i*p)>>>16,w&=65535,g+=(w+=o*h)>>>16,w&=65535,g+=(w+=u*l)>>>16,g+=e*p+i*h+o*l+u*f,a((v&=65535)<<16|(b&=65535),(g&=65535)<<16|(w&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(t){if(n(t)||(t=c(t)),t.isZero())throw Error("division by zero");var e,i,o;if(r)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?a((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?w:d;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return w;if(t.gt(this.shru(1)))return b;o=w}else{if(this.eq(S))return t.eq(v)||t.eq(m)?S:t.eq(S)?v:(e=this.shr(1).div(t).shl(1)).eq(d)?t.isNegative()?v:m:(i=this.sub(t.mul(e)),o=e.add(i.div(t)));if(t.eq(S))return this.unsigned?w:d;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();o=d}for(i=this;i.gte(t);){e=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var u=Math.ceil(Math.log(e)/Math.LN2),l=u<=48?1:f(2,u-48),h=s(e),p=h.mul(t);p.isNegative()||p.gt(i);)p=(h=s(e-=l,this.unsigned)).mul(t);h.isZero()&&(h=v),o=o.add(h),i=i.sub(p)}return o},I.div=I.divide,I.modulo=function(t){return n(t)||(t=c(t)),r?a((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 a(~this.low,~this.high,this.unsigned)},I.and=function(t){return n(t)||(t=c(t)),a(this.low&t.low,this.high&t.high,this.unsigned)},I.or=function(t){return n(t)||(t=c(t)),a(this.low|t.low,this.high|t.high,this.unsigned)},I.xor=function(t){return n(t)||(t=c(t)),a(this.low^t.low,this.high^t.high,this.unsigned)},I.shiftLeft=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):a(0,this.low<<t-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):a(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(t){if(n(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;return t<32?a(this.low>>>t|r<<32-t,r>>>t,this.unsigned):a(32===t?r:r>>>t-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},I.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var t=this.high,r=this.low;return[255&r,r>>>8&255,r>>>16&255,r>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},I.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,r>>>24,r>>>16&255,r>>>8&255,255&r]},e.fromBytes=function(t,r,n){return n?e.fromBytesLE(t,r):e.fromBytesBE(t,r)},e.fromBytesLE=function(t,r){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},e.fromBytesBE=function(t,r){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)}},191:function(t,r){"use strict";var e,n=this&&this.__extends||(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(r,"__esModule",{value:!0}),r.InternalError=r.IllegalStateError=r.RetryLimitError=r.SchemaParseError=r.SchemaViolationError=r.InvalidScriptError=r.InvalidFilterError=r.OutOfBoundsError=r.IllegalArgumentError=r.SessionError=r.IOError=r.InvalidDataError=r.AssertionError=r.RuntimeError=r.NullValueError=void 0;var i=function(t){function r(r){return t.call(this,r)||this}return n(r,t),r.prototype.getType=function(){return r.type},r.type="null_value_error",r}(Error);r.NullValueError=i;var o=function(t){function r(r,e){var n=t.call(this,r)||this;return n.cause=e,n}return n(r,t),r.prototype.getType=function(){return r.type},r.type="runtime_error",r}(Error);r.RuntimeError=o;var u=function(t){function r(r){return t.call(this,r)||this}return n(r,t),r.prototype.getType=function(){return r.type},r.type="assertion_error",r}(Error);r.AssertionError=u;var s=function(t){function r(r){return t.call(this,r)||this}return n(r,t),r.prototype.getType=function(){return r.type},r.type="invalid_data_error",r}(Error);r.InvalidDataError=s;var a=function(t){function r(r){return t.call(this,r)||this}return n(r,t),r.prototype.getType=function(){return r.type},r.type="io_error",r}(Error);r.IOError=a;var f=function(t){function r(r,e){var n=t.call(this,r)||this;return n.cause=e,n}return n(r,t),r.prototype.getType=function(){return r.type},r.type="session_error",r}(Error);r.SessionError=f;var l=function(t){function r(r){return t.call(this,r)||this}return n(r,t),r.prototype.getType=function(){return r.type},r.type="illegal_argument_error",r}(Error);r.IllegalArgumentError=l;var c=function(t){function r(r){return t.call(this,r)||this}return n(r,t),r.prototype.getType=function(){return r.type},r.type="out_of_bounds_error",r}(Error);r.OutOfBoundsError=c;var h=function(t){function r(r,e){var n=t.call(this,r)||this;return n.errors=e,n}return n(r,t),r.prototype.getType=function(){return r.type},r.type="invalid_filter_error",r}(Error);r.InvalidFilterError=h;var p=function(t){function r(r,e){var n=t.call(this,r)||this;return n.errors=e,n}return n(r,t),r.prototype.getType=function(){return r.type},r.type="invalid_script_error",r}(Error);r.InvalidScriptError=p;var g=function(t){function r(r){return t.call(this,r)||this}return n(r,t),r.prototype.getType=function(){return r.type},r.type="schema_violation_error",r}(Error);r.SchemaViolationError=g;var y=function(t){function r(r){return t.call(this,r)||this}return n(r,t),r.prototype.getType=function(){return r.type},r.type="schema_parse_error",r}(Error);r.SchemaParseError=y;var d=function(t){function r(r){return t.call(this,r)||this}return n(r,t),r.prototype.getType=function(){return r.type},r.type="retry_limit_error",r}(Error);r.RetryLimitError=d;var w=function(t){function r(r){return t.call(this,r)||this}return n(r,t),r.prototype.getType=function(){return r.type},r.type="illegal_state_error",r}(Error);r.IllegalStateError=w;var v=function(t){function r(r){return t.call(this,r)||this}return n(r,t),r.prototype.getType=function(){return r.type},r.type="internal_error",r}(Error);r.InternalError=v},410:(t,r,e)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TopicViewsImpl=void 0;var n=e(191),i=e(718),o=e(927),u=e(97),s=e(536),a=e(400),f=u.create("TopicViews"),l=function(){function t(t){this.internal=t;var r=t.getServiceLocator();this.CREATE_TOPIC_VIEW=r.obtain(i.CREATE_TOPIC_VIEW),this.LIST_TOPIC_VIEWS=r.obtain(i.LIST_TOPIC_VIEWS),this.GET_TOPIC_VIEW=r.obtain(i.GET_TOPIC_VIEW),this.REMOVE_TOPIC_VIEW=r.obtain(i.REMOVE_TOPIC_VIEW)}return t.prototype.createTopicView=function(t,r){var e=this;return new Promise((function(i,u){if(0===s.requireNonNull(t,"name").length)throw new n.IllegalArgumentError("Topic View name cannot be empty");if(e.internal.checkConnected(u)){var l=new o.NamedTopicViewSpecification(t,s.requireNonNull(r,"specification"));e.CREATE_TOPIC_VIEW.send(l,(function(t,r){a.responseSuccess(t,r)?r.errors?(u(r.errors.errors),f.debug("Create topic view failed")):i(r.view):(u(t),f.debug("Create topic view failed"))}))}}))},t.prototype.listTopicViews=function(){var t=this;return new Promise((function(r,e){t.internal.checkConnected(e)&&t.LIST_TOPIC_VIEWS.send(null,(function(t,n){a.responseSuccess(t,n)?r(n.result):(e(t),f.debug("List topic views failed"))}))}))},t.prototype.getTopicView=function(t){var r=this;return new Promise((function(e,n){r.internal.checkConnected(n)&&r.GET_TOPIC_VIEW.send(s.requireNonNull(t,"name"),(function(t,r){a.responseSuccess(t,r)?e(r.result):(n(t),f.debug("Get topic view failed"))}))}))},t.prototype.removeTopicView=function(t){var r=this;return new Promise((function(e,n){r.internal.checkConnected(n)&&r.REMOVE_TOPIC_VIEW.send(s.requireNonNull(t,"name"),(function(t){t?(n(t),f.debug("Remove topic view failed")):e()}))}))},t}();r.TopicViewsImpl=l},771:function(t,r,e){"use strict";var n=this&&this.__values||function(t){var r="function"==typeof Symbol&&Symbol.iterator,e=r&&t[r],n=0;if(e)return e.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(r?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(r,"__esModule",{value:!0}),r.readOptional=r.writeOptional=r.writeBoolean=r.readBoolean=r.writeMap=r.readMap=r.readObject=r.writeObject=r.writeDictionary=r.readDictionary=r.readCollection=r.writeCollection=r.writeString=r.readString=r.writeBytes=r.readBytes=r.writeByte=r.writeInt32=r.readInt32=r.writeInt64=r.readInt64=r.readByte=void 0;var i=e(191),o=e(570),u=e(224),s=o.fromNumber(128),a=o.fromNumber(127),f=a.not();function l(t){var r=t.read();if(-1===r)throw new i.IOError("End of stream");return r}function c(t){for(var r=0,e=0;r<32;){var n=l(t);if(e|=(127&n)<<r,!(128&n))return e;r+=7}throw new i.IOError("Malformed int32")}function h(t,r){for(;-128&r;)t.write(127&r|128),r>>>=7;t.write(r)}function p(t,r){t.write(r)}function g(t){var r=c(t);return t.readMany(r)}function y(t,r){h(t,r.length),t.writeMany(r)}function d(t){var r=g(t);return r?u.uint8toUtf8(r):""}function w(t,r){y(t,u.uint8FromUtf8(r))}function v(t,r,e,i){var o,u;h(t,Object.keys(r).length);try{for(var s=n(Object.getOwnPropertyNames(r)),a=s.next();!a.done;a=s.next()){var f=a.value;e(t,f),i(t,r[f])}}catch(t){o={error:t}}finally{try{a&&!a.done&&(u=s.return)&&u.call(s)}finally{if(o)throw o.error}}}function b(t,r,e){for(var n=c(t),i={},o=0;o<n;++o)i[r(t)]=e(t);return i}r.readByte=l,r.readInt64=function(t){for(var r=o.fromNumber(0),e=0;e<64;){var n=l(t),u=o.fromNumber(n);if(r=r.or(u.and(a).shiftLeft(e)),u.and(s).equals(0))return r;e+=7}throw new i.IOError("Malformed int64")},r.writeInt64=function(t,r){for(var e=o.isLong(r)?r:o.fromNumber(r,!1);!e.and(f).equals(0);)t.write(e.and(a).or(s).toInt()),e=e.shiftRightUnsigned(7);t.write(e.toInt())},r.readInt32=c,r.writeInt32=h,r.writeByte=p,r.readBytes=g,r.writeBytes=y,r.readString=d,r.writeString=w,r.writeCollection=function(t,r,e){var i,o;h(t,r.length);try{for(var u=n(r),s=u.next();!s.done;s=u.next())e(t,s.value)}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}},r.readCollection=function(t,r){for(var e=c(t),n=[],i=0;i<e;++i)n.push(r(t));return n},r.readDictionary=function(t,r){return b(t,d,r)},r.writeDictionary=function(t,r,e){v(t,r,w,e)},r.writeObject=v,r.readObject=b,r.readMap=function(t,r,e){for(var n=c(t),i=new Map,o=0;o<n;++o){var u=r(t);i.set(u,e(t))}return i},r.writeMap=function(t,r,e,n){h(t,r.size),r.forEach((function(r,i){e(t,i),n(t,r)}))},r.readBoolean=function(t){return 0!==t.readInt8()},r.writeBoolean=function(t,r){t.writeInt8(r?1:0)},r.writeOptional=function(t,r,e,n){void 0===n&&(n=function(t){return null!=t}),n(r)?(p(t,1),e(t,r)):p(t,0)},r.readOptional=function(t,r,e){return void 0===e&&(e=void 0),l(t)?r(t):e}},348:(t,r,e)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AbstractSerialiser=void 0;var n=e(191),i=function(){function t(){}return t.prototype.read=function(t){throw new n.InternalError("AbstractSerialiser#read is not implemented")},t.prototype.write=function(t,r){throw new n.InternalError("AbstractSerialiser#write is not implemented")},t}();r.AbstractSerialiser=i},392:(t,r,e)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.StringSerialiser=r.StringSerialiserClass=void 0;var n=e(771),i=function(){function t(){}return t.prototype.read=function(t){return n.readString(t)},t.prototype.write=function(t,r){n.writeString(t,r)},t}();r.StringSerialiserClass=i,r.StringSerialiser=new i},668:function(t,r,e){"use strict";var n,i=this&&this.__extends||(n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])},n(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)});Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorReportListSerialiser=r.ErrorReportListSerialiserClass=void 0;var o=e(771),u=e(348),s=e(571),a=e(412),f=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return i(r,t),r.prototype.read=function(t){var r=o.readCollection(t,a.ErrorReportSerialiser.read);return new s.ErrorReportList(r)},r.prototype.write=function(t,r){o.writeCollection(t,r.errors,a.ErrorReportSerialiser.write)},r}(u.AbstractSerialiser);r.ErrorReportListSerialiserClass=f,r.ErrorReportListSerialiser=new f},571:(t,r,e)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorReportList=void 0;var n=e(536),i=function(){function t(t){this.errors=n.requireNonNull(t,"errors")}return t.prototype.toString=function(){return this.errors.map((function(t){return t.line+":"+t.column+" "+t.message})).join("\n")},t}();r.ErrorReportList=i},412:function(t,r,e){"use strict";var n,i=this&&this.__extends||(n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])},n(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)});Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorReportSerialiser=r.ErrorReportSerialiserClass=void 0;var o=e(771),u=e(348),s=e(618),a=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return i(r,t),r.prototype.read=function(t){var r=o.readString(t),e=o.readInt32(t),n=o.readInt32(t);return new s.ErrorReportImpl(r,e,n)},r.prototype.write=function(t,r){o.writeString(t,r.message),o.writeInt32(t,r.line),o.writeInt32(t,r.column)},r}(u.AbstractSerialiser);r.ErrorReportSerialiserClass=a,r.ErrorReportSerialiser=new a},618:(t,r,e)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorReportImpl=void 0;var n=e(536),i=function(){function t(t,r,e){this.message=n.requireNonNull(t,"message"),this.line=r||0,this.column=e||0}return t.prototype.toString=function(){return"ErrorReport ["+this.message+" at ["+this.line+":"+this.column+"]]"},t}();r.ErrorReportImpl=i},378:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.NullSerialiser=void 0,r.NullSerialiser={read:function(){return null},write:function(){}}},718:(t,r,e)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.GET_TOPIC_VIEW=r.LIST_TOPIC_VIEWS=r.REMOVE_TOPIC_VIEW=r.CREATE_TOPIC_VIEW=void 0;var n=e(392),i=e(378),o=e(724),u=e(390),s=e(919),a=e(171);r.CREATE_TOPIC_VIEW={id:138,request:a.NamedTopicViewSpecificationSerialiser,response:o.CreateTopicViewResultSerialiser},r.REMOVE_TOPIC_VIEW={id:139,request:n.StringSerialiser,response:i.NullSerialiser},r.LIST_TOPIC_VIEWS={id:141,request:i.NullSerialiser,response:s.ListTopicViewsResultSerialiser},r.GET_TOPIC_VIEW={id:182,request:n.StringSerialiser,response:u.GetTopicViewResultSerialiser}},724:function(t,r,e){"use strict";var n,i=this&&this.__extends||(n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])},n(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)});Object.defineProperty(r,"__esModule",{value:!0}),r.CreateTopicViewResultSerialiser=r.CreateTopicViewResultSerialiserClass=void 0;var o=e(771),u=e(348),s=e(668),a=e(850),f=e(714),l=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return i(r,t),r.prototype.read=function(t){if(0===t.peek()){o.readByte(t);var r=f.readTopicView(t);return new a.CreateTopicViewResult(r)}var e=s.ErrorReportListSerialiser.read(t);return new a.CreateTopicViewResult(void 0,e)},r}(u.AbstractSerialiser);r.CreateTopicViewResultSerialiserClass=l,r.CreateTopicViewResultSerialiser=new l},850:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CreateTopicViewResult=void 0;r.CreateTopicViewResult=function(t,r){this.view=t,this.errors=r}},390:function(t,r,e){"use strict";var n,i=this&&this.__extends||(n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])},n(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)});Object.defineProperty(r,"__esModule",{value:!0}),r.GetTopicViewResultSerialiser=r.GetTopicViewResultSerialiserClass=void 0;var o=e(771),u=e(348),s=e(824),a=e(714),f=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return i(r,t),r.prototype.read=function(t){var r=o.readOptional(t,a.readTopicView,null);return new s.GetTopicViewResult(r)},r}(u.AbstractSerialiser);r.GetTopicViewResultSerialiserClass=f,r.GetTopicViewResultSerialiser=new f},824:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.GetTopicViewResult=void 0;r.GetTopicViewResult=function(t){this.result=t}},919:function(t,r,e){"use strict";var n,i=this&&this.__extends||(n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])},n(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)});Object.defineProperty(r,"__esModule",{value:!0}),r.ListTopicViewsResultSerialiser=r.ListTopicViewsResultSerialiserClass=void 0;var o=e(771),u=e(348),s=e(299),a=e(714),f=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return i(r,t),r.prototype.read=function(t){var r=o.readCollection(t,a.readTopicView);return new s.ListTopicViewsResult(r