text: function assert(b,a){if(!b){throw a||"Assertion failed"}}function checkArgType(a,b){assert((typeof a).toLowerCase()==b.toLowerCase(),"Invalid argument type")}function checkArgsType(d,e){for(var b=0;b<d.length;b++){checkArgType(d[b],e[b])}}function numberWithCommas(a){if(!isNumber(a)){return a}var b=a.toString().split(".");b[0]=b[0].replace(/\B(?=(\d{3})+(?!\d))/g,",");return b.join(".")}function isNumber(a){return !isNaN(parseFloat(a))&&isFinite(a)}function numberHasDecimalPlace(a){return a%1!=0}function byteCount(a){return encodeURI(a).split(/%..|./).length-1}function randomIntFromInterval(b,a){return Math.floor(Math.random()*(a-b+1)+b)}function selectText(b){var e=document,f=e.getElementById(b),a,d;if(e.body.createTextRange){a=e.body.createTextRange();a.moveToElementText(f);a.select()}else{if(window.getSelection){d=window.getSelection();a=e.createRange();a.selectNodeContents(f);d.removeAllRanges();d.addRange(a)}}}function noExponents(g){var d=String(g).split(/[eE]/);if(d.length==1){return d[0]}var f="",a=this<0?"-":"",e=d[0].replace(".",""),b=Number(d[1])+1;if(b<0){f=a+"0.";while(b++){f+="0"}return f+e.replace(/^\-/,"")}b-=e.length;while(b--){f+="0"}return e+f}!function(){function b(d){var e=arguments;return function(k,j){var g=0,f=0,h=e.length;while(f===0&&g<h){f=a(e[g])(k,j);g++}return f}}function a(e){var d=1;if(e[0]==="-"){d=-1;e=e.substr(1)}return function(h,g){var f=(h[e]<g[e])?-1:(h[e]>g[e])?1:0;return f*d}}Object.defineProperty(Array.prototype,"sortBy",{enumerable:false,writable:true,value:function(){return this.sort(b.apply(null,arguments))}})}();Storage.prototype.setObject=function(a,b){this.setItem(a,JSON.stringify(b))};Storage.prototype.getObject=function(a){var b=this.getItem(a);return b&&JSON.parse(b)};function deepCompare(){var d,f;function e(g,i){var h;if(isNaN(g)&&isNaN(i)&&typeof g==="number"&&typeof i==="number"){return true}if(g===i){return true}if((typeof g==="function"&&typeof i==="function")||(g instanceof Date&&i instanceof Date)||(g instanceof RegExp&&i instanceof RegExp)||(g instanceof String&&i instanceof String)||(g instanceof Number&&i instanceof Number)){return g.toString()===i.toString()}if(!(g instanceof Object&&i instanceof Object)){return false}if(g.isPrototypeOf(i)||i.isPrototypeOf(g)){return false}if(g.constructor!==i.constructor){return false}if(g.prototype!==i.prototype){return false}if(d.indexOf(g)>-1||f.indexOf(i)>-1){return false}for(h in i){if(i.hasOwnProperty(h)!==g.hasOwnProperty(h)){return false}else{if(typeof i[h]!==typeof g[h]){return false}}}for(h in g){if(i.hasOwnProperty(h)!==g.hasOwnProperty(h)){return false}else{if(typeof i[h]!==typeof g[h]){return false}}switch(typeof(g[h])){case"object":case"function":d.push(g);f.push(i);if(!e(g[h],i[h])){return false}d.pop();f.pop();break;default:if(g[h]!==i[h]){return false}break}}return true}if(arguments.length<1){return true}for(var b=1,a=arguments.length;b<a;b++){d=[];f=[];if(!e(arguments[0],arguments[b])){return false}}return true}function timestampToString(a){return moment(a*1000).format("MMM Do YYYY, h:mm:ss a")}function satoshiToPercent(b){var a=mulFloat(divFloat(b,UNIT),100);return smartFormat(a,4,4)+"%"}function currency(a,b){return smartFormat(normalizeQuantity(a),4,4)+" "+b}function satoshiToXCP(a){return currency(a,"XCP")}function round(b,a){if(a===undefined||a===null){a=8}return Decimal.round(new Decimal(b),a,Decimal.MidpointRounding.ToEven).toFloat()}function reduce(b,d){var a=function a(f,e){return e?a(e,f%e):f};a=a(b,d);return[b/a,d/a]}function isValidURL(b){var a=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;if(!b.match(a)){return false}else{return true}}function get_duration(a){var e=a.split("/");for(var b in e){if(e[b].substring(0,1)=="P"){var d=nezasa.iso8601.Period.parseToString(e[b]);return d}}return"Unknown"}bytesToHex=function(a){for(var d=[],b=0;b<a.length;b++){d.push((a[b]>>>4).toString(16)),d.push((15&a[b]).toString(16))}return d.join("")};hexToBytes=function(a){for(var d=[],b=0;b<a.length;b+=2){d.push(parseInt(a.substr(b,2),16))}return d};function genRandom(){var b=new Uint8Array(16);if(window.crypto&&window.crypto.getRandomValues){window.crypto.getRandomValues(b)}else{if(window.msCrypto&&window.msCrypto.getRandomValues){window.msCrypto.getRandomValues(b)}else{var a="Your browser lacks a way to securely generate random values. Please use a different, newer browser.";bootbox.alert(a);assert(false,a)}}return bytesToHex(b)}function doubleHash(a){return bitcore.util.sha256(bitcore.util.sha256(hexToBytes(a))).toString("hex")}(function(){CClass=function(){};CClass.create=function(b){var a=this;c=function(){this._super=a;var e=b.apply(this,arguments),d=this;for(key in e){(function(f,g){d[key]=typeof f!="function"||typeof g!="function"?f:function(){this._super=g;return f.apply(this,arguments)}})(e[key],d[key])}};c.prototype=new this;c.prototype.constructor=c;c.extend=this.extend||this.create;return c}})();