UNPKG

factom

Version:

Library to build applications on the Factom blockchain

8 lines 309 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.factom=e():t.factom=e()}(window,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=68)}([function(t,e,r){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ var n=r(37),i=r(38),o=r(26);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=f(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|p(e.length);return 0===(t=a(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function h(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 l(t,e){if(h(e),t=a(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function f(t,e){var r=e.length<0?0:0|p(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return N(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var h=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var l=!0,f=0;f<u;f++)if(c(t,o+f)!==c(e,f)){l=!1;break}if(l)return o}return-1}function g(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(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 a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function _(t,e,r,n){return q(N(e,t.length-r),t,r,n)}function b(t,e,r,n){return q(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return b(t,e,r,n)}function E(t,e,r,n){return q(H(e),t,r,n)}function k(t,e,r,n){return q(function(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}(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function C(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],h=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(h=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=l}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=A));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return h(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,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},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(n,i),h=t.slice(e,r),l=0;l<a;++l)if(c[l]!==h[l]){o=c[l],s=h[l];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var 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 g(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function T(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 S(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 R(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+=U(t[o]);return i}function O(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 P(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function I(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 B(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 F(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 L(t,e,r,n,o){return o||F(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,o){return o||F(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:N(new u(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>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=65536+(i-55296<<10|r-56320)}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 H(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(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}}).call(this,r(3))},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";(function(e){var n=r(25),i=r(11),o=r(8),s=o.RCD_TYPE_1,a=o.secretToPublicKey,u=o.sha256d,c=r(9),h=c.FACTOID_PUBLIC_PREFIX,l=c.FACTOID_PRIVATE_PREFIX,f=c.ENTRYCREDIT_PUBLIC_PREFIX,p=c.ENTRYCREDIT_PRIVATE_PREFIX,d=c.VALID_PREFIXES,y=c.PUBLIC_ADDRESS_VALID_PREFIXES,v=c.PRIVATE_ADDRESS_VALID_PREFIXES,m=c.EC_ADDRESS_VALID_PREFIXES,g=c.FCT_ADDRESS_VALID_PREFIXES;function _(t){try{if(!d.has(t.slice(0,2)))return!1;var r=e.from(n.decode(t));return 38===r.length&&!!u(r.slice(0,34)).slice(0,4).equals(r.slice(34,38))}catch(t){return!1}}function b(t){return _(t)&&"FA"===t.substring(0,2)}function w(t){return C(t,h,!0)}function E(t){return C(t,l)}function k(t){return C(t,f)}function x(t){return C(t,p)}function C(t,r,i){var o=e.from(t,"hex");if(32!==o.length)throw new Error("Key ".concat(o," is not 32 bytes long."));var s=e.concat([r,i?A(o):o]),a=u(s).slice(0,4);return n.encode(e.concat([s,a]))}function A(t){return u(e.concat([s,t]))}t.exports={isValidAddress:_,addressToKey:function(t){if(!_(t))throw new Error("Invalid address ".concat(t,"."));if(t.startsWith("FA"))throw new Error("A public Factoid address does not hold a public key but a RCD hash. Use addressToRcdHash function instead.");return e.from(n.decode(t).slice(2,34))},addressToRcdHash:function(t){if(!b(t))throw new Error("Address ".concat(t," is not a valid public Factoid address"));return e.from(n.decode(t).slice(2,34))},isValidPublicAddress:function(t){return _(t)&&y.has(t.substring(0,2))},isValidPrivateAddress:function(t){return _(t)&&v.has(t.substring(0,2))},isValidEcAddress:function(t){return _(t)&&m.has(t.substring(0,2))},isValidPublicEcAddress:function(t){return _(t)&&"EC"===t.substring(0,2)},isValidPrivateEcAddress:function(t){return _(t)&&"Es"===t.substring(0,2)},isValidFctAddress:function(t){return _(t)&&g.has(t.substring(0,2))},isValidPublicFctAddress:b,isValidPrivateFctAddress:function(t){return _(t)&&"Fs"===t.substring(0,2)},getPublicAddress:function(t){if(!_(t))throw new Error("Invalid address ".concat(t,"."));if("s"!==t[1])return t;var e=n.decode(t).slice(2,34),r=a(e);return"F"===t[0]?w(r):k(r)},keyToPublicFctAddress:w,rcdHashToPublicFctAddress:function(t){return C(t,h)},seedToPrivateFctAddress:E,keyToPublicEcAddress:k,seedToPrivateEcAddress:x,generateRandomFctAddress:function(){var t=i.randomBytes(32);return{public:w(i.sign.keyPair.fromSeed(t).publicKey),private:E(t)}},generateRandomEcAddress:function(){var t=i.randomBytes(32);return{public:k(i.sign.keyPair.fromSeed(t).publicKey),private:x(t)}}}}).call(this,r(0).Buffer)},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){t.exports=r(31)},function(t,e){function r(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise(function(i,o){var s=t.apply(e,n);function a(t){r(s,i,o,a,u,"next",t)}function u(t){r(s,i,o,a,u,"throw",t)}a(void 0)})}}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){"use strict";var n=r(52),i=r(76),o=Object.prototype.toString;function s(t){return"[object Array]"===o.call(t)}function a(t){return null!==t&&"object"==typeof t}function u(t){return"[object Function]"===o.call(t)}function c(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:i,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:u,isStream:function(t){return a(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function t(){var e={};function r(r,n){"object"==typeof e[n]&&"object"==typeof r?e[n]=t(e[n],r):e[n]=r}for(var n=0,i=arguments.length;n<i;n++)c(arguments[n],r);return e},extend:function(t,e,r){return c(e,function(e,i){t[i]=r&&"function"==typeof e?n(e,r):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e,r){"use strict";(function(e){var n=r(1)(r(17)),i=r(11).sign,o=r(44),s=r(45),a=r(47),u=e.from("01","hex"),c=o.fromString("8000000000000000",!0,16);t.exports={RCD_TYPE_1:u,sha256:function(t){return e.from(s().update(t).digest())},sha512:function(t){return e.from(a().update(t).digest())},sha256d:function(t){return e.from(s().update(s().update(t).digest()).digest())},toHex:function(t){return e.isBuffer(t)?t.toString("hex"):t},encodeVarInt:function(t){var r=[];0!==t&&"0"!==t||r.push(0);var n=o.fromValue(t,!0),i=!1;n.and(c).isZero()||(r.push(129),i=!0);for(var s=0;s<9;++s){var a=n.shiftRightUnsigned(56).toNumber();(a||i)&&(i=!0,8!==s?a|=128:a&=127,r.push(a)),n=n.shiftLeft(7)}return e.from(r)},isIterable:function(t){return null!=t&&"function"==typeof t[Symbol.iterator]},flatMap:function(t,e){var r;return(r=[]).concat.apply(r,(0,n.default)(t.map(e)))},secretToPublicKey:function(t){var r=i.keyPair.fromSeed(t);return e.from(r.publicKey)}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){var r="000000000000000000000000000000000000000000000000000000000000000a",n=new Map([[1,"DIRECTORY_BLOCK_SIGNATURE"],[2,"REVEAL_MATRYOSHKA_HASH"],[3,"ADD_REPLACE_MATRYOSHKA_HASH"],[4,"INCREASE_SERVER_COUNT"],[5,"ADD_FEDERATED_SERVER"],[6,"ADD_AUDIT_SERVER"],[7,"REMOVE_FEDERATED_SERVER"],[8,"ADD_FEDERATED_SERVER_SIGNING_KEY"],[9,"ADD_FEDERATED_SERVER_BITCOIN_ANCHOR_KEY"],[10,"SERVER_FAULT_HANDOFF"],[11,"COINBASE_DESCRIPTOR"],[12,"COINBASE_DESCRIPTOR_CANCEL"],[13,"ADD_AUTHORITY_FACTOID_ADDRESS"],[14,"ADD_AUTHORITY_EFFICIENCY"]]);t.exports={MAX_TRANSACTION_SIZE:10240,MAX_ENTRY_PAYLOAD_SIZE:10240,MAX_ENTRY_SIZE:10275,CHAIN_CREATION_COST:10,NULL_HASH:"0000000000000000000000000000000000000000000000000000000000000000",ADMIN_BLOCKS_CHAIN_ID:r,ENTRY_CREDIT_BLOCKS_CHAIN_ID:"000000000000000000000000000000000000000000000000000000000000000c",FACTOID_BLOCKS_CHAIN_ID:"000000000000000000000000000000000000000000000000000000000000000f",RESERVED_CHAIN_IDS:new Set([r,"000000000000000000000000000000000000000000000000000000000000000c","000000000000000000000000000000000000000000000000000000000000000f"]),VALID_PREFIXES:new Set(["Fs","FA","EC","Es"]),PUBLIC_ADDRESS_VALID_PREFIXES:new Set(["FA","EC"]),PRIVATE_ADDRESS_VALID_PREFIXES:new Set(["Fs","Es"]),EC_ADDRESS_VALID_PREFIXES:new Set(["EC","Es"]),FCT_ADDRESS_VALID_PREFIXES:new Set(["FA","Fs"]),FACTOID_PUBLIC_PREFIX:e.from("5fb1","hex"),FACTOID_PRIVATE_PREFIX:e.from("6478","hex"),ENTRYCREDIT_PUBLIC_PREFIX:e.from("592a","hex"),ENTRYCREDIT_PRIVATE_PREFIX:e.from("5db6","hex"),ADMIN_ID_TO_CODE:n}}).call(this,r(0).Buffer)},function(t,e){function r(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)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(t,e,r){!function(t){"use strict";var e=function(t){var e,r=new Float64Array(16);if(t)for(e=0;e<t.length;e++)r[e]=t[e];return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=e(),a=e([1]),u=e([56129,1]),c=e([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=e([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=e([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=e([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=e([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(t,e,r,n){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function y(t,e,r,n,i){var o,s=0;for(o=0;o<i;o++)s|=t[e+o]^r[n+o];return(1&s-1>>>8)-1}function v(t,e,r,n){return y(t,e,r,n,16)}function m(t,e,r,n){return y(t,e,r,n,32)}function g(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,h=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,f=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,v=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,_=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,E=s,k=a,x=u,C=c,A=h,T=l,S=f,R=p,O=d,P=y,j=v,I=m,B=g,F=_,L=b,M=0;M<20;M+=2)w^=(i=(I^=(i=(R^=(i=(C^=(i=w+I|0)<<7|i>>>25)+w|0)<<9|i>>>23)+C|0)<<13|i>>>19)+R|0)<<18|i>>>14,A^=(i=(E^=(i=(B^=(i=(O^=(i=A+E|0)<<7|i>>>25)+A|0)<<9|i>>>23)+O|0)<<13|i>>>19)+B|0)<<18|i>>>14,P^=(i=(T^=(i=(k^=(i=(F^=(i=P+T|0)<<7|i>>>25)+P|0)<<9|i>>>23)+F|0)<<13|i>>>19)+k|0)<<18|i>>>14,L^=(i=(j^=(i=(S^=(i=(x^=(i=L+j|0)<<7|i>>>25)+L|0)<<9|i>>>23)+x|0)<<13|i>>>19)+S|0)<<18|i>>>14,w^=(i=(x^=(i=(k^=(i=(E^=(i=w+x|0)<<7|i>>>25)+w|0)<<9|i>>>23)+E|0)<<13|i>>>19)+k|0)<<18|i>>>14,A^=(i=(C^=(i=(S^=(i=(T^=(i=A+C|0)<<7|i>>>25)+A|0)<<9|i>>>23)+T|0)<<13|i>>>19)+S|0)<<18|i>>>14,P^=(i=(O^=(i=(R^=(i=(j^=(i=P+O|0)<<7|i>>>25)+P|0)<<9|i>>>23)+j|0)<<13|i>>>19)+R|0)<<18|i>>>14,L^=(i=(F^=(i=(B^=(i=(I^=(i=L+F|0)<<7|i>>>25)+L|0)<<9|i>>>23)+I|0)<<13|i>>>19)+B|0)<<18|i>>>14;w=w+o|0,E=E+s|0,k=k+a|0,x=x+u|0,C=C+c|0,A=A+h|0,T=T+l|0,S=S+f|0,R=R+p|0,O=O+d|0,P=P+y|0,j=j+v|0,I=I+m|0,B=B+g|0,F=F+_|0,L=L+b|0,t[0]=w>>>0&255,t[1]=w>>>8&255,t[2]=w>>>16&255,t[3]=w>>>24&255,t[4]=E>>>0&255,t[5]=E>>>8&255,t[6]=E>>>16&255,t[7]=E>>>24&255,t[8]=k>>>0&255,t[9]=k>>>8&255,t[10]=k>>>16&255,t[11]=k>>>24&255,t[12]=x>>>0&255,t[13]=x>>>8&255,t[14]=x>>>16&255,t[15]=x>>>24&255,t[16]=C>>>0&255,t[17]=C>>>8&255,t[18]=C>>>16&255,t[19]=C>>>24&255,t[20]=A>>>0&255,t[21]=A>>>8&255,t[22]=A>>>16&255,t[23]=A>>>24&255,t[24]=T>>>0&255,t[25]=T>>>8&255,t[26]=T>>>16&255,t[27]=T>>>24&255,t[28]=S>>>0&255,t[29]=S>>>8&255,t[30]=S>>>16&255,t[31]=S>>>24&255,t[32]=R>>>0&255,t[33]=R>>>8&255,t[34]=R>>>16&255,t[35]=R>>>24&255,t[36]=O>>>0&255,t[37]=O>>>8&255,t[38]=O>>>16&255,t[39]=O>>>24&255,t[40]=P>>>0&255,t[41]=P>>>8&255,t[42]=P>>>16&255,t[43]=P>>>24&255,t[44]=j>>>0&255,t[45]=j>>>8&255,t[46]=j>>>16&255,t[47]=j>>>24&255,t[48]=I>>>0&255,t[49]=I>>>8&255,t[50]=I>>>16&255,t[51]=I>>>24&255,t[52]=B>>>0&255,t[53]=B>>>8&255,t[54]=B>>>16&255,t[55]=B>>>24&255,t[56]=F>>>0&255,t[57]=F>>>8&255,t[58]=F>>>16&255,t[59]=F>>>24&255,t[60]=L>>>0&255,t[61]=L>>>8&255,t[62]=L>>>16&255,t[63]=L>>>24&255}(t,e,r,n)}function _(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,h=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,f=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,v=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,_=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)o^=(i=(m^=(i=(p^=(i=(c^=(i=o+m|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+p|0)<<18|i>>>14,h^=(i=(s^=(i=(g^=(i=(d^=(i=h+s|0)<<7|i>>>25)+h|0)<<9|i>>>23)+d|0)<<13|i>>>19)+g|0)<<18|i>>>14,y^=(i=(l^=(i=(a^=(i=(_^=(i=y+l|0)<<7|i>>>25)+y|0)<<9|i>>>23)+_|0)<<13|i>>>19)+a|0)<<18|i>>>14,b^=(i=(v^=(i=(f^=(i=(u^=(i=b+v|0)<<7|i>>>25)+b|0)<<9|i>>>23)+u|0)<<13|i>>>19)+f|0)<<18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,h^=(i=(c^=(i=(f^=(i=(l^=(i=h+c|0)<<7|i>>>25)+h|0)<<9|i>>>23)+l|0)<<13|i>>>19)+f|0)<<18|i>>>14,y^=(i=(d^=(i=(p^=(i=(v^=(i=y+d|0)<<7|i>>>25)+y|0)<<9|i>>>23)+v|0)<<13|i>>>19)+p|0)<<18|i>>>14,b^=(i=(_^=(i=(g^=(i=(m^=(i=b+_|0)<<7|i>>>25)+b|0)<<9|i>>>23)+m|0)<<13|i>>>19)+g|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=h>>>0&255,t[5]=h>>>8&255,t[6]=h>>>16&255,t[7]=h>>>24&255,t[8]=y>>>0&255,t[9]=y>>>8&255,t[10]=y>>>16&255,t[11]=y>>>24&255,t[12]=b>>>0&255,t[13]=b>>>8&255,t[14]=b>>>16&255,t[15]=b>>>24&255,t[16]=l>>>0&255,t[17]=l>>>8&255,t[18]=l>>>16&255,t[19]=l>>>24&255,t[20]=f>>>0&255,t[21]=f>>>8&255,t[22]=f>>>16&255,t[23]=f>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=d>>>0&255,t[29]=d>>>8&255,t[30]=d>>>16&255,t[31]=d>>>24&255}(t,e,r,n)}var b=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(t,e,r,n,i,o,s){var a,u,c=new Uint8Array(16),h=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(g(h,c,s,b),u=0;u<64;u++)t[e+u]=r[n+u]^h[u];for(a=1,u=8;u<16;u++)a=a+(255&c[u])|0,c[u]=255&a,a>>>=8;i-=64,e+=64,n+=64}if(i>0)for(g(h,c,s,b),u=0;u<i;u++)t[e+u]=r[n+u]^h[u];return 0}function E(t,e,r,n,i){var o,s,a=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;r>=64;){for(g(u,a,i,b),s=0;s<64;s++)t[e+s]=u[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,e+=64}if(r>0)for(g(u,a,i,b),s=0;s<r;s++)t[e+s]=u[s];return 0}function k(t,e,r,n,i){var o=new Uint8Array(32);_(o,n,i,b);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return E(t,e,r,s,o)}function x(t,e,r,n,i,o,s){var a=new Uint8Array(32);_(a,o,s,b);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=o[c+16];return w(t,e,r,n,i,u,a)}var C=function(t){var e,r,n,i,o,s,a,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,e=255&t[0]|(255&t[1])<<8,this.r[0]=8191&e,r=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(e>>>13|r<<3),n=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function A(t,e,r,n,i,o){var s=new C(o);return s.update(r,n,i),s.finish(t,e),0}function T(t,e,r,n,i,o){var s=new Uint8Array(16);return A(s,0,r,n,i,o),v(t,e,s,0)}function S(t,e,r,n,i){var o;if(r<32)return-1;for(x(t,0,e,0,r,n,i),A(t,16,t,32,r-32,t),o=0;o<16;o++)t[o]=0;return 0}function R(t,e,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(k(s,0,32,n,i),0!==T(e,16,e,32,r-32,s))return-1;for(x(t,0,e,0,r,n,i),o=0;o<32;o++)t[o]=0;return 0}function O(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function P(t){var e,r,n=1;for(e=0;e<16;e++)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function j(t,e,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function I(t,r){var n,i,o,s=e(),a=e();for(n=0;n<16;n++)a[n]=r[n];for(P(a),P(a),P(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,j(a,s,1-o)}for(n=0;n<16;n++)t[2*n]=255&a[n],t[2*n+1]=a[n]>>8}function B(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return I(r,t),I(n,e),m(r,0,n,0)}function F(t){var e=new Uint8Array(32);return I(e,t),1&e[0]}function L(t,e){var r;for(r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function M(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function D(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function U(t,e,r){var n,i,o=0,s=0,a=0,u=0,c=0,h=0,l=0,f=0,p=0,d=0,y=0,v=0,m=0,g=0,_=0,b=0,w=0,E=0,k=0,x=0,C=0,A=0,T=0,S=0,R=0,O=0,P=0,j=0,I=0,B=0,F=0,L=r[0],M=r[1],D=r[2],U=r[3],N=r[4],H=r[5],q=r[6],V=r[7],z=r[8],Y=r[9],K=r[10],W=r[11],X=r[12],G=r[13],$=r[14],Z=r[15];o+=(n=e[0])*L,s+=n*M,a+=n*D,u+=n*U,c+=n*N,h+=n*H,l+=n*q,f+=n*V,p+=n*z,d+=n*Y,y+=n*K,v+=n*W,m+=n*X,g+=n*G,_+=n*$,b+=n*Z,s+=(n=e[1])*L,a+=n*M,u+=n*D,c+=n*U,h+=n*N,l+=n*H,f+=n*q,p+=n*V,d+=n*z,y+=n*Y,v+=n*K,m+=n*W,g+=n*X,_+=n*G,b+=n*$,w+=n*Z,a+=(n=e[2])*L,u+=n*M,c+=n*D,h+=n*U,l+=n*N,f+=n*H,p+=n*q,d+=n*V,y+=n*z,v+=n*Y,m+=n*K,g+=n*W,_+=n*X,b+=n*G,w+=n*$,E+=n*Z,u+=(n=e[3])*L,c+=n*M,h+=n*D,l+=n*U,f+=n*N,p+=n*H,d+=n*q,y+=n*V,v+=n*z,m+=n*Y,g+=n*K,_+=n*W,b+=n*X,w+=n*G,E+=n*$,k+=n*Z,c+=(n=e[4])*L,h+=n*M,l+=n*D,f+=n*U,p+=n*N,d+=n*H,y+=n*q,v+=n*V,m+=n*z,g+=n*Y,_+=n*K,b+=n*W,w+=n*X,E+=n*G,k+=n*$,x+=n*Z,h+=(n=e[5])*L,l+=n*M,f+=n*D,p+=n*U,d+=n*N,y+=n*H,v+=n*q,m+=n*V,g+=n*z,_+=n*Y,b+=n*K,w+=n*W,E+=n*X,k+=n*G,x+=n*$,C+=n*Z,l+=(n=e[6])*L,f+=n*M,p+=n*D,d+=n*U,y+=n*N,v+=n*H,m+=n*q,g+=n*V,_+=n*z,b+=n*Y,w+=n*K,E+=n*W,k+=n*X,x+=n*G,C+=n*$,A+=n*Z,f+=(n=e[7])*L,p+=n*M,d+=n*D,y+=n*U,v+=n*N,m+=n*H,g+=n*q,_+=n*V,b+=n*z,w+=n*Y,E+=n*K,k+=n*W,x+=n*X,C+=n*G,A+=n*$,T+=n*Z,p+=(n=e[8])*L,d+=n*M,y+=n*D,v+=n*U,m+=n*N,g+=n*H,_+=n*q,b+=n*V,w+=n*z,E+=n*Y,k+=n*K,x+=n*W,C+=n*X,A+=n*G,T+=n*$,S+=n*Z,d+=(n=e[9])*L,y+=n*M,v+=n*D,m+=n*U,g+=n*N,_+=n*H,b+=n*q,w+=n*V,E+=n*z,k+=n*Y,x+=n*K,C+=n*W,A+=n*X,T+=n*G,S+=n*$,R+=n*Z,y+=(n=e[10])*L,v+=n*M,m+=n*D,g+=n*U,_+=n*N,b+=n*H,w+=n*q,E+=n*V,k+=n*z,x+=n*Y,C+=n*K,A+=n*W,T+=n*X,S+=n*G,R+=n*$,O+=n*Z,v+=(n=e[11])*L,m+=n*M,g+=n*D,_+=n*U,b+=n*N,w+=n*H,E+=n*q,k+=n*V,x+=n*z,C+=n*Y,A+=n*K,T+=n*W,S+=n*X,R+=n*G,O+=n*$,P+=n*Z,m+=(n=e[12])*L,g+=n*M,_+=n*D,b+=n*U,w+=n*N,E+=n*H,k+=n*q,x+=n*V,C+=n*z,A+=n*Y,T+=n*K,S+=n*W,R+=n*X,O+=n*G,P+=n*$,j+=n*Z,g+=(n=e[13])*L,_+=n*M,b+=n*D,w+=n*U,E+=n*N,k+=n*H,x+=n*q,C+=n*V,A+=n*z,T+=n*Y,S+=n*K,R+=n*W,O+=n*X,P+=n*G,j+=n*$,I+=n*Z,_+=(n=e[14])*L,b+=n*M,w+=n*D,E+=n*U,k+=n*N,x+=n*H,C+=n*q,A+=n*V,T+=n*z,S+=n*Y,R+=n*K,O+=n*W,P+=n*X,j+=n*G,I+=n*$,B+=n*Z,b+=(n=e[15])*L,s+=38*(E+=n*D),a+=38*(k+=n*U),u+=38*(x+=n*N),c+=38*(C+=n*H),h+=38*(A+=n*q),l+=38*(T+=n*V),f+=38*(S+=n*z),p+=38*(R+=n*Y),d+=38*(O+=n*K),y+=38*(P+=n*W),v+=38*(j+=n*X),m+=38*(I+=n*G),g+=38*(B+=n*$),_+=38*(F+=n*Z),o=(n=(o+=38*(w+=n*M))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=u,t[4]=c,t[5]=h,t[6]=l,t[7]=f,t[8]=p,t[9]=d,t[10]=y,t[11]=v,t[12]=m,t[13]=g,t[14]=_,t[15]=b}function N(t,e){U(t,e,e)}function H(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)N(i,i),2!==n&&4!==n&&U(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function q(t,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),c=e(),h=e(),l=e(),f=e(),p=e(),d=e();for(o=0;o<31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,L(a,n),o=0;o<16;o++)h[o]=a[o],f[o]=c[o]=l[o]=0;for(c[0]=f[0]=1,o=254;o>=0;--o)j(c,h,i=s[o>>>3]>>>(7&o)&1),j(l,f,i),M(p,c,l),D(c,c,l),M(l,h,f),D(h,h,f),N(f,p),N(d,c),U(c,l,c),U(l,h,p),M(p,c,l),D(c,c,l),N(h,c),D(l,f,d),U(c,l,u),M(c,c,f),U(l,l,c),U(c,f,d),U(f,h,a),N(h,p),j(c,h,i),j(l,f,i);for(o=0;o<16;o++)a[o+16]=c[o],a[o+32]=l[o],a[o+48]=h[o],a[o+64]=f[o];var y=a.subarray(32),v=a.subarray(16);return H(y,y),U(v,v,y),I(t,v),0}function V(t,e){return q(t,e,o)}function z(t,e){return n(e,32),V(t,e)}function Y(t,e,r){var n=new Uint8Array(32);return q(n,r,e),_(t,i,n,b)}C.prototype.blocks=function(t,e,r){for(var n,i,o,s,a,u,c,h,l,f,p,d,y,v,m,g,_,b,w,E=this.fin?0:2048,k=this.h[0],x=this.h[1],C=this.h[2],A=this.h[3],T=this.h[4],S=this.h[5],R=this.h[6],O=this.h[7],P=this.h[8],j=this.h[9],I=this.r[0],B=this.r[1],F=this.r[2],L=this.r[3],M=this.r[4],D=this.r[5],U=this.r[6],N=this.r[7],H=this.r[8],q=this.r[9];r>=16;)f=l=0,f+=(k+=8191&(n=255&t[e+0]|(255&t[e+1])<<8))*I,f+=(x+=8191&(n>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3))*(5*q),f+=(C+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6))*(5*H),f+=(A+=8191&(o>>>7|(s=255&t[e+6]|(255&t[e+7])<<8)<<9))*(5*N),l=(f+=(T+=8191&(s>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12))*(5*U))>>>13,f&=8191,f+=(S+=a>>>1&8191)*(5*D),f+=(R+=8191&(a>>>14|(u=255&t[e+10]|(255&t[e+11])<<8)<<2))*(5*M),f+=(O+=8191&(u>>>11|(c=255&t[e+12]|(255&t[e+13])<<8)<<5))*(5*L),f+=(P+=8191&(c>>>8|(h=255&t[e+14]|(255&t[e+15])<<8)<<8))*(5*F),p=l+=(f+=(j+=h>>>5|E)*(5*B))>>>13,p+=k*B,p+=x*I,p+=C*(5*q),p+=A*(5*H),l=(p+=T*(5*N))>>>13,p&=8191,p+=S*(5*U),p+=R*(5*D),p+=O*(5*M),p+=P*(5*L),l+=(p+=j*(5*F))>>>13,p&=8191,d=l,d+=k*F,d+=x*B,d+=C*I,d+=A*(5*q),l=(d+=T*(5*H))>>>13,d&=8191,d+=S*(5*N),d+=R*(5*U),d+=O*(5*D),d+=P*(5*M),y=l+=(d+=j*(5*L))>>>13,y+=k*L,y+=x*F,y+=C*B,y+=A*I,l=(y+=T*(5*q))>>>13,y&=8191,y+=S*(5*H),y+=R*(5*N),y+=O*(5*U),y+=P*(5*D),v=l+=(y+=j*(5*M))>>>13,v+=k*M,v+=x*L,v+=C*F,v+=A*B,l=(v+=T*I)>>>13,v&=8191,v+=S*(5*q),v+=R*(5*H),v+=O*(5*N),v+=P*(5*U),m=l+=(v+=j*(5*D))>>>13,m+=k*D,m+=x*M,m+=C*L,m+=A*F,l=(m+=T*B)>>>13,m&=8191,m+=S*I,m+=R*(5*q),m+=O*(5*H),m+=P*(5*N),g=l+=(m+=j*(5*U))>>>13,g+=k*U,g+=x*D,g+=C*M,g+=A*L,l=(g+=T*F)>>>13,g&=8191,g+=S*B,g+=R*I,g+=O*(5*q),g+=P*(5*H),_=l+=(g+=j*(5*N))>>>13,_+=k*N,_+=x*U,_+=C*D,_+=A*M,l=(_+=T*L)>>>13,_&=8191,_+=S*F,_+=R*B,_+=O*I,_+=P*(5*q),b=l+=(_+=j*(5*H))>>>13,b+=k*H,b+=x*N,b+=C*U,b+=A*D,l=(b+=T*M)>>>13,b&=8191,b+=S*L,b+=R*F,b+=O*B,b+=P*I,w=l+=(b+=j*(5*q))>>>13,w+=k*q,w+=x*H,w+=C*N,w+=A*U,l=(w+=T*D)>>>13,w&=8191,w+=S*M,w+=R*L,w+=O*F,w+=P*B,k=f=8191&(l=(l=((l+=(w+=j*I)>>>13)<<2)+l|0)+(f&=8191)|0),x=p+=l>>>=13,C=d&=8191,A=y&=8191,T=v&=8191,S=m&=8191,R=g&=8191,O=_&=8191,P=b&=8191,j=w&=8191,e+=16,r-=16;this.h[0]=k,this.h[1]=x,this.h[2]=C,this.h[3]=A,this.h[4]=T,this.h[5]=S,this.h[6]=R,this.h[7]=O,this.h[8]=P,this.h[9]=j},C.prototype.finish=function(t,e){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},C.prototype.update=function(t,e,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=t[e+n];if(r-=i,e+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(t,e,i),e+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=t[e+n];this.leftover+=r}};var K=S,W=R;var X=[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];function G(t,e,r,n){for(var i,o,s,a,u,c,h,l,f,p,d,y,v,m,g,_,b,w,E,k,x,C,A,T,S,R,O=new Int32Array(16),P=new Int32Array(16),j=t[0],I=t[1],B=t[2],F=t[3],L=t[4],M=t[5],D=t[6],U=t[7],N=e[0],H=e[1],q=e[2],V=e[3],z=e[4],Y=e[5],K=e[6],W=e[7],G=0;n>=128;){for(E=0;E<16;E++)k=8*E+G,O[E]=r[k+0]<<24|r[k+1]<<16|r[k+2]<<8|r[k+3],P[E]=r[k+4]<<24|r[k+5]<<16|r[k+6]<<8|r[k+7];for(E=0;E<80;E++)if(i=j,o=I,s=B,a=F,u=L,c=M,h=D,U,f=N,p=H,d=q,y=V,v=z,m=Y,g=K,W,A=65535&(C=W),T=C>>>16,S=65535&(x=U),R=x>>>16,A+=65535&(C=(z>>>14|L<<18)^(z>>>18|L<<14)^(L>>>9|z<<23)),T+=C>>>16,S+=65535&(x=(L>>>14|z<<18)^(L>>>18|z<<14)^(z>>>9|L<<23)),R+=x>>>16,A+=65535&(C=z&Y^~z&K),T+=C>>>16,S+=65535&(x=L&M^~L&D),R+=x>>>16,x=X[2*E],A+=65535&(C=X[2*E+1]),T+=C>>>16,S+=65535&x,R+=x>>>16,x=O[E%16],T+=(C=P[E%16])>>>16,S+=65535&x,R+=x>>>16,S+=(T+=(A+=65535&C)>>>16)>>>16,A=65535&(C=w=65535&A|T<<16),T=C>>>16,S=65535&(x=b=65535&S|(R+=S>>>16)<<16),R=x>>>16,A+=65535&(C=(N>>>28|j<<4)^(j>>>2|N<<30)^(j>>>7|N<<25)),T+=C>>>16,S+=65535&(x=(j>>>28