forked from OpenBazaar/wallet-address-validator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwallet-address-validator.min.js
1 lines (1 loc) · 52.2 KB
/
wallet-address-validator.min.js
1
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).WAValidator=t()}}(function(){return function i(s,a,u){function f(r,t){if(!a[r]){if(!s[r]){var e="function"==typeof require&&require;if(!t&&e)return e(r,!0);if(h)return h(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var o=a[r]={exports:{}};s[r][0].call(o.exports,function(t){var e=s[r][1][t];return f(e||t)},o,o.exports,i,s,a,u)}return a[r].exports}for(var h="function"==typeof require&&require,t=0;t<u.length;t++)f(u[t]);return f}({1:[function(t,e,r){var c=t("safe-buffer").Buffer;e.exports=function(u){for(var a={},f=u.length,h=u.charAt(0),t=0;t<u.length;t++){var e=u.charAt(t);if(void 0!==a[e])throw new TypeError(e+" is ambiguous");a[e]=t}function r(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return c.allocUnsafe(0);for(var e=[0],r=0;r<t.length;r++){var n=a[t[r]];if(void 0===n)return;for(var o=0,i=n;o<e.length;++o)i+=e[o]*f,e[o]=255&i,i>>=8;for(;0<i;)e.push(255&i),i>>=8}for(var s=0;t[s]===h&&s<t.length-1;++s)e.push(0);return c.from(e.reverse())}return{encode:function(t){if(0===t.length)return"";for(var e=[0],r=0;r<t.length;++r){for(var n=0,o=t[r];n<e.length;++n)o+=e[n]<<8,e[n]=o%f,o=o/f|0;for(;0<o;)e.push(o%f),o=o/f|0}for(var i="",s=0;0===t[s]&&s<t.length-1;++s)i+=h;for(var a=e.length-1;0<=a;--a)i+=u[e[a]];return i},decodeUnsafe:r,decode:function(t){var e=r(t);if(e)return e;throw new Error("Non-base"+f+" character")}}}},{"safe-buffer":7}],2:[function(t,e,r){"use strict";r.byteLength=function(t){return 3*t.length/4-c(t)},r.toByteArray=function(t){var e,r,n,o,i,s=t.length;o=c(t),i=new h(3*s/4-o),r=0<o?s-4:s;var a=0;for(e=0;e<r;e+=4)n=f[t.charCodeAt(e)]<<18|f[t.charCodeAt(e+1)]<<12|f[t.charCodeAt(e+2)]<<6|f[t.charCodeAt(e+3)],i[a++]=n>>16&255,i[a++]=n>>8&255,i[a++]=255&n;2===o?(n=f[t.charCodeAt(e)]<<2|f[t.charCodeAt(e+1)]>>4,i[a++]=255&n):1===o&&(n=f[t.charCodeAt(e)]<<10|f[t.charCodeAt(e+1)]<<4|f[t.charCodeAt(e+2)]>>2,i[a++]=n>>8&255,i[a++]=255&n);return i},r.fromByteArray=function(t){for(var e,r=t.length,n=r%3,o="",i=[],s=0,a=r-n;s<a;s+=16383)i.push(l(t,s,a<s+16383?a:s+16383));1===n?(e=t[r-1],o+=u[e>>2],o+=u[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=u[e>>10],o+=u[e>>4&63],o+=u[e<<2&63],o+="=");return i.push(o),i.join("")};for(var u=[],f=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=n.length;o<i;++o)u[o]=n[o],f[n.charCodeAt(o)]=o;function c(t){var e=t.length;if(0<e%4)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function l(t,e,r){for(var n,o,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),i.push(u[(o=n)>>18&63]+u[o>>12&63]+u[o>>6&63]+u[63&o]);return i.join("")}f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},{}],3:[function(t,e,r){"use strict";var n=t("base64-js"),i=t("ieee754");r.Buffer=c,r.SlowBuffer=function(t){+t!=t&&(t=0);return c.alloc(+t)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(t){if(o<t)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=c.prototype,e}function c(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 f(t)}return a(t,e,r)}function a(t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return O(t)||t&&O(t.buffer)?function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=c.prototype,n}(t,e,r):"string"==typeof t?function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|p(t,e),n=s(r),o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e):function(t){if(c.isBuffer(t)){var e=0|l(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}if(t){if(ArrayBuffer.isView(t)||"length"in t)return"number"!=typeof t.length||M(t.length)?s(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.")}(t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t){return u(t),s(t<0?0:0|l(t))}function h(t){for(var e=t.length<0?0:0|l(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function l(t){if(o<=t)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function p(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||O(t))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 R(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 R(t).length;e=(""+e).toLowerCase(),n=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),M(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,o){var i,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;a/=s=2,u/=2,r/=2}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var h=-1;for(i=r;i<a;i++)if(f(t,i)===f(e,-1===h?0:i-h)){if(-1===h&&(h=i),i-h+1===u)return h*s}else-1!==h&&(i-=i-h),h=-1}else for(a<r+u&&(r=a-u),i=r;0<=i;i--){for(var c=!0,l=0;l<u;l++)if(f(t,i+l)!==f(e,l)){c=!1;break}if(c)return i}return-1}function b(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?o<(n=Number(n))&&(n=o):n=o;var i=e.length;i/2<n&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(M(a))return s;t[r+s]=a}return s}function w(t,e,r,n){return F(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function v(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function m(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,s,a,u,f=t[o],h=null,c=239<f?4:223<f?3:191<f?2:1;if(o+c<=r)switch(c){case 1:f<128&&(h=f);break;case 2:128==(192&(i=t[o+1]))&&127<(u=(31&f)<<6|63&i)&&(h=u);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&2047<(u=(15&f)<<12|(63&i)<<6|63&s)&&(u<55296||57343<u)&&(h=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&65535<(u=(15&f)<<18|(63&i)<<12|(63&s)<<6|63&a)&&u<1114112&&(h=u)}null===h?(h=65533,c=1):65535<h&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),o+=c}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)}r.kMaxLength=o,(c.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{get:function(){if(this instanceof c)return this.buffer}}),Object.defineProperty(c.prototype,"offset",{get:function(){if(this instanceof c)return this.byteOffset}}),"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192,c.from=function(t,e,r){return a(t,e,r)},c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,c.alloc=function(t,e,r){return o=e,i=r,u(n=t),n<=0?s(n):void 0!==o?"string"==typeof i?s(n).fill(o,i):s(n).fill(o):s(n);var n,o,i},c.allocUnsafe=function(t){return f(t)},c.allocUnsafeSlow=function(t){return f(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},c.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}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(r=e=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(ArrayBuffer.isView(i)&&(i=c.from(i)),!c.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},c.byteLength=p,c.prototype._isBuffer=!0,c.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)d(this,e,e+1);return this},c.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)d(this,e,e+3),d(this,e+1,e+2);return this},c.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)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},c.prototype.toLocaleString=c.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?m(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 _(this,e,r);case"utf8":case"utf-8":return m(this,e,r);case"ascii":return E(this,e,r);case"latin1":case"binary":return B(this,e,r);case"base64":return v(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return 0<this.length&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,r,n,o){if(!c.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===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=e)return 0;if(o<=n)return-1;if(r<=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(i,s),u=this.slice(n,o),f=t.slice(e,r),h=0;h<a;++h)if(u[h]!==f[h]){i=u[h],s=f[h];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},c.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 o=this.length-e;if((void 0===r||o<r)&&(r=o),0<t.length&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i,s,a,u,f,h,c,l,p,d=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return l=e,p=r,F(R(t,(c=this).length-l),c,l,p);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return u=this,f=e,h=r,F(H(t),u,f,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s=e,a=r,F(function(t,e){for(var r,n,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,(i=this).length-s),i,s,a);default:if(d)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function E(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function B(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function _(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||n<r)&&(r=n);for(var o="",i=e;i<r;++i)o+=I(t[i]);return o}function k(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function T(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(r<t+e)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,o,i){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<e||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function x(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function S(t,e,r,n,o){return e=+e,r>>>=0,o||x(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function C(t,e,r,n,o){return e=+e,r>>>=0,o||x(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=c.prototype,n},c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);for(var n=this[t+--e],o=1;0<e&&(o*=256);)n+=this[t+--e]*o;return n},c.prototype.readUInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return(o*=128)<=n&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||T(t,e,this.length);for(var n=e,o=1,i=this[t+--n];0<n&&(o*=256);)i+=this[t+--n]*o;return(o*=128)<=i&&(i-=Math.pow(2,8*e)),i},c.prototype.readInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||T(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||T(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return t>>>=0,e||T(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||T(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||T(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||T(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||U(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||U(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;0<=--o&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);U(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i<r&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);U(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;0<=--i&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeFloatLE=function(t,e,r){return S(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return S(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return C(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return C(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),0<n&&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("Index out of range");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 o=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var i=o-1;0<=i;--i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return o},c.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}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 i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var s=c.isBuffer(t)?t:new c(t,n),a=s.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=s[i%a]}return this};var L=/[^+/0-9A-Za-z-_]/g;function I(t){return t<16?"0"+t.toString(16):t.toString(16)}function R(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],s=0;s<n;++s){if(55295<(r=t.charCodeAt(s))&&r<57344){if(!o){if(56319<r){-1<(e-=3)&&i.push(239,191,189);continue}if(s+1===n){-1<(e-=3)&&i.push(239,191,189);continue}o=r;continue}if(r<56320){-1<(e-=3)&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&-1<(e-=3)&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function H(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function O(t){return t instanceof ArrayBuffer||null!=t&&null!=t.constructor&&"ArrayBuffer"===t.constructor.name&&"number"==typeof t.byteLength}function M(t){return t!=t}},{"base64-js":2,ieee754:4}],4:[function(t,e,r){r.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,f=u>>1,h=-7,c=r?o-1:0,l=r?-1:1,p=t[e+c];for(c+=l,i=p&(1<<-h)-1,p>>=-h,h+=a;0<h;i=256*i+t[e+c],c+=l,h-=8);for(s=i&(1<<-h)-1,i>>=-h,h+=n;0<h;s=256*s+t[e+c],c+=l,h-=8);if(0===i)i=1-f;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=f}return(p?-1:1)*s*Math.pow(2,i-n)},r.write=function(t,e,r,n,o,i){var s,a,u,f=8*i-o-1,h=(1<<f)-1,c=h>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),2<=(e+=1<=s+c?l/u:l*Math.pow(2,1-c))*u&&(s++,u/=2),h<=s+c?(a=0,s=h):1<=s+c?(a=(e*u-1)*Math.pow(2,o),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,o),s=0));8<=o;t[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,f+=o;0<f;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*y}},{}],5:[function(t,o,i){"use strict";!function(t){function e(s,t,e){var o,a,u,f,h,c,l,p,d,y=0,g=[],b=0,w=!1,i=[],v=[],m=!1;if(o=(e=e||{}).encoding||"UTF8",(d=e.numRounds||1)!==parseInt(d,10)||d<1)throw Error("numRounds must a integer >= 1");if(0!==s.lastIndexOf("SHA-",0))throw Error("Chosen SHA variant is not supported");if(c=function(t,e){return M(t,e,s)},l=function(t,e,r,n){var o,i;if("SHA-224"!==s&&"SHA-256"!==s)throw Error("Unexpected error in SHA-2 implementation");for(o=15+(e+65>>>9<<4),i=16;t.length<=o;)t.push(0);for(t[e>>>5]|=128<<24-e%32,e+=r,t[o]=4294967295&e,t[o-1]=e/4294967296|0,r=t.length,e=0;e<r;e+=i)n=M(t.slice(e,e+i),n,s);if("SHA-224"===s)t=[n[0],n[1],n[2],n[3],n[4],n[5],n[6]];else{if("SHA-256"!==s)throw Error("Unexpected error in SHA-2 implementation");t=n}return t},p=function(t){return t.slice()},"SHA-224"===s)h=512,f=224;else{if("SHA-256"!==s)throw Error("Chosen SHA variant is not supported");h=512,f=256}u=T(t,o),a=O(s),this.setHMACKey=function(t,e,r){var n;if(!0===w)throw Error("HMAC key already set");if(!0===m)throw Error("Cannot set HMAC key after calling update");if(t=(e=T(e,o=(r||{}).encoding||"UTF8")(t)).binLen,e=e.value,r=(n=h>>>3)/4-1,n<t/8){for(e=l(e,t,0,O(s));e.length<=r;)e.push(0);e[r]&=4294967040}else if(t/8<n){for(;e.length<=r;)e.push(0);e[r]&=4294967040}for(t=0;t<=r;t+=1)i[t]=909522486^e[t],v[t]=1549556828^e[t];a=c(i,a),y=h,w=!0},this.update=function(t){var e,r,n,o=0,i=h>>>5;for(t=(e=u(t,g,b)).binLen,r=e.value,e=t>>>5,n=0;n<e;n+=i)o+h<=t&&(a=c(r.slice(n,n+i),a),o+=h);y+=o,g=r.slice(o>>>5),b=t%h,m=!0},this.getHash=function(t,e){var r,n,o,i;if(!0===w)throw Error("Cannot call getHash after setting HMAC key");switch(o=k(e),t){case"HEX":r=function(t){return A(t,f,o)};break;case"B64":r=function(t){return E(t,f,o)};break;case"BYTES":r=function(t){return B(t,f)};break;case"ARRAYBUFFER":try{n=new ArrayBuffer(0)}catch(t){throw Error("ARRAYBUFFER not supported by this environment")}r=function(t){return _(t,f)};break;default:throw Error("format must be HEX, B64, BYTES, or ARRAYBUFFER")}for(i=l(g.slice(),b,y,p(a)),n=1;n<d;n+=1)i=l(i,f,0,O(s));return r(i)},this.getHMAC=function(t,e){var r,n,o,i;if(!1===w)throw Error("Cannot call getHMAC without first setting HMAC key");switch(o=k(e),t){case"HEX":r=function(t){return A(t,f,o)};break;case"B64":r=function(t){return E(t,f,o)};break;case"BYTES":r=function(t){return B(t,f)};break;case"ARRAYBUFFER":try{r=new ArrayBuffer(0)}catch(t){throw Error("ARRAYBUFFER not supported by this environment")}r=function(t){return _(t,f)};break;default:throw Error("outputFormat must be HEX, B64, BYTES, or ARRAYBUFFER")}return n=l(g.slice(),b,y,p(a)),i=c(v,O(s)),r(i=l(n,f,h,i))}}function n(){}function A(t,e,r){var n,o,i="";for(e/=8,n=0;n<e;n+=1)o=t[n>>>2]>>>8*(3+n%4*-1),i+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?i.toUpperCase():i}function E(t,e,r){var n,o,i,s="",a=e/8;for(n=0;n<a;n+=3)for(o=n+1<a?t[n+1>>>2]:0,i=n+2<a?t[n+2>>>2]:0,i=(t[n>>>2]>>>8*(3+n%4*-1)&255)<<16|(o>>>8*(3+(n+1)%4*-1)&255)<<8|i>>>8*(3+(n+2)%4*-1)&255,o=0;o<4;o+=1)s+=8*n+6*o<=e?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>>6*(3-o)&63):r.b64Pad;return s}function B(t,e){var r,n,o="",i=e/8;for(r=0;r<i;r+=1)n=t[r>>>2]>>>8*(3+r%4*-1)&255,o+=String.fromCharCode(n);return o}function _(t,e){var r,n,o=e/8,i=new ArrayBuffer(o);for(n=new Uint8Array(i),r=0;r<o;r+=1)n[r]=t[r>>>2]>>>8*(3+r%4*-1)&255;return i}function k(t){var e={outputUpper:!1,b64Pad:"=",shakeLen:-1};if(t=t||{},e.outputUpper=t.outputUpper||!1,!0===t.hasOwnProperty("b64Pad")&&(e.b64Pad=t.b64Pad),"boolean"!=typeof e.outputUpper)throw Error("Invalid outputUpper formatting option");if("string"!=typeof e.b64Pad)throw Error("Invalid b64Pad formatting option");return e}function T(t,l){var e;switch(l){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(t){case"HEX":e=function(t,e,r){var n,o,i,s,a,u=t.length;if(0!=u%2)throw Error("String of HEX type must be in byte increments");for(e=e||[0],a=(r=r||0)>>>3,n=0;n<u;n+=2){if(o=parseInt(t.substr(n,2),16),isNaN(o))throw Error("String of HEX type contains invalid characters");for(i=(s=(n>>>1)+a)>>>2;e.length<=i;)e.push(0);e[i]|=o<<8*(3+s%4*-1)}return{value:e,binLen:4*u+r}};break;case"TEXT":e=function(t,e,r){var n,o,i,s,a,u,f,h,c=0;if(e=e||[0],a=(r=r||0)>>>3,"UTF8"===l)for(h=3,i=0;i<t.length;i+=1)for(o=[],(n=t.charCodeAt(i))<128?o.push(n):n<2048?(o.push(192|n>>>6),o.push(128|63&n)):n<55296||57344<=n?o.push(224|n>>>12,128|n>>>6&63,128|63&n):(i+=1,n=65536+((1023&n)<<10|1023&t.charCodeAt(i)),o.push(240|n>>>18,128|n>>>12&63,128|n>>>6&63,128|63&n)),s=0;s<o.length;s+=1){for(u=(f=c+a)>>>2;e.length<=u;)e.push(0);e[u]|=o[s]<<8*(h+f%4*-1),c+=1}else if("UTF16BE"===l||"UTF16LE"===l)for(h=2,o="UTF16LE"===l||"UTF16LE"!==l&&!1,i=0;i<t.length;i+=1){for(n=t.charCodeAt(i),!0===o&&(n=(s=255&n)<<8|n>>>8),u=(f=c+a)>>>2;e.length<=u;)e.push(0);e[u]|=n<<8*(h+f%4*-1),c+=2}return{value:e,binLen:8*c+r}};break;case"B64":e=function(t,e,r){var n,o,i,s,a,u,f,h=0;if(-1===t.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");if(o=t.indexOf("="),t=t.replace(/\=/g,""),-1!==o&&o<t.length)throw Error("Invalid '=' found in base-64 string");for(e=e||[0],u=(r=r||0)>>>3,o=0;o<t.length;o+=4){for(a=t.substr(o,4),i=s=0;i<a.length;i+=1)s|=(n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a[i]))<<18-6*i;for(i=0;i<a.length-1;i+=1){for(n=(f=h+u)>>>2;e.length<=n;)e.push(0);e[n]|=(s>>>16-8*i&255)<<8*(3+f%4*-1),h+=1}}return{value:e,binLen:8*h+r}};break;case"BYTES":e=function(t,e,r){var n,o,i,s,a;for(e=e||[0],i=(r=r||0)>>>3,o=0;o<t.length;o+=1)n=t.charCodeAt(o),s=(a=o+i)>>>2,e.length<=s&&e.push(0),e[s]|=n<<8*(3+a%4*-1);return{value:e,binLen:8*t.length+r}};break;case"ARRAYBUFFER":try{e=new ArrayBuffer(0)}catch(t){throw Error("ARRAYBUFFER not supported by this environment")}e=function(t,e,r){var n,o,i,s,a;for(e=e||[0],o=(r=r||0)>>>3,a=new Uint8Array(t),n=0;n<t.byteLength;n+=1)i=(s=n+o)>>>2,e.length<=i&&e.push(0),e[i]|=a[n]<<8*(3+s%4*-1);return{value:e,binLen:8*t.byteLength+r}};break;default:throw Error("format must be HEX, TEXT, B64, BYTES, or ARRAYBUFFER")}return e}function r(t,e){return t>>>e|t<<32-e}function U(t,e,r){return t&e^~t&r}function x(t,e,r){return t&e^t&r^e&r}function S(t){return r(t,2)^r(t,13)^r(t,22)}function C(t){return r(t,6)^r(t,11)^r(t,25)}function L(t){return r(t,7)^r(t,18)^t>>>3}function I(t){return r(t,17)^r(t,19)^t>>>10}function R(t,e){var r=(65535&t)+(65535&e);return((t>>>16)+(e>>>16)+(r>>>16)&65535)<<16|65535&r}function H(t,e,r,n){var o=(65535&t)+(65535&e)+(65535&r)+(65535&n);return((t>>>16)+(e>>>16)+(r>>>16)+(n>>>16)+(o>>>16)&65535)<<16|65535&o}function F(t,e,r,n,o){var i=(65535&t)+(65535&e)+(65535&r)+(65535&n)+(65535&o);return((t>>>16)+(e>>>16)+(r>>>16)+(n>>>16)+(o>>>16)+(i>>>16)&65535)<<16|65535&i}function O(t){var e,r=[];if(0!==t.lastIndexOf("SHA-",0))throw Error("No SHA variants supported");switch(r=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t){case"SHA-224":break;case"SHA-256":r=e;break;case"SHA-384":case"SHA-512":r=[new n,new n,new n,new n,new n,new n,new n,new n];break;default:throw Error("Unknown SHA variant")}return r}function M(t,e,r){var n,o,i,s,a,u,f,h,c,l,p,d,y,g,b,w,v,m,A,E,B,_,k,T=[];if("SHA-224"!==r&&"SHA-256"!==r)throw Error("Unexpected error in SHA-2 implementation");for(l=64,d=1,_=Number,y=R,g=H,b=F,w=L,v=I,m=S,A=C,B=x,E=U,k=z,r=e[0],n=e[1],o=e[2],i=e[3],s=e[4],a=e[5],u=e[6],f=e[7],p=0;p<l;p+=1)p<16?(c=p*d,h=t.length<=c?0:t[c],c=t.length<=c+1?0:t[c+1],T[p]=new _(h,c)):T[p]=g(v(T[p-2]),T[p-7],w(T[p-15]),T[p-16]),h=b(f,A(s),E(s,a,u),k[p],T[p]),c=y(m(r),B(r,n,o)),f=u,u=a,a=s,s=y(i,h),i=o,o=n,n=r,r=y(h,c);return e[0]=y(r,e[0]),e[1]=y(n,e[1]),e[2]=y(o,e[2]),e[3]=y(i,e[3]),e[4]=y(s,e[4]),e[5]=y(a,e[5]),e[6]=y(u,e[6]),e[7]=y(f,e[7]),e}var z;z=[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],void 0!==i?(void 0!==o&&o.exports&&(o.exports=e),i=e):t.jsSHA=e}(this)},{}],6:[function(t,e,r){var n,o,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(t){o=a}}();var f,h=[],c=!1,l=-1;function p(){c&&f&&(c=!1,f.length?h=f.concat(h):l=-1,h.length&&d())}function d(){if(!c){var t=u(p);c=!0;for(var e=h.length;e;){for(f=h,h=[];++l<e;)f&&f[l].run();l=-1,e=h.length}f=null,c=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];h.push(new y(t,e)),1!==h.length||c||u(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],7:[function(t,e,r){var n=t("buffer"),o=n.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return o(t,e,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,r),r.Buffer=s),i(o,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=o(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},{buffer:3}],8:[function(t,e,r){for(var n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",s={},o=0;o<n.length;++o)s[n.charAt(o)]=o;var a=n.length;e.exports={decode:function(t){if(0===t.length)return[];var e,r,n=[0];for(e=0;e<t.length;++e){var o=t[e];if(!(o in s))throw new Error("Non-base58 character");for(r=0;r<n.length;++r)n[r]*=a;n[0]+=s[o];var i=0;for(r=0;r<n.length;++r)n[r]+=i,i=n[r]>>8,n[r]&=255;for(;i;)n.push(255&i),i>>=8}for(e=0;"1"===t[e]&&e<t.length-1;++e)n.push(0);return n.reverse()}}},{}],9:[function(t,r,e){(function(i){"use strict";c.sigma=[[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],[14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],[11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4],[7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8],[9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13],[2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9],[12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11],[13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10],[6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5],[10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],[14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],[11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4],[7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8],[9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13],[2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]],c.u256=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479],c.padding=new i([128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),c.prototype._length_carry=function(t){for(var e=0;e<t.length&&!(t[e]<4294967296);++e)t[e]-=4294967296,t[e+1]+=1},c.prototype.update=function(t,e){t=new i(t,e);for(var r=this._block,n=0;this._blockOffset+t.length-n>=r.length;){for(var o=this._blockOffset;o<r.length;)r[o++]=t[n++];this._length[0]+=8*r.length,this._length_carry(this._length),this._compress(),this._blockOffset=0}for(;n<t.length;)r[this._blockOffset++]=t[n++];return this};var t=new i([1]),e=new i([129]);function h(t,e){return(t<<32-e|t>>>e)>>>0}function o(t,e,r,n,o,i,s,a){var u=c.sigma,f=c.u256;t[n]=t[n]+((e[u[r][a]]^f[u[r][a+1]])>>>0)+t[o]>>>0,t[s]=h(t[s]^t[n],16),t[i]=t[i]+t[s]>>>0,t[o]=h(t[o]^t[i],12),t[n]=t[n]+((e[u[r][a+1]]^f[u[r][a]])>>>0)+t[o]>>>0,t[s]=h(t[s]^t[n],8),t[i]=t[i]+t[s]>>>0,t[o]=h(t[o]^t[i],7)}function c(){this._h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this._s=[0,0,0,0],this._block=new i(64),this._blockOffset=0,this._length=[0,0],this._nullt=!1,this._zo=t,this._oo=e}c.prototype._compress=function(){var t,e=c.u256,r=new Array(16),n=new Array(16);for(t=0;t<16;++t)n[t]=this._block.readUInt32BE(4*t);for(t=0;t<8;++t)r[t]=this._h[t]>>>0;for(t=8;t<12;++t)r[t]=(this._s[t-8]^e[t-8])>>>0;for(t=12;t<16;++t)r[t]=e[t-8];for(this._nullt||(r[12]=(r[12]^this._length[0])>>>0,r[13]=(r[13]^this._length[0])>>>0,r[14]=(r[14]^this._length[1])>>>0,r[15]=(r[15]^this._length[1])>>>0),t=0;t<14;++t)o(r,n,t,0,4,8,12,0),o(r,n,t,1,5,9,13,2),o(r,n,t,2,6,10,14,4),o(r,n,t,3,7,11,15,6),o(r,n,t,0,5,10,15,8),o(r,n,t,1,6,11,12,10),o(r,n,t,2,7,8,13,12),o(r,n,t,3,4,9,14,14);for(t=0;t<16;++t)this._h[t%8]=(this._h[t%8]^r[t])>>>0;for(t=0;t<8;++t)this._h[t]=(this._h[t]^this._s[t%4])>>>0},c.prototype._padding=function(){var t=this._length[0]+8*this._blockOffset,e=this._length[1];4294967296<=t&&(t-=4294967296,e+=1);var r=new i(8);r.writeUInt32BE(e,0),r.writeUInt32BE(t,4),55===this._blockOffset?(this._length[0]-=8,this.update(this._oo)):(this._blockOffset<55?(0===this._blockOffset&&(this._nullt=!0),this._length[0]-=8*(55-this._blockOffset),this.update(c.padding.slice(0,55-this._blockOffset))):(this._length[0]-=8*(64-this._blockOffset),this.update(c.padding.slice(0,64-this._blockOffset)),this._length[0]-=440,this.update(c.padding.slice(1,56)),this._nullt=!0),this.update(this._zo),this._length[0]-=8),this._length[0]-=64,this.update(r)},c.prototype.digest=function(t){this._padding();for(var e=new i(32),r=0;r<8;++r)e.writeUInt32BE(this._h[r],4*r);return e.toString(t)},r.exports=c}).call(this,t("buffer").Buffer)},{buffer:3}],10:[function(t,I,e){(function(t,e){"use strict";var c="input is invalid type",r="object"==typeof window,n=r?window:{};n.JS_SHA3_NO_WINDOW&&(r=!1);var o=!r&&"object"==typeof self;!n.JS_SHA3_NO_NODE_JS&&"object"==typeof t&&t.versions&&t.versions.node?n=e:o&&(n=self);var l=!n.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,u="0123456789abcdef".split(""),i=[4,1024,262144,67108864],p=[0,8,16,24],ht=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],s=[224,256,384,512],a=[128,256],f=["hex","buffer","arrayBuffer","array","digest"],h={128:168,256:136};!n.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!l||!n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var d=function(e,r,n){return function(t){return new S(e,r,e).update(t)[n]()}},y=function(r,n,o){return function(t,e){return new S(r,n,e).update(t)[o]()}},g=function(o,t,i){return function(t,e,r,n){return A["cshake"+o].update(t,e,r,n)[i]()}},b=function(o,t,i){return function(t,e,r,n){return A["kmac"+o].update(t,e,r,n)[i]()}},w=function(t,e,r,n){for(var o=0;o<f.length;++o){var i=f[o];t[i]=e(r,n,i)}return t},v=function(t,e){var r=d(t,e,"hex");return r.create=function(){return new S(t,e,t)},r.update=function(t){return r.create().update(t)},w(r,d,t,e)},m=[{name:"keccak",padding:[1,256,65536,16777216],bits:s,createMethod:v},{name:"sha3",padding:[6,1536,393216,100663296],bits:s,createMethod:v},{name:"shake",padding:[31,7936,2031616,520093696],bits:a,createMethod:function(e,r){var n=y(e,r,"hex");return n.create=function(t){return new S(e,r,t)},n.update=function(t,e){return n.create(e).update(t)},w(n,y,e,r)}},{name:"cshake",padding:i,bits:a,createMethod:function(n,o){var i=h[n],s=g(n,0,"hex");return s.create=function(t,e,r){return e||r?new S(n,o,t).bytepad([e,r],i):A["shake"+n].create(t)},s.update=function(t,e,r,n){return s.create(e,r,n).update(t)},w(s,g,n,o)}},{name:"kmac",padding:i,bits:a,createMethod:function(n,o){var i=h[n],s=b(n,0,"hex");return s.create=function(t,e,r){return new C(n,o,e).bytepad(["KMAC",r],i).bytepad([t],i)},s.update=function(t,e,r,n){return s.create(t,r,n).update(e)},w(s,b,n,o)}}],A={},E=[],B=0;B<m.length;++B)for(var _=m[B],k=_.bits,T=0;T<k.length;++T){var U=_.name+"_"+k[T];if(E.push(U),A[U]=_.createMethod(k[T],_.padding),"sha3"!==_.name){var x=_.name+k[T];E.push(x),A[x]=A[U]}}function S(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function C(t,e,r){S.call(this,t,e,r)}S.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw c;if(null===t)throw c;if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||l&&ArrayBuffer.isView(t)))throw c;e=!0}for(var n,o,i=this.blocks,s=this.byteCount,a=t.length,u=this.blockCount,f=0,h=this.s;f<a;){if(this.reset)for(this.reset=!1,i[0]=this.block,n=1;n<u+1;++n)i[n]=0;if(e)for(n=this.start;f<a&&n<s;++f)i[n>>2]|=t[f]<<p[3&n++];else for(n=this.start;f<a&&n<s;++f)(o=t.charCodeAt(f))<128?i[n>>2]|=o<<p[3&n++]:(o<2048?i[n>>2]|=(192|o>>6)<<p[3&n++]:(o<55296||57344<=o?i[n>>2]|=(224|o>>12)<<p[3&n++]:(o=65536+((1023&o)<<10|1023&t.charCodeAt(++f)),i[n>>2]|=(240|o>>18)<<p[3&n++],i[n>>2]|=(128|o>>12&63)<<p[3&n++]),i[n>>2]|=(128|o>>6&63)<<p[3&n++]),i[n>>2]|=(128|63&o)<<p[3&n++]);if(s<=(this.lastByteIndex=n)){for(this.start=n-s,this.block=i[u],n=0;n<u;++n)h[n]^=i[n];L(h),this.reset=!0}else this.start=n}return this}},S.prototype.encode=function(t,e){var r=255&t,n=1,o=[r];for(r=255&(t>>=8);0<r;)o.unshift(r),r=255&(t>>=8),++n;return e?o.push(n):o.unshift(n),this.update(o),o.length},S.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"!==r)throw c;if(null===t)throw c;if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||l&&ArrayBuffer.isView(t)))throw c;e=!0}var n=0,o=t.length;if(e)n=o;else for(var i=0;i<t.length;++i){var s=t.charCodeAt(i);s<128?n+=1:s<2048?n+=2:s<55296||57344<=s?n+=3:(s=65536+((1023&s)<<10|1023&t.charCodeAt(++i)),n+=4)}return n+=this.encode(8*n),this.update(t),n},S.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n<t.length;++n)r+=this.encodeString(t[n]);var o=e-r%e,i=[];return i.length=o,this.update(i),this},S.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex,r=this.blockCount,n=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e<r+1;++e)t[e]=0;for(t[r-1]|=2147483648,e=0;e<r;++e)n[e]^=t[e];L(n)}},S.prototype.toString=S.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,a="";s<n;){for(i=0;i<e&&s<n;++i,++s)t=r[i],a+=u[t>>4&15]+u[15&t]+u[t>>12&15]+u[t>>8&15]+u[t>>20&15]+u[t>>16&15]+u[t>>28&15]+u[t>>24&15];s%e==0&&(L(r),i=0)}return o&&(t=r[i],a+=u[t>>4&15]+u[15&t],1<o&&(a+=u[t>>12&15]+u[t>>8&15]),2<o&&(a+=u[t>>20&15]+u[t>>16&15])),a},S.prototype.buffer=S.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,a=this.outputBits>>3;t=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(t);s<n;){for(i=0;i<e&&s<n;++i,++s)u[s]=r[i];s%e==0&&L(r)}return o&&(u[i]=r[i],t=t.slice(0,a)),t},S.prototype.digest=S.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,n=this.s,o=this.outputBlocks,i=this.extraBytes,s=0,a=0,u=[];a<o;){for(s=0;s<r&&a<o;++s,++a)t=a<<2,e=n[s],u[t]=255&e,u[t+1]=e>>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;a%r==0&&L(n)}return i&&(t=a<<2,e=n[s],u[t]=255&e,1<i&&(u[t+1]=e>>8&255),2<i&&(u[t+2]=e>>16&255)),u},(C.prototype=new S).finalize=function(){return this.encode(this.outputBits,!0),S.prototype.finalize.call(this)};var L=function(t){var e,r,n,o,i,s,a,u,f,h,c,l,p,d,y,g,b,w,v,m,A,E,B,_,k,T,U,x,S,C,L,I,R,H,F,O,M,z,N,j,Y,P,X,V,D,q,J,W,K,Z,G,Q,$,tt,et,rt,nt,ot,it,st,at,ut,ft;for(n=0;n<48;n+=2)o=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],f=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],c=t[7]^t[17]^t[27]^t[37]^t[47],e=(l=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|a>>>31),r=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(a<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=o^(u<<1|f>>>31),r=i^(f<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(h<<1|c>>>31),r=a^(c<<1|h>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(l<<1|p>>>31),r=f^(p<<1|l>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=h^(o<<1|i>>>31),r=c^(i<<1|o>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,d=t[0],y=t[1],q=t[11]<<4|t[10]>>>28,J=t[10]<<4|t[11]>>>28,x=t[20]<<3|t[21]>>>29,S=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,at=t[30]<<9|t[31]>>>23,P=t[40]<<18|t[41]>>>14,X=t[41]<<18|t[40]>>>14,H=t[2]<<1|t[3]>>>31,F=t[3]<<1|t[2]>>>31,g=t[13]<<12|t[12]>>>20,b=t[12]<<12|t[13]>>>20,W=t[22]<<10|t[23]>>>22,K=t[23]<<10|t[22]>>>22,C=t[33]<<13|t[32]>>>19,L=t[32]<<13|t[33]>>>19,ut=t[42]<<2|t[43]>>>30,ft=t[43]<<2|t[42]>>>30,tt=t[5]<<30|t[4]>>>2,et=t[4]<<30|t[5]>>>2,O=t[14]<<6|t[15]>>>26,M=t[15]<<6|t[14]>>>26,w=t[25]<<11|t[24]>>>21,v=t[24]<<11|t[25]>>>21,Z=t[34]<<15|t[35]>>>17,G=t[35]<<15|t[34]>>>17,I=t[45]<<29|t[44]>>>3,R=t[44]<<29|t[45]>>>3,_=t[6]<<28|t[7]>>>4,k=t[7]<<28|t[6]>>>4,rt=t[17]<<23|t[16]>>>9,nt=t[16]<<23|t[17]>>>9,z=t[26]<<25|t[27]>>>7,N=t[27]<<25|t[26]>>>7,m=t[36]<<21|t[37]>>>11,A=t[37]<<21|t[36]>>>11,Q=t[47]<<24|t[46]>>>8,$=t[46]<<24|t[47]>>>8,V=t[8]<<27|t[9]>>>5,D=t[9]<<27|t[8]>>>5,T=t[18]<<20|t[19]>>>12,U=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,it=t[28]<<7|t[29]>>>25,j=t[38]<<8|t[39]>>>24,Y=t[39]<<8|t[38]>>>24,E=t[48]<<14|t[49]>>>18,B=t[49]<<14|t[48]>>>18,t[0]=d^~g&w,t[1]=y^~b&v,t[10]=_^~T&x,t[11]=k^~U&S,t[20]=H^~O&z,t[21]=F^~M&N,t[30]=V^~q&W,t[31]=D^~J&K,t[40]=tt^~rt&ot,t[41]=et^~nt&it,t[2]=g^~w&m,t[3]=b^~v&A,t[12]=T^~x&C,t[13]=U^~S&L,t[22]=O^~z&j,t[23]=M^~N&Y,t[32]=q^~W&Z,t[33]=J^~K&G,t[42]=rt^~ot&st,t[43]=nt^~it&at,t[4]=w^~m&E,t[5]=v^~A&B,t[14]=x^~C&I,t[15]=S^~L&R,t[24]=z^~j&P,t[25]=N^~Y&X,t[34]=W^~Z&Q,t[35]=K^~G&$,t[44]=ot^~st&ut,t[45]=it^~at&ft,t[6]=m^~E&d,t[7]=A^~B&y,t[16]=C^~I&_,t[17]=L^~R&k,t[26]=j^~P&H,t[27]=Y^~X&F,t[36]=Z^~Q&V,t[37]=G^~$&D,t[46]=st^~ut&tt,t[47]=at^~ft&et,t[8]=E^~d&g,t[9]=B^~y&b,t[18]=I^~_&T,t[19]=R^~k&U,t[28]=P^~H&O,t[29]=X^~F&M,t[38]=Q^~V&q,t[39]=$^~D&J,t[48]=ut^~tt&rt,t[49]=ft^~et&nt,t[0]^=ht[n],t[1]^=ht[n+1]};I.exports=A}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:6}],11:[function(t,e,r){var n=t("jssha/src/sha256"),o=t("./blake256"),i=t("./sha3").keccak256;e.exports={toHex:function(t){for(var e,r,n="",o=0;o<t.length;o++)n+=(e=t[o],r=void 0,1===(r=Math.round(e).toString(16)).length&&(r="0"+r),r);return n},sha256:function(t){var e=new n("SHA-256","HEX");return e.update(t),e.getHash("HEX")},sha256Checksum:function(t){return this.sha256(this.sha256(t)).substr(0,8)},blake256:function(t){return(new o).update(t,"hex").digest("hex")},blake256Checksum:function(t){return this.blake256(this.blake256(t)).substr(0,8)},keccak256:function(t){return i(t)}}},{"./blake256":9,"./sha3":10,"jssha/src/sha256":5}],12:[function(t,e,r){var n=t("./ripple_validator"),o=t("./ethereum_validator"),i=[{name:"bitcoin",symbol:"btc",addressTypes:{prod:["00","05"],testnet:["6f","c4"]}},{name:"bitcoincash",symbol:"bch",addressTypes:{prod:["00","05"],testnet:["6f","c4"]}},{name:"litecoin",symbol:"ltc",addressTypes:{prod:["30","05","32"],testnet:["6f","c4","3a"]}},{name:"peercoin",symbol:"ppc",addressTypes:{prod:["37","75"],testnet:["6f","c4"]}},{name:"dogecoin",symbol:"doge",addressTypes:{prod:["1e","16"],testnet:["71","c4"]}},{name:"beavercoin",symbol:"bvc",addressTypes:{prod:["19","05"],testnet:["6f","c4"]}},{name:"freicoin",symbol:"frc",addressTypes:{prod:["00","05"],testnet:["6f","c4"]}},{name:"protoshares",symbol:"pts",addressTypes:{prod:["38","05"],testnet:["6f","c4"]}},{name:"megacoin",symbol:"mec",addressTypes:{prod:["32","05"],testnet:["6f","c4"]}},{name:"primecoin",symbol:"xpm",addressTypes:{prod:["17","53"],testnet:["6f","c4"]}},{name:"auroracoin",symbol:"aur",addressTypes:{prod:["17","05"],testnet:["6f","c4"]}},{name:"namecoin",symbol:"nmc",addressTypes:{prod:["34"],testnet:[]}},{name:"biocoin",symbol:"bio",addressTypes:{prod:["19","14"],testnet:["6f","c4"]}},{name:"garlicoin",symbol:"grlc",addressTypes:{prod:["26","05"],testnet:["6f","c4"]}},{name:"vertcoin",symbol:"vtc",addressTypes:{prod:["0x","47"],testnet:["6f","c4"]}},{name:"bitcoingold",symbol:"btg",addressTypes:{prod:["26","17"],testnet:["6f","c4"]}},{name:"komodo",symbol:"kmd",addressTypes:{prod:["3c","55"],testnet:["0","5"]}},{name:"bitcoinz",symbol:"btcz",expectedLength:26,addressTypes:{prod:["1cb8","1cbd"],testnet:["1d25","1cba"]}},{name:"bitcoinprivate",symbol:"btcp",expectedLength:26,addressTypes:{prod:["1325","13af"],testnet:["1957","19e0"]}},{name:"hush",symbol:"hush",expectedLength:26,addressTypes:{prod:["1cb8","1cbd"],testnet:["1d25","1cba"]}},{name:"snowgem",symbol:"sng",expectedLength:26,addressTypes:{prod:["1c28","1c2d"],testnet:["1d25","1cba"]}},{name:"zcash",symbol:"zec",expectedLength:26,addressTypes:{prod:["1cb8","1cbd"],testnet:["1d25","1cba"]}},{name:"zclassic",symbol:"zcl",expectedLength:26,addressTypes:{prod:["1cb8","1cbd"],testnet:["1d25","1cba"]}},{name:"zencash",symbol:"zen",expectedLength:26,addressTypes:{prod:["2089","2096"],testnet:["2092","2098"]}},{name:"votecoin",symbol:"vot",expectedLength:26,addressTypes:{prod:["1cb8","1cbd"],testnet:["1d25","1cba"]}},{name:"decred",symbol:"dcr",addressTypes:{prod:["073f","071a"],testnet:["0f21","0efc"]},hashFunction:"blake256",expectedLength:26},{name:"digibyte",symbol:"dgb",addressTypes:{prod:["1e"],testnet:[]}},{name:"ethereum",symbol:"eth",validator:o},{name:"etherzero",symbol:"etz",validator:o},{name:"ethereumclassic",symbol:"etc",validator:o},{name:"callisto",symbol:"clo",validator:o},{name:"ripple",symbol:"xrp",validator:n},{name:"dash",symbol:"dash",addressTypes:{prod:["4c","10"],testnet:["8c","13"]}},{name:"neo",symbol:"neo",addressTypes:{prod:["17"],testnet:[]}},{name:"neogas",symbol:"gas",addressTypes:{prod:["17"],testnet:[]}},{name:"qtum",symbol:"qtum",addressTypes:{prod:["3a","32"],testnet:["6f","c4"]}}];e.exports={getByNameOrSymbol:function(t){for(var e=t.toLowerCase(),r=0;r<i.length;r++){var n=i[r];if(n.name===e||n.symbol===e)return n}return null}}},{"./ethereum_validator":13,"./ripple_validator":14}],13:[function(t,e,r){var n=t("./crypto/utils");e.exports={isValidAddress:function(t){return!!/^0x[0-9a-fA-F]{40}$/.test(t)&&(!(!/^0x[0-9a-f]{40}$/.test(t)&&!/^0x?[0-9A-F]{40}$/.test(t))||this.verifyChecksum(t))},verifyChecksum:function(t){t=t.replace("0x","");for(var e=n.keccak256(t.toLowerCase()),r=0;r<40;r++)if(7<parseInt(e[r],16)&&t[r].toUpperCase()!==t[r]||parseInt(e[r],16)<=7&&t[r].toLowerCase()!==t[r])return!1;return!0}}},{"./crypto/utils":11}],14:[function(t,e,r){var n=t("./crypto/utils"),o="rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz",i=t("base-x")(o),s=new RegExp("^r["+o+"]{27,35}$");e.exports={isValidAddress:function(t){return!!s.test(t)&&this.verifyChecksum(t)},verifyChecksum:function(t){var e=i.decode(t);return n.sha256Checksum(n.toHex(e.slice(0,-4)))===n.toHex(e.slice(-4))}}},{"./crypto/utils":11,"base-x":1}],15:[function(t,e,r){var s=t("./crypto/base58"),a=t("./crypto/utils"),i=t("./currencies"),u="bitcoin",f="prod";function h(t,e){switch(t){case"blake256":return a.blake256Checksum(e);case"sha256":default:return a.sha256Checksum(e)}}function c(t,e){var r=(e=e||{}).expectedLength||25,n=e.hashFunction||"sha256",o=function(t){try{return s.decode(t)}catch(t){return null}}(t);if(o){var i=o.length;return i!==r?null:a.toHex(o.slice(i-4,i))===h(n,a.toHex(o.slice(0,i-4)))?a.toHex(o.slice(0,r-24)):null}return null}e.exports={getAddressType:c,checksum:h,validate:function(t,e,r){e=e||u,r=r||f;var n=i.getByNameOrSymbol(e);if(n.validator)return n.validator.isValidAddress(t);var o=c(t,n);return null!=o&&0<=("prod"===r||"testnet"===r?n.addressTypes[r]:n.addressTypes.prod.concat(n.addressTypes.testnet)).indexOf(o)}}},{"./crypto/base58":8,"./crypto/utils":11,"./currencies":12}]},{},[15])(15)});