diff --git a/mock-sites/esm/index.html b/mock-sites/esm/index.html index cb3cdc90..f05592d3 100644 --- a/mock-sites/esm/index.html +++ b/mock-sites/esm/index.html @@ -6,6 +6,8 @@ - + + + \ No newline at end of file diff --git a/mock-sites/esm/main.bundle.js b/mock-sites/esm/main.bundle.js index 399a64bd..a9257a5b 100644 --- a/mock-sites/esm/main.bundle.js +++ b/mock-sites/esm/main.bundle.js @@ -1,2 +1,27 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));e.exports=new function e(){(0,r.default)(this,e),console.log("hi",ScatterJS)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}}]); +!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=193)}([function(t,e,r){var n=r(1),i=n.Buffer;function u(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(u(n,e),e.Buffer=o),u(i,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";(function(t){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var n=r(225),i=r(226),u=r(126);function o(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(t).length;default:if(n)return N(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var u,o=1,s=t.length,a=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,a/=2,r/=2}function f(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){for(var h=!0,l=0;li&&(n=i):n=i;var u=e.length;if(u%2!=0)throw new TypeError("Invalid hex string");n>u/2&&(n=u/2);for(var o=0;o>8,i=r%256,u.push(i),u.push(n);return u}(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function C(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:f>223?3:f>191?2:1;if(i+h<=r)switch(h){case 1:f<128&&(c=f);break;case 2:128==(192&(u=t[i+1]))&&(a=(31&f)<<6|63&u)>127&&(c=a);break;case 3:u=t[i+1],o=t[i+2],128==(192&u)&&128==(192&o)&&(a=(15&f)<<12|(63&u)<<6|63&o)>2047&&(a<55296||a>57343)&&(c=a);break;case 4:u=t[i+1],o=t[i+2],s=t[i+3],128==(192&u)&&128==(192&o)&&128==(192&s)&&(a=(15&f)<<18|(63&u)<<12|(63&o)<<6|63&s)>65535&&a<1114112&&(c=a)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(t){var e=t.length;if(e<=F)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},a.prototype.compare=function(t,e,r,n,i){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var u=i-n,o=r-e,s=Math.min(u,o),f=this.slice(n,i),c=t.slice(e,r),h=0;hi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var u=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(u)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),u=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var F=4096;function x(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",u=e;ur)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,r,n,i,u){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,u=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function O(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,u=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function L(t,e,r,n,i,u){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(t,e,r,n,u){return u||L(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,u){return u||L(t,0,r,8),i.write(t,e,r,n,52,8),r+8}a.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return e||k(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||k(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||k(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t],i=1,u=0;++u=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=e,i=1,u=this[t+--n];n>0&&(i*=256);)u+=this[t+--n]*i;return u>=(i*=128)&&(u-=Math.pow(2,8*e)),u},a.prototype.readInt8=function(t,e){return e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,u=0;for(this[e]=255&t;++u=0&&(u*=256);)this[e+i]=t/u&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):O(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var u=0,o=1,s=0;for(this[e]=255&t;++u>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var u=r-1,o=1,s=0;for(this[e+u]=255&t;--u>=0&&(o*=256);)t<0&&0===s&&0!==this[e+u+1]&&(s=1),this[e+u]=(t/o>>0)-s&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):O(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,r){return j(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return j(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(u<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(u=e;u55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&u.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&u.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&u.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&u.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;u.push(r)}else if(r<2048){if((e-=2)<0)break;u.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;u.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;u.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return u}function q(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(R,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(10))},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";(function(e){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,u=Math.min(r,n);i=0;f--)if(c[f]!==h[f])return!1;for(f=c.length-1;f>=0;f--)if(a=c[f],!v(t[a],e[a],r,n))return!1;return!0}(t,e,r,o))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&m(i,r,"Missing expected exception"+n);var o="string"==typeof n,s=!t&&u.isError(i),a=!t&&i&&!r;if((s&&o&&_(i,r)||a)&&m(i,r,"Got unwanted exception"+n),t&&i&&r&&!_(i,r)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return d(y(t.actual),128)+" "+t.operator+" "+d(y(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),u=n.indexOf("\n"+i);if(u>=0){var o=n.indexOf("\n",u+1);n=n.substring(o+1)}this.stack=n}}},u.inherits(h.AssertionError,Error),h.fail=m,h.ok=g,h.equal=function(t,e,r){t!=e&&m(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&m(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){v(t,e,!1)||m(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){v(t,e,!0)||m(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){v(t,e,!1)&&m(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){v(e,r,!0)&&m(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&m(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){w(!0,t,e,r)},h.doesNotThrow=function(t,e,r){w(!1,t,e,r)},h.ifError=function(t){if(t)throw t};var E=Object.keys||function(t){var e=[];for(var r in t)o.call(t,r)&&e.push(r);return e}}).call(this,r(10))},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e){var r=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=r)},function(t,e,r){var n=r(157)("wks"),i=r(158),u=r(4).Symbol,o="function"==typeof u;(t.exports=function(t){return n[t]||(n[t]=o&&u[t]||(o?u:i)("Symbol."+t))}).store=n},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){var n=r(181)("wks"),i=r(182),u=r(5).Symbol,o="function"==typeof u;(t.exports=function(t){return n[t]||(n[t]=o&&u[t]||(o?u:i)("Symbol."+t))}).store=n},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(79)("wks"),i=r(52),u=r(13).Symbol,o="function"==typeof u;(t.exports=function(t){return n[t]||(n[t]=o&&u[t]||(o?u:i)("Symbol."+t))}).store=n},function(t,e,r){var n=r(1),i=n.Buffer;function u(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(u(n,e),e.Buffer=o),u(i,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e,r){var n=r(141);r(252),t.exports=n},function(t,e){var r=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=r)},function(t,e){var r=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=r)},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){var n=r(0).Buffer,i=r(54).Transform,u=r(56).StringDecoder;function o(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(2)(o,i),o.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},o.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},o.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},o.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new u(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=o},function(t,e,r){"use strict";var n=r(55),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var u=r(39);u.inherits=r(2);var o=r(133),s=r(89);u.inherits(h,o);for(var a=i(s.prototype),f=0;f1)for(var r=1;r + * Backing buffer: ArrayBuffer, Accessor: Uint8Array + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/bytebuffer.js for details + */i=[r(227)],void 0===(u="function"==typeof(n=function(t){"use strict";var e=function(t,r,i){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===r&&(r=e.DEFAULT_ENDIAN),void 0===i&&(i=e.DEFAULT_NOASSERT),!i){if((t|=0)<0)throw RangeError("Illegal capacity");r=!!r,i=!!i}this.buffer=0===t?n:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=r,this.noAssert=i};e.VERSION="5.0.1",e.LITTLE_ENDIAN=!0,e.BIG_ENDIAN=!1,e.DEFAULT_CAPACITY=16,e.DEFAULT_ENDIAN=e.BIG_ENDIAN,e.DEFAULT_NOASSERT=!1,e.Long=t||null;var r=e.prototype;r.__isByteBuffer__,Object.defineProperty(r,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var n=new ArrayBuffer(0),i=String.fromCharCode;function u(t){var e=0;return function(){return e1024&&(e.push(i.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function s(t,e,r,n,i){var u,o,s=8*i-n-1,a=(1<>1,c=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,u=p&(1<<-c)-1,p>>=-c,c+=s;c>0;u=256*u+t[e+h],h+=l,c-=8);for(o=u&(1<<-c)-1,u>>=-c,c+=n;c>0;o=256*o+t[e+h],h+=l,c-=8);if(0===u)u=1-f;else{if(u===a)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),u-=f}return(p?-1:1)*o*Math.pow(2,u-n)}function a(t,e,r,n,i,u){var o,s,a,f=8*u-i-1,c=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:u-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-o))<1&&(o--,a*=2),(e+=o+h>=1?l/a:l*Math.pow(2,1-h))*a>=2&&(o++,a/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(e*a-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,f-=8);t[r+p-d]|=128*y}e.accessor=function(){return Uint8Array},e.allocate=function(t,r,n){return new e(t,r,n)},e.concat=function(t,r,n,i){"boolean"!=typeof r&&"string"==typeof r||(i=n,n=r,r=void 0);for(var u,o=0,s=0,a=t.length;s0&&(o+=u);if(0===o)return new e(0,n,i);var f,c=new e(o,n,i);for(s=0;s0&&(o.buffer=t.buffer,o.offset=t.byteOffset,o.limit=t.byteOffset+t.byteLength,o.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)o=new e(0,i,u),t.byteLength>0&&(o.buffer=t,o.offset=0,o.limit=t.byteLength,o.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");(o=new e(t.length,i,u)).limit=t.length;for(var s=0;s>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e,u=t.length,o=u>>3,s=0;for(e+=this.writeVarint32(u,e);o--;)n=1&!!t[s++]|(1&!!t[s++])<<1|(1&!!t[s++])<<2|(1&!!t[s++])<<3|(1&!!t[s++])<<4|(1&!!t[s++])<<5|(1&!!t[s++])<<6|(1&!!t[s++])<<7,this.writeByte(n,e++);if(s>3,o=0,s=[];for(t+=n.length;u--;)r=this.readByte(t++),s[o++]=!!(1&r),s[o++]=!!(2&r),s[o++]=!!(4&r),s[o++]=!!(8&r),s[o++]=!!(16&r),s[o++]=!!(32&r),s[o++]=!!(64&r),s[o++]=!!(128&r);if(o>a++&1)}return e&&(this.offset=t),s},r.readBytes=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var n=this.slice(e,e+t);return r&&(this.offset+=t),n},r.writeBytes=r.append,r.writeInt8=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},r.writeByte=r.writeInt8,r.readInt8=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return 128==(128&r)&&(r=-(255-r+1)),e&&(this.offset+=1),r},r.readByte=r.readInt8,r.writeUint8=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},r.writeUInt8=r.writeUint8,r.readUint8=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return e&&(this.offset+=1),r},r.readUInt8=r.readUint8,r.writeInt16=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},r.writeShort=r.writeInt16,r.readInt16=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),32768==(32768&r)&&(r=-(65535-r+1)),e&&(this.offset+=2),r},r.readShort=r.readInt16,r.writeUint16=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},r.writeUInt16=r.writeUint16,r.readUint16=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),e&&(this.offset+=2),r},r.readUInt16=r.readUint16,r.writeInt32=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},r.writeInt=r.writeInt32,r.readInt32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),r|=0,e&&(this.offset+=4),r},r.readInt=r.readInt32,r.writeUint32=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},r.writeUInt32=r.writeUint32,r.readUint32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),e&&(this.offset+=4),r},r.readUInt32=r.readUint32,t&&(r.writeInt64=function(e,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var u=e.low,o=e.high;return this.littleEndian?(this.view[r+3]=u>>>24&255,this.view[r+2]=u>>>16&255,this.view[r+1]=u>>>8&255,this.view[r]=255&u,r+=4,this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o):(this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o,r+=4,this.view[r]=u>>>24&255,this.view[r+1]=u>>>16&255,this.view[r+2]=u>>>8&255,this.view[r+3]=255&u),n&&(this.offset+=8),this},r.writeLong=r.writeInt64,r.readInt64=function(e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var u=new t(n,i,!1);return r&&(this.offset+=8),u},r.readLong=r.readInt64,r.writeUint64=function(e,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var u=e.low,o=e.high;return this.littleEndian?(this.view[r+3]=u>>>24&255,this.view[r+2]=u>>>16&255,this.view[r+1]=u>>>8&255,this.view[r]=255&u,r+=4,this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o):(this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o,r+=4,this.view[r]=u>>>24&255,this.view[r+1]=u>>>16&255,this.view[r+2]=u>>>8&255,this.view[r+3]=255&u),n&&(this.offset+=8),this},r.writeUInt64=r.writeUint64,r.readUint64=function(e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var u=new t(n,i,!0);return r&&(this.offset+=8),u},r.readUInt64=r.readUint64),r.writeFloat32=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,a(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},r.writeFloat=r.writeFloat32,r.readFloat32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=s(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},r.readFloat=r.readFloat32,r.writeFloat64=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=8,a(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},r.writeDouble=r.writeFloat64,r.readFloat64=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=s(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},r.readDouble=r.readFloat64,e.MAX_VARINT32_BYTES=5,e.calculateVarint32=function(t){return(t>>>=0)<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},e.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},e.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},r.writeVarint32=function(t,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,u=e.calculateVarint32(t);r+=u;var o=this.buffer.byteLength;for(r>o&&this.resize((o*=2)>r?o:r),r-=u,t>>>=0;t>=128;)i=127&t|128,this.view[r++]=i,t>>>=7;return this.view[r++]=t,n?(this.offset=r,this):u},r.writeVarint32ZigZag=function(t,r){return this.writeVarint32(e.zigZagEncode32(t),r)},r.readVarint32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=0,i=0;do{if(!this.noAssert&&t>this.limit){var u=Error("Truncated");throw u.truncated=!0,u}r=this.view[t++],n<5&&(i|=(127&r)<<7*n),++n}while(0!=(128&r));return i|=0,e?(this.offset=t,i):{value:i,length:n}},r.readVarint32ZigZag=function(t){var r=this.readVarint32(t);return"object"==typeof r?r.value=e.zigZagDecode32(r.value):r=e.zigZagDecode32(r),r},t&&(e.MAX_VARINT64_BYTES=10,e.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var r=e.toInt()>>>0,n=e.shiftRightUnsigned(28).toInt()>>>0,i=e.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==n?r<16384?r<128?1:2:r<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:i<128?9:10},e.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},e.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},r.writeVarint64=function(r,n){var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof r)r=t.fromNumber(r);else if("string"==typeof r)r=t.fromString(r);else if(!(r&&r instanceof t))throw TypeError("Illegal value: "+r+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof r?r=t.fromNumber(r,!1):"string"==typeof r?r=t.fromString(r,!1):!1!==r.unsigned&&(r=r.toSigned());var u=e.calculateVarint64(r),o=r.toInt()>>>0,s=r.shiftRightUnsigned(28).toInt()>>>0,a=r.shiftRightUnsigned(56).toInt()>>>0;n+=u;var f=this.buffer.byteLength;switch(n>f&&this.resize((f*=2)>n?f:n),n-=u,u){case 10:this.view[n+9]=a>>>7&1;case 9:this.view[n+8]=9!==u?128|a:127&a;case 8:this.view[n+7]=8!==u?s>>>21|128:s>>>21&127;case 7:this.view[n+6]=7!==u?s>>>14|128:s>>>14&127;case 6:this.view[n+5]=6!==u?s>>>7|128:s>>>7&127;case 5:this.view[n+4]=5!==u?128|s:127&s;case 4:this.view[n+3]=4!==u?o>>>21|128:o>>>21&127;case 3:this.view[n+2]=3!==u?o>>>14|128:o>>>14&127;case 2:this.view[n+1]=2!==u?o>>>7|128:o>>>7&127;case 1:this.view[n]=1!==u?128|o:127&o}return i?(this.offset+=u,this):u},r.writeVarint64ZigZag=function(t,r){return this.writeVarint64(e.zigZagEncode64(t),r)},r.readVarint64=function(e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,i=0,u=0,o=0,s=0;if(s=this.view[e++],i=127&s,128&s&&(s=this.view[e++],i|=(127&s)<<7,(128&s||this.noAssert&&void 0===s)&&(s=this.view[e++],i|=(127&s)<<14,(128&s||this.noAssert&&void 0===s)&&(s=this.view[e++],i|=(127&s)<<21,(128&s||this.noAssert&&void 0===s)&&(s=this.view[e++],u=127&s,(128&s||this.noAssert&&void 0===s)&&(s=this.view[e++],u|=(127&s)<<7,(128&s||this.noAssert&&void 0===s)&&(s=this.view[e++],u|=(127&s)<<14,(128&s||this.noAssert&&void 0===s)&&(s=this.view[e++],u|=(127&s)<<21,(128&s||this.noAssert&&void 0===s)&&(s=this.view[e++],o=127&s,(128&s||this.noAssert&&void 0===s)&&(s=this.view[e++],o|=(127&s)<<7,128&s||this.noAssert&&void 0===s))))))))))throw Error("Buffer overrun");var a=t.fromBits(i|u<<28,u>>>4|o<<24,!1);return r?(this.offset=e,a):{value:a,length:e-n}},r.readVarint64ZigZag=function(r){var n=this.readVarint64(r);return n&&n.value instanceof t?n.value=e.zigZagDecode64(n.value):n=e.zigZagDecode64(n),n}),r.writeCString=function(t,e){var r=void 0===e;r&&(e=this.offset);var n,i=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(n=0;n>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}i=c.calculateUTF16asUTF8(u(t))[1],e+=i+1;var o=this.buffer.byteLength;return e>o&&this.resize((o*=2)>e?o:e),e-=i+1,c.encodeUTF16toUTF8(u(t),function(t){this.view[e++]=t}.bind(this)),this.view[e++]=0,r?(this.offset=e,this):i},r.readCString=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=t,i=-1;return c.decodeUTF8toUTF16(function(){if(0===i)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return 0===(i=this.view[t++])?null:i}.bind(this),r=o(),!0),e?(this.offset=t,r()):{string:r(),length:t-n}},r.writeIString=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e;n=c.calculateUTF16asUTF8(u(t),this.noAssert)[1],e+=4+n;var o=this.buffer.byteLength;if(e>o&&this.resize((o*=2)>e?o:e),e-=4+n,this.littleEndian?(this.view[e+3]=n>>>24&255,this.view[e+2]=n>>>16&255,this.view[e+1]=n>>>8&255,this.view[e]=255&n):(this.view[e]=n>>>24&255,this.view[e+1]=n>>>16&255,this.view[e+2]=n>>>8&255,this.view[e+3]=255&n),e+=4,c.encodeUTF16toUTF8(u(t),function(t){this.view[e++]=t}.bind(this)),e!==i+4+n)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+4+n));return r?(this.offset=e,this):e-i},r.readIString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=t,i=this.readUint32(t),u=this.readUTF8String(i,e.METRICS_BYTES,t+=4);return t+=u.length,r?(this.offset=t,u.string):{string:u.string,length:t-n}},e.METRICS_CHARS="c",e.METRICS_BYTES="b",r.writeUTF8String=function(t,e){var r,n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var i=e;r=c.calculateUTF16asUTF8(u(t))[1],e+=r;var o=this.buffer.byteLength;return e>o&&this.resize((o*=2)>e?o:e),e-=r,c.encodeUTF16toUTF8(u(t),function(t){this.view[e++]=t}.bind(this)),n?(this.offset=e,this):e-i},r.writeString=r.writeUTF8String,e.calculateUTF8Chars=function(t){return c.calculateUTF16asUTF8(u(t))[0]},e.calculateUTF8Bytes=function(t){return c.calculateUTF16asUTF8(u(t))[1]},e.calculateString=e.calculateUTF8Bytes,r.readUTF8String=function(t,r,n){"number"==typeof r&&(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),void 0===r&&(r=e.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var u,s=0,a=n;if(r===e.METRICS_CHARS){if(u=o(),c.decodeUTF8(function(){return s>>=0)<0||n+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+t+") <= "+this.buffer.byteLength)}var f=n+t;if(c.decodeUTF8toUTF16(function(){return n>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o,s=r;i=c.calculateUTF16asUTF8(u(t),this.noAssert)[1],o=e.calculateVarint32(i),r+=o+i;var a=this.buffer.byteLength;if(r>a&&this.resize((a*=2)>r?a:r),r-=o+i,r+=this.writeVarint32(i,r),c.encodeUTF16toUTF8(u(t),function(t){this.view[r++]=t}.bind(this)),r!==s+i+o)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+i+o));return n?(this.offset=r,this):r-s},r.readVString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=t,i=this.readVarint32(t),u=this.readUTF8String(i.value,e.METRICS_BYTES,t+=i.length);return t+=u.length,r?(this.offset=t,u.string):{string:u.string,length:t-n}},r.append=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var u=t.limit-t.offset;if(u<=0)return this;n+=u;var o=this.buffer.byteLength;return n>o&&this.resize((o*=2)>n?o:n),n-=u,this.view.set(t.view.subarray(t.offset,t.limit),n),t.offset+=u,i&&(this.offset+=u),this},r.appendTo=function(t,e){return t.append(this,e),this},r.assert=function(t){return this.noAssert=!t,this},r.capacity=function(){return this.buffer.byteLength},r.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},r.clone=function(t){var r=new e(0,this.littleEndian,this.noAssert);return t?(r.buffer=new ArrayBuffer(this.buffer.byteLength),r.view=new Uint8Array(r.buffer)):(r.buffer=this.buffer,r.view=this.view),r.offset=this.offset,r.markedOffset=this.markedOffset,r.limit=this.limit,r},r.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(0===t&&e===this.buffer.byteLength)return this;var r=e-t;if(0===r)return this.buffer=n,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(r),u=new Uint8Array(i);return u.set(this.view.subarray(t,e)),this.buffer=i,this.view=u,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},r.copy=function(t,r){if(void 0===t&&(t=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,t<0||t>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+r+" <= "+this.buffer.byteLength)}if(t===r)return new e(0,this.littleEndian,this.noAssert);var n=r-t,i=new e(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,i.markedOffset>=0&&(i.markedOffset-=t),this.copyTo(i,0,t,r),i},r.copyTo=function(t,r,n,i){var u,o;if(!this.noAssert&&!e.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(r=(o=void 0===r)?t.offset:0|r,n=(u=void 0===n)?this.offset:0|n,i=void 0===i?this.limit:0|i,r<0||r>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+r+" <= "+t.buffer.byteLength);if(n<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var s=i-n;return 0===s?t:(t.ensureCapacity(r+s),t.view.set(this.view.subarray(n,i),r),u&&(this.offset+=s),o&&(t.offset+=s),this)},r.ensureCapacity=function(t){var e=this.buffer.byteLength;return et?e:t):this},r.fill=function(t,e,r){var n=void 0===e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(e>=r)return this;for(;e>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},r.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},r.LE=function(t){return this.littleEndian=void 0===t||!!t,this},r.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},r.prepend=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var u=t.limit-t.offset;if(u<=0)return this;var o=u-n;if(o>0){var s=new ArrayBuffer(this.buffer.byteLength+o),a=new Uint8Array(s);a.set(this.view.subarray(n,this.buffer.byteLength),u),this.buffer=s,this.view=a,this.offset+=o,this.markedOffset>=0&&(this.markedOffset+=o),this.limit+=o,n+=o}else new Uint8Array(this.buffer);return this.view.set(t.view.subarray(t.offset,t.limit),n-u),t.offset=t.limit,i&&(this.offset-=u),this},r.prependTo=function(t,e){return t.prepend(this,e),this},r.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},r.remaining=function(){return this.limit-this.offset},r.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},r.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},r.skip=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal length: "+t+" (not an integer)");t|=0}var e=this.offset+t;if(!this.noAssert&&(e<0||e>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+t+" <= "+this.buffer.byteLength);return this.offset=e,this},r.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var r=this.clone();return r.offset=t,r.limit=e,r},r.toBuffer=function(t){var e=this.offset,r=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal limit: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(!t&&0===e&&r===this.buffer.byteLength)return this.buffer;if(e===r)return n;var i=new ArrayBuffer(r-e);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(e,r),0),i},r.toArrayBuffer=r.toBuffer,r.toString=function(t,e,r){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(r=e=t="utf8"),t){case"utf8":return this.toUTF8(e,r);case"base64":return this.toBase64(e,r);case"hex":return this.toHex(e,r);case"binary":return this.toBinary(e,r);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+t)}};var f=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],r=[],n=0,i=e.length;n>2&63]),i=(3&n)<<4,null!==(n=t())?(r(e[63&((i|=n>>4&15)|n>>4&15)]),i=(15&n)<<2,null!==(n=t())?(r(e[63&(i|n>>6&3)]),r(e[63&n])):(r(e[63&i]),r(61))):(r(e[63&i]),r(61),r(61))},t.decode=function(t,e){var n,i,u;function o(t){throw Error("Illegal character code: "+t)}for(;null!==(n=t());)if(void 0===(i=r[n])&&o(n),null!==(n=t())&&(void 0===(u=r[n])&&o(n),e(i<<2>>>0|(48&u)>>4),null!==(n=t()))){if(void 0===(i=r[n])){if(61===n)break;o(n)}if(e((15&u)<<4>>>0|(60&i)>>2),null!==(n=t())){if(void 0===(u=r[n])){if(61===n)break;o(n)}e((3&i)<<6>>>0|u)}}},t.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)},t}();r.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity||t>e)throw RangeError("begin, end");var r;return f.encode(function(){return tthis.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var r=[],n=[];t=1024&&(n.push(String.fromCharCode.apply(String,r)),r=[]);return n.join("")+String.fromCharCode.apply(String,r)},e.fromBinary=function(t,r){if("string"!=typeof t)throw TypeError("str");for(var n,i=0,u=t.length,o=new e(u,r);i255)throw RangeError("illegal char code: "+n);o.view[i++]=n}return o.limit=u,o},r.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",u="",o="";r32&&e<127?String.fromCharCode(e):".")),++r,t&&r>0&&r%16==0&&r!==n){for(;i.length<51;)i+=" ";o+=i+u+"\n",i=u=""}r===this.offset&&r===this.limit?i+=r===this.markedOffset?"!":"|":r===this.offset?i+=r===this.markedOffset?"[":"<":r===this.limit?i+=r===this.markedOffset?"]":">":i+=r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";o+=i+u+"\n"}return t?o:i},e.fromDebug=function(t,r,n){for(var i,u,o=t.length,s=new e((o+1)/3|0,r,n),a=0,f=0,c=!1,h=!1,l=!1,p=!1,d=!1;a":if(!n){if(p){d=!0;break}p=!0}s.limit=f,c=!1;break;case"'":if(!n){if(l){d=!0;break}l=!0}s.markedOffset=f,c=!1;break;case" ":c=!1;break;default:if(!n&&c){d=!0;break}if(u=parseInt(i+t.charAt(a++),16),!n&&(isNaN(u)||u<0||u>255))throw TypeError("Illegal str: Not a debug encoded string");s.view[f++]=u,c=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+a)}if(!n){if(!h||!p)throw TypeError("Illegal str: Missing offset or limit");if(f>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}for(var r,n=new Array(e-t);t255))throw TypeError("Illegal str: Contains non-hex characters");o.view[a++]=i}return o.limit=a,o};var c=function(){var t={MAX_CODEPOINT:1114111,encodeUTF8:function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<128?e(127&r):r<2048?(e(r>>6&31|192),e(63&r|128)):r<65536?(e(r>>12&15|224),e(r>>6&63|128),e(63&r|128)):(e(r>>18&7|240),e(r>>12&63|128),e(r>>6&63|128),e(63&r|128)),r=null},decodeUTF8:function(t,e){for(var r,n,i,u,o=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(r=t());)if(0==(128&r))e(r);else if(192==(224&r))null===(n=t())&&o([r,n]),e((31&r)<<6|63&n);else if(224==(240&r))(null===(n=t())||null===(i=t()))&&o([r,n,i]),e((15&r)<<12|(63&n)<<6|63&i);else{if(240!=(248&r))throw RangeError("Illegal starting byte: "+r);(null===(n=t())||null===(i=t())||null===(u=t()))&&o([r,n,i,u]),e((7&r)<<18|(63&n)<<12|(63&i)<<6|63&u)}},UTF16toUTF8:function(t,e){for(var r,n=null;null!==(r=null!==n?n:t());)r>=55296&&r<=57343&&null!==(n=t())&&n>=56320&&n<=57343?(e(1024*(r-55296)+n-56320+65536),n=null):e(r);null!==n&&e(n)},UTF8toUTF16:function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<=65535?e(r):(e(55296+((r-=65536)>>10)),e(r%1024+56320)),r=null},encodeUTF16toUTF8:function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},decodeUTF8toUTF16:function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},calculateUTF16asUTF8:function(e){var r=0,n=0;return t.UTF16toUTF8(e,function(t){++r,n+=t<128?1:t<2048?2:t<65536?3:4}),[r,n]}};return t}();return r.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var r;try{c.decodeUTF8toUTF16(function(){return t=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var u=this._hash();return t?u.toString(t):u},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,r){var n=r(4),i=r(6),u=r(59),o=r(31),s=r(63),a=function(t,e,r){var f,c,h,l=t&a.F,p=t&a.G,d=t&a.S,y=t&a.P,m=t&a.B,g=t&a.W,v=p?i:i[e]||(i[e]={}),b=v.prototype,_=p?n:d?n[e]:(n[e]||{}).prototype;for(f in p&&(r=e),r)(c=!l&&_&&void 0!==_[f])&&s(v,f)||(h=c?_[f]:r[f],v[f]=p&&"function"!=typeof _[f]?r[f]:m&&c?u(h,n):g&&_[f]==h?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):y&&"function"==typeof h?u(Function.call,h):h,y&&((v.virtual||(v.virtual={}))[f]=h,t&a.R&&b&&!b[f]&&o(b,f,h)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,r){var n=r(61),i=r(154);t.exports=r(43)?function(t,e,r){return n.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(12).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,u=t.length,o=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var u=this._hash();return t?u.toString(t):u},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,r){var n=r(68),i=r(177);t.exports=r(47)?function(t,e,r){return n.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){"use strict";e.__esModule=!0;var n=o(r(196)),i=o(r(213)),u="function"==typeof i.default&&"symbol"==typeof n.default?function(t){return typeof t}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};function o(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof i.default&&"symbol"===u(n.default)?function(t){return void 0===t?"undefined":u(t)}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":void 0===t?"undefined":u(t)}},function(t,e,r){var n=r(36);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports={}},function(t,e,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),u=0;u1&&void 0!==arguments[1]?arguments[1]:"EOS";if("string"==typeof t){var n=p.fromString(t,r);return u(null!=n,"Invalid public key"),n}if(e.isBuffer(t))return p.fromBuffer(t);if("object"===(void 0===t?"undefined":i(t))&&t.Q)return p(t.Q);function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.compressed;return t.getEncoded(e)}u.equal(void 0===t?"undefined":i(t),"object","Invalid public key"),u.equal(i(t.compressed),"boolean","Invalid public key");return{Q:t,toString:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"EOS")+c.checkEncode(d())},toUncompressed:function(){var e=t.getEncoded(!1),r=o.Point.decodeFrom(a,e);return p.fromPoint(r)},toBuffer:d,child:function(r){console.error("Deprecated warning: PublicKey.child"),u(e.isBuffer(r),"Buffer required: offset"),u.equal(r.length,32,"offset length"),r=e.concat([d(),r]),r=f.sha256(r);var n=s.fromBuffer(r);if(n.compareTo(l)>=0)throw new Error("Child offset went out of bounds, try again");var i=h.multiply(n),o=t.add(i);if(a.isInfinity(o))throw new Error("Child offset derived to an invalid key, try again");return p.fromPoint(o)},toHex:function(){return d().toString("hex")}}}t.exports=p,p.isValid=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EOS";try{return p(t,e),!0}catch(t){return!1}},p.fromBinary=function(t){return p.fromBuffer(new e(t,"binary"))},p.fromBuffer=function(t){return p(o.Point.decodeFrom(a,t))},p.fromPoint=function(t){return p(t)},p.fromString=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EOS";try{return p.fromStringOrThrow(t,e)}catch(t){return null}},p.fromStringOrThrow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EOS";u.equal(void 0===t?"undefined":i(t),"string","public_key");var r=t.match(/^PUB_([A-Za-z0-9]+)_([A-Za-z0-9]+)$/);if(null===r)return new RegExp("^"+e).test(t)&&(t=t.substring(e.length)),p.fromBuffer(c.checkDecode(t));u(3===r.length,"Expecting public key like: PUB_K1_base58pubkey..");var o=n(r,3),s=o[1],a=o[2];return u.equal(s,"K1","K1 private key expected"),p.fromBuffer(c.checkDecode(a,s))},p.fromHex=function(t){return p.fromBuffer(new e(t,"hex"))},p.fromStringHex=function(t){return p.fromString(new e(t,"hex"))}}).call(this,r(1).Buffer)},function(t,e,r){"use strict";(function(e){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(262),u=r(3),o=r(127),s=r(20);t.exports={random32ByteBuffer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.cpuEntropyBits,i=void 0===r?0:r,a=t.safe,l=void 0===a||a;u.equal(void 0===i?"undefined":n(i),"number","cpuEntropyBits"),u.equal(void 0===l?"undefined":n(l),"boolean","boolean"),l&&u(f>=128,"Call initialize() to add entropy");var p=[];return p.push(o(32)),p.push(e.from(h(i))),p.push(c),p.push(function(){var t=Array(o(101)).join();try{t+=(new Date).toString()+" "+window.screen.height+" "+window.screen.width+" "+window.screen.colorDepth+" "+window.screen.availHeight+" "+window.screen.availWidth+" "+window.screen.pixelDepth+navigator.language+" "+window.location+" "+window.history.length;for(var r,n=0;n9007199254740991&&(c[p]=0)}}catch(t){i=!0,o=t}finally{try{!n&&h.return&&h.return()}finally{if(i)throw o}}},cpuEntropy:h,entropyCount:function(){return f},checkDecode:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;u(null!=t,"private key expected");var n=new e(i.decode(t)),o=n.slice(-4),a=n.slice(0,-4),f=void 0;if("sha256x2"===r)f=s.sha256(s.sha256(a)).slice(0,4);else{var c=[a];r&&c.push(e.from(r)),f=s.ripemd160(e.concat(c)).slice(0,4)}if(o.toString()!==f.toString())throw new Error("Invalid checksum, "+o.toString("hex")+" != "+f.toString("hex"));return a},checkEncode:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(u(e.isBuffer(t),"expecting keyBuffer"),"sha256x2"===r){var n=s.sha256(s.sha256(t)).slice(0,4);return i.encode(e.concat([t,n]))}var o=[t];r&&o.push(e.from(r));var a=s.ripemd160(e.concat(o)).slice(0,4);return i.encode(e.concat([t,a]))}};var a=0,f=0,c=o(101);function h(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128,e=[],r=null,n=0;e.length10){var s=Number(n/t*100).toFixed(2);console.warn("WARN: "+s+"% low CPU entropy re-sampled")}return e}function l(){for(var t=Date.now(),e=0,r=0;Date.now()>>24]^c[d>>>16&255]^h[y>>>8&255]^l[255&m]^e[g++],o=f[d>>>24]^c[y>>>16&255]^h[m>>>8&255]^l[255&p]^e[g++],s=f[y>>>24]^c[m>>>16&255]^h[p>>>8&255]^l[255&d]^e[g++],a=f[m>>>24]^c[p>>>16&255]^h[d>>>8&255]^l[255&y]^e[g++],p=u,d=o,y=s,m=a;return u=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[y>>>8&255]<<8|n[255&m])^e[g++],o=(n[d>>>24]<<24|n[y>>>16&255]<<16|n[m>>>8&255]<<8|n[255&p])^e[g++],s=(n[y>>>24]<<24|n[m>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^e[g++],a=(n[m>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&y])^e[g++],[u>>>=0,o>>>=0,s>>>=0,a>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],a=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],u=[[],[],[],[]],o=0,s=0,a=0;a<256;++a){var f=s^s<<1^s<<2^s<<3^s<<4;f=f>>>8^255&f^99,r[o]=f,n[f]=o;var c=t[o],h=t[c],l=t[h],p=257*t[f]^16843008*f;i[0][o]=p<<24|p>>>8,i[1][o]=p<<16|p>>>16,i[2][o]=p<<8|p>>>24,i[3][o]=p,p=16843009*l^65537*h^257*c^16843008*o,u[0][f]=p<<24|p>>>8,u[1][f]=p<<16|p>>>16,u[2][f]=p<<8|p>>>24,u[3][f]=p,0===o?o=s=1:(o=c^t[t[t[l^c]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:u}}();function f(t){this._key=i(t),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],u=0;u>>24,o=a.SBOX[o>>>24]<<24|a.SBOX[o>>>16&255]<<16|a.SBOX[o>>>8&255]<<8|a.SBOX[255&o],o^=s[u/e|0]<<24):e>6&&u%e==4&&(o=a.SBOX[o>>>24]<<24|a.SBOX[o>>>16&255]<<16|a.SBOX[o>>>8&255]<<8|a.SBOX[255&o]),i[u]=i[u-e]^o}for(var f=[],c=0;c>>24]]^a.INV_SUB_MIX[1][a.SBOX[l>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[l>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(t){return o(t=i(t),this._keySchedule,a.SUB_MIX,a.SBOX,this._nRounds)},f.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},f.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=o(t,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX,this._nRounds),u=n.allocUnsafe(16);return u.writeUInt32BE(r[0],0),u.writeUInt32BE(r[3],4),u.writeUInt32BE(r[2],8),u.writeUInt32BE(r[1],12),u},f.prototype.scrub=function(){u(this._keySchedule),u(this._invKeySchedule),u(this._key)},t.exports.AES=f},function(t,e,r){t.exports=i;var n=r(87).EventEmitter;function i(){n.call(this)}r(2)(i,n),i.Readable=r(88),i.Writable=r(243),i.Duplex=r(244),i.Transform=r(245),i.PassThrough=r(246),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function u(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",u),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",a));var o=!1;function s(){o||(o=!0,t.end())}function a(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){r.removeListener("data",i),t.removeListener("drain",u),r.removeListener("end",s),r.removeListener("close",a),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",f),t.on("error",f),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},function(t,e,r){"use strict";(function(e){!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var u,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(u=new Array(s-1),o=0;o>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function a(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function f(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=u,u.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},u.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";(function(e){var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,u=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,u=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw u}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var u=r(91),o=u.Point,s=u.getCurveByName("secp256k1"),a=r(14),f=r(3),c=r(20),h=r(40),l=r(41),p=r(92),d=r(264);s.G,s.n;function y(t){if("string"==typeof t)return y.fromString(t);if(e.isBuffer(t))return y.fromBuffer(t);if("object"===(void 0===t?"undefined":i(t))&&a.isBigInteger(t.d))return y(t.d);if(!a.isBigInteger(t))throw new TypeError("Invalid private key");function r(){var t=u();return t=e.concat([new e([128]),t]),l.checkEncode(t,"sha256x2")}var n=void 0;function u(){return t.toBuffer(32)}return{d:t,toWif:r,toString:function(){return r()},toPublic:function(){if(n)return n;var e=s.G.multiply(t);return n=h.fromPoint(e)},toBuffer:u,getSharedSecret:function(t){var e=(t=h(t)).toUncompressed().toBuffer(),r=o.fromAffine(s,a.fromBuffer(e.slice(1,33)),a.fromBuffer(e.slice(33,65))),n=u(),i=r.multiply(a.fromBuffer(n)).affineX.toBuffer({size:32});return c.sha512(i)},getChildKey:function(t){return y(p("sha256").update(u()).update(t).digest())}}}function m(t){f.equal(void 0===t?"undefined":i(t),"string","privateStr");var e=t.match(/^PVT_([A-Za-z0-9]+)_([A-Za-z0-9]+)$/);if(null===e){var r=l.checkDecode(t,"sha256x2"),u=r.readUInt8(0);f.equal(128,u,"Expected version 128, instead got "+u);return{privateKey:y.fromBuffer(r.slice(1)),format:"WIF",keyType:"K1"}}f(3===e.length,"Expecting private key like: PVT_K1_base58privateKey..");var o=n(e,3),s=o[1],a=o[2];return f.equal(s,"K1","K1 private key expected"),{privateKey:y.fromBuffer(l.checkDecode(a,s)),format:"PVT",keyType:s}}t.exports=y,y.fromHex=function(t){return y.fromBuffer(new e(t,"hex"))},y.fromBuffer=function(t){if(!e.isBuffer(t))throw new Error("Expecting parameter to be a Buffer type");if(33===t.length&&1===t[32]&&(t=t.slice(0,-1)),32!==t.length)throw new Error("Expecting 32 bytes, instead got "+t.length);return y(a.fromBuffer(t))},y.fromSeed=function(t){if("string"!=typeof t)throw new Error("seed must be of type string");return y.fromBuffer(c.sha256(t))},y.isWif=function(t){try{return f("WIF"===m(t).format),!0}catch(t){return!1}},y.isValid=function(t){try{return y(t),!0}catch(t){return!1}},y.fromWif=function(t){return console.log("PrivateKey.fromWif is deprecated, please use PrivateKey.fromString"),y.fromString(t)},y.fromString=function(t){return m(t).privateKey},y.randomKey=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return y.initialize().then(function(){return y.fromBuffer(l.random32ByteBuffer({cpuEntropyBits:t}))})},y.unsafeRandomKey=function(){return Promise.resolve(y.fromBuffer(l.random32ByteBuffer({safe:!1})))};var g=!1;y.initialize=d(function(){g||(function(){var t=y(c.sha256("")),e="key comparison test failed on a known private key";f.equal(t.toWif(),"5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss",e),f.equal(t.toString(),"5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss",e);var r=t.toPublic();f.equal(r.toString(),"EOS859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM","pubkey string comparison test failed on a known public key"),v(function(){return y.fromString(t.toWif())},"converting known wif from string"),v(function(){return y.fromString(t.toString())},"converting known pvt from string"),v(function(){return h.fromString(r.toString())},"converting known public key from string"),!0}(),l.addEntropy.apply(l,function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e=128,"insufficient entropy"),g=!0)});var v=function(t,e){try{t()}catch(t){throw t.message=e+" ==> "+t.message,t}}}).call(this,r(1).Buffer)},function(t,e,r){t.exports={default:r(302),__esModule:!0}},function(t,e,r){var n=r(60);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,r){var n=r(21),i=r(304),u=r(305),o=Object.defineProperty;e.f=r(43)?Object.defineProperty:function(t,e,r){if(n(t),e=u(e,!0),n(r),i)try{return o(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,r){t.exports={default:r(312),__esModule:!0}},function(t,e,r){var n=r(67);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,r){var n=r(22),i=r(365),u=r(366),o=Object.defineProperty;e.f=r(47)?Object.defineProperty:function(t,e,r){if(n(t),e=u(e,!0),n(r),i)try{return o(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=l(r(58)),i=l(r(65)),u=l(r(167)),o=l(r(339)),s=l(r(341)),a=l(r(356)),f=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(r(173)),c=r(174),h=l(r(360));function l(t){return t&&t.__esModule?t:{default:t}}const p=()=>{if(!y.scatter.isExtension&&!s.default.isConnected())throw new Error("Connect and Authenticate first - scatter.connect( pluginName )")},d=(t,e=0)=>{if(!(e>20))return y.scatter.isExtension?t(!0):void setTimeout(()=>d(t,e+1),100)};let y=new class{constructor(t){this.scatter=t}plugins(...t){this.scatter.isExtension||t.map(t=>this.scatter.loadPlugin(t))}}(new class{constructor(){this.isExtension=!1,this.identity=null}loadPlugin(t){if(!t.isValid())throw new Error(`${t.name} doesn't seem to be a valid ScatterJS plugin.`);o.default.loadPlugin(t),t.isSignatureProvider()&&(this[t.name]=t.signatureProvider(()=>{if(!this.identity)throw new Error("No Identity")}))}isInstalled(){return(0,u.default)(function*(){return new i.default(function(t){setTimeout(function(){t(!1)},3e3),i.default.race([d(t),s.default.ping().then(function(e){console.log("found",e),e&&t(!0)})])})})()}connect(t,e){var r=this;return(0,u.default)(function*(){return new i.default(function(i){if(!t||!t.length)throw new Error("You must specify a name for this connection");e=(0,n.default)({initTimeout:1e4,linkTimeout:3e4},e),setTimeout(function(){i(!1)},e.initTimeout),d(i),s.default.init(t,e.linkTimeout),s.default.link().then((()=>{var t=(0,u.default)(function*(t){return!!t&&(r.identity=yield r.getIdentityFromPermissions(),i(!0))});return function(e){return t.apply(this,arguments)}})())})})()}disconnect(){return s.default.disconnect()}isConnected(){return s.default.isConnected()}getVersion(){return s.default.sendApiRequest({type:"getVersion",payload:{}})}getIdentity(t){return p(),s.default.sendApiRequest({type:"getOrRequestIdentity",payload:{fields:t}}).then(t=>(t&&(this.identity=t),t))}getIdentityFromPermissions(){return p(),s.default.sendApiRequest({type:"identityFromPermissions",payload:{}}).then(t=>(t&&(this.identity=t),t))}forgetIdentity(){return p(),s.default.sendApiRequest({type:"forgetIdentity",payload:{}}).then(t=>(this.identity=null,t))}authenticate(){return p(),s.default.sendApiRequest({type:"authenticate",payload:{}})}getArbitrarySignature(t,e,r="",n=!1){return p(),s.default.sendApiRequest({type:"requestArbitrarySignature",payload:{publicKey:t,data:e,whatfor:r,isHash:n}})}getPublicKey(t){return p(),s.default.sendApiRequest({type:"getPublicKey",payload:{blockchain:t}})}linkAccount(t,e,r){return p(),s.default.sendApiRequest({type:"linkAccount",payload:{publicKey:t,account:e,network:r}})}suggestNetwork(t){return p(),s.default.sendApiRequest({type:"requestAddNetwork",payload:{network:t}})}requestSignature(t){return p(),s.default.sendApiRequest({type:"requestSignature",payload:t})}createTransaction(t,e,r,n){return p(),s.default.sendApiRequest({type:"createTransaction",payload:{blockchain:t,actions:e,account:r,network:n}})}});if("undefined"!=typeof window){if("undefined"!=typeof document){const t=()=>{y.scatter=window.scatter,y.scatter.isExtension=!0,y.scatter.connect=(()=>new i.default(t=>t(!0)))};void 0!==window.scatter?t():document.addEventListener("scatterLoaded",()=>t())}y.scatter.isExtension||(window.scatter=y.scatter)}y.Plugin=a.default,y.PluginTypes=f,y.Blockchains=c.Blockchains,y.Network=h.default,y.SocketService=s.default,t.exports=y,e.default=y},function(t,e,r){"use strict";var n=r(198)(!0);r(116)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(36);t.exports=function(t,e){if(!n(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!n(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n=r(122),i=r(80);t.exports=Object.keys||function(t){return n(t,i)}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,r){var n=r(79)("keys"),i=r(52);t.exports=function(t){return n[t]||(n[t]=i(t))}},function(t,e,r){var n=r(16),i=r(13),u=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return u[t]||(u[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:r(49)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,r){var n=r(24).f,i=r(17),u=r(11)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,u)&&n(t,u,{configurable:!0,value:e})}},function(t,e,r){r(210);for(var n=r(13),i=r(23),u=r(37),o=r(11)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),a=0;a0&&this._events[t].length>o&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!n(e))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},r.prototype.removeListener=function(t,e){var r,u,o,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(o=(r=this._events[t]).length,u=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(s=o;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){u=s;break}if(u<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(u,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[t]))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){(e=t.exports=r(133)).Stream=e,e.Readable=e,e.Writable=r(89),e.Duplex=r(19),e.Transform=r(136),e.PassThrough=r(242)},function(t,e,r){"use strict";(function(e,n,i){var u=r(55);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var s,a=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:u.nextTick;v.WritableState=g;var f=r(39);f.inherits=r(2);var c={deprecate:r(241)},h=r(134),l=r(0).Buffer,p=i.Uint8Array||function(){};var d,y=r(135);function m(){}function g(t,e){s=s||r(19),t=t||{};var n=e instanceof s;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,f=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(f||0===f)?f:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(u.nextTick(i,n),u.nextTick(B,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),B(t,e))}(t,r,n,e,i);else{var o=E(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?a(_,t,r,o,i):_(t,r,o,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function v(t){if(s=s||r(19),!(d.call(v,this)||this instanceof s))return new v(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function b(t,e,r,n,i,u,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,u,e.onwrite),e.sync=!1}function _(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),B(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),u=e.corkedRequestsFree;u.entry=r;for(var s=0,a=!0;r;)i[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;i.allBuffers=a,b(t,e,!0,e.length,i,"",u.finish),e.pendingcb++,e.lastBufferedRequest=null,u.next?(e.corkedRequestsFree=u.next,u.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,c=r.encoding,h=r.callback;if(b(t,e,!1,e.objectMode?1:f.length,f,c,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),B(t,e)})}function B(t,e){var r=E(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,u.nextTick(A,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}f.inherits(v,h),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===v&&(t&&t._writableState instanceof g)}})):d=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&function(t){return l.isBuffer(t)||t instanceof p}(t);return o&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=m),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),u.nextTick(e,r)}(this,r):(o||function(t,e,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),u.nextTick(n,o),i=!1),i}(this,n,t,r))&&(n.pendingcb++,i=function(t,e,r,n,i,u){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,r));return e}(e,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=e.objectMode?1:n.length;e.length+=s;var a=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,B(t,e),r&&(e.finished?u.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(27),r(239).setImmediate,r(10))},function(t,e,r){"use strict";(function(e){var n=r(2),i=r(139),u=new Array(16);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(t,e){return t<>>32-e}function a(t,e,r,n,i,u,o){return s(t+(e&r|~e&n)+i+u|0,o)+e|0}function f(t,e,r,n,i,u,o){return s(t+(e&n|r&~n)+i+u|0,o)+e|0}function c(t,e,r,n,i,u,o){return s(t+(e^r^n)+i+u|0,o)+e|0}function h(t,e,r,n,i,u,o){return s(t+(r^(e|~n))+i+u|0,o)+e|0}n(o,i),o.prototype._update=function(){for(var t=u,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;n=h(n=h(n=h(n=h(n=c(n=c(n=c(n=c(n=f(n=f(n=f(n=f(n=a(n=a(n=a(n=a(n,i=a(i,o=a(o,r=a(r,n,i,o,t[0],3614090360,7),n,i,t[1],3905402710,12),r,n,t[2],606105819,17),o,r,t[3],3250441966,22),i=a(i,o=a(o,r=a(r,n,i,o,t[4],4118548399,7),n,i,t[5],1200080426,12),r,n,t[6],2821735955,17),o,r,t[7],4249261313,22),i=a(i,o=a(o,r=a(r,n,i,o,t[8],1770035416,7),n,i,t[9],2336552879,12),r,n,t[10],4294925233,17),o,r,t[11],2304563134,22),i=a(i,o=a(o,r=a(r,n,i,o,t[12],1804603682,7),n,i,t[13],4254626195,12),r,n,t[14],2792965006,17),o,r,t[15],1236535329,22),i=f(i,o=f(o,r=f(r,n,i,o,t[1],4129170786,5),n,i,t[6],3225465664,9),r,n,t[11],643717713,14),o,r,t[0],3921069994,20),i=f(i,o=f(o,r=f(r,n,i,o,t[5],3593408605,5),n,i,t[10],38016083,9),r,n,t[15],3634488961,14),o,r,t[4],3889429448,20),i=f(i,o=f(o,r=f(r,n,i,o,t[9],568446438,5),n,i,t[14],3275163606,9),r,n,t[3],4107603335,14),o,r,t[8],1163531501,20),i=f(i,o=f(o,r=f(r,n,i,o,t[13],2850285829,5),n,i,t[2],4243563512,9),r,n,t[7],1735328473,14),o,r,t[12],2368359562,20),i=c(i,o=c(o,r=c(r,n,i,o,t[5],4294588738,4),n,i,t[8],2272392833,11),r,n,t[11],1839030562,16),o,r,t[14],4259657740,23),i=c(i,o=c(o,r=c(r,n,i,o,t[1],2763975236,4),n,i,t[4],1272893353,11),r,n,t[7],4139469664,16),o,r,t[10],3200236656,23),i=c(i,o=c(o,r=c(r,n,i,o,t[13],681279174,4),n,i,t[0],3936430074,11),r,n,t[3],3572445317,16),o,r,t[6],76029189,23),i=c(i,o=c(o,r=c(r,n,i,o,t[9],3654602809,4),n,i,t[12],3873151461,11),r,n,t[15],530742520,16),o,r,t[2],3299628645,23),i=h(i,o=h(o,r=h(r,n,i,o,t[0],4096336452,6),n,i,t[7],1126891415,10),r,n,t[14],2878612391,15),o,r,t[5],4237533241,21),i=h(i,o=h(o,r=h(r,n,i,o,t[12],1700485571,6),n,i,t[3],2399980690,10),r,n,t[10],4293915773,15),o,r,t[1],2240044497,21),i=h(i,o=h(o,r=h(r,n,i,o,t[8],1873313359,6),n,i,t[15],4264355552,10),r,n,t[6],2734768916,15),o,r,t[13],1309151649,21),i=h(i,o=h(o,r=h(r,n,i,o,t[4],4149444226,6),n,i,t[11],3174756917,10),r,n,t[2],718787259,15),o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new e(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=o}).call(this,r(1).Buffer)},function(t,e,r){var n=r(140),i=r(142),u=r(253);t.exports={Curve:i,Point:n,getCurveByName:u}},function(t,e,r){"use strict";var n=r(2),i=r(90),u=r(143),o=r(144),s=r(18);function a(t){s.call(this,"digest"),this._hash=t}n(a,s),a.prototype._update=function(t){this._hash.update(t)},a.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new u:new a(o(t))}},function(t,e,r){"use strict";(function(e){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(268),u=r(273),o=r(3),s=u.create;t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!==(void 0===t?"undefined":n(t)))throw new TypeError("definitions is a required parameter");if(e.customTypes)for(var r in t=Object.assign({},t),e.customTypes)delete t[r];var u=i(e),o=s(t,u),c=o.errors,h=o.structs;return{errors:c,structs:h,types:u,extend:function(e){return function t(e,r){var n=Object.assign({},e,r),i=s(n,u),o=i.structs;return{errors:i.errors,structs:o,extend:function(e){return t(n,e)},fromBuffer:a(u,o),toBuffer:f(u,o)}}(t,e)},fromBuffer:a(u,h),toBuffer:f(u,h)}};var a=function(t,r){return function(i,s){o.equal(void 0===i?"undefined":n(i),"string","typeName (type or struct name)"),"string"==typeof s&&(s=e.from(s,"hex")),o(e.isBuffer(s),"expecting buf");var a=t[i];return a=a?a():r[i],o(a,"missing type or struct: "+i),u.fromBuffer(a,s)}},f=function(t,e){return function(r,i){o.equal(void 0===r?"undefined":n(r),"string","typeName (type or struct name)"),o.equal(void 0===i?"undefined":n(i),"object","object");var s=t[r];return s=s?s():e[r],o(s,"missing type or struct: "+r),u.toBuffer(s,i)}};t.exports.fromBuffer=u.fromBuffer,t.exports.toBuffer=u.toBuffer}).call(this,r(1).Buffer)},function(t,e,r){"use strict";(function(e){var n=u(r(95)),i=u(r(34));function u(t){return t&&t.__esModule?t:{default:t}}var o=r(86),s=o.Signature,a=o.PublicKey,f=r(93),c=r(28),h=r(3),l=r(152),p=r(153),d=(p.isName,p.encodeName),y=p.decodeName,m=p.DecimalPad,g=p.DecimalImply,v=p.DecimalUnimply,b=p.printAsset,_=p.parseAsset;t.exports=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],r=function(e,r){var n=t.abiCache.abi(r),i=!0,u=!1,o=void 0;try{for(var s,a=n.abi.actions[Symbol.iterator]();!(i=(s=a.next()).done);i=!0){var f=s.value;if(f.name===e){var c=n.structs[f.type];if(null!=c)return c}}}catch(t){u=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(u)throw o}}var h=n.structs[e];if(null!=h)return h;throw new Error("Missing ABI action: "+e)},n=null==t.forceActionDataHex||t.forceActionDataHex,i=Object.assign({},T(t),k(r),M(t),I(r,n),t.override),u={name:function(){return[w]},public_key:function(){return[E(A)]},symbol:function(){return[B]},symbol_code:function(){return[C]},extended_symbol:function(){return[F]},asset:function(){return[x]},extended_asset:function(){return[S]},signature:function(){return[E(D)]}},o=Object.assign({},u,t.customTypes);(t=Object.assign({override:i},{customTypes:o},t)).sort=Object.assign({},t.sort),t.sort["action.authorization"]=!0,t.sort["signed_transaction.signature"]=!0,t.sort["authority.accounts"]=!0,t.sort["authority.keys"]=!0;var s=Object.assign({},l,e),a=f(s,t),c=a.structs,h=a.types,p=a.errors,d=a.fromBuffer,y=a.toBuffer;if(0!==p.length)throw new Error(JSON.stringify(p,null,4));return{structs:c,types:h,fromBuffer:d,toBuffer:y}};var w=function(t){return{fromByteBuffer:function(t){return y(t.readUint64(),!1)},appendByteBuffer:function(t,e){t.writeUint64(d(e,!1))},fromObject:function(t){return t},toObject:function(e){return t.defaults&&null==e?"":e}}},E=function(){for(var t=arguments.length,e=Array(t),r=0;r, got: "+(void 0===t?"undefined":(0,i.default)(t)));var r=e.amount,n=e.precision,u=e.symbol,o=e.contract;return h(null!=r,"missing amount"),h(null!=n,"missing precision"),h(null!=u,"missing symbol"),h(null!=o,"missing contract"),{amount:r,precision:n,symbol:u,contract:o}},toObject:function(e){if(t.defaults&&null==e)return{amount:"1.0000",precision:4,symbol:"SYS",contract:"eosio.token"};h.equal(void 0===e?"undefined":(0,i.default)(e),"object","expecting extended_asset object");var r=e.amount,n=e.precision,u=e.symbol,o=e.contract;return{amount:m(r,n),precision:n,symbol:u,contract:o}}}},D=function(t,e){var r=e.fixed_bytes65(t);return{fromByteBuffer:function(t){var e=r.fromByteBuffer(t);return s.from(e).toString()},appendByteBuffer:function(t,e){var n=s.from(e);r.appendByteBuffer(t,n.toBuffer())},fromObject:function(t){return s.from(t).toString()},toObject:function(e){return t.defaults&&null==e?"SIG_K1_bas58signature..":s.from(e).toString()}}},T=function(t){return{"authority.fromObject":function(e){if(a.fromString(e,t.keyPrefix))return{threshold:1,keys:[{key:e,weight:1}]};if("string"==typeof e){var r=e.split("@"),i=(0,n.default)(r,2),u=i[0],o=i[1];return{threshold:1,accounts:[{permission:{actor:u,permission:void 0===o?"active":o},weight:1}]}}}}},k=function(t){return{"abi_def.fromObject":function(t){if("string"==typeof t){var r=e.from(t,"hex").toString();return 0===r.length&&(r=e.from(t).toString()),JSON.parse(r)}return e.isBuffer(t)?JSON.parse(t.toString()):null},"setabi.abi.appendByteBuffer":function(r){r.fields;var n=r.object,u=r.b,o=t("abi_def","eosio"),s=new c(c.DEFAULT_CAPACITY,c.LITTLE_ENDIAN);e.isBuffer(n.abi)?s.append(n.abi):"object"==(0,i.default)(n.abi)&&o.appendByteBuffer(s,n.abi),u.writeVarint32(s.offset),u.append(s.copy(0,s.offset),"binary")}}},M=function(t){return{"setcode.code.fromObject":function(r){var n=r.object,i=r.result;try{var u=n.code.toString();if(/^\s*\(module/.test(u)){var o=t.binaryen;h(null!=o,'required: config.binaryen = require("binaryen")'),t.debug&&console.log("Assembling WASM..");var s=e.from(o.parseText(u).emitBinary());i.code=s}else i.code=n.code}catch(t){throw console.error(t,n.code),t}}}},I=function(t,r){return{"action.data.fromByteBuffer":function(r){var n=r.fields,i=r.object,u=r.b,o=r.config,s=""==(i.name||"")?n.data:t(i.name,i.account);if(s)u.readVarint32(),i.data=s.fromByteBuffer(u,o);else{var a=u.readVarint32(),f=u.copy(u.offset,u.offset+a);u.skip(a),i.data=e.from(f.toBinary(),"binary")}},"action.data.appendByteBuffer":function(r){var n=r.fields,i=r.object,u=r.b,o=""==(i.name||"")?n.data:t(i.name,i.account);if(o){var s=new c(c.DEFAULT_CAPACITY,c.LITTLE_ENDIAN);o.appendByteBuffer(s,i.data),u.writeVarint32(s.offset),u.append(s.copy(0,s.offset),"binary")}else{var a="string"==typeof i.data?new e(i.data,"hex"):i.data;if(!e.isBuffer(a))throw new TypeError("Unknown struct '"+i.name+"' for contract '"+i.account+"', locate this struct or provide serialized action.data");u.writeVarint32(a.length),u.append(a.toString("binary"),"binary")}},"action.data.fromObject":function(r){var n=r.fields,u=r.object,o=r.result,s=u.data,a=u.name,c=""==(a||"")?n.data:t(a,u.account);if(c)if("object"===(void 0===s?"undefined":(0,i.default)(s)))o.data=c.fromObject(s);else{if("string"!=typeof s)throw new TypeError("Expecting hex string or object in action.data");var h=new e(s,"hex");o.data=f.fromBuffer(c,h)}else o.data=s},"action.data.toObject":function(n){var i=n.fields,u=n.object,o=n.result,s=n.config,a=u||{},f=a.data,h=a.name,l=""==(h||"")?i.data:t(h,u.account);if(l){if(r){var p=new c(c.DEFAULT_CAPACITY,c.LITTLE_ENDIAN);return f&&l.appendByteBuffer(p,f),void(o.data=p.copy(0,p.offset).toString("hex"))}o.data=l.toObject(f,s)}else o.data=e.isBuffer(f)?f.toString("hex"):f}}}}).call(this,r(1).Buffer)},function(t,e,r){"use strict";e.__esModule=!0;var n=u(r(289)),i=u(r(292));function u(t){return t&&t.__esModule?t:{default:t}}e.default=function(){return function(t,e){if(Array.isArray(t))return t;if((0,n.default)(Object(t)))return function(t,e){var r=[],n=!0,u=!1,o=void 0;try{for(var s,a=(0,i.default)(t);!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){u=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(u)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(t,e,r){var n=r(42),i=r(4).document,u=n(i)&&n(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,e,r){var n=r(307),i=r(159);t.exports=Object.keys||function(t){return n(t,i)}},function(t,e,r){var n=r(155),i=r(99);t.exports=function(t){return n(i(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e,r){var n=r(157)("keys"),i=r(158);t.exports=function(t){return n[t]||(n[t]=i(t))}},function(t,e){t.exports=!0},function(t,e,r){var n=r(99);t.exports=function(t){return Object(n(t))}},function(t,e,r){var n=r(61).f,i=r(63),u=r(7)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,u)&&n(t,u,{configurable:!0,value:e})}},function(t,e,r){"use strict";var n=r(60);t.exports.f=function(t){return new function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=n(e),this.reject=n(r)}(t)}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=!0},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){var n=r(46),i=r(5).document,u=n(i)&&n(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,e,r){var n=r(179),i=r(107);t.exports=function(t){return n(i(t))}},function(t,e,r){var n=r(181)("keys"),i=r(182);t.exports=function(t){return n[t]||(n[t]=i(t))}},function(t,e,r){var n=r(68).f,i=r(69),u=r(9)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,u)&&n(t,u,{configurable:!0,value:e})}},function(t,e,r){"use strict";var n=r(67);t.exports.f=function(t){return new function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=n(e),this.reject=n(r)}(t)}},function(t,e,r){t.exports=r(194)},function(t,e,r){"use strict";var n=r(49),i=r(117),u=r(120),o=r(23),s=r(37),a=r(201),f=r(81),c=r(208),h=r(11)("iterator"),l=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,r,d,y,m,g){a(r,e,d);var v,b,_,w=function(t){if(!l&&t in C)return C[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},E=e+" Iterator",A="values"==y,B=!1,C=t.prototype,F=C[h]||C["@@iterator"]||y&&C[y],x=F||w(y),S=y?A?w("entries"):x:void 0,D="Array"==e&&C.entries||F;if(D&&(_=c(D.call(new t)))!==Object.prototype&&_.next&&(f(_,E,!0),n||"function"==typeof _[h]||o(_,h,p)),A&&F&&"values"!==F.name&&(B=!0,x=function(){return F.call(this)}),n&&!g||!l&&!B&&C[h]||o(C,h,x),s[e]=x,s[E]=p,y)if(v={values:A?x:w("values"),keys:m?x:w("keys"),entries:S},g)for(b in v)b in C||u(C,b,v[b]);else i(i.P+i.F*(l||B),e,v);return v}},function(t,e,r){var n=r(13),i=r(16),u=r(199),o=r(23),s=r(17),a=function(t,e,r){var f,c,h,l=t&a.F,p=t&a.G,d=t&a.S,y=t&a.P,m=t&a.B,g=t&a.W,v=p?i:i[e]||(i[e]={}),b=v.prototype,_=p?n:d?n[e]:(n[e]||{}).prototype;for(f in p&&(r=e),r)(c=!l&&_&&void 0!==_[f])&&s(v,f)||(h=c?_[f]:r[f],v[f]=p&&"function"!=typeof _[f]?r[f]:m&&c?u(h,n):g&&_[f]==h?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):y&&"function"==typeof h?u(Function.call,h):h,y&&((v.virtual||(v.virtual={}))[f]=h,t&a.R&&b&&!b[f]&&o(b,f,h)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,r){t.exports=!r(25)&&!r(50)(function(){return 7!=Object.defineProperty(r(119)("div"),"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(36),i=r(13).document,u=n(i)&&n(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,e,r){t.exports=r(23)},function(t,e,r){var n=r(35),i=r(202),u=r(80),o=r(78)("IE_PROTO"),s=function(){},a=function(){var t,e=r(119)("iframe"),n=u.length;for(e.style.display="none",r(207).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("