-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathe1eba8508b4e37194051.worker.js
44 lines (41 loc) · 371 KB
/
e1eba8508b4e37194051.worker.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var r=e.slice(1),n=t[e[0]];return function(t,e,i){n.apply(this,[t,e,i].concat(r))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,r){"use strict";r(115);var n=r(276),i=(n.key,n.Aes);onmessage=function(t){try{console.log("AesWorker start");var e=t.data,r=e.private_plainhex_array,n=e.iv,o=e.key,s=new i(n,o),u=[],a=!0,f=!1,c=void 0;try{for(var h,l=r[Symbol.iterator]();!(a=(h=l.next()).done);a=!0){var p=h.value,d=s.encryptHex(p);u.push(d)}}catch(v){f=!0,c=v}finally{try{!a&&l["return"]&&l["return"]()}finally{if(f)throw c}}postMessage(u),console.log("AesWorker done")}catch(_){console.error("AesWorker",_)}}},function(t,e,r){var n=r(7),i=r(21),o=r(19),s=r(14),u=r(17),a="prototype",f=function(t,e,r){var c,h,l,p,d=t&f.F,v=t&f.G,_=t&f.S,y=t&f.P,g=t&f.B,b=v?n:_?n[e]||(n[e]={}):(n[e]||{})[a],m=v?i:i[e]||(i[e]={}),w=m[a]||(m[a]={});v&&(r=e);for(c in r)h=!d&&b&&c in b,l=(h?b:r)[c],p=g&&h?u(l,n):y&&"function"==typeof l?u(Function.call,l):l,b&&!h&&s(b,c,l),m[c]!=l&&o(m,c,p),y&&w[c]!=l&&(w[c]=l)};n.core=i,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,t.exports=f},function(t,e){var r=Object;t.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(t,e,r){(function(t,n){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
* @license MIT
*/
"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,r){if(o()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return u(this,e,r,n)}function u(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?p(t,e,r,n):"string"==typeof e?h(t,e,r):d(t,e)}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e,r,n){return a(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}function c(e,r){if(a(r),e=s(e,r<0?0:0|v(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function h(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|y(r,n);e=s(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function l(t,e){var r=e.length<0?0:0|v(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=l(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|v(r.length);return e=s(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||J(r.length)?s(e,0):l(e,r);if("Buffer"===r.type&&Q(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function _(e){return+e!=e&&(e=0),t.alloc(+e)}function y(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(i)return V(e).length;r=(""+r).toLowerCase(),i=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return M(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return j(this,e,r);case"latin1":case"binary":return D(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:w(e,r,n,i,o);if("number"==typeof r)return r=255&r,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):w(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,u=t.length,a=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,u/=2,a/=2,r/=2}var f;if(i){var c=-1;for(f=r;f<u;f++)if(o(t,f)===o(e,c===-1?0:f-c)){if(c===-1&&(c=f),f-c+1===a)return c*s}else c!==-1&&(f-=f-c),c=-1}else for(r+a>u&&(r=u-a),f=r;f>=0;f--){for(var h=!0,l=0;l<a;l++)if(o(t,f+l)!==o(e,l)){h=!1;break}if(h)return f}return-1}function E(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var u=parseInt(e.substr(2*s,2),16);if(isNaN(u))return s;t[r+s]=u}return s}function S(t,e,r,n){return Z(V(e,t.length-r),t,r,n)}function x(t,e,r,n){return Z(W(e),t,r,n)}function k(t,e,r,n){return x(t,e,r,n)}function I(t,e,r,n){return Z(G(e),t,r,n)}function B(t,e,r,n){return Z(Y(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?X.fromByteArray(t):X.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],s=null,u=o>239?4:o>223?3:o>191?2:1;if(i+u<=r){var a,f,c,h;switch(u){case 1:o<128&&(s=o);break;case 2:a=t[i+1],128===(192&a)&&(h=(31&o)<<6|63&a,h>127&&(s=h));break;case 3:a=t[i+1],f=t[i+2],128===(192&a)&&128===(192&f)&&(h=(15&o)<<12|(63&a)<<6|63&f,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:a=t[i+1],f=t[i+2],c=t[i+3],128===(192&a)&&128===(192&f)&&128===(192&c)&&(h=(15&o)<<18|(63&a)<<12|(63&f)<<6|63&c,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,u=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=u}return O(n)}function O(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function j(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function M(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=K(t[o]);return i}function R(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function z(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function L(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function q(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function U(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function P(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,i){return i||P(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(t,e,r,n,23,4),r+4}function C(t,e,r,n,i){return i||P(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(t,e,r,n,52,8),r+8}function F(t){if(t=H(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function K(t){return t<16?"0"+t.toString(16):t.toString(16)}function V(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.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;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function Y(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function G(t){return X.toByteArray(F(t))}function Z(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t){return t!==t}var X=r(117),$=r(283),Q=r(119);e.Buffer=t,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return u(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return f(null,t,e,r)},t.allocUnsafe=function(t){return c(null,t)},t.allocUnsafeSlow=function(t){return c(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,s=Math.min(n,i);o<s;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!Q(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!t.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},t.byteLength=y,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):g.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,u=n-r,a=Math.min(s,u),f=this.slice(i,o),c=e.slice(r,n),h=0;h<a;++h)if(f[h]!==c[h]){s=f[h],u=c[h];break}return s<u?-1:u<s?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(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 o=!1;;)switch(n){case"hex":return E(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":return x(this,t,e,r);case"latin1":case"binary":return k(this,t,e,r);case"base64":return I(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,(void 0));for(var s=0;s<o;++s)i[s]=this[s+e]}return i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||z(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||z(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||z(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||z(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||z(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||z(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||z(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||z(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||z(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||z(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||z(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||z(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||z(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||z(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||z(t,4,this.length),$.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||z(t,4,this.length),$.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||z(t,8,this.length),$.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||z(t,8,this.length),$.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;L(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s<r&&(o*=256);)this[e+s]=t/o&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;L(this,t,e,r,i,0)}var o=r-1,s=1;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=t/s&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):q(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):q(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):U(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=0,s=1,u=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/s>>0)-u&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=r-1,s=1,u=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/s>>0)-u&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):q(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):q(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):U(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||L(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return C(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return C(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,s=i-n;if(this===e&&n<r&&r<i)for(o=s-1;o>=0;--o)e[o+r]=this[o+n];else if(s<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),r);return s},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e=255&e);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=r;s<n;++s)this[s]=e;else{var u=t.isBuffer(e)?e:V(new t(e,i).toString()),a=u.length;for(s=0;s<n-r;++s)this[s+r]=u[s%a]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(3).Buffer,function(){return this}())},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var n=r(4);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){var n=r(86)("wks"),i=r(30),o=r(7).Symbol;t.exports=function(t){return n[t]||(n[t]=o&&o[t]||(o||i)("Symbol."+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){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,r){(function(e){"use strict";/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
* @license MIT
*/
function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}function o(t){return Object.prototype.toString.call(t)}function s(t){return!i(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function u(t){if(m.isFunction(t)){if(S)return t.name;var e=t.toString(),r=e.match(k);return r&&r[1]}}function a(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function f(t){if(S||!m.isFunction(t))return m.inspect(t);var e=u(t),r=e?": "+e:"";return"[Function"+r+"]"}function c(t){return a(f(t.actual),128)+" "+t.operator+" "+a(f(t.expected),128)}function h(t,e,r,n,i){throw new x.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function l(t,e){t||h(t,!0,e,"==",x.ok)}function p(t,e,r,u){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(m.isDate(t)&&m.isDate(e))return t.getTime()===e.getTime();if(m.isRegExp(t)&&m.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(s(t)&&s(e)&&o(t)===o(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;u=u||{actual:[],expected:[]};var a=u.actual.indexOf(t);return a!==-1&&a===u.expected.indexOf(e)||(u.actual.push(t),u.expected.push(e),v(t,e,r,u))}return r?t===e:t==e}function d(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function v(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(m.isPrimitive(t)||m.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=d(t),o=d(e);if(i&&!o||!i&&o)return!1;if(i)return t=E.call(t),e=E.call(e),p(t,e,r);var s,u,a=I(t),f=I(e);if(a.length!==f.length)return!1;for(a.sort(),f.sort(),u=a.length-1;u>=0;u--)if(a[u]!==f[u])return!1;for(u=a.length-1;u>=0;u--)if(s=a[u],!p(t[s],e[s],r,n))return!1;return!0}function _(t,e,r){p(t,e,!0)&&h(t,e,r,"notDeepStrictEqual",_)}function y(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(r){}return!Error.isPrototypeOf(e)&&e.call({},t)===!0}function g(t){var e;try{t()}catch(r){e=r}return e}function b(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=g(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&h(i,r,"Missing expected exception"+n);var o="string"==typeof n,s=!t&&m.isError(i),u=!t&&i&&!r;if((s&&o&&y(i,r)||u)&&h(i,r,"Got unwanted exception"+n),t&&i&&r&&!y(i,r)||!t&&i)throw i}var m=r(50),w=Object.prototype.hasOwnProperty,E=Array.prototype.slice,S=function(){return"foo"===function(){}.name}(),x=t.exports=l,k=/\s*function\s+([^\(\s]*)\s*/;x.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=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=u(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},m.inherits(x.AssertionError,Error),x.fail=h,x.ok=l,x.equal=function(t,e,r){t!=e&&h(t,e,r,"==",x.equal)},x.notEqual=function(t,e,r){t==e&&h(t,e,r,"!=",x.notEqual)},x.deepEqual=function(t,e,r){p(t,e,!1)||h(t,e,r,"deepEqual",x.deepEqual)},x.deepStrictEqual=function(t,e,r){p(t,e,!0)||h(t,e,r,"deepStrictEqual",x.deepStrictEqual)},x.notDeepEqual=function(t,e,r){p(t,e,!1)&&h(t,e,r,"notDeepEqual",x.notDeepEqual)},x.notDeepStrictEqual=_,x.strictEqual=function(t,e,r){t!==e&&h(t,e,r,"===",x.strictEqual)},x.notStrictEqual=function(t,e,r){t===e&&h(t,e,r,"!==",x.notStrictEqual)},x["throws"]=function(t,e,r){b(!0,t,e,r)},x.doesNotThrow=function(t,e,r){b(!1,t,e,r)},x.ifError=function(t){if(t)throw t};var I=Object.keys||function(t){var e=[];for(var r in t)w.call(t,r)&&e.push(r);return e}}).call(e,function(){return this}())},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){var n=r(35),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},function(t,e,r){t.exports=!r(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(1),i=r(21),o=r(8);t.exports=function(t,e){var r=(i.Object||{})[t]||Object[t],s={};s[t]=e(r),n(n.S+n.F*o(function(){r(1)}),"Object",s)}},function(t,e,r){var n=r(7),i=r(19),o=r(30)("src"),s="toString",u=Function[s],a=(""+u).split(s);r(21).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,r,s){"function"==typeof r&&(r.hasOwnProperty(o)||i(r,o,t[e]?""+t[e]:a.join(String(e))),r.hasOwnProperty("name")||i(r,"name",e)),t===n?t[e]=r:(s||delete t[e],i(t,e,r))})(Function.prototype,s,function(){return"function"==typeof this&&this[o]||u.call(this)})},function(t,e,r){var n=r(43),i=r(18);t.exports=function(t){return n(i(t))}},function(t,e,r){var n=r(67);r(118),t.exports=n},function(t,e,r){var n=r(28);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(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(2),i=r(25);t.exports=r(12)?function(t,e,r){return n.setDesc(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e){var r=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=r)},function(t,e,r){var n=r(18);t.exports=function(t){return Object(n(t))}},function(t,e,r){!function(r,n){t.exports=e=n()}(this,function(){var t=t||function(t,e){var r={},n=r.lib={},i=n.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var r=new t;return e&&r.mixIn(e),r.hasOwnProperty("init")||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),o=n.WordArray=i.extend({init:function(t,r){t=this.words=t||[],r!=e?this.sigBytes=r:this.sigBytes=4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var s=r[o>>>2]>>>24-o%4*8&255;e[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var o=0;o<i;o+=4)e[n+o>>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r,n=[],i=function(e){var e=e,r=987654321,n=4294967295;return function(){r=36969*(65535&r)+(r>>16)&n,e=18e3*(65535&e)+(e>>16)&n;var i=(r<<16)+e&n;return i/=4294967296,i+=.5,i*(t.random()>.5?1:-1)}},s=0;s<e;s+=4){var u=i(4294967296*(r||t.random()));r=987654071*u(),n.push(4294967296*u()|0)}return new o.init(n,e)}}),s=r.enc={},u=s.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new o.init(r,e/2)}},a=s.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new o.init(r,e)}},f=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(a.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return a.parse(unescape(encodeURIComponent(t)))}},c=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,n=r.words,i=r.sigBytes,s=this.blockSize,u=4*s,a=i/u;a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0);var f=a*s,c=t.min(4*f,i);if(f){for(var h=0;h<f;h+=s)this._doProcessBlock(n,h);var l=n.splice(0,f);r.sigBytes-=c}return new o.init(l,c)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),h=(n.Hasher=c.extend({cfg:i.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){c.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new h.HMAC.init(t,r).finalize(e)}}}),r.algo={});return r}(Math);return t})},function(t,e,r){"use strict";function n(t,e){return f("sha1").update(t).digest(e)}function i(t,e){return f("sha256").update(t).digest(e)}function o(t,e){return f("sha512").update(t).digest(e)}function s(t,e){return c("sha256",e).update(t).digest()}function u(t){return f("rmd160").update(t).digest()}var a=r(237),f=a.createHash,c=a.createHmac;t.exports={sha1:n,sha256:i,sha512:o,HmacSHA256:s,ripemd160:u}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){"use strict";var n=r(280),i=r(107);t.exports={Apis:n,ChainConfig:i}},function(t,e,r){var n,i,o;(function(t){/**
* @license bytebuffer.js (c) 2015 Daniel Wirtz <[email protected]>
* Backing buffer: ArrayBuffer, Accessor: Uint8Array
* Released under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/bytebuffer.js for details
*/
!function(s,u){r(110).amd?(i=[r(108)],n=u,o="function"==typeof n?n.apply(e,i):n,!(void 0!==o&&(t.exports=o))):"object"==typeof t&&t&&t.exports?t.exports=function(){var t;try{t=r(108)}catch(e){}return u(t)}():(s.dcodeIO=s.dcodeIO||{}).ByteBuffer=u(s.dcodeIO.Long)}(this,function(t){"use strict";function e(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function r(){var t=[],e=[];return function(){return 0===arguments.length?e.join("")+a.apply(String,t):(t.length+arguments.length>1024&&(e.push(a.apply(String,t)),t.length=0),void Array.prototype.push.apply(t,arguments))}}function n(t,e,r,n,i){var o,s,u=8*i-n-1,a=(1<<u)-1,f=a>>1,c=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-c)-1,p>>=-c,c+=u;c>0;o=256*o+t[e+h],h+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=l,c-=8);if(0===o)o=1-f;else{if(o===a)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)}function i(t,e,r,n,i,o){var s,u,a,f=8*o-i-1,c=(1<<f)-1,h=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),e+=s+h>=1?l/a:l*Math.pow(2,1-h),e*a>=2&&(s++,a/=2),s+h>=c?(u=0,s=c):s+h>=1?(u=(e*a-1)*Math.pow(2,i),s+=h):(u=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&u,p+=d,u/=256,i-=8);for(s=s<<i|u,f+=i;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*v}var o=function(t,e,r){if("undefined"==typeof t&&(t=o.DEFAULT_CAPACITY),"undefined"==typeof e&&(e=o.DEFAULT_ENDIAN),"undefined"==typeof r&&(r=o.DEFAULT_NOASSERT),!r){if(t=0|t,t<0)throw RangeError("Illegal capacity");e=!!e,r=!!r}this.buffer=0===t?u:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=e,this.noAssert=r};o.VERSION="5.0.1",o.LITTLE_ENDIAN=!0,o.BIG_ENDIAN=!1,o.DEFAULT_CAPACITY=16,o.DEFAULT_ENDIAN=o.BIG_ENDIAN,o.DEFAULT_NOASSERT=!1,o.Long=t||null;var s=o.prototype;s.__isByteBuffer__,Object.defineProperty(s,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var u=new ArrayBuffer(0),a=String.fromCharCode;o.accessor=function(){return Uint8Array},o.allocate=function(t,e,r){return new o(t,e,r)},o.concat=function(t,e,r,n){"boolean"!=typeof e&&"string"==typeof e||(n=r,r=e,e=void 0);for(var i,s=0,u=0,a=t.length;u<a;++u)o.isByteBuffer(t[u])||(t[u]=o.wrap(t[u],e)),i=t[u].limit-t[u].offset,i>0&&(s+=i);if(0===s)return new o(0,r,n);var f,c=new o(s,r,n);for(u=0;u<a;)f=t[u++],i=f.limit-f.offset,i<=0||(c.view.set(f.view.subarray(f.offset,f.limit),c.offset),c.offset+=i);return c.limit=c.offset,c.offset=0,c},o.isByteBuffer=function(t){return(t&&t.__isByteBuffer__)===!0},o.type=function(){return ArrayBuffer},o.wrap=function(t,e,r,n){if("string"!=typeof e&&(n=r,r=e,e=void 0),"string"==typeof t)switch("undefined"==typeof e&&(e="utf8"),e){case"base64":return o.fromBase64(t,r);case"hex":return o.fromHex(t,r);case"binary":return o.fromBinary(t,r);case"utf8":return o.fromUTF8(t,r);case"debug":return o.fromDebug(t,r);default:throw Error("Unsupported encoding: "+e)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var i;if(o.isByteBuffer(t))return i=s.clone.call(t),i.markedOffset=-1,i;if(t instanceof Uint8Array)i=new o(0,r,n),t.length>0&&(i.buffer=t.buffer,i.offset=t.byteOffset,i.limit=t.byteOffset+t.byteLength,i.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)i=new o(0,r,n),t.byteLength>0&&(i.buffer=t,i.offset=0,i.limit=t.byteLength,i.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");i=new o(t.length,r,n),i.limit=t.length;for(var u=0;u<t.length;++u)i.view[u]=t[u]}return i},s.writeBitSet=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if(!(t instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e,o=t.length,s=o>>3,u=0;for(e+=this.writeVarint32(o,e);s--;)n=1&!!t[u++]|(1&!!t[u++])<<1|(1&!!t[u++])<<2|(1&!!t[u++])<<3|(1&!!t[u++])<<4|(1&!!t[u++])<<5|(1&!!t[u++])<<6|(1&!!t[u++])<<7,this.writeByte(n,e++);if(u<o){var a=0;for(n=0;u<o;)n|=(1&!!t[u++])<<a++;this.writeByte(n,e++)}return r?(this.offset=e,this):e-i},s.readBitSet=function(t){var e="undefined"==typeof t;e&&(t=this.offset);var r,n=this.readVarint32(t),i=n.value,o=i>>3,s=0,u=[];for(t+=n.length;o--;)r=this.readByte(t++),u[s++]=!!(1&r),u[s++]=!!(2&r),u[s++]=!!(4&r),u[s++]=!!(8&r),u[s++]=!!(16&r),u[s++]=!!(32&r),u[s++]=!!(64&r),u[s++]=!!(128&r);if(s<i){var a=0;for(r=this.readByte(t++);s<i;)u[s++]=!!(r>>a++&1)}return e&&(this.offset=t),u},s.readBytes=function(t,e){var r="undefined"==typeof 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,e<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},s.writeBytes=s.append,s.writeInt8=function(t,e){var r="undefined"==typeof 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,e<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},s.writeByte=s.writeInt8,s.readInt8=function(t){var e="undefined"==typeof 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,t<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},s.readByte=s.readInt8,s.writeUint8=function(t,e){var r="undefined"==typeof 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,e<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},s.writeUInt8=s.writeUint8,s.readUint8=function(t){var e="undefined"==typeof 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,t<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},s.readUInt8=s.readUint8,s.writeInt16=function(t,e){var r="undefined"==typeof 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,e<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},s.writeShort=s.writeInt16,s.readInt16=function(t){var e="undefined"==typeof 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,t<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},s.readShort=s.readInt16,s.writeUint16=function(t,e){var r="undefined"==typeof 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,e<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},s.writeUInt16=s.writeUint16,s.readUint16=function(t){var e="undefined"==typeof 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,t<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},s.readUInt16=s.readUint16,s.writeInt32=function(t,e){var r="undefined"==typeof 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,e<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},s.writeInt=s.writeInt32,s.readInt32=function(t){var e="undefined"==typeof 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,t<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},s.readInt=s.readInt32,s.writeUint32=function(t,e){var r="undefined"==typeof 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,e<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},s.writeUInt32=s.writeUint32,s.readUint32=function(t){var e="undefined"==typeof 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,t<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},s.readUInt32=s.readUint32,t&&(s.writeInt64=function(e,r){var n="undefined"==typeof 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,r<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 o=e.low,s=e.high;return this.littleEndian?(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,r+=4,this.view[r+3]=s>>>24&255,this.view[r+2]=s>>>16&255,this.view[r+1]=s>>>8&255,this.view[r]=255&s):(this.view[r]=s>>>24&255,this.view[r+1]=s>>>16&255,this.view[r+2]=s>>>8&255,this.view[r+3]=255&s,r+=4,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),n&&(this.offset+=8),this},s.writeLong=s.writeInt64,s.readInt64=function(e){var r="undefined"==typeof 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,e<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 o=new t(n,i,(!1));return r&&(this.offset+=8),o},s.readLong=s.readInt64,s.writeUint64=function(e,r){var n="undefined"==typeof 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,r<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 o=e.low,s=e.high;return this.littleEndian?(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,r+=4,this.view[r+3]=s>>>24&255,this.view[r+2]=s>>>16&255,this.view[r+1]=s>>>8&255,this.view[r]=255&s):(this.view[r]=s>>>24&255,this.view[r+1]=s>>>16&255,this.view[r+2]=s>>>8&255,this.view[r+3]=255&s,r+=4,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),n&&(this.offset+=8),this},s.writeUInt64=s.writeUint64,s.readUint64=function(e){var r="undefined"==typeof 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,e<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 o=new t(n,i,(!0));return r&&(this.offset+=8),o},s.readUInt64=s.readUint64),s.writeFloat32=function(t,e){var r="undefined"==typeof 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,e<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,i(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},s.writeFloat=s.writeFloat32,s.readFloat32=function(t){var e="undefined"==typeof 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,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=n(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},s.readFloat=s.readFloat32,s.writeFloat64=function(t,e){var r="undefined"==typeof 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,e<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,i(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},s.writeDouble=s.writeFloat64,s.readFloat64=function(t){var e="undefined"==typeof 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,t<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=n(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},s.readDouble=s.readFloat64,o.MAX_VARINT32_BYTES=5,o.calculateVarint32=function(t){return t>>>=0,t<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},o.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},o.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},s.writeVarint32=function(t,e){var r="undefined"==typeof 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,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=o.calculateVarint32(t);e+=i;var s=this.buffer.byteLength;for(e>s&&this.resize((s*=2)>e?s:e),e-=i,t>>>=0;t>=128;)n=127&t|128,this.view[e++]=n,t>>>=7;return this.view[e++]=t,r?(this.offset=e,this):i},s.writeVarint32ZigZag=function(t,e){return this.writeVarint32(o.zigZagEncode32(t),e)},s.readVarint32=function(t){var e="undefined"==typeof 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,t<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 o=Error("Truncated");throw o.truncated=!0,o}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}},s.readVarint32ZigZag=function(t){var e=this.readVarint32(t);return"object"==typeof e?e.value=o.zigZagDecode32(e.value):e=o.zigZagDecode32(e),e},t&&(o.MAX_VARINT64_BYTES=10,o.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},o.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},o.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},s.writeVarint64=function(e,r){var n="undefined"==typeof 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,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned());var i=o.calculateVarint64(e),s=e.toInt()>>>0,u=e.shiftRightUnsigned(28).toInt()>>>0,a=e.shiftRightUnsigned(56).toInt()>>>0;r+=i;var f=this.buffer.byteLength;switch(r>f&&this.resize((f*=2)>r?f:r),r-=i,i){case 10:this.view[r+9]=a>>>7&1;case 9:this.view[r+8]=9!==i?128|a:127&a;case 8:this.view[r+7]=8!==i?u>>>21|128:u>>>21&127;case 7:this.view[r+6]=7!==i?u>>>14|128:u>>>14&127;case 6:this.view[r+5]=6!==i?u>>>7|128:u>>>7&127;case 5:this.view[r+4]=5!==i?128|u:127&u;case 4:this.view[r+3]=4!==i?s>>>21|128:s>>>21&127;case 3:this.view[r+2]=3!==i?s>>>14|128:s>>>14&127;case 2:this.view[r+1]=2!==i?s>>>7|128:s>>>7&127;case 1:this.view[r]=1!==i?128|s:127&s}return n?(this.offset+=i,this):i},s.writeVarint64ZigZag=function(t,e){return this.writeVarint64(o.zigZagEncode64(t),e)},s.readVarint64=function(e){var r="undefined"==typeof 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,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,i=0,o=0,s=0,u=0;if(u=this.view[e++],i=127&u,128&u&&(u=this.view[e++],i|=(127&u)<<7,(128&u||this.noAssert&&"undefined"==typeof u)&&(u=this.view[e++],i|=(127&u)<<14,(128&u||this.noAssert&&"undefined"==typeof u)&&(u=this.view[e++],i|=(127&u)<<21,(128&u||this.noAssert&&"undefined"==typeof u)&&(u=this.view[e++],o=127&u,(128&u||this.noAssert&&"undefined"==typeof u)&&(u=this.view[e++],o|=(127&u)<<7,(128&u||this.noAssert&&"undefined"==typeof u)&&(u=this.view[e++],o|=(127&u)<<14,(128&u||this.noAssert&&"undefined"==typeof u)&&(u=this.view[e++],o|=(127&u)<<21,(128&u||this.noAssert&&"undefined"==typeof u)&&(u=this.view[e++],s=127&u,(128&u||this.noAssert&&"undefined"==typeof u)&&(u=this.view[e++],s|=(127&u)<<7,128&u||this.noAssert&&"undefined"==typeof u))))))))))throw Error("Buffer overrun");var a=t.fromBits(i|o<<28,o>>>4|s<<24,!1);return r?(this.offset=e,a):{value:a,length:e-n}},s.readVarint64ZigZag=function(e){var r=this.readVarint64(e);return r&&r.value instanceof t?r.value=o.zigZagDecode64(r.value):r=o.zigZagDecode64(r),r}),s.writeCString=function(t,r){var n="undefined"==typeof r;n&&(r=this.offset);var i,o=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(i=0;i<o;++i)if(0===t.charCodeAt(i))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}o=c.calculateUTF16asUTF8(e(t))[1],r+=o+1;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=o+1,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),this.view[r++]=0,n?(this.offset=r,this):o},s.readCString=function(t){var e="undefined"==typeof 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,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n,i=t,o=-1;return c.decodeUTF8toUTF16(function(){if(0===o)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return o=this.view[t++],0===o?null:o}.bind(this),n=r(),!0),e?(this.offset=t,n()):{string:n(),length:t-i}},s.writeIString=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=r;i=c.calculateUTF16asUTF8(e(t),this.noAssert)[1],r+=4+i;var s=this.buffer.byteLength;if(r>s&&this.resize((s*=2)>r?s:r),r-=4+i,this.littleEndian?(this.view[r+3]=i>>>24&255,this.view[r+2]=i>>>16&255,this.view[r+1]=i>>>8&255,this.view[r]=255&i):(this.view[r]=i>>>24&255,this.view[r+1]=i>>>16&255,this.view[r+2]=i>>>8&255,this.view[r+3]=255&i),r+=4,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),r!==o+4+i)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+4+i));return n?(this.offset=r,this):r-o},s.readIString=function(t){var e="undefined"==typeof 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,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=t,n=this.readUint32(t),i=this.readUTF8String(n,o.METRICS_BYTES,t+=4);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-r}},o.METRICS_CHARS="c",o.METRICS_BYTES="b",s.writeUTF8String=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=r;i=c.calculateUTF16asUTF8(e(t))[1],r+=i;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=i,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),n?(this.offset=r,this):r-o},s.writeString=s.writeUTF8String,o.calculateUTF8Chars=function(t){return c.calculateUTF16asUTF8(e(t))[0]},o.calculateUTF8Bytes=function(t){return c.calculateUTF16asUTF8(e(t))[1]},o.calculateString=o.calculateUTF8Bytes,s.readUTF8String=function(t,e,n){"number"==typeof e&&(n=e,e=void 0);var i="undefined"==typeof n;if(i&&(n=this.offset),"undefined"==typeof e&&(e=o.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,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var s,u=0,a=n;if(e===o.METRICS_CHARS){if(s=r(),c.decodeUTF8(function(){return u<t&&n<this.limit?this.view[n++]:null}.bind(this),function(t){++u,c.UTF8toUTF16(t,s)}),u!==t)throw RangeError("Illegal range: Truncated data, "+u+" == "+t);return i?(this.offset=n,s()):{string:s(),length:n-a}}if(e===o.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<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<f?this.view[n++]:null}.bind(this),s=r(),this.noAssert),n!==f)throw RangeError("Illegal range: Truncated data, "+n+" == "+f);return i?(this.offset=n,s()):{string:s(),length:n-a}}throw TypeError("Unsupported metrics: "+e)},s.readString=s.readUTF8String,s.writeVString=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,s,u=r;i=c.calculateUTF16asUTF8(e(t),this.noAssert)[1],s=o.calculateVarint32(i),r+=s+i;var a=this.buffer.byteLength;if(r>a&&this.resize((a*=2)>r?a:r),r-=s+i,r+=this.writeVarint32(i,r),c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),r!==u+i+s)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+i+s));return n?(this.offset=r,this):r-u},s.readVString=function(t){var e="undefined"==typeof 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,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=t,n=this.readVarint32(t),i=this.readUTF8String(n.value,o.METRICS_BYTES,t+=n.length);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-r}},s.append=function(t,e,r){"number"!=typeof e&&"string"==typeof e||(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;r+=i;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=i,this.view.set(t.view.subarray(t.offset,t.limit),r),t.offset+=i,n&&(this.offset+=i),this},s.appendTo=function(t,e){return t.append(this,e),this},s.assert=function(t){return this.noAssert=!t,this},s.capacity=function(){return this.buffer.byteLength},s.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},s.clone=function(t){var e=new o(0,this.littleEndian,this.noAssert);return t?(e.buffer=new ArrayBuffer(this.buffer.byteLength),e.view=new Uint8Array(e.buffer)):(e.buffer=this.buffer,e.view=this.view),e.offset=this.offset,e.markedOffset=this.markedOffset,e.limit=this.limit,e},s.compact=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof 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=u,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(r),i=new Uint8Array(n);return i.set(this.view.subarray(t,e)),this.buffer=n,this.view=i,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},s.copy=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof 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(t===e)return new o(0,this.littleEndian,this.noAssert);var r=e-t,n=new o(r,this.littleEndian,this.noAssert);return n.offset=0,n.limit=r,n.markedOffset>=0&&(n.markedOffset-=t),this.copyTo(n,0,t,e),n},s.copyTo=function(t,e,r,n){var i,s;if(!this.noAssert&&!o.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(e=(s="undefined"==typeof e)?t.offset:0|e,r=(i="undefined"==typeof r)?this.offset:0|r,n="undefined"==typeof n?this.limit:0|n,e<0||e>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+e+" <= "+t.buffer.byteLength);if(r<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+r+" <= "+this.buffer.byteLength);var u=n-r;return 0===u?t:(t.ensureCapacity(e+u),t.view.set(this.view.subarray(r,n),e),i&&(this.offset+=u),s&&(t.offset+=u),this)},s.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},s.fill=function(t,e,r){var n="undefined"==typeof e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),"undefined"==typeof e&&(e=this.offset),"undefined"==typeof 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<r;)this.view[e++]=t;return n&&(this.offset=e),this},s.flip=function(){return this.limit=this.offset,this.offset=0,this},s.mark=function(t){if(t="undefined"==typeof t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},s.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},s.LE=function(t){return this.littleEndian="undefined"==typeof t||!!t,this},s.BE=function(t){return this.littleEndian="undefined"!=typeof t&&!t,this},s.prepend=function(t,e,r){"number"!=typeof e&&"string"==typeof e||(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;var s=i-r;if(s>0){var u=new ArrayBuffer(this.buffer.byteLength+s),a=new Uint8Array(u);a.set(this.view.subarray(r,this.buffer.byteLength),i),this.buffer=u,this.view=a,this.offset+=s,this.markedOffset>=0&&(this.markedOffset+=s),this.limit+=s,r+=s}else{new Uint8Array(this.buffer)}return this.view.set(t.view.subarray(t.offset,t.limit),r-i),t.offset=t.limit,n&&(this.offset-=i),this},s.prependTo=function(t,e){return t.prepend(this,e),this},s.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},s.remaining=function(){return this.limit-this.offset},s.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},s.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if(t|=0,t<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength<t){var e=new ArrayBuffer(t),r=new Uint8Array(e);r.set(this.view),this.buffer=e,this.view=r}return this},s.reverse=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof 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)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},s.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},s.slice=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof 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},s.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 u;var n=new ArrayBuffer(r-e);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(e,r),0),n},s.toArrayBuffer=s.toBuffer,s.toString=function(t,e,r){if("undefined"==typeof t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(t="utf8",e=t,r=e),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<i;++n)r[e[n]]=n;return t.encode=function(t,r){for(var n,i;null!==(n=t());)r(e[n>>2&63]),i=(3&n)<<4,null!==(n=t())?(i|=n>>4&15,r(e[63&(i|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){function n(t){throw Error("Illegal character code: "+t)}for(var i,o,s;null!==(i=t());)if(o=r[i],"undefined"==typeof o&&n(i),null!==(i=t())&&(s=r[i],"undefined"==typeof s&&n(i),e(o<<2>>>0|(48&s)>>4),null!==(i=t()))){if(o=r[i],"undefined"==typeof o){if(61===i)break;n(i)}if(e((15&s)<<4>>>0|(60&o)>>2),null!==(i=t())){if(s=r[i],"undefined"==typeof s){if(61===i)break;n(i)}e((3&o)<<6>>>0|s)}}},t.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)},t}();s.toBase64=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),t=0|t,e=0|e,t<0||e>this.capacity||t>e)throw RangeError("begin, end");var n;return f.encode(function(){return t<e?this.view[t++]:null}.bind(this),n=r()),n()},o.fromBase64=function(t,r){if("string"!=typeof t)throw TypeError("str");var n=new o(t.length/4*3,r),i=0;return f.decode(e(t),function(t){n.view[i++]=t}),n.limit=i,n},o.btoa=function(t){return o.fromBinary(t).toBase64()},o.atob=function(t){return o.fromBase64(t).toBinary()},s.toBinary=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var r=[],n=[];t<e;)r.push(this.view[t++]),r.length>=1024&&(n.push(String.fromCharCode.apply(String,r)),r=[]);return n.join("")+String.fromCharCode.apply(String,r)},o.fromBinary=function(t,e){if("string"!=typeof t)throw TypeError("str");for(var r,n=0,i=t.length,s=new o(i,e);n<i;){if(r=t.charCodeAt(n),r>255)throw RangeError("illegal char code: "+r);s.view[n++]=r}return s.limit=i,s},s.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",s="";r<n;){if(r!==-1&&(e=this.view[r],i+=e<16?"0"+e.toString(16).toUpperCase():e.toString(16).toUpperCase(),t&&(o+=e>32&&e<127?String.fromCharCode(e):".")),++r,t&&r>0&&r%16===0&&r!==n){for(;i.length<51;)i+=" ";s+=i+o+"\n",i=o=""}i+=r===this.offset&&r===this.limit?r===this.markedOffset?"!":"|":r===this.offset?r===this.markedOffset?"[":"<":r===this.limit?r===this.markedOffset?"]":">":r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";s+=i+o+"\n"}return t?s:i},o.fromDebug=function(t,e,r){for(var n,i,s=t.length,u=new o((s+1)/3|0,e,r),a=0,f=0,c=!1,h=!1,l=!1,p=!1,d=!1;a<s;){switch(n=t.charAt(a++)){case"!":if(!r){if(h||l||p){d=!0;break}h=l=p=!0}u.offset=u.markedOffset=u.limit=f,c=!1;break;case"|":if(!r){if(h||p){d=!0;break}h=p=!0}u.offset=u.limit=f,c=!1;break;case"[":if(!r){if(h||l){d=!0;break}h=l=!0}u.offset=u.markedOffset=f,c=!1;break;case"<":if(!r){if(h){d=!0;break}h=!0}u.offset=f,c=!1;break;case"]":if(!r){if(p||l){d=!0;break}p=l=!0}u.limit=u.markedOffset=f,c=!1;break;case">":if(!r){if(p){d=!0;break}p=!0}u.limit=f,c=!1;break;case"'":if(!r){if(l){d=!0;break}l=!0}u.markedOffset=f,c=!1;break;case" ":c=!1;break;default:if(!r&&c){d=!0;break}if(i=parseInt(n+t.charAt(a++),16),!r&&(isNaN(i)||i<0||i>255))throw TypeError("Illegal str: Not a debug encoded string");u.view[f++]=i,c=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+a)}if(!r){if(!h||!p)throw TypeError("Illegal str: Missing offset or limit");if(f<u.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+f+" < "+s)}return u},s.toHex=function(t,e){if(t="undefined"==typeof t?this.offset:t,e="undefined"==typeof e?this.limit:e,!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)}for(var r,n=new Array(e-t);t<e;)r=this.view[t++],r<16?n.push("0",r.toString(16)):n.push(r.toString(16));return n.join("")},o.fromHex=function(t,e,r){if(!r){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if(t.length%2!==0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,i=t.length,s=new o(i/2|0,e),u=0,a=0;u<i;u+=2){if(n=parseInt(t.substring(u,u+2),16),!r&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");s.view[a++]=n}return s.limit=a,s};var c=function(){var t={};return t.MAX_CODEPOINT=1114111,t.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},t.decodeUTF8=function(t,e){for(var r,n,i,o,s=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())&&s([r,n]),e((31&r)<<6|63&n);else if(224===(240&r))(null===(n=t())||null===(i=t()))&&s([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===(o=t()))&&s([r,n,i,o]),e((7&r)<<18|(63&n)<<12|(63&i)<<6|63&o)}},t.UTF16toUTF8=function(t,e){for(var r,n=null;;){if(null===(r=null!==n?n:t()))break;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)},t.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):(r-=65536,e((r>>10)+55296),e(r%1024+56320)),r=null},t.encodeUTF16toUTF8=function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},t.decodeUTF8toUTF16=function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},t.calculateCodePoint=function(t){return t<128?1:t<2048?2:t<65536?3:4},t.calculateUTF8=function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},t.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]},t}();return s.toUTF8=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof 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 n;try{c.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),n=r())}catch(i){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return n()},o.fromUTF8=function(t,r,n){if(!n&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new o(c.calculateUTF16asUTF8(e(t),!0)[1],r,n),s=0;return c.encodeUTF16toUTF8(e(t),function(t){i.view[s++]=t}),i.limit=s,i},o})}).call(e,r(111)(t))},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(6)("unscopables"),i=Array.prototype;void 0==i[n]&&r(19)(i,n,{}),t.exports=function(t){i[n][t]=!0}},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},function(t,e,r){var n=r(17),i=r(79),o=r(76),s=r(5),u=r(11),a=r(90);t.exports=function(t,e,r,f){var c,h,l,p=a(t),d=n(r,f,e?2:1),v=0;if("function"!=typeof p)throw TypeError(t+" is not iterable!");if(o(p))for(c=u(t.length);c>v;v++)e?d(s(h=t[v])[0],h[1]):d(t[v]);else for(l=p.call(t);!(h=l.next()).done;)i(l,d,h.value,e)}},function(t,e){t.exports={}},function(t,e,r){var n=r(2).setDesc,i=r(10),o=r(6)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},function(t,e,r){var n=r(35),i=Math.max,o=Math.min;t.exports=function(t,e){return t=n(t),t<0?i(t+e,0):o(t,e)}},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){"use strict";var r={};r.reserved_spaces={relative_protocol_ids:0,protocol_ids:1,implementation_ids:2},r.object_type={null:0,base:1,account:2,asset:3,force_settlement:4,committee_member:5,witness:6,limit_order:7,call_order:8,custom:9,proposal:10,operation_history:11,withdraw_permission:12,vesting_balance:13,worker:14,balance:15},r.impl_object_type={global_property:0,dynamic_global_property:1,index_meta:2,asset_dynamic_data:3,asset_bitasset_data:4,account_balance:5,account_statistics:6,transaction:7,block_summary:8,account_transaction_history:9,blinded_balance:10,chain_property:11,witness_schedule:12,budget_record:13},r.vote_type={committee:0,witness:1,worker:2},r.operations={transfer:0,limit_order_create:1,limit_order_cancel:2,call_order_update:3,fill_order:4,account_create:5,account_update:6,account_whitelist:7,account_upgrade:8,account_transfer:9,asset_create:10,asset_update:11,asset_update_bitasset:12,asset_update_feed_producers:13,asset_issue:14,asset_reserve:15,asset_fund_fee_pool:16,asset_settle:17,asset_global_settle:18,asset_publish_feed:19,witness_create:20,witness_update:21,proposal_create:22,proposal_update:23,proposal_delete:24,withdraw_permission_create:25,withdraw_permission_update:26,withdraw_permission_claim:27,withdraw_permission_delete:28,committee_member_create:29,committee_member_update:30,committee_member_update_global_parameters:31,vesting_balance_create:32,vesting_balance_withdraw:33,worker_create:34,custom:35,assert:36,balance_claim:37,override_transfer:38,transfer_to_blind:39,blind_transfer:40,transfer_from_blind:41,asset_settle_cancel:42,asset_claim_fees:43},t.exports=r},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(16),s=r(48),u=s.Point,a=s.getCurveByName,f=a("secp256k1"),c=r(51),h=c.encode,l=c.decode,p=r(24),d=r(26),v=d.ChainConfig,_=r(9),y=r(62),g=f.G,b=f.n,m=function(){function t(e){n(this,t),this.Q=e}return i(t,[{key:"toBuffer",value:function(){var t=arguments.length<=0||void 0===arguments[0]?this.Q?this.Q.compressed:null:arguments[0];return null===this.Q?new e("000000000000000000000000000000000000000000000000000000000000000000","hex"):this.Q.getEncoded(t)}},{key:"toUncompressed",value:function(){var e=this.Q.getEncoded(!1),r=u.decodeFrom(f,e);return t.fromPoint(r)}},{key:"toBlockchainAddress",value:function(){var t=this.toBuffer(),e=p.sha512(t);return p.ripemd160(e)}},{key:"toString",value:function(){var t=arguments.length<=0||void 0===arguments[0]?v.address_prefix:arguments[0];return this.toPublicKeyString(t)}},{key:"toPublicKeyString",value:function(){var t=arguments.length<=0||void 0===arguments[0]?v.address_prefix:arguments[0],r=this.toBuffer(),n=p.ripemd160(r),i=e.concat([r,n.slice(0,4)]);return t+h(i)}},{key:"toAddressString",value:function(){var t=arguments.length<=0||void 0===arguments[0]?v.address_prefix:arguments[0],r=this.toBuffer(),n=p.sha512(r),i=p.ripemd160(n),o=p.ripemd160(i);return i=e.concat([i,o.slice(0,4)]),t+h(i)}},{key:"toPtsAddy",value:function(){var t=this.toBuffer(),r=p.sha256(t),n=p.ripemd160(r);n=e.concat([new e([56]),n]);var i=p.sha256(n);return i=p.sha256(i),n=e.concat([n,i.slice(0,4)]),h(n)}},{key:"child",value:function(r){_(e.isBuffer(r),"Buffer required: offset"),_.equal(r.length,32,"offset length"),r=e.concat([this.toBuffer(),r]),r=p.sha256(r);var n=o.fromBuffer(r);if(n.compareTo(b)>=0)throw new Error("Child offset went out of bounds, try again");var i=g.multiply(n),s=this.Q.add(i);if(f.isInfinity(s))throw new Error("Child offset derived to an invalid key, try again");return t.fromPoint(s)}},{key:"toByteBuffer",value:function(){var t=new ByteBuffer(ByteBuffer.DEFAULT_CAPACITY,ByteBuffer.LITTLE_ENDIAN);return this.appendByteBuffer(t),t.copy(0,t.offset)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}}],[{key:"fromBinary",value:function(r){return t.fromBuffer(new e(r,"binary"))}},{key:"fromBuffer",value:function(e){return new t("000000000000000000000000000000000000000000000000000000000000000000"===e.toString("hex")?null:u.decodeFrom(f,e))}},{key:"fromPoint",value:function(e){return new t(e)}},{key:"fromPublicKeyString",value:function(e){var r=arguments.length<=1||void 0===arguments[1]?v.address_prefix:arguments[1];try{return t.fromStringOrThrow(e,r)}catch(n){return null}}},{key:"fromStringOrThrow",value:function(r){var n=arguments.length<=1||void 0===arguments[1]?v.address_prefix:arguments[1],i=r.slice(0,n.length);_.equal(n,i,"Expecting key to begin with "+n+", instead got "+i),r=r.slice(n.length),r=new e(l(r),"binary");var o=r.slice(-4);r=r.slice(0,-4);var s=p.ripemd160(r);s=s.slice(0,4);var u=y(o,s);if(!u)throw new Error("Checksum did not match");return t.fromBuffer(r)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}},{key:"fromPublicKeyStringHex",value:function(r){return t.fromPublicKeyString(new e(r,"hex"))}}]),t}();t.exports=m}).call(e,r(3).Buffer)},function(t,e,r){var n=r(17),i=r(43),o=r(22),s=r(11),u=r(122);t.exports=function(t){var e=1==t,r=2==t,a=3==t,f=4==t,c=6==t,h=5==t||c;return function(l,p,d){for(var v,_,y=o(l),g=i(y),b=n(p,d,3),m=s(g.length),w=0,E=e?u(l,m):r?u(l,0):void 0;m>w;w++)if((h||w in g)&&(v=g[w],_=b(v,w,y),t))if(e)E[w]=_;else if(_)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:E.push(v)}else if(f)return!1;return c?-1:a||f?f:E}}},function(t,e,r){var n=r(20),i=r(6)("toStringTag"),o="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,r,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=(e=Object(t))[i])?r:o?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,r){"use strict";var n=r(7),i=r(1),o=r(14),s=r(44),u=r(31),a=r(46),f=r(4),c=r(8),h=r(55),l=r(33);t.exports=function(t,e,r,p,d,v){var _=n[t],y=_,g=d?"set":"add",b=y&&y.prototype,m={},w=function(t){var e=b[t];o(b,t,"delete"==t?function(t){return!(v&&!f(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(v&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,r){return e.call(this,0===t?0:t,r),this})};if("function"==typeof y&&(v||b.forEach&&!c(function(){(new y).entries().next()}))){var E,S=new y,x=S[g](v?{}:-0,1)!=S,k=c(function(){S.has(1)}),I=h(function(t){new y(t)});I||(y=e(function(e,r){a(e,y,t);var n=new _;return void 0!=r&&u(r,d,n[g],n),n}),y.prototype=b,b.constructor=y),v||S.forEach(function(t,e){E=1/e===-(1/0)}),(k||E)&&(w("delete"),w("has"),d&&w("get")),(E||x)&&w(g),v&&b.clear&&delete b.clear}else y=p.getConstructor(e,t,d,g),s(y.prototype,r);return l(y,t),m[t]=y,i(i.G+i.W+i.F*(y!=_),m),v||p.setStrong(y,t,d),y}},function(t,e,r){"use strict";var n=r(19),i=r(14),o=r(8),s=r(18),u=r(6);t.exports=function(t,e,r){var a=u(t),f=""[t];o(function(){var e={};return e[a]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,r(s,a,f)),n(RegExp.prototype,a,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},function(t,e,r){var n=r(20);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e,r){var n=r(14);t.exports=function(t,e){for(var r in e)n(t,r,e[r]);return t}},function(t,e,r){"use strict";var n=r(7),i=r(2),o=r(12),s=r(6)("species");t.exports=function(t){var e=n[t];o&&e&&!e[s]&&i.setDesc(e,s,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,r){if(!(t instanceof e))throw TypeError(r+": use the 'new' operator!");return t}},function(t,e,r){var n=r(1),i=r(18),o=r(8),s="\t\n\v\f\r \u2028\u2029\ufeff",u="["+s+"]",a="
",f=RegExp("^"+u+u+"*"),c=RegExp(u+u+"*$"),h=function(t,e){var r={};r[t]=e(l),n(n.P+n.F*o(function(){return!!s[t]()||a[t]()!=a}),"String",r)},l=h.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(f,"")),2&e&&(t=t.replace(c,"")),t};t.exports=h},function(t,e,r){var n=r(95),i=r(94),o=r(251);t.exports={Curve:i,Point:n,getCurveByName:o}},function(t,e,r){"use strict";t.exports={Address:r(101),Aes:r(102),PrivateKey:r(63),PublicKey:r(37),Signature:r(275),brainKey:r(272),hash:r(24),key:r(100)}},function(t,e,r){(function(t,n){function i(t,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),a(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function s(t,e){return t}function u(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function a(t,r,n){if(t.customInspect&&r&&I(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=a(t,i,n)),i}var o=f(t,r);if(o)return o;var s=Object.keys(r),v=u(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(r);if(0===s.length){if(I(r)){var _=r.name?": "+r.name:"";return t.stylize("[Function"+_+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return c(r)}var y="",g=!1,m=["{","}"];if(d(r)&&(g=!0,m=["[","]"]),I(r)){var w=r.name?": "+r.name:"";y=" [Function"+w+"]"}if(E(r)&&(y=" "+RegExp.prototype.toString.call(r)),x(r)&&(y=" "+Date.prototype.toUTCString.call(r)),k(r)&&(y=" "+c(r)),0===s.length&&(!g||0==r.length))return m[0]+y+m[1];if(n<0)return E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var S;return S=g?h(t,r,n,v,s):s.map(function(e){return l(t,r,n,v,e,g)}),t.seen.pop(),p(S,y,m)}function f(t,e){if(w(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return g(e)?t.stylize(""+e,"number"):v(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,u=e.length;s<u;++s)j(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))}),o}function l(t,e,r,n,i,o){var s,u,f;if(f=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},f.get?u=f.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):f.set&&(u=t.stylize("[Setter]","special")),j(n,i)||(s="["+i+"]"),u||(t.seen.indexOf(f.value)<0?(u=_(r)?a(t,f.value,null):a(t,f.value,r-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+u.split("\n").map(function(t){return" "+t}).join("\n"))):u=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+u}function p(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function v(t){return"boolean"==typeof t}function _(t){return null===t}function y(t){return null==t}function g(t){return"number"==typeof t}function b(t){return"string"==typeof t}function m(t){return"symbol"==typeof t}function w(t){return void 0===t}function E(t){return S(t)&&"[object RegExp]"===T(t)}function S(t){return"object"==typeof t&&null!==t}function x(t){return S(t)&&"[object Date]"===T(t)}function k(t){return S(t)&&("[object Error]"===T(t)||t instanceof Error)}function I(t){return"function"==typeof t}function B(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function T(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}function O(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),z[t.getMonth()],e].join(" ")}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var D=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(t).replace(D,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}}),u=n[r];r<o;u=n[++r])s+=_(u)||!S(u)?" "+u:" "+i(u);return s},e.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var M,R={};e.debuglog=function(t){if(w(M)&&(M={NODE_ENV:"production"}.NODE_DEBUG||""),t=t.toUpperCase(),!R[t])if(new RegExp("\\b"+t+"\\b","i").test(M)){var r=n.pid;R[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else R[t]=function(){};return R[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=v,e.isNull=_,e.isNullOrUndefined=y,e.isNumber=g,e.isString=b,e.isSymbol=m,e.isUndefined=w,e.isRegExp=E,e.isObject=S,e.isDate=x,e.isError=k,e.isFunction=I,e.isPrimitive=B,e.isBuffer=r(296);var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",O(),e.format.apply(e,arguments))},e.inherits=r(285),e._extend=function(t,e){if(!e||!S(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(66))},function(t,e,r){var n=r(116),i="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",o=n(i);t.exports={encode:o.encode,decode:o.decode}},function(t,e,r){var n=r(6)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,!"/./"[t](e)}catch(i){}}return!0}},function(t,e,r){var n=r(20);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){"use strict";var n=r(56),i=r(1),o=r(14),s=r(19),u=r(10),a=r(32),f=r(80),c=r(33),h=r(2).getProto,l=r(6)("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",_="values",y=function(){return this};t.exports=function(t,e,r,g,b,m,w){f(r,e,g);var E,S,x=function(t){if(!p&&t in T)return T[t];switch(t){case v:return function(){return new r(this,t)};case _:return function(){return new r(this,t)}}return function(){return new r(this,t)}},k=e+" Iterator",I=b==_,B=!1,T=t.prototype,A=T[l]||T[d]||b&&T[b],O=A||x(b);if(A){var j=h(O.call(new t));c(j,k,!0),!n&&u(T,d)&&s(j,l,y),I&&A.name!==_&&(B=!0,O=function(){return A.call(this)})}if(n&&!w||!p&&!B&&T[l]||s(T,l,O),a[e]=O,a[k]=y,b)if(E={values:I?O:x(_),keys:m?O:x(v),entries:I?x("entries"):O},w)for(S in E)S in T||o(T,S,E[S]);else i(i.P+i.F*(p||B),e,E);return E}},function(t,e,r){var n=r(6)("iterator"),i=!1;try{var o=[7][n]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(s){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var o=[7],s=o[n]();s.next=function(){return{done:r=!0}},o[n]=function(){return s},t(o)}catch(u){}return r}},function(t,e){t.exports=!1},function(t,e){t.exports=Math.expm1||function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,r){var n=r(2).getDesc,i=r(4),o=r(5),s=function(t,e){if(o(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{i=r(17)(Function.call,n(Object.prototype,"__proto__").set,2),i(t,[]),e=!(t instanceof Array)}catch(o){e=!0}return function(t,r){return s(t,r),e?t.__proto__=r:i(t,r),t}}({},!1):void 0),check:s}},function(t,e,r){var n=r(35),i=r(18);t.exports=function(t){return function(e,r){var o,s,u=String(i(e)),a=n(r),f=u.length;return a<0||a>=f?t?"":void 0:(o=u.charCodeAt(a),o<55296||o>56319||a+1===f||(s=u.charCodeAt(a+1))<56320||s>57343?t?u.charAt(a):o:t?u.slice(a,a+2):(o-55296<<10)+(s-56320)+65536)}}},function(t,e,r){var n=r(78),i=r(18);t.exports=function(t,e,r){if(n(e))throw TypeError("String#"+r+" doesn't accept regex!");return String(i(t))}},function(t,e,r){function n(t){return null===t||void 0===t}function i(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}function o(t,e,r){var o,c;if(n(t)||n(e))return!1;if(t.prototype!==e.prototype)return!1;if(a(t))return!!a(e)&&(t=s.call(t),e=s.call(e),f(t,e,r));if(i(t)){if(!i(e))return!1;if(t.length!==e.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}try{var h=u(t),l=u(e)}catch(p){return!1}if(h.length!=l.length)return!1;for(h.sort(),l.sort(),o=h.length-1;o>=0;o--)if(h[o]!=l[o])return!1;for(o=h.length-1;o>=0;o--)if(c=h[o],!f(t[c],e[c],r))return!1;return typeof t==typeof e}var s=Array.prototype.slice,u=r(250),a=r(249),f=t.exports=function(t,e,r){return r||(r={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?r.strict?t===e:t==e:o(t,e,r))}},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");
}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=(r(48),r(48)),s=o.Point,u=o.getCurveByName,a=u("secp256k1"),f=r(16),c=r(51),h=c.encode,l=c.decode,p=r(9),d=r(24),v=r(37),_=r(62),y=(a.G,a.n),g=function(){function t(e){n(this,t),this.d=e}return i(t,[{key:"toWif",value:function(){var t=this.toBuffer();t=e.concat([new e([128]),t]);var r=d.sha256(t);r=d.sha256(r),r=r.slice(0,4);var n=e.concat([t,r]);return h(n)}},{key:"toPublicKeyPoint",value:function(){var t;return t=a.G.multiply(this.d)}},{key:"toPublicKey",value:function(){return this.public_key?this.public_key:this.public_key=v.fromPoint(this.toPublicKeyPoint())}},{key:"toBuffer",value:function(){return this.d.toBuffer(32)}},{key:"get_shared_secret",value:function(t){var r=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];t=b(t);var n=t.toUncompressed().toBuffer(),i=s.fromAffine(a,f.fromBuffer(n.slice(1,33)),f.fromBuffer(n.slice(33,65))),o=this.toBuffer(),u=i.multiply(f.fromBuffer(o)),c=u.affineX.toBuffer({size:32});return!r&&c.length<32&&(pad=new e(32-c.length).fill(0),c=e.concat([pad,c])),d.sha512(c)}},{key:"child",value:function(r){r=e.concat([this.toPublicKey().toBuffer(),r]),r=d.sha256(r);var n=f.fromBuffer(r);if(n.compareTo(y)>=0)throw new Error("Child offset went out of bounds, try again");var i=this.d.add(n);if(0===i.signum())throw new Error("Child offset derived to an invalid key, try again");return new t(i)}},{key:"toByteBuffer",value:function(){var t=new ByteBuffer(ByteBuffer.DEFAULT_CAPACITY,ByteBuffer.LITTLE_ENDIAN);return this.appendByteBuffer(t),t.copy(0,t.offset)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}}],[{key:"fromBuffer",value:function(r){if(!e.isBuffer(r))throw new Error("Expecting paramter to be a Buffer type");if(32!==r.length&&console.log("WARN: Expecting 32 bytes, instead got "+r.length+", stack trace:",(new Error).stack),0===r.length)throw new Error("Empty buffer");return new t(f.fromBuffer(r))}},{key:"fromSeed",value:function(e){if("string"!=typeof e)throw new Error("seed must be of type string");return t.fromBuffer(d.sha256(e))}},{key:"fromWif",value:function(r){var n=new e(l(r)),i=n.readUInt8(0);p.equal(128,i,"Expected version 128, instead got "+i);var o=n.slice(0,-4),s=n.slice(-4),u=d.sha256(o);u=d.sha256(u),u=u.slice(0,4);var a=_(s,u);if(!a)throw new Error("Checksum did not match");return o=o.slice(1),t.fromBuffer(o)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}}]),t}();t.exports=g;var b=function(t){return null==t?t:t.Q?t:v.fromStringOrThrow(t)}}).call(e,r(3).Buffer)},function(t,e,r){"use strict";t.exports={Serializer:r(105),fp:r(104),types:r(106),ops:r(278),template:r(279),SerializerValidation:r(65)}},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=r(27),o=i.Long,s=r(36),u=9007199254740991,a=-9007199254740991,f={is_empty:function(t){return null===t||void 0===t},required:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))throw new Error("value required "+e+" "+t);return t},require_long:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(!o.isLong(t))throw new Error("Long value required "+e+" "+t);return t},string:function(t){if(this.is_empty(t))return t;if("string"!=typeof t)throw new Error("string required: "+t);return t},number:function(t){if(this.is_empty(t))return t;if("number"!=typeof t)throw new Error("number required: "+t);return t},whole_number:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))return t;if(/\./.test(t))throw new Error("whole number required "+e+" "+t);return t},unsigned:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))return t;if(/-/.test(t))throw new Error("unsigned required "+e+" "+t);return t},is_digits:function(t){return"numeric"==typeof t||/^[0-9]+$/.test(t)},to_number:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))return t;this.no_overflow53(t,e);var r=function(){return"number"==typeof t?t:parseInt(t)}();return r},to_long:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];return this.is_empty(t)?t:o.isLong(t)?t:(this.no_overflow64(t,e),"number"==typeof t&&(t=""+t),o.fromString(t))},to_string:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))return t;if("string"==typeof t)return t;if("number"==typeof t)return this.no_overflow53(t,e),""+t;if(o.isLong(t))return t.toString();throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":n(t))+") "+t},require_test:function(t,e){var r=arguments.length<=2||void 0===arguments[2]?"":arguments[2];if(this.is_empty(e))return e;if(!t.test(e))throw new Error("unmatched "+t+" "+r+" "+e);return e},require_match:function(t,e){var r=arguments.length<=2||void 0===arguments[2]?"":arguments[2];if(this.is_empty(e))return e;var n=e.match(t);if(null===n)throw new Error("unmatched "+t+" "+r+" "+e);return n},require_object_id:function(t,e){return require_match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/,t,e)},require_range:function(t,e,r){var n=arguments.length<=3||void 0===arguments[3]?"":arguments[3];if(this.is_empty(r))return r;this.to_number(r);if(r<t||r>e)throw new Error("out of range "+r+" "+n+" "+r);return r},require_object_type:function(){var t=arguments.length<=0||void 0===arguments[0]?1:arguments[0],e=arguments[1],r=arguments[2],n=arguments.length<=3||void 0===arguments[3]?"":arguments[3];if(this.is_empty(r))return r;var i=s.object_type[e];if(!i)throw new Error("Unknown object type "+e+" "+n+" "+r);var o=new RegExp(t+"."+i+".[0-9]+$");if(!o.test(r))throw new Error("Expecting "+e+" in format "+(t+"."+i+".[0-9]+ ")+("instead of "+r+" "+n+" "+r));return r},get_instance:function(t,e,r,n){return this.is_empty(r)?r:(this.require_object_type(t,e,r,n),this.to_number(r.split(".")[2]))},require_relative_type:function(t,e,r){return this.require_object_type(0,t,e,r),e},get_relative_instance:function(t,e,r){return this.is_empty(e)?e:(this.require_object_type(0,t,e,r),this.to_number(e.split(".")[2]))},require_protocol_type:function(t,e,r){return this.require_object_type(1,t,e,r),e},get_protocol_instance:function(t,e,r){return this.is_empty(e)?e:(this.require_object_type(1,t,e,r),this.to_number(e.split(".")[2]))},get_protocol_type:function(t,e){if(this.is_empty(t))return t;this.require_object_id(t,e);var r=t.split(".");return this.to_number(r[1])},get_protocol_type_name:function(t,e){if(this.is_empty(t))return t;var r=this.get_protocol_type(t,e);return Object.keys(s.object_type)[r]},require_implementation_type:function(t,e,r){return this.require_object_type(2,t,e,r),e},get_implementation_instance:function(t,e,r){return this.is_empty(e)?e:(this.require_object_type(2,t,e,r),this.to_number(e.split(".")[2]))},no_overflow53:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if("number"!=typeof t){if("string"!=typeof t){if(o.isLong(t))return void this.no_overflow53(t.toInt(),e);throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":n(t))+") "+t}parseInt(t);if(t>u||t<a)throw new Error("overflow "+e+" "+t)}else if(t>u||t<a)throw new Error("overflow "+e+" "+t)},no_overflow64:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(!o.isLong(t)){if(void 0!==t.t&&void 0!==t.s)return void this.no_overflow64(t.toString(),e);if("string"!=typeof t){if("number"!=typeof t)throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":n(t))+") "+t;if(t>u||t<a)throw new Error("overflow "+e+" "+t)}else{for(t=t.replace(/^0+/,"");/0$/.test(t);)t=t.substring(0,t.length-1);/\.$/.test(t)&&(t=t.substring(0,t.length-1)),""===t&&(t="0");var r=o.fromString(t).toString();if(r!==t.trim())throw new Error("overflow "+e+" "+t)}}}};t.exports=f},function(t,e){function r(t){if(a===setTimeout)return setTimeout(t,0);try{return a(t,0)}catch(e){try{return a.call(null,t,0)}catch(e){return a.call(this,t,0)}}}function n(t){if(f===clearTimeout)return clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function i(){p&&h&&(p=!1,h.length?l=h.concat(l):d=-1,l.length&&o())}function o(){if(!p){var t=r(i);p=!0;for(var e=l.length;e;){for(h=l,l=[];++d<e;)h&&h[d].run();d=-1,e=l.length}h=null,p=!1,n(t)}}function s(t,e){this.fun=t,this.array=e}function u(){}var a,f,c=t.exports={};!function(){try{a=setTimeout}catch(t){a=function(){throw new Error("setTimeout is not defined")}}try{f=clearTimeout}catch(t){f=function(){throw new Error("clearTimeout is not defined")}}}();var h,l=[],p=!1,d=-1;c.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new s(t,e)),1!==l.length||p||r(o)},s.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=u,c.addListener=u,c.once=u,c.off=u,c.removeListener=u,c.removeAllListeners=u,c.emit=u,c.binding=function(t){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(t){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(t,e,r){function n(t,e,r){return this instanceof n?void(null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))):new n(t,e,r)}function i(t,e,r,n,i,o){for(;--o>=0;){var s=e*this[t++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i}function o(t){return oe.charAt(t)}function s(t,e){var r=se[t.charCodeAt(e)];return null==r?-1:r}function u(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function a(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+ee:this.t=0}function f(t){var e=new n;return e.fromInt(t),e}function c(t,e){var r,i=this;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void i.fromRadix(t,e);r=2}i.t=0,i.s=0;for(var o=t.length,u=!1,a=0;--o>=0;){var f=8==r?255&t[o]:s(t,o);f<0?"-"==t.charAt(o)&&(u=!0):(u=!1,0==a?i[i.t++]=f:a+r>i.DB?(i[i.t-1]|=(f&(1<<i.DB-a)-1)<<a,i[i.t++]=f>>i.DB-a):i[i.t-1]|=f<<a,a+=r,a>=i.DB&&(a-=i.DB))}8==r&&0!=(128&t[0])&&(i.s=-1,a>0&&(i[i.t-1]|=(1<<i.DB-a)-1<<a)),i.clamp(),u&&n.ZERO.subTo(i,i)}function h(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function l(t){var e=this;if(e.s<0)return"-"+e.negate().toString(t);var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return e.toRadix(t);r=2}var n,i=(1<<r)-1,s=!1,u="",a=e.t,f=e.DB-a*e.DB%r;if(a-- >0)for(f<e.DB&&(n=e[a]>>f)>0&&(s=!0,u=o(n));a>=0;)f<r?(n=(e[a]&(1<<f)-1)<<r-f,n|=e[--a]>>(f+=e.DB-r)):(n=e[a]>>(f-=r)&i,f<=0&&(f+=e.DB,--a)),n>0&&(s=!0),s&&(u+=o(n));return s?u:"0"}function p(){var t=new n;return n.ZERO.subTo(this,t),t}function d(){return this.s<0?this.negate():this}function v(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(e=r-t.t,0!=e)return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0}function _(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function y(){return this.t<=0?0:this.DB*(this.t-1)+_(this[this.t-1]^this.s&this.DM)}function g(){return this.bitLength()>>3}function b(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function m(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s}function w(t,e){var r,n=this,i=t%n.DB,o=n.DB-i,s=(1<<o)-1,u=Math.floor(t/n.DB),a=n.s<<i&n.DM;for(r=n.t-1;r>=0;--r)e[r+u+1]=n[r]>>o|a,a=(n[r]&s)<<i;for(r=u-1;r>=0;--r)e[r]=0;e[u]=a,e.t=n.t+u+1,e.s=n.s,e.clamp()}function E(t,e){var r=this;e.s=r.s;var n=Math.floor(t/r.DB);if(n>=r.t)return void(e.t=0);var i=t%r.DB,o=r.DB-i,s=(1<<i)-1;e[0]=r[n]>>i;for(var u=n+1;u<r.t;++u)e[u-n-1]|=(r[u]&s)<<o,e[u-n]=r[u]>>i;i>0&&(e[r.t-n-1]|=(r.s&s)<<o),e.t=r.t-n,e.clamp()}function S(t,e){for(var r=this,n=0,i=0,o=Math.min(t.t,r.t);n<o;)i+=r[n]-t[n],e[n++]=i&r.DM,i>>=r.DB;if(t.t<r.t){for(i-=t.s;n<r.t;)i+=r[n],e[n++]=i&r.DM,i>>=r.DB;i+=r.s}else{for(i+=r.s;n<t.t;)i-=t[n],e[n++]=i&r.DM,i>>=r.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=r.DV+i:i>0&&(e[n++]=i),e.t=n,e.clamp()}function x(t,e){var r=this.abs(),i=t.abs(),o=r.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o<i.t;++o)e[o+r.t]=r.am(0,i[o],e,o,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)}function k(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function I(t,e,r){var i=this,o=t.abs();if(!(o.t<=0)){var s=i.abs();if(s.t<o.t)return null!=e&&e.fromInt(0),void(null!=r&&i.copyTo(r));null==r&&(r=new n);var u=new n,a=i.s,f=t.s,c=i.DB-_(o[o.t-1]);c>0?(o.lShiftTo(c,u),s.lShiftTo(c,r)):(o.copyTo(u),s.copyTo(r));var h=u.t,l=u[h-1];if(0!=l){var p=l*(1<<i.F1)+(h>1?u[h-2]>>i.F2:0),d=i.FV/p,v=(1<<i.F1)/p,y=1<<i.F2,g=r.t,b=g-h,m=null==e?new n:e;for(u.dlShiftTo(b,m),r.compareTo(m)>=0&&(r[r.t++]=1,r.subTo(m,r)),n.ONE.dlShiftTo(h,m),m.subTo(u,u);u.t<h;)u[u.t++]=0;for(;--b>=0;){var w=r[--g]==l?i.DM:Math.floor(r[g]*d+(r[g-1]+y)*v);if((r[g]+=u.am(0,w,r,b,0,h))<w)for(u.dlShiftTo(b,m),r.subTo(m,r);r[g]<--w;)r.subTo(m,r)}null!=e&&(r.drShiftTo(h,e),a!=f&&n.ZERO.subTo(e,e)),r.t=h,r.clamp(),c>0&&r.rShiftTo(c,r),a<0&&n.ZERO.subTo(r,r)}}}function B(t){var e=new n;return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e}function T(t){this.m=t}function A(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function O(t){return t}function j(t){t.divRemTo(this.m,null,t)}function D(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function M(t,e){t.squareTo(e),this.reduce(e)}function R(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function z(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function L(t){var e=new n;return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e}function q(t){var e=new n;return t.copyTo(e),this.reduce(e),e}function U(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t[r]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function P(t,e){t.squareTo(e),this.reduce(e)}function N(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function C(){return 0==(this.t>0?1&this[0]:this.s)}function F(t,e){if(t>4294967295||t<1)return n.ONE;var r=new n,i=new n,o=e.convert(this),s=_(t)-1;for(o.copyTo(r);--s>=0;)if(e.sqrTo(r,i),(t&1<<s)>0)e.mulTo(i,o,r);else{var u=r;r=i,i=u}return e.revert(r)}function H(t,e){var r;return r=t<256||e.isEven()?new T(e):new z(e),this.exp(t,r)}function K(){var t=new n;return this.copyTo(t),t}function V(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function W(){return 0==this.t?this.s:this[0]<<24>>24}function Y(){return 0==this.t?this.s:this[0]<<16>>16}function G(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function Z(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function J(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=f(r),o=new n,s=new n,u="";for(this.divRemTo(i,o,s);o.signum()>0;)u=(r+s.intValue()).toString(t).substr(1)+u,o.divRemTo(i,o,s);return s.intValue().toString(t)+u}function X(t,e){var r=this;r.fromInt(0),null==e&&(e=10);for(var i=r.chunkSize(e),o=Math.pow(e,i),u=!1,a=0,f=0,c=0;c<t.length;++c){var h=s(t,c);h<0?"-"==t.charAt(c)&&0==r.signum()&&(u=!0):(f=e*f+h,++a>=i&&(r.dMultiply(o),r.dAddOffset(f,0),a=0,f=0))}a>0&&(r.dMultiply(Math.pow(e,a)),r.dAddOffset(f,0)),u&&n.ZERO.subTo(r,r)}function $(t,e,r){var i=this;if("number"==typeof e)if(t<2)i.fromInt(1);else for(i.fromNumber(t,r),i.testBit(t-1)||i.bitwiseTo(n.ONE.shiftLeft(t-1),st,i),i.isEven()&&i.dAddOffset(1,0);!i.isProbablePrime(e);)i.dAddOffset(2,0),i.bitLength()>t&&i.subTo(n.ONE.shiftLeft(t-1),i);else{var o=new Array,s=7&t;o.length=(t>>3)+1,e.nextBytes(o),s>0?o[0]&=(1<<s)-1:o[0]=0,i.fromString(o,256)}}function Q(){var t=this,e=t.t,r=new Array;r[0]=t.s;var n,i=t.DB-e*t.DB%8,o=0;if(e-- >0)for(i<t.DB&&(n=t[e]>>i)!=(t.s&t.DM)>>i&&(r[o++]=n|t.s<<t.DB-i);e>=0;)i<8?(n=(t[e]&(1<<i)-1)<<8-i,n|=t[--e]>>(i+=t.DB-8)):(n=t[e]>>(i-=8)&255,i<=0&&(i+=t.DB,--e)),0!=(128&n)&&(n|=-256),0===o&&(128&t.s)!=(128&n)&&++o,(o>0||n!=t.s)&&(r[o++]=n);return r}function tt(t){return 0==this.compareTo(t)}function et(t){return this.compareTo(t)<0?this:t}function rt(t){return this.compareTo(t)>0?this:t}function nt(t,e,r){var n,i,o=this,s=Math.min(t.t,o.t);for(n=0;n<s;++n)r[n]=e(o[n],t[n]);if(t.t<o.t){for(i=t.s&o.DM,n=s;n<o.t;++n)r[n]=e(o[n],i);r.t=o.t}else{for(i=o.s&o.DM,n=s;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(o.s,t.s),r.clamp()}function it(t,e){return t&e}function ot(t){var e=new n;return this.bitwiseTo(t,it,e),e}function st(t,e){return t|e}function ut(t){var e=new n;return this.bitwiseTo(t,st,e),e}function at(t,e){return t^e}function ft(t){var e=new n;return this.bitwiseTo(t,at,e),e}function ct(t,e){return t&~e}function ht(t){var e=new n;return this.bitwiseTo(t,ct,e),e}function lt(){for(var t=new n,e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t}function pt(t){var e=new n;return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e}function dt(t){var e=new n;return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e}function vt(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function _t(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+vt(this[t]);return this.s<0?this.t*this.DB:-1}function yt(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function gt(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=yt(this[r]^e);return t}function bt(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)}function mt(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r}function wt(t){return this.changeBit(t,st)}function Et(t){return this.changeBit(t,ct)}function St(t){return this.changeBit(t,at)}function xt(t,e){for(var r=this,n=0,i=0,o=Math.min(t.t,r.t);n<o;)i+=r[n]+t[n],e[n++]=i&r.DM,i>>=r.DB;if(t.t<r.t){for(i+=t.s;n<r.t;)i+=r[n],e[n++]=i&r.DM,i>>=r.DB;i+=r.s}else{for(i+=r.s;n<t.t;)i+=t[n],e[n++]=i&r.DM,i>>=r.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[n++]=i:i<-1&&(e[n++]=r.DV+i),e.t=n,e.clamp()}function kt(t){var e=new n;return this.addTo(t,e),e}function It(t){var e=new n;return this.subTo(t,e),e}function Bt(t){var e=new n;return this.multiplyTo(t,e),e}function Tt(){var t=new n;return this.squareTo(t),t}function At(t){var e=new n;return this.divRemTo(t,e,null),e}function Ot(t){var e=new n;return this.divRemTo(t,null,e),e}function jt(t){var e=new n,r=new n;return this.divRemTo(t,e,r),new Array(e,r)}function Dt(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Mt(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function Rt(){}function zt(t){return t}function Lt(t,e,r){t.multiplyTo(e,r)}function qt(t,e){t.squareTo(e)}function Ut(t){return this.exp(t,new Rt)}function Pt(t,e,r){var n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r[--n]=0;var i;for(i=r.t-this.t;n<i;++n)r[n+this.t]=this.am(0,t[n],r,n,0,this.t);for(i=Math.min(t.t,e);n<i;++n)this.am(0,t[n],r,n,0,e-n);r.clamp()}function Nt(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)}function Ct(t){this.r2=new n,this.q3=new n,n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}function Ft(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=new n;return t.copyTo(e),this.reduce(e),e}function Ht(t){return t}function Kt(t){var e=this;for(t.drShiftTo(e.m.t-1,e.r2),t.t>e.m.t+1&&(t.t=e.m.t+1,t.clamp()),e.mu.multiplyUpperTo(e.r2,e.m.t+1,e.q3),e.m.multiplyLowerTo(e.q3,e.m.t+1,e.r2);t.compareTo(e.r2)<0;)t.dAddOffset(1,e.m.t+1);for(t.subTo(e.r2,t);t.compareTo(e.m)>=0;)t.subTo(e.m,t)}function Vt(t,e){t.squareTo(e),this.reduce(e)}function Wt(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function Yt(t,e){var r,i,o=t.bitLength(),s=f(1);if(o<=0)return s;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new T(e):e.isEven()?new Ct(e):new z(e);var u=new Array,a=3,c=r-1,h=(1<<r)-1;if(u[1]=i.convert(this),r>1){var l=new n;for(i.sqrTo(u[1],l);a<=h;)u[a]=new n,i.mulTo(l,u[a-2],u[a]),a+=2}var p,d,v=t.t-1,y=!0,g=new n;for(o=_(t[v])-1;v>=0;){for(o>=c?p=t[v]>>o-c&h:(p=(t[v]&(1<<o+1)-1)<<c-o,v>0&&(p|=t[v-1]>>this.DB+o-c)),a=r;0==(1&p);)p>>=1,--a;if((o-=a)<0&&(o+=this.DB,--v),y)u[p].copyTo(s),y=!1;else{for(;a>1;)i.sqrTo(s,g),i.sqrTo(g,s),a-=2;a>0?i.sqrTo(s,g):(d=s,s=g,g=d),i.mulTo(g,u[p],s)}for(;v>=0&&0==(t[v]&1<<o);)i.sqrTo(s,g),d=s,s=g,g=d,--o<0&&(o=this.DB-1,--v)}return i.revert(s)}function Gt(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r}function Zt(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r}function Jt(t){var e=t.isEven();if(0===this.signum())throw new Error("division by zero");if(this.isEven()&&e||0==t.signum())return n.ZERO;for(var r=t.clone(),i=this.clone(),o=f(1),s=f(0),u=f(0),a=f(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),e?(u.isEven()&&a.isEven()||(u.addTo(this,u),a.subTo(t,a)),u.rShiftTo(1,u)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);r.compareTo(i)>=0?(r.subTo(i,r),e&&o.subTo(u,o),s.subTo(a,s)):(i.subTo(r,i),e&&u.subTo(o,u),a.subTo(s,a))}if(0!=i.compareTo(n.ONE))return n.ZERO;for(;a.compareTo(t)>=0;)a.subTo(t,a);for(;a.signum()<0;)a.addTo(t,a);return a}function Xt(t){var e,r=this.abs();if(1==r.t&&r[0]<=ue[ue.length-1]){for(e=0;e<ue.length;++e)if(r[0]==ue[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<ue.length;){for(var n=ue[e],i=e+1;i<ue.length&&n<ae;)n*=ue[i++];for(n=r.modInt(n);e<i;)if(n%ue[e++]==0)return!1}return r.millerRabin(t)}function $t(t){var e=this.subtract(n.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);t=t+1>>1,t>ue.length&&(t=ue.length);for(var o,s=new n(null),u=[],a=0;a<t;++a){for(;o=ue[Math.floor(Math.random()*ue.length)],u.indexOf(o)!=-1;);u.push(o),s.fromInt(o);var f=s.modPow(i,this);if(0!=f.compareTo(n.ONE)&&0!=f.compareTo(e)){for(var o=1;o++<r&&0!=f.compareTo(e);)if(f=f.modPowInt(2,this),0==f.compareTo(n.ONE))return!1;if(0!=f.compareTo(e))return!1}}return!0}var Qt=n.prototype;Qt.__bigi=r(286).version,n.isBigInteger=function(t,e){return t&&t.__bigi&&(!e||t.__bigi===Qt.__bigi)};var te;n.prototype.am=i,te=26,n.prototype.DB=te,n.prototype.DM=(1<<te)-1;var ee=n.prototype.DV=1<<te,re=52;n.prototype.FV=Math.pow(2,re),n.prototype.F1=re-te,n.prototype.F2=2*te-re;var ne,ie,oe="0123456789abcdefghijklmnopqrstuvwxyz",se=new Array;for(ne="0".charCodeAt(0),ie=0;ie<=9;++ie)se[ne++]=ie;for(ne="a".charCodeAt(0),ie=10;ie<36;++ie)se[ne++]=ie;for(ne="A".charCodeAt(0),ie=10;ie<36;++ie)se[ne++]=ie;T.prototype.convert=A,T.prototype.revert=O,T.prototype.reduce=j,T.prototype.mulTo=D,T.prototype.sqrTo=M,z.prototype.convert=L,z.prototype.revert=q,z.prototype.reduce=U,z.prototype.mulTo=N,z.prototype.sqrTo=P,Qt.copyTo=u,Qt.fromInt=a,Qt.fromString=c,Qt.clamp=h,Qt.dlShiftTo=b,Qt.drShiftTo=m,Qt.lShiftTo=w,Qt.rShiftTo=E,Qt.subTo=S,Qt.multiplyTo=x,Qt.squareTo=k,Qt.divRemTo=I,Qt.invDigit=R,Qt.isEven=C,Qt.exp=F,Qt.toString=l,Qt.negate=p,Qt.abs=d,Qt.compareTo=v,Qt.bitLength=y,Qt.byteLength=g,Qt.mod=B,Qt.modPowInt=H,Rt.prototype.convert=zt,Rt.prototype.revert=zt,Rt.prototype.mulTo=Lt,Rt.prototype.sqrTo=qt,Ct.prototype.convert=Ft,Ct.prototype.revert=Ht,Ct.prototype.reduce=Kt,Ct.prototype.mulTo=Wt,Ct.prototype.sqrTo=Vt;var ue=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ae=(1<<26)/ue[ue.length-1];Qt.chunkSize=G,Qt.toRadix=J,Qt.fromRadix=X,Qt.fromNumber=$,Qt.bitwiseTo=nt,Qt.changeBit=mt,Qt.addTo=xt,Qt.dMultiply=Dt,Qt.dAddOffset=Mt,Qt.multiplyLowerTo=Pt,Qt.multiplyUpperTo=Nt,Qt.modInt=Zt,Qt.millerRabin=$t,Qt.clone=K,Qt.intValue=V,Qt.byteValue=W,Qt.shortValue=Y,Qt.signum=Z,Qt.toByteArray=Q,Qt.equals=tt,Qt.min=et,Qt.max=rt,Qt.and=ot,Qt.or=ut,Qt.xor=ft,Qt.andNot=ht,Qt.not=lt,Qt.shiftLeft=pt,Qt.shiftRight=dt,Qt.getLowestSetBit=_t,Qt.bitCount=gt,Qt.testBit=bt,Qt.setBit=wt,Qt.clearBit=Et,Qt.flipBit=St,Qt.add=kt,Qt.subtract=It,Qt.multiply=Bt,Qt.divide=At,Qt.remainder=Ot,Qt.divideAndRemainder=jt,Qt.modPow=Yt,Qt.modInverse=Jt,Qt.pow=Ut,Qt.gcd=Gt,Qt.isProbablePrime=Xt,Qt.square=Tt,n.ZERO=f(0),n.ONE=f(1),n.valueOf=f,t.exports=n},function(t,e,r){var n=r(15),i=r(11),o=r(34);t.exports=function(t){return function(e,r,s){var u,a=n(e),f=i(a.length),c=o(s,f);if(t&&r!=r){for(;f>c;)if(u=a[c++],u!=u)return!0}else for(;f>c;c++)if((t||c in a)&&a[c]===r)return t||c;return!t&&-1}}},function(t,e,r){"use strict";var n=r(2),i=r(19),o=r(44),s=r(17),u=r(46),a=r(18),f=r(31),c=r(54),h=r(81),l=r(30)("id"),p=r(10),d=r(4),v=r(45),_=r(12),y=Object.isExtensible||d,g=_?"_s":"size",b=0,m=function(t,e){if(!d(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!p(t,l)){if(!y(t))return"F";if(!e)return"E";i(t,l,++b)}return"O"+t[l]},w=function(t,e){var r,n=m(e);if("F"!==n)return t._i[n];for(r=t._f;r;r=r.n)if(r.k==e)return r};t.exports={getConstructor:function(t,e,r,i){var c=t(function(t,o){u(t,c,e),t._i=n.create(null),t._f=void 0,t._l=void 0,t[g]=0,void 0!=o&&f(o,r,t[i],t)});return o(c.prototype,{clear:function(){for(var t=this,e=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete e[r.i];t._f=t._l=void 0,t[g]=0},delete:function(t){var e=this,r=w(e,t);if(r){var n=r.n,i=r.p;delete e._i[r.i],r.r=!0,i&&(i.n=n),n&&(n.p=i),e._f==r&&(e._f=n),e._l==r&&(e._l=i),e[g]--}return!!r},forEach:function(t){for(var e,r=s(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(r(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!w(this,t)}}),_&&n.setDesc(c.prototype,"size",{get:function(){return a(this[g])}}),c},def:function(t,e,r){var n,i,o=w(t,e);return o?o.v=r:(t._l=o={i:i=m(e,!0),k:e,v:r,p:n=t._l,n:void 0,r:!1},t._f||(t._f=o),n&&(n.n=o),t[g]++,"F"!==i&&(t._i[i]=o)),t},getEntry:w,setStrong:function(t,e,r){c(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,r=t._l;r&&r.r;)r=r.p;return t._t&&(t._l=r=r?r.n:t._t._f)?"keys"==e?h(0,r.k):"values"==e?h(0,r.v):h(0,[r.k,r.v]):(t._t=void 0,h(1))},r?"entries":"values",!r,!0),v(e)}}},function(t,e,r){var n=r(31),i=r(39);t.exports=function(t){return function(){if(i(this)!=t)throw TypeError(t+"#toJSON isn't generic");var e=[];return n(this,!1,e.push,e),e}}},function(t,e,r){"use strict";var n=r(19),i=r(44),o=r(5),s=r(4),u=r(46),a=r(31),f=r(38),c=r(10),h=r(30)("weak"),l=Object.isExtensible||s,p=f(5),d=f(6),v=0,_=function(t){return t._l||(t._l=new y)},y=function(){this.a=[]},g=function(t,e){return p(t.a,function(t){return t[0]===e})};y.prototype={get:function(t){var e=g(this,t);if(e)return e[1]},has:function(t){return!!g(this,t)},set:function(t,e){var r=g(this,t);r?r[1]=e:this.a.push([t,e])},delete:function(t){var e=d(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,r,n){var o=t(function(t,i){u(t,o,e),t._i=v++,t._l=void 0,void 0!=i&&a(i,r,t[n],t)});return i(o.prototype,{delete:function(t){return!!s(t)&&(l(t)?c(t,h)&&c(t[h],this._i)&&delete t[h][this._i]:_(this)["delete"](t))},has:function(t){return!!s(t)&&(l(t)?c(t,h)&&c(t[h],this._i):_(this).has(t))}}),o},def:function(t,e,r){return l(o(e))?(c(e,h)||n(e,h,{}),e[h][t._i]=r):_(t).set(e,r),t},frozenStore:_,WEAK:h}},function(t,e,r){var n=r(4),i=r(7).document,o=n(i)&&n(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,r){"use strict";var n=r(5);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,r){var n=r(15),i=r(2).getNames,o={}.toString,s="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(t){try{return i(t)}catch(e){return s.slice()}};t.exports.get=function(t){return s&&"[object Window]"==o.call(t)?u(t):i(n(t))}},function(t,e,r){t.exports=r(7).document&&document.documentElement},function(t,e,r){var n=r(32),i=r(6)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||o[i]===t)}},function(t,e,r){var n=r(4),i=Math.floor;t.exports=function(t){return!n(t)&&isFinite(t)&&i(t)===t}},function(t,e,r){var n=r(4),i=r(20),o=r(6)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,r){var n=r(5);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(o){var s=t["return"];throw void 0!==s&&n(s.call(t)),o}}},function(t,e,r){"use strict";var n=r(2),i=r(25),o=r(33),s={};r(19)(s,r(6)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=n.create(s,{next:i(1,r)}),o(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,r){var n=r(2),i=r(15),o=n.isEnum;t.exports=function(t){return function(e){for(var r,s=i(e),u=n.getKeys(s),a=u.length,f=0,c=[];a>f;)o.call(s,r=u[f++])&&c.push(t?[r,s[r]]:s[r]);return c}}},function(t,e,r){var n=r(2),i=r(5),o=r(7).Reflect;t.exports=o&&o.ownKeys||function(t){var e=n.getNames(i(t)),r=n.getSymbols;return r?e.concat(r(t)):e}},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},function(t,e,r){var n=r(7),i="__core-js_shared__",o=n[i]||(n[i]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e,r){var n=r(11),i=r(88),o=r(18);t.exports=function(t,e,r,s){var u=String(o(t)),a=u.length,f=void 0===r?" ":String(r),c=n(e);if(c<=a)return u;""==f&&(f=" ");var h=c-a,l=i.call(f,Math.ceil(h/f.length));return l.length>h&&(l=l.slice(0,h)),s?l+u:u+l}},function(t,e,r){"use strict";var n=r(35),i=r(18);t.exports=function(t){
var e=String(i(this)),r="",o=n(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(r+=e);return r}},function(t,e,r){var n,i,o,s=r(17),u=r(42),a=r(75),f=r(72),c=r(7),h=c.process,l=c.setImmediate,p=c.clearImmediate,d=c.MessageChannel,v=0,_={},y="onreadystatechange",g=function(){var t=+this;if(_.hasOwnProperty(t)){var e=_[t];delete _[t],e()}},b=function(t){g.call(t.data)};l&&p||(l=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return _[++v]=function(){u("function"==typeof t?t:Function(t),e)},n(v),v},p=function(t){delete _[t]},"process"==r(20)(h)?n=function(t){h.nextTick(s(g,t,1))}:d?(i=new d,o=i.port2,i.port1.onmessage=b,n=s(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(n=function(t){c.postMessage(t+"","*")},c.addEventListener("message",b,!1)):n=y in f("script")?function(t){a.appendChild(f("script"))[y]=function(){a.removeChild(this),g.call(t)}}:function(t){setTimeout(s(g,t,1),0)}),t.exports={set:l,clear:p}},function(t,e,r){var n=r(39),i=r(6)("iterator"),o=r(32);t.exports=r(21).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){"use strict";var n=r(29),i=r(81),o=r(32),s=r(15);t.exports=r(54)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,r):"values"==e?i(0,t[r]):i(0,[r,t[r]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(t,e,r){(function(e){function n(t){return function(){var r=[],n={update:function(t,n){return e.isBuffer(t)||(t=new e(t,n)),r.push(t),this},digest:function(n){var i=e.concat(r),o=t(i);return r=null,n?o.toString(n):o}};return n}}var i=r(292),o=n(r(238)),s=n(r(290));t.exports=function(t){return"md5"===t?new o:"rmd160"===t?new s:i(t)}}).call(e,r(3).Buffer)},function(t,e,r){!function(n,i){t.exports=e=i(r(23))}(this,function(t){return function(){var e=t,r=e.lib,n=r.WordArray,i=e.enc;i.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp();for(var i=[],o=0;o<r;o+=3)for(var s=e[o>>>2]>>>24-o%4*8&255,u=e[o+1>>>2]>>>24-(o+1)%4*8&255,a=e[o+2>>>2]>>>24-(o+2)%4*8&255,f=s<<16|u<<8|a,c=0;c<4&&o+.75*c<r;c++)i.push(n.charAt(f>>>6*(3-c)&63));var h=n.charAt(64);if(h)for(;i.length%4;)i.push(h);return i.join("")},parse:function(t){var e=t.length,r=this._map,i=r.charAt(64);if(i){var o=t.indexOf(i);o!=-1&&(e=o)}for(var s=[],u=0,a=0;a<e;a++)if(a%4){var f=r.indexOf(t.charAt(a-1))<<a%4*2,c=r.indexOf(t.charAt(a))>>>6-a%4*2,h=f|c;s[u>>>2]|=h<<24-u%4*8,u++}return n.create(s,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64})},function(t,e,r){function n(t,e,r,n,i,u,a){this.p=t,this.a=e,this.b=r,this.G=s.fromAffine(this,n,i),this.n=u,this.h=a,this.infinity=new s(this,null,null,o.ZERO),this.pOverFour=t.add(o.ONE).shiftRight(2)}var i=r(9),o=r(16),s=r(95);n.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p),n=r.modPow(this.pOverFour,this.p),i=n;return n.isEven()^!t&&(i=this.p.subtract(i)),s.fromAffine(this,e,i)},n.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},n.prototype.isOnCurve=function(t){if(this.isInfinity(t))return!0;var e=t.affineX,r=t.affineY,n=this.a,i=this.b,o=this.p;if(e.signum()<0||e.compareTo(o)>=0)return!1;if(r.signum()<0||r.compareTo(o)>=0)return!1;var s=r.square().mod(o),u=e.pow(3).add(n.multiply(e)).add(i).mod(o);return s.equals(u)},n.prototype.validate=function(t){i(!this.isInfinity(t),"Point is at infinity"),i(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return i(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=n},function(t,e,r){(function(e){function n(t,e,r,n){i.notStrictEqual(n,void 0,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=n,this._zInv=null,this.compressed=!0}var i=r(9),o=r(16),s=o.valueOf(3);Object.defineProperty(n.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(n.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(n.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),n.fromAffine=function(t,e,r){return new n(t,e,r,o.ONE)},n.prototype.equals=function(t){if(t===this)return!0;if(this.curve.isInfinity(this))return this.curve.isInfinity(t);if(this.curve.isInfinity(t))return this.curve.isInfinity(this);var e=t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p);if(0!==e.signum())return!1;var r=t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p);return 0===r.signum()},n.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new n(this.curve,this.x,t,this.z)},n.prototype.add=function(t){if(this.curve.isInfinity(this))return t;if(this.curve.isInfinity(t))return this;var e=this.x,r=this.y,i=t.x,o=t.y,u=o.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),a=i.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===a.signum())return 0===u.signum()?this.twice():this.curve.infinity;var f=a.square(),c=f.multiply(a),h=e.multiply(f),l=u.square().multiply(this.z),p=l.subtract(h.shiftLeft(1)).multiply(t.z).subtract(c).multiply(a).mod(this.curve.p),d=h.multiply(s).multiply(u).subtract(r.multiply(c)).subtract(l.multiply(u)).multiply(t.z).add(u.multiply(c)).mod(this.curve.p),v=c.multiply(this.z).multiply(t.z).mod(this.curve.p);return new n(this.curve,p,d,v)},n.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.signum())return this.curve.infinity;var t=this.x,e=this.y,r=e.multiply(this.z),i=r.multiply(e).mod(this.curve.p),o=this.curve.a,u=t.square().multiply(s);0!==o.signum()&&(u=u.add(this.z.square().multiply(o))),u=u.mod(this.curve.p);var a=u.square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.p),f=u.multiply(s).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(u.pow(3)).mod(this.curve.p),c=r.pow(3).shiftLeft(3).mod(this.curve.p);return new n(this.curve,a,f,c)},n.prototype.multiply=function(t){if(this.curve.isInfinity(this))return this;if(0===t.signum())return this.curve.infinity;for(var e=t,r=e.multiply(s),n=this.negate(),i=this,o=r.bitLength()-2;o>0;--o){var u=r.testBit(o),a=e.testBit(o);i=i.twice(),u!==a&&(i=i.add(u?this:n))}return i},n.prototype.multiplyTwo=function(t,e,r){for(var n=Math.max(t.bitLength(),r.bitLength())-1,i=this.curve.infinity,o=this.add(e);n>=0;){var s=t.testBit(n),u=r.testBit(n);i=i.twice(),s?i=u?i.add(o):i.add(this):u&&(i=i.add(e)),--n}return i},n.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return new e("00","hex");var r,n=this.affineX,i=this.affineY,o=Math.floor((this.curve.p.bitLength()+7)/8);return t?(r=new e(1+o),r.writeUInt8(i.isEven()?2:3,0)):(r=new e(1+o+o),r.writeUInt8(4,0),i.toBuffer(o).copy(r,1+o)),n.toBuffer(o).copy(r,1),r},n.decodeFrom=function(t,e){var r,s=e.readUInt8(0),u=4!==s,a=Math.floor((t.p.bitLength()+7)/8),f=o.fromBuffer(e.slice(1,1+a));if(u){i.equal(e.length,a+1,"Invalid sequence length"),i(2===s||3===s,"Invalid sequence tag");var c=3===s;r=t.pointFromX(c,f)}else{i.equal(e.length,1+a+a,"Invalid sequence length");var h=o.fromBuffer(e.slice(1+a));r=n.fromAffine(t,f,h)}return r.compressed=u,r},n.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=n}).call(e,r(3).Buffer)},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e,r){var n=t.bind(F);return new Promise(function(t,i){function o(){var r=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],i=e.map(function(t){return n(t)});return i.findIndex(function(t){return void 0===t})===-1&&(s&&clearTimeout(s),r||F.unsubscribe(o),t(i),!0)}var s=null,u=o(!0);u||F.subscribe(o),r&&!u&&(s=setTimeout(function(){F.unsubscribe(o),i("timeout")},r))})}function o(t,e){var r=arguments.length<=2||void 0===arguments[2]?1900:arguments[2],n=F[t];if(!n)throw new Error("ChainStore does not have method "+t);var i=Array.isArray(e);return i||(e=[e]),F.FetchChainObjects(n,f.List(e),r).then(function(t){return i?t:t.get(0)})}function s(t){return t?(/Z$/.test(t)||(t+="Z"),new Date(t)):new Date("1970-01-01T00:00:00.000Z")}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),f=r(284),c=r(26),h=c.Apis,l=r(36),p=l.object_type,d=l.impl_object_type,v=r(97),_=r(16),y=r(98),g=y.emitter(),b=parseInt(p.operation_history,10),m=parseInt(p.limit_order,10),w=parseInt(p.call_order,10),E=parseInt(p.proposal,10),S=(parseInt(p.balance,10),parseInt(p.vesting_balance,10),parseInt(p.witness,10)),x=parseInt(p.worker,10),k=parseInt(p.committee_member,10),I=parseInt(p.account,10),B=parseInt(p.asset,10),T="1."+m+".",A="1."+w+".",O="1."+E+".",j="2."+parseInt(d.account_balance,10)+".",D="2."+parseInt(d.account_statistics,10)+".",M="2."+parseInt(d.asset_dynamic_data,10)+".",R="2."+parseInt(d.asset_bitasset_data,10)+".",z="1."+S+".",L="1."+x+".",q="1."+k+".",U="1."+B+".",P="1."+I+".",N=JSON.parse({NODE_ENV:"production"}.npm_config__graphene_chain_chain_debug||!1),C=function(){function t(){n(this,t),this.subscribers=new Set,this.subscribed=!1,this.clearCache(),this.progress=0,this.chain_time_offset=[],this.dispatchFrequency=40}return a(t,[{key:"clearCache",value:function(){this.objects_by_id=f.Map(),this.accounts_by_name=f.Map(),this.assets_by_symbol=f.Map(),this.account_ids_by_key=f.Map(),this.balance_objects_by_address=f.Map(),this.get_account_refs_of_keys_calls=f.Set(),this.account_history_requests=new Map,this.witness_by_account_id=new Map,this.committee_by_account_id=new Map,this.objects_by_vote_id=new Map,this.fetching_get_full_accounts=new Map}},{key:"resetCache",value:function(){this.subscribed=!1,this.clearCache(),this.head_block_time_string=null,this.init().then(function(t){console.log("resetCache init success")})["catch"](function(t){console.log("resetCache init error:",t)})}},{key:"setDispatchFrequency",value:function(t){this.dispatchFrequency=t}},{key:"init",value:function(){var t=this,e=0,r=function n(r,i){var o=h.instance().db_api();return o?o.exec("get_objects",[["2.1.0"]]).then(function(o){for(var u=0;u<o.length;u++){var a=o[u];if(a){t._updateObject(a,!0);var f=new Date(a.time+"+00:00").getTime();t.head_block_time_string=a.time,t.chain_time_offset.push(Date.now()-s(a.time).getTime());var c=Date.now(),l=(c-f)/1e3,p=Date.parse("Sep 1, 2015"),d=f-p;if(t.progress=d/(c-p),l<60)h.instance().db_api().exec("set_subscribe_callback",[t.onUpdate.bind(t),!0]).then(function(e){console.log("synced and subscribed, chainstore ready"),t.subscribed=!0,r()})["catch"](function(t){i(t),console.log("Error: ",t)});else{if(console.log("not yet synced, retrying in 1s"),e++,e>10)throw new Error("ChainStore sync error, please check your system clock");setTimeout(n.bind(t,r,i),1e3)}}else setTimeout(n.bind(t,r,i),1e3)}})["catch"](function(e){console.log("!!! Chain API error",e),t.objects_by_id=t.objects_by_id["delete"]("2.1.0"),i(e)}):i(new Error("Api not found, please initialize the api instance before calling the ChainStore"))};return new Promise(function(t,e){return r(t,e)})}},{key:"onUpdate",value:function(t){for(var e=0;e<t.length;++e)for(var r=0;r<t[e].length;++r){var n=t[e][r];if(v.is_object_id(n)){if(0==n.search(T)){var i=this.objects_by_id.get(n);if(!i)return;g.emit("cancel-order",i.get("id"));var o=this.objects_by_id.get(i.get("seller"));if(o&&o.has("orders")){var s=o.get("orders");o.get("orders").has(n)&&(o=o.set("orders",s["delete"](n)),this.objects_by_id=this.objects_by_id.set(o.get("id"),o))}}if(0==n.search(A)){var u=this.objects_by_id.get(n);if(!u)return;g.emit("close-call",u.get("id"));var a=this.objects_by_id.get(u.get("borrower"));if(a&&a.has("call_orders")){var f=a.get("call_orders");a.get("call_orders").has(n)&&(a=a.set("call_orders",f["delete"](n)),this.objects_by_id=this.objects_by_id.set(a.get("id"),a))}}this.objects_by_id=this.objects_by_id.set(n,null)}else this._updateObject(n,!1)}this.notifySubscribers()}},{key:"notifySubscribers",value:function(){var t=this;this.dispatched||(this.dispatched=!0,setTimeout(function(){t.dispatched=!1,t.subscribers.forEach(function(t){t()})},this.dispatchFrequency))}},{key:"subscribe",value:function(t){this.subscribers.has(t)&&console.error("Subscribe callback already exists",t),this.subscribers.add(t)}},{key:"unsubscribe",value:function(t){this.subscribers.has(t)||console.error("Unsubscribe callback does not exists",t),this.subscribers["delete"](t)}},{key:"clearObjectCache",value:function(t){this.objects_by_id=this.objects_by_id["delete"](t)}},{key:"getObject",value:function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];if(!v.is_object_id(t))throw Error("argument is not an object id: "+JSON.stringify(t));var r=this.objects_by_id.get(t);if(void 0===r||e)return this.fetchObject(t,e);if(r!==!0)return r}},{key:"getAsset",value:function(t){var e=this;if(!t)return null;if(v.is_object_id(t)){var r=this.getObject(t);if(r&&r.get("bitasset")&&!r.getIn(["bitasset","current_feed"]))return;return r}var n=this.assets_by_symbol.get(t);if(v.is_object_id(n)){var i=this.getObject(n);if(i&&i.get("bitasset")&&!i.getIn(["bitasset","current_feed"]))return;return i}return null===n?null:void(n!==!0&&h.instance().db_api().exec("lookup_asset_symbols",[[t]]).then(function(r){r.length&&r[0]?e._updateObject(r[0],!0):(e.assets_by_symbol=e.assets_by_symbol.set(t,null),e.notifySubscribers())})["catch"](function(r){console.log("Error: ",r),e.assets_by_symbol=e.assets_by_symbol["delete"](t)}))}},{key:"getAccountRefsOfKey",value:function(t){var e=this;return this.get_account_refs_of_keys_calls.has(t)?this.account_ids_by_key.get(t):(this.get_account_refs_of_keys_calls=this.get_account_refs_of_keys_calls.add(t),void h.instance().db_api().exec("get_key_references",[[t]]).then(function(r){var n=f.Set();r=r[0],n=n.withMutations(function(t){for(var e=0;e<r.length;++e)t.add(r[e])}),e.account_ids_by_key=e.account_ids_by_key.set(t,n),e.notifySubscribers()},function(r){e.account_ids_by_key=e.account_ids_by_key["delete"](t),e.get_account_refs_of_keys_calls=e.get_account_refs_of_keys_calls["delete"](t)}))}},{key:"getBalanceObjects",value:function(t){var e=this,r=this.balance_objects_by_address.get(t);return void 0===r&&(this.balance_objects_by_address=this.balance_objects_by_address.set(t,f.Set()),h.instance().db_api().exec("get_balance_objects",[[t]]).then(function(r){for(var n=new Set,i=0;i<r.length;++i)e._updateObject(r[i]),n.add(r[i].id);e.balance_objects_by_address=e.balance_objects_by_address.set(t,f.Set(n)),e.notifySubscribers()},function(r){e.balance_objects_by_address=e.balance_objects_by_address["delete"](t)})),this.balance_objects_by_address.get(t)}},{key:"fetchObject",value:function(t){var e=this,r=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];if("string"!=typeof t){for(var n=[],i=0;i<t.length;++i)n.push(this.fetchObject(t[i]));return n}if(N&&console.log("!!! fetchObject: ",t,this.subscribed,!this.subscribed&&!r),this.subscribed||r){if(N&&console.log("maybe fetch object: ",t),!v.is_object_id(t))throw Error("argument is not an object id: "+t);if("1.2."==t.substring(0,4))return this.fetchFullAccount(t);var o=this.objects_by_id.get(t);if(void 0===o)N&&console.log("fetching object: ",t),this.objects_by_id=this.objects_by_id.set(t,!0),h.instance().db_api().exec("get_objects",[[t]]).then(function(r){for(var n=0;n<r.length;n++){var i=r[n];i?e._updateObject(i,!0):(e.objects_by_id=e.objects_by_id.set(t,null),e.notifySubscribers())}})["catch"](function(r){console.log("!!! Chain API error",r),e.objects_by_id=e.objects_by_id["delete"](t)});else if(o===!0)return;return o}}},{key:"getAccount",value:function(t){if(!t)return null;if("object"===("undefined"==typeof t?"undefined":u(t)))return t.id?this.getAccount(t.id):t.get?this.getAccount(t.get("id")):void 0;if(v.is_object_id(t)){var e=this.getObject(t);return null===e?null:void 0===e||void 0===e.get("name")?this.fetchFullAccount(t):e}if(v.is_account_name(t,!0)){var r=this.accounts_by_name.get(t);return null===r?null:void 0===r?this.fetchFullAccount(t):this.getObject(r)}}},{key:"getWitnessById",value:function(t){var e=this.witness_by_account_id.get(t);return void 0===e?void this.fetchWitnessByAccount(t):e?this.getObject(e):null}},{key:"getCommitteeMemberById",value:function(t){var e=this.committee_by_account_id.get(t);return void 0===e?void this.fetchCommitteeMemberByAccount(t):e?this.getObject(e):null}},{key:"getWitness",value:function(t){var e=this.getAccount(t);if(!e)return null;var r=e.get("id"),n=this.witness_by_account_id.get(r);return void 0===n&&this.fetchWitnessByAccount(r),this.getObject(n)}},{key:"getCommitteeMember",value:function(t){var e=this,r=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(v.is_account_name(t,!0)||"1.2."==t.substring(0,4)){var n=this.getAccount(t);if(n){var i=function(){var t=n.get("id"),i=e.committee_by_account_id.get(t);return v.is_object_id(i)?{v:e.getObject(i,r)}:void(void 0==i&&e.fetchCommitteeMemberByAccount(t).then(function(n){e.committee_by_account_id.set(t,n?n.get("id"):null),r&&n&&r()}))}();if("object"===("undefined"==typeof i?"undefined":u(i)))return i.v}else this.lookupAccountByName(t).then(function(t){var n=t.get("id"),i=e.committee_by_account_id.get(n);return v.is_object_id(i)?e.getObject(i,r):void(void 0==i&&e.fetchCommitteeMemberByAccount(n).then(function(t){e.committee_by_account_id.set(n,t?t.get("id"):null),r&&t&&r()}))},function(r){e.committee_by_account_id.set(t,null)})}return null}},{key:"fetchWitnessByAccount",value:function(t){var e=this;return new Promise(function(r,n){h.instance().db_api().exec("get_witness_by_account",[t]).then(function(n){if(n){e.witness_by_account_id=e.witness_by_account_id.set(n.witness_account,n.id);var i=e._updateObject(n,!0);r(i)}else e.witness_by_account_id=e.witness_by_account_id.set(t,null),e.notifySubscribers(),r(null)},n)})}},{key:"fetchCommitteeMemberByAccount",value:function(t){var e=this;return new Promise(function(r,n){h.instance().db_api().exec("get_committee_member_by_account",[t]).then(function(n){if(n){e.committee_by_account_id=e.committee_by_account_id.set(n.committee_member_account,n.id);var i=e._updateObject(n,!0);r(i)}else e.committee_by_account_id=e.committee_by_account_id.set(t,null),e.notifySubscribers(),r(null)},n)})}},{key:"fetchFullAccount",value:function(t){var e=this;N&&console.log("Fetch full account: ",t);var r=!1;if(v.is_object_id(t)){var n=this.objects_by_id.get(t);if(r=void 0===n,!r&&r.get("name"))return n}else{if(!v.is_account_name(t,!0))throw Error("argument is not an account name: "+t);var i=this.accounts_by_name.get(t);if(v.is_object_id(i))return this.getAccount(i)}(!this.fetching_get_full_accounts.has(t)||Date.now()-this.fetching_get_full_accounts.get(t)>5e3)&&(this.fetching_get_full_accounts.set(t,Date.now()),h.instance().db_api().exec("get_full_accounts",[[t],!0]).then(function(r){if(0===r.length)return void(v.is_object_id(t)&&(e.objects_by_id=e.objects_by_id.set(t,null),e.notifySubscribers()));var n=r[0][1];N&&console.log("full_account: ",n);var i=n.account,o=n.vesting_balances,s=n.statistics,u=n.call_orders,a=n.limit_orders,c=n.referrer_name,h=n.registrar_name,l=n.lifetime_referrer_name,p=n.votes,d=n.proposals;e.accounts_by_name=e.accounts_by_name.set(i.name,i.id),i.referrer_name=c,i.lifetime_referrer_name=l,i.registrar_name=h,i.balances={},i.orders=new f.Set,i.vesting_balances=new f.Set,i.balances=new f.Map,i.call_orders=new f.Set,i.proposals=new f.Set,i.vesting_balances=i.vesting_balances.withMutations(function(t){o.forEach(function(r){e._updateObject(r,!1),t.add(r.id)})}),p.forEach(function(t){return e._updateObject(t,!1)}),i.balances=i.balances.withMutations(function(t){n.balances.forEach(function(r){e._updateObject(r,!1),t.set(r.asset_type,r.id)})}),i.orders=i.orders.withMutations(function(t){a.forEach(function(r){e._updateObject(r,!1),t.add(r.id)})}),i.call_orders=i.call_orders.withMutations(function(t){u.forEach(function(r){e._updateObject(r,!1),t.add(r.id)})}),i.proposals=i.proposals.withMutations(function(t){d.forEach(function(r){e._updateObject(r,!1),t.add(r.id)})}),e._updateObject(s,!1);var _=e._updateObject(i,!1);e.fetchRecentHistory(_),e.notifySubscribers()},function(r){console.log("Error: ",r),v.is_object_id(t)?e.objects_by_id=e.objects_by_id["delete"](t):e.accounts_by_name=e.accounts_by_name["delete"](t)}))}},{key:"getAccountMemberStatus",value:function(t){if(void 0!==t){if(null===t)return"unknown";if(t.get("lifetime_referrer")==t.get("id"))return"lifetime";var e=new Date(t.get("membership_expiration_date")).getTime(),r=(new Date).getTime();return e<r?"basic":"annual"}}},{key:"getAccountBalance",value:function(t,e){var r=t.get("balances");if(!r)return 0;var n=r.get(e);if(n){var i=this.objects_by_id.get(n);if(i)return i.get("balance")}return 0}},{key:"fetchRecentHistory",value:function(t){var e=this,r=arguments.length<=1||void 0===arguments[1]?100:arguments[1],n=t;if(!v.is_object_id(n)&&t.toJS&&(n=t.get("id")),v.is_object_id(n)&&(t=this.objects_by_id.get(n))){var i=this.account_history_requests.get(n);if(i)return i.requests++,i.promise;i={requests:0};var o="1."+b+".0",s=t.get("history");s&&s.size&&(o=s.first().get("id"));var u="1."+b+".0";return i.promise=new Promise(function(t,i){h.instance().history_api().exec("get_account_history",[n,o,r,u]).then(function(o){var s=e.objects_by_id.get(n),u=s.get("history");u||(u=f.List());var a=f.fromJS(o);a=a.withMutations(function(t){for(var e=0;e<u.size;++e)t.push(u.get(e))});var c=s.set("history",a);e.objects_by_id=e.objects_by_id.set(n,c);var h=e.account_history_requests.get(n);e.account_history_requests["delete"](n),h.requests>0?e.fetchRecentHistory(c,r).then(t,i):t(c)})}),this.account_history_requests.set(n,i),i.promise}}},{key:"_updateObject",value:function(t,e){var r=arguments.length<=2||void 0===arguments[2]||arguments[2];if(!("id"in t))return console.log("object with no id:",t),void("balance"in t&&"owner"in t&&"settlement_date"in t&&g.emit("settle-order-update",t));"2.1.0"==t.id&&(t.participation=100*(_(t.recent_slots_filled).bitCount()/128),this.head_block_time_string=t.time,this.chain_time_offset.push(Date.now()-s(t.time).getTime()),this.chain_time_offset.length>10&&this.chain_time_offset.shift());var n=this.objects_by_id.get(t.id);n||(n=f.Map());var i=n;if(void 0===n||n===!0?this.objects_by_id=this.objects_by_id.set(t.id,n=f.fromJS(t)):this.objects_by_id=this.objects_by_id.set(t.id,n=n.mergeDeep(f.fromJS(t))),t.id.substring(0,j.length)==j){var o=this.objects_by_id.get(t.owner);if(void 0===o||null===o)return;var u=o.get("balances");u||(o=o.set("balances",f.Map())),o=o.setIn(["balances",t.asset_type],t.id),this.objects_by_id=this.objects_by_id.set(t.owner,o)}else if(t.id.substring(0,D.length)==D){var a=i?i.get("most_recent_op"):"2.9.0";a!=t.most_recent_op&&this.fetchRecentHistory(t.owner)}else if(t.id.substring(0,z.length)==z)this.witness_by_account_id.set(t.witness_account,t.id),this.objects_by_vote_id.set(t.vote_id,t.id);else if(t.id.substring(0,q.length)==q)this.committee_by_account_id.set(t.committee_member_account,t.id),this.objects_by_vote_id.set(t.vote_id,t.id);else if(t.id.substring(0,P.length)==P)n=n.set("active",f.fromJS(t.active)),n=n.set("owner",f.fromJS(t.owner)),n=n.set("options",f.fromJS(t.options)),n=n.set("whitelisting_accounts",f.fromJS(t.whitelisting_accounts)),n=n.set("blacklisting_accounts",f.fromJS(t.blacklisting_accounts)),n=n.set("whitelisted_accounts",f.fromJS(t.whitelisted_accounts)),n=n.set("blacklisted_accounts",f.fromJS(t.blacklisted_accounts)),this.objects_by_id=this.objects_by_id.set(t.id,n),this.accounts_by_name=this.accounts_by_name.set(t.name,t.id);else if(t.id.substring(0,U.length)==U){this.assets_by_symbol=this.assets_by_symbol.set(t.symbol,t.id);var c=n.get("dynamic");if(!c){var h=this.getObject(t.dynamic_asset_data_id,!0);h||(h=f.Map()),h.get("asset_id")||(h=h.set("asset_id",t.id)),this.objects_by_id=this.objects_by_id.set(t.dynamic_asset_data_id,h),n=n.set("dynamic",h),this.objects_by_id=this.objects_by_id.set(t.id,n)}var l=n.get("bitasset");if(!l&&t.bitasset_data_id){var p=this.getObject(t.bitasset_data_id,!0);p||(p=f.Map()),p.get("asset_id")||(p=p.set("asset_id",t.id)),this.objects_by_id=this.objects_by_id.set(t.bitasset_data_id,p),n=n.set("bitasset",p),this.objects_by_id=this.objects_by_id.set(t.id,n)}}else if(t.id.substring(0,M.length)==M){var d=n.get("asset_id");if(d){var v=this.getObject(d);v&&v.set&&(v=v.set("dynamic",n),this.objects_by_id=this.objects_by_id.set(d,v))}}else if(t.id.substring(0,L.length)==L)this.objects_by_vote_id.set(t.vote_for,t.id),this.objects_by_vote_id.set(t.vote_against,t.id);else if(t.id.substring(0,R.length)==R){var y=n.get("asset_id");if(y){var b=this.getObject(y);b&&(b=b.set("bitasset",n),g.emit("bitasset-update",b),this.objects_by_id=this.objects_by_id.set(y,b))}}else if(t.id.substring(0,A.length)==A){r&&g.emit("call-order-update",t);var m=this.objects_by_id.get(t.borrower);if(m&&m.has("call_orders")){var w=m.get("call_orders");w.has(t.id)||(m=m.set("call_orders",w.add(t.id)),this.objects_by_id=this.objects_by_id.set(m.get("id"),m))}}else if(t.id.substring(0,T.length)==T){var E=this.objects_by_id.get(t.seller);if(E&&E.has("orders")){var S=E.get("orders");S.has(t.id)||(E=E.set("orders",S.add(t.id)),this.objects_by_id=this.objects_by_id.set(E.get("id"),E))}}else t.id.substring(0,O.length)==O&&(this.addProposalData(t.required_active_approvals,t.id),this.addProposalData(t.required_owner_approvals,t.id));return e&&this.notifySubscribers(),n}},{key:"getObjectsByVoteIds",value:function(t){for(var e=this,r=[],n=[],i=0;i<t.length;++i){var o=this.objects_by_vote_id.get(t[i]);o?r.push(this.getObject(o)):(r.push(null),n.push(t[i]))}return n.length&&h.instance().db_api().exec("lookup_vote_ids",[n]).then(function(t){console.log("missing ===========> ",n),console.log("vote objects ===========> ",t);for(var r=0;r<t.length;++r)t[r]&&e._updateObject(t[r])},function(t){return console.log("Error looking up vote ids: ",t)}),r}},{key:"getObjectByVoteID",value:function(t){var e=this.objects_by_vote_id.get(t);if(e)return this.getObject(e)}},{key:"getHeadBlockDate",value:function(){return s(this.head_block_time_string)}},{key:"getEstimatedChainTimeOffset",value:function(){if(0===this.chain_time_offset.length)return 0;var t=f.List(this.chain_time_offset).sort().get(Math.floor((this.chain_time_offset.length-1)/2));return t}},{key:"addProposalData",value:function(t,e){var r=this;t.forEach(function(t){var n=r.objects_by_id.get(t);if(n){var i=n.get("proposals");i.includes(e)||(i=i.add(e),n=n.set("proposals",i),r._updateObject(n.toJS(),!1))}})}}]),t}(),F=new C;F.FetchChainObjects=i,F.FetchChain=o,t.exports=F},function(t,e){"use strict";var r=/\b\d+\.\d+\.(\d+)\b/,n={is_account_name:function(t){var e,r,n,i,o,s=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];if(this.is_empty(t))return!1;if(i=t.length,!s&&i<3||i>63)return!1;for(o=t.split("."),e=0,n=o.length;e<n;e++)if(r=o[e],!/^[a-z][a-z0-9-]*$/.test(r)||/--/.test(r)||!/[a-z0-9]$/.test(r))return!1;return!0},is_object_id:function(t){if("string"!=typeof t)return!1;var e=r.exec(t);return null!==e&&3===t.split(".").length},is_empty:function(t){return null==t||0===t.length},is_account_name_error:function(t,e){var r,n,i,o,s,u;if(null==e&&(e=!1),u="Account name should ",this.is_empty(t))return u+"not be empty.";if(o=t.length,!e&&o<3)return u+"be longer.";if(o>63)return u+"be shorter.";for(/\./.test(t)&&(u="Each account segment should "),s=t.split("."),r=0,i=s.length;r<i;r++){if(n=s[r],!/^[~a-z]/.test(n))return u+"start with a letter.";if(!/^[~a-z0-9-]*$/.test(n))return u+"have only letters, digits, or dashes.";if(/--/.test(n))return u+"have only one dash in a row.";if(!/[a-z0-9]$/.test(n))return u+"end with a letter or digit.";if(!(n.length>=3))return u+"be longer"}return null},is_cheap_name:function(t){return/[0-9-]/.test(t)||!/[aeiouy]/.test(t)},is_empty_user_input:function(t){return!!this.is_empty(t)||""===(t+"").trim()},required:function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.is_empty(t))throw new Error("value required for "+e+": "+t);return t},is_valid_symbol_error:function(t){var e="Asset name should ";return this.is_empty(t)?e+"not be empty.":t.split(".").length>2?e+"have only one dot.":t.length<3?e+"be longer.":t.length>16?e+"be shorter.":/^[A-Z]/.test(t)?/[A-Z]$/.test(t)?/^[A-Z0-9\.]$/.test(t)?e+"contain only letters numbers and perhaps a dot.":null:e+"end with a letter":e+"start with a letter"}};t.exports=n},function(t,e,r){"use strict";var n,i=r(265);t.exports={emitter:function(){return n||(n=i({})),n}}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(27),s=o.Long,u=r(65),a=s.fromNumber(Math.pow(2,48)-1),f=function(){function t(e,r,i){n(this,t),this.space=e,this.type=r,this.instance=i;var o=this.instance.toString(),s=this.space+"."+this.type+"."+o;if(!u.is_digits(o))throw new("Invalid object id "+s)}return i(t,[{key:"toLong",value:function(){return s.fromNumber(this.space).shiftLeft(56).or(s.fromNumber(this.type).shiftLeft(48).or(this.instance))}},{key:"appendByteBuffer",value:function(t){return t.writeUint64(this.toLong())}},{key:"toString",value:function(){return this.space+"."+this.type+"."+this.instance.toString()}}],[{key:"fromString",value:function(e){if(void 0!==e.space&&void 0!==e.type&&void 0!==e.instance)return e;var r=u.require_match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/,u.required(e,"ObjectId"),"ObjectId");return new t(parseInt(r[1]),parseInt(r[2]),s.fromString(r[3]))}},{key:"fromLong",value:function(e){var r=e.shiftRight(56).toInt(),n=255&e.shiftRight(48).toInt(),i=e.and(a);return new t(r,n,i)}},{key:"fromByteBuffer",value:function(e){return t.fromLong(e.readUint64())}}]),t}();t.exports=f},function(t,e,r){(function(e){"use strict";var n,i=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(a){i=!0,o=a}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=r(63),s=r(37),u=r(101),a=r(102),f=r(24),c=r(109),h=r(26),l=h.ChainConfig,p=250;t.exports=n={aes_checksum:function(t){if("string"!=typeof t)throw new"password string required";for(var e=c.randomBuffer(4).toString("hex"),r=0,n=e+t,i=Date.now();Date.now()-i<p;)n=f.sha256(n),r+=1;var o=f.sha256(n),s=[r,e.toString("hex"),o.slice(0,4).toString("hex")].join(",");return{aes_private:a.fromSeed(n),checksum:s}},aes_private:function(t,e){for(var r=e.split(","),n=i(r,3),o=n[0],s=n[1],u=n[2],c=s+t,h=0;0<o?h<o:h>o;0<o?h++:h++)c=f.sha256(c);var l=f.sha256(c);if(l.slice(0,4).toString("hex")!==u)throw new Error("wrong password");return a.fromSeed(c)},random32ByteBuffer:function(){var t=arguments.length<=0||void 0===arguments[0]?this.browserEntropy():arguments[0];if("string"!=typeof t)throw new Error("string required for entropy");
if(t.length<32)throw new Error("expecting at least 32 bytes of entropy");for(var r=Date.now();Date.now()-r<p;)t=f.sha256(t);var n=[];return n.push(t),n.push(c.randomBuffer(32)),f.sha256(e.concat(n))},suggest_brain_key:function(){var t=arguments.length<=0||void 0===arguments[0]?",":arguments[0],e=arguments.length<=1||void 0===arguments[1]?this.browserEntropy():arguments[1],r=this.random32ByteBuffer(e),n=16,i=t.split(",");if(49744!==i.length)throw new Error("expecting 49744 but got "+i.length+" dictionary words");for(var o=[],s=2*n,u=0;u<s;u+=2){var a=(r[u]<<8)+r[u+1],f=a/Math.pow(2,16),c=Math.round(i.length*f);o.push(i[c])}return this.normalize_brainKey(o.join(" "))},get_random_key:function(t){return o.fromBuffer(this.random32ByteBuffer(t))},get_brainPrivateKey:function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1];if(e<0)throw new Error("invalid sequence");return t=n.normalize_brainKey(t),o.fromBuffer(f.sha256(f.sha512(t+" "+e)))},normalize_brainKey:function(t){if("string"!=typeof t)throw new Error("string required for brainKey");return t=t.trim(),t.split(/[\t\n\v\f\r ]+/).join(" ")},browserEntropy:function(){var t="";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;n<navigator.mimeTypes.length;n++)r=navigator.mimeTypes[n],t+=r.description+" "+r.type+" "+r.suffixes+" ";console.log("INFO\tbrowserEntropy gathered")}catch(i){t=f.sha256((new Date).toString())}var o=new e(t);return t+=o.toString("binary")+" "+(new Date).toString()},addresses:function(t){var e=arguments.length<=1||void 0===arguments[1]?l.address_prefix:arguments[1],r=s.fromPublicKeyString(t,e),n=[u.fromPublic(r,!1,0).toString(e),u.fromPublic(r,!0,0).toString(e),u.fromPublic(r,!1,56).toString(e),u.fromPublic(r,!0,56).toString(e),r.toAddressString(e)];return n}}}).call(e,r(3).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(9),s=r(26),u=s.ChainConfig,a=r(24),f=r(51),c=f.encode,h=f.decode,l=r(62),p=function(){function t(e){n(this,t),this.addy=e}return i(t,[{key:"toBuffer",value:function(){return this.addy}},{key:"toString",value:function(){var t=arguments.length<=0||void 0===arguments[0]?u.address_prefix:arguments[0],r=a.ripemd160(this.addy),n=e.concat([this.addy,r.slice(0,4)]);return t+c(n)}}],[{key:"fromBuffer",value:function(e){var r=a.sha512(e),n=a.ripemd160(r);return new t(n)}},{key:"fromString",value:function(r){var n=arguments.length<=1||void 0===arguments[1]?u.address_prefix:arguments[1],i=r.slice(0,n.length);o.equal(n,i,"Expecting key to begin with "+n+", instead got "+i);var s=r.slice(n.length);s=new e(h(s),"binary");var f=s.slice(-4);s=s.slice(0,-4);var c=a.ripemd160(s);c=c.slice(0,4);var p=l(f,c);if(!p)throw new Error("Checksum did not match");return new t(s)}},{key:"fromPublic",value:function(r){var n=arguments.length<=1||void 0===arguments[1]||arguments[1],i=arguments.length<=2||void 0===arguments[2]?56:arguments[2],o=a.sha256(r.toBuffer(n)),s=a.ripemd160(o),u=new e(1);u.writeUInt8(255&i,0);var f=e.concat([u,s]),c=a.sha256(f);c=a.sha256(c);var h=e.concat([f,c.slice(0,4)]);return new t(a.ripemd160(h))}}]),t}();t.exports=p}).call(e,r(3).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(241),s=r(243),u=r(93),a=r(9),f=r(27),c=(f.Long,r(24)),h=function(){function t(e,r){n(this,t),this.iv=e,this.key=r}return i(t,[{key:"clear",value:function(){return this.iv=this.key=void 0}},{key:"_decrypt_word_array",value:function(t){return o.decrypt({ciphertext:t,salt:null},this.key,{iv:this.iv})}},{key:"_encrypt_word_array",value:function(t){var e=o.encrypt(t,this.key,{iv:this.iv});return u.parse(e.toString())}},{key:"decrypt",value:function(t){if("string"==typeof t&&(t=new e(t,"binary")),!e.isBuffer(t))throw new Error("buffer required");a(t,"Missing cipher text");var r=this.decryptHex(t.toString("hex"));return new e(r,"hex")}},{key:"encrypt",value:function(t){if("string"==typeof t&&(t=new e(t,"binary")),!e.isBuffer(t))throw new Error("buffer required");var r=this.encryptHex(t.toString("hex"));return new e(r,"hex")}},{key:"encryptToHex",value:function(t){if("string"==typeof t&&(t=new e(t,"binary")),!e.isBuffer(t))throw new Error("buffer required");return this.encryptHex(t.toString("hex"))}},{key:"decryptHex",value:function(t){a(t,"Missing cipher text");var e=s.parse(t),r=this._decrypt_word_array(e);return s.stringify(r)}},{key:"decryptHexToBuffer",value:function(t){a(t,"Missing cipher text");var r=s.parse(t),n=this._decrypt_word_array(r),i=s.stringify(n);return new e(i,"hex")}},{key:"decryptHexToText",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?"binary":arguments[1];return this.decryptHexToBuffer(t).toString(e)}},{key:"encryptHex",value:function(t){var e=s.parse(t),r=this._encrypt_word_array(e);return s.stringify(r)}}],[{key:"fromSeed",value:function(e){if(void 0===e)throw new Error("seed is required");var r=c.sha512(e);return r=r.toString("hex"),t.fromSha512(r)}},{key:"fromSha512",value:function(e){a.equal(e.length,128,"A Sha512 in HEX should be 128 characters long, instead got "+e.length);var r=s.parse(e.substring(64,96)),n=s.parse(e.substring(0,64));return new t(r,n)}},{key:"fromBuffer",value:function(r){return a(e.isBuffer(r),"Expecting Buffer"),a.equal(r.length,64,"A Sha512 Buffer should be 64 characters long, instead got "+r.length),t.fromSha512(r.toString("hex"))}},{key:"decrypt_with_checksum",value:function(r,n,i,o){var s=!(arguments.length<=4||void 0===arguments[4])&&arguments[4];null==i&&(i=""),e.isBuffer(o)||(o=new e(o,"hex"));var u=r.get_shared_secret(n,s),a=t.fromSeed(e.concat([new e(""+i),new e(u.toString("hex"))])),f=a.decrypt(o);if(!(f.length>=4))throw new Error("Invalid key, could not decrypt message(1)");var h=f.slice(0,4),l=f.slice(4),p=c.sha256(l);if(p=p.slice(0,4),p=p.toString("hex"),h.toString("hex")!==p)throw new Error("Invalid key, could not decrypt message(2)");return l}},{key:"encrypt_with_checksum",value:function(r,n,i,o){null==i&&(i=""),e.isBuffer(o)||(o=new e(o,"binary"));var s=r.get_shared_secret(n),u=t.fromSeed(e.concat([new e(""+i),new e(s.toString("hex"))])),a=c.sha256(o).slice(0,4),f=e.concat([a,o]);return u.encrypt(f)}}]),t}();t.exports=h}).call(e,r(3).Buffer)},function(t,e,r){(function(e){"use strict";function r(t){var e=t.toString().match(/function (.*?)\(/);return e?e[1]:null}t.exports=function(t,n){switch(t){case"Array":if(Array.isArray(n))return;break;case"Boolean":if("boolean"==typeof n)return;break;case"Buffer":if(e.isBuffer(n))return;break;case"Number":if("number"==typeof n)return;break;case"String":if("string"==typeof n)return;break;default:if(r(n.constructor)===r(t))return}throw new TypeError("Expected "+(r(t)||t)+", got "+n)}}).call(e,r(3).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(37),s=function(){function t(){n(this,t)}return i(t,null,[{key:"fixed_data",value:function(t,r,n){if(t){if(!n){var i=t.copy(t.offset,t.offset+r);return t.skip(r),new e(i.toBinary(),"binary")}var o=n.slice(0,r).toString("binary");for(t.append(o,"binary");r-- >o.length;)t.writeUint8(0)}}},{key:"public_key",value:function(e,r){if(e){if(r){var n=r.toBuffer();return void e.append(n.toString("binary"),"binary")}return n=t.fixed_data(e,33),o.fromBuffer(n)}}},{key:"ripemd160",value:function(e,r){if(e)return r?void t.fixed_data(e,20,r):t.fixed_data(e,20)}},{key:"time_point_sec",value:function(t,e){return e?(e=Math.ceil(e/1e3),void t.writeInt32(e)):(e=t.readInt32(),new Date(1e3*e))}}]),t}();t.exports=s}).call(e,r(3).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(27),s=r(277),u={NODE_ENV:"production"}.npm_config__graphene_serializer_hex_dump,a=function(){function t(e,r){n(this,t),this.operation_name=e,this.types=r,this.types&&(this.keys=Object.keys(this.types)),t.printDebug=!0}return i(t,[{key:"fromByteBuffer",value:function(e){var r={},n=null;try{for(var n,i=this.keys,o=0;o<i.length;o++){n=i[o];var a=this.types[n];try{if(u)if(a.operation_name)console.error(a.operation_name);else{var f=e.offset;a.fromByteBuffer(e);var c=e.offset;e.offset=f;var h=e.copy(f,c);console.error(this.operation_name+"."+n+"\t",h.toHex())}r[n]=a.fromByteBuffer(e)}catch(l){throw t.printDebug&&(console.error("Error reading "+this.operation_name+"."+n+" in data:"),e.printDebug()),l}}}catch(p){s["throw"](this.operation_name+"."+n,p)}return r}},{key:"appendByteBuffer",value:function(t,e){var r=null;try{for(var r,n=this.keys,i=0;i<n.length;i++){r=n[i];var o=this.types[r];o.appendByteBuffer(t,e[r])}}catch(u){try{s["throw"](this.operation_name+"."+r+" = "+JSON.stringify(e[r]),u)}catch(a){s["throw"](this.operation_name+"."+r+" = "+e[r],u)}}}},{key:"fromObject",value:function(t){var e={},r=null;try{for(var r,n=this.keys,i=0;i<n.length;i++){r=n[i];var o=this.types[r],u=t[r],a=o.fromObject(u);e[r]=a}}catch(f){s["throw"](this.operation_name+"."+r,f)}return e}},{key:"toObject",value:function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=arguments.length<=1||void 0===arguments[1]?{use_default:!1,annotate:!1}:arguments[1],r={},n=null;try{if(!this.types)return r;for(var n,i=this.keys,a=0;a<i.length;a++){n=i[a];var f=this.types[n],c=f.toObject("undefined"!=typeof t&&null!==t?t[n]:void 0,e);if(r[n]=c,u){var h=new o(o.DEFAULT_CAPACITY,o.LITTLE_ENDIAN);f.appendByteBuffer(h,"undefined"!=typeof t&&null!==t?t[n]:void 0),h=h.copy(0,h.offset),console.error(this.operation_name+"."+n,h.toHex())}}}catch(l){s["throw"](this.operation_name+"."+n,l)}return r}},{key:"compare",value:function(t,r){var n=this.keys[0],i=this.types[n],o=t[n],s=r[n];if(i.compare)return i.compare(o,s);if("number"==typeof o&&"number"==typeof s)return o-s;var u=void 0;e.isBuffer(o)&&e.isBuffer(s)&&(u="hex");var a=o.toString(u),f=s.toString(u);return a>f?1:a<f?-1:0}},{key:"fromHex",value:function(t){var e=o.fromHex(t,o.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"fromBuffer",value:function(t){var e=o.fromBinary(t.toString("binary"),o.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"toHex",value:function(t){var e=this.toByteBuffer(t);return e.toHex()}},{key:"toByteBuffer",value:function(t){var e=new o(o.DEFAULT_CAPACITY,o.LITTLE_ENDIAN);return this.appendByteBuffer(e,t),e.copy(0,e.offset)}},{key:"toBuffer",value:function(t){return new e(this.toByteBuffer(t).toBinary(),"binary")}}]),t}();t.exports=a}).call(e,r(3).Buffer)},function(t,e,r){(function(e){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(a){i=!0,o=a}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);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?"symbol":typeof t},o=r(65),s=r(104),u=r(36),a=r(99),f=r(49),c=f.PublicKey,h=f.Address,l=r(26),p=l.ChainConfig,d={};t.exports=d;var v={NODE_ENV:"production"}.npm_config__graphene_serializer_hex_dump;d.uint8={fromByteBuffer:function(t){return t.readUint8()},appendByteBuffer:function(t,e){o.require_range(0,255,e,"uint8 "+e),t.writeUint8(e)},fromObject:function(t){return o.require_range(0,255,t,"uint8 "+t),t},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?0:(o.require_range(0,255,t,"uint8 "+t),parseInt(t))}},d.uint16={fromByteBuffer:function(t){return t.readUint16()},appendByteBuffer:function(t,e){o.require_range(0,65535,e,"uint16 "+e),t.writeUint16(e)},fromObject:function(t){return o.require_range(0,65535,t,"uint16 "+t),t},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?0:(o.require_range(0,65535,t,"uint16 "+t),parseInt(t))}},d.uint32={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){o.require_range(0,4294967295,e,"uint32 "+e),t.writeUint32(e)},fromObject:function(t){return o.require_range(0,4294967295,t,"uint32 "+t),t},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?0:(o.require_range(0,4294967295,t,"uint32 "+t),parseInt(t))}};var _=-1*Math.pow(2,31),y=Math.pow(2,31)-1;d.varint32={fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(t,e){o.require_range(_,y,e,"uint32 "+e),t.writeVarint32(e)},fromObject:function(t){return o.require_range(_,y,t,"uint32 "+t),t},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?0:(o.require_range(_,y,t,"uint32 "+t),parseInt(t))}},d.int64={fromByteBuffer:function(t){return t.readInt64()},appendByteBuffer:function(t,e){o.required(e),t.writeInt64(o.to_long(e))},fromObject:function(t){return o.required(t),o.to_long(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?"0":(o.required(t),o.to_long(t).toString())}},d.uint64={fromByteBuffer:function(t){return t.readUint64()},appendByteBuffer:function(t,e){t.writeUint64(o.to_long(o.unsigned(e)))},fromObject:function(t){return o.to_long(o.unsigned(t))},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?"0":o.to_long(t).toString()}},d.string={fromByteBuffer:function(t){var r,n=t.readVarint32();return r=t.copy(t.offset,t.offset+n),t.skip(n),new e(r.toBinary(),"binary")},appendByteBuffer:function(t,e){o.required(e),t.writeVarint32(e.length),t.append(e.toString("binary"),"binary")},fromObject:function(t){return o.required(t),new e(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?"":t.toString()}},d.bytes=function(t){return{fromByteBuffer:function(r){if(void 0===t){var n,i=r.readVarint32();return n=r.copy(r.offset,r.offset+i),r.skip(i),new e(n.toBinary(),"binary")}return n=r.copy(r.offset,r.offset+t),r.skip(t),new e(n.toBinary(),"binary")},appendByteBuffer:function(r,n){o.required(n),"string"==typeof n&&(n=new e(n,"hex")),void 0===t&&r.writeVarint32(n.length),r.append(n.toString("binary"),"binary")},fromObject:function(t){return o.required(t),e.isBuffer(t)?t:new e(t,"hex")},toObject:function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(r.use_default&&void 0===e){var n=function(t){return new Array(t).join("00")};return n(t)}return o.required(e),e.toString("hex")}}},d.bool={fromByteBuffer:function(t){return 1===t.readUint8()},appendByteBuffer:function(t,e){t.writeUint8(JSON.parse(e)?1:0)},fromObject:function(t){return!!JSON.parse(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return(!e.use_default||void 0!==t)&&!!JSON.parse(t)}},d["void"]={fromByteBuffer:function(t){throw new Error("(void) undefined type")},appendByteBuffer:function(t,e){throw new Error("(void) undefined type")},fromObject:function(t){throw new Error("(void) undefined type")},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(!e.use_default||void 0!==t)throw new Error("(void) undefined type")}},d.array=function(t){return{fromByteBuffer:function(e){var r=e.readVarint32();v&&console.log("varint32 size = "+r.toString(16));for(var n=[],i=0;0<r?i<r:i>r;0<r?i++:i++)n.push(t.fromByteBuffer(e));return w(n,t)},appendByteBuffer:function(e,r){o.required(r),r=w(r,t),e.writeVarint32(r.length);for(var n,i=0;i<r.length;i++)n=r[i],t.appendByteBuffer(e,n)},fromObject:function(e){o.required(e),e=w(e,t);for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n},toObject:function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(r.use_default&&void 0===e)return[t.toObject(e,r)];o.required(e),e=w(e,t);for(var n,i=[],s=0;s<e.length;s++)n=e[s],i.push(t.toObject(n,r));return i}}},d.time_point_sec={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){"number"!=typeof e&&(e=d.time_point_sec.fromObject(e)),t.writeUint32(e)},fromObject:function(t){if(o.required(t),"number"==typeof t)return t;if(t.getTime)return Math.floor(t.getTime()/1e3);if("string"!=typeof t)throw new Error("Unknown date type: "+t);return Math.floor(new Date(t).getTime()/1e3)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(e.use_default&&void 0===t)return new Date(0).toISOString().split(".")[0];if(o.required(t),"string"==typeof t)return t;if(t.getTime)return t.toISOString().split(".")[0];var r=parseInt(t);return o.require_range(0,4294967295,r,"uint32 "+t),new Date(1e3*r).toISOString().split(".")[0]}},d.set=function(t){return{validate:function(e){for(var r,n={},o=0;o<e.length;o++){r=e[o];var s;if(s="undefined"==typeof r?"undefined":i(r),["string","number"].indexOf(s)>=0){if(void 0!==n[r])throw new Error("duplicate (set)");n[r]=!0}}return w(e,t)},fromByteBuffer:function(e){var r=e.readVarint32();return v&&console.log("varint32 size = "+r.toString(16)),this.validate(function(){for(var n=[],i=0;0<r?i<r:i>r;0<r?i++:i++)n.push(t.fromByteBuffer(e));return n}())},appendByteBuffer:function(e,r){r||(r=[]),e.writeVarint32(r.length);for(var n,i=this.validate(r),o=0;o<i.length;o++)n=i[o],t.appendByteBuffer(e,n)},fromObject:function(e){return e||(e=[]),this.validate(function(){for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n}())},toObject:function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return r.use_default&&void 0===e?[t.toObject(e,r)]:(e||(e=[]),this.validate(function(){for(var n,i=[],o=0;o<e.length;o++)n=e[o],i.push(t.toObject(n,r));return i}()))}}},d.fixed_array=function(t,e){return{fromByteBuffer:function(r){var n,i,o,s;for(s=[],n=i=0,o=t;i<o;n=i+=1)s.push(e.fromByteBuffer(r));return w(s,e)},appendByteBuffer:function(r,n){var i,s,u;for(0!==t&&(o.required(n),n=w(n,e)),i=s=0,u=t;s<u;i=s+=1)e.appendByteBuffer(r,n[i])},fromObject:function(r){var n,i,s,u;for(0!==t&&o.required(r),u=[],n=i=0,s=t;i<s;n=i+=1)u.push(e.fromObject(r[n]));return u},toObject:function(r,n){var i,s,u,a,f,c,h;if(null==n&&(n={}),n.use_default&&void 0===r){for(c=[],i=s=0,a=t;s<a;i=s+=1)c.push(e.toObject(void 0,n));return c}for(0!==t&&o.required(r),h=[],i=u=0,f=t;u<f;i=u+=1)h.push(e.toObject(r[i],n));return h}}};var g=function(t,e){return o.required(t,"reserved_spaces"),o.required(e,"object_type"),{fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(r,n){o.required(n),void 0!==n.resolve&&(n=n.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(n)&&(n=o.get_instance(t,e,n)),r.writeVarint32(o.to_number(n))},fromObject:function(r){return o.required(r),void 0!==r.resolve&&(r=r.resolve),o.is_digits(r)?o.to_number(r):o.get_instance(t,e,r)},toObject:function(r){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=u.object_type[e];return n.use_default&&void 0===r?t+"."+i+".0":(o.required(r),void 0!==r.resolve&&(r=r.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(r)&&(r=o.get_instance(t,e,r)),t+"."+i+"."+r)}}};d.protocol_id_type=function(t){return o.required(t,"name"),g(u.reserved_spaces.protocol_ids,t)},d.object_id_type={fromByteBuffer:function(t){return a.fromByteBuffer(t)},appendByteBuffer:function(t,e){o.required(e),void 0!==e.resolve&&(e=e.resolve),e=a.fromString(e),e.appendByteBuffer(t)},fromObject:function(t){return o.required(t),void 0!==t.resolve&&(t=t.resolve),a.fromString(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?"0.0.0":(o.required(t),void 0!==t.resolve&&(t=t.resolve),t=a.fromString(t),t.toString())}},d.vote_id={TYPE:255,ID:4294967040,fromByteBuffer:function(t){var e=t.readUint32();return{type:e&this.TYPE,id:e&this.ID}},appendByteBuffer:function(t,e){o.required(e),"string"===e&&(e=d.vote_id.fromObject(e));var r=e.id<<8|e.type;t.writeUint32(r)},fromObject:function(t){if(o.required(t,"(type vote_id)"),"object"===("undefined"==typeof t?"undefined":i(t)))return o.required(t.type,"type"),o.required(t.id,"id"),t;o.require_test(/^[0-9]+:[0-9]+$/,t,"vote_id format "+t);var e=t.split(":"),r=n(e,2),s=r[0],u=r[1];return o.require_range(0,255,s,"vote type "+t),o.require_range(0,16777215,u,"vote id "+t),{type:s,id:u}},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?"0:0":(o.required(t),"string"==typeof t&&(t=d.vote_id.fromObject(t)),t.type+":"+t.id)},compare:function(t,e){return"object"!==("undefined"==typeof t?"undefined":i(t))&&(t=d.vote_id.fromObject(t)),"object"!==("undefined"==typeof e?"undefined":i(e))&&(e=d.vote_id.fromObject(e)),parseInt(t.id)-parseInt(e.id)}},d.optional=function(t){return o.required(t,"st_operation"),{fromByteBuffer:function(e){if(1===e.readUint8())return t.fromByteBuffer(e)},appendByteBuffer:function(e,r){null!==r&&void 0!==r?(e.writeUint8(1),t.appendByteBuffer(e,r)):e.writeUint8(0)},fromObject:function(e){if(void 0!==e)return t.fromObject(e)},toObject:function(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=function(){return r.use_default||void 0!==e?t.toObject(e,r):void 0}();return r.annotate&&("object"===("undefined"==typeof n?"undefined":i(n))?n.__optional="parent is optional":n={__optional:n}),n}}},d.static_variant=function(t){return{nosort:!0,st_operations:t,fromByteBuffer:function(t){var e=t.readVarint32(),r=this.st_operations[e];return v&&console.error("static_variant id 0x"+e.toString(16)+" ("+e+")"),o.required(r,"operation "+e),[e,r.fromByteBuffer(t)]},appendByteBuffer:function(t,e){o.required(e);var r=e[0],n=this.st_operations[r];o.required(n,"operation "+r),t.writeVarint32(r),n.appendByteBuffer(t,e[1])},fromObject:function(t){o.required(t);var e=t[0],r=this.st_operations[e];return o.required(r,"operation "+e),[e,r.fromObject(t[1])]},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(e.use_default&&void 0===t)return[0,this.st_operations[0].toObject(void 0,e)];o.required(t);var r=t[0],n=this.st_operations[r];return o.required(n,"operation "+r),[r,n.toObject(t[1],e)]}}},d.map=function(t,e){return{validate:function(e){if(!Array.isArray(e))throw new Error("expecting array");for(var r,n={},o=0;o<e.length;o++){r=e[o];var s;if(2!==r.length)throw new Error("expecting two elements");if(s=i(r[0]),["number","string"].indexOf(s)>=0){if(void 0!==n[r[0]])throw new Error("duplicate (map)");n[r[0]]=!0}}return w(e,t)},fromByteBuffer:function(r){for(var n=[],i=r.readVarint32(),o=0;0<i?o<i:o>i;0<i?o++:o++)n.push([t.fromByteBuffer(r),e.fromByteBuffer(r)]);return this.validate(n)},appendByteBuffer:function(r,n){this.validate(n),r.writeVarint32(n.length);for(var i,o=0;o<n.length;o++)i=n[o],t.appendByteBuffer(r,i[0]),e.appendByteBuffer(r,i[1])},fromObject:function(r){o.required(r);for(var n,i=[],s=0;s<r.length;s++)n=r[s],i.push([t.fromObject(n[0]),e.fromObject(n[1])]);return this.validate(i)},toObject:function(r){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(n.use_default&&void 0===r)return[[t.toObject(void 0,n),e.toObject(void 0,n)]];o.required(r),r=this.validate(r);for(var i,s=[],u=0;u<r.length;u++)i=r[u],s.push([t.toObject(i[0],n),e.toObject(i[1],n)]);return s}}},d.public_key={toPublic:function(t){return void 0!==t.resolve&&(t=t.resolve),null==t?t:t.Q?t:c.fromStringOrThrow(t)},fromByteBuffer:function(t){return s.public_key(t)},appendByteBuffer:function(t,e){o.required(e),s.public_key(t,d.public_key.toPublic(e))},fromObject:function(t){return o.required(t),t.Q?t:d.public_key.toPublic(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?p.address_prefix+"859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM":(o.required(t),t.toString())},compare:function(t,e){return b(t.toAddressString(),e.toAddressString())}},d.address={_to_address:function(t){return o.required(t),t.addy?t:h.fromString(t)},fromByteBuffer:function(t){return new h(s.ripemd160(t))},appendByteBuffer:function(t,e){s.ripemd160(t,d.address._to_address(e).toBuffer())},fromObject:function(t){return d.address._to_address(t)},toObject:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.use_default&&void 0===t?p.address_prefix+"664KmHxSuQyDsfwo4WEJvWpzg1QKdg67S":d.address._to_address(t).toString()},compare:function(t,e){return b(t.toString(),e.toString())}};var b=function(t,e){return t>e?1:t<e?-1:0},m=function(t){return Array.isArray(t)?t[0]:t},w=function(t,r){return r.nosort?t:r.compare?t.sort(function(t,e){return r.compare(m(t),m(e))}):t.sort(function(t,r){return"number"==typeof m(t)&&"number"==typeof m(r)?m(t)-m(r):e.isBuffer(m(t))&&e.isBuffer(m(r))?b(m(t).toString("hex"),m(r).toString("hex")):b(m(t).toString(),m(r).toString())})}}).call(e,r(3).Buffer)},function(t,e,r){"use strict";var n,i={address_prefix:{NODE_ENV:"production"}.npm_config__graphene_ecc_default_address_prefix||"GPH"};t.exports=n={core_asset:"CORE",address_prefix:"GPH",expire_in_secs:15,expire_in_secs_proposal:86400,networks:{BitShares:{core_asset:"BTS",address_prefix:"BTS",chain_id:"4018d7844c78f6a6c41c6a552b898022310fc5dec06da467ee7905a8dad512c8"},Muse:{core_asset:"MUSE",address_prefix:"MUSE",chain_id:"45ad2d3f9ef92a49b55c2227eb06123f613bb35dd08bd876f2aea21925a67a67"},Test:{core_asset:"TEST",address_prefix:"TEST",chain_id:"39f5e2ede1f8bc1a3a54a7914414e3779e33193f1f5693510e73cb7a87617447"}},setChainId:function(t){var e,r,o,s,u;for(u=Object.keys(n.networks),e=0,r=u.length;e<r;e++)if(s=u[e],o=n.networks[s],o.chain_id===t)return n.network_name=s,o.address_prefix&&(n.address_prefix=o.address_prefix,i.address_prefix=o.address_prefix),{network_name:s,network:o};n.network_name||console.log("Unknown chain id (this may be a testnet)",t)},reset:function(){n.core_asset="CORE",n.address_prefix="GPH",i.address_prefix="GPH",n.expire_in_secs=15,n.expire_in_secs_proposal=86400,console.log("Chain config reset")},setPrefix:function(){var t=arguments.length<=0||void 0===arguments[0]?"GPH":arguments[0];n.address_prefix=t,i.address_prefix=t}}},function(t,e,r){var n,i,o;(function(t){/**
* @license long.js (c) 2013 Daniel Wirtz <[email protected]>
* Released under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/long.js for details
*/
!function(s,u){r(110).amd?(i=[],n=u,o="function"==typeof n?n.apply(e,i):n,!(void 0!==o&&(t.exports=o))):"object"==typeof t&&t&&t.exports?t.exports=u():(s.dcodeIO=s.dcodeIO||{}).Long=u()}(this,function(){"use strict";function t(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function e(t){return(t&&t.__isLong__)===!0}function r(t,e){var r,n,o;return e?(t>>>=0,(o=0<=t&&t<256)&&(n=a[t])?n:(r=i(t,(0|t)<0?-1:0,!0),o&&(a[t]=r),r)):(t|=0,(o=-128<=t&&t<128)&&(n=u[t])?n:(r=i(t,t<0?-1:0,!1),o&&(u[t]=r),r))}function n(t,e){if(isNaN(t)||!isFinite(t))return e?_:v;if(e){if(t<0)return _;if(t>=l)return w}else{if(t<=-p)return E;if(t+1>=p)return m}return t<0?n(-t,e).neg():i(t%h|0,t/h|0,e)}function i(e,r,n){return new t(e,r,n)}function o(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return v;if("number"==typeof e?(r=e,e=!1):e=!!e,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return o(t.substring(1),e,r).neg();for(var s=n(f(r,8)),u=v,a=0;a<t.length;a+=8){var c=Math.min(8,t.length-a),h=parseInt(t.substring(a,a+c),r);if(c<8){var l=n(f(r,c));u=u.mul(l).add(n(h))}else u=u.mul(s),u=u.add(n(h))}return u.unsigned=e,u}function s(e){return e instanceof t?e:"number"==typeof e?n(e):"string"==typeof e?o(e):i(e.low,e.high,e.unsigned)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var u={},a={};t.fromInt=r,t.fromNumber=n,t.fromBits=i;var f=Math.pow;t.fromString=o,t.fromValue=s;var c=1<<24,h=4294967296,l=0x10000000000000000,p=l/2,d=r(c),v=r(0);t.ZERO=v;var _=r(0,!0);t.UZERO=_;var y=r(1);t.ONE=y;var g=r(1,!0);t.UONE=g;var b=r(-1);t.NEG_ONE=b;var m=i(-1,2147483647,!1);t.MAX_VALUE=m;var w=i(-1,-1,!0);t.MAX_UNSIGNED_VALUE=w;var E=i(0,-2147483648,!1);t.MIN_VALUE=E;var S=t.prototype;return S.toInt=function(){return this.unsigned?this.low>>>0:this.low},S.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},S.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(E)){var e=n(t),r=this.div(e),i=r.mul(e).sub(this);return r.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=n(f(t,6),this.unsigned),s=this,u="";;){var a=s.div(o),c=s.sub(a.mul(o)).toInt()>>>0,h=c.toString(t);if(s=a,s.isZero())return h+u;for(;h.length<6;)h="0"+h;u=""+h+u}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<<e);e--);return 0!=this.high?e+33:e+1},S.isZero=function(){return 0===this.high&&0===this.low},S.isNegative=function(){return!this.unsigned&&this.high<0},S.isPositive=function(){return this.unsigned||this.high>=0},S.isOdd=function(){return 1===(1&this.low)},S.isEven=function(){return 0===(1&this.low)},S.equals=function(t){return e(t)||(t=s(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},S.eq=S.equals,S.notEquals=function(t){return!this.eq(t)},S.neq=S.notEquals,S.lessThan=function(t){return this.comp(t)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(t){return this.comp(t)<=0},S.lte=S.lessThanOrEqual,S.greaterThan=function(t){return this.comp(t)>0},S.gt=S.greaterThan,S.greaterThanOrEqual=function(t){return this.comp(t)>=0},S.gte=S.greaterThanOrEqual,S.compare=function(t){if(e(t)||(t=s(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},S.comp=S.compare,S.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(y)},S.neg=S.negate,S.add=function(t){e(t)||(t=s(t));var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,u=65535&this.low,a=t.high>>>16,f=65535&t.high,c=t.low>>>16,h=65535&t.low,l=0,p=0,d=0,v=0;return v+=u+h,d+=v>>>16,v&=65535,d+=o+c,p+=d>>>16,d&=65535,p+=n+f,l+=p>>>16,p&=65535,l+=r+a,l&=65535,i(d<<16|v,l<<16|p,this.unsigned)},S.subtract=function(t){return e(t)||(t=s(t)),this.add(t.neg())},S.sub=S.subtract,S.multiply=function(t){if(this.isZero())return v;if(e(t)||(t=s(t)),t.isZero())return v;if(this.eq(E))return t.isOdd()?E:v;if(t.eq(E))return this.isOdd()?E:v;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(d)&&t.lt(d))return n(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,o=65535&this.high,u=this.low>>>16,a=65535&this.low,f=t.high>>>16,c=65535&t.high,h=t.low>>>16,l=65535&t.low,p=0,_=0,y=0,g=0;return g+=a*l,y+=g>>>16,g&=65535,y+=u*l,_+=y>>>16,y&=65535,y+=a*h,_+=y>>>16,y&=65535,_+=o*l,p+=_>>>16,_&=65535,_+=u*h,p+=_>>>16,_&=65535,_+=a*c,p+=_>>>16,_&=65535,p+=r*l+o*h+u*c+a*f,p&=65535,i(y<<16|g,p<<16|_,this.unsigned)},S.mul=S.multiply,S.divide=function(t){if(e(t)||(t=s(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?_:v;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return _;if(t.gt(this.shru(1)))return g;o=_}else{if(this.eq(E)){if(t.eq(y)||t.eq(b))return E;if(t.eq(E))return y;var u=this.shr(1);return r=u.div(t).shl(1),r.eq(v)?t.isNegative()?y:b:(i=this.sub(t.mul(r)),o=r.add(i.div(t)))}if(t.eq(E))return this.unsigned?_:v;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=v}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),c=a<=48?1:f(2,a-48),h=n(r),l=h.mul(t);l.isNegative()||l.gt(i);)r-=c,h=n(r,this.unsigned),l=h.mul(t);h.isZero()&&(h=y),o=o.add(h),i=i.sub(l)}return o},S.div=S.divide,S.modulo=function(t){return e(t)||(t=s(t)),this.sub(this.div(t).mul(t))},S.mod=S.modulo,S.not=function(){return i(~this.low,~this.high,this.unsigned)},S.and=function(t){return e(t)||(t=s(t)),i(this.low&t.low,this.high&t.high,this.unsigned)},S.or=function(t){return e(t)||(t=s(t)),i(this.low|t.low,this.high|t.high,this.unsigned)},S.xor=function(t){return e(t)||(t=s(t)),i(this.low^t.low,this.high^t.high,this.unsigned)},S.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?i(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):i(0,this.low<<t-32,this.unsigned)},S.shl=S.shiftLeft,S.shiftRight=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?i(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):i(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},S.shr=S.shiftRight,S.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),t&=63,0===t)return this;var r=this.high;if(t<32){var n=this.low;return i(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?i(r,0,this.unsigned):i(r>>>t-32,0,this.unsigned)},S.shru=S.shiftRightUnsigned,S.toSigned=function(){return this.unsigned?i(this.low,this.high,!1):this},S.toUnsigned=function(){return this.unsigned?this:i(this.low,this.high,!0)},S.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},S.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},S.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t})}).call(e,r(111)(t))},function(t,e,r){var n,i;(function(o,s){!function(u){"use strict";function a(t,e){if(e=e||{type:"Array"},"undefined"!=typeof o&&"number"==typeof o.pid)return f(t,e);var r=window.crypto||window.msCrypto;if(!r)throw new Error("Your browser does not support window.crypto.");return c(t,e)}function f(t,e){var n=r(299),i=n.randomBytes(t);switch(e.type){case"Array":return[].slice.call(i);case"Buffer":return i;case"Uint8Array":for(var o=new Uint8Array(t),s=0;s<t;++s)o[s]=i.readUInt8(s);return o;default:throw new Error(e.type+" is unsupported.")}}function c(t,e){var r=new Uint8Array(t),n=window.crypto||window.msCrypto;switch(n.getRandomValues(r),e.type){case"Array":return[].slice.call(r);case"Buffer":try{new s(1)}catch(i){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new s(r);case"Uint8Array":return r;default:throw new Error(e.type+" is unsupported.")}}n=[],i=function(){return a}.apply(e,n),!(void 0!==i&&(t.exports=i)),a.randomArray=function(t){return a(t,{type:"Array"})},a.randomUint8Array=function(t){return a(t,{type:"Uint8Array"})},a.randomBuffer=function(t){return a(t,{type:"Buffer"})}}(this)}).call(e,r(66),r(3).Buffer)},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,r){var n,i,o;!function(r,s){i=[],n=s,o="function"==typeof n?n.apply(e,i):n,!(void 0!==o&&(t.exports=o))}(this,function(){function t(e,r,n){function i(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,!1,!1,e),r}var o={debug:!1,automaticOpen:!0,reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,timeoutInterval:2e3,maxReconnectAttempts:null,binaryType:"blob"};n||(n={});for(var s in o)"undefined"!=typeof n[s]?this[s]=n[s]:this[s]=o[s];this.url=e,this.reconnectAttempts=0,this.readyState=WebSocket.CONNECTING,this.protocol=null;var u,a=this,f=!1,c=!1,h=null,l=document.createElement("div");l.addEventListener("open",function(t){a.onopen(t)}),l.addEventListener("close",function(t){a.onclose(t)}),l.addEventListener("connecting",function(t){a.onconnecting(t)}),l.addEventListener("message",function(t){a.onmessage(t)}),l.addEventListener("error",function(t){a.onerror(t)}),this.addEventListener=l.addEventListener.bind(l),this.removeEventListener=l.removeEventListener.bind(l),this.dispatchEvent=l.dispatchEvent.bind(l),this.open=function(e){if(u=new WebSocket(a.url,r||[]),u.binaryType=this.binaryType,e){if(this.maxReconnectAttempts&&this.reconnectAttempts>this.maxReconnectAttempts)return}else l.dispatchEvent(i("connecting")),this.reconnectAttempts=0;(a.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","attempt-connect",a.url);var n=u,o=setTimeout(function(){(a.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","connection-timeout",a.url),c=!0,n.close(),c=!1},a.timeoutInterval);u.onopen=function(r){clearTimeout(o),(a.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","onopen",a.url),a.protocol=u.protocol,a.readyState=WebSocket.OPEN,a.reconnectAttempts=0;var n=i("open");n.isReconnect=e,e=!1,l.dispatchEvent(n)},u.onclose=function(r){if(clearTimeout(o),u=null,f)a.readyState=WebSocket.CLOSED,l.dispatchEvent(i("close"));else{a.readyState=WebSocket.CONNECTING;var n=i("connecting");n.code=r.code,n.reason=r.reason,n.wasClean=r.wasClean,l.dispatchEvent(n),e||c||((a.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","onclose",a.url),l.dispatchEvent(i("close")));var o=a.reconnectInterval*Math.pow(a.reconnectDecay,a.reconnectAttempts);h=setTimeout(function(){a.reconnectAttempts++,a.open(!0)},o>a.maxReconnectInterval?a.maxReconnectInterval:o)}},u.onmessage=function(e){(a.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","onmessage",a.url,e.data);var r=i("message");r.data=e.data,l.dispatchEvent(r)},u.onerror=function(e){(a.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","onerror",a.url,e),l.dispatchEvent(i("error"))}},1==this.automaticOpen&&this.open(!1),this.send=function(e){if(u)return(a.debug||t.debugAll)&&console.debug("ReconnectingWebSocket","send",a.url,e),u.send(e);throw"INVALID_STATE_ERR : Pausing to reconnect websocket"},this.close=function(t,e){"undefined"==typeof t&&(t=1e3),f=!0,u&&u.close(t,e),h&&(clearTimeout(h),h=null)},this.refresh=function(){u&&u.close()}}if("undefined"!=typeof window&&"WebSocket"in window)return t.prototype.onopen=function(t){},t.prototype.onclose=function(t){},t.prototype.onconnecting=function(t){},t.prototype.onmessage=function(t){},t.prototype.onerror=function(t){},t.debugAll=!1,t.CONNECTING=WebSocket.CONNECTING,t.OPEN=WebSocket.OPEN,t.CLOSING=WebSocket.CLOSING,t.CLOSED=WebSocket.CLOSED,t})},function(t,e,r){(function(t){"use strict";if(r(234),r(289),t._babelPolyfill)throw new Error("only one instance of babel/polyfill is allowed");t._babelPolyfill=!0}).call(e,function(){return this}())},function(t,e,r){t.exports=r(113)},function(t,e,r){t.exports=r(114)},function(t,e){t.exports=function(t){function e(e){if(0===e.length)return"";for(var r=[0],n=0;n<e.length;++n){for(var o=0,s=e[n];o<r.length;++o)s+=r[o]<<8,r[o]=s%i,s=s/i|0;for(;s>0;)r.push(s%i),s=s/i|0}for(var u=0;0===e[u]&&u<e.length-1;++u)r.push(0);for(var a=0,f=r.length-1;a<=f;++a,--f){var c=t[r[a]];r[a]=t[r[f]],r[f]=c}return r.join("")}function r(t){if(0===t.length)return[];for(var e=[0],r=0;r<t.length;r++){var s=n[t[r]];if(void 0===s)throw new Error("Non-base"+i+" character");for(var u=0,a=s;u<e.length;++u)a+=e[u]*i,e[u]=255&a,a>>=8;for(;a>0;)e.push(255&a),a>>=8}for(var f=0;t[f]===o&&f<t.length-1;++f)e.push(0);return e.reverse()}for(var n={},i=t.length,o=t.charAt(0),s=0;s<t.length;s++)n[t.charAt(s)]=s;return{encode:e,decode:r}}},function(t,e){"use strict";function r(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)u[e]=t[e],a[t.charCodeAt(e)]=e;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63}function n(t){var e,r,n,i,o,s,u=t.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[u-2]?2:"="===t[u-1]?1:0,s=new f(3*u/4-o),n=o>0?u-4:u;var c=0;for(e=0,r=0;e<n;e+=4,r+=3)i=a[t.charCodeAt(e)]<<18|a[t.charCodeAt(e+1)]<<12|a[t.charCodeAt(e+2)]<<6|a[t.charCodeAt(e+3)],s[c++]=i>>16&255,s[c++]=i>>8&255,s[c++]=255&i;return 2===o?(i=a[t.charCodeAt(e)]<<2|a[t.charCodeAt(e+1)]>>4,s[c++]=255&i):1===o&&(i=a[t.charCodeAt(e)]<<10|a[t.charCodeAt(e+1)]<<4|a[t.charCodeAt(e+2)]>>2,s[c++]=i>>8&255,s[c++]=255&i),s}function i(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function o(t,e,r){for(var n,o=[],s=e;s<r;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],o.push(i(n));return o.join("")}function s(t){for(var e,r=t.length,n=r%3,i="",s=[],a=16383,f=0,c=r-n;f<c;f+=a)s.push(o(t,f,f+a>c?c:f+a));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),s.push(i),s.join("")}e.toByteArray=n,e.fromByteArray=s;var u=[],a=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array;r()},function(t,e,r){(function(t){var e=r(9),n=r(67);n.fromByteArrayUnsigned=function(t){return new n(128&t[0]?[0].concat(t):t)},n.prototype.toByteArrayUnsigned=function(){var t=this.toByteArray();return 0===t[0]?t.slice(1):t},n.fromDERInteger=function(t){return new n(t)},n.prototype.toDERInteger=n.prototype.toByteArray,n.fromBuffer=function(t){if(128&t[0]){var e=Array.prototype.slice.call(t);return new n([0].concat(e))}return new n(t)},n.fromHex=function(t){return""===t?n.ZERO:(e.equal(t,t.match(/^[A-Fa-f0-9]+/),"Invalid hex string"),e.equal(t.length%2,0,"Incomplete hex"),new n(t,16))},n.prototype.toBuffer=function(e){for(var r=this.toByteArrayUnsigned(),n=[],i=e-r.length;n.length<i;)n.push(0);return new t(n.concat(r))},n.prototype.toHex=function(t){return this.toBuffer(t).toString("hex")}}).call(e,r(3).Buffer)},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";var n=r(22),i=r(34),o=r(11);t.exports=[].copyWithin||function(t,e){var r=n(this),s=o(r.length),u=i(t,s),a=i(e,s),f=arguments,c=f.length>2?f[2]:void 0,h=Math.min((void 0===c?s:i(c,s))-a,s-u),l=1;for(a<u&&u<a+h&&(l=-1,a+=h-1,u+=h-1);h-- >0;)a in r?r[u]=r[a]:delete r[u],u+=l,a+=l;return r}},function(t,e,r){"use strict";var n=r(22),i=r(34),o=r(11);t.exports=[].fill||function(t){for(var e=n(this),r=o(e.length),s=arguments,u=s.length,a=i(u>1?s[1]:void 0,r),f=u>2?s[2]:void 0,c=void 0===f?r:i(f,r);c>a;)e[a++]=t;return e}},function(t,e,r){var n=r(4),i=r(53),o=r(6)("species");t.exports=function(t,e){var r;return i(t)&&(r=t.constructor,"function"!=typeof r||r!==Array&&!i(r.prototype)||(r=void 0),n(r)&&(r=r[o],null===r&&(r=void 0))),new(void 0===r?Array:r)(e)}},function(t,e,r){var n=r(2);t.exports=function(t){var e=n.getKeys(t),r=n.getSymbols;if(r)for(var i,o=r(t),s=n.isEnum,u=0;o.length>u;)s.call(t,i=o[u++])&&e.push(i);return e}},function(t,e,r){var n=r(2),i=r(15);t.exports=function(t,e){for(var r,o=i(t),s=n.getKeys(o),u=s.length,a=0;u>a;)if(o[r=s[a++]]===e)return r}},function(t,e,r){var n,i,o,s=r(7),u=r(89).set,a=s.MutationObserver||s.WebKitMutationObserver,f=s.process,c=s.Promise,h="process"==r(20)(f),l=function(){var t,e,r;for(h&&(t=f.domain)&&(f.domain=null,t.exit());n;)e=n.domain,r=n.fn,e&&e.enter(),r(),e&&e.exit(),n=n.next;i=void 0,t&&t.enter()};if(h)o=function(){f.nextTick(l)};else if(a){var p=1,d=document.createTextNode("");new a(l).observe(d,{characterData:!0}),o=function(){d.data=p=-p}}else o=c&&c.resolve?function(){c.resolve().then(l)}:function(){u.call(s,l)};t.exports=function(t){var e={fn:t,next:void 0,domain:h&&f.domain};i&&(i.next=e),n||(n=e,o()),i=e}},function(t,e,r){var n=r(2),i=r(22),o=r(43);t.exports=r(8)(function(){var t=Object.assign,e={},r={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(t){r[t]=t}),7!=t({},e)[n]||Object.keys(t({},r)).join("")!=i})?function(t,e){for(var r=i(t),s=arguments,u=s.length,a=1,f=n.getKeys,c=n.getSymbols,h=n.isEnum;u>a;)for(var l,p=o(s[a++]),d=c?f(p).concat(c(p)):f(p),v=d.length,_=0;v>_;)h.call(p,l=d[_++])&&(r[l]=p[l]);return r}:Object.assign},function(t,e,r){"use strict";var n=r(128),i=r(42),o=r(28);t.exports=function(){for(var t=o(this),e=arguments.length,r=Array(e),s=0,u=n._,a=!1;e>s;)(r[s]=arguments[s++])===u&&(a=!0);return function(){var n,o=this,s=arguments,f=s.length,c=0,h=0;if(!a&&!f)return i(t,r,o);if(n=r.slice(),a)for(;e>c;c++)n[c]===u&&(n[c]=s[h++]);for(;f>h;)n.push(s[h++]);return i(t,n,o)}}},function(t,e,r){t.exports=r(7)},function(t,e){t.exports=function(t,e){var r=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,r)}}},function(t,e,r){var n=r(5),i=r(28),o=r(6)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||void 0==(r=n(s)[o])?e:i(r)}},function(t,e,r){var n=r(4);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){"use strict";var n,i=r(2),o=r(1),s=r(12),u=r(25),a=r(75),f=r(72),c=r(10),h=r(20),l=r(42),p=r(8),d=r(5),v=r(28),_=r(4),y=r(22),g=r(15),b=r(35),m=r(34),w=r(11),E=r(43),S=r(30)("__proto__"),x=r(38),k=r(68)(!1),I=Object.prototype,B=Array.prototype,T=B.slice,A=B.join,O=i.setDesc,j=i.getDesc,D=i.setDescs,M={};s||(n=!p(function(){return 7!=O(f("div"),"a",{get:function(){return 7}}).a}),i.setDesc=function(t,e,r){if(n)try{return O(t,e,r)}catch(i){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(d(t)[e]=r.value),t},i.getDesc=function(t,e){if(n)try{return j(t,e)}catch(r){}if(c(t,e))return u(!I.propertyIsEnumerable.call(t,e),t[e])},i.setDescs=D=function(t,e){d(t);for(var r,n=i.getKeys(e),o=n.length,s=0;o>s;)i.setDesc(t,r=n[s++],e[r]);return t}),o(o.S+o.F*!s,"Object",{getOwnPropertyDescriptor:i.getDesc,defineProperty:i.setDesc,defineProperties:D});var R="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),z=R.concat("length","prototype"),L=R.length,q=function(){var t,e=f("iframe"),r=L,n=">";for(e.style.display="none",a.appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object</script"+n),t.close(),q=t.F;r--;)delete q.prototype[R[r]];return q()},U=function(t,e){return function(r){var n,i=g(r),o=0,s=[];for(n in i)n!=S&&c(i,n)&&s.push(n);for(;e>o;)c(i,n=t[o++])&&(~k(s,n)||s.push(n));return s}},P=function(){};o(o.S,"Object",{getPrototypeOf:i.getProto=i.getProto||function(t){return t=y(t),c(t,S)?t[S]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?I:null},getOwnPropertyNames:i.getNames=i.getNames||U(z,z.length,!0),create:i.create=i.create||function(t,e){var r;return null!==t?(P.prototype=d(t),r=new P,P.prototype=null,r[S]=t):r=q(),void 0===e?r:D(r,e)},keys:i.getKeys=i.getKeys||U(R,L,!1)});var N=function(t,e,r){if(!(e in M)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";M[e]=Function("F,a","return new F("+n.join(",")+")")}return M[e](t,r)};o(o.P,"Function",{bind:function(t){var e=v(this),r=T.call(arguments,1),n=function(){var i=r.concat(T.call(arguments));return this instanceof n?N(e,i.length,i):l(e,i,t)};return _(e.prototype)&&(n.prototype=e.prototype),n}}),o(o.P+o.F*p(function(){a&&T.call(a)}),"Array",{slice:function(t,e){var r=w(this.length),n=h(this);if(e=void 0===e?r:e,"Array"==n)return T.call(this,t,e);for(var i=m(t,r),o=m(e,r),s=w(o-i),u=Array(s),a=0;a<s;a++)u[a]="String"==n?this.charAt(i+a):this[i+a];return u}}),o(o.P+o.F*(E!=Object),"Array",{join:function(t){return A.call(E(this),void 0===t?",":t)}}),o(o.S,"Array",{isArray:r(53)});var C=function(t){return function(e,r){v(e);var n=E(this),i=w(n.length),o=t?i-1:0,s=t?-1:1;if(arguments.length<2)for(;;){if(o in n){r=n[o],o+=s;break}if(o+=s,t?o<0:i<=o)throw TypeError("Reduce of empty array with no initial value")}for(;t?o>=0:i>o;o+=s)o in n&&(r=e(r,n[o],o,this));return r}},F=function(t){return function(e){return t(this,e,arguments[1])}};o(o.P,"Array",{forEach:i.each=i.each||F(x(0)),map:F(x(1)),filter:F(x(2)),some:F(x(3)),every:F(x(4)),reduce:C(!1),reduceRight:C(!0),indexOf:F(k),lastIndexOf:function(t,e){var r=g(this),n=w(r.length),i=n-1;for(arguments.length>1&&(i=Math.min(i,b(e))),i<0&&(i=w(n+i));i>=0;i--)if(i in r&&r[i]===t)return i;return-1}}),o(o.S,"Date",{now:function(){return+new Date}});var H=function(t){return t>9?t:"0"+t};o(o.P+o.F*(p(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!p(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),r=t.getUTCMilliseconds(),n=e<0?"-":e>9999?"+":"";return n+("00000"+Math.abs(e)).slice(n?-6:-4)+"-"+H(t.getUTCMonth()+1)+"-"+H(t.getUTCDate())+"T"+H(t.getUTCHours())+":"+H(t.getUTCMinutes())+":"+H(t.getUTCSeconds())+"."+(r>99?r:"0"+H(r))+"Z"}})},function(t,e,r){var n=r(1);n(n.P,"Array",{copyWithin:r(120)}),r(29)("copyWithin")},function(t,e,r){var n=r(1);n(n.P,"Array",{fill:r(121)}),r(29)("fill")},function(t,e,r){"use strict";var n=r(1),i=r(38)(6),o="findIndex",s=!0;o in[]&&Array(1)[o](function(){s=!1}),n(n.P+n.F*s,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(29)(o)},function(t,e,r){"use strict";var n=r(1),i=r(38)(5),o="find",s=!0;o in[]&&Array(1)[o](function(){s=!1}),n(n.P+n.F*s,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(29)(o)},function(t,e,r){"use strict";var n=r(17),i=r(1),o=r(22),s=r(79),u=r(76),a=r(11),f=r(90);i(i.S+i.F*!r(55)(function(t){Array.from(t)}),"Array",{from:function(t){var e,r,i,c,h=o(t),l="function"==typeof this?this:Array,p=arguments,d=p.length,v=d>1?p[1]:void 0,_=void 0!==v,y=0,g=f(h);if(_&&(v=n(v,d>2?p[2]:void 0,2)),void 0==g||l==Array&&u(g))for(e=a(h.length),r=new l(e);e>y;y++)r[y]=_?v(h[y],y):h[y];else for(c=g.call(h),r=new l;!(i=c.next()).done;y++)r[y]=_?s(c,v,[i.value,y],!0):i.value;return r.length=y,r}})},function(t,e,r){"use strict";var n=r(1);n(n.S+n.F*r(8)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments,r=e.length,n=new("function"==typeof this?this:Array)(r);r>t;)n[t]=e[t++];return n.length=r,n}})},function(t,e,r){r(45)("Array")},function(t,e,r){"use strict";var n=r(2),i=r(4),o=r(6)("hasInstance"),s=Function.prototype;o in s||n.setDesc(s,o,{value:function(t){if("function"!=typeof this||!i(t))return!1;if(!i(this.prototype))return t instanceof this;for(;t=n.getProto(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,r){var n=r(2).setDesc,i=r(25),o=r(10),s=Function.prototype,u=/^\s*function ([^ (]*)/,a="name";a in s||r(12)&&n(s,a,{configurable:!0,get:function(){var t=(""+this).match(u),e=t?t[1]:"";return o(this,a)||n(this,a,i(5,e)),e}})},function(t,e,r){"use strict";var n=r(69);r(40)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=n.getEntry(this,t);return e&&e.v},set:function(t,e){return n.def(this,0===t?0:t,e)}},n,!0)},function(t,e,r){var n=r(1),i=r(82),o=Math.sqrt,s=Math.acosh;n(n.S+n.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e,r){function n(t){return isFinite(t=+t)&&0!=t?t<0?-n(-t):Math.log(t+Math.sqrt(t*t+1)):t}var i=r(1);i(i.S,"Math",{asinh:n})},function(t,e,r){var n=r(1);n(n.S,"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,r){var n=r(1),i=r(58);n(n.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,r){var n=r(1);n(n.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,r){var n=r(1),i=Math.exp;n(n.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,r){var n=r(1);n(n.S,"Math",{expm1:r(57)})},function(t,e,r){var n=r(1),i=r(58),o=Math.pow,s=o(2,-52),u=o(2,-23),a=o(2,127)*(2-u),f=o(2,-126),c=function(t){return t+1/s-1/s};n(n.S,"Math",{fround:function(t){var e,r,n=Math.abs(t),o=i(t);return n<f?o*c(n/f/u)*f*u:(e=(1+u/s)*n,r=e-(e-n),r>a||r!=r?o*(1/0):o*r)}})},function(t,e,r){var n=r(1),i=Math.abs;n(n.S,"Math",{hypot:function(t,e){for(var r,n,o=0,s=0,u=arguments,a=u.length,f=0;s<a;)r=i(u[s++]),f<r?(n=f/r,o=o*n*n+1,f=r):r>0?(n=r/f,o+=n*n):o+=r;return f===1/0?1/0:f*Math.sqrt(o)}})},function(t,e,r){var n=r(1),i=Math.imul;n(n.S+n.F*r(8)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(t,e){var r=65535,n=+t,i=+e,o=r&n,s=r&i;return 0|o*s+((r&n>>>16)*s+o*(r&i>>>16)<<16>>>0)}})},function(t,e,r){var n=r(1);n(n.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,e,r){var n=r(1);n(n.S,"Math",{log1p:r(82)})},function(t,e,r){var n=r(1);n(n.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,r){var n=r(1);n(n.S,"Math",{sign:r(58)})},function(t,e,r){var n=r(1),i=r(57),o=Math.exp;n(n.S+n.F*r(8)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,r){var n=r(1),i=r(57),o=Math.exp;n(n.S,"Math",{tanh:function(t){var e=i(t=+t),r=i(-t);return e==1/0?1:r==1/0?-1:(e-r)/(o(t)+o(-t))}})},function(t,e,r){var n=r(1);n(n.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,r){"use strict";var n=r(2),i=r(7),o=r(10),s=r(20),u=r(131),a=r(8),f=r(47).trim,c="Number",h=i[c],l=h,p=h.prototype,d=s(n.create(p))==c,v="trim"in String.prototype,_=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){e=v?e.trim():f(e,3);var r,n,i,o=e.charCodeAt(0);if(43===o||45===o){if(r=e.charCodeAt(2),88===r||120===r)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+e}for(var s,a=e.slice(2),c=0,h=a.length;c<h;c++)if(s=a.charCodeAt(c),s<48||s>i)return NaN;return parseInt(a,n)}}return+e};h(" 0o1")&&h("0b1")&&!h("+0x1")||(h=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof h&&(d?a(function(){p.valueOf.call(r)}):s(r)!=c)?new l(_(e)):_(e)},n.each.call(r(12)?n.getNames(l):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),function(t){o(l,t)&&!o(h,t)&&n.setDesc(h,t,n.getDesc(l,t))}),h.prototype=p,p.constructor=h,r(14)(i,c,h))},function(t,e,r){var n=r(1);n(n.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,r){var n=r(1),i=r(7).isFinite;n(n.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,r){var n=r(1);n(n.S,"Number",{isInteger:r(77)})},function(t,e,r){var n=r(1);n(n.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,r){var n=r(1),i=r(77),o=Math.abs;n(n.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,r){var n=r(1);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){var n=r(1);n(n.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){var n=r(1);n(n.S,"Number",{parseFloat:parseFloat})},function(t,e,r){var n=r(1);n(n.S,"Number",{parseInt:parseInt})},function(t,e,r){var n=r(1);n(n.S+n.F,"Object",{assign:r(126)})},function(t,e,r){var n=r(4);r(13)("freeze",function(t){return function(e){return t&&n(e)?t(e):e}})},function(t,e,r){var n=r(15);r(13)("getOwnPropertyDescriptor",function(t){return function(e,r){return t(n(e),r)}})},function(t,e,r){r(13)("getOwnPropertyNames",function(){return r(74).get})},function(t,e,r){var n=r(22);r(13)("getPrototypeOf",function(t){return function(e){return t(n(e))}})},function(t,e,r){var n=r(4);r(13)("isExtensible",function(t){return function(e){return!!n(e)&&(!t||t(e))}})},function(t,e,r){var n=r(4);r(13)("isFrozen",function(t){return function(e){return!n(e)||!!t&&t(e)}})},function(t,e,r){var n=r(4);r(13)("isSealed",function(t){return function(e){return!n(e)||!!t&&t(e)}})},function(t,e,r){var n=r(1);n(n.S,"Object",{is:r(85)})},function(t,e,r){var n=r(22);r(13)("keys",function(t){return function(e){return t(n(e))}})},function(t,e,r){var n=r(4);r(13)("preventExtensions",function(t){return function(e){return t&&n(e)?t(e):e}})},function(t,e,r){var n=r(4);r(13)("seal",function(t){return function(e){return t&&n(e)?t(e):e}})},function(t,e,r){var n=r(1);n(n.S,"Object",{setPrototypeOf:r(59).set})},function(t,e,r){"use strict";var n=r(39),i={};i[r(6)("toStringTag")]="z",i+""!="[object z]"&&r(14)(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)},function(t,e,r){"use strict";var n,i=r(2),o=r(56),s=r(7),u=r(17),a=r(39),f=r(1),c=r(4),h=r(5),l=r(28),p=r(46),d=r(31),v=r(59).set,_=r(85),y=r(6)("species"),g=r(130),b=r(125),m="Promise",w=s.process,E="process"==a(w),S=s[m],x=function(){},k=function(t){var e,r=new S(x);return t&&(r.constructor=function(t){t(x,x)}),(e=S.resolve(r))["catch"](x),e===r},I=function(){function t(e){var r=new S(e);return v(r,t.prototype),r}var e=!1;try{if(e=S&&S.resolve&&k(),v(t,S),t.prototype=i.create(S.prototype,{constructor:{value:t}}),t.resolve(5).then(function(){})instanceof t||(e=!1),e&&r(12)){var n=!1;S.resolve(i.setDesc({},"then",{get:function(){n=!0}})),e=n}}catch(o){e=!1}return e}(),B=function(t,e){return!(!o||t!==S||e!==n)||_(t,e)},T=function(t){var e=h(t)[y];return void 0!=e?e:t},A=function(t){var e;return!(!c(t)||"function"!=typeof(e=t.then))&&e},O=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=l(e),this.reject=l(r)},j=function(t){try{t()}catch(e){return{error:e}}},D=function(t,e){if(!t.n){t.n=!0;var r=t.c;b(function(){for(var n=t.v,i=1==t.s,o=0,u=function(e){var r,o,s=i?e.ok:e.fail,u=e.resolve,a=e.reject;try{s?(i||(t.h=!0),r=s===!0?n:s(n),r===e.promise?a(TypeError("Promise-chain cycle")):(o=A(r))?o.call(r,u,a):u(r)):a(n)}catch(f){a(f)}};r.length>o;)u(r[o++]);r.length=0,t.n=!1,e&&setTimeout(function(){var e,r,i=t.p;M(i)&&(E?w.emit("unhandledRejection",n,i):(e=s.onunhandledrejection)?e({promise:i,reason:n}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",n)),
t.a=void 0},1)})}},M=function(t){var e,r=t._d,n=r.a||r.c,i=0;if(r.h)return!1;for(;n.length>i;)if(e=n[i++],e.fail||!M(e.promise))return!1;return!0},R=function(t){var e=this;e.d||(e.d=!0,e=e.r||e,e.v=t,e.s=2,e.a=e.c.slice(),D(e,!0))},z=function(t){var e,r=this;if(!r.d){r.d=!0,r=r.r||r;try{if(r.p===t)throw TypeError("Promise can't be resolved itself");(e=A(t))?b(function(){var n={r:r,d:!1};try{e.call(t,u(z,n,1),u(R,n,1))}catch(i){R.call(n,i)}}):(r.v=t,r.s=1,D(r,!1))}catch(n){R.call({r:r,d:!1},n)}}};I||(S=function(t){l(t);var e=this._d={p:p(this,S,m),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{t(u(z,e,1),u(R,e,1))}catch(r){R.call(e,r)}},r(44)(S.prototype,{then:function(t,e){var r=new O(g(this,S)),n=r.promise,i=this._d;return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,i.c.push(r),i.a&&i.a.push(r),i.s&&D(i,!1),n},catch:function(t){return this.then(void 0,t)}})),f(f.G+f.W+f.F*!I,{Promise:S}),r(33)(S,m),r(45)(m),n=r(21)[m],f(f.S+f.F*!I,m,{reject:function(t){var e=new O(this),r=e.reject;return r(t),e.promise}}),f(f.S+f.F*(!I||k(!0)),m,{resolve:function(t){if(t instanceof S&&B(t.constructor,this))return t;var e=new O(this),r=e.resolve;return r(t),e.promise}}),f(f.S+f.F*!(I&&r(55)(function(t){S.all(t)["catch"](function(){})})),m,{all:function(t){var e=T(this),r=new O(e),n=r.resolve,o=r.reject,s=[],u=j(function(){d(t,!1,s.push,s);var r=s.length,u=Array(r);r?i.each.call(s,function(t,i){var s=!1;e.resolve(t).then(function(t){s||(s=!0,u[i]=t,--r||n(u))},o)}):n(u)});return u&&o(u.error),r.promise},race:function(t){var e=T(this),r=new O(e),n=r.reject,i=j(function(){d(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return i&&n(i.error),r.promise}})},function(t,e,r){var n=r(1),i=Function.apply,o=r(5);n(n.S,"Reflect",{apply:function(t,e,r){return i.call(t,e,o(r))}})},function(t,e,r){var n=r(2),i=r(1),o=r(28),s=r(5),u=r(4),a=Function.bind||r(21).Function.prototype.bind;i(i.S+i.F*r(8)(function(){function t(){}return!(Reflect.construct(function(){},[],t)instanceof t)}),"Reflect",{construct:function(t,e){o(t),s(e);var r=arguments.length<3?t:o(arguments[2]);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var i=[null];return i.push.apply(i,e),new(a.apply(t,i))}var f=r.prototype,c=n.create(u(f)?f:Object.prototype),h=Function.apply.call(t,c,e);return u(h)?h:c}})},function(t,e,r){var n=r(2),i=r(1),o=r(5);i(i.S+i.F*r(8)(function(){Reflect.defineProperty(n.setDesc({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,r){o(t);try{return n.setDesc(t,e,r),!0}catch(i){return!1}}})},function(t,e,r){var n=r(1),i=r(2).getDesc,o=r(5);n(n.S,"Reflect",{deleteProperty:function(t,e){var r=i(o(t),e);return!(r&&!r.configurable)&&delete t[e]}})},function(t,e,r){"use strict";var n=r(1),i=r(5),o=function(t){this._t=i(t),this._i=0;var e,r=this._k=[];for(e in t)r.push(e)};r(80)(o,"Object",function(){var t,e=this,r=e._k;do if(e._i>=r.length)return{value:void 0,done:!0};while(!((t=r[e._i++])in e._t));return{value:t,done:!1}}),n(n.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,r){var n=r(2),i=r(1),o=r(5);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return n.getDesc(o(t),e)}})},function(t,e,r){var n=r(1),i=r(2).getProto,o=r(5);n(n.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,r){function n(t,e){var r,s,f=arguments.length<3?t:arguments[2];return a(t)===f?t[e]:(r=i.getDesc(t,e))?o(r,"value")?r.value:void 0!==r.get?r.get.call(f):void 0:u(s=i.getProto(t))?n(s,e,f):void 0}var i=r(2),o=r(10),s=r(1),u=r(4),a=r(5);s(s.S,"Reflect",{get:n})},function(t,e,r){var n=r(1);n(n.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,r){var n=r(1),i=r(5),o=Object.isExtensible;n(n.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,r){var n=r(1);n(n.S,"Reflect",{ownKeys:r(84)})},function(t,e,r){var n=r(1),i=r(5),o=Object.preventExtensions;n(n.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(e){return!1}}})},function(t,e,r){var n=r(1),i=r(59);i&&n(n.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(r){return!1}}})},function(t,e,r){function n(t,e,r){var s,c,h=arguments.length<4?t:arguments[3],l=i.getDesc(a(t),e);if(!l){if(f(c=i.getProto(t)))return n(c,e,r,h);l=u(0)}return o(l,"value")?!(l.writable===!1||!f(h))&&(s=i.getDesc(h,e)||u(0),s.value=r,i.setDesc(h,e,s),!0):void 0!==l.set&&(l.set.call(h,r),!0)}var i=r(2),o=r(10),s=r(1),u=r(25),a=r(5),f=r(4);s(s.S,"Reflect",{set:n})},function(t,e,r){var n=r(2),i=r(7),o=r(78),s=r(73),u=i.RegExp,a=u,f=u.prototype,c=/a/g,h=/a/g,l=new u(c)!==c;!r(12)||l&&!r(8)(function(){return h[r(6)("match")]=!1,u(c)!=c||u(h)==h||"/a/i"!=u(c,"i")})||(u=function(t,e){var r=o(t),n=void 0===e;return this instanceof u||!r||t.constructor!==u||!n?l?new a(r&&!n?t.source:t,e):a((r=t instanceof u)?t.source:t,r&&n?s.call(t):e):t},n.each.call(n.getNames(a),function(t){t in u||n.setDesc(u,t,{configurable:!0,get:function(){return a[t]},set:function(e){a[t]=e}})}),f.constructor=u,u.prototype=f,r(14)(i,"RegExp",u)),r(45)("RegExp")},function(t,e,r){var n=r(2);r(12)&&"g"!=/./g.flags&&n.setDesc(RegExp.prototype,"flags",{configurable:!0,get:r(73)})},function(t,e,r){r(41)("match",1,function(t,e){return function(r){"use strict";var n=t(this),i=void 0==r?void 0:r[e];return void 0!==i?i.call(r,n):new RegExp(r)[e](String(n))}})},function(t,e,r){r(41)("replace",2,function(t,e,r){return function(n,i){"use strict";var o=t(this),s=void 0==n?void 0:n[e];return void 0!==s?s.call(n,o,i):r.call(String(o),n,i)}})},function(t,e,r){r(41)("search",1,function(t,e){return function(r){"use strict";var n=t(this),i=void 0==r?void 0:r[e];return void 0!==i?i.call(r,n):new RegExp(r)[e](String(n))}})},function(t,e,r){r(41)("split",2,function(t,e,r){return function(n,i){"use strict";var o=t(this),s=void 0==n?void 0:n[e];return void 0!==s?s.call(n,o,i):r.call(String(o),n,i)}})},function(t,e,r){"use strict";var n=r(69);r(40)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return n.def(this,t=0===t?0:t,t)}},n)},function(t,e,r){"use strict";var n=r(1),i=r(60)(!1);n(n.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,r){"use strict";var n=r(1),i=r(11),o=r(61),s="endsWith",u=""[s];n(n.P+n.F*r(52)(s),"String",{endsWith:function(t){var e=o(this,t,s),r=arguments,n=r.length>1?r[1]:void 0,a=i(e.length),f=void 0===n?a:Math.min(i(n),a),c=String(t);return u?u.call(e,c,f):e.slice(f-c.length,f)===c}})},function(t,e,r){var n=r(1),i=r(34),o=String.fromCharCode,s=String.fromCodePoint;n(n.S+n.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(t){for(var e,r=[],n=arguments,s=n.length,u=0;s>u;){if(e=+n[u++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");r.push(e<65536?o(e):o(((e-=65536)>>10)+55296,e%1024+56320))}return r.join("")}})},function(t,e,r){"use strict";var n=r(1),i=r(61),o="includes";n(n.P+n.F*r(52)(o),"String",{includes:function(t){return!!~i(this,t,o).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";var n=r(60)(!0);r(54)(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,r){var n=r(1),i=r(15),o=r(11);n(n.S,"String",{raw:function(t){for(var e=i(t.raw),r=o(e.length),n=arguments,s=n.length,u=[],a=0;r>a;)u.push(String(e[a++])),a<s&&u.push(String(n[a]));return u.join("")}})},function(t,e,r){var n=r(1);n(n.P,"String",{repeat:r(88)})},function(t,e,r){"use strict";var n=r(1),i=r(11),o=r(61),s="startsWith",u=""[s];n(n.P+n.F*r(52)(s),"String",{startsWith:function(t){var e=o(this,t,s),r=arguments,n=i(Math.min(r.length>1?r[1]:void 0,e.length)),a=String(t);return u?u.call(e,a,n):e.slice(n,n+a.length)===a}})},function(t,e,r){"use strict";r(47)("trim",function(t){return function(){return t(this,3)}})},function(t,e,r){"use strict";var n=r(2),i=r(7),o=r(10),s=r(12),u=r(1),a=r(14),f=r(8),c=r(86),h=r(33),l=r(30),p=r(6),d=r(124),v=r(74),_=r(123),y=r(53),g=r(5),b=r(15),m=r(25),w=n.getDesc,E=n.setDesc,S=n.create,x=v.get,k=i.Symbol,I=i.JSON,B=I&&I.stringify,T=!1,A=p("_hidden"),O=n.isEnum,j=c("symbol-registry"),D=c("symbols"),M="function"==typeof k,R=Object.prototype,z=s&&f(function(){return 7!=S(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=w(R,e);n&&delete R[e],E(t,e,r),n&&t!==R&&E(R,e,n)}:E,L=function(t){var e=D[t]=S(k.prototype);return e._k=t,s&&T&&z(R,t,{configurable:!0,set:function(e){o(this,A)&&o(this[A],t)&&(this[A][t]=!1),z(this,t,m(1,e))}}),e},q=function(t){return"symbol"==typeof t},U=function(t,e,r){return r&&o(D,e)?(r.enumerable?(o(t,A)&&t[A][e]&&(t[A][e]=!1),r=S(r,{enumerable:m(0,!1)})):(o(t,A)||E(t,A,m(1,{})),t[A][e]=!0),z(t,e,r)):E(t,e,r)},P=function(t,e){g(t);for(var r,n=_(e=b(e)),i=0,o=n.length;o>i;)U(t,r=n[i++],e[r]);return t},N=function(t,e){return void 0===e?S(t):P(S(t),e)},C=function(t){var e=O.call(this,t);return!(e||!o(this,t)||!o(D,t)||o(this,A)&&this[A][t])||e},F=function(t,e){var r=w(t=b(t),e);return!r||!o(D,e)||o(t,A)&&t[A][e]||(r.enumerable=!0),r},H=function(t){for(var e,r=x(b(t)),n=[],i=0;r.length>i;)o(D,e=r[i++])||e==A||n.push(e);return n},K=function(t){for(var e,r=x(b(t)),n=[],i=0;r.length>i;)o(D,e=r[i++])&&n.push(D[e]);return n},V=function(t){if(void 0!==t&&!q(t)){for(var e,r,n=[t],i=1,o=arguments;o.length>i;)n.push(o[i++]);return e=n[1],"function"==typeof e&&(r=e),!r&&y(e)||(e=function(t,e){if(r&&(e=r.call(this,t,e)),!q(e))return e}),n[1]=e,B.apply(I,n)}},W=f(function(){var t=k();return"[null]"!=B([t])||"{}"!=B({a:t})||"{}"!=B(Object(t))});M||(k=function(){if(q(this))throw TypeError("Symbol is not a constructor");return L(l(arguments.length>0?arguments[0]:void 0))},a(k.prototype,"toString",function(){return this._k}),q=function(t){return t instanceof k},n.create=N,n.isEnum=C,n.getDesc=F,n.setDesc=U,n.setDescs=P,n.getNames=v.get=H,n.getSymbols=K,s&&!r(56)&&a(R,"propertyIsEnumerable",C,!0));var Y={for:function(t){return o(j,t+="")?j[t]:j[t]=k(t)},keyFor:function(t){return d(j,t)},useSetter:function(){T=!0},useSimple:function(){T=!1}};n.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(t){var e=p(t);Y[t]=M?e:L(e)}),T=!0,u(u.G+u.W,{Symbol:k}),u(u.S,"Symbol",Y),u(u.S+u.F*!M,"Object",{create:N,defineProperty:U,defineProperties:P,getOwnPropertyDescriptor:F,getOwnPropertyNames:H,getOwnPropertySymbols:K}),I&&u(u.S+u.F*(!M||W),"JSON",{stringify:V}),h(k,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},function(t,e,r){"use strict";var n=r(2),i=r(14),o=r(71),s=r(4),u=r(10),a=o.frozenStore,f=o.WEAK,c=Object.isExtensible||s,h={},l=r(40)("WeakMap",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){if(s(t)){if(!c(t))return a(this).get(t);if(u(t,f))return t[f][this._i]}},set:function(t,e){return o.def(this,t,e)}},o,!0,!0);7!=(new l).set((Object.freeze||Object)(h),7).get(h)&&n.each.call(["delete","has","get","set"],function(t){var e=l.prototype,r=e[t];i(e,t,function(e,n){if(s(e)&&!c(e)){var i=a(this)[t](e,n);return"set"==t?this:i}return r.call(this,e,n)})})},function(t,e,r){"use strict";var n=r(71);r(40)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return n.def(this,t,!0)}},n,!1,!0)},function(t,e,r){"use strict";var n=r(1),i=r(68)(!0);n(n.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(29)("includes")},function(t,e,r){var n=r(1);n(n.P,"Map",{toJSON:r(70)("Map")})},function(t,e,r){var n=r(1),i=r(83)(!0);n(n.S,"Object",{entries:function(t){return i(t)}})},function(t,e,r){var n=r(2),i=r(1),o=r(84),s=r(15),u=r(25);i(i.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,r,i=s(t),a=n.setDesc,f=n.getDesc,c=o(i),h={},l=0;c.length>l;)r=f(i,e=c[l++]),e in h?a(h,e,u(0,r)):h[e]=r;return h}})},function(t,e,r){var n=r(1),i=r(83)(!1);n(n.S,"Object",{values:function(t){return i(t)}})},function(t,e,r){var n=r(1),i=r(129)(/[\\^$*+?.()|[\]{}]/g,"\\$&");n(n.S,"RegExp",{escape:function(t){return i(t)}})},function(t,e,r){var n=r(1);n(n.P,"Set",{toJSON:r(70)("Set")})},function(t,e,r){"use strict";var n=r(1),i=r(60)(!0);n(n.P,"String",{at:function(t){return i(this,t)}})},function(t,e,r){"use strict";var n=r(1),i=r(87);n(n.P,"String",{padLeft:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,r){"use strict";var n=r(1),i=r(87);n(n.P,"String",{padRight:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,r){"use strict";r(47)("trimLeft",function(t){return function(){return t(this,1)}})},function(t,e,r){"use strict";r(47)("trimRight",function(t){return function(){return t(this,2)}})},function(t,e,r){var n=r(2),i=r(1),o=r(17),s=r(21).Array||Array,u={},a=function(t,e){n.each.call(t.split(","),function(t){void 0==e&&t in s?u[t]=s[t]:t in[]&&(u[t]=o(Function.call,[][t],e))})};a("pop,reverse,shift,keys,values,entries",1),a("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),a("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),i(i.S,"Array",u)},function(t,e,r){r(91);var n=r(7),i=r(19),o=r(32),s=r(6)("iterator"),u=n.NodeList,a=n.HTMLCollection,f=u&&u.prototype,c=a&&a.prototype,h=o.NodeList=o.HTMLCollection=o.Array;f&&!f[s]&&i(f,s,h),c&&!c[s]&&i(c,s,h)},function(t,e,r){var n=r(1),i=r(89);n(n.G+n.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,r){var n=r(7),i=r(1),o=r(42),s=r(127),u=n.navigator,a=!!u&&/MSIE .\./.test(u.userAgent),f=function(t){return a?function(e,r){return t(o(s,[].slice.call(arguments,2),"function"==typeof e?e:Function(e)),r)}:t};i(i.G+i.B+i.F*a,{setTimeout:f(n.setTimeout),setInterval:f(n.setInterval)})},function(t,e,r){r(132),r(215),r(170),r(178),r(182),r(183),r(171),r(181),r(180),r(176),r(177),r(175),r(172),r(174),r(179),r(173),r(141),r(140),r(160),r(161),r(162),r(163),r(164),r(165),r(166),r(167),r(168),r(169),r(143),r(144),r(145),r(146),r(147),r(148),r(149),r(150),r(151),r(152),r(153),r(154),r(155),r(156),r(157),r(158),r(159),r(208),r(211),r(214),r(210),r(206),r(207),r(209),r(212),r(213),r(137),r(138),r(91),r(139),r(133),r(134),r(136),r(135),r(199),r(200),r(201),r(202),r(203),r(204),r(184),r(142),r(205),r(216),r(217),r(185),r(186),r(187),r(188),r(189),r(192),r(190),r(191),r(193),r(194),r(195),r(196),r(198),r(197),r(218),r(225),r(226),r(227),r(228),r(229),r(223),r(221),r(222),r(220),r(219),r(224),r(230),r(233),r(232),r(231),t.exports=r(21)},function(t,e,r){(function(e){function n(t,r){if(!(this instanceof n))return new n(t,r);this._opad=a,this._alg=t;var s="sha512"===t?128:64;r=this._key=e.isBuffer(r)?r:new e(r),r.length>s?r=i(t).update(r).digest():r.length<s&&(r=e.concat([r,o],s));for(var u=this._ipad=new e(s),a=this._opad=new e(s),f=0;f<s;f++)u[f]=54^r[f],a[f]=92^r[f];this._hash=i(t).update(u)}var i=r(92),o=new e(128);o.fill(0),t.exports=n,n.prototype.update=function(t,e){return this._hash.update(t,e),this},n.prototype.digest=function(t){var e=this._hash.digest();return i(this._alg).update(this._opad).update(e).digest(t)}}).call(e,r(3).Buffer)},function(t,e,r){(function(e){function r(t,r){if(t.length%o!==0){var n=t.length+(o-t.length%o);t=e.concat([t,s],n)}for(var i=[],u=r?t.readInt32BE:t.readInt32LE,a=0;a<t.length;a+=o)i.push(u.call(t,a));return i}function n(t,r,n){for(var i=new e(r),o=n?i.writeInt32BE:i.writeInt32LE,s=0;s<t.length;s++)o.call(i,t[s],4*s,!0);return i}function i(t,i,o,s){e.isBuffer(t)||(t=new e(t));var a=i(r(t,s),t.length*u);return n(a,o,s)}var o=4,s=new e(o);s.fill(0);var u=8;t.exports={hash:i}}).call(e,r(3).Buffer)},function(t,e,r){(function(t){function n(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function i(t,e){for(var r in t)e(t[r],r)}var o=r(240);e.createHash=r(92),e.createHmac=r(235),e.randomBytes=function(e,r){if(!r||!r.call)return new t(o(e));try{r.call(this,void 0,new t(o(e)))}catch(n){r(n)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var s=r(239)(e);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync,i(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){n("sorry,",t,"is not implemented yet")}})}).call(e,r(3).Buffer)},function(t,e,r){function n(t,e){t[e>>5]|=128<<e%32,t[(e+64>>>9<<4)+14]=e;for(var r=1732584193,n=-271733879,i=-1732584194,c=271733878,h=0;h<t.length;h+=16){var l=r,p=n,d=i,v=c;r=o(r,n,i,c,t[h+0],7,-680876936),c=o(c,r,n,i,t[h+1],12,-389564586),i=o(i,c,r,n,t[h+2],17,606105819),n=o(n,i,c,r,t[h+3],22,-1044525330),r=o(r,n,i,c,t[h+4],7,-176418897),c=o(c,r,n,i,t[h+5],12,1200080426),i=o(i,c,r,n,t[h+6],17,-1473231341),n=o(n,i,c,r,t[h+7],22,-45705983),r=o(r,n,i,c,t[h+8],7,1770035416),c=o(c,r,n,i,t[h+9],12,-1958414417),i=o(i,c,r,n,t[h+10],17,-42063),n=o(n,i,c,r,t[h+11],22,-1990404162),r=o(r,n,i,c,t[h+12],7,1804603682),c=o(c,r,n,i,t[h+13],12,-40341101),i=o(i,c,r,n,t[h+14],17,-1502002290),n=o(n,i,c,r,t[h+15],22,1236535329),r=s(r,n,i,c,t[h+1],5,-165796510),c=s(c,r,n,i,t[h+6],9,-1069501632),i=s(i,c,r,n,t[h+11],14,643717713),n=s(n,i,c,r,t[h+0],20,-373897302),r=s(r,n,i,c,t[h+5],5,-701558691),c=s(c,r,n,i,t[h+10],9,38016083),i=s(i,c,r,n,t[h+15],14,-660478335),n=s(n,i,c,r,t[h+4],20,-405537848),r=s(r,n,i,c,t[h+9],5,568446438),c=s(c,r,n,i,t[h+14],9,-1019803690),i=s(i,c,r,n,t[h+3],14,-187363961),n=s(n,i,c,r,t[h+8],20,1163531501),r=s(r,n,i,c,t[h+13],5,-1444681467),c=s(c,r,n,i,t[h+2],9,-51403784),i=s(i,c,r,n,t[h+7],14,1735328473),n=s(n,i,c,r,t[h+12],20,-1926607734),r=u(r,n,i,c,t[h+5],4,-378558),c=u(c,r,n,i,t[h+8],11,-2022574463),i=u(i,c,r,n,t[h+11],16,1839030562),n=u(n,i,c,r,t[h+14],23,-35309556),r=u(r,n,i,c,t[h+1],4,-1530992060),c=u(c,r,n,i,t[h+4],11,1272893353),i=u(i,c,r,n,t[h+7],16,-155497632),n=u(n,i,c,r,t[h+10],23,-1094730640),r=u(r,n,i,c,t[h+13],4,681279174),c=u(c,r,n,i,t[h+0],11,-358537222),i=u(i,c,r,n,t[h+3],16,-722521979),n=u(n,i,c,r,t[h+6],23,76029189),r=u(r,n,i,c,t[h+9],4,-640364487),c=u(c,r,n,i,t[h+12],11,-421815835),i=u(i,c,r,n,t[h+15],16,530742520),n=u(n,i,c,r,t[h+2],23,-995338651),r=a(r,n,i,c,t[h+0],6,-198630844),c=a(c,r,n,i,t[h+7],10,1126891415),i=a(i,c,r,n,t[h+14],15,-1416354905),n=a(n,i,c,r,t[h+5],21,-57434055),r=a(r,n,i,c,t[h+12],6,1700485571),c=a(c,r,n,i,t[h+3],10,-1894986606),i=a(i,c,r,n,t[h+10],15,-1051523),n=a(n,i,c,r,t[h+1],21,-2054922799),r=a(r,n,i,c,t[h+8],6,1873313359),c=a(c,r,n,i,t[h+15],10,-30611744),i=a(i,c,r,n,t[h+6],15,-1560198380),n=a(n,i,c,r,t[h+13],21,1309151649),r=a(r,n,i,c,t[h+4],6,-145523070),c=a(c,r,n,i,t[h+11],10,-1120210379),i=a(i,c,r,n,t[h+2],15,718787259),n=a(n,i,c,r,t[h+9],21,-343485551),r=f(r,l),n=f(n,p),i=f(i,d),c=f(c,v)}return Array(r,n,i,c)}function i(t,e,r,n,i,o){return f(c(f(f(e,t),f(n,o)),i),r)}function o(t,e,r,n,o,s,u){return i(e&r|~e&n,t,e,o,s,u)}function s(t,e,r,n,o,s,u){return i(e&n|r&~n,t,e,o,s,u)}function u(t,e,r,n,o,s,u){return i(e^r^n,t,e,o,s,u)}function a(t,e,r,n,o,s,u){return i(r^(e|~n),t,e,o,s,u)}function f(t,e){var r=(65535&t)+(65535&e),n=(t>>16)+(e>>16)+(r>>16);return n<<16|65535&r}function c(t,e){return t<<e|t>>>32-e}var h=r(236);t.exports=function(t){return h.hash(t,n,16)}},function(t,e,r){var n=r(288);t.exports=function(t,e){e=e||{};var r=n(t);return e.pbkdf2=r.pbkdf2,e.pbkdf2Sync=r.pbkdf2Sync,e}},function(t,e,r){(function(e,n){!function(){var i=("undefined"==typeof window?e:window)||{};_crypto=i.crypto||i.msCrypto||r(297),t.exports=function(t){if(_crypto.getRandomValues){var e=new n(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),r(3).Buffer)},function(t,e,r){!function(n,i,o){t.exports=e=i(r(23),r(93),r(246),r(244),r(242))}(this,function(t){return function(){var e=t,r=e.lib,n=r.BlockCipher,i=e.algo,o=[],s=[],u=[],a=[],f=[],c=[],h=[],l=[],p=[],d=[];!function(){for(var t=[],e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=0,n=0,e=0;e<256;e++){var i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^255&i^99,o[r]=i,s[i]=r;var v=t[r],_=t[v],y=t[_],g=257*t[i]^16843008*i;u[r]=g<<24|g>>>8,a[r]=g<<16|g>>>16,f[r]=g<<8|g>>>24,c[r]=g;var g=16843009*y^65537*_^257*v^16843008*r;h[i]=g<<24|g>>>8,l[i]=g<<16|g>>>16,p[i]=g<<8|g>>>24,d[i]=g,r?(r=v^t[t[t[y^v]]],n^=t[t[n]]):r=n=1}}();var v=[0,1,2,4,8,16,32,64,128,27,54],_=i.AES=n.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes/4,n=this._nRounds=r+6,i=4*(n+1),s=this._keySchedule=[],u=0;u<i;u++)if(u<r)s[u]=e[u];else{var a=s[u-1];u%r?r>6&&u%r==4&&(a=o[a>>>24]<<24|o[a>>>16&255]<<16|o[a>>>8&255]<<8|o[255&a]):(a=a<<8|a>>>24,a=o[a>>>24]<<24|o[a>>>16&255]<<16|o[a>>>8&255]<<8|o[255&a],a^=v[u/r|0]<<24),s[u]=s[u-r]^a}for(var f=this._invKeySchedule=[],c=0;c<i;c++){var u=i-c;if(c%4)var a=s[u];else var a=s[u-4];c<4||u<=4?f[c]=a:f[c]=h[o[a>>>24]]^l[o[a>>>16&255]]^p[o[a>>>8&255]]^d[o[255&a]]}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,u,a,f,c,o)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,h,l,p,d,s);var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,n,i,o,s,u){for(var a=this._nRounds,f=t[e]^r[0],c=t[e+1]^r[1],h=t[e+2]^r[2],l=t[e+3]^r[3],p=4,d=1;d<a;d++){var v=n[f>>>24]^i[c>>>16&255]^o[h>>>8&255]^s[255&l]^r[p++],_=n[c>>>24]^i[h>>>16&255]^o[l>>>8&255]^s[255&f]^r[p++],y=n[h>>>24]^i[l>>>16&255]^o[f>>>8&255]^s[255&c]^r[p++],g=n[l>>>24]^i[f>>>16&255]^o[c>>>8&255]^s[255&h]^r[p++];f=v,c=_,h=y,l=g}var v=(u[f>>>24]<<24|u[c>>>16&255]<<16|u[h>>>8&255]<<8|u[255&l])^r[p++],_=(u[c>>>24]<<24|u[h>>>16&255]<<16|u[l>>>8&255]<<8|u[255&f])^r[p++],y=(u[h>>>24]<<24|u[l>>>16&255]<<16|u[f>>>8&255]<<8|u[255&c])^r[p++],g=(u[l>>>24]<<24|u[f>>>16&255]<<16|u[c>>>8&255]<<8|u[255&h])^r[p++];t[e]=v,t[e+1]=_,t[e+2]=y,t[e+3]=g},keySize:8});e.AES=n._createHelper(_)}(),t.AES})},function(t,e,r){!function(n,i){t.exports=e=i(r(23))}(this,function(t){t.lib.Cipher||function(e){var r=t,n=r.lib,i=n.Base,o=n.WordArray,s=n.BufferedBlockAlgorithm,u=r.enc,a=(u.Utf8,u.Base64),f=r.algo,c=f.EvpKDF,h=n.Cipher=s.extend({cfg:i.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?S:m}return function(e){return{encrypt:function(r,n,i){return t(n).encrypt(e,r,n,i)},decrypt:function(r,n,i){return t(n).decrypt(e,r,n,i)}}}}()}),l=(n.StreamCipher=h.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),r.mode={}),p=n.BlockCipherMode=i.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),d=l.CBC=function(){function t(t,r,n){var i=this._iv;if(i){var o=i;this._iv=e}else var o=this._prevBlock;for(var s=0;s<n;s++)t[r+s]^=o[s]}var r=p.extend();return r.Encryptor=r.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize;t.call(this,e,r,i),n.encryptBlock(e,r),this._prevBlock=e.slice(r,r+i)}}),r.Decryptor=r.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,o=e.slice(r,r+i);n.decryptBlock(e,r),t.call(this,e,r,i),this._prevBlock=o}}),r}(),v=r.pad={},_=v.Pkcs7={pad:function(t,e){for(var r=4*e,n=r-t.sigBytes%r,i=n<<24|n<<16|n<<8|n,s=[],u=0;u<n;u+=4)s.push(i);var a=o.create(s,n);t.concat(a)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},y=(n.BlockCipher=h.extend({cfg:h.cfg.extend({mode:d,padding:_}),reset:function(){h.reset.call(this);var t=this.cfg,e=t.iv,r=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else{var n=r.createDecryptor;this._minBufferSize=1}this._mode=n.call(r,this,e&&e.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else{var e=this._process(!0);t.unpad(e)}return e},blockSize:4}),n.CipherParams=i.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),g=r.format={},b=g.OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;if(r)var n=o.create([1398893684,1701076831]).concat(r).concat(e);else var n=e;return n.toString(a)},parse:function(t){var e=a.parse(t),r=e.words;if(1398893684==r[0]&&1701076831==r[1]){var n=o.create(r.slice(2,4));r.splice(0,4),e.sigBytes-=16}return y.create({ciphertext:e,salt:n})}},m=n.SerializableCipher=i.extend({cfg:i.extend({format:b}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var i=t.createEncryptor(r,n),o=i.finalize(e),s=i.cfg;return y.create({ciphertext:o,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,r,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var i=t.createDecryptor(r,n).finalize(e.ciphertext);return i},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),w=r.kdf={},E=w.OpenSSL={execute:function(t,e,r,n){n||(n=o.random(8));var i=c.create({keySize:e+r}).compute(t,n),s=o.create(i.words.slice(e),4*r);return i.sigBytes=4*e,y.create({key:i,iv:s,salt:n})}},S=n.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:E}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var i=n.kdf.execute(r,t.keySize,t.ivSize);n.iv=i.iv;var o=m.encrypt.call(this,t,e,i.key,n);return o.mixIn(i),o},decrypt:function(t,e,r,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var i=n.kdf.execute(r,t.keySize,t.ivSize,e.salt);n.iv=i.iv;var o=m.decrypt.call(this,t,e,i.key,n);return o}})}()})},function(t,e,r){!function(n,i){t.exports=e=i(r(23))}(this,function(t){return t.enc.Hex})},function(t,e,r){!function(n,i,o){t.exports=e=i(r(23),r(247),r(245))}(this,function(t){return function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,o=e.algo,s=o.MD5,u=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:s,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r=this.cfg,n=r.hasher.create(),o=i.create(),s=o.words,u=r.keySize,a=r.iterations;s.length<u;){f&&n.update(f);var f=n.update(t).finalize(e);n.reset();for(var c=1;c<a;c++)f=n.finalize(f),n.reset();o.concat(f)}return o.sigBytes=4*u,o}});e.EvpKDF=function(t,e,r){return u.create(r).compute(t,e)}}(),t.EvpKDF})},function(t,e,r){!function(n,i){t.exports=e=i(r(23))}(this,function(t){!function(){var e=t,r=e.lib,n=r.Base,i=e.enc,o=i.Utf8,s=e.algo;s.HMAC=n.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=o.parse(e));var r=t.blockSize,n=4*r;e.sigBytes>n&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),s=this._iKey=e.clone(),u=i.words,a=s.words,f=0;f<r;f++)u[f]^=1549556828,a[f]^=909522486;i.sigBytes=s.sigBytes=n,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,r=e.finalize(t);e.reset();var n=e.finalize(this._oKey.clone().concat(r));return n}})}()})},function(t,e,r){!function(n,i){t.exports=e=i(r(23))}(this,function(t){return function(e){function r(t,e,r,n,i,o,s){var u=t+(e&r|~e&n)+i+s;return(u<<o|u>>>32-o)+e}function n(t,e,r,n,i,o,s){var u=t+(e&n|r&~n)+i+s;return(u<<o|u>>>32-o)+e}function i(t,e,r,n,i,o,s){var u=t+(e^r^n)+i+s;return(u<<o|u>>>32-o)+e}function o(t,e,r,n,i,o,s){var u=t+(r^(e|~n))+i+s;return(u<<o|u>>>32-o)+e}var s=t,u=s.lib,a=u.WordArray,f=u.Hasher,c=s.algo,h=[];!function(){for(var t=0;t<64;t++)h[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=c.MD5=f.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var s=0;s<16;s++){var u=e+s,a=t[u];t[u]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var f=this._hash.words,c=t[e+0],l=t[e+1],p=t[e+2],d=t[e+3],v=t[e+4],_=t[e+5],y=t[e+6],g=t[e+7],b=t[e+8],m=t[e+9],w=t[e+10],E=t[e+11],S=t[e+12],x=t[e+13],k=t[e+14],I=t[e+15],B=f[0],T=f[1],A=f[2],O=f[3];B=r(B,T,A,O,c,7,h[0]),O=r(O,B,T,A,l,12,h[1]),A=r(A,O,B,T,p,17,h[2]),T=r(T,A,O,B,d,22,h[3]),B=r(B,T,A,O,v,7,h[4]),O=r(O,B,T,A,_,12,h[5]),A=r(A,O,B,T,y,17,h[6]),T=r(T,A,O,B,g,22,h[7]),B=r(B,T,A,O,b,7,h[8]),O=r(O,B,T,A,m,12,h[9]),A=r(A,O,B,T,w,17,h[10]),T=r(T,A,O,B,E,22,h[11]),B=r(B,T,A,O,S,7,h[12]),O=r(O,B,T,A,x,12,h[13]),A=r(A,O,B,T,k,17,h[14]),T=r(T,A,O,B,I,22,h[15]),B=n(B,T,A,O,l,5,h[16]),O=n(O,B,T,A,y,9,h[17]),A=n(A,O,B,T,E,14,h[18]),T=n(T,A,O,B,c,20,h[19]),B=n(B,T,A,O,_,5,h[20]),O=n(O,B,T,A,w,9,h[21]),A=n(A,O,B,T,I,14,h[22]),T=n(T,A,O,B,v,20,h[23]),B=n(B,T,A,O,m,5,h[24]),O=n(O,B,T,A,k,9,h[25]),A=n(A,O,B,T,d,14,h[26]),T=n(T,A,O,B,b,20,h[27]),B=n(B,T,A,O,x,5,h[28]),O=n(O,B,T,A,p,9,h[29]),A=n(A,O,B,T,g,14,h[30]),T=n(T,A,O,B,S,20,h[31]),B=i(B,T,A,O,_,4,h[32]),O=i(O,B,T,A,b,11,h[33]),A=i(A,O,B,T,E,16,h[34]),T=i(T,A,O,B,k,23,h[35]),B=i(B,T,A,O,l,4,h[36]),O=i(O,B,T,A,v,11,h[37]),A=i(A,O,B,T,g,16,h[38]),T=i(T,A,O,B,w,23,h[39]),B=i(B,T,A,O,x,4,h[40]),O=i(O,B,T,A,c,11,h[41]),A=i(A,O,B,T,d,16,h[42]),T=i(T,A,O,B,y,23,h[43]),B=i(B,T,A,O,m,4,h[44]),O=i(O,B,T,A,S,11,h[45]),A=i(A,O,B,T,I,16,h[46]),T=i(T,A,O,B,p,23,h[47]),B=o(B,T,A,O,c,6,h[48]),O=o(O,B,T,A,g,10,h[49]),A=o(A,O,B,T,k,15,h[50]),T=o(T,A,O,B,_,21,h[51]),B=o(B,T,A,O,S,6,h[52]),O=o(O,B,T,A,d,10,h[53]),A=o(A,O,B,T,w,15,h[54]),T=o(T,A,O,B,l,21,h[55]),B=o(B,T,A,O,b,6,h[56]),O=o(O,B,T,A,I,10,h[57]),A=o(A,O,B,T,y,15,h[58]),T=o(T,A,O,B,x,21,h[59]),B=o(B,T,A,O,v,6,h[60]),O=o(O,B,T,A,E,10,h[61]),A=o(A,O,B,T,p,15,h[62]),T=o(T,A,O,B,m,21,h[63]),f[0]=f[0]+B|0,f[1]=f[1]+T|0,f[2]=f[2]+A|0,f[3]=f[3]+O|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),s=n;r[(i+64>>>9<<4)+15]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[(i+64>>>9<<4)+14]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var u=this._hash,a=u.words,f=0;f<4;f++){var c=a[f];a[f]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return u},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t}});s.MD5=f._createHelper(l),s.HmacMD5=f._createHmacHelper(l)}(Math),t.MD5})},function(t,e,r){!function(n,i){t.exports=e=i(r(23))}(this,function(t){return function(){var e=t,r=e.lib,n=r.WordArray,i=r.Hasher,o=e.algo,s=[],u=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],u=r[3],a=r[4],f=0;f<80;f++){if(f<16)s[f]=0|t[e+f];else{var c=s[f-3]^s[f-8]^s[f-14]^s[f-16];s[f]=c<<1|c>>>31}var h=(n<<5|n>>>27)+a+s[f];h+=f<20?(i&o|~i&u)+1518500249:f<40?(i^o^u)+1859775393:f<60?(i&o|i&u|o&u)-1894007588:(i^o^u)-899497514,a=u,u=o,o=i<<30|i>>>2,i=n,n=h}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+a|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[(n+64>>>9<<4)+14]=Math.floor(r/4294967296),e[(n+64>>>9<<4)+15]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA1=i._createHelper(u),e.HmacSHA1=i._createHmacHelper(u)}(),t.SHA1})},function(t,e,r){"use strict";var n,i=r(252),o=r(259),s=r(255),u=r(262);n=t.exports=function(t,e){var r,n,s,a,f;
return arguments.length<2||"string"!=typeof t?(a=e,e=t,t=null):a=arguments[2],null==t?(r=s=!0,n=!1):(r=u.call(t,"c"),n=u.call(t,"e"),s=u.call(t,"w")),f={value:e,configurable:r,enumerable:n,writable:s},a?i(o(a),f):f},n.gs=function(t,e,r){var n,a,f,c;return"string"!=typeof t?(f=r,r=e,e=t,t=null):f=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(f=r,r=void 0):(f=e,e=r=void 0),null==t?(n=!0,a=!1):(n=u.call(t,"c"),a=u.call(t,"e")),c={get:e,set:r,configurable:n,enumerable:a},f?i(o(f),c):c}},function(t,e){function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function n(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}var i="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();e=t.exports=i?r:n,e.supported=r,e.unsupported=n},function(t,e){function r(t){var e=[];for(var r in t)e.push(r);return e}e=t.exports="function"==typeof Object.keys?Object.keys:r,e.shim=r},function(t,e,r){function n(t){var e=o[t];if(!e)return null;var r=new i(e.p,16),n=new i(e.a,16),u=new i(e.b,16),a=new i(e.n,16),f=new i(e.h,16),c=new i(e.Gx,16),h=new i(e.Gy,16);return new s(r,n,u,c,h,a,f)}var i=r(16),o=r(287),s=r(94);t.exports=n},function(t,e,r){"use strict";t.exports=r(253)()?Object.assign:r(254)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,r){"use strict";var n=r(256),i=r(261),o=Math.max;t.exports=function(t,e){var r,s,u,a=o(arguments.length,2);for(t=Object(i(t)),u=function(n){try{t[n]=e[n]}catch(i){r||(r=i)}},s=1;s<a;++s)e=arguments[s],n(e).forEach(u);if(void 0!==r)throw r;return t}},function(t,e){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";t.exports=r(257)()?Object.keys:r(258)},function(t,e){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e){"use strict";var r=Object.keys;t.exports=function(t){return r(null==t?t:Object(t))}},function(t,e){"use strict";var r=Array.prototype.forEach,n=Object.create,i=function(t,e){var r;for(r in t)e[r]=t[r]};t.exports=function(t){var e=n(null);return r.call(arguments,function(t){null!=t&&i(Object(t),e)}),e}},function(t,e){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e){"use strict";t.exports=function(t){if(null==t)throw new TypeError("Cannot use null or undefined");return t}},function(t,e,r){"use strict";t.exports=r(263)()?String.prototype.contains:r(264)},function(t,e){"use strict";var r="razdwatrzy";t.exports=function(){return"function"==typeof r.contains&&(r.contains("dwa")===!0&&r.contains("foo")===!1)}},function(t,e){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},function(t,e,r){"use strict";var n,i,o,s,u,a,f,c=r(248),h=r(260),l=Function.prototype.apply,p=Function.prototype.call,d=Object.create,v=Object.defineProperty,_=Object.defineProperties,y=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};n=function(t,e){var r;return h(e),y.call(this,"__ee__")?r=this.__ee__:(r=g.value=d(null),v(this,"__ee__",g),g.value=null),r[t]?"object"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},i=function(t,e){var r,i;return h(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),l.call(e,this,arguments)}),r.__eeOnceListener__=e,this},o=function(t,e){var r,n,i,o;if(h(e),!y.call(this,"__ee__"))return this;if(r=this.__ee__,!r[t])return this;if(n=r[t],"object"==typeof n)for(o=0;i=n[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===n.length?r[t]=n[o?0:1]:n.splice(o,1));else n!==e&&n.__eeOnceListener__!==e||delete r[t];return this},s=function(t){var e,r,n,i,o;if(y.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(r=arguments.length,o=new Array(r-1),e=1;e<r;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;n=i[e];++e)l.call(n,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),e=1;e<r;++e)o[e-1]=arguments[e];l.call(i,this,o)}},u={on:n,once:i,off:o,emit:s},a={on:c(n),once:c(i),off:c(o),emit:c(s)},f=_({},a),t.exports=e=function(t){return null==t?d(f):_(Object(t),a)},e.methods=u},function(t,e,r){"use strict";var n=r(96),i=r(269);t.exports={ChainStore:n,TransactionBuilder:i,FetchChainObjects:n.FetchChainObjects,ChainTypes:r(36),ObjectId:r(99),NumberUtils:r(268),TransactionHelper:r(270),ChainValidation:r(97),EmitterInstance:r(98),Login:r(267),FetchChain:n.FetchChain}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(63),s=r(100),u=r(271),a=u.get,f=u.set,c={},h={},l=function(){function t(){n(this,t);var e={loggedIn:!1,roles:["active","owner","memo"]};this.get=a(e),this.set=f(e),this.subs={}}return i(t,[{key:"addSubscription",value:function(t){this.subs[t]=t}},{key:"setRoles",value:function(t){this.set("roles",t)}},{key:"generateKeys",value:function(t,e,r,n){(new Date).getTime();if(!t||!e)throw new Error("Account name or password required");if(e.length<12)throw new Error("Password must have at least 12 characters");var i={},u={};return(r||this.get("roles")).forEach(function(r){var a=t+r+e,f=c[a]?c[a]:o.fromSeed(s.normalize_brainKey(a));c[a]=f,i[r]=f,u[r]=h[a]?h[a]:f.toPublicKey().toString(n),h[a]=u[r]}),{privKeys:i,pubKeys:u}}},{key:"checkKeys",value:function(t){var e=this,r=t.accountName,n=t.password,i=t.auths;if(!r||!n||!i)throw new Error("checkKeys: Missing inputs");var o=!1,s=function(t){var s=e.generateKeys(r,n,[t]),u=s.privKeys,a=s.pubKeys;i[t].forEach(function(r){r[0]===a[t]&&(o=!0,e.set(t,{priv:u[t],pub:a[t]}))})};for(var u in i)s(u);return o&&this.set("name",r),this.set("loggedIn",o),o}},{key:"signTransaction",value:function(t){var e=this,r=!1;if(this.get("roles").forEach(function(n){var i=e.get(n);i&&(r=!0,console.log("adding signer:",i.pub),t.add_signer(i.priv,i.pub))}),!r)throw new Error("You do not have any private keys to sign this transaction")}}]),t}(),p=new l;t.exports=p},function(t,e,r){"use strict";var n=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(a){i=!0,o=a}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);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?"symbol":typeof t},o=r(9);t.exports={toImpliedDecimal:function(t,e){"number"==typeof t?(o(t<=9007199254740991,"overflow"),t=""+t):t.toString&&(t=t.toString()),o("string"==typeof t,"number should be an actual number or string: "+("undefined"==typeof t?"undefined":i(t))),t=t.trim(),o(/^[0-9]*\.?[0-9]*$/.test(t),"Invalid decimal number "+t);var r=t.split("."),s=n(r,2),u=s[0],a=void 0===u?"":u,f=s[1],c=void 0===f?"":f,h=e-c.length;o(h>=0,"Too many decimal digits in "+t+" to create an implied decimal of "+e);for(var l=0;l<h;l++)c+="0";for(;"0"===a.charAt(0);)a=a.substring(1);return a+c}}},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=this;return new Promise(function(r,n){if(e.signed||e.sign(),!e.tr_buffer)throw new Error("not finalized");if(!e.signatures.length)throw new Error("not signed");if(!e.operations.length)throw new Error("no operations");var i=p.signed_transaction.toObject(e);v.instance().network_api().exec("broadcast_transaction_with_callback",[function(t){return r(t)},i]).then(function(){t&&t()})["catch"](function(t){console.log(t);var r=t.message;r||(r=""),n(new Error(r+"\ngraphene-crypto digest "+h.sha256(e.tr_buffer).toString("hex")+" transaction "+e.tr_buffer.toString("hex")+" "+JSON.stringify(i)))})})}var o=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,u=t[Symbol.iterator]();!(n=(s=u.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(a){i=!0,o=a}finally{try{!n&&u["return"]&&u["return"]()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(9),a=r(49),f=a.Signature,c=a.PublicKey,h=a.hash,l=r(64),p=l.ops,d=r(26),v=d.Apis,_=d.ChainConfig,y=r(27),g=(y.Long,r(36)),b=r(96),m=function(){function t(){n(this,t),this.ref_block_num=0,this.ref_block_prefix=0,this.expiration=0,this.operations=[],this.signatures=[],this.signer_private_keys=[],this._broadcast=i.bind(this)}return s(t,[{key:"add_type_operation",value:function(t,e){this.add_operation(this.get_type_operation(t,e))}},{key:"process_transaction",value:function(t){var e=this,r=arguments.length<=1||void 0===arguments[1]?null:arguments[1],n=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],i=t.wallet.wallet_object;return v.instance().chain_id!==i.get("chain_id")?Promise.reject("Mismatched chain_id; expecting "+i.get("chain_id")+", but got "+v.instance().chain_id):this.set_required_fees().then(function(){var i={};if(r){var o=t.getPubkeys_having_PrivateKey(r);if(!o.length)throw new Error("Missing signing key");var s=!0,u=!1,a=void 0;try{for(var f,c=o[Symbol.iterator]();!(s=(f=c.next()).done);s=!0){var h=f.value,l=t.getPrivateKey(h);e.add_signer(l,h),i[h]=!0}}catch(p){u=!0,a=p}finally{try{!s&&c["return"]&&c["return"]()}finally{if(u)throw a}}}return e.get_potential_signatures().then(function(r){var n=r.pubkeys,o=r.addys,s=t.getPubkeys_having_PrivateKey(n,o);return e.get_required_signatures(s).then(function(r){var n=!0,o=!1,s=void 0;try{for(var u,a=r[Symbol.iterator]();!(n=(u=a.next()).done);n=!0){var f=u.value;if(!i[f]){var c=t.getPrivateKey(f);if(!c)throw new Error("Missing signing key for "+f);e.add_signer(c,f)}}}catch(h){o=!0,s=h}finally{try{!n&&a["return"]&&a["return"]()}finally{if(o)throw s}}})}).then(function(){return n?e.broadcast():e.serialize()})})}},{key:"finalize",value:function(){var t=this;return new Promise(function(r,n){if(t.tr_buffer)throw new Error("already finalized");0===t.expiration&&(t.expiration=w()+_.expire_in_secs),r(v.instance().db_api().exec("get_objects",[["2.1.0"]]).then(function(r){t.ref_block_num=65535&r[0].head_block_number,t.ref_block_prefix=new e(r[0].head_block_id,"hex").readUInt32LE(4);for(var n,i=t.operations,o=0;o<i.length;o++)n=i[o],n[1].finalize&&n[1].finalize();t.tr_buffer=p.transaction.toBuffer(t)}))})}},{key:"id",value:function(){if(!this.tr_buffer)throw new Error("not finalized");return h.sha256(this.tr_buffer).toString("hex").substring(0,40)}},{key:"add_operation",value:function(t){if(this.tr_buffer)throw new Error("already finalized");if(u(t,"operation"),!Array.isArray(t))throw new Error("Expecting array [operation_id, operation]");this.operations.push(t)}},{key:"get_type_operation",value:function(t,e){if(this.tr_buffer)throw new Error("already finalized");u(t,"name"),u(e,"operation");var r=p[t];u(r,"Unknown operation "+t);var n=g.operations[r.operation_name];if(void 0===n)throw new Error("unknown operation: "+r.operation_name);e.fee||(e.fee={amount:0,asset_id:0}),"proposal_create"===t&&(e.expiration_time||(e.expiration_time=w()+_.expire_in_secs_proposal));var i=r.fromObject(e);return[n,i]}},{key:"set_expire_seconds",value:function(t){if(this.tr_buffer)throw new Error("already finalized");return this.expiration=w()+t}},{key:"propose",value:function(t){if(this.tr_buffer)throw new Error("already finalized");if(!this.operations.length)throw new Error("add operation first");u(t,"proposal_create_options"),u(t.fee_paying_account,"proposal_create_options.fee_paying_account");var e=this.operations.map(function(t){return{op:t}});return this.operations=[],this.signatures=[],this.signer_private_keys=[],t.proposed_ops=e,this.add_type_operation("proposal_create",t),this}},{key:"has_proposed_operation",value:function(){for(var t=!1,e=0;e<this.operations.length;e++)if("proposed_ops"in this.operations[e][1]){t=!0;break}return t}},{key:"set_required_fees",value:function(t){var e,r=this;if(this.tr_buffer)throw new Error("already finalized");if(!this.operations.length)throw new Error("add operations first");for(var n,i=[],s=0;s<this.operations.length;s++)n=this.operations[s],i.push(p.operation.toObject(n));if(!t){var u=i[0][1].fee;t=u&&null!==u.asset_id?u.asset_id:"1.3.0"}var a=[v.instance().db_api().exec("get_required_fees",[i,t])];return"1.3.0"!==t&&(a.push(v.instance().db_api().exec("get_required_fees",[i,"1.3.0"])),a.push(b.FetchChain("getAsset",t))),Promise.all(a).then(function(n){var i=o(n,3),s=i[0],u=i[1],a=i[2];if("1.3.0"!==t){e=a?a.getIn(["dynamic","fee_pool"]):0;for(var f,c=0,h=0;h<u.length;h++)f=u[h],c+=f.amount;c>parseInt(e,10)&&(s=u,t="1.3.0")}var l=[],p=function y(t){if(Array.isArray(t))for(var e,r=0;r<t.length;r++)e=t[r],y(e);else l.push(t)};p(s);for(var d=0,v=function g(t){if((!t.fee||0===t.fee.amount||t.fee.amount.toString&&"0"===t.fee.amount.toString())&&(t.fee=l[d]),d++,t.proposed_ops){for(var e=[],r=0;r<t.proposed_ops.length;r++)e.push(g(t.proposed_ops[r].op[1]));return e}},_=0;_<r.operations.length;_++)v(r.operations[_][1])})}},{key:"get_potential_signatures",value:function(){var t=p.signed_transaction.toObject(this);return Promise.all([v.instance().db_api().exec("get_potential_signatures",[t]),v.instance().db_api().exec("get_potential_address_signatures",[t])]).then(function(t){return{pubkeys:t[0],addys:t[1]}})}},{key:"get_required_signatures",value:function(t){if(!t.length)return Promise.resolve([]);var e=p.signed_transaction.toObject(this);return v.instance().db_api().exec("get_required_signatures",[e,t]).then(function(t){return t})}},{key:"add_signer",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?t.toPublicKey():arguments[1];if(u(t.d,"required PrivateKey object"),this.signed)throw new Error("already signed");e.Q||(e=c.fromPublicKeyString(e));var r=t.toHex(),n=!0,i=!1,o=void 0;try{for(var s,a=this.signer_private_keys[Symbol.iterator]();!(n=(s=a.next()).done);n=!0){var f=s.value;if(f[0].toHex()===r)return}}catch(h){i=!0,o=h}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw o}}this.signer_private_keys.push([t,e])}},{key:"sign",value:function(){var t=arguments.length<=0||void 0===arguments[0]?v.instance().chain_id:arguments[0];if(!this.tr_buffer)throw new Error("not finalized");if(this.signed)throw new Error("already signed");if(!this.signer_private_keys.length)throw new Error("Transaction was not signed. Do you have a private key? [no_signers]");for(var r=this.signer_private_keys.length,n=0;0<r?n<r:n>r;0<r?n++:n++){var i=o(this.signer_private_keys[n],2),s=i[0],u=i[1],a=f.signBuffer(e.concat([new e(t,"hex"),this.tr_buffer]),s,u);this.signatures.push(a.toBuffer())}this.signer_private_keys=[],this.signed=!0}},{key:"serialize",value:function(){return p.signed_transaction.toObject(this)}},{key:"toObject",value:function(){return p.signed_transaction.toObject(this)}},{key:"broadcast",value:function(t){var e=this;return this.tr_buffer?this._broadcast(t):this.finalize().then(function(){return e._broadcast(t)})}}]),t}(),w=function(){var t=Math.ceil(b.getHeadBlockDate().getTime()/1e3),e=Math.ceil(Date.now()/1e3);return e-t>30?t:Math.max(e,t)};t.exports=m}).call(e,r(3).Buffer)},function(t,e,r){"use strict";var n;t.exports=n={};var i=r(109),o=r(27),s=o.Long,u=r(49),a=u.Signature,f=r(64),c=f.ops,h=r(26),l=h.Apis;n.unique_nonce_entropy=null,n.unique_nonce_uint64=function(){var t=n.unique_nonce_entropy=function(){return null===n.unique_nonce_entropy?parseInt(i.randomUint8Array(1)[0]):++n.unique_nonce_entropy%256}(),e=s.fromNumber(Date.now());return e=e.shiftLeft(8).or(s.fromNumber(t)),e.toString()},n.to_json=function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];return function(t,e){var r=c.signed_transaction.toObject(t);if(e){var n=l.instance().network_api();return console.log("... tr_object",JSON.stringify(r)),n.exec("broadcast_transaction",[r])}return r}(t,e)},n.signed_tr_json=function(t,e){var r=c.transaction.toBuffer(t);return t=c.transaction.toObject(t),t.signatures=function(){for(var t=[],n=0;0<e.length?n<e.length:n>e.length;0<e.length?n++:n++){var i=e[n];t.push(a.signBuffer(r,i).toHex())}return t}(),t},n.expire_in_min=function(t){return Math.round(Date.now()/1e3)+60*t},n.seconds_from_now=function(t){return Math.round(Date.now()/1e3)+t},n.template=function(t){var e=arguments.length<=1||void 0===arguments[1]?{use_default:!0,annotate:!0}:arguments[1],r=type[t];if(!r)throw new Error("unknown serializer_operation_type "+t);return r.toObject(void 0,e)},n.new_operation=function(t){var e=type[t];if(!e)throw new Error("unknown serializer_operation_type "+t);var r=e.toObject(void 0,{use_default:!0,annotate:!0});return e.fromObject(r)},n.instance=function(t){return t.substring("0.0.".length)}},function(t,e){"use strict";function r(t){return function(e){return t[e]||""}}function n(t){return function(e,r){return t[e]=r,this}}t.exports={get:r,set:n}},function(t,e){"use strict";t.exports=function(t){if("string"!=typeof t)throw new Error("string required for brainKey");return t=t.trim(),t.split(/[\t\n\v\f\r ]+/).join(" ")}},function(t,e,r){(function(e){"use strict";function n(t,r,n,i,o){h("Buffer",r),h(l,n),o&&(r=c.sha256(e.concat([r,new e(o)]))),f.equal(r.length,32,"Hash must be 256 bit");var s=n.toBuffer(32),u=new e(32),a=new e(32);a.fill(1),u.fill(0),u=c.HmacSHA256(e.concat([a,new e([0]),s,r]),u),a=c.HmacSHA256(a,u),u=c.HmacSHA256(e.concat([a,new e([1]),s,r]),u),a=c.HmacSHA256(a,u),a=c.HmacSHA256(a,u);for(var p=l.fromBuffer(a);p.signum()<=0||p.compareTo(t.n)>=0||!i(p);)u=c.HmacSHA256(e.concat([a,new e([0])]),u),a=c.HmacSHA256(a,u),a=c.HmacSHA256(a,u),p=l.fromBuffer(a);return p}function i(t,e,r,i){var o,s,u=l.fromBuffer(e),a=t.n,f=t.G,c=(n(t,e,r,function(e){var n=f.multiply(e);return!t.isInfinity(n)&&(o=n.affineX.mod(a),0!==o.signum()&&(s=e.modInverse(a).multiply(u.add(r.multiply(o))).mod(a),0!==s.signum()))},i),a.shiftRight(1));return s.compareTo(c)>0&&(s=a.subtract(s)),new p(o,s)}function o(t,e,r,n){var i=t.n,o=t.G,s=r.r,u=r.s;if(s.signum()<=0||s.compareTo(i)>=0)return!1;if(u.signum()<=0||u.compareTo(i)>=0)return!1;var a=u.modInverse(i),f=e.multiply(a).mod(i),c=s.multiply(a).mod(i),h=o.multiplyTwo(f,n,c);if(t.isInfinity(h))return!1;var l=h.affineX,p=l.mod(i);return p.equals(s)}function s(t,e,r,n){var i=l.fromBuffer(e);return o(t,i,r,n)}function u(t,e,r,n){f.strictEqual(3&n,n,"Recovery param is more than two bits");var i=t.n,o=t.G,s=r.r,u=r.s;f(s.signum()>0&&s.compareTo(i)<0,"Invalid r value"),f(u.signum()>0&&u.compareTo(i)<0,"Invalid s value");var a=1&n,c=n>>1,h=c?s.add(i):s,l=t.pointFromX(a,h),p=l.multiply(i);f(t.isInfinity(p),"nR is not a valid curve point");var d=e.negate().mod(i),v=s.modInverse(i),_=l.multiplyTwo(u,o,d).multiply(v);return t.validate(_),_}function a(t,e,r,n){for(var i=0;i<4;i++){var o=u(t,e,r,i);if(o.equals(n))return i}throw new Error("Unable to find valid recovery factor")}var f=r(9),c=r(24),h=r(103),l=r(16),p=r(274);t.exports={calcPubKeyRecoveryParam:a,deterministicGenerateK:n,recoverPubKey:u,sign:i,verify:s,verifyRaw:o}}).call(e,r(3).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){o(s,t),o(s,e),this.r=t,this.s=e}var i=r(9),o=r(103),s=r(16);n.parseCompact=function(t){i.equal(t.length,65,"Invalid signature length");var e=t.readUInt8(0)-27;i.equal(e,7&e,"Invalid signature parameter");var r=!!(4&e);e=3&e;var o=s.fromBuffer(t.slice(1,33)),u=s.fromBuffer(t.slice(33));return{compressed:r,i:e,signature:new n(o,u)}},n.fromDER=function(t){i.equal(t.readUInt8(0),48,"Not a DER sequence"),i.equal(t.readUInt8(1),t.length-2,"Invalid sequence length"),i.equal(t.readUInt8(2),2,"Expected a DER integer");var e=t.readUInt8(3);i(e>0,"R length is zero");var r=4+e;i.equal(t.readUInt8(r),2,"Expected a DER integer (2)");var o=t.readUInt8(r+1);i(o>0,"S length is zero");var u=t.slice(4,r),a=t.slice(r+2);r+=2+o,e>1&&0===u.readUInt8(0)&&i(128&u.readUInt8(1),"R value excessively padded"),o>1&&0===a.readUInt8(0)&&i(128&a.readUInt8(1),"S value excessively padded"),i.equal(r,t.length,"Invalid DER encoding");var f=s.fromDERInteger(u),c=s.fromDERInteger(a);return i(f.signum()>=0,"R value is negative"),i(c.signum()>=0,"S value is negative"),new n(f,c)},n.parseScriptSignature=function(t){var e=t.readUInt8(t.length-1),r=e&-129;return i(r>0&&r<4,"Invalid hashType"),{signature:n.fromDER(t.slice(0,-1)),hashType:e}},n.prototype.toCompact=function(t,r){r&&(t+=4),t+=27;var n=new e(65);return n.writeUInt8(t,0),this.r.toBuffer(32).copy(n,1),this.s.toBuffer(32).copy(n,33),n},n.prototype.toDER=function(){var t=this.r.toDERInteger(),r=this.s.toDERInteger(),n=[];return n.push(2,t.length),n=n.concat(t),n.push(2,r.length),n=n.concat(r),n.unshift(48,n.length),new e(n)},n.prototype.toScriptSignature=function(t){var r=new e(1);return r.writeUInt8(t,0),e.concat([this.toDER(),r])},t.exports=n}).call(e,r(3).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(273),s=r(24),u=r(48),a=u.getCurveByName,f=a("secp256k1"),c=r(9),h=r(16),l=r(37),p=function(){function t(e,r,i){n(this,t),this.r=e,this.s=r,this.i=i,c.equal(null!=this.r,!0,"Missing parameter"),c.equal(null!=this.s,!0,"Missing parameter"),c.equal(null!=this.i,!0,"Missing parameter")}return i(t,[{key:"toBuffer",value:function(){var t;return t=new e(65),t.writeUInt8(this.i,0),this.r.toBuffer(32).copy(t,1),this.s.toBuffer(32).copy(t,33),t}},{key:"recoverPublicKeyFromBuffer",value:function(t){return this.recoverPublicKey(s.sha256(t))}},{key:"recoverPublicKey",value:function(t){var e=void 0,r=void 0,n=void 0;return r=h.fromBuffer(t),n=this.i,n-=27,n=3&n,e=o.recoverPubKey(f,r,this,n),l.fromPoint(e)}},{key:"verifyBuffer",value:function(t,e){var r=s.sha256(t);return this.verifyHash(r,e)}},{key:"verifyHash",value:function(t,e){return c.equal(t.length,32,"A SHA 256 should be 32 bytes long, instead got "+t.length),o.verify(f,t,{r:this.r,s:this.s},e.Q)}},{key:"toByteBuffer",value:function(){var t;return t=new ByteBuffer(ByteBuffer.DEFAULT_CAPACITY,ByteBuffer.LITTLE_ENDIAN),this.appendByteBuffer(t),t.copy(0,t.offset)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"verifyHex",value:function(t,r){var n;return n=new e(t,"hex"),this.verifyBuffer(n,r)}}],[{key:"fromBuffer",value:function(e){var r,n,i;return c.equal(e.length,65,"Invalid signature length"),r=e.readUInt8(0),c.equal(r-27,r-27&7,"Invalid signature parameter"),n=h.fromBuffer(e.slice(1,33)),i=h.fromBuffer(e.slice(33)),new t(n,i,r)}},{key:"signBuffer",value:function(e,r){var n=s.sha256(e);return t.signBufferSha256(n,r)}},{key:"signBufferSha256",value:function(r,n){if(32!==r.length||!e.isBuffer(r))throw new Error("buf_sha256: 32 byte buffer requred");var i,s,u,a,c,l,p;for(a=null,p=0,s=h.fromBuffer(r);;){if(u=o.sign(f,r,n.d,p++),i=u.toDER(),c=i[3],l=i[5+c],32===c&&32===l){a=o.calcPubKeyRecoveryParam(f,s,u,n.toPublicKey().Q),a+=4,a+=27;break}p%10===0&&console.log("WARN: "+p+" attempts to find canonical signature")}return new t(u.r,u.s,a)}},{key:"sign",value:function(r,n){return t.signBuffer(new e(r),n)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}},{key:"signHex",value:function(r,n){var i;return i=new e(r,"hex"),t.signBuffer(i,n)}}]),t}();t.exports=p}).call(e,r(3).Buffer)},function(t,e,r){"use strict";t.exports=Object.assign(r(266),r(49),r(64))},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(){function t(e,n){r(this,t),this.message=e,("undefined"!=typeof n&&null!==n?n.message:void 0)&&(this.message="cause\t"+n.message+"\t"+this.message);var i="";("undefined"!=typeof n&&null!==n?n.stack:void 0)&&(i="caused by\n\t"+n.stack+"\t"+i),this.stack=this.message+"\n"+i}return n(t,null,[{key:"throw",value:function(t,e){var r=t;throw("undefined"!=typeof e&&null!==e?e.message:void 0)&&(r+="\t cause: "+e.message+" "),("undefined"!=typeof e&&null!==e?e.stack:void 0)&&(r+="\n stack: "+e.stack+" "),new Error(r)}}]),t}();t.exports=i},function(t,e,r){"use strict";var n=r(106),i=r(105),o=n.uint8,s=n.uint16,u=n.uint32,a=n.int64,f=n.uint64,c=n.string,h=n.bytes,l=n.bool,p=n.array,d=(n.fixed_array,n.protocol_id_type),v=n.object_id_type,_=n.vote_id,y=n.future_extensions,g=n.static_variant,b=n.map,m=n.set,w=n.public_key,E=n.address,S=n.time_point_sec,x=n.optional;y=n["void"];var k=g();t.exports.operation=k;var I=function(e,r){var n=new i(e,r);return t.exports[e]=n},B=new I("transfer_operation_fee_parameters",{fee:f,price_per_kbyte:u}),T=new I("limit_order_create_operation_fee_parameters",{fee:f}),A=new I("limit_order_cancel_operation_fee_parameters",{fee:f}),O=new I("call_order_update_operation_fee_parameters",{fee:f}),j=new I("fill_order_operation_fee_parameters"),D=new I("account_create_operation_fee_parameters",{basic_fee:f,premium_fee:f,price_per_kbyte:u}),M=new I("account_update_operation_fee_parameters",{fee:a,price_per_kbyte:u}),R=new I("account_whitelist_operation_fee_parameters",{fee:a}),z=new I("account_upgrade_operation_fee_parameters",{membership_annual_fee:f,membership_lifetime_fee:f}),L=new I("account_transfer_operation_fee_parameters",{fee:f}),q=new I("asset_create_operation_fee_parameters",{symbol3:f,symbol4:f,long_symbol:f,price_per_kbyte:u}),U=new I("asset_update_operation_fee_parameters",{fee:f,price_per_kbyte:u}),P=new I("asset_update_bitasset_operation_fee_parameters",{fee:f}),N=new I("asset_update_feed_producers_operation_fee_parameters",{fee:f}),C=new I("asset_issue_operation_fee_parameters",{fee:f,price_per_kbyte:u}),F=new I("asset_reserve_operation_fee_parameters",{fee:f}),H=new I("asset_fund_fee_pool_operation_fee_parameters",{fee:f}),K=new I("asset_settle_operation_fee_parameters",{fee:f}),V=new I("asset_global_settle_operation_fee_parameters",{fee:f}),W=new I("asset_publish_feed_operation_fee_parameters",{fee:f}),Y=new I("witness_create_operation_fee_parameters",{fee:f}),G=new I("witness_update_operation_fee_parameters",{fee:a}),Z=new I("proposal_create_operation_fee_parameters",{fee:f,price_per_kbyte:u}),J=new I("proposal_update_operation_fee_parameters",{fee:f,price_per_kbyte:u}),X=new I("proposal_delete_operation_fee_parameters",{fee:f}),$=new I("withdraw_permission_create_operation_fee_parameters",{fee:f}),Q=new I("withdraw_permission_update_operation_fee_parameters",{fee:f}),tt=new I("withdraw_permission_claim_operation_fee_parameters",{fee:f,price_per_kbyte:u}),et=new I("withdraw_permission_delete_operation_fee_parameters",{fee:f}),rt=new I("committee_member_create_operation_fee_parameters",{fee:f}),nt=new I("committee_member_update_operation_fee_parameters",{fee:f}),it=new I("committee_member_update_global_parameters_operation_fee_parameters",{fee:f}),ot=new I("vesting_balance_create_operation_fee_parameters",{fee:f}),st=new I("vesting_balance_withdraw_operation_fee_parameters",{fee:f}),ut=new I("worker_create_operation_fee_parameters",{fee:f}),at=new I("custom_operation_fee_parameters",{fee:f,price_per_kbyte:u}),ft=new I("assert_operation_fee_parameters",{fee:f}),ct=new I("balance_claim_operation_fee_parameters"),ht=new I("override_transfer_operation_fee_parameters",{fee:f,price_per_kbyte:u}),lt=new I("transfer_to_blind_operation_fee_parameters",{fee:f,price_per_output:u}),pt=new I("blind_transfer_operation_fee_parameters",{fee:f,price_per_output:u}),dt=new I("transfer_from_blind_operation_fee_parameters",{fee:f}),vt=new I("asset_settle_cancel_operation_fee_parameters"),_t=new I("asset_claim_fees_operation_fee_parameters",{fee:f}),yt=g([B,T,A,O,j,D,M,R,z,L,q,U,P,N,C,F,H,K,V,W,Y,G,Z,J,X,$,Q,tt,et,rt,nt,it,ot,st,ut,at,ft,ct,ht,lt,pt,dt,vt,_t]),gt=new I("fee_schedule",{parameters:m(yt),scale:u}),bt=new I("void_result"),mt=new I("asset",{amount:a,asset_id:d("asset")}),wt=g([bt,v,mt]),Et=new I("processed_transaction",{ref_block_num:s,ref_block_prefix:u,expiration:S,operations:p(k),extensions:m(y),signatures:p(h(65)),operation_results:p(wt)}),St=(new I("signed_block",{previous:h(20),timestamp:S,witness:d("witness"),transaction_merkle_root:h(20),extensions:m(y),witness_signature:h(65),transactions:p(Et)}),new I("block_header",{previous:h(20),timestamp:S,witness:d("witness"),transaction_merkle_root:h(20),extensions:m(y)}),new I("signed_block_header",{previous:h(20),timestamp:S,witness:d("witness"),transaction_merkle_root:h(20),extensions:m(y),witness_signature:h(65)}),new I("memo_data",{from:w,to:w,nonce:f,message:h()})),xt=new I("transfer",{fee:mt,from:d("account"),to:d("account"),amount:mt,memo:x(St),extensions:m(y)}),kt=new I("limit_order_create",{fee:mt,seller:d("account"),amount_to_sell:mt,min_to_receive:mt,expiration:S,fill_or_kill:l,extensions:m(y)}),It=new I("limit_order_cancel",{fee:mt,fee_paying_account:d("account"),order:d("limit_order"),extensions:m(y)}),Bt=new I("call_order_update",{fee:mt,funding_account:d("account"),delta_collateral:mt,delta_debt:mt,extensions:m(y)}),Tt=new I("fill_order",{fee:mt,order_id:v,account_id:d("account"),pays:mt,receives:mt}),At=new I("authority",{weight_threshold:u,account_auths:b(d("account"),s),key_auths:b(w,s),address_auths:b(E,s)}),Ot=new I("account_options",{memo_key:w,voting_account:d("account"),num_witness:s,num_committee:s,votes:m(_),extensions:m(y)}),jt=new I("account_create",{fee:mt,registrar:d("account"),referrer:d("account"),referrer_percent:s,name:c,owner:At,active:At,options:Ot,extensions:m(y)}),Dt=new I("account_update",{fee:mt,account:d("account"),owner:x(At),active:x(At),new_options:x(Ot),extensions:m(y)}),Mt=new I("account_whitelist",{fee:mt,authorizing_account:d("account"),account_to_list:d("account"),new_listing:o,extensions:m(y)}),Rt=new I("account_upgrade",{fee:mt,account_to_upgrade:d("account"),upgrade_to_lifetime_member:l,extensions:m(y)}),zt=new I("account_transfer",{fee:mt,account_id:d("account"),new_owner:d("account"),extensions:m(y)}),Lt=new I("price",{base:mt,quote:mt}),qt=new I("asset_options",{max_supply:a,market_fee_percent:s,max_market_fee:a,issuer_permissions:s,flags:s,core_exchange_rate:Lt,whitelist_authorities:m(d("account")),blacklist_authorities:m(d("account")),whitelist_markets:m(d("asset")),blacklist_markets:m(d("asset")),description:c,extensions:m(y)}),Ut=new I("bitasset_options",{feed_lifetime_sec:u,minimum_feeds:o,force_settlement_delay_sec:u,force_settlement_offset_percent:s,maximum_force_settlement_volume:s,short_backing_asset:d("asset"),extensions:m(y)}),Pt=new I("asset_create",{fee:mt,issuer:d("account"),symbol:c,precision:o,common_options:qt,bitasset_opts:x(Ut),is_prediction_market:l,
extensions:m(y)}),Nt=new I("asset_update",{fee:mt,issuer:d("account"),asset_to_update:d("asset"),new_issuer:x(d("account")),new_options:qt,extensions:m(y)}),Ct=new I("asset_update_bitasset",{fee:mt,issuer:d("account"),asset_to_update:d("asset"),new_options:Ut,extensions:m(y)}),Ft=new I("asset_update_feed_producers",{fee:mt,issuer:d("account"),asset_to_update:d("asset"),new_feed_producers:m(d("account")),extensions:m(y)}),Ht=new I("asset_issue",{fee:mt,issuer:d("account"),asset_to_issue:mt,issue_to_account:d("account"),memo:x(St),extensions:m(y)}),Kt=new I("asset_reserve",{fee:mt,payer:d("account"),amount_to_reserve:mt,extensions:m(y)}),Vt=new I("asset_fund_fee_pool",{fee:mt,from_account:d("account"),asset_id:d("asset"),amount:a,extensions:m(y)}),Wt=new I("asset_settle",{fee:mt,account:d("account"),amount:mt,extensions:m(y)}),Yt=new I("asset_global_settle",{fee:mt,issuer:d("account"),asset_to_settle:d("asset"),settle_price:Lt,extensions:m(y)}),Gt=new I("price_feed",{settlement_price:Lt,maintenance_collateral_ratio:s,maximum_short_squeeze_ratio:s,core_exchange_rate:Lt}),Zt=new I("asset_publish_feed",{fee:mt,publisher:d("account"),asset_id:d("asset"),feed:Gt,extensions:m(y)}),Jt=new I("witness_create",{fee:mt,witness_account:d("account"),url:c,block_signing_key:w}),Xt=new I("witness_update",{fee:mt,witness:d("witness"),witness_account:d("account"),new_url:x(c),new_signing_key:x(w)}),$t=new I("op_wrapper",{op:k}),Qt=new I("proposal_create",{fee:mt,fee_paying_account:d("account"),expiration_time:S,proposed_ops:p($t),review_period_seconds:x(u),extensions:m(y)}),te=new I("proposal_update",{fee:mt,fee_paying_account:d("account"),proposal:d("proposal"),active_approvals_to_add:m(d("account")),active_approvals_to_remove:m(d("account")),owner_approvals_to_add:m(d("account")),owner_approvals_to_remove:m(d("account")),key_approvals_to_add:m(w),key_approvals_to_remove:m(w),extensions:m(y)}),ee=new I("proposal_delete",{fee:mt,fee_paying_account:d("account"),using_owner_authority:l,proposal:d("proposal"),extensions:m(y)}),re=new I("withdraw_permission_create",{fee:mt,withdraw_from_account:d("account"),authorized_account:d("account"),withdrawal_limit:mt,withdrawal_period_sec:u,periods_until_expiration:u,period_start_time:S}),ne=new I("withdraw_permission_update",{fee:mt,withdraw_from_account:d("account"),authorized_account:d("account"),permission_to_update:d("withdraw_permission"),withdrawal_limit:mt,withdrawal_period_sec:u,period_start_time:S,periods_until_expiration:u}),ie=new I("withdraw_permission_claim",{fee:mt,withdraw_permission:d("withdraw_permission"),withdraw_from_account:d("account"),withdraw_to_account:d("account"),amount_to_withdraw:mt,memo:x(St)}),oe=new I("withdraw_permission_delete",{fee:mt,withdraw_from_account:d("account"),authorized_account:d("account"),withdrawal_permission:d("withdraw_permission")}),se=new I("committee_member_create",{fee:mt,committee_member_account:d("account"),url:c}),ue=new I("committee_member_update",{fee:mt,committee_member:d("committee_member"),committee_member_account:d("account"),new_url:x(c)}),ae=new I("chain_parameters",{current_fees:gt,block_interval:o,maintenance_interval:u,maintenance_skip_slots:o,committee_proposal_review_period:u,maximum_transaction_size:u,maximum_block_size:u,maximum_time_until_expiration:u,maximum_proposal_lifetime:u,maximum_asset_whitelist_authorities:o,maximum_asset_feed_publishers:o,maximum_witness_count:s,maximum_committee_count:s,maximum_authority_membership:s,reserve_percent_of_fee:s,network_percent_of_fee:s,lifetime_referrer_percent_of_fee:s,cashback_vesting_period_seconds:u,cashback_vesting_threshold:a,count_non_member_votes:l,allow_non_member_whitelists:l,witness_pay_per_block:a,worker_budget_per_day:a,max_predicate_opcode:s,fee_liquidation_threshold:a,accounts_per_fee_scale:s,account_fee_scale_bitshifts:o,max_authority_depth:o,extensions:m(y)}),fe=new I("committee_member_update_global_parameters",{fee:mt,new_parameters:ae}),ce=new I("linear_vesting_policy_initializer",{begin_timestamp:S,vesting_cliff_seconds:u,vesting_duration_seconds:u}),he=new I("cdd_vesting_policy_initializer",{start_claim:S,vesting_seconds:u}),le=g([ce,he]),pe=new I("vesting_balance_create",{fee:mt,creator:d("account"),owner:d("account"),amount:mt,policy:le}),de=new I("vesting_balance_withdraw",{fee:mt,vesting_balance:d("vesting_balance"),owner:d("account"),amount:mt}),ve=new I("refund_worker_initializer"),_e=new I("vesting_balance_worker_initializer",{pay_vesting_period_days:s}),ye=new I("burn_worker_initializer"),ge=g([ve,_e,ye]),be=new I("worker_create",{fee:mt,owner:d("account"),work_begin_date:S,work_end_date:S,daily_pay:a,name:c,url:c,initializer:ge}),me=new I("custom",{fee:mt,payer:d("account"),required_auths:m(d("account")),id:s,data:h()}),we=new I("account_name_eq_lit_predicate",{account_id:d("account"),name:c}),Ee=new I("asset_symbol_eq_lit_predicate",{asset_id:d("asset"),symbol:c}),Se=new I("block_id_predicate",{id:h(20)}),xe=g([we,Ee,Se]),ke=new I("assert",{fee:mt,fee_paying_account:d("account"),predicates:p(xe),required_auths:m(d("account")),extensions:m(y)}),Ie=new I("balance_claim",{fee:mt,deposit_to_account:d("account"),balance_to_claim:d("balance"),balance_owner_key:w,total_claimed:mt}),Be=new I("override_transfer",{fee:mt,issuer:d("account"),from:d("account"),to:d("account"),amount:mt,memo:x(St),extensions:m(y)}),Te=new I("stealth_confirmation",{one_time_key:w,to:x(w),encrypted_memo:h()}),Ae=new I("blind_output",{commitment:h(33),range_proof:h(),owner:At,stealth_memo:x(Te)}),Oe=new I("transfer_to_blind",{fee:mt,amount:mt,from:d("account"),blinding_factor:h(32),outputs:p(Ae)}),je=new I("blind_input",{commitment:h(33),owner:At}),De=new I("blind_transfer",{fee:mt,inputs:p(je),outputs:p(Ae)}),Me=new I("transfer_from_blind",{fee:mt,amount:mt,to:d("account"),blinding_factor:h(32),inputs:p(je)}),Re=new I("asset_settle_cancel",{fee:mt,settlement:d("force_settlement"),account:d("account"),amount:mt,extensions:m(y)}),ze=new I("asset_claim_fees",{fee:mt,issuer:d("account"),amount_to_claim:mt,extensions:m(y)});k.st_operations=[xt,kt,It,Bt,Tt,jt,Dt,Mt,Rt,zt,Pt,Nt,Ct,Ft,Ht,Kt,Vt,Wt,Yt,Zt,Jt,Xt,Qt,te,ee,re,ne,ie,oe,se,ue,fe,pe,de,be,me,ke,Ie,Be,Oe,De,Me,Re,ze];new I("transaction",{ref_block_num:s,ref_block_prefix:u,expiration:S,operations:p(k),extensions:m(y)}),new I("signed_transaction",{ref_block_num:s,ref_block_prefix:u,expiration:S,operations:p(k),extensions:m(y),signatures:p(h(65))}),new I("stealth_memo_data",{from:x(w),amount:mt,blinding_factor:h(32),commitment:h(33),check:u})},function(t,e){"use strict";t.exports=function(t){var e=t.toObject(void 0,{use_default:!0,annotate:!0});console.error(JSON.stringify(e,null,4)),e=t.toObject(void 0,{use_default:!0,annotate:!1}),console.error(JSON.stringify(e))}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i,o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),s=r(281),u=r(282),a=r(107);t.exports={setRpcConnectionStatusCallback:function(t){this.statusCb=t,i&&i.setRpcConnectionStatusCallback(t)},reset:function(){var t=arguments.length<=0||void 0===arguments[0]?"ws://localhost:8090":arguments[0];return i&&(i.close(),i=null),i=new f,i.setRpcConnectionStatusCallback(this.statusCb),i.connect(t),i},instance:function(){var t=arguments.length<=0||void 0===arguments[0]?"ws://localhost:8090":arguments[0];return i||(i=new f,i.setRpcConnectionStatusCallback(this.statusCb),i.connect(t)),i},chainId:function(){return Apis.instance().chain_id},close:function(){i&&(i.close(),i=null)}};var f=function(){function t(){n(this,t)}return o(t,[{key:"connect",value:function(t){var e=this,r="",n="";if("undefined"!=typeof window&&window.location&&"https:"===window.location.protocol&&t.indexOf("wss://")<0)throw new Error("Secure domains require wss connection");this.ws_rpc=new s(t,this.statusCb),this.init_promise=this.ws_rpc.login(r,n).then(function(){e._db=new u(e.ws_rpc,"database"),e._net=new u(e.ws_rpc,"network_broadcast"),e._hist=new u(e.ws_rpc,"history"),e._crypt=new u(e.ws_rpc,"crypto");var t=e._db.init().then(function(){return e._db.exec("get_chain_id",[]).then(function(t){return e.chain_id=t,a.setChainId(t)})});return e.ws_rpc.on_reconnect=function(){e.ws_rpc.login("","").then(function(){e._db.init().then(function(){e.statusCb&&e.statusCb("reconnect")}),e._net.init(),e._hist.init(),e._crypt.init()})},Promise.all([t,e._net.init(),e._hist.init(),e._crypt.init()["catch"](function(t){return console.error("ApiInstance\tCrypto API Error",t)})])})}},{key:"close",value:function(){this.ws_rpc.close(),this.ws_rpc=null}},{key:"db_api",value:function(){return this._db}},{key:"network_api",value:function(){return this._net}},{key:"history_api",value:function(){return this._hist}},{key:"crypto_api",value:function(){return this._crypt}},{key:"setRpcConnectionStatusCallback",value:function(t){this.statusCb=t}}]),t}()},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=void 0;"undefined"!=typeof WebSocket||{NODE_ENV:"production"}.browser?"undefined"!=typeof WebSocket&&(o=r(112)):o=r(298).w3cwebsocket;var s=!1,u=function(){function t(e,r){var i=this;n(this,t),this.statusCb=r;try{this.ws=new o(e)}catch(s){console.error("invalid websocket URL:",s),this.ws=new o("wss://127.0.0.1:8080")}this.ws.timeoutInterval=5e3,this.current_reject=null,this.on_reconnect=null,this.connect_promise=new Promise(function(t,e){i.current_reject=e,i.ws.onopen=function(){i.statusCb&&i.statusCb("open"),i.on_reconnect&&i.on_reconnect(),t()},i.ws.onerror=function(t){i.statusCb&&i.statusCb("error"),i.current_reject&&i.current_reject(t)},i.ws.onmessage=function(t){return i.listener(JSON.parse(t.data))},i.ws.onclose=function(){i.statusCb&&i.statusCb("closed")}}),this.cbId=0,this.cbs={},this.subs={},this.unsub={}}return i(t,[{key:"call",value:function(t){var e=this,r=t[1];if(s&&console.log('[ChainWebSocket] >---- call -----> "id":'+(this.cbId+1),JSON.stringify(t)),this.cbId+=1,"set_subscribe_callback"!==r&&"subscribe_to_market"!==r&&"broadcast_transaction_with_callback"!==r&&"set_pending_transaction_callback"!==r||(this.subs[this.cbId]={callback:t[2][0]},t[2][0]=this.cbId),"unsubscribe_from_market"===r||"unsubscribe_from_accounts"===r){if("function"!=typeof t[2][0])throw new Error("First parameter of unsub must be the original callback");var n=t[2].splice(0,1)[0];for(var i in this.subs)if(this.subs[i].callback===n){this.unsub[this.cbId]=i;break}}var o={method:"call",params:t};return o.id=this.cbId,new Promise(function(t,r){e.cbs[e.cbId]={time:new Date,resolve:t,reject:r},e.ws.onerror=function(t){console.log("!!! ChainWebSocket Error ",t),r(t)},e.ws.send(JSON.stringify(o))})}},{key:"listener",value:function(t){s&&console.log("[ChainWebSocket] <---- reply ----<",JSON.stringify(t));var e=!1,r=null;"notice"===t.method&&(e=!0,t.id=t.params[0]),r=e?this.subs[t.id].callback:this.cbs[t.id],r&&!e?(t.error?r.reject(t.error):r.resolve(t.result),delete this.cbs[t.id],this.unsub[t.id]&&(delete this.subs[this.unsub[t.id]],delete this.unsub[t.id])):r&&e?r(t.params[1]):console.log("Warning: unknown websocket response: ",t)}},{key:"login",value:function(t,e){var r=this;return this.connect_promise.then(function(){return r.call([1,"login",[t,e]])})}},{key:"close",value:function(){this.ws.close()}}]),t}();t.exports=u},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(){function t(e,n){r(this,t),this.ws_rpc=e,this.api_name=n}return n(t,[{key:"init",value:function(){var t=this;return this.ws_rpc.call([1,this.api_name,[]]).then(function(e){return t.api_id=e,t})}},{key:"exec",value:function(t,e){return this.ws_rpc.call([this.api_id,t,e])["catch"](function(r){throw console.log("!!! GrapheneApi error: ",t,e,r,JSON.stringify(r)),r})}}]),t}();t.exports=i},function(t,e){e.read=function(t,e,r,n,i){var o,s,u=8*i-n-1,a=(1<<u)-1,f=a>>1,c=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-c)-1,p>>=-c,c+=u;c>0;o=256*o+t[e+h],h+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=l,c-=8);if(0===o)o=1-f;else{if(o===a)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,u,a,f=8*o-i-1,c=(1<<f)-1,h=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),e+=s+h>=1?l/a:l*Math.pow(2,1-h),e*a>=2&&(s++,a/=2),s+h>=c?(u=0,s=c):s+h>=1?(u=(e*a-1)*Math.pow(2,i),s+=h):(u=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&u,p+=d,u/=256,i-=8);for(s=s<<i|u,f+=i;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*v}},function(t,e,r){!function(e,r){t.exports=r()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return o(t)?t:A(t)}function r(t){return s(t)?t:O(t)}function n(t){return u(t)?t:j(t)}function i(t){return o(t)&&!a(t)?t:D(t)}function o(t){return!(!t||!t[ar])}function s(t){return!(!t||!t[fr])}function u(t){return!(!t||!t[cr])}function a(t){return s(t)||u(t)}function f(t){return!(!t||!t[hr])}function c(t){return t.value=!1,t}function h(t){t&&(t.value=!0)}function l(){}function p(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function d(t){return void 0===t.size&&(t.size=t.__iterate(_)),t.size}function v(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?d(t)+e:e}function _(){return!0}function y(t,e,r){return(0===t||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function g(t,e){return m(t,e,0)}function b(t,e){return m(t,e,e)}function m(t,e,r){return void 0===t?r:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function w(t){this.next=t}function E(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function S(){return{value:void 0,done:!0}}function x(t){return!!B(t)}function k(t){return t&&"function"==typeof t.next}function I(t){var e=B(t);return e&&e.call(t)}function B(t){var e=t&&(Er&&t[Er]||t[Sr]);if("function"==typeof e)return e}function T(t){return t&&"number"==typeof t.length}function A(t){return null===t||void 0===t?U():o(t)?t.toSeq():C(t)}function O(t){return null===t||void 0===t?U().toKeyedSeq():o(t)?s(t)?t.toSeq():t.fromEntrySeq():P(t)}function j(t){return null===t||void 0===t?U():o(t)?s(t)?t.entrySeq():t.toIndexedSeq():N(t)}function D(t){return(null===t||void 0===t?U():o(t)?s(t)?t.entrySeq():t:N(t)).toSetSeq()}function M(t){this._array=t,this.size=t.length}function R(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function z(t){this._iterable=t,this.size=t.length||t.size}function L(t){this._iterator=t,this._iteratorCache=[]}function q(t){return!(!t||!t[kr])}function U(){return Ir||(Ir=new M([]))}function P(t){var e=Array.isArray(t)?new M(t).fromEntrySeq():k(t)?new L(t).fromEntrySeq():x(t)?new z(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function N(t){var e=F(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function C(t){var e=F(t)||"object"==typeof t&&new R(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function F(t){return T(t)?new M(t):k(t)?new L(t):x(t)?new z(t):void 0}function H(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,s=0;s<=o;s++){var u=i[r?o-s:s];if(e(u[1],n?u[0]:s,t)===!1)return s+1}return s}return t.__iterateUncached(e,r)}function K(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,s=0;return new w(function(){var t=i[r?o-s:s];return s++>o?S():E(e,n?t[0]:s-1,t[1])})}return t.__iteratorUncached(e,r)}function V(t,e){return e?W(e,t,"",{"":t}):Y(t)}function W(t,e,r,n){return Array.isArray(e)?t.call(n,r,j(e).map(function(r,n){return W(t,r,n,e)})):G(e)?t.call(n,r,O(e).map(function(r,n){return W(t,r,n,e)})):e}function Y(t){return Array.isArray(t)?j(t).map(Y).toList():G(t)?O(t).map(Y).toMap():t}function G(t){return t&&(t.constructor===Object||void 0===t.constructor)}function Z(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function J(t,e){if(t===e)return!0;if(!o(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||s(t)!==s(e)||u(t)!==u(e)||f(t)!==f(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!a(t);if(f(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&Z(i[1],t)&&(r||Z(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var c=t;t=e,e=c}var h=!0,l=e.__iterate(function(e,n){if(r?!t.has(e):i?!Z(e,t.get(n,_r)):!Z(t.get(n,_r),e))return h=!1,!1});return h&&t.size===l}function X(t,e){if(!(this instanceof X))return new X(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(Br)return Br;Br=this}}function $(t,e){if(!t)throw new Error(e)}function Q(t,e,r){if(!(this instanceof Q))return new Q(t,e,r);if($(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),e<t&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(Tr)return Tr;Tr=this}}function tt(){throw TypeError("Abstract")}function et(){}function rt(){}function nt(){}function it(t){return t>>>1&1073741824|3221225471&t}function ot(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if(t!==t||t===1/0)return 0;var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return it(r)}if("string"===e)return t.length>Lr?st(t):ut(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return at(t);if("function"==typeof t.toString)return ut(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function st(t){var e=Pr[t];return void 0===e&&(e=ut(t),Ur===qr&&(Ur=0,Pr={}),Ur++,Pr[t]=e),e}function ut(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return it(e)}function at(t){var e;if(Mr&&(e=Ar.get(t),void 0!==e))return e;if(e=t[zr],void 0!==e)return e;if(!Dr){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[zr],void 0!==e)return e;if(e=ft(t),void 0!==e)return e}if(e=++Rr,1073741824&Rr&&(Rr=0),Mr)Ar.set(t,e);else{if(void 0!==jr&&jr(t)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(Dr)Object.defineProperty(t,zr,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[zr]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[zr]=e}}return e}function ft(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ct(t){$(t!==1/0,"Cannot perform this action with an infinite size.")}function ht(t){return null===t||void 0===t?Et():lt(t)&&!f(t)?t:Et().withMutations(function(e){var n=r(t);ct(n.size),n.forEach(function(t,r){return e.set(r,t)})})}function lt(t){return!(!t||!t[Nr])}function pt(t,e){this.ownerID=t,this.entries=e}function dt(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function vt(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function _t(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function yt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function gt(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&mt(t._root)}function bt(t,e){return E(t,e[0],e[1])}function mt(t,e){return{node:t,index:0,__prev:e}}function wt(t,e,r,n){var i=Object.create(Cr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Et(){return Fr||(Fr=wt(0))}function St(t,e,r){var n,i;if(t._root){var o=c(yr),s=c(gr);if(n=xt(t._root,t.__ownerID,0,void 0,e,r,o,s),!s.value)return t;i=t.size+(o.value?r===_r?-1:1:0)}else{if(r===_r)return t;i=1,n=new pt(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?wt(i,n):Et()}function xt(t,e,r,n,i,o,s,u){return t?t.update(e,r,n,i,o,s,u):o===_r?t:(h(u),h(s),new yt(e,n,[i,o]))}function kt(t){return t.constructor===yt||t.constructor===_t}function It(t,e,r,n,i){if(t.keyHash===n)return new _t(e,n,[t.entry,i]);var o,s=(0===r?t.keyHash:t.keyHash>>>r)&vr,u=(0===r?n:n>>>r)&vr,a=s===u?[It(t,e,r+pr,n,i)]:(o=new yt(e,n,i),s<u?[t,o]:[o,t]);return new dt(e,1<<s|1<<u,a)}function Bt(t,e,r,n){t||(t=new l);for(var i=new yt(t,ot(r),[r,n]),o=0;o<e.length;o++){var s=e[o];i=i.update(t,0,void 0,s[0],s[1])}return i}function Tt(t,e,r,n){for(var i=0,o=0,s=new Array(r),u=0,a=1,f=e.length;u<f;u++,a<<=1){var c=e[u];void 0!==c&&u!==n&&(i|=a,s[o++]=c)}return new dt(t,i,s)}function At(t,e,r,n,i){for(var o=0,s=new Array(dr),u=0;0!==r;u++,r>>>=1)s[u]=1&r?e[o++]:void 0;return s[n]=i,new vt(t,o+1,s)}function Ot(t,e,n){for(var i=[],s=0;s<n.length;s++){var u=n[s],a=r(u);o(u)||(a=a.map(function(t){return V(t)})),i.push(a)}return Mt(t,e,i)}function jt(t,e,r){return t&&t.mergeDeep&&o(e)?t.mergeDeep(e):Z(t,e)?t:e}function Dt(t){return function(e,r,n){if(e&&e.mergeDeepWith&&o(r))return e.mergeDeepWith(t,r);var i=t(e,r,n);return Z(e,i)?e:i}}function Mt(t,e,r){return r=r.filter(function(t){return 0!==t.size}),0===r.length?t:0!==t.size||t.__ownerID||1!==r.length?t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,_r,function(t){return t===_r?r:e(t,r,n)})}:function(e,r){t.set(r,e)},i=0;i<r.length;i++)r[i].forEach(n)}):t.constructor(r[0])}function Rt(t,e,r,n){var i=t===_r,o=e.next();if(o.done){var s=i?r:t,u=n(s);return u===s?t:u}$(i||t&&t.set,"invalid keyPath");var a=o.value,f=i?_r:t.get(a,_r),c=Rt(f,e,r,n);return c===f?t:c===_r?t.remove(a):(i?Et():t).set(a,c)}function zt(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function Lt(t,e,r,n){var i=n?t:p(t);return i[e]=r,i}function qt(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),s=0,u=0;u<i;u++)u===e?(o[u]=r,s=-1):o[u]=t[u+s];return o}function Ut(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,s=0;s<n;s++)s===e&&(o=1),i[s]=t[s+o];return i}function Pt(t){var e=Kt();if(null===t||void 0===t)return e;if(Nt(t))return t;var r=n(t),i=r.size;return 0===i?e:(ct(i),i>0&&i<dr?Ht(0,i,pr,null,new Ct(r.toArray())):e.withMutations(function(t){t.setSize(i),r.forEach(function(e,r){return t.set(r,e)})}))}function Nt(t){return!(!t||!t[Wr])}function Ct(t,e){this.array=t,this.ownerID=e}function Ft(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===u?a&&a.array:t&&t.array,i=r>o?0:o-r,f=s-r;return f>dr&&(f=dr),function(){if(i===f)return Zr;var t=e?--f:i++;return n&&n[t]}}function i(t,n,i){var u,a=t&&t.array,f=i>o?0:o-i>>n,c=(s-i>>n)+1;return c>dr&&(c=dr),function(){for(;;){if(u){var t=u();if(t!==Zr)return t;u=null}if(f===c)return Zr;var o=e?--c:f++;u=r(a&&a[o],n-pr,i+(o<<n))}}}var o=t._origin,s=t._capacity,u=Xt(s),a=t._tail;return r(t._root,t._level,0)}function Ht(t,e,r,n,i,o,s){var u=Object.create(Yr);return u.size=e-t,u._origin=t,u._capacity=e,u._level=r,u._root=n,u._tail=i,u.__ownerID=o,u.__hash=s,u.__altered=!1,u}function Kt(){return Gr||(Gr=Ht(0,0,pr))}function Vt(t,e,r){if(e=v(t,e),e!==e)return t;if(e>=t.size||e<0)return t.withMutations(function(t){e<0?Zt(t,e).set(0,r):Zt(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,o=c(gr);return e>=Xt(t._capacity)?n=Wt(n,t.__ownerID,0,e,r,o):i=Wt(i,t.__ownerID,t._level,e,r,o),o.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):Ht(t._origin,t._capacity,t._level,i,n):t}function Wt(t,e,r,n,i,o){var s=n>>>r&vr,u=t&&s<t.array.length;if(!u&&void 0===i)return t;var a;if(r>0){var f=t&&t.array[s],c=Wt(f,e,r-pr,n,i,o);return c===f?t:(a=Yt(t,e),a.array[s]=c,a)}return u&&t.array[s]===i?t:(h(o),a=Yt(t,e),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function Yt(t,e){return e&&t&&e===t.ownerID?t:new Ct(t?t.array.slice():[],e)}function Gt(t,e){if(e>=Xt(t._capacity))return t._tail;if(e<1<<t._level+pr){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&vr],n-=pr;return r}}function Zt(t,e,r){void 0!==e&&(e=0|e),void 0!==r&&(r=0|r);var n=t.__ownerID||new l,i=t._origin,o=t._capacity,s=i+e,u=void 0===r?o:r<0?o+r:i+r;if(s===i&&u===o)return t;if(s>=u)return t.clear();for(var a=t._level,f=t._root,c=0;s+c<0;)f=new Ct(f&&f.array.length?[void 0,f]:[],n),a+=pr,c+=1<<a;c&&(s+=c,i+=c,u+=c,o+=c);for(var h=Xt(o),p=Xt(u);p>=1<<a+pr;)f=new Ct(f&&f.array.length?[f]:[],n),a+=pr;var d=t._tail,v=p<h?Gt(t,u-1):p>h?new Ct([],n):d;if(d&&p>h&&s<o&&d.array.length){f=Yt(f,n);for(var _=f,y=a;y>pr;y-=pr){var g=h>>>y&vr;_=_.array[g]=Yt(_.array[g],n)}_.array[h>>>pr&vr]=d}if(u<o&&(v=v&&v.removeAfter(n,0,u)),s>=p)s-=p,u-=p,a=pr,f=null,v=v&&v.removeBefore(n,0,s);else if(s>i||p<h){for(c=0;f;){var b=s>>>a&vr;if(b!==p>>>a&vr)break;b&&(c+=(1<<a)*b),a-=pr,f=f.array[b]}f&&s>i&&(f=f.removeBefore(n,a,s-c)),f&&p<h&&(f=f.removeAfter(n,a,p-c)),c&&(s-=c,u-=c)}return t.__ownerID?(t.size=u-s,t._origin=s,t._capacity=u,t._level=a,t._root=f,t._tail=v,t.__hash=void 0,t.__altered=!0,t):Ht(s,u,a,f,v)}function Jt(t,e,r){for(var i=[],s=0,u=0;u<r.length;u++){var a=r[u],f=n(a);f.size>s&&(s=f.size),o(a)||(f=f.map(function(t){return V(t)})),i.push(f)}return s>t.size&&(t=t.setSize(s)),Mt(t,e,i)}function Xt(t){return t<dr?0:t-1>>>pr<<pr}function $t(t){return null===t||void 0===t?ee():Qt(t)?t:ee().withMutations(function(e){var n=r(t);ct(n.size),n.forEach(function(t,r){return e.set(r,t)})})}function Qt(t){return lt(t)&&f(t)}function te(t,e,r,n){var i=Object.create($t.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function ee(){return Jr||(Jr=te(Et(),Kt()))}function re(t,e,r){var n,i,o=t._map,s=t._list,u=o.get(e),a=void 0!==u;if(r===_r){if(!a)return t;s.size>=dr&&s.size>=2*o.size?(i=s.filter(function(t,e){return void 0!==t&&u!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=u===s.size-1?s.pop():s.set(u,void 0))}else if(a){if(r===s.get(u)[1])return t;n=o,i=s.set(u,[e,r])}else n=o.set(e,s.size),i=s.set(s.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):te(n,i)}function ne(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function se(t){this._iter=t,this.size=t.size}function ue(t){var e=Te(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Ae,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===wr){var n=t.__iterator(e,r);return new w(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===mr?br:mr,r)},e}function ae(t,e,r){var n=Te(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,_r);return o===_r?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,s){return n(e.call(r,t,i,s),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(wr,i);return new w(function(){var i=o.next();if(i.done)return i;var s=i.value,u=s[0];return E(n,u,e.call(r,s[1],u,t),i)})},n}function fe(t,e){var r=Te(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=ue(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=Ae,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function ce(t,e,r,n){var i=Te(t);return n&&(i.has=function(n){var i=t.get(n,_r);return i!==_r&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,_r);return o!==_r&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var s=this,u=0;return t.__iterate(function(t,o,a){if(e.call(r,t,o,a))return u++,i(t,n?o:u-1,s)},o),u},i.__iteratorUncached=function(i,o){var s=t.__iterator(wr,o),u=0;return new w(function(){for(;;){var o=s.next();if(o.done)return o;var a=o.value,f=a[0],c=a[1];if(e.call(r,c,f,t))return E(i,n?f:u++,c,o)}})},i}function he(t,e,r){var n=ht().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function le(t,e,r){var n=s(t),i=(f(t)?$t():ht()).asMutable();t.__iterate(function(o,s){i.update(e.call(r,o,s,t),function(t){return t=t||[],t.push(n?[s,o]:o),t})});var o=Be(t);return i.map(function(e){return xe(t,o(e))})}function pe(t,e,r,n){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==r&&(r=r===1/0?i:0|r),y(e,r,i))return t;var o=g(e,i),s=b(r,i);if(o!==o||s!==s)return pe(t.toSeq().cacheResult(),e,r,n);var u,a=s-o;a===a&&(u=a<0?0:a);var f=Te(t);return f.size=0===u?u:t.size&&u||void 0,!n&&q(t)&&u>=0&&(f.get=function(e,r){return e=v(this,e),e>=0&&e<u?t.get(e+o,r):r}),f.__iterateUncached=function(e,r){var i=this;if(0===u)return 0;if(r)return this.cacheResult().__iterate(e,r);var s=0,a=!0,f=0;return t.__iterate(function(t,r){if(!a||!(a=s++<o))return f++,e(t,n?r:f-1,i)!==!1&&f!==u}),f},f.__iteratorUncached=function(e,r){if(0!==u&&r)return this.cacheResult().__iterator(e,r);var i=0!==u&&t.__iterator(e,r),s=0,a=0;return new w(function(){for(;s++<o;)i.next();if(++a>u)return S();var t=i.next();return n||e===mr?t:e===br?E(e,a-1,void 0,t):E(e,a-1,t.value[1],t)})},f}function de(t,e,r){var n=Te(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var s=0;return t.__iterate(function(t,i,u){return e.call(r,t,i,u)&&++s&&n(t,i,o)}),s},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var s=t.__iterator(wr,i),u=!0;return new w(function(){if(!u)return S();var t=s.next();if(t.done)return t;var i=t.value,a=i[0],f=i[1];return e.call(r,f,a,o)?n===wr?t:E(n,a,f,t):(u=!1,S())})},n}function ve(t,e,r,n){var i=Te(t);return i.__iterateUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterate(i,o);var u=!0,a=0;return t.__iterate(function(t,o,f){if(!u||!(u=e.call(r,t,o,f)))return a++,i(t,n?o:a-1,s)}),a},i.__iteratorUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterator(i,o);var u=t.__iterator(wr,o),a=!0,f=0;return new w(function(){var t,o,c;do{if(t=u.next(),t.done)return n||i===mr?t:i===br?E(i,f++,void 0,t):E(i,f++,t.value[1],t);
var h=t.value;o=h[0],c=h[1],a&&(a=e.call(r,c,o,s))}while(a);return i===wr?t:E(i,o,c,t)})},i}function _e(t,e){var n=s(t),i=[t].concat(e).map(function(t){return o(t)?n&&(t=r(t)):t=n?P(t):N(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var a=i[0];if(a===t||n&&s(a)||u(t)&&u(a))return a}var f=new M(i);return n?f=f.toKeyedSeq():u(t)||(f=f.toSetSeq()),f=f.flatten(!0),f.size=i.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),f}function ye(t,e,r){var n=Te(t);return n.__iterateUncached=function(n,i){function s(t,f){var c=this;t.__iterate(function(t,i){return(!e||f<e)&&o(t)?s(t,f+1):n(t,r?i:u++,c)===!1&&(a=!0),!a},i)}var u=0,a=!1;return s(t,0),u},n.__iteratorUncached=function(n,i){var s=t.__iterator(n,i),u=[],a=0;return new w(function(){for(;s;){var t=s.next();if(t.done===!1){var f=t.value;if(n===wr&&(f=f[1]),e&&!(u.length<e)||!o(f))return r?t:E(n,a++,f,t);u.push(s),s=f.__iterator(n,i)}else s=u.pop()}return S()})},n}function ge(t,e,r){var n=Be(t);return t.toSeq().map(function(i,o){return n(e.call(r,i,o,t))}).flatten(!0)}function be(t,e){var r=Te(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate(function(t,n){return(!o||r(e,o++,i)!==!1)&&r(t,o++,i)!==!1},n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(mr,n),s=0;return new w(function(){return(!i||s%2)&&(i=o.next(),i.done)?i:s%2?E(r,s++,e):E(r,s++,i.value,i)})},r}function me(t,e,r){e||(e=Oe);var n=s(t),i=0,o=t.toSeq().map(function(e,n){return[n,e,i++,r?r(e,n,t):e]}).toArray();return o.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?O(o):u(t)?j(o):D(o)}function we(t,e,r){if(e||(e=Oe),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return Ee(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return Ee(e,t,r)?r:t})}function Ee(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(void 0===r||null===r||r!==r)||n>0}function Se(t,r,n){var i=Te(t);return i.size=new M(n).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(mr,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(t,i){var o=n.map(function(t){return t=e(t),I(i?t.reverse():t)}),s=0,u=!1;return new w(function(){var e;return u||(e=o.map(function(t){return t.next()}),u=e.some(function(t){return t.done})),u?S():E(t,s++,r.apply(null,e.map(function(t){return t.value})))})},i}function xe(t,e){return q(t)?e:t.constructor(e)}function ke(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Ie(t){return ct(t.size),d(t)}function Be(t){return s(t)?r:u(t)?n:i}function Te(t){return Object.create((s(t)?O:u(t)?j:D).prototype)}function Ae(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):A.prototype.cacheResult.call(this)}function Oe(t,e){return t>e?1:t<e?-1:0}function je(t){var r=I(t);if(!r){if(!T(t))throw new TypeError("Expected iterable or array-like: "+t);r=I(e(t))}return r}function De(t,e){var r,n=function(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(t);ze(i,s),i.size=s.length,i._name=e,i._keys=s,i._defaultValues=t}this._map=ht(o)},i=n.prototype=Object.create(Xr);return i.constructor=n,n}function Me(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Re(t){return t._name||t.constructor.name||"Record"}function ze(t,e){try{e.forEach(Le.bind(void 0,t))}catch(r){}}function Le(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){$(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function qe(t){return null===t||void 0===t?Ce():Ue(t)&&!f(t)?t:Ce().withMutations(function(e){var r=i(t);ct(r.size),r.forEach(function(t){return e.add(t)})})}function Ue(t){return!(!t||!t[$r])}function Pe(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Ne(t,e){var r=Object.create(Qr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ce(){return tn||(tn=Ne(Et()))}function Fe(t){return null===t||void 0===t?Ve():He(t)?t:Ve().withMutations(function(e){var r=i(t);ct(r.size),r.forEach(function(t){return e.add(t)})})}function He(t){return Ue(t)&&f(t)}function Ke(t,e){var r=Object.create(en);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ve(){return rn||(rn=Ke(ee()))}function We(t){return null===t||void 0===t?Ze():Ye(t)?t:Ze().unshiftAll(t)}function Ye(t){return!(!t||!t[nn])}function Ge(t,e,r,n){var i=Object.create(on);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ze(){return sn||(sn=Ge(0))}function Je(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Xe(t,e){return e}function $e(t,e){return[e,t]}function Qe(t){return function(){return!t.apply(this,arguments)}}function tr(t){return function(){return-t.apply(this,arguments)}}function er(t){return"string"==typeof t?JSON.stringify(t):String(t)}function rr(){return p(arguments)}function nr(t,e){return t<e?1:t>e?-1:0}function ir(t){if(t.size===1/0)return 0;var e=f(t),r=s(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+sr(ot(t),ot(e))|0}:function(t,e){n=n+sr(ot(t),ot(e))|0}:e?function(t){n=31*n+ot(t)|0}:function(t){n=n+ot(t)|0});return or(i,n)}function or(t,e){return e=Or(e,3432918353),e=Or(e<<15|e>>>-15,461845907),e=Or(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Or(e^e>>>16,2246822507),e=Or(e^e>>>13,3266489909),e=it(e^e>>>16)}function sr(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var ur=Array.prototype.slice;t(r,e),t(n,e),t(i,e),e.isIterable=o,e.isKeyed=s,e.isIndexed=u,e.isAssociative=a,e.isOrdered=f,e.Keyed=r,e.Indexed=n,e.Set=i;var ar="@@__IMMUTABLE_ITERABLE__@@",fr="@@__IMMUTABLE_KEYED__@@",cr="@@__IMMUTABLE_INDEXED__@@",hr="@@__IMMUTABLE_ORDERED__@@",lr="delete",pr=5,dr=1<<pr,vr=dr-1,_r={},yr={value:!1},gr={value:!1},br=0,mr=1,wr=2,Er="function"==typeof Symbol&&Symbol.iterator,Sr="@@iterator",xr=Er||Sr;w.prototype.toString=function(){return"[Iterator]"},w.KEYS=br,w.VALUES=mr,w.ENTRIES=wr,w.prototype.inspect=w.prototype.toSource=function(){return this.toString()},w.prototype[xr]=function(){return this},t(A,e),A.of=function(){return A(arguments)},A.prototype.toSeq=function(){return this},A.prototype.toString=function(){return this.__toString("Seq {","}")},A.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},A.prototype.__iterate=function(t,e){return H(this,t,e,!0)},A.prototype.__iterator=function(t,e){return K(this,t,e,!0)},t(O,A),O.prototype.toKeyedSeq=function(){return this},t(j,A),j.of=function(){return j(arguments)},j.prototype.toIndexedSeq=function(){return this},j.prototype.toString=function(){return this.__toString("Seq [","]")},j.prototype.__iterate=function(t,e){return H(this,t,e,!1)},j.prototype.__iterator=function(t,e){return K(this,t,e,!1)},t(D,A),D.of=function(){return D(arguments)},D.prototype.toSetSeq=function(){return this},A.isSeq=q,A.Keyed=O,A.Set=D,A.Indexed=j;var kr="@@__IMMUTABLE_SEQ__@@";A.prototype[kr]=!0,t(M,j),M.prototype.get=function(t,e){return this.has(t)?this._array[v(this,t)]:e},M.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length-1,i=0;i<=n;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},M.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new w(function(){return i>n?S():E(t,i,r[e?n-i++:i++])})},t(R,O),R.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},R.prototype.has=function(t){return this._object.hasOwnProperty(t)},R.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;o<=i;o++){var s=n[e?i-o:o];if(t(r[s],s,this)===!1)return o+1}return o},R.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new w(function(){var s=n[e?i-o:o];return o++>i?S():E(t,s,r[s])})},R.prototype[hr]=!0,t(z,j),z.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=I(r),i=0;if(k(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},z.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=I(r);if(!k(n))return new w(S);var i=0;return new w(function(){var e=n.next();return e.done?e:E(t,i++,e.value)})},t(L,j),L.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;i<n.length;)if(t(n[i],i++,this)===!1)return i;for(var o;!(o=r.next()).done;){var s=o.value;if(n[i]=s,t(s,i++,this)===!1)break}return i},L.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new w(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return E(t,i,n[i++])})};var Ir;t(X,j),X.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},X.prototype.get=function(t,e){return this.has(t)?this._value:e},X.prototype.includes=function(t){return Z(this._value,t)},X.prototype.slice=function(t,e){var r=this.size;return y(t,e,r)?this:new X(this._value,b(e,r)-g(t,r))},X.prototype.reverse=function(){return this},X.prototype.indexOf=function(t){return Z(this._value,t)?0:-1},X.prototype.lastIndexOf=function(t){return Z(this._value,t)?this.size:-1},X.prototype.__iterate=function(t,e){for(var r=0;r<this.size;r++)if(t(this._value,r,this)===!1)return r+1;return r},X.prototype.__iterator=function(t,e){var r=this,n=0;return new w(function(){return n<r.size?E(t,n++,r._value):S()})},X.prototype.equals=function(t){return t instanceof X?Z(this._value,t._value):J(t)};var Br;t(Q,j),Q.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},Q.prototype.get=function(t,e){return this.has(t)?this._start+v(this,t)*this._step:e},Q.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},Q.prototype.slice=function(t,e){return y(t,e,this.size)?this:(t=g(t,this.size),e=b(e,this.size),e<=t?new Q(0,0):new Q(this.get(t,this._end),this.get(e,this._end),this._step))},Q.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},Q.prototype.lastIndexOf=function(t){return this.indexOf(t)},Q.prototype.__iterate=function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;o<=r;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},Q.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new w(function(){var s=i;return i+=e?-n:n,o>r?S():E(t,o++,s)})},Q.prototype.equals=function(t){return t instanceof Q?this._start===t._start&&this._end===t._end&&this._step===t._step:J(this,t)};var Tr;t(tt,e),t(et,tt),t(rt,tt),t(nt,tt),tt.Keyed=et,tt.Indexed=rt,tt.Set=nt;var Ar,Or="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},jr=Object.isExtensible,Dr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Mr="function"==typeof WeakMap;Mr&&(Ar=new WeakMap);var Rr=0,zr="__immutablehash__";"function"==typeof Symbol&&(zr=Symbol(zr));var Lr=16,qr=255,Ur=0,Pr={};t(ht,et),ht.of=function(){var t=ur.call(arguments,0);return Et().withMutations(function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}})},ht.prototype.toString=function(){return this.__toString("Map {","}")},ht.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},ht.prototype.set=function(t,e){return St(this,t,e)},ht.prototype.setIn=function(t,e){return this.updateIn(t,_r,function(){return e})},ht.prototype.remove=function(t){return St(this,t,_r)},ht.prototype.deleteIn=function(t){return this.updateIn(t,function(){return _r})},ht.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},ht.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=Rt(this,je(t),e,r);return n===_r?void 0:n},ht.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Et()},ht.prototype.merge=function(){return Ot(this,void 0,arguments)},ht.prototype.mergeWith=function(t){var e=ur.call(arguments,1);return Ot(this,t,e)},ht.prototype.mergeIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Et(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},ht.prototype.mergeDeep=function(){return Ot(this,jt,arguments)},ht.prototype.mergeDeepWith=function(t){var e=ur.call(arguments,1);return Ot(this,Dt(t),e)},ht.prototype.mergeDeepIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Et(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},ht.prototype.sort=function(t){return $t(me(this,t))},ht.prototype.sortBy=function(t,e){return $t(me(this,e,t))},ht.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},ht.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new l)},ht.prototype.asImmutable=function(){return this.__ensureOwner()},ht.prototype.wasAltered=function(){return this.__altered},ht.prototype.__iterator=function(t,e){return new gt(this,t,e)},ht.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},ht.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?wt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},ht.isMap=lt;var Nr="@@__IMMUTABLE_MAP__@@",Cr=ht.prototype;Cr[Nr]=!0,Cr[lr]=Cr.remove,Cr.removeIn=Cr.deleteIn,pt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(Z(r,i[o][0]))return i[o][1];return n},pt.prototype.update=function(t,e,r,n,i,o,s){for(var u=i===_r,a=this.entries,f=0,c=a.length;f<c&&!Z(n,a[f][0]);f++);var l=f<c;if(l?a[f][1]===i:u)return this;if(h(s),(u||!l)&&h(o),!u||1!==a.length){if(!l&&!u&&a.length>=Hr)return Bt(t,a,n,i);var d=t&&t===this.ownerID,v=d?a:p(a);return l?u?f===c-1?v.pop():v[f]=v.pop():v[f]=[n,i]:v.push([n,i]),d?(this.entries=v,this):new pt(t,v)}},dt.prototype.get=function(t,e,r,n){void 0===e&&(e=ot(r));var i=1<<((0===t?e:e>>>t)&vr),o=this.bitmap;return 0===(o&i)?n:this.nodes[zt(o&i-1)].get(t+pr,e,r,n)},dt.prototype.update=function(t,e,r,n,i,o,s){void 0===r&&(r=ot(n));var u=(0===e?r:r>>>e)&vr,a=1<<u,f=this.bitmap,c=0!==(f&a);if(!c&&i===_r)return this;var h=zt(f&a-1),l=this.nodes,p=c?l[h]:void 0,d=xt(p,t,e+pr,r,n,i,o,s);if(d===p)return this;if(!c&&d&&l.length>=Kr)return At(t,l,f,u,d);if(c&&!d&&2===l.length&&kt(l[1^h]))return l[1^h];if(c&&d&&1===l.length&&kt(d))return d;var v=t&&t===this.ownerID,_=c?d?f:f^a:f|a,y=c?d?Lt(l,h,d,v):Ut(l,h,v):qt(l,h,d,v);return v?(this.bitmap=_,this.nodes=y,this):new dt(t,_,y)},vt.prototype.get=function(t,e,r,n){void 0===e&&(e=ot(r));var i=(0===t?e:e>>>t)&vr,o=this.nodes[i];return o?o.get(t+pr,e,r,n):n},vt.prototype.update=function(t,e,r,n,i,o,s){void 0===r&&(r=ot(n));var u=(0===e?r:r>>>e)&vr,a=i===_r,f=this.nodes,c=f[u];if(a&&!c)return this;var h=xt(c,t,e+pr,r,n,i,o,s);if(h===c)return this;var l=this.count;if(c){if(!h&&(l--,l<Vr))return Tt(t,f,l,u)}else l++;var p=t&&t===this.ownerID,d=Lt(f,u,h,p);return p?(this.count=l,this.nodes=d,this):new vt(t,l,d)},_t.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(Z(r,i[o][0]))return i[o][1];return n},_t.prototype.update=function(t,e,r,n,i,o,s){void 0===r&&(r=ot(n));var u=i===_r;if(r!==this.keyHash)return u?this:(h(s),h(o),It(this,t,e,r,[n,i]));for(var a=this.entries,f=0,c=a.length;f<c&&!Z(n,a[f][0]);f++);var l=f<c;if(l?a[f][1]===i:u)return this;if(h(s),(u||!l)&&h(o),u&&2===c)return new yt(t,this.keyHash,a[1^f]);var d=t&&t===this.ownerID,v=d?a:p(a);return l?u?f===c-1?v.pop():v[f]=v.pop():v[f]=[n,i]:v.push([n,i]),d?(this.entries=v,this):new _t(t,this.keyHash,v)},yt.prototype.get=function(t,e,r,n){return Z(r,this.entry[0])?this.entry[1]:n},yt.prototype.update=function(t,e,r,n,i,o,s){var u=i===_r,a=Z(n,this.entry[0]);return(a?i===this.entry[1]:u)?this:(h(s),u?void h(o):a?t&&t===this.ownerID?(this.entry[1]=i,this):new yt(t,this.keyHash,[n,i]):(h(o),It(this,t,e,ot(n),[n,i])))},pt.prototype.iterate=_t.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(t(r[e?i-n:n])===!1)return!1},dt.prototype.iterate=vt.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},yt.prototype.iterate=function(t,e){return t(this.entry)},t(gt,w),gt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return bt(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,i<=r)return bt(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,i<=r){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return bt(t,o.entry);e=this._stack=mt(o,e)}continue}e=this._stack=this._stack.__prev}return S()};var Fr,Hr=dr/4,Kr=dr/2,Vr=dr/4;t(Pt,rt),Pt.of=function(){return this(arguments)},Pt.prototype.toString=function(){return this.__toString("List [","]")},Pt.prototype.get=function(t,e){if(t=v(this,t),t>=0&&t<this.size){t+=this._origin;var r=Gt(this,t);return r&&r.array[t&vr]}return e},Pt.prototype.set=function(t,e){return Vt(this,t,e)},Pt.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},Pt.prototype.insert=function(t,e){return this.splice(t,0,e)},Pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=pr,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Kt()},Pt.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(r){Zt(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])})},Pt.prototype.pop=function(){return Zt(this,0,-1)},Pt.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){Zt(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])})},Pt.prototype.shift=function(){return Zt(this,1)},Pt.prototype.merge=function(){return Jt(this,void 0,arguments)},Pt.prototype.mergeWith=function(t){var e=ur.call(arguments,1);return Jt(this,t,e)},Pt.prototype.mergeDeep=function(){return Jt(this,jt,arguments)},Pt.prototype.mergeDeepWith=function(t){var e=ur.call(arguments,1);return Jt(this,Dt(t),e)},Pt.prototype.setSize=function(t){return Zt(this,0,t)},Pt.prototype.slice=function(t,e){var r=this.size;return y(t,e,r)?this:Zt(this,g(t,r),b(e,r))},Pt.prototype.__iterator=function(t,e){var r=0,n=Ft(this,e);return new w(function(){var e=n();return e===Zr?S():E(t,r++,e)})},Pt.prototype.__iterate=function(t,e){for(var r,n=0,i=Ft(this,e);(r=i())!==Zr&&t(r,n++,this)!==!1;);return n},Pt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ht(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},Pt.isList=Nt;var Wr="@@__IMMUTABLE_LIST__@@",Yr=Pt.prototype;Yr[Wr]=!0,Yr[lr]=Yr.remove,Yr.setIn=Cr.setIn,Yr.deleteIn=Yr.removeIn=Cr.removeIn,Yr.update=Cr.update,Yr.updateIn=Cr.updateIn,Yr.mergeIn=Cr.mergeIn,Yr.mergeDeepIn=Cr.mergeDeepIn,Yr.withMutations=Cr.withMutations,Yr.asMutable=Cr.asMutable,Yr.asImmutable=Cr.asImmutable,Yr.wasAltered=Cr.wasAltered,Ct.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&vr;if(n>=this.array.length)return new Ct([],t);var i,o=0===n;if(e>0){var s=this.array[n];if(i=s&&s.removeBefore(t,e-pr,r),i===s&&o)return this}if(o&&!i)return this;var u=Yt(this,t);if(!o)for(var a=0;a<n;a++)u.array[a]=void 0;return i&&(u.array[n]=i),u},Ct.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n=r-1>>>e&vr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-pr,r),i===o&&n===this.array.length-1)return this}var s=Yt(this,t);return s.array.splice(n+1),i&&(s.array[n]=i),s};var Gr,Zr={};t($t,ht),$t.of=function(){return this(arguments)},$t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},$t.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},$t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},$t.prototype.set=function(t,e){return re(this,t,e)},$t.prototype.remove=function(t){return re(this,t,_r)},$t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},$t.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},$t.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},$t.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?te(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},$t.isOrderedMap=Qt,$t.prototype[hr]=!0,$t.prototype[lr]=$t.prototype.remove;var Jr;t(ne,O),ne.prototype.get=function(t,e){return this._iter.get(t,e)},ne.prototype.has=function(t){return this._iter.has(t)},ne.prototype.valueSeq=function(){return this._iter.valueSeq()},ne.prototype.reverse=function(){var t=this,e=fe(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},ne.prototype.map=function(t,e){var r=this,n=ae(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},ne.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?Ie(this):0,function(i){return t(i,e?--r:r++,n)}),e)},ne.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(mr,e),n=e?Ie(this):0;return new w(function(){var i=r.next();return i.done?i:E(t,e?--n:n++,i.value,i)})},ne.prototype[hr]=!0,t(ie,j),ie.prototype.includes=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ie.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e),n=0;return new w(function(){var e=r.next();return e.done?e:E(t,n++,e.value,e)})},t(oe,D),oe.prototype.has=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},oe.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e);return new w(function(){var e=r.next();return e.done?e:E(t,e.value,e.value,e)})},t(se,O),se.prototype.entrySeq=function(){return this._iter.toSeq()},se.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){ke(e);var n=o(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},se.prototype.__iterator=function(t,e){var r=this._iter.__iterator(mr,e);return new w(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){ke(n);var i=o(n);return E(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ie.prototype.cacheResult=ne.prototype.cacheResult=oe.prototype.cacheResult=se.prototype.cacheResult=Ae,t(De,et),De.prototype.toString=function(){return this.__toString(Re(this)+" {","}")},De.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},De.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},De.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Me(this,Et()))},De.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+Re(this));if(this._map&&!this._map.has(t)){var r=this._defaultValues[t];if(e===r)return this}var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:Me(this,n)},De.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Me(this,e)},De.prototype.wasAltered=function(){return this._map.wasAltered()},De.prototype.__iterator=function(t,e){var n=this;return r(this._defaultValues).map(function(t,e){return n.get(e)}).__iterator(t,e)},De.prototype.__iterate=function(t,e){var n=this;return r(this._defaultValues).map(function(t,e){return n.get(e)}).__iterate(t,e)},De.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Me(this,e,t):(this.__ownerID=t,this._map=e,this)};var Xr=De.prototype;Xr[lr]=Xr.remove,Xr.deleteIn=Xr.removeIn=Cr.removeIn,Xr.merge=Cr.merge,Xr.mergeWith=Cr.mergeWith,Xr.mergeIn=Cr.mergeIn,Xr.mergeDeep=Cr.mergeDeep,Xr.mergeDeepWith=Cr.mergeDeepWith,Xr.mergeDeepIn=Cr.mergeDeepIn,Xr.setIn=Cr.setIn,Xr.update=Cr.update,Xr.updateIn=Cr.updateIn,Xr.withMutations=Cr.withMutations,Xr.asMutable=Cr.asMutable,Xr.asImmutable=Cr.asImmutable,t(qe,nt),qe.of=function(){return this(arguments)},qe.fromKeys=function(t){return this(r(t).keySeq())},qe.prototype.toString=function(){return this.__toString("Set {","}")},qe.prototype.has=function(t){return this._map.has(t)},qe.prototype.add=function(t){return Pe(this,this._map.set(t,!0))},qe.prototype.remove=function(t){return Pe(this,this._map.remove(t))},qe.prototype.clear=function(){return Pe(this,this._map.clear())},qe.prototype.union=function(){var t=ur.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r<t.length;r++)i(t[r]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},qe.prototype.intersect=function(){var t=ur.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.every(function(t){return t.includes(e)})||r.remove(e)})})},qe.prototype.subtract=function(){var t=ur.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.remove(e)})})},qe.prototype.merge=function(){return this.union.apply(this,arguments)},qe.prototype.mergeWith=function(t){var e=ur.call(arguments,1);return this.union.apply(this,e)},qe.prototype.sort=function(t){return Fe(me(this,t))},qe.prototype.sortBy=function(t,e){return Fe(me(this,e,t))},qe.prototype.wasAltered=function(){return this._map.wasAltered()},qe.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},qe.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},qe.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},qe.isSet=Ue;var $r="@@__IMMUTABLE_SET__@@",Qr=qe.prototype;Qr[$r]=!0,Qr[lr]=Qr.remove,Qr.mergeDeep=Qr.merge,Qr.mergeDeepWith=Qr.mergeWith,Qr.withMutations=Cr.withMutations,Qr.asMutable=Cr.asMutable,Qr.asImmutable=Cr.asImmutable,Qr.__empty=Ce,Qr.__make=Ne;var tn;t(Fe,qe),Fe.of=function(){return this(arguments)},Fe.fromKeys=function(t){return this(r(t).keySeq())},Fe.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Fe.isOrderedSet=He;var en=Fe.prototype;en[hr]=!0,en.__empty=Ve,en.__make=Ke;var rn;t(We,rt),We.of=function(){return this(arguments)},We.prototype.toString=function(){return this.__toString("Stack [","]")},We.prototype.get=function(t,e){var r=this._head;for(t=v(this,t);r&&t--;)r=r.next;return r?r.value:e},We.prototype.peek=function(){return this._head&&this._head.value},We.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Ge(t,e)},We.prototype.pushAll=function(t){if(t=n(t),0===t.size)return this;ct(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Ge(e,r)},We.prototype.pop=function(){return this.slice(1)},We.prototype.unshift=function(){return this.push.apply(this,arguments)},We.prototype.unshiftAll=function(t){return this.pushAll(t)},We.prototype.shift=function(){return this.pop.apply(this,arguments)},We.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ze()},We.prototype.slice=function(t,e){if(y(t,e,this.size))return this;var r=g(t,this.size),n=b(e,this.size);if(n!==this.size)return rt.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Ge(i,o)},We.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ge(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},We.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},We.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new w(function(){if(n){var e=n.value;return n=n.next,E(t,r++,e)}return S()})},We.isStack=Ye;var nn="@@__IMMUTABLE_STACK__@@",on=We.prototype;on[nn]=!0,on.withMutations=Cr.withMutations,on.asMutable=Cr.asMutable,on.asImmutable=Cr.asImmutable,on.wasAltered=Cr.wasAltered;var sn;e.Iterator=w,Je(e,{toArray:function(){ct(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new ie(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new ne(this,(!0))},toMap:function(){return ht(this.toKeyedSeq())},toObject:function(){ct(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return $t(this.toKeyedSeq())},toOrderedSet:function(){return Fe(s(this)?this.valueSeq():this)},toSet:function(){return qe(s(this)?this.valueSeq():this)},toSetSeq:function(){return new oe(this)},toSeq:function(){return u(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return We(s(this)?this.valueSeq():this)},toList:function(){return Pt(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var t=ur.call(arguments,0);return xe(this,_e(this,t))},includes:function(t){return this.some(function(e){return Z(e,t)})},entries:function(){return this.__iterator(wr)},every:function(t,e){ct(this.size);var r=!0;return this.__iterate(function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1}),r},filter:function(t,e){return xe(this,ce(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return ct(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){ct(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){
r?r=!1:e+=t,e+=null!==n&&void 0!==n?n.toString():""}),e},keys:function(){return this.__iterator(br)},map:function(t,e){return xe(this,ae(this,t,e))},reduce:function(t,e,r){ct(this.size);var n,i;return arguments.length<2?i=!0:n=e,this.__iterate(function(e,o,s){i?(i=!1,n=e):n=t.call(r,n,e,o,s)}),n},reduceRight:function(t,e,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return xe(this,fe(this,!0))},slice:function(t,e){return xe(this,pe(this,t,e,!0))},some:function(t,e){return!this.every(Qe(t),e)},sort:function(t){return xe(this,me(this,t))},values:function(){return this.__iterator(mr)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return d(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return he(this,t,e)},equals:function(t){return J(this,t)},entrySeq:function(){var t=this;if(t._cache)return new M(t._cache);var e=t.toSeq().map($e).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Qe(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate(function(r,i,o){if(t.call(e,r,i,o))return n=[i,r],!1}),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(_)},flatMap:function(t,e){return xe(this,ge(this,t,e))},flatten:function(t){return xe(this,ye(this,t,!0))},fromEntrySeq:function(){return new se(this)},get:function(t,e){return this.find(function(e,r){return Z(r,t)},void 0,e)},getIn:function(t,e){for(var r,n=this,i=je(t);!(r=i.next()).done;){var o=r.value;if(n=n&&n.get?n.get(o,_r):_r,n===_r)return e}return n},groupBy:function(t,e){return le(this,t,e)},has:function(t){return this.get(t,_r)!==_r},hasIn:function(t){return this.getIn(t,_r)!==_r},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return Z(e,t)})},keySeq:function(){return this.toSeq().map(Xe).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return we(this,t)},maxBy:function(t,e){return we(this,e,t)},min:function(t){return we(this,t?tr(t):nr)},minBy:function(t,e){return we(this,e?tr(e):nr,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return xe(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return xe(this,ve(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Qe(t),e)},sortBy:function(t,e){return xe(this,me(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return xe(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return xe(this,de(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Qe(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var un=e.prototype;un[ar]=!0,un[xr]=un.values,un.__toJS=un.toArray,un.__toStringMapper=er,un.inspect=un.toSource=function(){return this.toString()},un.chain=un.flatMap,un.contains=un.includes,Je(r,{flip:function(){return xe(this,ue(this))},mapEntries:function(t,e){var r=this,n=0;return xe(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return xe(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}});var an=r.prototype;an[fr]=!0,an[xr]=un.entries,an.__toJS=un.toObject,an.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+er(t)},Je(n,{toKeyedSeq:function(){return new ne(this,(!1))},filter:function(t,e){return xe(this,ce(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return xe(this,fe(this,!1))},slice:function(t,e){return xe(this,pe(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=g(t,t<0?this.count():this.size);var n=this.slice(0,t);return xe(this,1===r?n:n.concat(p(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(){return this.get(0)},flatten:function(t){return xe(this,ye(this,t,!1))},get:function(t,e){return t=v(this,t),t<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=v(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t<this.size:this.indexOf(t)!==-1)},interpose:function(t){return xe(this,be(this,t))},interleave:function(){var t=[this].concat(p(arguments)),e=Se(this.toSeq(),j.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),xe(this,r)},keySeq:function(){return Q(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,e){return xe(this,ve(this,t,e,!1))},zip:function(){var t=[this].concat(p(arguments));return xe(this,Se(this,rr,t))},zipWith:function(t){var e=p(arguments);return e[0]=this,xe(this,Se(this,t,e))}}),n.prototype[cr]=!0,n.prototype[hr]=!0,Je(i,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=un.includes,i.prototype.contains=i.prototype.includes,Je(O,r.prototype),Je(j,n.prototype),Je(D,i.prototype),Je(et,r.prototype),Je(rt,n.prototype),Je(nt,i.prototype);var fn={Iterable:e,Seq:A,Collection:tt,Map:ht,OrderedMap:$t,List:Pt,Stack:We,Set:qe,OrderedSet:Fe,Record:De,Range:Q,Repeat:X,is:Z,fromJS:V};return fn})},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){t.exports={_args:[["bigi@^1.4.1","/home/travis/build/decentral-exchange/build/bitshares-2-ui/web/node_modules/graphenejs-lib"]],_from:"bigi@>=1.4.1 <2.0.0",_id:"[email protected]",_inCache:!0,_installable:!0,_location:"/bigi",_nodeVersion:"6.1.0",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/bigi-1.4.2.tgz_1469584192413_0.6801238611806184"},_npmUser:{email:"[email protected]",name:"jprichardson"},_npmVersion:"3.8.6",_phantomChildren:{},_requested:{name:"bigi",raw:"bigi@^1.4.1",rawSpec:"^1.4.1",scope:null,spec:">=1.4.1 <2.0.0",type:"range"},_requiredBy:["/ecurve","/graphenejs-lib"],_resolved:"https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz",_shasum:"9c665a95f88b8b08fc05cfd731f561859d725825",_shrinkwrap:null,_spec:"bigi@^1.4.1",_where:"/home/travis/build/decentral-exchange/build/bitshares-2-ui/web/node_modules/graphenejs-lib",bugs:{url:"https://github.com/cryptocoinjs/bigi/issues"},dependencies:{},description:"Big integers.",devDependencies:{coveralls:"^2.11.2",istanbul:"^0.3.5",jshint:"^2.5.1",mocha:"^2.1.0",mochify:"^2.1.0"},directories:{},dist:{shasum:"9c665a95f88b8b08fc05cfd731f561859d725825",tarball:"https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz"},gitHead:"c25308081c896ff84702303722bf5ecd8b3f78e3",homepage:"https://github.com/cryptocoinjs/bigi#readme",keywords:["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],main:"./lib/index.js",maintainers:[{email:"[email protected]",name:"midnightlightning"},{email:"[email protected]",name:"sidazhang"},{email:"[email protected]",name:"nadav"},{email:"[email protected]",name:"jprichardson"}],name:"bigi",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/cryptocoinjs/bigi.git"},scripts:{"browser-test":"mochify --wd -R spec",coverage:"istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",coveralls:"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info",jshint:"jshint --config jshint.json lib/*.js ; true",test:"_mocha -- test/*.js",unit:"mocha"},testling:{browsers:["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"],files:"test/*.js",harness:"mocha"},version:"1.4.2"}},function(t,e){t.exports={secp128r1:{p:"fffffffdffffffffffffffffffffffff",a:"fffffffdfffffffffffffffffffffffc",b:"e87579c11079f43dd824993c2cee5ed3",n:"fffffffe0000000075a30d1b9038a115",h:"01",Gx:"161ff7528b899b2d0c28607ca52c5b86",Gy:"cf5ac8395bafeb13c02da292dded7a83"},secp160k1:{p:"fffffffffffffffffffffffffffffffeffffac73",a:"00",b:"07",n:"0100000000000000000001b8fa16dfab9aca16b6b3",h:"01",Gx:"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb",Gy:"938cf935318fdced6bc28286531733c3f03c4fee"},secp160r1:{p:"ffffffffffffffffffffffffffffffff7fffffff",a:"ffffffffffffffffffffffffffffffff7ffffffc",b:"1c97befc54bd7a8b65acf89f81d4d4adc565fa45",n:"0100000000000000000001f4c8f927aed3ca752257",h:"01",Gx:"4a96b5688ef573284664698968c38bb913cbfc82",Gy:"23a628553168947d59dcc912042351377ac5fb32"},secp192k1:{p:"fffffffffffffffffffffffffffffffffffffffeffffee37",a:"00",b:"03",n:"fffffffffffffffffffffffe26f2fc170f69466a74defd8d",h:"01",Gx:"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d",Gy:"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},secp192r1:{p:"fffffffffffffffffffffffffffffffeffffffffffffffff",a:"fffffffffffffffffffffffffffffffefffffffffffffffc",b:"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",n:"ffffffffffffffffffffffff99def836146bc9b1b4d22831",h:"01",Gx:"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",Gy:"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},secp256k1:{p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},secp256r1:{p:"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",a:"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc",b:"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",n:"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",h:"01",Gx:"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",Gy:"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}},function(t,e,r){(function(e){t.exports=function(t){function r(t,e,r,i,o,s){if("function"==typeof o&&(s=o,o=void 0),"function"!=typeof s)throw new Error("No callback provided to pbkdf2");setTimeout(function(){var u;try{u=n(t,e,r,i,o)}catch(a){return s(a)}s(void 0,u)})}function n(r,n,i,o,s){if("number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof o)throw new TypeError("Key length not a number");if(o<0)throw new TypeError("Bad key length");s=s||"sha1",e.isBuffer(r)||(r=new e(r)),e.isBuffer(n)||(n=new e(n));var u,a,f,c=1,h=new e(o),l=new e(n.length+4);n.copy(l,0,0,n.length);for(var p=1;p<=c;p++){l.writeUInt32BE(p,n.length);var d=t.createHmac(s,r).update(l).digest();if(!u&&(u=d.length,f=new e(u),c=Math.ceil(o/u),a=o-(c-1)*u,o>(Math.pow(2,32)-1)*u))throw new TypeError("keylen exceeds maximum length");d.copy(f,0,0,u);for(var v=1;v<i;v++){d=t.createHmac(s,r).update(d).digest();for(var _=0;_<u;_++)f[_]^=d[_]}var y=(p-1)*u,g=p==c?a:u;f.copy(h,y,0,g)}return h}return{pbkdf2:r,pbkdf2Sync:n}}}).call(e,r(3).Buffer)},function(t,e,r){(function(e,r){!function(e){"use strict";function n(t,e,r,n){var i=Object.create((e||o).prototype),s=new d(n||[]);return i._invoke=h(t,r,s),i}function i(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}function o(){}function s(){}function u(){}function a(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function f(t){this.arg=t}function c(t){function e(e,r){var n=t[e](r),i=n.value;return i instanceof f?Promise.resolve(i.arg).then(o,s):Promise.resolve(i).then(function(t){return n.value=t,n})}function n(t,r){function n(){return e(t,r)}return i=i?i.then(n,n):new Promise(function(t){t(n())})}"object"==typeof r&&r.domain&&(e=r.domain.bind(e));var i,o=e.bind(t,"next"),s=e.bind(t,"throw");e.bind(t,"return");this._invoke=n}function h(t,e,r){var n=E;return function(o,s){if(n===x)throw new Error("Generator is already running");if(n===k){if("throw"===o)throw s;return _()}for(;;){var u=r.delegate;if(u){if("return"===o||"throw"===o&&u.iterator[o]===y){r.delegate=null;var a=u.iterator["return"];if(a){var f=i(a,u.iterator,s);if("throw"===f.type){o="throw",s=f.arg;continue}}if("return"===o)continue}var f=i(u.iterator[o],u.iterator,s);if("throw"===f.type){r.delegate=null,o="throw",s=f.arg;continue}o="next",s=y;var c=f.arg;if(!c.done)return n=S,c;r[u.resultName]=c.value,r.next=u.nextLoc,r.delegate=null}if("next"===o)n===S?r.sent=s:r.sent=y;else if("throw"===o){if(n===E)throw n=k,s;r.dispatchException(s)&&(o="next",s=y)}else"return"===o&&r.abrupt("return",s);n=x;var f=i(t,e,r);if("normal"===f.type){n=r.done?k:S;var c={value:f.arg,done:r.done};if(f.arg!==I)return c;r.delegate&&"next"===o&&(s=y)}else"throw"===f.type&&(n=k,o="throw",s=f.arg)}}}function l(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function p(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function d(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(l,this),this.reset(!0)}function v(t){if(t){var e=t[b];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function i(){for(;++r<t.length;)if(g.call(t,r))return i.value=t[r],i.done=!1,i;return i.value=y,i.done=!0,i};return n.next=n}}return{next:_}}function _(){return{value:y,done:!0}}var y,g=Object.prototype.hasOwnProperty,b="function"==typeof Symbol&&Symbol.iterator||"@@iterator",m="object"==typeof t,w=e.regeneratorRuntime;if(w)return void(m&&(t.exports=w));w=e.regeneratorRuntime=m?t.exports:{},w.wrap=n;var E="suspendedStart",S="suspendedYield",x="executing",k="completed",I={},B=u.prototype=o.prototype;s.prototype=B.constructor=u,u.constructor=s,s.displayName="GeneratorFunction",w.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===s||"GeneratorFunction"===(e.displayName||e.name))},w.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):t.__proto__=u,t.prototype=Object.create(B),t},w.awrap=function(t){return new f(t)},a(c.prototype),w.async=function(t,e,r,i){var o=new c(n(t,e,r,i));return w.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},a(B),B[b]=function(){return this},B.toString=function(){return"[object Generator]"},w.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},w.values=v,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=y,this.done=!1,this.delegate=null,this.tryEntries.forEach(p),!t)for(var e in this)"t"===e.charAt(0)&&g.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=y)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,n){return o.type="throw",o.arg=t,r.next=e,!!n}if(this.done)throw t;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var s=g.call(i,"catchLoc"),u=g.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&g.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?this.next=i.finallyLoc:this.complete(o),I},complete:function(t,e){if("throw"===t.type)throw t.arg;"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=t.arg,this.next="end"):"normal"===t.type&&e&&(this.next=e)},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),p(r),I}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;p(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:v(t),resultName:e,nextLoc:r},I}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,function(){return this}(),r(66))},function(t,e,r){(function(e){function r(t,e,r){return t^e^r}function n(t,e,r){return t&e|~t&r}function i(t,e,r){return(t|~e)^r}function o(t,e,r){return t&r|e&~r}function s(t,e,r){return t^(e|~r)}function u(t,e){return t<<e|t>>>32-e}function a(t){var r=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var n=v(t),i=8*t.length,o=8*t.length;n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);for(var s=0;s<n.length;s+=16)y(r,n,s);for(var s=0;s<5;s++){var u=r[s];r[s]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var a=_(r);return new e(a)}t.exports=a;/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],h=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],p=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0],v=function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},_=function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},y=function(t,e,a){for(var v=0;v<16;v++){var _=a+v,y=e[_];e[_]=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8)}var g,b,m,w,E,S,x,k,I,B;S=g=t[0],x=b=t[1],k=m=t[2],I=w=t[3],B=E=t[4];for(var T,v=0;v<80;v+=1)T=g+e[a+f[v]]|0,T+=v<16?r(b,m,w)+p[0]:v<32?n(b,m,w)+p[1]:v<48?i(b,m,w)+p[2]:v<64?o(b,m,w)+p[3]:s(b,m,w)+p[4],T=0|T,T=u(T,h[v]),T=T+E|0,g=E,E=w,w=u(m,10),m=b,b=T,T=S+e[a+c[v]]|0,T+=v<16?s(x,k,I)+d[0]:v<32?o(x,k,I)+d[1]:v<48?i(x,k,I)+d[2]:v<64?n(x,k,I)+d[3]:r(x,k,I)+d[4],T=0|T,T=u(T,l[v]),T=T+B|0,S=B,B=I,I=u(k,10),k=x,x=T;T=t[1]+m+I|0,t[1]=t[2]+w+B|0,t[2]=t[3]+E+S|0,t[3]=t[4]+g+x|0,t[4]=t[0]+b+k|0,t[0]=T}}).call(e,r(3).Buffer)},function(t,e){t.exports=function(t){function e(e,r){this._block=new t(e),this._finalSize=r,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,r){"string"==typeof e&&(r=r||"utf8",e=new t(e,r));for(var n=this._len+=e.length,i=this._s=this._s||0,o=0,s=this._block;i<n;){for(var u=Math.min(e.length,o+this._blockSize-i%this._blockSize),a=u-o,f=0;f<a;f++)s[i%this._blockSize+f]=e[f+o];i+=a,o+=a,i%this._blockSize===0&&this._update(s)}return this._s=i,this},e.prototype.digest=function(t){var e=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),e%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var r=this._update(this._block)||this._hash();return t?r.toString(t):r},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,r){var e=t.exports=function(t){var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r},n=r(3).Buffer,i=r(291)(n);e.sha1=r(293)(n,i),e.sha256=r(294)(n,i),e.sha512=r(295)(n,i)},function(t,e,r){var n=r(50).inherits;t.exports=function(t,e){function r(){return d.length?d.pop().init():this instanceof r?(this._w=p,e.call(this,64,56),this._h=null,void this.init()):new r}function i(t,e,r,n){return t<20?e&r|~e&n:t<40?e^r^n:t<60?e&r|e&n|r&n:e^r^n}function o(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function s(t,e){return t+e|0}function u(t,e){return t<<e|t>>>32-e}var a=0,f=4,c=8,h=12,l=16,p=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return n(r,e),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},r.prototype._POOL=d,r.prototype._update=function(t){var e,r,n,a,f,c,h,l,p,d;e=c=this._a,r=h=this._b,n=l=this._c,a=p=this._d,f=d=this._e;for(var v=this._w,_=0;_<80;_++){var y=v[_]=_<16?t.readInt32BE(4*_):u(v[_-3]^v[_-8]^v[_-14]^v[_-16],1),g=s(s(u(e,5),i(_,r,n,a)),s(s(f,y),o(_)));f=a,a=n,n=u(r,30),r=e,e=g}this._a=s(e,c),this._b=s(r,h),this._c=s(n,l),this._d=s(a,p),this._e=s(f,d)},r.prototype._hash=function(){d.length<100&&d.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,a),e.writeInt32BE(0|this._b,f),e.writeInt32BE(0|this._c,c),e.writeInt32BE(0|this._d,h),e.writeInt32BE(0|this._e,l),e},r}},function(t,e,r){var n=r(50).inherits;t.exports=function(t,e){function r(){this.init(),this._w=p,e.call(this,64,56)}function i(t,e){return t>>>e|t<<32-e}function o(t,e){return t>>>e}function s(t,e,r){return t&e^~t&r}function u(t,e,r){return t&e^t&r^e&r}function a(t){return i(t,2)^i(t,13)^i(t,22)}function f(t){return i(t,6)^i(t,11)^i(t,25)}function c(t){return i(t,7)^i(t,18)^o(t,3)}function h(t){return i(t,17)^i(t,19)^o(t,10)}var l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],p=new Array(64);return n(r,e),r.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},r.prototype._update=function(t){var e,r,n,i,o,p,d,v,_,y,g=this._w;e=0|this._a,r=0|this._b,n=0|this._c,i=0|this._d,o=0|this._e,p=0|this._f,d=0|this._g,v=0|this._h;for(var b=0;b<64;b++){var m=g[b]=b<16?t.readInt32BE(4*b):h(g[b-2])+g[b-7]+c(g[b-15])+g[b-16];_=v+f(o)+s(o,p,d)+l[b]+m,y=a(e)+u(e,r,n),v=d,d=p,p=o,o=i+_,i=n,n=r,r=e,e=_+y}this._a=e+this._a|0,this._b=r+this._b|0,this._c=n+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0,this._f=p+this._f|0,this._g=d+this._g|0,this._h=v+this._h|0},r.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},r}},function(t,e,r){var n=r(50).inherits;t.exports=function(t,e){function r(){this.init(),this._w=a,e.call(this,128,112)}function i(t,e,r){return t>>>r|e<<32-r}function o(t,e,r){return t&e^~t&r}function s(t,e,r){return t&e^t&r^e&r}var u=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);return n(r,e),r.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},r.prototype._update=function(t){var e,r,n,a,f,c,h,l,p,d,v,_,y,g,b,m,w=this._w;e=0|this._a,r=0|this._b,n=0|this._c,a=0|this._d,f=0|this._e,c=0|this._f,h=0|this._g,l=0|this._h,p=0|this._al,d=0|this._bl,v=0|this._cl,_=0|this._dl,y=0|this._el,g=0|this._fl,b=0|this._gl,m=0|this._hl;for(var E=0;E<80;E++){var S,x,k=2*E;if(E<16)S=w[k]=t.readInt32BE(4*k),x=w[k+1]=t.readInt32BE(4*k+4);else{var I=w[k-30],B=w[k-30+1],T=i(I,B,1)^i(I,B,8)^I>>>7,A=i(B,I,1)^i(B,I,8)^i(B,I,7);I=w[k-4],B=w[k-4+1];var O=i(I,B,19)^i(B,I,29)^I>>>6,j=i(B,I,19)^i(I,B,29)^i(B,I,6),D=w[k-14],M=w[k-14+1],R=w[k-32],z=w[k-32+1];x=A+M,S=T+D+(x>>>0<A>>>0?1:0),x+=j,S=S+O+(x>>>0<j>>>0?1:0),x+=z,S=S+R+(x>>>0<z>>>0?1:0),w[k]=S,w[k+1]=x}var L=s(e,r,n),q=s(p,d,v),U=i(e,p,28)^i(p,e,2)^i(p,e,7),P=i(p,e,28)^i(e,p,2)^i(e,p,7),N=i(f,y,14)^i(f,y,18)^i(y,f,9),C=i(y,f,14)^i(y,f,18)^i(f,y,9),F=u[k],H=u[k+1],K=o(f,c,h),V=o(y,g,b),W=m+C,Y=l+N+(W>>>0<m>>>0?1:0);W+=V,Y=Y+K+(W>>>0<V>>>0?1:0),W+=H,Y=Y+F+(W>>>0<H>>>0?1:0),W+=x,Y=Y+S+(W>>>0<x>>>0?1:0);var G=P+q,Z=U+L+(G>>>0<P>>>0?1:0);l=h,m=b,h=c,b=g,c=f,g=y,y=_+W|0,f=a+Y+(y>>>0<_>>>0?1:0)|0,a=n,_=v,n=r,v=d,r=e,d=p,p=W+G|0,e=Y+Z+(p>>>0<W>>>0?1:0)|0}this._al=this._al+p|0,this._bl=this._bl+d|0,this._cl=this._cl+v|0,this._dl=this._dl+_|0,this._el=this._el+y|0,this._fl=this._fl+g|0,this._gl=this._gl+b|0,this._hl=this._hl+m|0,this._a=this._a+e+(this._al>>>0<p>>>0?1:0)|0,this._b=this._b+r+(this._bl>>>0<d>>>0?1:0)|0,this._c=this._c+n+(this._cl>>>0<v>>>0?1:0)|0,this._d=this._d+a+(this._dl>>>0<_>>>0?1:0)|0,this._e=this._e+f+(this._el>>>0<y>>>0?1:0)|0,this._f=this._f+c+(this._fl>>>0<g>>>0?1:0)|0,this._g=this._g+h+(this._gl>>>0<b>>>0?1:0)|0,this._h=this._h+l+(this._hl>>>0<m>>>0?1:0)|0},r.prototype._hash=function(){function e(t,e,n){r.writeInt32BE(t,n),r.writeInt32BE(e,n+4)}var r=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),r},r}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){},297,297]));
//# sourceMappingURL=main.js.map