bitcore-message-zcash/bitcore-message.min.js

1 line
18 KiB
JavaScript

require=function t(r,e,n){function i(s,a){if(!e[s]){if(!r[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var f=e[s]={exports:{}};r[s][0].call(f.exports,function(t){var e=r[s][1][t];return i(e?e:t)},f,f.exports,t,r,e,n)}return e[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,r,e){(function(e){"use strict";var n=t("bitcore"),i=n.deps._,o=n.PrivateKey,s=n.PublicKey,a=n.Address,u=n.encoding.BufferWriter,h=n.crypto.ECDSA,f=n.crypto.Signature,c=n.crypto.Hash.sha256sha256,l=n.util.js,g=n.util.preconditions,p=function y(t){return this instanceof y?(g.checkArgument(i.isString(t),"First argument should be a string"),this.message=t,this):new y(t)};p.MAGIC_BYTES=new e("Bitcoin Signed Message:\n"),p.prototype.magicHash=function(){var t=u.varintBufNum(p.MAGIC_BYTES.length),r=new e(this.message),n=u.varintBufNum(r.length),i=e.concat([t,p.MAGIC_BYTES,n,r]),o=c(i);return o},p.prototype._sign=function(t){g.checkArgument(t instanceof o,"First argument should be an instance of PrivateKey");var r=this.magicHash(),e=new h;return e.hashbuf=r,e.privkey=t,e.pubkey=t.toPublicKey(),e.signRandomK(),e.calci(),e.sig},p.prototype.sign=function(t){var r=this._sign(t);return r.toCompact().toString("base64")},p.prototype._verify=function(t,r){g.checkArgument(t instanceof s,"First argument should be an instance of PublicKey"),g.checkArgument(r instanceof f,"Second argument should be an instance of Signature");var e=this.magicHash(),n=h.verify(e,r,t);return n||(this.error="The signature was invalid"),n},p.prototype.verify=function(t,r){g.checkArgument(t),g.checkArgument(r&&i.isString(r)),i.isString(t)&&(t=a.fromString(t));var n=f.fromCompact(new e(r,"base64")),o=new h;o.hashbuf=this.magicHash(),o.sig=n;var s=o.toPublicKey(),u=a.fromPublicKey(s,t.network);return t.toString()!==u.toString()?(this.error="The signature did not match the message digest",!1):this._verify(s,n)},p.fromString=function(t){return new p(t)},p.fromJSON=function(t){return l.isValidJSON(t)&&(t=JSON.parse(t)),new p(t.message)},p.prototype.toObject=function(){return{message:this.message}},p.prototype.toJSON=function(){return JSON.stringify(this.toObject())},p.prototype.toString=function(){return this.message},p.prototype.inspect=function(){return"<Message: "+this.toString()+">"},r.exports=p}).call(this,t("buffer").Buffer)},{bitcore:"bitcore",buffer:2}],2:[function(t,r,e){function n(t,r,e){if(!(this instanceof n))return new n(t,r,e);var i,o=typeof t;if("number"===o)i=t>0?t>>>0:0;else if("string"===o)"base64"===r&&(t=B(t)),i=n.byteLength(t,r);else{if("object"!==o||null===t)throw new TypeError("must start with number, buffer, array or string");"Buffer"===t.type&&M(t.data)&&(t=t.data),i=+t.length>0?Math.floor(+t.length):0}if(this.length>O)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O.toString(16)+" bytes");var s;n.TYPED_ARRAY_SUPPORT?s=n._augment(new Uint8Array(i)):(s=this,s.length=i,s._isBuffer=!0);var a;if(n.TYPED_ARRAY_SUPPORT&&"number"==typeof t.byteLength)s._set(t);else if(S(t))if(n.isBuffer(t))for(a=0;i>a;a++)s[a]=t.readUInt8(a);else for(a=0;i>a;a++)s[a]=(t[a]%256+256)%256;else if("string"===o)s.write(t,0,r);else if("number"===o&&!n.TYPED_ARRAY_SUPPORT&&!e)for(a=0;i>a;a++)s[a]=0;return s}function i(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(r.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[e+s]=a}return s}function o(t,r,e,n){var i=L(U(r),t,e,n);return i}function s(t,r,e,n){var i=L(P(r),t,e,n);return i}function a(t,r,e,n){return s(t,r,e,n)}function u(t,r,e,n){var i=L(R(r),t,e,n);return i}function h(t,r,e,n){var i=L(_(r),t,e,n,2);return i}function f(t,r,e){return D.fromByteArray(0===r&&e===t.length?t:t.slice(r,e))}function c(t,r,e){var n="",i="";e=Math.min(t.length,e);for(var o=r;e>o;o++)t[o]<=127?(n+=Y(i)+String.fromCharCode(t[o]),i=""):i+="%"+t[o].toString(16);return n+Y(i)}function l(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;e>i;i++)n+=String.fromCharCode(t[i]);return n}function g(t,r,e){return l(t,r,e)}function p(t,r,e){var n=t.length;(!r||0>r)&&(r=0),(!e||0>e||e>n)&&(e=n);for(var i="",o=r;e>o;o++)i+=T(t[o]);return i}function y(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function w(t,r,e){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function d(t,r,e,i,o,s){if(!n.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new TypeError("value is out of bounds");if(e+i>t.length)throw new TypeError("index out of range")}function E(t,r,e,n){0>r&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);o>i;i++)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function b(t,r,e,n){0>r&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);o>i;i++)t[e+i]=r>>>8*(n?i:3-i)&255}function v(t,r,e,n,i,o){if(r>i||o>r)throw new TypeError("value is out of bounds");if(e+n>t.length)throw new TypeError("index out of range")}function A(t,r,e,n,i){return i||v(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),C.write(t,r,e,n,23,4),e+4}function m(t,r,e,n,i){return i||v(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),C.write(t,r,e,n,52,8),e+8}function B(t){for(t=I(t).replace(k,"");t.length%4!==0;)t+="=";return t}function I(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function S(t){return M(t)||n.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function T(t){return 16>t?"0"+t.toString(16):t.toString(16)}function U(t){for(var r=[],e=0;e<t.length;e++){var n=t.charCodeAt(e);if(127>=n)r.push(n);else{var i=e;n>=55296&&57343>=n&&e++;for(var o=encodeURIComponent(t.slice(i,e+1)).substr(1).split("%"),s=0;s<o.length;s++)r.push(parseInt(o[s],16))}}return r}function P(t){for(var r=[],e=0;e<t.length;e++)r.push(255&t.charCodeAt(e));return r}function _(t){for(var r,e,n,i=[],o=0;o<t.length;o++)r=t.charCodeAt(o),e=r>>8,n=r%256,i.push(n),i.push(e);return i}function R(t){return D.toByteArray(t)}function L(t,r,e,n,i){i&&(n-=n%i);for(var o=0;n>o&&!(o+e>=r.length||o>=t.length);o++)r[o+e]=t[o];return o}function Y(t){try{return decodeURIComponent(t)}catch(r){return String.fromCharCode(65533)}}var D=t("base64-js"),C=t("ieee754"),M=t("is-array");e.Buffer=n,e.SlowBuffer=n,e.INSPECT_MAX_BYTES=50,n.poolSize=8192;var O=1073741823;n.TYPED_ARRAY_SUPPORT=function(){try{var t=new ArrayBuffer(0),r=new Uint8Array(t);return r.foo=function(){return 42},42===r.foo()&&"function"==typeof r.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(e){return!1}}(),n.isBuffer=function(t){return!(null==t||!t._isBuffer)},n.compare=function(t,r){if(!n.isBuffer(t)||!n.isBuffer(r))throw new TypeError("Arguments must be Buffers");for(var e=t.length,i=r.length,o=0,s=Math.min(e,i);s>o&&t[o]===r[o];o++);return o!==s&&(e=t[o],i=r[o]),i>e?-1:e>i?1:0},n.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(t,r){if(!M(t))throw new TypeError("Usage: Buffer.concat(list[, length])");if(0===t.length)return new n(0);if(1===t.length)return t[0];var e;if(void 0===r)for(r=0,e=0;e<t.length;e++)r+=t[e].length;var i=new n(r),o=0;for(e=0;e<t.length;e++){var s=t[e];s.copy(i,o),o+=s.length}return i},n.byteLength=function(t,r){var e;switch(t+="",r||"utf8"){case"ascii":case"binary":case"raw":e=t.length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":e=2*t.length;break;case"hex":e=t.length>>>1;break;case"utf8":case"utf-8":e=U(t).length;break;case"base64":e=R(t).length;break;default:e=t.length}return e},n.prototype.length=void 0,n.prototype.parent=void 0,n.prototype.toString=function(t,r,e){var n=!1;if(r>>>=0,e=void 0===e||e===1/0?this.length:e>>>0,t||(t="utf8"),0>r&&(r=0),e>this.length&&(e=this.length),r>=e)return"";for(;;)switch(t){case"hex":return p(this,r,e);case"utf8":case"utf-8":return c(this,r,e);case"ascii":return l(this,r,e);case"binary":return g(this,r,e);case"base64":return f(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}},n.prototype.equals=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return 0===n.compare(this,t)},n.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+">"},n.prototype.compare=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return n.compare(this,t)},n.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},n.prototype.set=function(t,r){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,r)},n.prototype.write=function(t,r,e,n){if(isFinite(r))isFinite(e)||(n=e,e=void 0);else{var f=n;n=r,r=e,e=f}r=Number(r)||0;var c=this.length-r;e?(e=Number(e),e>c&&(e=c)):e=c,n=String(n||"utf8").toLowerCase();var l;switch(n){case"hex":l=i(this,t,r,e);break;case"utf8":case"utf-8":l=o(this,t,r,e);break;case"ascii":l=s(this,t,r,e);break;case"binary":l=a(this,t,r,e);break;case"base64":l=u(this,t,r,e);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":l=h(this,t,r,e);break;default:throw new TypeError("Unknown encoding: "+n)}return l},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(t,r){var e=this.length;if(t=~~t,r=void 0===r?e:~~r,0>t?(t+=e,0>t&&(t=0)):t>e&&(t=e),0>r?(r+=e,0>r&&(r=0)):r>e&&(r=e),t>r&&(r=t),n.TYPED_ARRAY_SUPPORT)return n._augment(this.subarray(t,r));for(var i=r-t,o=new n(i,void 0,!0),s=0;i>s;s++)o[s]=this[s+t];return o},n.prototype.readUInt8=function(t,r){return r||w(t,1,this.length),this[t]},n.prototype.readUInt16LE=function(t,r){return r||w(t,2,this.length),this[t]|this[t+1]<<8},n.prototype.readUInt16BE=function(t,r){return r||w(t,2,this.length),this[t]<<8|this[t+1]},n.prototype.readUInt32LE=function(t,r){return r||w(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},n.prototype.readUInt32BE=function(t,r){return r||w(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},n.prototype.readInt8=function(t,r){return r||w(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,r){r||w(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt16BE=function(t,r){r||w(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt32LE=function(t,r){return r||w(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},n.prototype.readInt32BE=function(t,r){return r||w(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},n.prototype.readFloatLE=function(t,r){return r||w(t,4,this.length),C.read(this,t,!0,23,4)},n.prototype.readFloatBE=function(t,r){return r||w(t,4,this.length),C.read(this,t,!1,23,4)},n.prototype.readDoubleLE=function(t,r){return r||w(t,8,this.length),C.read(this,t,!0,52,8)},n.prototype.readDoubleBE=function(t,r){return r||w(t,8,this.length),C.read(this,t,!1,52,8)},n.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||d(this,t,r,1,255,0),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t,r+1},n.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||d(this,t,r,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8):E(this,t,r,!0),r+2},n.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||d(this,t,r,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t):E(this,t,r,!1),r+2},n.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||d(this,t,r,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t):b(this,t,r,!0),r+4},n.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||d(this,t,r,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t):b(this,t,r,!1),r+4},n.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||d(this,t,r,1,127,-128),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[r]=t,r+1},n.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||d(this,t,r,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8):E(this,t,r,!0),r+2},n.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||d(this,t,r,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t):E(this,t,r,!1),r+2},n.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||d(this,t,r,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):b(this,t,r,!0),r+4},n.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||d(this,t,r,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t):b(this,t,r,!1),r+4},n.prototype.writeFloatLE=function(t,r,e){return A(this,t,r,!0,e)},n.prototype.writeFloatBE=function(t,r,e){return A(this,t,r,!1,e)},n.prototype.writeDoubleLE=function(t,r,e){return m(this,t,r,!0,e)},n.prototype.writeDoubleBE=function(t,r,e){return m(this,t,r,!1,e)},n.prototype.copy=function(t,r,e,i){var o=this;if(e||(e=0),i||0===i||(i=this.length),r||(r=0),i!==e&&0!==t.length&&0!==o.length){if(e>i)throw new TypeError("sourceEnd < sourceStart");if(0>r||r>=t.length)throw new TypeError("targetStart out of bounds");if(0>e||e>=o.length)throw new TypeError("sourceStart out of bounds");if(0>i||i>o.length)throw new TypeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-e&&(i=t.length-r+e);var s=i-e;if(1e3>s||!n.TYPED_ARRAY_SUPPORT)for(var a=0;s>a;a++)t[a+r]=this[a+e];else t._set(this.subarray(e,e+s),r)}},n.prototype.fill=function(t,r,e){if(t||(t=0),r||(r=0),e||(e=this.length),r>e)throw new TypeError("end < start");if(e!==r&&0!==this.length){if(0>r||r>=this.length)throw new TypeError("start out of bounds");if(0>e||e>this.length)throw new TypeError("end out of bounds");var n;if("number"==typeof t)for(n=r;e>n;n++)this[n]=t;else{var i=U(t.toString()),o=i.length;for(n=r;e>n;n++)this[n]=i[n%o]}return this}},n.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(n.TYPED_ARRAY_SUPPORT)return new n(this).buffer;for(var t=new Uint8Array(this.length),r=0,e=t.length;e>r;r+=1)t[r]=this[r];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var N=n.prototype;n._augment=function(t){return t.constructor=n,t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=N.get,t.set=N.set,t.write=N.write,t.toString=N.toString,t.toLocaleString=N.toString,t.toJSON=N.toJSON,t.equals=N.equals,t.compare=N.compare,t.copy=N.copy,t.slice=N.slice,t.readUInt8=N.readUInt8,t.readUInt16LE=N.readUInt16LE,t.readUInt16BE=N.readUInt16BE,t.readUInt32LE=N.readUInt32LE,t.readUInt32BE=N.readUInt32BE,t.readInt8=N.readInt8,t.readInt16LE=N.readInt16LE,t.readInt16BE=N.readInt16BE,t.readInt32LE=N.readInt32LE,t.readInt32BE=N.readInt32BE,t.readFloatLE=N.readFloatLE,t.readFloatBE=N.readFloatBE,t.readDoubleLE=N.readDoubleLE,t.readDoubleBE=N.readDoubleBE,t.writeUInt8=N.writeUInt8,t.writeUInt16LE=N.writeUInt16LE,t.writeUInt16BE=N.writeUInt16BE,t.writeUInt32LE=N.writeUInt32LE,t.writeUInt32BE=N.writeUInt32BE,t.writeInt8=N.writeInt8,t.writeInt16LE=N.writeInt16LE,t.writeInt16BE=N.writeInt16BE,t.writeInt32LE=N.writeInt32LE,t.writeInt32BE=N.writeInt32BE,t.writeFloatLE=N.writeFloatLE,t.writeFloatBE=N.writeFloatBE,t.writeDoubleLE=N.writeDoubleLE,t.writeDoubleBE=N.writeDoubleBE,t.fill=N.fill,t.inspect=N.inspect,t.toArrayBuffer=N.toArrayBuffer,t};var k=/[^+\/0-9A-z]/g},{"base64-js":3,ieee754:4,"is-array":5}],3:[function(t,r,e){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function r(t){var r=t.charCodeAt(0);return r===s?62:r===a?63:u>r?-1:u+10>r?r-u+26+26:f+26>r?r-f:h+26>r?r-h+26:void 0}function e(t){function e(t){h[c++]=t}var n,i,s,a,u,h;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=t.length;u="="===t.charAt(f-2)?2:"="===t.charAt(f-1)?1:0,h=new o(3*t.length/4-u),s=u>0?t.length-4:t.length;var c=0;for(n=0,i=0;s>n;n+=4,i+=3)a=r(t.charAt(n))<<18|r(t.charAt(n+1))<<12|r(t.charAt(n+2))<<6|r(t.charAt(n+3)),e((16711680&a)>>16),e((65280&a)>>8),e(255&a);return 2===u?(a=r(t.charAt(n))<<2|r(t.charAt(n+1))>>4,e(255&a)):1===u&&(a=r(t.charAt(n))<<10|r(t.charAt(n+1))<<4|r(t.charAt(n+2))>>2,e(a>>8&255),e(255&a)),h}function i(t){function r(t){return n.charAt(t)}function e(t){return r(t>>18&63)+r(t>>12&63)+r(t>>6&63)+r(63&t)}var i,o,s,a=t.length%3,u="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],u+=e(o);switch(a){case 1:o=t[t.length-1],u+=r(o>>2),u+=r(o<<4&63),u+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],u+=r(o>>10),u+=r(o>>4&63),u+=r(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),u="0".charCodeAt(0),h="a".charCodeAt(0),f="A".charCodeAt(0);t.toByteArray=e,t.fromByteArray=i}("undefined"==typeof e?this.base64js={}:e)},{}],4:[function(t,r,e){e.read=function(t,r,e,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,h=u>>1,f=-7,c=e?i-1:0,l=e?-1:1,g=t[r+c];for(c+=l,o=g&(1<<-f)-1,g>>=-f,f+=a;f>0;o=256*o+t[r+c],c+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[r+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===u)return s?0/0:(g?-1:1)*(1/0);s+=Math.pow(2,n),o-=h}return(g?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,r,e,n,i,o){var s,a,u,h=8*o-i-1,f=(1<<h)-1,c=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:o-1,p=n?1:-1,y=0>r||0===r&&0>1/r?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,s=f):(s=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-s))<1&&(s--,u*=2),r+=s+c>=1?l/u:l*Math.pow(2,1-c),r*u>=2&&(s++,u/=2),s+c>=f?(a=0,s=f):s+c>=1?(a=(r*u-1)*Math.pow(2,i),s+=c):(a=r*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[e+g]=255&a,g+=p,a/=256,i-=8);for(s=s<<i|a,h+=i;h>0;t[e+g]=255&s,g+=p,s/=256,h-=8);t[e+g-p]|=128*y}},{}],5:[function(t,r,e){var n=Array.isArray,i=Object.prototype.toString;r.exports=n||function(t){return!!t&&"[object Array]"==i.call(t)}},{}],"bitcore-message":[function(t,r,e){var n=t("bitcore");n.Message=t("./lib/message"),r.exports=n.Message},{"./lib/message":1,bitcore:"bitcore"}]},{},[]);