UNPKG

diffusion

Version:

Diffusion JavaScript client

2 lines 52 kB
/*! For license information please see diffusion-feature-session-trees.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)),h=0,l=a>0?u-4:u;for(e=0;e<l;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[h++]=r>>16&255,f[h++]=r>>8&255,f[h++]=255&r;return 2===a&&(r=n[t.charCodeAt(e)]<<2|n[t.charCodeAt(e+1)]>>4,f[h++]=255&r),1===a&&(r=n[t.charCodeAt(e)]<<10|n[t.charCodeAt(e+1)]<<4|n[t.charCodeAt(e+2)]>>2,f[h++]=r>>8&255,f[h++]=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 h(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 l(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(G(t,ArrayBuffer)||t&&G(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|c(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||D(t.length)?u(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(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 h(t){return f(t),u(t<0?0:0|c(t))}function l(t){for(var r=t.length<0?0:0|c(t.length),e=u(r),n=0;n<r;n+=1)e[n]=255&t[n];return e}function c(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)||G(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 q(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 O(this,r,e);case"utf8":case"utf-8":return A(this,r,e);case"ascii":return I(this,r,e);case"latin1":case"binary":return N(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(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),D(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:v(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):v(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function v(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 h=-1;for(o=e;o<s;o++)if(f(t,o)===f(r,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===a)return h*u}else-1!==h&&(o-=o-h),h=-1}else for(e+a>s&&(e=s-a),o=e;o>=0;o--){for(var l=!0,c=0;c<a;c++)if(f(t,o+c)!==f(r,c)){l=!1;break}if(l)return o}return-1}function w(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(D(s))return u;t[e+u]=s}return u}function b(t,r,e,n){return F(j(r,t.length-e),t,e,n)}function m(t,r,e,n){return F(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function E(t,r,e,n){return m(t,r,e,n)}function _(t,r,e,n){return F(q(r),t,e,n)}function B(t,r,e,n){return F(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 S(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function A(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,s,a,f=t[i],h=null,l=f>239?4:f>223?3:f>191?2:1;if(i+l<=e)switch(l){case 1:f<128&&(h=f);break;case 2:128==(192&(o=t[i+1]))&&(a=(31&f)<<6|63&o)>127&&(h=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)&&(h=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&&(h=a)}null===h?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=l}return function(t){var r=t.length;if(r<=T)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=T));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 h(t)},s.allocUnsafeSlow=function(t){return h(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,r){if(G(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),G(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(G(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?A(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(G(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),h=t.slice(r,e),l=0;l<a;++l)if(f[l]!==h[l]){o=f[l],u=h[l];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 w(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 E(this,t,r,e);case"base64":return _(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(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 T=4096;function I(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 N(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 O(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 L(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 U(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 M(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 C(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 P(t,r,e,n,o){return r=+r,e>>>=0,o||C(t,0,e,4),i.write(t,r,e,n,23,4),e+4}function R(t,r,e,n,o){return r=+r,e>>>=0,o||C(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||U(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||U(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||U(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,r){return t>>>=0,r||U(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,r){return t>>>=0,r||U(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,r){return t>>>=0,r||U(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||U(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||U(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||U(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||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,r){t>>>=0,r||U(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||U(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||U(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||U(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||U(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,r){return t>>>=0,r||U(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,r){return t>>>=0,r||U(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,r){return t>>>=0,r||U(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||M(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||M(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||M(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||M(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||M(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||M(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||M(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);M(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);M(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||M(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||M(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||M(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||M(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||M(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 P(this,t,r,!0,e)},s.prototype.writeFloatBE=function(t,r,e){return P(this,t,r,!1,e)},s.prototype.writeDoubleLE=function(t,r,e){return R(this,t,r,!0,e)},s.prototype.writeDoubleBE=function(t,r,e){return R(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 x=/[^+/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 q(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(x,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(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 G(t,r){return t instanceof r||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===r.name}function D(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,h=-7,l=e?i-1:0,c=e?-1:1,p=t[r+l];for(l+=c,o=p&(1<<-h)-1,p>>=-h,h+=s;h>0;o=256*o+t[r+l],l+=c,h-=8);for(u=o&(1<<-h)-1,o>>=-h,h+=n;h>0;u=256*u+t[r+l],l+=c,h-=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,h=(1<<f)-1,l=h>>1,c=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=h):(u=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-u))<1&&(u--,a*=2),(r+=u+l>=1?c/a:c*Math.pow(2,1-l))*a>=2&&(u++,a/=2),u+l>=h?(s=0,u=h):u+l>=1?(s=(r*a-1)*Math.pow(2,i),u+=l):(s=r*Math.pow(2,l-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 h(){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){h()||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 l=h();null==l&&(l=null==e?"WARN":e),s.setLevel(l,!1)}var h=new f,l={};h.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=l[t];return r||(r=l[t]=new f(t,h.getLevel(),h.methodFactory)),r};var c=typeof window!==r?window.log:void 0;return h.noConflict=function(){return typeof window!==r&&window.log===h&&(window.log=c),h},h.getLoggers=function(){return l},h.default=h,h},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?v:d;if(r){if(t<0)return v;if(t>=p)return _}else{if(t<=-g)return B;if(t+1>=g)return E}return t<0?s(-t,r).neg():a(t%c|0,t/c|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 h(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 h(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),l=parseInt(t.substring(u,u+a),e);if(a<8){var c=s(f(e,a));o=o.mul(c).add(s(l))}else o=(o=o.mul(i)).add(s(l))}return o.unsigned=r,o}function l(t,r){return"number"==typeof t?s(t,r):"string"==typeof t?h(t,r):a(t.low,t.high,"boolean"==typeof r?r:t.unsigned)}e.fromString=h,e.fromValue=l;var c=4294967296,p=c*c,g=p/2,y=u(1<<24),d=u(0);e.ZERO=d;var v=u(0,!0);e.UZERO=v;var w=u(1);e.ONE=w;var b=u(1,!0);e.UONE=b;var m=u(-1);e.NEG_ONE=m;var E=a(-1,2147483647,!1);e.MAX_VALUE=E;var _=a(-1,-1,!0);e.MAX_UNSIGNED_VALUE=_;var B=a(0,-2147483648,!1);e.MIN_VALUE=B;var S=e.prototype;S.toInt=function(){return this.unsigned?this.low>>>0:this.low},S.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},S.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(B)){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),h=(o.sub(a.mul(i)).toInt()>>>0).toString(t);if((o=a).isZero())return h+u;for(;h.length<6;)h="0"+h;u=""+h+u}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(B)?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},S.isZero=function(){return 0===this.high&&0===this.low},S.eqz=S.isZero,S.isNegative=function(){return!this.unsigned&&this.high<0},S.isPositive=function(){return this.unsigned||this.high>=0},S.isOdd=function(){return!(1&~this.low)},S.isEven=function(){return!(1&this.low)},S.equals=function(t){return n(t)||(t=l(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},S.eq=S.equals,S.notEquals=function(t){return!this.eq(t)},S.neq=S.notEquals,S.ne=S.notEquals,S.lessThan=function(t){return this.comp(t)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(t){return this.comp(t)<=0},S.lte=S.lessThanOrEqual,S.le=S.lessThanOrEqual,S.greaterThan=function(t){return this.comp(t)>0},S.gt=S.greaterThan,S.greaterThanOrEqual=function(t){return this.comp(t)>=0},S.gte=S.greaterThanOrEqual,S.ge=S.greaterThanOrEqual,S.compare=function(t){if(n(t)||(t=l(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},S.comp=S.compare,S.negate=function(){return!this.unsigned&&this.eq(B)?B:this.not().add(w)},S.neg=S.negate,S.add=function(t){n(t)||(t=l(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,h=0,c=0,p=0,g=0;return p+=(g+=o+(65535&t.low))>>>16,c+=(p+=i+f)>>>16,h+=(c+=e+s)>>>16,h+=r+u,a((p&=65535)<<16|(g&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},S.subtract=function(t){return n(t)||(t=l(t)),this.add(t.neg())},S.sub=S.subtract,S.multiply=function(t){if(this.isZero())return d;if(n(t)||(t=l(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(B))return t.isOdd()?B:d;if(t.eq(B))return this.isOdd()?B: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,h=65535&t.high,c=t.low>>>16,p=65535&t.low,g=0,v=0,w=0,b=0;return w+=(b+=u*p)>>>16,v+=(w+=o*p)>>>16,w&=65535,v+=(w+=u*c)>>>16,g+=(v+=i*p)>>>16,v&=65535,g+=(v+=o*c)>>>16,v&=65535,g+=(v+=u*h)>>>16,g+=e*p+i*c+o*h+u*f,a((w&=65535)<<16|(b&=65535),(g&=65535)<<16|(v&=65535),this.unsigned)},S.mul=S.multiply,S.divide=function(t){if(n(t)||(t=l(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?v:d;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return v;if(t.gt(this.shru(1)))return b;o=v}else{if(this.eq(B))return t.eq(w)||t.eq(m)?B:t.eq(B)?w:(e=this.shr(1).div(t).shl(1)).eq(d)?t.isNegative()?w:m:(i=this.sub(t.mul(e)),o=e.add(i.div(t)));if(t.eq(B))return this.unsigned?v: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),h=u<=48?1:f(2,u-48),c=s(e),p=c.mul(t);p.isNegative()||p.gt(i);)p=(c=s(e-=h,this.unsigned)).mul(t);c.isZero()&&(c=w),o=o.add(c),i=i.sub(p)}return o},S.div=S.divide,S.modulo=function(t){return n(t)||(t=l(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))},S.mod=S.modulo,S.rem=S.modulo,S.not=function(){return a(~this.low,~this.high,this.unsigned)},S.and=function(t){return n(t)||(t=l(t)),a(this.low&t.low,this.high&t.high,this.unsigned)},S.or=function(t){return n(t)||(t=l(t)),a(this.low|t.low,this.high|t.high,this.unsigned)},S.xor=function(t){return n(t)||(t=l(t)),a(this.low^t.low,this.high^t.high,this.unsigned)},S.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)},S.shl=S.shiftLeft,S.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)},S.shr=S.shiftRight,S.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)},S.shru=S.shiftRightUnsigned,S.shr_u=S.shiftRightUnsigned,S.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},S.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},S.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},S.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]},S.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 h=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=h;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="out_of_bounds_error",r}(Error);r.OutOfBoundsError=l;var c=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=c;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 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="illegal_state_error",r}(Error);r.IllegalStateError=v;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="internal_error",r}(Error);r.InternalError=w},6:(t,r,e)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SessionTreesImpl=void 0;var n=e(198),i=e(97),o=e(536),u=e(400),s=i.create("SessionTrees"),a=function(){function t(t){this.internal=t;var r=t.getServiceLocator();this.PUT_BRANCH_MAPPING_TABLE=r.obtain(n.PUT_BRANCH_MAPPING_TABLE),this.GET_SESSION_TREE_BRANCHES_WITH_MAPPINGS=r.obtain(n.GET_SESSION_TREE_BRANCHES_WITH_MAPPINGS),this.GET_BRANCH_MAPPING_TABLE=r.obtain(n.GET_BRANCH_MAPPING_TABLE)}return t.prototype.putBranchMappingTable=function(t){var r=this;return new Promise((function(e,n){o.requireNonNull(t,"branchMappingTable"),r.internal.checkConnected(n)&&r.PUT_BRANCH_MAPPING_TABLE.send(t,(function(t,r){u.responseSuccess(t,r)?e():(n(t),s.debug("Put branch mapping table failed"))}))}))},t.prototype.getSessionTreeBranchesWithMappings=function(){var t=this;return new Promise((function(r,e){t.internal.checkConnected(e)&&t.GET_SESSION_TREE_BRANCHES_WITH_MAPPINGS.send(null,(function(t,n){u.responseSuccess(t,n)?r(n.paths):(e(t),s.debug("Get session tree branches with mappings failed"))}))}))},t.prototype.getBranchMappingTable=function(t){var r=this;return new Promise((function(e,n){o.requireNonNull(t,"sessionTreeBranch"),r.internal.checkConnected(n)&&r.GET_BRANCH_MAPPING_TABLE.send(t,(function(t,r){u.responseSuccess(t,r)?e(r):(n(t),s.debug("Get branch mapping table failed"))}))}))},t}();r.SessionTreesImpl=a},527:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BranchMappingTableImpl=void 0;var e=function(){function t(t,r){this.sessionTreeBranch=t,this.branchMappings=r}return t.prototype.getSessionTreeBranch=function(){return this.sessionTreeBranch},t.prototype.getBranchMappings=function(){return this.branchMappings},t}();r.BranchMappingTableImpl=e},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 h(t){var r=t.read();if(-1===r)throw new i.IOError("End of stream");return r}function l(t){for(var r=0,e=0;r<32;){var n=h(t);if(e|=(127&n)<<r,!(128&n))return e;r+=7}throw new i.IOError("Malformed int32")}function c(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=l(t);return t.readMany(r)}function y(t,r){c(t,r.length),t.writeMany(r)}function d(t){var r=g(t);return r?u.uint8toUtf8(r):""}function v(t,r){y(t,u.uint8FromUtf8(r))}function w(t,r,e,i){var o,u;c(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=l(t),i={},o=0;o<n;++o)i[r(t)]=e(t);return i}r.readByte=h,r.readInt64=function(t){for(var r=o.fromNumber(0),e=0;e<64;){var n=h(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=l,r.writeInt32=c,r.writeByte=p,r.readBytes=g,r.writeBytes=y,r.readString=d,r.writeString=v,r.writeCollection=function(t,r,e){var i,o;c(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=l(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){w(t,r,v,e)},r.writeObject=w,r.readObject=b,r.readMap=function(t,r,e){for(var n=l(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){c(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),h(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},378:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.NullSerialiser=void 0,r.NullSerialiser={read:function(){return null},write:function(){}}},198:(t,r,e)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.GET_BRANCH_MAPPING_TABLE=r.GET_SESSION_TREE_BRANCHES_WITH_MAPPINGS=r.PUT_BRANCH_MAPPING_TABLE=void 0;var n=e(392),i=e(378),o=e(620),u=e(529);r.PUT_BRANCH_MAPPING_TABLE={id:176,request:o.BranchMappingTableSerialiser,response:i.NullSerialiser},r.GET_SESSION_TREE_BRANCHES_WITH_MAPPINGS={id:177,request:i.NullSerialiser,response:u.SessionTreeBranchListSerialiser},r.GET_BRANCH_MAPPING_TABLE={id:178,request:n.StringSerialiser,response:o.BranchMappingTableSerialiser}},620: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.BranchMappingTableSerialiser=r.BranchMappingTableSerialiserClass=void 0;var o=e(527),u=e(771);function s(t,r){u.writeString(t,r.sessionFilter),u.writeString(t,r.topicTreeBranch)}function a(t){return{sessionFilter:u.readString(t),topicTreeBranch:u.readString(t)}}var f=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return i(r,t),r.prototype.read=function(t){var r=u.readString(t),e=u.readCollection(t,a);return new o.BranchMappingTableImpl(r,e)},r.prototype.write=function(t,r){u.writeString(t,r.getSessionTreeBranch()),u.writeCollection(t,r.getBranchMappings(),s)},r}(e(348).AbstractSerialiser);r.BranchMappingTableSerialiserClass=f,r.BranchMappingTableSerialiser=new f},529: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.SessionTreeBranchListSerialiser=r.SessionTreeBranchListSerialiserClass=void 0;var o=e(771),u=e(348),s=e(657),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.readCollection(t,o.readString);return new s.SessionTreeBranchList(r)},r}(u.AbstractSerialiser);r.SessionTreeBranchListSerialiserClass=a,r.SessionTreeBranchListSerialiser=new a},657:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SessionTreeBranchList=void 0;r.SessionTreeBranchList=function(t){this.paths=t}},97: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.setLevel=r.create=r.LoggingLevel=void 0;var i,o=e(65);function u(t,r){var e="|"+t.toUpperCase()+"|"+r+"|",n=function(){return new Date};return function(r,i){i?o[t](n()+e+r,i):o[t](n()+e+r)}}!function(t){t.trace="trace",t.debug="debug",t.info="info",t.warn="warn",t.error="error"}(i=r.LoggingLevel||(r.LoggingLevel={})),r.create=function(t){var r,e,o={};try{for(var s=n(Object.keys(i)),a=s.next();!a.done;a=s.next()){var f=a.value;o[f]=u(f,t)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(r)throw r.error}}return o},r.setLevel=o.setLevel},536:(t,r,e)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.requireNonNegativeInt=r.requireNonNegative=r.requireNonNull=void 0;var n=e(191);function i(t,r){if(null==t)throw new n.NullValueError(r+" is null");return t}r.requireNonNull=i,r.requireNonNegative=function(t,r){var e=i(t,r);if(e<0)throw new n.IllegalArgumentError(r+" is negative: "+t);return e},r.requireNonNegativeInt=function(t,r){var e=i(t,r);if(!Number.isInteger(e)||e<0)throw new n.IllegalArgumentError("Invalid argument '"+r+"': "+t);return e}},400:(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.responseSuccess=void 0,r.responseSuccess=function(t,r){return!t}},224:function(t,r,e){"use strict";var n=e(287).hp,i=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.")},o=this&&this.__read||function(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,i,o=e.call(t),u=[];try{for(;(void 0===r||r-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return u},u=this&&this.__spreadArray||function(t,r){for(var e=0,n=r.length,i=t.length;e<n;e++,i++)t[i]=r[e];return t};function s(t){for(var r=[],e=0;e<t.length;e+=128)r.push(t.subarray(e,Math.min(e+128,t.length)));return r.map((function(t){return String.fromCharCode.apply(String,u([],o(t)))})).join("")}Object.defineProperty(r,"__esModule",{value:!0}),r.isUint8Array=r.isEqualUint8Arrays=r.uint8toUtf8=r.uint8ToBase64=r.uint8ToAscii=r.uint8FromDoubleBE=r.uint8FromBase64=r.uint8FromUtf8=r.uint8FromBinary=r.writeInt32BE=r.writeInt8=r.readDoubleBE=r.readFloatBE=r.readInt32BE=r.readUInt32BE=r.readUInt16BE=r.readInt8=r.concatUint8Arrays=void 0,r.concatUint8Arrays=function(t){var r,e,n=t.reduce((function(t,r){return t+r.length}),0),o=new Uint8Array(n),u=0;try{for(var s=i(t),a=s.next();!a.done;a=s.next()){var f=a.value;o.set(f,u),u+=f.length}}catch(t){r={error:t}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(r)throw r.error}}return o},r.readInt8=function(t,r){return new DataView(t.buffer,t.byteOffset,t.byteLength).getInt8(r)},r.readUInt16BE=function(t,r){return new DataView(t.buffer,t.byteOffset,t.byteLength).getUint16(r,!1)},r.readUInt32BE=function(t,r){return new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(r,!1)},r.readInt32BE=function(t,r){return new DataView(t.buffer,t.byteOffset,t.byteLength).getInt32(r,!1)},r.readFloatBE=function(t,r){return new DataView(t