diff --git a/docs/android.json b/docs/android.json index fb904c7..94b3385 100755 --- a/docs/android.json +++ b/docs/android.json @@ -1,8 +1,8 @@ { "zh": { "docs": { - "version": "1.5.0", - "url": "https://sero-1259797294.file.myqcloud.com/popup/wgt/1.5.0/cash.sero.popup.community.wgt", + "version": "1.5.1", + "url": "https://sero-1259797294.file.myqcloud.com/popup/wgt/1.5.1/cash.sero.popup.community.wgt", "show": false, "description": [ ] @@ -13,8 +13,8 @@ "en": { "docs": { - "version": "1.5.0", - "url": "https://sero-popup.s3-ap-southeast-1.amazonaws.com/wgt/1.5.0/cash.sero.popup.community.wgt", + "version": "1.5.1", + "url": "https://sero-popup.s3-ap-southeast-1.amazonaws.com/wgt/1.5.1/cash.sero.popup.community.wgt", "show": false, "description": [ ] diff --git a/docs/asset-manifest.json b/docs/asset-manifest.json index ee5cd45..e4e9fc5 100644 --- a/docs/asset-manifest.json +++ b/docs/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { "main.css": "./static/css/main.8cf1853d.chunk.css", - "main.js": "./static/js/main.1b09b402.chunk.js", + "main.js": "./static/js/main.1e9a7ed3.chunk.js", "runtime~main.js": "./static/js/runtime~main.ca7cb530.js", "static/css/2.d6e5dedb.chunk.css": "./static/css/2.d6e5dedb.chunk.css", "static/js/2.6c1f724b.chunk.js": "./static/js/2.6c1f724b.chunk.js", "index.html": "./index.html", - "precache-manifest.f980284bcd1cee60b29d9c5644afed6f.js": "./precache-manifest.f980284bcd1cee60b29d9c5644afed6f.js", + "precache-manifest.fcd45b43de7ef7932bbcce892696c786.js": "./precache-manifest.fcd45b43de7ef7932bbcce892696c786.js", "service-worker.js": "./service-worker.js", "static/js/0.93946bfa.chunk.worker.js": "./static/js/0.93946bfa.chunk.worker.js", - "static/js/1.2b24d25f.chunk.worker.js": "./static/js/1.2b24d25f.chunk.worker.js", + "static/js/1.0eb902b2.chunk.worker.js": "./static/js/1.0eb902b2.chunk.worker.js", "static/media/EUSDT.png": "./static/media/EUSDT.0a5458ff.png", "static/media/EWBTC.png": "./static/media/EWBTC.9091f9fa.png", "static/media/EWETH.png": "./static/media/EWETH.f4891222.png", diff --git a/docs/index.html b/docs/index.html index b48efed..10b200a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -SERO Popup
\ No newline at end of file +SERO Popup
\ No newline at end of file diff --git a/docs/manifest.json b/docs/manifest.json index 8bd89fb..a9e0730 100755 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -3,9 +3,8 @@ "id" : "cash.sero.popup.community", /*应用的标识*/ "name" : "SERO Popup Community", /*应用名称,程序桌面图标名称*/ "version" : { - "name" : "1.5.0", /*应用版本名称*/ - "code" : 187 - + "name" : "1.5.1", /*应用版本名称*/ + "code" : 188 }, "description" : "", /*应用描述信息*/ "icons" : { @@ -138,7 +137,8 @@ "", "", "" - ] + ], + "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ] }, /*使用Native.js调用原生安卓API需要使用到的系统权限*/ "orientation" : [ "portrait-primary" ], /*应用支持的方向,portrait-primary:竖屏正方向;portrait-secondary:竖屏反方向;landscape-primary:横屏正方向;landscape-secondary:横屏反方向*/ @@ -231,10 +231,12 @@ } }, "plugins" : { - "speech" : {} + "speech" : {}, + "ad" : {} } }, "screenOrientation" : [ "portrait-primary" ] }, - "fullscreen" : false + "fullscreen" : false, + "screenOrientation" : [ "portrait-primary" ] } diff --git a/docs/precache-manifest.f980284bcd1cee60b29d9c5644afed6f.js b/docs/precache-manifest.fcd45b43de7ef7932bbcce892696c786.js similarity index 83% rename from docs/precache-manifest.f980284bcd1cee60b29d9c5644afed6f.js rename to docs/precache-manifest.fcd45b43de7ef7932bbcce892696c786.js index 5f0f3bc..ae50400 100644 --- a/docs/precache-manifest.f980284bcd1cee60b29d9c5644afed6f.js +++ b/docs/precache-manifest.fcd45b43de7ef7932bbcce892696c786.js @@ -1,6 +1,6 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ { - "revision": "c06e5d02e3a51fa8c60a3fb4e6a9d962", + "revision": "38203810f198eaa58542bb56645517d7", "url": "./index.html" }, { @@ -8,7 +8,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "./static/css/2.d6e5dedb.chunk.css" }, { - "revision": "e12ddcbddbeeeaa6b997", + "revision": "0b6aded7e77367dee73d", "url": "./static/css/main.8cf1853d.chunk.css" }, { @@ -16,16 +16,16 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "./static/js/0.93946bfa.chunk.worker.js" }, { - "revision": "b21ec4b5908979b4be371cfeace388a5", - "url": "./static/js/1.2b24d25f.chunk.worker.js" + "revision": "cdbc2b07f3ba011c863fb7f8d1c7a898", + "url": "./static/js/1.0eb902b2.chunk.worker.js" }, { "revision": "2034190b1d0b9d39afd6", "url": "./static/js/2.6c1f724b.chunk.js" }, { - "revision": "e12ddcbddbeeeaa6b997", - "url": "./static/js/main.1b09b402.chunk.js" + "revision": "0b6aded7e77367dee73d", + "url": "./static/js/main.1e9a7ed3.chunk.js" }, { "revision": "f8219e59cd933c2cdcd1", diff --git a/docs/service-worker.js b/docs/service-worker.js index 891a445..48b3ae9 100644 --- a/docs/service-worker.js +++ b/docs/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "./precache-manifest.f980284bcd1cee60b29d9c5644afed6f.js" + "./precache-manifest.fcd45b43de7ef7932bbcce892696c786.js" ); self.addEventListener('message', (event) => { diff --git a/docs/static/js/1.0eb902b2.chunk.worker.js b/docs/static/js/1.0eb902b2.chunk.worker.js new file mode 100644 index 0000000..e73ab70 --- /dev/null +++ b/docs/static/js/1.0eb902b2.chunk.worker.js @@ -0,0 +1 @@ +!function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},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=145)}([function(t,e,r){"use strict";(function(t){var i=r(149),n=r(150),o=r(68);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(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 i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(i)return U(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){var i=!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 C(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return B(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function b(t,e,r,i,n){if(0===t.length)return-1;if("string"===typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"===typeof e&&(e=u.from(e,i)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,i,n);if("number"===typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,i,n){var o,a=1,s=t.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function h(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(n){var f=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var c=!0,l=0;ln&&(i=n):i=n;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var a=0;a>8,n=r%256,o.push(n),o.push(i);return o}(e,t.length-r),t,r,i)}function S(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n239?4:h>223?3:h>191?2:1;if(n+c<=r)switch(c){case 1:h<128&&(f=h);break;case 2:128===(192&(o=t[n+1]))&&(u=(31&h)<<6|63&o)>127&&(f=u);break;case 3:o=t[n+1],a=t[n+2],128===(192&o)&&128===(192&a)&&(u=(15&h)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[n+1],a=t[n+2],s=t[n+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&h)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,c=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|1023&f),i.push(f),n+=c}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var r="",i=0;for(;i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,i,n){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===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),h=this.slice(i,n),f=t.slice(e,r),c=0;cn)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return M(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function x(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;ni)&&(r=i);for(var n="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,r,i,n,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}function O(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(t.length-r,2);n>>8*(i?n:1-n)}function j(t,e,r,i){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(t.length-r,4);n>>8*(i?n:3-n)&255}function D(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,i,o){return o||D(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function z(t,e,r,i,o){return o||D(t,0,r,8),n.write(t,e,r,i,52,8),r+8}u.prototype.slice=function(t,e){var r,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(n*=256);)i+=this[t+--e]*n;return i},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 i=this[t],n=1,o=0;++o=(n*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=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),n.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),n.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),n.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),n.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,i){(t=+t,e|=0,r|=0,i)||R(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+n]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||R(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||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||R(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):j(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||R(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):j(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||R(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||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||R(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):j(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||R(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):j(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--n)t[n+e]=this[n+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(n=0;n>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(o=e;o55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=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 F(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(K,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function L(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}}).call(this,r(10))},function(t,e){"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){var i=r(0),n=i.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(o(i,e),e.Buffer=a),o(n,a),a.from=function(t,e,r){if("number"===typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},a.alloc=function(t,e,r){if("number"!==typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"===typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},a.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return n(t)},a.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(19),n=r(152)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),o=r(69),a=r(154),s=r(155),u=r(157),h=r(158),f=r(164),c=r(4);function l(e){var r;if(e instanceof t)r=e;else if(g(e))r=t.from(o(e),"hex");else{if(!m(e))return e;r=n.decode(e)}return n.encode(r)}function d(t,e,r){return o(t)+new Array(e-o(t).length+1).join(r||"0")}function p(t,e,r){return new Array(e-o(t).length+1).join(r||"0")+o(t)}function m(t){return/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{80,}$/i.test(t)}function g(t){return 0==t.indexOf("0x")&&(t=t.slice(2)),t.length%2==0&&/^(-)?[0-9a-f]*$/i.test(t)}function b(t){var e="";t=(t=(t=(t=(t=a.encode(t)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r>>4).toString(16)),e.push((15&t[r]).toString(16));return"0x"+e.join("")},hexToBytes:function(e){var r=t.from(o(e),"hex");return new Uint8Array(r)},utf8ToHex:b,bs58ToHex:function(t){return"0x"+n.decode(t).toString("hex")},bytesToBase58:function(t){return n.encode(t.buffer)},padLeft:p,padRight:d,bufferToHex:function(t){return"0x"+t.toString("hex")},cyToHex:function(t){return"0x"+p(b(t.toUpperCase()),64,"0")},hexToBN:function(t){return w(o(t))},hexToCy:y,toBN:w,isNotNull:function(t){return!u(t)&&void 0!==t},toBuffer:_,bufferToBN:function(t){return new i(t,"le")},isEmptyBuffer:function(e,r){return void 0===r&&(r=32),0==e.length||0==t.alloc(r).compare(e)},bufferToBs58:function(t){return n.encode(t)},addrToString:l};e.default=M}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){function i(t,e){if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n=0;h--)if(f[h]!==c[h])return!1;for(h=f.length-1;h>=0;h--)if(u=f[h],!v(t[u],e[u],r,i))return!1;return!0}(t,e,r,a))}return r?t===e:t==e}function y(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(r){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _(t,e,r,i){var n;if("function"!==typeof e)throw new TypeError('"block" argument must be a function');"string"===typeof r&&(i=r,r=null),n=function(t){var e;try{t()}catch(r){e=r}return e}(e),i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),t&&!n&&g(n,r,"Missing expected exception"+i);var a="string"===typeof i,s=!t&&n&&!r;if((!t&&o.isError(n)&&a&&w(n,r)||s)&&g(n,r,"Got unwanted exception"+i),t&&n&&r&&!w(n,r)||!t&&n)throw n}c.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return p(m(t.actual),128)+" "+t.operator+" "+p(m(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var i=r.stack,n=d(e),o=i.indexOf("\n"+n);if(o>=0){var a=i.indexOf("\n",o+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(c.AssertionError,Error),c.fail=g,c.ok=b,c.equal=function(t,e,r){t!=e&&g(t,e,r,"==",c.equal)},c.notEqual=function(t,e,r){t==e&&g(t,e,r,"!=",c.notEqual)},c.deepEqual=function(t,e,r){v(t,e,!1)||g(t,e,r,"deepEqual",c.deepEqual)},c.deepStrictEqual=function(t,e,r){v(t,e,!0)||g(t,e,r,"deepStrictEqual",c.deepStrictEqual)},c.notDeepEqual=function(t,e,r){v(t,e,!1)&&g(t,e,r,"notDeepEqual",c.notDeepEqual)},c.notDeepStrictEqual=function t(e,r,i){v(e,r,!0)&&g(e,r,i,"notDeepStrictEqual",t)},c.strictEqual=function(t,e,r){t!==e&&g(t,e,r,"===",c.strictEqual)},c.notStrictEqual=function(t,e,r){t===e&&g(t,e,r,"!==",c.notStrictEqual)},c.throws=function(t,e,r){_(!0,t,e,r)},c.doesNotThrow=function(t,e,r){_(!1,t,e,r)},c.ifError=function(t){if(t)throw t};var M=Object.keys||function(t){var e=[];for(var r in t)a.call(t,r)&&e.push(r);return e}}).call(this,r(10))},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(224).Buffer}catch(I){}function s(t,e,r){for(var i=0,n=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return i}function u(t,e,r,i){for(var n=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)n=s(t,r,r+6),this.words[i]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);r+6!==e&&(n=s(t,e,r+6),this.words[i]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,a=o%i,s=Math.min(o,o-a)+r,h=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var h=1;h>>26,c=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=l;d++){var p=h-d|0;f+=(a=(n=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}r.words[h]=0|c,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:h[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,h=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),h[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,M=0|a[4],A=8191&M,I=M>>>13,S=0|a[5],E=8191&S,k=S>>>13,x=0|a[6],B=8191&x,C=x>>>13,T=0|a[7],P=8191&T,R=T>>>13,O=0|a[8],j=8191&O,D=O>>>13,N=0|a[9],z=8191&N,K=N>>>13,q=0|s[0],U=8191&q,F=q>>>13,L=0|s[1],Q=8191&L,H=L>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],W=8191&Y,J=Y>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,it=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ut=8191&st,ht=st>>>13,ft=0|s[8],ct=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(i=Math.imul(c,U))|0)+((8191&(n=(n=Math.imul(c,F))+Math.imul(l,U)|0))<<13)|0;h=((o=Math.imul(l,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,F))+Math.imul(m,U)|0,o=Math.imul(m,F);var bt=(h+(i=i+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(l,Q)|0))<<13)|0;h=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(b,U),n=(n=Math.imul(b,F))+Math.imul(v,U)|0,o=Math.imul(v,F),i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,H)|0;var vt=(h+(i=i+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,U),n=(n=Math.imul(w,F))+Math.imul(_,U)|0,o=Math.imul(_,F),i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,H)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var yt=(h+(i=i+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,J)|0)+Math.imul(l,W)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(A,U),n=(n=Math.imul(A,F))+Math.imul(I,U)|0,o=Math.imul(I,F),i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,J)|0;var wt=(h+(i=i+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,U),n=(n=Math.imul(E,F))+Math.imul(k,U)|0,o=Math.imul(k,F),i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(b,W)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,J)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(i=i+Math.imul(c,rt)|0)|0)+((8191&(n=(n=n+Math.imul(c,it)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(B,U),n=(n=Math.imul(B,F))+Math.imul(C,U)|0,o=Math.imul(C,F),i=i+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(h+(i=i+Math.imul(c,ot)|0)|0)+((8191&(n=(n=n+Math.imul(c,at)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,at)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,U),n=(n=Math.imul(P,F))+Math.imul(R,U)|0,o=Math.imul(R,F),i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,H)|0,i=i+Math.imul(E,Z)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(b,rt)|0,n=(n=n+Math.imul(b,it)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var At=(h+(i=i+Math.imul(c,ut)|0)|0)+((8191&(n=(n=n+Math.imul(c,ht)|0)+Math.imul(l,ut)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,F))+Math.imul(D,U)|0,o=Math.imul(D,F),i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,H)|0,i=i+Math.imul(B,Z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,G)|0,i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(b,ot)|0,n=(n=n+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var It=(h+(i=i+Math.imul(c,ct)|0)|0)+((8191&(n=(n=n+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(z,U),n=(n=Math.imul(z,F))+Math.imul(K,U)|0,o=Math.imul(K,F),i=i+Math.imul(j,Q)|0,n=(n=n+Math.imul(j,H)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,H)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,i=i+Math.imul(b,ut)|0,n=(n=n+Math.imul(b,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(p,ct)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(h+(i=i+Math.imul(c,pt)|0)|0)+((8191&(n=(n=n+Math.imul(c,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(z,Q),n=(n=Math.imul(z,H))+Math.imul(K,Q)|0,o=Math.imul(K,H),i=i+Math.imul(j,Z)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,J)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,i=i+Math.imul(b,ct)|0,n=(n=n+Math.imul(b,lt)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,lt)|0;var Et=(h+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(z,Z),n=(n=Math.imul(z,G))+Math.imul(K,Z)|0,o=Math.imul(K,G),i=i+Math.imul(j,W)|0,n=(n=n+Math.imul(j,J)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,J)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,it)|0,i=i+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(A,ut)|0,n=(n=n+Math.imul(A,ht)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(w,ct)|0,n=(n=n+Math.imul(w,lt)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,lt)|0;var kt=(h+(i=i+Math.imul(b,pt)|0)|0)+((8191&(n=(n=n+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(z,W),n=(n=Math.imul(z,J))+Math.imul(K,W)|0,o=Math.imul(K,J),i=i+Math.imul(j,$)|0,n=(n=n+Math.imul(j,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,i=i+Math.imul(E,ut)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(A,ct)|0,n=(n=n+Math.imul(A,lt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,lt)|0;var xt=(h+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(z,$),n=(n=Math.imul(z,tt))+Math.imul(K,$)|0,o=Math.imul(K,tt),i=i+Math.imul(j,rt)|0,n=(n=n+Math.imul(j,it)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,i=i+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,i=i+Math.imul(E,ct)|0,n=(n=n+Math.imul(E,lt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,lt)|0;var Bt=(h+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(I,pt)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(z,rt),n=(n=Math.imul(z,it))+Math.imul(K,rt)|0,o=Math.imul(K,it),i=i+Math.imul(j,ot)|0,n=(n=n+Math.imul(j,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,i=i+Math.imul(P,ut)|0,n=(n=n+Math.imul(P,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,i=i+Math.imul(B,ct)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Ct=(h+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(z,ot),n=(n=Math.imul(z,at))+Math.imul(K,ot)|0,o=Math.imul(K,at),i=i+Math.imul(j,ut)|0,n=(n=n+Math.imul(j,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,i=i+Math.imul(P,ct)|0,n=(n=n+Math.imul(P,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Tt=(h+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(z,ut),n=(n=Math.imul(z,ht))+Math.imul(K,ut)|0,o=Math.imul(K,ht),i=i+Math.imul(j,ct)|0,n=(n=n+Math.imul(j,lt)|0)+Math.imul(D,ct)|0,o=o+Math.imul(D,lt)|0;var Pt=(h+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(z,ct),n=(n=Math.imul(z,lt))+Math.imul(K,ct)|0,o=Math.imul(K,lt);var Rt=(h+(i=i+Math.imul(j,pt)|0)|0)+((8191&(n=(n=n+Math.imul(j,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(i=Math.imul(z,pt))|0)+((8191&(n=(n=Math.imul(z,mt))+Math.imul(K,pt)|0))<<13)|0;return h=((o=Math.imul(K,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=bt,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=It,u[9]=St,u[10]=Et,u[11]=kt,u[12]=xt,u[13]=Bt,u[14]=Ct,u[15]=Tt,u[16]=Pt,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var a=0;a>>=1)n++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==f||h>=n);h--){var c=0|this.words[h];this.words[h]=f<<26-o|c>>>o,f=c&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var h=0;h=0;c--){var l=67108864*(0|i.words[n.length+c])+(0|i.words[n.length+c-1]);for(l=Math.min(l/a|0,67108863),i._ishlnsubmul(n,l,c);0!==i.negative;)l--,i.negative=0,i._ishlnsubmul(n,1,c),i.isZero()||(i.negative^=1);s&&(s.words[c]=l)}return s&&s.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var f=r.clone(),c=e.clone();!e.isZero();){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(c)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),a.isub(u)):(r.isub(e),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0===(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,r=(t-e)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):r.strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},n(v,b),v.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,n),l=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var h=e.words[i],f=u-1;f>=0;f--){var c=h>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},n(A,M),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(29)(t))},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(19),n=r(47),o=r(3),a=r(48),s=function(){function e(t){if(t instanceof e)this.n=t.n;else if(t instanceof i){var r=t;r.red?this.n=r:this.n=r.toRed(e.red)}else this.n=new i(t,"le").toRed(e.red)}return e.toFQ=function(t){return t instanceof e?t:new e(t)},e.prototype.add=function(t){return new e(this.n.redAdd(e.toFQ(t).n))},e.prototype.mul=function(t){return new e(this.n.redMul(e.toFQ(t).n))},e.prototype.sub=function(t){return new e(this.n.redSub(e.toFQ(t).n))},e.prototype.div=function(t){return new e(this.n.redMul(e.toFQ(t).n.redInvm()))},e.prototype.squared=function(){return new e(this.n.redSqr())},e.prototype.sqrt=function(){try{var t=this.n.redSqrt();return t?new e(t):void 0}catch(t){return}},e.prototype.pow=function(t){return new e(this.n.redPow(new i(t)))},e.prototype.nega=function(){return new e(this.n.redNeg())},e.prototype.inverse=function(){return new e(this.n.redInvm())},e.prototype.isOdd=function(){return this.n.fromRed().isOdd()},e.prototype.isZero=function(){return this.n.fromRed().isZero()},e.prototype.toBuffer=function(){return this.n.fromRed().toArrayLike(t,"le",32)},e.prototype.toBN=function(){return this.n.fromRed()},e.prototype.equal=function(t){return this.n.eq(t.n)},e.prototype.toString=function(t){return this.n.fromRed().toString(t)},e.red=i.mont(n.default.FQ_MODULUS),e.ONE=new e(1),e.ZERO=new e(0),e}();e.FQ=s;var u=function(){function e(t){if(t instanceof e)this.n=t.n;else if(t instanceof i){var r=t;r.red?this.n=r:this.n=r.toRed(e.red)}else this.n="number"==typeof t?new i(t).toRed(e.red):new i(t,"le").toRed(e.red)}return e.toFR=function(t){return t instanceof e?t:new e(t)},e.prototype.add=function(t){return new e(this.n.redAdd(e.toFR(t).n))},e.prototype.mul=function(t){return new e(this.n.redMul(e.toFR(t).n))},e.prototype.sub=function(t){return new e(this.n.redSub(e.toFR(t).n))},e.prototype.div=function(t){return new e(this.n.redMul(e.toFR(t).n.redInvm()))},e.prototype.squared=function(){return new e(this.n.redSqr())},e.prototype.sqrt=function(){try{var t=this.n.redSqrt();return t?new e(t):void 0}catch(t){return}},e.prototype.pow=function(t){return new e(this.n.redPow(new i(t)))},e.prototype.nega=function(){return new e(this.n.redNeg())},e.prototype.inverse=function(){return new e(this.n.redInvm())},e.prototype.isOdd=function(){return this.n.fromRed().isOdd()},e.prototype.isZero=function(){return this.n.fromRed().isZero()},e.prototype.toBuffer=function(){return this.n.fromRed().toArrayLike(t,"le",32)},e.prototype.toBN=function(){return this.n.fromRed()},e.prototype.equal=function(t){return this.n.eq(t.n)},e.prototype.toString=function(t){return this.n.fromRed().toString(t)},e.red=i.mont(n.default.FR_MODULUS),e.ONE=new e(1),e.ZERO=new e(0),e}();function h(t){if(t instanceof u)return t;var e=o.toBuffer(t);return new u(e)}e.FR=u,e.newFR=h,e.randomFR=function(){return h(a.randomBytes(32))}}).call(this,r(0).Buffer)},function(t,e,r){var i=r(0),n=i.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(o(i,e),e.Buffer=a),a.prototype=Object.create(n.prototype),o(n,a),a.from=function(t,e,r){if("number"===typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},a.alloc=function(t,e,r){if("number"!==typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"===typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},a.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return n(t)},a.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},function(t,e){var r,i,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"===typeof setTimeout?setTimeout:o}catch(t){r=o}try{i="function"===typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var u,h=[],f=!1,c=-1;function l(){f&&u&&(f=!1,u.length?h=u.concat(h):c=-1,h.length&&d())}function d(){if(!f){var t=s(l);f=!0;for(var e=h.length;e;){for(u=h,h=[];++c1)for(var r=1;r>7&1,u=t.from(n);u[31]&=-129;var h=new i.FQ(u),f=h.mul(h),c=e.ECC_D.mul(f),l=f.sub(i.FQ.ONE).mul(c.sub(e.ECC_A).inverse()).sqrt();if(l){var d=l;return l.isOdd()!==(0!=s)&&(d=i.FQ.ZERO.sub(l)),new e(d,h)}},e.ECC_A=new i.FQ(n.default.ECC_A),e.ECC_D=new i.FQ(n.default.ECC_D),e.ZERO=new e(i.FQ.ZERO,i.FQ.ONE),e}(),u=function(){function t(t,e,r){this.x=new i.FQ(t),this.y=new i.FQ(e),this.z=new i.FQ(r)}return t.prototype.toOriPoint=function(){var t=this.z.inverse();return new s(this.x.mul(t),this.y.mul(t))},t.prototype.add=function(e){var r=this.x,n=this.y,o=this.z,a=e.x,u=e.y,h=e.z,f=r.mul(a),c=n.mul(u),l=s.ECC_D.mul(f).mul(c);if(o.equal(i.FQ.ONE)&&h.equal(i.FQ.ONE))return new t(i.FQ.ONE.sub(l).mul(r.add(n).mul(a.add(u)).sub(f).sub(c)),i.FQ.ONE.add(l).mul(c.sub(s.ECC_A.mul(f))),i.FQ.ONE.sub(l.squared()));if(h.equal(i.FQ.ONE)){var d=(m=o.squared()).sub(l),p=m.add(l);return new t(o.mul(d).mul(r.add(n).mul(a.add(u)).sub(f).sub(c)),o.mul(p).mul(c.sub(s.ECC_A.mul(f))),d.mul(p))}var m,g=o.mul(h);return d=(m=g.squared()).sub(l),p=m.add(l),new t(g.mul(d).mul(r.add(n).mul(a.add(u)).sub(f).sub(c)),g.mul(p).mul(c.sub(s.ECC_A.mul(f))),d.mul(p))},t.prototype.double=function(){var e=this.x.add(this.y).squared(),r=this.x.squared(),n=this.y.squared(),o=s.ECC_A.mul(r),a=o.add(n);if(this.z.equal(i.FQ.ONE))return new t(e.sub(r).sub(n).mul(a.sub(2)),a.mul(o.sub(n)),a.squared().sub(a.mul(2)));var u=this.z.squared(),h=a.sub(u.mul(2));return new t(e.sub(r).sub(n).mul(h),a.mul(o.sub(n)),a.mul(h))},t.prototype.mult=function(e){for(var r=e.toBN(),i=this,n=t.ZERO;!r.isZero()&&(r.testn(0)&&(n=n.add(i)),!(r=r.shrn(1)).isZero());)i=i.double();return n},t.prototype.isValid=function(){var t=this.x.mul(this.x),e=this.y.mul(this.y),r=this.z.mul(this.z),i=s.ECC_A.mul(t),n=r.mul(r),o=s.ECC_D.mul(t).mul(e),a=r.mul(i.add(e)),u=n.add(o);return!!a.equal(u)},t.prototype.isEqualTo=function(t){return!(!this.x.mul(t.z).equal(this.z.mul(t.x))||!this.y.mul(t.z).equal(this.z.mul(t.y)))},t.prototype.isZero=function(){return this.isEqualTo(s.ZERO.toPoint())},t.prototype.toBuffer=function(){return this.toOriPoint().toBuffer()},t.prototype.toHex=function(){return this.toBuffer().reverse().toString("hex")},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t.bufferTo=function(t){var e=s.bufferTo(t);return e?e.toPoint():void 0},t.ZERO=new t(new i.FQ(0),new i.FQ(1),new i.FQ(1)),t}();e.Point=u,e.newPoint=function(t){return t instanceof u?t:u.bufferTo(t)}}).call(this,r(0).Buffer)},function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},function(t,e,r){"use strict";var i=e,n=r(5),o=r(13),a=r(103);i.assert=o,i.toArray=a.toArray,i.zero2=a.zero2,i.toHex=a.toHex,i.encode=a.encode,i.getNAF=function(t,e){for(var r=[],i=1<=0;){var o;if(n.isOdd()){var a=n.andln(i-1);o=a>(i>>1)-1?(i>>1)-a:a,n.isubn(o)}else o=0;r.push(o);for(var s=0!==n.cmpn(0)&&0===n.andln(i-1)?e+1:1,u=1;u0||e.cmpn(-n)>0;){var o,a,s,u=t.andln(3)+i&3,h=e.andln(3)+n&3;if(3===u&&(u=-1),3===h&&(h=-1),0===(1&u))o=0;else o=3!==(s=t.andln(7)+i&7)&&5!==s||2!==h?u:-u;if(r[0].push(o),0===(1&h))a=0;else a=3!==(s=e.andln(7)+n&7)&&5!==s||2!==u?h:-h;r[1].push(a),2*i===o+1&&(i=1-i),2*n===a+1&&(n=1-n),t.iushrn(1),e.iushrn(1)}return r},i.cachedProperty=function(t,e,r){var i="_"+e;t.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},i.parseBytes=function(t){return"string"===typeof t?i.toArray(t,"hex"):t},i.intFromLE=function(t){return new n(t,"hex","le")}},function(t,e,r){"use strict";var i=r(13),n=r(1);function o(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=n,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),n=0;n>6|192,r[i++]=63&a|128):o(t,n)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++n)),r[i++]=a>>18|240,r[i++]=a>>12&63|128,r[i++]=a>>6&63|128,r[i++]=63&a|128):(r[i++]=a>>12|224,r[i++]=a>>6&63|128,r[i++]=63&a|128)}else for(n=0;n>>0}return a},e.split32=function(t,e){for(var r=new Array(4*t.length),i=0,n=0;i>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,i){return t+e+r+i>>>0},e.sum32_5=function(t,e,r,i,n){return t+e+r+i+n>>>0},e.sum64=function(t,e,r,i){var n=t[e],o=i+t[e+1]>>>0,a=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,i){return(e+i>>>0>>0},e.sum64_lo=function(t,e,r,i){return e+i>>>0},e.sum64_4_hi=function(t,e,r,i,n,o,a,s){var u=0,h=e;return u+=(h=h+i>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,r,i,n,o,a,s){return e+i+o+s>>>0},e.sum64_5_hi=function(t,e,r,i,n,o,a,s,u,h){var f=0,c=e;return f+=(c=c+i>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,r,i,n,o,a,s,u,h){return e+i+o+s+h>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e,r){var i=r(2).Buffer,n=r(22).Transform,o=r(23).StringDecoder;function a(t){n.call(this),this.hashMode="string"===typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(1)(a,n),a.prototype.update=function(t,e,r){"string"===typeof t&&(t=i.from(t,e));var n=this._update(t);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(n){i=n}finally{r(i)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||i.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i},t.exports=a},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(267);e.blake2b=function(e,r){var n=t.alloc(16,0);n.fill(e,0,e.length);var o=i(32,null,null,n).update(r).digest("binary");return t.from(o)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(117),n=r(270),o=r(3),a=r(4);e.accountBase=new i.Group("$SROKEYSGEN",1,256,4),e.crBase=new i.Group("SZK$ASSET$CR",1,256,4),e.rootBase=new i.Group("SZK$ROOTCM",10,128,4),e.genTknBase=function(e){e=o.toBuffer(e),a(32==e.length);var r=t.alloc(64,0);r.set(e,0);var i=n.findPoint("SZK$TKN",r);if(!i)throw new Error("find point error");return i},e.genTktBase=function(e,r){e=o.toBuffer(e),r=o.toBuffer(r),a(32==e.length),a(32==r.length);var i=t.concat([e,r]),s=n.findPoint("SZK$TKT",i);if(!s)throw new Error("find point error");return s}}).call(this,r(0).Buffer)},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(151).Buffer}catch(k){}function s(t,e,r){for(var n=0,o=Math.min(t.length,r),a=0,s=e;s=49&&h<=54?h-49+10:h>=17&&h<=22?h-17+10:h,a|=u}return i(!(240&a),"Invalid character in "+t),n}function u(t,e,r,n){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?h-49+10:h>=17?h-17+10:h,i(h>=0&&a"}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)n=s(t,r,r+6),this.words[i]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);r+6!==e&&(n=s(t,e,r+6),this.words[i]|=n<>>26-o&4194303),this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,a=o%i,s=Math.min(o,o-a)+r,h=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for?o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f:o.prototype.inspect=f;var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],f=d[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(f).toString(t);r=(p=p.idivn(f)).isZero()?m+r:c[h-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function p(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var h=1;h>>26,c=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=l;d++){var p=h-d|0;f+=(a=(n=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}r.words[h]=0|c,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,n),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,i=0,n=0,o=0;n>8&255),r>16&255),6===o?(r>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(r>=0)for(t[r--]=i;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,M=0|a[4],A=8191&M,I=M>>>13,S=0|a[5],E=8191&S,k=S>>>13,x=0|a[6],B=8191&x,C=x>>>13,T=0|a[7],P=8191&T,R=T>>>13,O=0|a[8],j=8191&O,D=O>>>13,N=0|a[9],z=8191&N,K=N>>>13,q=0|s[0],U=8191&q,F=q>>>13,L=0|s[1],Q=8191&L,H=L>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],W=8191&Y,J=Y>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,it=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ut=8191&st,ht=st>>>13,ft=0|s[8],ct=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(i=Math.imul(c,U))|0)+((8191&(n=(n=Math.imul(c,F))+Math.imul(l,U)|0))<<13)|0;h=((o=Math.imul(l,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,F))+Math.imul(m,U)|0,o=Math.imul(m,F);var bt=(h+(i=i+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(l,Q)|0))<<13)|0;h=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(b,U),n=(n=Math.imul(b,F))+Math.imul(v,U)|0,o=Math.imul(v,F),i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,H)|0;var vt=(h+(i=i+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,U),n=(n=Math.imul(w,F))+Math.imul(_,U)|0,o=Math.imul(_,F),i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,H)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var yt=(h+(i=i+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,J)|0)+Math.imul(l,W)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(A,U),n=(n=Math.imul(A,F))+Math.imul(I,U)|0,o=Math.imul(I,F),i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,J)|0;var wt=(h+(i=i+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,U),n=(n=Math.imul(E,F))+Math.imul(k,U)|0,o=Math.imul(k,F),i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(b,W)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,J)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(i=i+Math.imul(c,rt)|0)|0)+((8191&(n=(n=n+Math.imul(c,it)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(B,U),n=(n=Math.imul(B,F))+Math.imul(C,U)|0,o=Math.imul(C,F),i=i+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(h+(i=i+Math.imul(c,ot)|0)|0)+((8191&(n=(n=n+Math.imul(c,at)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,at)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,U),n=(n=Math.imul(P,F))+Math.imul(R,U)|0,o=Math.imul(R,F),i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,H)|0,i=i+Math.imul(E,Z)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(b,rt)|0,n=(n=n+Math.imul(b,it)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var At=(h+(i=i+Math.imul(c,ut)|0)|0)+((8191&(n=(n=n+Math.imul(c,ht)|0)+Math.imul(l,ut)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,F))+Math.imul(D,U)|0,o=Math.imul(D,F),i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,H)|0,i=i+Math.imul(B,Z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,G)|0,i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(b,ot)|0,n=(n=n+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var It=(h+(i=i+Math.imul(c,ct)|0)|0)+((8191&(n=(n=n+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(z,U),n=(n=Math.imul(z,F))+Math.imul(K,U)|0,o=Math.imul(K,F),i=i+Math.imul(j,Q)|0,n=(n=n+Math.imul(j,H)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,H)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,i=i+Math.imul(b,ut)|0,n=(n=n+Math.imul(b,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(p,ct)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(h+(i=i+Math.imul(c,pt)|0)|0)+((8191&(n=(n=n+Math.imul(c,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(z,Q),n=(n=Math.imul(z,H))+Math.imul(K,Q)|0,o=Math.imul(K,H),i=i+Math.imul(j,Z)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,J)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,i=i+Math.imul(b,ct)|0,n=(n=n+Math.imul(b,lt)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,lt)|0;var Et=(h+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(z,Z),n=(n=Math.imul(z,G))+Math.imul(K,Z)|0,o=Math.imul(K,G),i=i+Math.imul(j,W)|0,n=(n=n+Math.imul(j,J)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,J)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,it)|0,i=i+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(A,ut)|0,n=(n=n+Math.imul(A,ht)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(w,ct)|0,n=(n=n+Math.imul(w,lt)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,lt)|0;var kt=(h+(i=i+Math.imul(b,pt)|0)|0)+((8191&(n=(n=n+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(z,W),n=(n=Math.imul(z,J))+Math.imul(K,W)|0,o=Math.imul(K,J),i=i+Math.imul(j,$)|0,n=(n=n+Math.imul(j,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,i=i+Math.imul(E,ut)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(A,ct)|0,n=(n=n+Math.imul(A,lt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,lt)|0;var xt=(h+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(z,$),n=(n=Math.imul(z,tt))+Math.imul(K,$)|0,o=Math.imul(K,tt),i=i+Math.imul(j,rt)|0,n=(n=n+Math.imul(j,it)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,i=i+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,i=i+Math.imul(E,ct)|0,n=(n=n+Math.imul(E,lt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,lt)|0;var Bt=(h+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(I,pt)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(z,rt),n=(n=Math.imul(z,it))+Math.imul(K,rt)|0,o=Math.imul(K,it),i=i+Math.imul(j,ot)|0,n=(n=n+Math.imul(j,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,i=i+Math.imul(P,ut)|0,n=(n=n+Math.imul(P,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,i=i+Math.imul(B,ct)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Ct=(h+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(z,ot),n=(n=Math.imul(z,at))+Math.imul(K,ot)|0,o=Math.imul(K,at),i=i+Math.imul(j,ut)|0,n=(n=n+Math.imul(j,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,i=i+Math.imul(P,ct)|0,n=(n=n+Math.imul(P,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Tt=(h+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(z,ut),n=(n=Math.imul(z,ht))+Math.imul(K,ut)|0,o=Math.imul(K,ht),i=i+Math.imul(j,ct)|0,n=(n=n+Math.imul(j,lt)|0)+Math.imul(D,ct)|0,o=o+Math.imul(D,lt)|0;var Pt=(h+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(z,ct),n=(n=Math.imul(z,lt))+Math.imul(K,ct)|0,o=Math.imul(K,lt);var Rt=(h+(i=i+Math.imul(j,pt)|0)|0)+((8191&(n=(n=n+Math.imul(j,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(i=Math.imul(z,pt))|0)+((8191&(n=(n=Math.imul(z,mt))+Math.imul(K,pt)|0))<<13)|0;return h=((o=Math.imul(K,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=bt,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=It,u[9]=St,u[10]=Et,u[11]=kt,u[12]=xt,u[13]=Bt,u[14]=Ct,u[15]=Tt,u[16]=Pt,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function b(t,e,r){return g(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=p),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?p(this,t,e):r<1024?g(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i>=1;return i},v.prototype.permute=function(t,e,r,i,n,o){for(var a=0;a>>=1)n++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==f||h>=n);h--){var c=0|this.words[h];this.words[h]=f<<26-o|c>>>o,f=c&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this._strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var h=0;h=0;c--){var l=67108864*(0|i.words[n.length+c])+(0|i.words[n.length+c-1]);for(l=Math.min(l/a|0,67108863),i._ishlnsubmul(n,l,c);0!==i.negative;)l--,i.negative=0,i._ishlnsubmul(n,1,c),i.isZero()||(i.negative^=1);s&&(s.words[c]=l)}return s&&s._strip(),i._strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%t;return e?-n:n},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var f=r.clone(),c=e.clone();!e.isZero();){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(c)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),a.isub(u)):(r.isub(e),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0===(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,r=(t-e)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},n(_,w),_.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new M;else if("p192"===t)e=new A;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new I}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(h(t,t.umod(this.m)._forceRed(this)),t)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,n),l=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var h=e.words[i],f=u-1;f>=0;f--){var c=h>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(29)(t))},function(t,e,r){"use strict";var i=r(38),n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var o=r(32);o.inherits=r(1);var a=r(83),s=r(51);o.inherits(c,a);for(var u=n(s.prototype),h=0;ho)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(t);if(t>0)if(t>n)for(var u=0;u>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function h(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return n>0&&(t.lastNeed=n-1),n;if(--i=0)return n>0&&(t.lastNeed=n-2),n;if(--i=0)return n>0&&(2===n?n=0:t.lastNeed=n-3),n;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){var i=r(2).Buffer;function n(t,e){this._block=i.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}n.prototype.update=function(t,e){"string"===typeof t&&(e=e||"utf8",t=i.from(t,e));for(var r=this._block,n=this._blockSize,o=t.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(12),n=r(62),o=r(18),a=r(4),s=r(3),u=r(3);function h(t){t[t.length-1]|=64}function f(e){var r=t.from(e);return r[e.length-1]&=-65,r}function c(t){return 0!=(64&t[t.length-1])}e.SetFlag=h,e.ClearFlag=f,e.IsFlagSet=c;var l=function(){function e(t,e){this.ZPK=i.newPoint(t),this.VPK=i.newPoint(e)}return e.prototype.toBuffer=function(){var e=t.alloc(64);return e.fill(this.ZPK.toBuffer(),0),e.fill(this.VPK.toBuffer(),32),h(e),e},e.prototype.toHex=function(){return"0x"+this.toBuffer().toString("hex")},e.prototype.toString=function(){return u.default.bufferToBs58(this.toBuffer())},e}();function d(t){if(t instanceof l)return t;var e=f(s.toBuffer(t));a(64==e.length);var r=i.Point.bufferTo(e.slice(0,32));if(r){var n=i.Point.bufferTo(e.slice(32));if(n)return new l(r,n)}}e.PK=l,e.newPK=d,e.tk2PK=function(t){t=n.newTK(t);var e=o.accountBase.mult(t.vsk);return new l(t.ZPK,e)},e.isPKValid=function(t){var e=s.toBuffer(t);return!!c(e)&&!!d(e)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var i={};function n(t,e,r){r||(r=Error);var n=function(t){var r,i;function n(r,i,n){return t.call(this,function(t,r,i){return"string"===typeof e?e:e(t,r,i)}(r,i,n))||this}return i=t,(r=n).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,n}(r);n.prototype.name=r.name,n.prototype.code=t,i[t]=n}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,n,a,s;if("string"===typeof e&&(n="not ",e.substr(!a||a<0?0:+a,n.length)===n)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!==typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(u," ").concat(i," ").concat(o(e,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},function(t,e,r){"use strict";(function(e){var i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var n=r(130),o=r(134);r(9)(h,n);for(var a=i(o.prototype),s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";var i=r(1),n=r(49),o=r(52),a=r(53),s=r(16);function u(t){s.call(this,"digest"),this._hash=t}i(u,s),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new n:"rmd160"===t||"ripemd160"===t?new o:new u(a(t))}},function(t,e,r){"use strict";var i,n="object"===typeof Reflect?Reflect:null,o=n&&"function"===typeof n.apply?n.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};i=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!==t};function s(){s.init.call(this)}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function h(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function f(t,e,r,i){var n,o,a,s;if("function"!==typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"===typeof a?a=o[e]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),(n=h(t))>0&&a.length>n&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function c(){for(var t=[],e=0;e0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=n[t];if(void 0===u)return!1;if("function"===typeof u)o(u,this,e);else{var h=u.length,f=m(u,h);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,n=o;break}if(n<0)return this;0===n?r.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},s.prototype.listeners=function(t){return d(this,t,!0)},s.prototype.rawListeners=function(t){return d(this,t,!1)},s.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,r){(function(t){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"===typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"===typeof t},e.isString=function(t){return"string"===typeof t},e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"===typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"===typeof t},e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=t.isBuffer}).call(this,r(0).Buffer)},function(t,e,r){(function(e){t.exports=function(t,r){for(var i=Math.min(t.length,r.length),n=new e(i),o=0;o=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=i.join32(t,0,t.length-r,this.endian);for(var n=0;n>>24&255,i[n++]=t>>>16&255,i[n++]=t>>>8&255,i[n++]=255&t}else for(i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n++]=t>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,o=8;o>>24]^f[p>>>16&255]^c[m>>>8&255]^l[255&g]^e[b++],a=h[p>>>24]^f[m>>>16&255]^c[g>>>8&255]^l[255&d]^e[b++],s=h[m>>>24]^f[g>>>16&255]^c[d>>>8&255]^l[255&p]^e[b++],u=h[g>>>24]^f[d>>>16&255]^c[p>>>8&255]^l[255&m]^e[b++],d=o,p=a,m=s,g=u;return o=(i[d>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&g])^e[b++],a=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[g>>>8&255]<<8|i[255&d])^e[b++],s=(i[m>>>24]<<24|i[g>>>16&255]<<16|i[d>>>8&255]<<8|i[255&p])^e[b++],u=(i[g>>>24]<<24|i[d>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^e[b++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var h=s^s<<1^s<<2^s<<3^s<<4;h=h>>>8^255&h^99,r[a]=h,i[h]=a;var f=t[a],c=t[f],l=t[c],d=257*t[h]^16843008*h;n[0][a]=d<<24|d>>>8,n[1][a]=d<<16|d>>>16,n[2][a]=d<<8|d>>>24,n[3][a]=d,d=16843009*l^65537*c^257*f^16843008*a,o[0][h]=d<<24|d>>>8,o[1][h]=d<<16|d>>>16,o[2][h]=d<<8|d>>>24,o[3][h]=d,0===a?a=s=1:(a=f^t[t[t[l^f]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}}();function h(t){this._key=n(t),this._reset()}h.blockSize=16,h.keySize=32,h.prototype.blockSize=h.blockSize,h.prototype.keySize=h.keySize,h.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=4*(r+1),n=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e===4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),n[o]=n[o-e]^a}for(var h=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=h},h.prototype.encryptBlockRaw=function(t){return a(t=n(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},h.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=i.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},h.prototype.decryptBlock=function(t){var e=(t=n(t))[1];t[1]=t[3],t[3]=e;var r=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=i.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},h.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=h},function(t,e,r){var i=r(2).Buffer,n=r(49);t.exports=function(t,e,r,o){if(i.isBuffer(t)||(t=i.from(t,"binary")),e&&(i.isBuffer(e)||(e=i.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=i.alloc(a),u=i.alloc(o||0),h=i.alloc(0);a>0||o>0;){var f=new n;f.update(h),f.update(t),e&&f.update(e),h=f.digest();var c=0;if(a>0){var l=s.length-a;c=Math.min(a,h.length),h.copy(s,l,0,c),a-=c}if(c0){var d=u.length-o,p=Math.min(o,h.length-c);h.copy(u,d,c,c+p),o-=p}}return h.fill(0),{key:s,iv:u}}},function(t,e,r){"use strict";var i=r(5),n=r(14),o=n.getNAF,a=n.getJSF,s=n.assert;function u(t,e){this.type=t,this.p=new i(e.p,16),this.red=e.prime?i.red(e.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=e.n&&new i(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function h(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var r=t._getDoubles(),i=o(e,1),n=(1<=u;e--)h=(h<<1)+i[e];a.push(h)}for(var f=this.jpoint(null,null,null),c=this.jpoint(null,null,null),l=n;l>0;l--){for(u=0;u=0;h--){for(e=0;h>=0&&0===a[h];h--)e++;if(h>=0&&e++,u=u.dblp(e),h<0)break;var f=a[h];s(0!==f),u="affine"===t.type?f>0?u.mixedAdd(n[f-1>>1]):u.mixedAdd(n[-f-1>>1].neg()):f>0?u.add(n[f-1>>1]):u.add(n[-f-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,i,n){for(var s=this._wnafT1,u=this._wnafT2,h=this._wnafT3,f=0,c=0;c=1;c-=2){var d=c-1,p=c;if(1===s[d]&&1===s[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],b=a(r[d],r[p]);f=Math.max(b[0].length,f),h[d]=new Array(f),h[p]=new Array(f);for(var v=0;v=0;c--){for(var A=0;c>=0;){var I=!0;for(v=0;v=0&&A++,_=_.dblp(A),c<0)break;for(v=0;v0?S=u[v][E-1>>1]:E<0&&(S=u[v][-E-1>>1].neg()),_="affine"===S.type?_.mixedAdd(S):_.add(S))}}for(c=0;c=Math.ceil((t.bitLength()+1)/e.step)},h.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;no)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(t);if(t>0)if(t>n)for(var u=0;u>>32-e}function h(t,e,r,i,n,o,a){return u(t+(e&r|~e&i)+n+o|0,a)+e|0}function f(t,e,r,i,n,o,a){return u(t+(e&i|r&~i)+n+o|0,a)+e|0}function c(t,e,r,i,n,o,a){return u(t+(e^r^i)+n+o|0,a)+e|0}function l(t,e,r,i,n,o,a){return u(t+(r^(e|~i))+n+o|0,a)+e|0}i(s,n),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,i=this._b,n=this._c,o=this._d;r=h(r,i,n,o,t[0],3614090360,7),o=h(o,r,i,n,t[1],3905402710,12),n=h(n,o,r,i,t[2],606105819,17),i=h(i,n,o,r,t[3],3250441966,22),r=h(r,i,n,o,t[4],4118548399,7),o=h(o,r,i,n,t[5],1200080426,12),n=h(n,o,r,i,t[6],2821735955,17),i=h(i,n,o,r,t[7],4249261313,22),r=h(r,i,n,o,t[8],1770035416,7),o=h(o,r,i,n,t[9],2336552879,12),n=h(n,o,r,i,t[10],4294925233,17),i=h(i,n,o,r,t[11],2304563134,22),r=h(r,i,n,o,t[12],1804603682,7),o=h(o,r,i,n,t[13],4254626195,12),n=h(n,o,r,i,t[14],2792965006,17),r=f(r,i=h(i,n,o,r,t[15],1236535329,22),n,o,t[1],4129170786,5),o=f(o,r,i,n,t[6],3225465664,9),n=f(n,o,r,i,t[11],643717713,14),i=f(i,n,o,r,t[0],3921069994,20),r=f(r,i,n,o,t[5],3593408605,5),o=f(o,r,i,n,t[10],38016083,9),n=f(n,o,r,i,t[15],3634488961,14),i=f(i,n,o,r,t[4],3889429448,20),r=f(r,i,n,o,t[9],568446438,5),o=f(o,r,i,n,t[14],3275163606,9),n=f(n,o,r,i,t[3],4107603335,14),i=f(i,n,o,r,t[8],1163531501,20),r=f(r,i,n,o,t[13],2850285829,5),o=f(o,r,i,n,t[2],4243563512,9),n=f(n,o,r,i,t[7],1735328473,14),r=c(r,i=f(i,n,o,r,t[12],2368359562,20),n,o,t[5],4294588738,4),o=c(o,r,i,n,t[8],2272392833,11),n=c(n,o,r,i,t[11],1839030562,16),i=c(i,n,o,r,t[14],4259657740,23),r=c(r,i,n,o,t[1],2763975236,4),o=c(o,r,i,n,t[4],1272893353,11),n=c(n,o,r,i,t[7],4139469664,16),i=c(i,n,o,r,t[10],3200236656,23),r=c(r,i,n,o,t[13],681279174,4),o=c(o,r,i,n,t[0],3936430074,11),n=c(n,o,r,i,t[3],3572445317,16),i=c(i,n,o,r,t[6],76029189,23),r=c(r,i,n,o,t[9],3654602809,4),o=c(o,r,i,n,t[12],3873151461,11),n=c(n,o,r,i,t[15],530742520,16),r=l(r,i=c(i,n,o,r,t[2],3299628645,23),n,o,t[0],4096336452,6),o=l(o,r,i,n,t[7],1126891415,10),n=l(n,o,r,i,t[14],2878612391,15),i=l(i,n,o,r,t[5],4237533241,21),r=l(r,i,n,o,t[12],1700485571,6),o=l(o,r,i,n,t[3],2399980690,10),n=l(n,o,r,i,t[10],4293915773,15),i=l(i,n,o,r,t[1],2240044497,21),r=l(r,i,n,o,t[8],1873313359,6),o=l(o,r,i,n,t[15],4264355552,10),n=l(n,o,r,i,t[6],2734768916,15),i=l(i,n,o,r,t[13],1309151649,21),r=l(r,i,n,o,t[4],4149444226,6),o=l(o,r,i,n,t[11],3174756917,10),n=l(n,o,r,i,t[2],718787259,15),i=l(i,n,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},function(t,e,r){(e=t.exports=r(83)).Stream=e,e.Readable=e,e.Writable=r(51),e.Duplex=r(20),e.Transform=r(86),e.PassThrough=r(194)},function(t,e,r){"use strict";(function(e,i,n){var o=r(38);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var s,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?i:o.nextTick;v.WritableState=b;var h=r(32);h.inherits=r(1);var f={deprecate:r(192)},c=r(84),l=r(2).Buffer,d=n.Uint8Array||function(){};var p,m=r(85);function g(){}function b(t,e){s=s||r(20),t=t||{};var i=e instanceof s;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,h=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(h||0===h)?h:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,n){--e.pendingcb,r?(o.nextTick(n,i),o.nextTick(I,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),I(t,e))}(t,r,i,e,n);else{var a=M(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(t,r),i?u(w,t,r,a,n):w(t,r,a,n)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function v(t){if(s=s||r(20),!p.call(v,this)&&!(this instanceof s))return new v(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),c.call(this)}function y(t,e,r,i,n,o,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function w(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),I(t,e)}function _(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),o=e.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)n[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;n.allBuffers=u,y(t,e,!0,e.length,n,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,f=r.encoding,c=r.callback;if(y(t,e,!1,e.objectMode?1:h.length,h,f,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function M(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),I(t,e)}))}function I(t,e){var r=M(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(A,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}h.inherits(v,c),b.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(b.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===v&&(t&&t._writableState instanceof b)}})):p=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,r){var i,n=this._writableState,a=!1,s=!n.objectMode&&(i=t,l.isBuffer(i)||i instanceof d);return s&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),"function"===typeof e&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),"function"!==typeof r&&(r=g),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(s||function(t,e,r,i){var n=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"===typeof r||void 0===r||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(i,a),n=!1),n}(this,n,t,r))&&(n.pendingcb++,a=function(t,e,r,i,n,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=l.from(e,r));return e}(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=e.objectMode?1:i.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,r){var i=this._writableState;"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,e,r){e.ending=!0,I(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=m.destroy,v.prototype._undestroy=m.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(8),r(190).setImmediate,r(10))},function(t,e,r){"use strict";var i=r(0).Buffer,n=r(1),o=r(82),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],h=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],c=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<>>32-e}function m(t,e,r,i,n,o,a,s){return p(t+(e^r^i)+o+a|0,s)+n|0}function g(t,e,r,i,n,o,a,s){return p(t+(e&r|~e&i)+o+a|0,s)+n|0}function b(t,e,r,i,n,o,a,s){return p(t+((e|~r)^i)+o+a|0,s)+n|0}function v(t,e,r,i,n,o,a,s){return p(t+(e&i|r&~i)+o+a|0,s)+n|0}function y(t,e,r,i,n,o,a,s){return p(t+(e^(r|~i))+o+a|0,s)+n|0}n(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,A=0|this._d,I=0|this._e,S=0;S<80;S+=1){var E,k;S<16?(E=m(r,i,n,o,d,t[s[S]],c[0],h[S]),k=y(w,_,M,A,I,t[u[S]],l[0],f[S])):S<32?(E=g(r,i,n,o,d,t[s[S]],c[1],h[S]),k=v(w,_,M,A,I,t[u[S]],l[1],f[S])):S<48?(E=b(r,i,n,o,d,t[s[S]],c[2],h[S]),k=b(w,_,M,A,I,t[u[S]],l[2],f[S])):S<64?(E=v(r,i,n,o,d,t[s[S]],c[3],h[S]),k=g(w,_,M,A,I,t[u[S]],l[3],f[S])):(E=y(r,i,n,o,d,t[s[S]],c[4],h[S]),k=m(w,_,M,A,I,t[u[S]],l[4],f[S])),r=d,d=o,o=p(n,10),n=i,i=E,w=I,I=A,A=p(M,10),M=_,_=k}var x=this._b+n+A|0;this._b=this._c+o+I|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+i+M|0,this._a=x},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=i.alloc?i.alloc(20):new i(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(199),e.sha1=r(200),e.sha224=r(201),e.sha256=r(87),e.sha384=r(202),e.sha512=r(88)},function(t,e,r){"use strict";e.utils=r(208),e.Cipher=r(209),e.DES=r(210),e.CBC=r(211),e.EDE=r(212)},function(t,e,r){var i=r(213),n=r(221),o=r(98);e.createCipher=e.Cipher=i.createCipher,e.createCipheriv=e.Cipheriv=i.createCipheriv,e.createDecipher=e.Decipher=n.createDecipher,e.createDecipheriv=e.Decipheriv=n.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,r){var i={ECB:r(214),CBC:r(215),CFB:r(216),CFB8:r(217),CFB1:r(218),OFB:r(219),CTR:r(96),GCM:r(96)},n=r(98);for(var o in n)n[o].module=i[n[o].mode];t.exports=n},function(t,e,r){var i;function n(t){this.rand=t}if(t.exports=function(t){return i||(i=new n(null)),i.generate(t)},t.exports.Rand=n,n.prototype.generate=function(t){return this._rand(t)},n.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new i(n(e));return r}t.exports=o,o.getr=a}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var i=e;i.version=r(230).version,i.utils=r(14),i.rand=r(57),i.curve=r(104),i.curves=r(60),i.ec=r(241),i.eddsa=r(245)},function(t,e,r){"use strict";var i,n=e,o=r(61),a=r(104),s=r(14).assert;function u(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function h(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=u,h("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),h("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),h("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=r(240)}catch(f){i=void 0}h("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},function(t,e,r){var i=e;i.utils=r(15),i.common=r(34),i.sha=r(234),i.ripemd=r(238),i.hmac=r(239),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(17),n=r(6),o=r(12),a=r(18),s=r(3),u=r(4),h=r(25),f=function(){function e(t,e){this.zsk=n.newFR(t),this.vsk=n.newFR(e)}return e.prototype.isValid=function(){return!this.zsk.isZero()&&!this.vsk.isZero()},e.prototype.toBuffer=function(){var e=t.alloc(64);return e.fill(this.zsk.toBuffer(),0),e.fill(this.vsk.toBuffer(),32),h.SetFlag(e),e},e.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},e}();function c(t){if(t instanceof f)return t;var e=s.toBuffer(t);return 64>>=8,t[e+1]=r,r>>>=8,t[e+2]=r,r>>>=8,t[e+3]=r},t.ROTATE=function(t,e){return t<>>32-e},t}(),i=t.alloc(16,0);i.fill(0),e.default=function(e,n){var o=new r(n,i,0),a=t.alloc(e.length);return o.encrypt(a,e),a}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(12),n=r(6),o=r(18),a=r(17),s=r(120),u=r(63),h=r(44),f=r(3),c=r(4),l=r(66);e.fetchKey=function(e,r){e=l.newTK(e),r=t.from(f.toBuffer(r)),c(32==r.length),64&r[31]&&(r[31]&=-65);var n=i.newPoint(r);if(n){var o=n.mult(e.vsk);return a.blake2b("CZERO.KEYS.KDF",o.toBuffer())}},e.genPKrKey=function(t,e){t=h.newPKr(t),e=n.newFR(e);var r=t.ZPK.mult(e),i=t.VPK.mult(e),o=r.toBuffer(),s=a.blake2b("CZERO.KEYS.KDF",i.toBuffer());return o[31]|=64,{key:s,rpk:o}},e.signByPKr=function(t,e,r){if(e=f.toBuffer(e),t=l.newSK(t),r=h.newPKr(r),c(32==e.length),e&&0!=e.length&&t.isValid()&&r.isValid()){var i=r.BASE.add(o.accountBase.points.get(0));return u.sign(e,t.vsk.mul(t.zsk),i)}},e.verifyByPKr=function(t,e,r){if(t=f.toBuffer(t),e=f.toBuffer(e),r=h.newPKr(r),c(32==t.length),!t||0==t.length||!e||0==e.length||!r.isValid())return!1;var i=r.BASE.add(o.accountBase.points.get(0));return u.verify(t,e,r.VPK,i)},e.genNil=function(t,e){if(t=l.newSK(t),e=i.newPoint(e),t.isValid()&&e.isValid())return e.mult(t.vsk.mul(t.zsk))},e.signNil=function(t,e,r,n){if(t=f.toBuffer(t),e=l.newSK(e),r=h.newPKr(r),n=i.newPoint(n),c(32==t.length),t&&0!=t.length&&e.isValid()&&r.isValid()&&n.isValid()){var a=r.BASE.add(o.accountBase.points.get(0));return s.sign(t,e.vsk.mul(e.zsk),a,n)}},e.verifyNil=function(t,e,r,n,a){if(t=f.toBuffer(t),e=f.toBuffer(e),r=i.newPoint(r),n=h.newPKr(n),a=i.newPoint(a),c(32==t.length),c(96==e.length),!(t&&0!=t.length&&e&&0!=e.length&&n.isValid()&&a.isValid()))return!1;var u=n.BASE.add(o.accountBase.points.get(0));return s.verify(t,e,n.VPK,r,u,a)},e.genTrace=function(t,e){if(t=l.newTK(t),e=i.newPoint(e),t.isValid()&&e.isValid())return e.mult(t.vsk)},e.isMyPKr=function(t,e){if(t=l.newTK(t),e=h.newPKr(e),!t.isValid()||!e.isValid())return!1;var r=e.ZPK.add(t.ZPK.mult(n.FR.ONE.nega())).mult(t.vsk),i=e.VPK.add(t.ZPK.mult(t.vsk.mul(n.FR.ONE.nega())));return r.isEqualTo(i)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(17),n=r(6),o=r(12),a=r(18),s=r(3),u=r(4),h=function(){function e(t,e){this.zsk=n.newFR(t),this.vsk=n.newFR(e)}return e.prototype.isValid=function(){return!this.zsk.isZero()&&!this.vsk.isZero()},e.prototype.toBuffer=function(){var e=t.alloc(64);return e.fill(this.zsk.toBuffer(),0),e.fill(this.vsk.toBuffer(),32),e},e.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},e}();function f(t){if(t instanceof h)return t;var e=s.toBuffer(t);return 64=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(t){s.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){s.headers[t]=i.merge(o)})),t.exports=s}).call(this,r(8))},function(t,e,r){"use strict";var i=r(11),n=r(176),o=r(74),a=r(178),s=r(179),u=r(78);t.exports=function(t){return new Promise((function(e,h){var f=t.data,c=t.headers;i.isFormData(f)&&delete c["Content-Type"];var l=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",p=t.auth.password||"";c.Authorization="Basic "+btoa(d+":"+p)}if(l.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in l?a(l.getAllResponseHeaders()):null,i={data:t.responseType&&"text"!==t.responseType?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l};n(e,h,i),l=null}},l.onabort=function(){l&&(h(u("Request aborted",t,"ECONNABORTED",l)),l=null)},l.onerror=function(){h(u("Network Error",t,null,l)),l=null},l.ontimeout=function(){h(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",l)),l=null},i.isStandardBrowserEnv()){var m=r(180),g=(t.withCredentials||s(t.url))&&t.xsrfCookieName?m.read(t.xsrfCookieName):void 0;g&&(c[t.xsrfHeaderName]=g)}if("setRequestHeader"in l&&i.forEach(c,(function(t,e){"undefined"===typeof f&&"content-type"===e.toLowerCase()?delete c[e]:l.setRequestHeader(e,t)})),t.withCredentials&&(l.withCredentials=!0),t.responseType)try{l.responseType=t.responseType}catch(b){if("json"!==t.responseType)throw b}"function"===typeof t.onDownloadProgress&&l.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){l&&(l.abort(),h(t),l=null)})),void 0===f&&(f=null),l.send(f)}))}},function(t,e,r){"use strict";var i=r(177);t.exports=function(t,e,r,n,o){var a=new Error(t);return i(a,e,r,n,o)}},function(t,e,r){"use strict";var i=r(11);t.exports=function(t,e){e=e||{};var r={};return i.forEach(["url","method","params","data"],(function(t){"undefined"!==typeof e[t]&&(r[t]=e[t])})),i.forEach(["headers","auth","proxy"],(function(n){i.isObject(e[n])?r[n]=i.deepMerge(t[n],e[n]):"undefined"!==typeof e[n]?r[n]=e[n]:i.isObject(t[n])?r[n]=i.deepMerge(t[n]):"undefined"!==typeof t[n]&&(r[n]=t[n])})),i.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(i){"undefined"!==typeof e[i]?r[i]=e[i]:"undefined"!==typeof t[i]&&(r[i]=t[i])})),r}},function(t,e,r){"use strict";function i(t){this.message=t}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,t.exports=i},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(3),n=r(46),o=r(37),a=r(65),s=r(273),u=r(275),h=r(122),f=r(44);e.decOut=function(t,e){var r=new Array;return e.forEach((function(e){var o,s={},u=!1;s.Nils=new Array;var h=e.State.OS;if(h.Out_O)s.Asset=l(h.Out_O.Asset),s.Memo=h.Out_O.Memo,s.Nils.push(e.Root),s.Nils.push(i.toString(a.genTrace(t,h.RootCM))),o=h.Out_O.Addr;else if(h.Out_Z)null!==(c=d(i.toString(a.fetchKey(t,h.Out_Z.RPK)),h.Out_Z.EInfo,h.Out_Z.PKr,h.Out_Z.OutCM))&&(s.Asset=c.Asset,s.Memo=c.Memo,s.Nils.push(i.toString(a.genTrace(t,h.RootCM))),o=h.Out_Z.PKr,u=!0);else if(h.Out_P){var f=i.toString(n.genNil(t,h.RootCM,h.Out_P.PKr));s.Asset=l(h.Out_P.Asset),s.Memo=h.Out_P.Memo,s.Nils.push(f),o=h.Out_P.PKr}else{if(!h.Out_C)throw new Error("invalid out type");var c;null!==(c=p(i.toString(n.fetchRPKKey(h.Out_C.PKr,t,h.Out_C.RPK)),h.Out_C.EInfo,h.Out_C.AssetCM))&&(s.Asset=c.Asset,s.Memo=c.Memo,s.Nils.push(i.toString(n.genNil(t,h.RootCM,h.Out_C.PKr))),o=h.Out_C.PKr,u=!0)}if(o){var m={};m.Root=e.Root,m.State=e.State,m.Pkr=i.default.addrToString(o),m.Asset=s.Asset,m.Num=e.State.Num,m.Memo=s.Memo,m.Nils=s.Nils,m.IsZ=u,m.TxHash=e.State.TxHash,r.push(m)}})),r};var c=t.alloc(32,0);function l(e){var r={};return e instanceof o.Asset?(0!=t.compare(e.tkn_currency,c)&&(r.Tkn={Currency:i.toString(e.tkn_currency),Value:i.default.bufferToBN(e.tkn_value.toBuffer()).toString()}),0!=t.compare(e.tkt_value,c)&&(r.Tkt={Category:i.toString(e.tkt_category),Value:i.toString(e.tkt_value)})):(e.Tkn&&0!==t.compare(i.toBuffer(e.Tkn.Currency),c)&&(r.Tkn={Currency:e.Tkn.Currency,Value:i.default.toBN(e.Tkn.Value).toString(10)}),e.Tkt&&0!=t.compare(i.toBuffer(e.Tkt.Value),c)&&(r.Tkt={Category:e.Tkt.Category,Value:e.Tkt.Value})),r}function d(t,e,r,n){t=i.toBuffer(t),e=i.toBuffer(e),r=f.newPKr(r),n=i.toBuffer(n);var o=u.decEInfo(e,t,!0),a=s.genOutCm(o.asset,o.memo,o.rsk,r);return a?0!=a.toBuffer().compare(n)?null:{Asset:l(o.asset),Memo:i.toString(o.memo),Nils:new Array}:null}function p(t,e,r){t=i.toBuffer(t),e=i.toBuffer(e),r=i.toBuffer(r);var n=h.decEInfo(t,e),a=i.toString(n.ar);return 0!=o.genAssetCM(n.asset,a).toBuffer().compare(r)?null:{Asset:l(n.asset),Memo:i.toString(n.memo),Nils:new Array}}e.confirmOutZ=d,e.confirmOutC=p}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var i=r(2).Buffer,n=r(22).Transform;function o(t){n.call(this),this._block=i.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1)(o,n),o.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!i.isBuffer(t)&&"string"!==typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(t)||(t=i.from(t,e));for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,r){"use strict";(function(e,i){var n=r(38);t.exports=y;var o,a=r(68);y.ReadableState=v;r(31).EventEmitter;var s=function(t,e){return t.listeners(e).length},u=r(84),h=r(2).Buffer,f=e.Uint8Array||function(){};var c=r(32);c.inherits=r(1);var l=r(187),d=void 0;d=l&&l.debuglog?l.debuglog("stream"):function(){};var p,m=r(188),g=r(85);c.inherits(y,u);var b=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var i=e instanceof(o=o||r(20));this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(23).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function y(t){if(o=o||r(20),!(this instanceof y))return new y(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,i,n){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,I(t)}(t,a)):(n||(o=function(t,e){var r;i=e,h.isBuffer(i)||i instanceof f||"string"===typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===h.prototype||(e=function(t){return h.from(t)}(e)),i?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?_(t,a,e,!1):E(t,a)):_(t,a,e,!1))):i||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=M?t=M:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function I(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?n.nextTick(S,t):S(t))}function S(t){d("emit readable"),t.emit("readable"),C(t)}function E(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(k,t,e))}function k(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;to.length?o.length:t;if(a===o.length?n+=o:n+=o.slice(0,t),0===(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=h.allocUnsafe(t),i=e.head,n=1;i.data.copy(r),t-=i.data.length;for(;i=i.next;){var o=i.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(a));break}++n}return e.length-=n,r}(t,e);return i}(t,e.buffer,e.decoder),r);var r}function P(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,n.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function O(t,e){for(var r=0,i=t.length;r=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):I(this),null;if(0===(t=A(t,e))&&e.ended)return 0===e.length&&P(this),null;var i,n=e.needReadable;return d("need readable",n),(0===e.length||e.length-t0?T(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&P(this)),null!==i&&this.emit("data",i),i},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?f:y;function h(e,i){d("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),t.removeListener("close",b),t.removeListener("finish",v),t.removeListener("drain",c),t.removeListener("error",g),t.removeListener("unpipe",h),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",m),l=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function f(){d("onend"),t.end()}o.endEmitted?n.nextTick(u):r.once("end",u),t.on("unpipe",h);var c=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,C(t))}}(r);t.on("drain",c);var l=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==O(o.pipes,t))&&!l&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(e){d("onerror",e),y(),t.removeListener("error",g),0===s(t,"error")&&t.emit("error",e)}function b(){t.removeListener("finish",v),y()}function v(){d("onfinish"),t.removeListener("close",b),y()}function y(){d("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",b),t.once("finish",v),t.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),t},y.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}i(u,n),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,b=0;b<16;++b)r[b]=t.readInt32BE(4*b);for(;b<64;++b)r[b]=0|(((e=r[b-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[b-7]+d(r[b-15])+r[b-16];for(var v=0;v<64;++v){var y=g+l(u)+h(u,p,m)+a[v]+r[v]|0,w=c(i)+f(i,n,o)|0;g=m,m=p,p=u,u=s+y|0,s=o,o=n,n=i,i=y+w|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,r){var i=r(1),n=r(24),o=r(2).Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,n.call(this,128,112)}function h(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function b(t,e){return t>>>0>>0?1:0}i(u,n),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,A=0|this._dl,I=0|this._el,S=0|this._fl,E=0|this._gl,k=0|this._hl,x=0;x<32;x+=2)e[x]=t.readInt32BE(4*x),e[x+1]=t.readInt32BE(4*x+4);for(;x<160;x+=2){var B=e[x-30],C=e[x-30+1],T=d(B,C),P=p(C,B),R=m(B=e[x-4],C=e[x-4+1]),O=g(C,B),j=e[x-14],D=e[x-14+1],N=e[x-32],z=e[x-32+1],K=P+D|0,q=T+j+b(K,P)|0;q=(q=q+R+b(K=K+O|0,O)|0)+N+b(K=K+z|0,z)|0,e[x]=q,e[x+1]=K}for(var U=0;U<160;U+=2){q=e[U],K=e[U+1];var F=f(r,i,n),L=f(w,_,M),Q=c(r,w),H=c(w,r),V=l(s,I),Z=l(I,s),G=a[U],Y=a[U+1],W=h(s,u,v),J=h(I,S,E),X=k+Z|0,$=y+V+b(X,k)|0;$=($=($=$+W+b(X=X+J|0,J)|0)+G+b(X=X+Y|0,Y)|0)+q+b(X=X+K|0,K)|0;var tt=H+L|0,et=Q+F+b(tt,H)|0;y=v,k=E,v=u,E=S,u=s,S=I,s=o+$+b(I=A+X|0,A)|0,o=n,A=M,n=i,M=_,i=r,_=w,r=$+et+b(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+A|0,this._el=this._el+I|0,this._fl=this._fl+S|0,this._gl=this._gl+E|0,this._hl=this._hl+k|0,this._ah=this._ah+r+b(this._al,w)|0,this._bh=this._bh+i+b(this._bl,_)|0,this._ch=this._ch+n+b(this._cl,M)|0,this._dh=this._dh+o+b(this._dl,A)|0,this._eh=this._eh+s+b(this._el,I)|0,this._fh=this._fh+u+b(this._fl,S)|0,this._gh=this._gh+v+b(this._gl,E)|0,this._hh=this._hh+y+b(this._hl,k)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,r){"use strict";var i=r(1),n=r(203),o=r(16),a=r(2).Buffer,s=r(90),u=r(52),h=r(53),f=a.alloc(128);function c(t,e){o.call(this,"digest"),"string"===typeof e&&(e=a.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new u:h(t)).update(e).digest():e.lengthr||o!==o)throw new TypeError("Bad key length")}}).call(this,r(0).Buffer)},function(t,e,r){(function(e){var r;e.browser?r="utf-8":r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";t.exports=r}).call(this,r(8))},function(t,e,r){var i=r(90),n=r(52),o=r(53),a=r(93),s=r(94),u=r(2).Buffer,h=u.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function c(t,e,r){var a=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new n).update(t).digest()}:"md5"===t?i:function(e){return o(t).update(e).digest()}}(t),s="sha512"===t||"sha384"===t?128:64;e.length>s?e=a(e):e.lengtht;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(h))for(;r.mod(f).cmp(c);)r.iadd(d)}else for(;r.mod(o).cmp(l);)r.iadd(d);if(g(p=r.shrn(1))&&g(r)&&b(p)&&b(r)&&a.test(p)&&a.test(r))return r}}},function(t,e,r){var i=r(5),n=r(57);function o(t){this.rand=t||new n.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var n=new i(this.rand.generate(r))}while(n.cmp(t)>=0);return n},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var n=t.bitLength(),o=i.mont(t),a=new i(1).toRed(o);e||(e=Math.max(1,n/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var h=t.shrn(u),f=s.toRed(o);e>0;e--){var c=this._randrange(new i(2),s);r&&r(c);var l=c.toRed(o).redPow(h);if(0!==l.cmp(a)&&0!==l.cmp(f)){for(var d=1;d0;e--){var f=this._randrange(new i(2),a),c=t.gcd(f);if(0!==c.cmpn(1))return c;var l=f.toRed(n).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(h)){for(var d=1;d>8,a=255&n;o?r.push(o,a):r.push(a)}return r},i.zero2=n,i.toHex=o,i.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,r){"use strict";var i=e;i.base=r(41),i.short=r(231),i.mont=r(232),i.edwards=r(233)},function(t,e,r){"use strict";var i=r(15).rotr32;function n(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function a(t,e,r){return t^e^r}e.ft_1=function(t,e,r,i){return 0===t?n(e,r,i):1===t||3===t?a(e,r,i):2===t?o(e,r,i):void 0},e.ch32=n,e.maj32=o,e.p32=a,e.s0_256=function(t){return i(t,2)^i(t,13)^i(t,22)},e.s1_256=function(t){return i(t,6)^i(t,11)^i(t,25)},e.g0_256=function(t){return i(t,7)^i(t,18)^t>>>3},e.g1_256=function(t){return i(t,17)^i(t,19)^t>>>10}},function(t,e,r){"use strict";var i=r(15),n=r(34),o=r(105),a=r(13),s=i.sum32,u=i.sum32_4,h=i.sum32_5,f=o.ch32,c=o.maj32,l=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=n.BlockHash,b=[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];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}i.inherits(v,g),t.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i>6],n=0===(32&r);if(31===(31&r)){var o=r;for(r=0;128===(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:i,primitive:n,tag:r,tagStr:s.tag[r]}}function c(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&128===i)return null;if(0===(128&i))return i;var n=127&i;if(n>4)return t.error("length octect is too long");i=0;for(var o=0;o=31)return i.error("Multi-octet tag encoding unsupported");e||(n|=32);return n|=s.tagClassByName[r||"universal"]<<6}(t,e,r,this.reporter);if(i.length<128)return(o=new n(2))[0]=a,o[1]=i.length,this._createEncoderBuffer([o,i]);for(var u=1,h=i.length;h>=256;h>>=8)u++;(o=new n(2+u))[0]=a,o[1]=128|u;h=1+u;for(var f=i.length;f>0;h--,f>>=8)o[h]=255&f;return this._createEncoderBuffer([o,i])},h.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new n(2*t.length),i=0;i=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(i=0;i=128;a>>=7)o++}var s=new n(o),u=s.length-1;for(i=t.length-1;i>=0;i--){a=t[i];for(s[u--]=127&a;(a>>=7)>0;)s[u--]=128|127&a}return this._createEncoderBuffer(s)},h.prototype._encodeTime=function(t,e){var r,i=new Date(t);return"gentime"===e?r=[f(i.getFullYear()),f(i.getUTCMonth()+1),f(i.getUTCDate()),f(i.getUTCHours()),f(i.getUTCMinutes()),f(i.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[f(i.getFullYear()%100),f(i.getUTCMonth()+1),f(i.getUTCDate()),f(i.getUTCHours()),f(i.getUTCMinutes()),f(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},h.prototype._encodeNull=function(){return this._createEncoderBuffer("")},h.prototype._encodeInt=function(t,e){if("string"===typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!==typeof t&&!n.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new n(r)}if(n.isBuffer(t)){var i=t.length;0===t.length&&i++;var o=new n(i);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);i=1;for(var a=t;a>=256;a>>=8)i++;for(a=(o=new Array(i)).length-1;a>=0;a--)o[a]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new n(o))},h.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},h.prototype._use=function(t,e){return"function"===typeof t&&(t=t(e)),t._getEncoder("der").tree},h.prototype._skipDefault=function(t,e,r){var i,n=this._baseState;if(null===n.default)return!1;var o=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;ithis.SegNum*this.SegBitsNum&&s(!1,"bigBuffer.length > SegNum * SegBitsNum");for(var i=Math.ceil(this.SegBitsNum/this.Bits),a=Math.ceil(r.bitsLength()/this.SegBitsNum),h=u.Point.ZERO,f=0;f=s),this.bitsLen=n,this.rightBits=r%8,this.buf=t.from(e.slice(Math.floor(r/8),Math.floor((a-1)/8)+1)),this.buf[this.buf.length-1]&=o.get(a%8)}return e.prototype.toBigNumber=function(){return new n(this.buf,"le").shrn(this.rightBits)},e.prototype.bitsLength=function(){return this.bitsLen},e.from=function(t,r,i){return new e(t.buf,r+t.rightBits,i)},e}();e.BitBuffer=a}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(12),n=r(6),o=r(4),a=r(17),s=r(43);function u(t){return a.blake2b("SZK$DSAN$HASH2",t)}function h(t){return new s(t)}e.sign=function(e,r,i,o){var s=t.concat([h(32),r.toBuffer(),e]),f=new n.FR(function(t){return a.blake2b("SZK$DSAN$HASH1",t)}(s)),c=i.mult(f);if(c&&!c.isZero()&&c.isValid()){var l=o.mult(f);if(l&&!l.isZero()&&l.isValid()){var d=i.mult(r);if(d&&!d.isZero()&&d.isValid()){var p=o.mult(r);if(p&&!p.isZero()&&p.isValid()){var m=t.concat([c.toBuffer(),l.toBuffer(),d.toBuffer(),p.toBuffer(),e]),g=new n.FR(u(m)),b=f.add(r.mul(g));return t.concat([b.toBuffer(),c.toBuffer(),l.toBuffer()])}}}}},e.verify=function(e,r,a,s,h,f){if(o(96==r.length,"sign.length != 96"),!a||a.isZero()||!a.isValid())return!1;if(!s||s.isZero()||!s.isValid())return!1;var c=new n.FR(r.slice(0,32)),l=i.Point.bufferTo(r.slice(32,64)),d=i.Point.bufferTo(r.slice(64,96));if(!c||c.isZero())return!1;if(!l||l.isZero()||!l.isValid())return!1;if(!d||d.isZero()||!d.isValid())return!1;var p=h.mult(c);if(!p||p.isZero()||!p.isValid())return!1;var m=f.mult(c);if(!m||m.isZero()||!m.isValid())return!1;var g=t.concat([l.toBuffer(),d.toBuffer(),a.toBuffer(),s.toBuffer(),e]),b=new n.FR(u(g)),v=a.mult(b),y=l.add(v);if(!p.isEqualTo(y))return!1;var w=s.mult(b),_=d.add(w);return!!m.isEqualTo(_)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(12),n=r(3),o=r(4),a=r(66),s=function(){function e(t,e){this.ZPK=i.newPoint(t),this.VPK=i.newPoint(e)}return e.prototype.toBuffer=function(){return t.concat([this.ZPK.toBuffer(),this.VPK.toBuffer()])},e.prototype.toString=function(){return n.default.bufferToBs58(this.toBuffer())},e}();e.PK=s,e.newPK=function(t){if(t instanceof s)return t;var e=n.toBuffer(t);o(64==e.length);var r=i.Point.bufferTo(e.slice(0,32)),a=i.Point.bufferTo(e.slice(32,64));return new s(r,a)},e.tk2PK=function(t){var e=(t=a.newTK(t)).ZPK,r=t.ZPK.mult(t.vsk);return new s(e,r)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(37),n=r(6),o=r(3),a=r(64),s=r(4),u=function(){function e(t,e,r){this.asset=i.newAsset(t),this.memo=o.toBuffer(e),this.ar=n.newFR(r)}return e.prototype.isValid=function(){return!!this.asset.isValid()&&!this.ar.isZero()},e.prototype.toBuffer=function(){return t.concat([this.asset.toBuffer(),this.memo,this.ar.toBuffer()])},e.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},e}();function h(t){if(t instanceof u)return t;var e=o.toBuffer(t);s(224==e.length);var r=0,a=128,h=i.newAsset(e.slice(r,r+a));r+=a,a=64;var f=e.slice(r,r+a);r+=a,a=32;var c=n.newFR(e.slice(r,r+a));return new u(h,f,c)}e.Info=u,e.newInfo=h,e.encInfo=function(t,e){t=o.toBuffer(t);var r=(e=h(e)).toBuffer();return a.default(r,t)},e.decEInfo=function(t,e){return t=o.toBuffer(t),e=o.toBuffer(e),h(a.default(e,t))}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(48),n=r(43),o=r(276),a=r(293),s=r(296),u=r(142),h=r(3),f=r(6),c=r(45),l=function(){function t(t,e){if(this.version=2,void 0!==t){void 0===e&&(e=g());var r=h.toBuffer(e);this.keystore=p(r,t,2);var i=c.seed2Sk(r,2),n=c.sk2Tk(i);return this.tk=n,this.pk=c.tk2PK(n),this.version=2,this}}return t.prototype.fromKeystore=function(t){var e="object"==typeof t?t:JSON.parse(t);this.keystore=e,this.tk=e.tk,this.version=this.keystore.version;var r=h.toBuffer(this.tk);if(h.isNewVersion(r)){if(2!==this.version)throw new Error("keystore version not match tk")}else if(1!==this.version)throw new Error("keystore version not match tk");var i=c.tk2PK(this.tk);return this.pk=i,this},t.prototype.fromMnemonic=function(t,e){var r=t.split(" "),i=1;if(25===r.length){if("v2"!==r[0])throw new Error("invalid mnemoic!");i=2,t=r.slice(1).join(" ")}if(s.validateMnemonic(t)){var n=s.mnemonicToEntropy(t),o=h.toBuffer(n);this.keystore=p(o,e,i);var a=c.seed2Sk(o,i),u=c.sk2Tk(a);return this.tk=u,this.pk=this.keystore.address,this.version=i,this}throw new Error("invald mnemonic!")},t.prototype.fromTk=function(t){var e=h.toBuffer(t),r=1;return h.isNewVersion(e)&&(r=2),this.tk=t,this.pk=c.tk2PK(e),this.keystore=function(t,e){var r=c.tk2PK(t);return{version:e,id:a({random:n(16)}),address:r,tk:t.toString(),at:0}}(this.tk,r),this.version=r,this},t.prototype.getSk=function(t){if(this.keystore.crypto){var e=d(this.keystore,t);return c.seed2Sk(e,this.keystore.version)}return""},t.prototype.getTk=function(){return this.tk.toString()},t.prototype.getPk=function(){return this.pk},t.prototype.getVersion=function(){return this.version},t.prototype.getKeystore=function(){return this.keystore},t.prototype.exportMnemonic=function(t){var e=d(this.keystore,t),r=this.keystore.version,i=s.entropyToMnemonic(e);return 2===r&&(i="v2 "+i),i},t}();function d(e,r){var n,a,s="object"==typeof e?e:JSON.parse(e);if("scrypt"!==s.crypto.kdf)throw new Error("Unsupported key derivation scheme");a=s.crypto.kdfparams,n=o(t.from(r),h.toBuffer(a.salt),a.n,a.r,a.p,a.dklen);var f=t.from(s.crypto.ciphertext,"hex");if(u(t.concat([n.slice(16,32),f])).toString("hex")!==s.crypto.mac)throw new Error("Key derivation failed - possibly wrong passphrase");return m(i.createDecipheriv(s.crypto.cipher,n.slice(0,16),t.from(s.crypto.cipherparams.iv,"hex")),f)}function p(e,r,s){if(!function(t){return null!=t}(e))throw new Error("This is a public key only wallet");var f={cipher:"aes-128-ctr",kdf:"scrypt",salt:n(32),iv:n(16),uuid:n(16),dklen:32,c:262144,n:262144,r:8,p:1},l=function(t){return{dklen:t.dklen,salt:t.salt.toString("hex"),n:t.n,r:t.r,p:t.p}}(f),d=o(t.from(r),h.toBuffer(l.salt),l.n,l.r,l.p,l.dklen),p=i.createCipheriv(f.cipher,d.slice(0,16),f.iv);if(!p)throw new Error("Unsupported cipher");var g=m(p,e),b=u(t.concat([d.slice(16,32),t.from(g)])),v=c.seed2Sk(e,s),y=c.sk2Tk(v),w=c.tk2PK(y);return l.salt=l.salt,{version:s,id:a({random:f.uuid}),address:w,tk:y.toString(),crypto:{ciphertext:g.toString("hex"),cipherparams:{iv:f.iv.toString("hex")},cipher:f.cipher,kdf:f.kdf,kdfparams:l,mac:b.toString("hex")},at:0}}function m(e,r){return t.concat([e.update(r),e.final()])}function g(){return f.randomFR().toBuffer().toString("hex")}e.default=l,e.createPkrHash=function(e,r,i){if(2!==i&&1!==i)throw new Error("ivalid version");e=h.toBuffer(e);var n=h.toBN(r).toArrayLike(t,"be");if(8r||e!==e)throw new TypeError("Bad key length")}},function(t,e,r){(function(e){var r;if(e.browser)r="utf-8";else if(e.version){r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";t.exports=r}).call(this,r(8))},function(t,e,r){var i=r(279),n=r(136),o=r(137),a=r(7).Buffer,s=r(125),u=r(126),h=r(140),f=a.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(t,e,r){var s=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new n).update(t).digest()}:"md5"===t?i:function(e){return o(t).update(e).digest()}}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=s(e):e.length>>32-e}function h(t,e,r,i,n,o,a){return u(t+(e&r|~e&i)+n+o|0,a)+e|0}function f(t,e,r,i,n,o,a){return u(t+(e&i|r&~i)+n+o|0,a)+e|0}function c(t,e,r,i,n,o,a){return u(t+(e^r^i)+n+o|0,a)+e|0}function l(t,e,r,i,n,o,a){return u(t+(r^(e|~i))+n+o|0,a)+e|0}i(s,n),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,i=this._b,n=this._c,o=this._d;r=h(r,i,n,o,t[0],3614090360,7),o=h(o,r,i,n,t[1],3905402710,12),n=h(n,o,r,i,t[2],606105819,17),i=h(i,n,o,r,t[3],3250441966,22),r=h(r,i,n,o,t[4],4118548399,7),o=h(o,r,i,n,t[5],1200080426,12),n=h(n,o,r,i,t[6],2821735955,17),i=h(i,n,o,r,t[7],4249261313,22),r=h(r,i,n,o,t[8],1770035416,7),o=h(o,r,i,n,t[9],2336552879,12),n=h(n,o,r,i,t[10],4294925233,17),i=h(i,n,o,r,t[11],2304563134,22),r=h(r,i,n,o,t[12],1804603682,7),o=h(o,r,i,n,t[13],4254626195,12),n=h(n,o,r,i,t[14],2792965006,17),r=f(r,i=h(i,n,o,r,t[15],1236535329,22),n,o,t[1],4129170786,5),o=f(o,r,i,n,t[6],3225465664,9),n=f(n,o,r,i,t[11],643717713,14),i=f(i,n,o,r,t[0],3921069994,20),r=f(r,i,n,o,t[5],3593408605,5),o=f(o,r,i,n,t[10],38016083,9),n=f(n,o,r,i,t[15],3634488961,14),i=f(i,n,o,r,t[4],3889429448,20),r=f(r,i,n,o,t[9],568446438,5),o=f(o,r,i,n,t[14],3275163606,9),n=f(n,o,r,i,t[3],4107603335,14),i=f(i,n,o,r,t[8],1163531501,20),r=f(r,i,n,o,t[13],2850285829,5),o=f(o,r,i,n,t[2],4243563512,9),n=f(n,o,r,i,t[7],1735328473,14),r=c(r,i=f(i,n,o,r,t[12],2368359562,20),n,o,t[5],4294588738,4),o=c(o,r,i,n,t[8],2272392833,11),n=c(n,o,r,i,t[11],1839030562,16),i=c(i,n,o,r,t[14],4259657740,23),r=c(r,i,n,o,t[1],2763975236,4),o=c(o,r,i,n,t[4],1272893353,11),n=c(n,o,r,i,t[7],4139469664,16),i=c(i,n,o,r,t[10],3200236656,23),r=c(r,i,n,o,t[13],681279174,4),o=c(o,r,i,n,t[0],3936430074,11),n=c(n,o,r,i,t[3],3572445317,16),i=c(i,n,o,r,t[6],76029189,23),r=c(r,i,n,o,t[9],3654602809,4),o=c(o,r,i,n,t[12],3873151461,11),n=c(n,o,r,i,t[15],530742520,16),r=l(r,i=c(i,n,o,r,t[2],3299628645,23),n,o,t[0],4096336452,6),o=l(o,r,i,n,t[7],1126891415,10),n=l(n,o,r,i,t[14],2878612391,15),i=l(i,n,o,r,t[5],4237533241,21),r=l(r,i,n,o,t[12],1700485571,6),o=l(o,r,i,n,t[3],2399980690,10),n=l(n,o,r,i,t[10],4293915773,15),i=l(i,n,o,r,t[1],2240044497,21),r=l(r,i,n,o,t[8],1873313359,6),o=l(o,r,i,n,t[15],4264355552,10),n=l(n,o,r,i,t[6],2734768916,15),i=l(i,n,o,r,t[13],1309151649,21),r=l(r,i,n,o,t[4],4149444226,6),o=l(o,r,i,n,t[11],3174756917,10),n=l(n,o,r,i,t[2],718787259,15),i=l(i,n,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},function(t,e,r){"use strict";var i=r(7).Buffer,n=r(280).Transform;function o(t){n.call(this),this._block=i.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(9)(o,n),o.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!i.isBuffer(t)&&"string"!==typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(t)||(t=i.from(t,e));for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,r){"use strict";(function(e,i){var n;t.exports=S,S.ReadableState=I;r(31).EventEmitter;var o=function(t,e){return t.listeners(e).length},a=r(131),s=r(0).Buffer,u=e.Uint8Array||function(){};var h,f=r(281);h=f&&f.debuglog?f.debuglog("stream"):function(){};var c,l,d,p=r(282),m=r(132),g=r(133).getHighWaterMark,b=r(26).codes,v=b.ERR_INVALID_ARG_TYPE,y=b.ERR_STREAM_PUSH_AFTER_EOF,w=b.ERR_METHOD_NOT_IMPLEMENTED,_=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(9)(S,a);var M=m.errorOrDestroy,A=["error","close","destroy","pause","resume"];function I(t,e,i){n=n||r(27),t=t||{},"boolean"!==typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=r(23).StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function S(t){if(n=n||r(27),!(this instanceof S))return new S(t);var e=this instanceof n;this._readableState=new I(t,this,e),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function E(t,e,r,i,n){h("readableAddChunk",e);var o,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(h("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?C(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,T(t)))}(t,a);else if(n||(o=function(t,e){var r;i=e,s.isBuffer(i)||i instanceof u||"string"===typeof e||void 0===e||t.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],e));var i;return r}(a,e)),o)M(t,o);else if(a.objectMode||e&&e.length>0)if("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),i)a.endEmitted?M(t,new _):k(t,a,e,!0);else if(a.ended)M(t,new y);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?k(t,a,e,!1):P(t,a)):k(t,a,e,!1)}else i||(a.reading=!1,P(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=x?t=x:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function C(t){var e=t._readableState;h("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(h("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(T,t))}function T(t){var e=t._readableState;h("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,N(t)}function P(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(R,t,e))}function R(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function j(t){h("readable nexttick read 0"),t.read(0)}function D(t,e){h("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),N(t),e.flowing&&!e.reading&&t.read(0)}function N(t){var e=t._readableState;for(h("flow",e.flowing);e.flowing&&null!==t.read(););}function z(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function K(t){var e=t._readableState;h("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(q,e,t))}function q(t,e){if(h("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function U(t,e){for(var r=0,i=t.length;r=e.highWaterMark:e.length>0)||e.ended))return h("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?K(this):C(this),null;if(0===(t=B(t,e))&&e.ended)return 0===e.length&&K(this),null;var i,n=e.needReadable;return h("need readable",n),(0===e.length||e.length-t0?z(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&K(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(t){M(this,new w("_read()"))},S.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,h("pipe count=%d opts=%j",n.pipesCount,e);var a=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?u:g;function s(e,i){h("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,h("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",f),t.removeListener("error",d),t.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",l),c=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function u(){h("onend"),t.end()}n.endEmitted?i.nextTick(a):r.once("end",a),t.on("unpipe",s);var f=function(t){return function(){var e=t._readableState;h("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,N(t))}}(r);t.on("drain",f);var c=!1;function l(e){h("ondata");var i=t.write(e);h("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==U(n.pipes,t))&&!c&&(h("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(e){h("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&M(t,e)}function p(){t.removeListener("finish",m),g()}function m(){h("onfinish"),t.removeListener("close",p),g()}function g(){h("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",r),n.flowing||(h("pipe resume"),r.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,h("on readable",n.length,n.reading),n.length?C(this):n.reading||i.nextTick(j,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(O,this),r},S.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(O,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(h("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(D,t,e))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(h("wrapped data"),r.decoder&&(n=r.decoder.write(n)),!r.objectMode||null!==n&&void 0!==n)&&((r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause())))})),t)void 0===this[n]&&"function"===typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var o=0;o-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,e,r){r(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,e,r){var n=this._writableState;return"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,T(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=c.destroy,S.prototype._undestroy=c.undestroy,S.prototype._destroy=function(t,e){e(t)}}).call(this,r(10),r(8))},function(t,e,r){"use strict";t.exports=f;var i=r(26).codes,n=i.ERR_METHOD_NOT_IMPLEMENTED,o=i.ERR_MULTIPLE_CALLBACK,a=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=i.ERR_TRANSFORM_WITH_LENGTH_0,u=r(27);function h(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length>>32-e}function m(t,e,r,i,n,o,a,s){return p(t+(e^r^i)+o+a|0,s)+n|0}function g(t,e,r,i,n,o,a,s){return p(t+(e&r|~e&i)+o+a|0,s)+n|0}function b(t,e,r,i,n,o,a,s){return p(t+((e|~r)^i)+o+a|0,s)+n|0}function v(t,e,r,i,n,o,a,s){return p(t+(e&i|r&~i)+o+a|0,s)+n|0}function y(t,e,r,i,n,o,a,s){return p(t+(e^(r|~i))+o+a|0,s)+n|0}n(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,A=0|this._d,I=0|this._e,S=0;S<80;S+=1){var E,k;S<16?(E=m(r,i,n,o,d,t[s[S]],c[0],h[S]),k=y(w,_,M,A,I,t[u[S]],l[0],f[S])):S<32?(E=g(r,i,n,o,d,t[s[S]],c[1],h[S]),k=v(w,_,M,A,I,t[u[S]],l[1],f[S])):S<48?(E=b(r,i,n,o,d,t[s[S]],c[2],h[S]),k=b(w,_,M,A,I,t[u[S]],l[2],f[S])):S<64?(E=v(r,i,n,o,d,t[s[S]],c[3],h[S]),k=g(w,_,M,A,I,t[u[S]],l[3],f[S])):(E=y(r,i,n,o,d,t[s[S]],c[4],h[S]),k=m(w,_,M,A,I,t[u[S]],l[4],f[S])),r=d,d=o,o=p(n,10),n=i,i=E,w=I,I=A,A=p(M,10),M=_,_=k}var x=this._b+n+A|0;this._b=this._c+o+I|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+i+M|0,this._a=x},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=i.alloc?i.alloc(20):new i(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(289),e.sha1=r(290),e.sha224=r(291),e.sha256=r(138),e.sha384=r(292),e.sha512=r(139)},function(t,e,r){var i=r(9),n=r(28),o=r(7).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,n.call(this,64,56)}function h(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}i(u,n),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,b=0;b<16;++b)r[b]=t.readInt32BE(4*b);for(;b<64;++b)r[b]=0|(((e=r[b-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[b-7]+d(r[b-15])+r[b-16];for(var v=0;v<64;++v){var y=g+l(u)+h(u,p,m)+a[v]+r[v]|0,w=c(i)+f(i,n,o)|0;g=m,m=p,p=u,u=s+y|0,s=o,o=n,n=i,i=y+w|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,r){var i=r(9),n=r(28),o=r(7).Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,n.call(this,128,112)}function h(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function b(t,e){return t>>>0>>0?1:0}i(u,n),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,A=0|this._dl,I=0|this._el,S=0|this._fl,E=0|this._gl,k=0|this._hl,x=0;x<32;x+=2)e[x]=t.readInt32BE(4*x),e[x+1]=t.readInt32BE(4*x+4);for(;x<160;x+=2){var B=e[x-30],C=e[x-30+1],T=d(B,C),P=p(C,B),R=m(B=e[x-4],C=e[x-4+1]),O=g(C,B),j=e[x-14],D=e[x-14+1],N=e[x-32],z=e[x-32+1],K=P+D|0,q=T+j+b(K,P)|0;q=(q=q+R+b(K=K+O|0,O)|0)+N+b(K=K+z|0,z)|0,e[x]=q,e[x+1]=K}for(var U=0;U<160;U+=2){q=e[U],K=e[U+1];var F=f(r,i,n),L=f(w,_,M),Q=c(r,w),H=c(w,r),V=l(s,I),Z=l(I,s),G=a[U],Y=a[U+1],W=h(s,u,v),J=h(I,S,E),X=k+Z|0,$=y+V+b(X,k)|0;$=($=($=$+W+b(X=X+J|0,J)|0)+G+b(X=X+Y|0,Y)|0)+q+b(X=X+K|0,K)|0;var tt=H+L|0,et=Q+F+b(tt,H)|0;y=v,k=E,v=u,E=S,u=s,S=I,s=o+$+b(I=A+X|0,A)|0,o=n,A=M,n=i,M=_,i=r,_=w,r=$+et+b(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+A|0,this._el=this._el+I|0,this._fl=this._fl+S|0,this._gl=this._gl+E|0,this._hl=this._hl+k|0,this._ah=this._ah+r+b(this._al,w)|0,this._bh=this._bh+i+b(this._bl,_)|0,this._ch=this._ch+n+b(this._cl,M)|0,this._dh=this._dh+o+b(this._dl,A)|0,this._eh=this._eh+s+b(this._el,I)|0,this._fh=this._fh+u+b(this._fl,S)|0,this._gh=this._gh+v+b(this._gl,E)|0,this._hh=this._hh+y+b(this._hl,k)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,r){var i=r(7).Buffer;t.exports=function(t,e,r){if(i.isBuffer(t))return t;if("string"===typeof t)return i.from(t,e);if(ArrayBuffer.isView(t))return i.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,n={};e.wordlists=n,e._default=i;try{e._default=i=r(303),n.chinese_simplified=i}catch(o){}try{e._default=i=r(304),n.chinese_traditional=i}catch(o){}try{e._default=i=r(305),n.korean=i}catch(o){}try{e._default=i=r(306),n.french=i}catch(o){}try{e._default=i=r(307),n.italian=i}catch(o){}try{e._default=i=r(308),n.spanish=i}catch(o){}try{e._default=i=r(309),n.japanese=i,n.JA=i}catch(o){}try{e._default=i=r(310),n.english=i,n.EN=i}catch(o){}},function(t,e,r){"use strict";(function(e){var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=r(311),o=r(317);function a(t){var e=t;if("string"!==typeof e)throw new Error("while padding to even, value must be string, is currently "+("undefined"===typeof e?"undefined":i(e))+", while padToEven.");return e.length%2&&(e="0"+e),e}t.exports=function(t){return t=function(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"===typeof t)t=function(t,e){if("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))return!1;if(e&&t.length!==2+2*e)return!1;return!0}(t)?e.from(a(function(t){if("string"!==typeof t)return t;return function(t){if("string"!==typeof t)throw new Error("value must be type 'string', is currently type "+("undefined"===typeof t?"undefined":i(t))+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}(t)?t.slice(2):t}(t)),"hex"):e.from(t);else if("number"===typeof t)t=function(t){var r=function(t){return"0x"+t.toString(16)}(t);return e.from(a(r.slice(2)),"hex")}(t);else if(null===t||void 0===t)t=e.allocUnsafe(0);else if(o.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray())}return t}(t),n("keccak256").update(t).digest()}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var i=this&&this.__awaiter||function(t,e,r,i){return new(r=r||Promise)((function(n,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?n(t.value):((e=t.value)instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((i=i.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var r,i,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(n=0<(n=a.trys).length&&n[n.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]n[0]&&o[1]>>> ",l,d),[4,e.findRoots(t.From,a.default.hexToCy(l),d)]);case 4:return p=n.sent(),console.log("result >>>> ",p),p&&(p.remain.isNeg()||p.remain.isZero())?(o.push.apply(o,p.utxos),[3,3]):[2,new Promise((function(t,e){e("no enough unlocked utxos")}))];case 5:return[2,new Promise((function(t){t(o)}))]}}))}))},e.buildTxParam=function(e,r){return i(this,void 0,void 0,(function(){var i,o,u,f,c,l,d,p,m,g,b,v,y;return n(this,(function(n){switch(n.label){case 0:return i=new Array,r.Utxos.forEach((function(t){i.push(t.Root)})),[4,e.getAnchor(i)];case 1:if(null===(o=n.sent()))throw new Error("can not find Anchor by root");if(u=new Array,f=0,c=new h(!1,r.Fee),r.Utxos.forEach((function(e,r){if(null===e.State)throw new Error("can not find out by root");c.AddIn(e.Asset),u.push({SKr:a.toString(t.alloc(96)),Out:{Root:e.Root,State:e.State},Witness:o[r]}),a.default.isNotNull(e.State.OS.Out_O)&&f++})),2500 2500");for(l=new Array,r.Receptions.forEach((function(e){c.AddOut(e.Asset),l.push({PKr:a.toHex(e.Addr),Asset:e.Asset,Memo:a.toString(t.alloc(64))})})),null!==r.Cmds&&null!==(d=new s(r.Cmds).OutAsset())&&c.AddOut(d),p=c.GetTknList(),m=c.GetTktList(),g=Math.max(p.length,m.length),b=0;bn[0]&&a[1]>> ",r.value[0],!1),m.set(r.value[0],!1)),r=e.next();console.error("======= fetchHandler error>>> ",t),z("Fetch Error:","string"==typeof t?t:t.message)})),w=(new Date).getTime()}t(),_=setInterval((function(){t()}),M)}(),t.data="success",R(t)},healthyCheck:function(t){var e=!1;w&&(e=(new Date).getTime()-w<6e4);var r=t.data;d.get(r).selectId(a.tables.syncInfo.name,1).then((function(i){t.data={health:e,latestSyncTime:w,isSyncing:m.get(r),latestBlock:i.CurrentBlock,currentBlock:b.get(r),pkrIndex:i.PkrIndex,startBlock:v.get(r),checkNilPercent:y.get(r)},R(t)})).catch((function(i){t.data={health:e,latestSyncTime:w,isSyncing:m.get(r),latestBlock:0,pkrIndex:1,currentBlock:0,startBlock:0,checkNilPercent:0},R(t)}))},initAccount:function(t){var e,r,i,n=t.data;n&&d&&!d.get(n)&&(e=1,s.isNewVersion(s.default.toBuffer(n))&&(e=2),r=f.createPkrHash(n,1,e),a.dbConfig.databaseName="popup_"+n,i=new o.PopDB(a.dbConfig),d.set(n,i),i.select(a.tables.syncInfo.name,{TK:n}).then((function(e){var o;e&&0!==e.length?(b.set(n,e[0].CurrentBlock),v.set(n,e[0].CurrentBlock)):(o={TK:n,PkrIndex:1,CurrentBlock:0,LastCombineBlock:0,UseHashPKr:!1,MainPKr:r,PKr:r},i.insert(a.tables.syncInfo.name,o).then((function(e){t.data="success"})).catch((function(e){console.log(e),t.error=e.message})),b.set(n,0),v.set(n,0)),y.set(n,0),R(t)})).catch((function(e){var o={TK:n,PkrIndex:1,CurrentBlock:0,LastCombineBlock:0,UseHashPKr:!1,MainPKr:r,PKr:r};i.insert(a.tables.syncInfo.name,o).then((function(e){t.data="success"})).catch((function(e){console.log(e),t.error=e.message})),b.set(n,0),v.set(n,0),R(t)})))},clearData:function(t){(function(t){return i(this,void 0,void 0,(function(){function e(e){return i(this,void 0,void 0,(function(){var r;return n(this,(function(i){switch(i.label){case 0:return[4,e.selectId(a.tables.syncInfo.name,1)];case 1:return r=i.sent(),!0!==m.get(r.TK)?[3,3]:[4,new Promise((function(t,e){e("Data synchronization ...")}))];case 2:return i.sent(),[3,15];case 3:return m.set(t,!0),p.delete(t),r.CurrentBlock=0,r.PKr=r.MainPKr,r.PkrIndex=1,r.UseHashPKr=!1,[4,e.update(a.tables.syncInfo.name,r)];case 4:return i.sent(),[4,e.clearTable(a.tables.utxo.name)];case 5:return i.sent(),[4,e.clearTable(a.tables.txBase.name)];case 6:return i.sent(),[4,e.clearTable(a.tables.assets.name)];case 7:return i.sent(),[4,e.clearTable(a.tables.assetUtxo.name)];case 8:return i.sent(),[4,e.clearTable(a.tables.tx.name)];case 9:return i.sent(),[4,e.clearTable(a.tables.nils.name)];case 10:return i.sent(),[4,e.clearTable(a.tables.txCurrency.name)];case 11:return i.sent(),[4,e.clearTable(a.tables.utxoTkt.name)];case 12:return i.sent(),[4,e.clearTable(a.tables.tickets.name)];case 13:return i.sent(),b.set(t,0),v.set(t,0),[4,new Promise((function(t){t("Clear Data Success !")}))];case 14:i.sent(),i.label=15;case 15:return[2]}}))}))}var r,o;return n(this,(function(i){switch(i.label){case 0:return t?[4,e(d.get(t))]:[3,2];case 1:return i.sent(),[3,5];case 2:r=d.entries(),o=r.next(),i.label=3;case 3:return o.done?[3,5]:[4,e(o.value[1])];case 4:return i.sent(),o=r.next(),[3,3];case 5:return[2]}}))}))})(t.data).then((function(e){console.log("data>>> ",e),m.clear(),t.data="Success",R(t)})).catch((function(e){console.log("data e>>> ",e),m.clear(),t.error=e,R(t)}))},findUtxos:function(t,e,r){},balanceOf:function(t){var e=t.data;function r(){d.get(e).selectAll(a.tables.assets.name).then((function(r){var i=new Map;r&&0> ",t)})).catch((function(t){console.error(t)})),u(c.Hash))}))]}}))}))})(e).then((function(e){console.log("_commitTx hash:",e),t.data=e,R(t)})).catch((function(e){console.error("_commitTx err:",e),t.error=e,R(t)}))}catch(e){t.error=e.message,R(t)}},getSeroPrice:function(t){var e=t.data;u.default.get("https://data.gateio.co/api2/1/ticker/"+e).then((function(e){var r;e&&e.data&&(r=e.data,t.data=r,R(t))})).catch((function(t){}))},getPendingAndConfirming:function(t){return i(this,void 0,void 0,(function(){var e;return n(this,(function(r){return e=t.data,g.has(e)?t.data=g.get(e):t.data=[],R(t),[2]}))}))}};function E(t){return i(this,void 0,void 0,(function(){var e,r,i,o,u,f,c,l,d,p,m,g,b,v,y;return n(this,(function(n){switch(n.label){case 0:return[4,t.selectAll(a.tables.utxo.name)];case 1:if(!((e=n.sent())&&0> ",{Root:l.Root,Value:s.Asset.Tkt.Value,Category:s.Asset.Tkt.Category}),[4,r.update(a.tables.tickets.name,{Root:l.Root,Value:s.Asset.Tkt.Value,Category:s.Asset.Tkt.Category})];case 9:n.sent(),n.label=10;case 10:return i++,[3,1];case 11:if(!(t.txInfos&&0b.get(t))&&b.set(t,j.Num),v.has(t)&&0!=v.get(t)||v.set(t,j.Num),z("("+i.pkrMain+") AddTx",JSON.stringify({Block:j.Num,TxHash:j.TxHash})),n.label=9;case 9:return[4,d.get(t).update(a.tables.txBase.name,R)];case 10:n.sent(),M=M.concat(P),n.label=11;case 11:return k++,[3,3];case 12:return A++,[3,2];case 13:for(N=0,U=M;Nn[0]&&a[1]n[0]&&a[1]0?a-4:a;for(r=0;r>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[f++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,n=r%3,o=[],a=0,s=r-n;as?s:a+16383));1===n?(e=t[r-1],o.push(i[e>>2]+i[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],o.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return o.join("")};for(var i=[],n=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var n,o,a=[],s=e;s>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,i,n){var o,a,s=8*n-i-1,u=(1<>1,f=-7,c=r?n-1:0,l=r?-1:1,d=t[e+c];for(c+=l,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[e+c],c+=l,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=i;f>0;a=256*a+t[e+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,i),o-=h}return(d?-1:1)*a*Math.pow(2,o-i)},e.write=function(t,e,r,i,n,o){var a,s,u,h=8*o-n-1,f=(1<>1,l=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=f?(s=0,a=f):a+c>=1?(s=(e*u-1)*Math.pow(2,n),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,n),a=0));n>=8;t[r+d]=255&s,d+=p,s/=256,n-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,h-=8);t[r+d-p]|=128*m}},function(t,e){},function(t,e,r){"use strict";var i=r(7).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");var e=new Uint8Array(256);e.fill(255);for(var r=0;r>>0,f=new Uint8Array(h);t[r];){var c=e[t.charCodeAt(r)];if(255===c)return;for(var l=0,d=h-1;(0!==c||l>>0,f[d]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");o=l,r++}if(" "!==t[r]){for(var p=h-o;p!==h&&0===f[p];)p++;var m=i.allocUnsafe(n+(h-p));m.fill(0,0,n);for(var g=n;p!==h;)m[g++]=f[p++];return m}}}return{encode:function(e){if(!i.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,n=0,o=0,u=e.length;o!==u&&0===e[o];)o++,r++;for(var f=(u-o)*h+1>>>0,c=new Uint8Array(f);o!==u;){for(var l=e[o],d=0,p=f-1;(0!==l||d>>0,c[p]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=d,o++}for(var m=f-n;m!==f&&0===c[m];)m++;for(var g=s.repeat(r);m=55296&&e<=56319&&n=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function s(t,e){return n(t>>e&63|128)}function u(t){if(0==(4294967168&t))return n(t);var e="";return 0==(4294965248&t)?e=n(t>>6&31|192):0==(4294901760&t)?(a(t),e=n(t>>12&15|224),e+=s(t,6)):0==(4292870144&t)&&(e=n(t>>18&7|240),e+=s(t,12),e+=s(t,6)),e+=n(63&t|128)}function h(){if(i>=r)throw Error("Invalid byte index");var t=255&e[i];if(i++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function f(){var t,n;if(i>r)throw Error("Invalid byte index");if(i==r)return!1;if(t=255&e[i],i++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|h())>=128)return n;throw Error("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|h()<<6|h())>=2048)return a(n),n;throw Error("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|h()<<12|h()<<6|h())>=65536&&n<=1114111)return n;throw Error("Invalid UTF-8 detected")}t.version="3.0.0",t.encode=function(t){for(var e=o(t),r=e.length,i=-1,n="";++i65535&&(o+=n((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=n(e);return o}(s)}}(e)},function(t,e,r){var i=r(156),n=r(69);t.exports=function(t){if("string"===typeof t||"number"===typeof t){var e=new i(1),r=String(t).toLowerCase().trim(),o="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),a=n(r);if("-"===a.substr(0,1)&&(a=n(a.slice(1)),e=new i(-1,10)),!(a=""===a?"0":a).match(/^-?[0-9]+$/)&&a.match(/^[0-9A-Fa-f]+$/)||a.match(/^[a-fA-F]+$/)||!0===o&&a.match(/^[0-9A-Fa-f]+$/))return new i(a,16).mul(e);if((a.match(/^-?[0-9]+$/)||""===a)&&!1===o)return new i(a,10).mul(e)}else if("object"===typeof t&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new i(t.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(t)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(0).Buffer}catch(I){}function s(t,e,r){for(var i=0,n=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return i}function u(t,e,r,i){for(var n=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)n=s(t,r,r+6),this.words[i]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);r+6!==e&&(n=s(t,e,r+6),this.words[i]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,a=o%i,s=Math.min(o,o-a)+r,h=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var h=1;h>>26,c=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=l;d++){var p=h-d|0;f+=(a=(n=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}r.words[h]=0|c,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:h[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,h=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),h[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,M=0|a[4],A=8191&M,I=M>>>13,S=0|a[5],E=8191&S,k=S>>>13,x=0|a[6],B=8191&x,C=x>>>13,T=0|a[7],P=8191&T,R=T>>>13,O=0|a[8],j=8191&O,D=O>>>13,N=0|a[9],z=8191&N,K=N>>>13,q=0|s[0],U=8191&q,F=q>>>13,L=0|s[1],Q=8191&L,H=L>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],W=8191&Y,J=Y>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,it=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ut=8191&st,ht=st>>>13,ft=0|s[8],ct=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(i=Math.imul(c,U))|0)+((8191&(n=(n=Math.imul(c,F))+Math.imul(l,U)|0))<<13)|0;h=((o=Math.imul(l,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,F))+Math.imul(m,U)|0,o=Math.imul(m,F);var bt=(h+(i=i+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(l,Q)|0))<<13)|0;h=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(b,U),n=(n=Math.imul(b,F))+Math.imul(v,U)|0,o=Math.imul(v,F),i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,H)|0;var vt=(h+(i=i+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,U),n=(n=Math.imul(w,F))+Math.imul(_,U)|0,o=Math.imul(_,F),i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,H)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var yt=(h+(i=i+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,J)|0)+Math.imul(l,W)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(A,U),n=(n=Math.imul(A,F))+Math.imul(I,U)|0,o=Math.imul(I,F),i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,J)|0;var wt=(h+(i=i+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,U),n=(n=Math.imul(E,F))+Math.imul(k,U)|0,o=Math.imul(k,F),i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(b,W)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,J)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(i=i+Math.imul(c,rt)|0)|0)+((8191&(n=(n=n+Math.imul(c,it)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(B,U),n=(n=Math.imul(B,F))+Math.imul(C,U)|0,o=Math.imul(C,F),i=i+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(h+(i=i+Math.imul(c,ot)|0)|0)+((8191&(n=(n=n+Math.imul(c,at)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,at)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,U),n=(n=Math.imul(P,F))+Math.imul(R,U)|0,o=Math.imul(R,F),i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,H)|0,i=i+Math.imul(E,Z)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(b,rt)|0,n=(n=n+Math.imul(b,it)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var At=(h+(i=i+Math.imul(c,ut)|0)|0)+((8191&(n=(n=n+Math.imul(c,ht)|0)+Math.imul(l,ut)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,F))+Math.imul(D,U)|0,o=Math.imul(D,F),i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,H)|0,i=i+Math.imul(B,Z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,G)|0,i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(b,ot)|0,n=(n=n+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var It=(h+(i=i+Math.imul(c,ct)|0)|0)+((8191&(n=(n=n+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(z,U),n=(n=Math.imul(z,F))+Math.imul(K,U)|0,o=Math.imul(K,F),i=i+Math.imul(j,Q)|0,n=(n=n+Math.imul(j,H)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,H)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,i=i+Math.imul(b,ut)|0,n=(n=n+Math.imul(b,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(p,ct)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(h+(i=i+Math.imul(c,pt)|0)|0)+((8191&(n=(n=n+Math.imul(c,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(z,Q),n=(n=Math.imul(z,H))+Math.imul(K,Q)|0,o=Math.imul(K,H),i=i+Math.imul(j,Z)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,J)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,i=i+Math.imul(b,ct)|0,n=(n=n+Math.imul(b,lt)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,lt)|0;var Et=(h+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(z,Z),n=(n=Math.imul(z,G))+Math.imul(K,Z)|0,o=Math.imul(K,G),i=i+Math.imul(j,W)|0,n=(n=n+Math.imul(j,J)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,J)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,it)|0,i=i+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(A,ut)|0,n=(n=n+Math.imul(A,ht)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(w,ct)|0,n=(n=n+Math.imul(w,lt)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,lt)|0;var kt=(h+(i=i+Math.imul(b,pt)|0)|0)+((8191&(n=(n=n+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(z,W),n=(n=Math.imul(z,J))+Math.imul(K,W)|0,o=Math.imul(K,J),i=i+Math.imul(j,$)|0,n=(n=n+Math.imul(j,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,i=i+Math.imul(E,ut)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(A,ct)|0,n=(n=n+Math.imul(A,lt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,lt)|0;var xt=(h+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(z,$),n=(n=Math.imul(z,tt))+Math.imul(K,$)|0,o=Math.imul(K,tt),i=i+Math.imul(j,rt)|0,n=(n=n+Math.imul(j,it)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,i=i+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,i=i+Math.imul(E,ct)|0,n=(n=n+Math.imul(E,lt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,lt)|0;var Bt=(h+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(I,pt)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(z,rt),n=(n=Math.imul(z,it))+Math.imul(K,rt)|0,o=Math.imul(K,it),i=i+Math.imul(j,ot)|0,n=(n=n+Math.imul(j,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,i=i+Math.imul(P,ut)|0,n=(n=n+Math.imul(P,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,i=i+Math.imul(B,ct)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Ct=(h+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(z,ot),n=(n=Math.imul(z,at))+Math.imul(K,ot)|0,o=Math.imul(K,at),i=i+Math.imul(j,ut)|0,n=(n=n+Math.imul(j,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,i=i+Math.imul(P,ct)|0,n=(n=n+Math.imul(P,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Tt=(h+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(z,ut),n=(n=Math.imul(z,ht))+Math.imul(K,ut)|0,o=Math.imul(K,ht),i=i+Math.imul(j,ct)|0,n=(n=n+Math.imul(j,lt)|0)+Math.imul(D,ct)|0,o=o+Math.imul(D,lt)|0;var Pt=(h+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(z,ct),n=(n=Math.imul(z,lt))+Math.imul(K,ct)|0,o=Math.imul(K,lt);var Rt=(h+(i=i+Math.imul(j,pt)|0)|0)+((8191&(n=(n=n+Math.imul(j,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(i=Math.imul(z,pt))|0)+((8191&(n=(n=Math.imul(z,mt))+Math.imul(K,pt)|0))<<13)|0;return h=((o=Math.imul(K,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=bt,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=It,u[9]=St,u[10]=Et,u[11]=kt,u[12]=xt,u[13]=Bt,u[14]=Ct,u[15]=Tt,u[16]=Pt,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var a=0;a>>=1)n++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==f||h>=n);h--){var c=0|this.words[h];this.words[h]=f<<26-o|c>>>o,f=c&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var h=0;h=0;c--){var l=67108864*(0|i.words[n.length+c])+(0|i.words[n.length+c-1]);for(l=Math.min(l/a|0,67108863),i._ishlnsubmul(n,l,c);0!==i.negative;)l--,i.negative=0,i._ishlnsubmul(n,1,c),i.isZero()||(i.negative^=1);s&&(s.words[c]=l)}return s&&s.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var f=r.clone(),c=e.clone();!e.isZero();){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(c)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),a.isub(u)):(r.isub(e),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0===(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,r=(t-e)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):r.strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},n(v,b),v.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,n),l=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var h=e.words[i],f=u-1;f>=0;f--){var c=h>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},n(A,M),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(29)(t))},function(t,e){t.exports=function(t){return null===t}},function(t,e,r){var i=r(70),n=r(163),o=r(72),a="[object String]";t.exports=function(t){return"string"==typeof t||!n(t)&&o(t)&&i(t)==a}},function(t,e,r){var i=r(160),n="object"==typeof self&&self&&self.Object===Object&&self,o=i||n||Function("return this")();t.exports=o},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(10))},function(t,e,r){var i=r(71),n=Object.prototype,o=n.hasOwnProperty,a=n.toString,s=i?i.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),r=t[s];try{t[s]=void 0;var i=!0}catch(u){}var n=a.call(t);return i&&(e?t[s]=r:delete t[s]),n}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){var i=r(70),n=r(72),o="[object Number]";t.exports=function(t){return"number"==typeof t||n(t)&&i(t)==o}},function(t,e,r){(function(t){var i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},i=0;i=o)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return t}})),u=i[r];r=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),p(r)?i.showHidden=r:r&&e._extend(i,r),v(i.showHidden)&&(i.showHidden=!1),v(i.depth)&&(i.depth=2),v(i.colors)&&(i.colors=!1),v(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=u),f(i,t,i.depth)}function u(t,e){var r=s.styles[e];return r?"\x1b["+s.colors[r][0]+"m"+t+"\x1b["+s.colors[r][1]+"m":t}function h(t,e){return t}function f(t,r,i){if(t.customInspect&&r&&A(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(i,t);return b(n)||(n=f(t,n,i)),n}var o=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),M(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(r);if(0===a.length){if(A(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return t.stylize(Date.prototype.toString.call(r),"date");if(M(r))return c(r)}var h,w="",I=!1,S=["{","}"];(d(r)&&(I=!0,S=["[","]"]),A(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return y(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),M(r)&&(w=" "+c(r)),0!==a.length||I&&0!=r.length?i<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),h=I?function(t,e,r,i,n){for(var o=[],a=0,s=e.length;a=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(h,w,S)):S[0]+w+S[1]}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,i,n,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),x(i,n)||(a="["+n+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(r)?f(t,u.value,null):f(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),v(a)){if(o&&n.match(/^\d+$/))return s;(a=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function d(t){return Array.isArray(t)}function p(t){return"boolean"===typeof t}function m(t){return null===t}function g(t){return"number"===typeof t}function b(t){return"string"===typeof t}function v(t){return void 0===t}function y(t){return w(t)&&"[object RegExp]"===I(t)}function w(t){return"object"===typeof t&&null!==t}function _(t){return w(t)&&"[object Date]"===I(t)}function M(t){return w(t)&&("[object Error]"===I(t)||t instanceof Error)}function A(t){return"function"===typeof t}function I(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(v(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:"."}).NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var i=t.pid;a[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,i,t)}}else a[r]=function(){};return a[r]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=b,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=v,e.isRegExp=y,e.isObject=w,e.isDate=_,e.isError=M,e.isFunction=A,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=r(166);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var t=new Date,e=[S(t.getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":");return[t.getDate(),E[t.getMonth()],e].join(" ")}function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",k(),e.format.apply(e,arguments))},e.inherits=r(167),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t};var B="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');if(B&&t[B]){var e;if("function"!==typeof(e=t[B]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,B,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,i=new Promise((function(t,i){e=t,r=i})),n=[],o=0;o=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},function(t,e,r){"use strict";var i=r(11);t.exports=i.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(t){var i=t;return e&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=n(window.location.href),function(e){var r=i.isString(e)?n(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var i=r(11);t.exports=i.isStandardBrowserEnv()?{write:function(t,e,r,n,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),i.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),i.isString(n)&&s.push("path="+n),i.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,r){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,r){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,r){"use strict";var i=r(80);function n(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;t((function(t){r.reason||(r.reason=new i(t),e(r.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var t;return{token:new n((function(e){t=e})),cancel:t}},t.exports=n},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){var i;!function(n){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,h="[BigNumber Error] ",f=h+"Number primitive has more than 15 significant digits: ",c=1e14,l=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,g=1e9;function b(t){var e=0|t;return t>0||t===e?e:e-1}function v(t){for(var e,r,i=1,n=t.length,o=t[0]+"";ih^r?1:-1;for(s=(u=n.length)<(h=o.length)?u:h,a=0;ao[a]^r?1:-1;return u==h?0:u>h^r?1:-1}function w(t,e,r,i){if(tr||t!==u(t))throw Error(h+(i||"Argument")+("number"==typeof t?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function _(t){var e=t.c.length-1;return b(t.e/l)==e&&t.c[e]%2!=0}function M(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function A(t,e,r){var i,n;if(e<0){for(n=r+".";++e;n+=r);t=n+t}else if(++e>(i=t.length)){for(n=r,e-=i;--e;n+=r);t+=n}else eC?b.c=b.e=null:t.e=10;c/=10,h++);return void(h>C?b.c=b.e=null:(b.e=h,b.c=[t]))}g=String(t)}else{if(!a.test(g=String(t)))return n(b,g,p);b.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(h=g.indexOf("."))>-1&&(g=g.replace(".","")),(c=g.search(/e/i))>0?(h<0&&(h=c),h+=+g.slice(c+1),g=g.substring(0,c)):h<0&&(h=g.length)}else{if(w(e,2,j.length,"Base"),10==e)return q(b=new D(t),S+b.e+1,E);if(g=String(t),p="number"==typeof t){if(0*t!=0)return n(b,g,p,e);if(b.s=1/t<0?(g=g.slice(1),-1):1,D.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(f+t)}else b.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=j.slice(0,e),h=c=0,m=g.length;ch){h=m;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,c=-1,h=0;continue}return n(b,String(t),p,e)}p=!1,(h=(g=i(g,e,10,b.s)).indexOf("."))>-1?g=g.replace(".",""):h=g.length}for(c=0;48===g.charCodeAt(c);c++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(c,++m)){if(m-=c,p&&D.DEBUG&&m>15&&(t>d||t!==u(t)))throw Error(f+b.s*t);if((h=h-c-1)>C)b.c=b.e=null;else if(h=x)?M(u,a):A(u,a,"0");else if(o=(t=q(new D(t),e,r)).e,s=(u=v(t.c)).length,1==i||2==i&&(e<=o||o<=k)){for(;ss){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-s)>0)for(o+1==s&&(u+=".");e--;u+="0");return t.s<0&&n?"-"+u:u}function z(t,e){for(var r,i=1,n=new D(t[0]);i=10;n/=10,i++);return(r=i+r*l-1)>C?t.c=t.e=null:r=10;h/=10,n++);if((o=e-n)<0)o+=l,a=e,m=(f=g[d=0])/b[n-a-1]%10|0;else if((d=s((o+1)/l))>=g.length){if(!i)break t;for(;g.length<=d;g.push(0));f=m=0,n=1,a=(o%=l)-l+1}else{for(f=h=g[d],n=1;h>=10;h/=10,n++);m=(a=(o%=l)-l+n)<0?0:f/b[n-a-1]%10|0}if(i=i||e<0||null!=g[d+1]||(a<0?f:f%b[n-a-1]),i=r<4?(m||i)&&(0==r||r==(t.s<0?3:2)):m>5||5==m&&(4==r||i||6==r&&(o>0?a>0?f/b[n-a]:0:g[d-1])%10&1||r==(t.s<0?8:7)),e<1||!g[0])return g.length=0,i?(e-=t.e+1,g[0]=b[(l-e%l)%l],t.e=-e||0):g[0]=t.e=0,t;if(0==o?(g.length=d,h=1,d--):(g.length=d+1,h=b[l-o],g[d]=a>0?u(f/b[n-a]%b[a])*h:0),i)for(;;){if(0==d){for(o=1,a=g[0];a>=10;a/=10,o++);for(a=g[0]+=h,h=1;a>=10;a/=10,h++);o!=h&&(t.e++,g[0]==c&&(g[0]=1));break}if(g[d]+=h,g[d]!=c)break;g[d--]=0,h=1}for(o=g.length;0===g[--o];g.pop());}t.e>C?t.c=t.e=null:t.e=x?M(e,r):A(e,r,"0"),t.s<0?"-"+e:e)}return D.clone=t,D.ROUND_UP=0,D.ROUND_DOWN=1,D.ROUND_CEIL=2,D.ROUND_FLOOR=3,D.ROUND_HALF_UP=4,D.ROUND_HALF_DOWN=5,D.ROUND_HALF_EVEN=6,D.ROUND_HALF_CEIL=7,D.ROUND_HALF_FLOOR=8,D.EUCLID=9,D.config=D.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(h+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(w(r=t[e],0,g,e),S=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(w(r=t[e],0,8,e),E=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(w(r[0],-g,0,e),w(r[1],0,g,e),k=r[0],x=r[1]):(w(r,-g,g,e),k=-(x=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)w(r[0],-g,-1,e),w(r[1],1,g,e),B=r[0],C=r[1];else{if(w(r,-g,g,e),!r)throw Error(h+e+" cannot be zero: "+r);B=-(C=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(h+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw T=!r,Error(h+"crypto unavailable");T=r}else T=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(w(r=t[e],0,9,e),P=r),t.hasOwnProperty(e="POW_PRECISION")&&(w(r=t[e],0,g,e),R=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(h+e+" not an object: "+r);O=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(h+e+" invalid: "+r);j=r}}return{DECIMAL_PLACES:S,ROUNDING_MODE:E,EXPONENTIAL_AT:[k,x],RANGE:[B,C],CRYPTO:T,MODULO_MODE:P,POW_PRECISION:R,FORMAT:O,ALPHABET:j}},D.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!D.DEBUG)return!0;var e,r,i=t.c,n=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(i)){if((1===o||-1===o)&&n>=-g&&n<=g&&n===u(n)){if(0===i[0]){if(0===n&&1===i.length)return!0;break t}if((e=(n+1)%l)<1&&(e+=l),String(i[0]).length==e){for(e=0;e=c||r!==u(r))break t;if(0!==r)return!0}}}else if(null===i&&null===n&&(null===o||1===o||-1===o))return!0;throw Error(h+"Invalid BigNumber: "+t)},D.maximum=D.max=function(){return z(arguments,o.lt)},D.minimum=D.min=function(){return z(arguments,o.gt)},D.random=function(){var t=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var r,i,n,o,a,f=0,c=[],d=new D(I);if(null==e?e=S:w(e,0,g),o=s(e/l),T)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(o*=2));f>>11))>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),r[f]=i[0],r[f+1]=i[1]):(c.push(a%1e14),f+=2);f=o/2}else{if(!crypto.randomBytes)throw T=!1,Error(h+"crypto unavailable");for(r=crypto.randomBytes(o*=7);f=9e15?crypto.randomBytes(7).copy(r,f):(c.push(a%1e14),f+=7);f=o/7}if(!T)for(;f=10;a/=10,f++);fr-1&&(null==a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}return function(e,i,n,o,a){var s,u,h,f,c,l,d,p,m=e.indexOf("."),g=S,b=E;for(m>=0&&(f=R,R=0,e=e.replace(".",""),l=(p=new D(i)).pow(e.length-m),R=f,p.c=t(A(v(l.c),l.e,"0"),10,n,"0123456789"),p.e=p.c.length),h=f=(d=t(e,i,n,a?(s=j,"0123456789"):(s="0123456789",j))).length;0==d[--f];d.pop());if(!d[0])return s.charAt(0);if(m<0?--h:(l.c=d,l.e=h,l.s=o,d=(l=r(l,p,g,b,n)).c,c=l.r,h=l.e),m=d[u=h+g+1],f=n/2,c=c||u<0||null!=d[u+1],c=b<4?(null!=m||c)&&(0==b||b==(l.s<0?3:2)):m>f||m==f&&(4==b||c||6==b&&1&d[u-1]||b==(l.s<0?8:7)),u<1||!d[0])e=c?A(s.charAt(1),-g,s.charAt(0)):s.charAt(0);else{if(d.length=u,c)for(--n;++d[--u]>n;)d[u]=0,u||(++h,d=[1].concat(d));for(f=d.length;!d[--f];);for(m=0,e="";m<=f;e+=s.charAt(d[m++]));e=A(e,h,s.charAt(0))}return e}}(),r=function(){function t(t,e,r){var i,n,o,a,s=0,u=t.length,h=e%m,f=e/m|0;for(t=t.slice();u--;)s=((n=h*(o=t[u]%m)+(i=f*o+(a=t[u]/m|0)*h)%m*m+s)/r|0)+(i/m|0)+f*a,t[u]=n%r;return s&&(t=[s].concat(t)),t}function e(t,e,r,i){var n,o;if(r!=i)o=r>i?1:-1;else for(n=o=0;ne[n]?1:-1;break}return o}function r(t,e,r,i){for(var n=0;r--;)t[r]-=n,n=t[r]1;t.splice(0,1));}return function(i,n,o,a,s){var h,f,d,p,m,g,v,y,w,_,M,A,I,S,E,k,x,B=i.s==n.s?1:-1,C=i.c,T=n.c;if(!C||!C[0]||!T||!T[0])return new D(i.s&&n.s&&(C?!T||C[0]!=T[0]:T)?C&&0==C[0]||!T?0*B:B/0:NaN);for(w=(y=new D(B)).c=[],B=o+(f=i.e-n.e)+1,s||(s=c,f=b(i.e/l)-b(n.e/l),B=B/l|0),d=0;T[d]==(C[d]||0);d++);if(T[d]>(C[d]||0)&&f--,B<0)w.push(1),p=!0;else{for(S=C.length,k=T.length,d=0,B+=2,(m=u(s/(T[0]+1)))>1&&(T=t(T,m,s),C=t(C,m,s),k=T.length,S=C.length),I=k,M=(_=C.slice(0,k)).length;M=s/2&&E++;do{if(m=0,(h=e(T,_,k,M))<0){if(A=_[0],k!=M&&(A=A*s+(_[1]||0)),(m=u(A/E))>1)for(m>=s&&(m=s-1),v=(g=t(T,m,s)).length,M=_.length;1==e(g,_,v,M);)m--,r(g,k=10;B/=10,d++);q(y,o+(y.e=d+f*l-1)+1,a,p)}else y.e=f,y.r=+p;return y}}(),n=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,n=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,u){var f,c=s?a:a.replace(n,"");if(i.test(c))o.s=isNaN(c)?null:c<0?-1:1;else{if(!s&&(c=c.replace(t,(function(t,e,r){return f="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=f?t:e})),u&&(f=u,c=c.replace(e,"$1").replace(r,"0.$1")),a!=c))return new D(c,f);if(D.DEBUG)throw Error(h+"Not a"+(u?" base "+u:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var t=new D(this);return t.s<0&&(t.s=1),t},o.comparedTo=function(t,e){return y(this,new D(t,e))},o.decimalPlaces=o.dp=function(t,e){var r,i,n,o=this;if(null!=t)return w(t,0,g),null==e?e=E:w(e,0,8),q(new D(o),t+o.e+1,e);if(!(r=o.c))return null;if(i=((n=r.length-1)-b(this.e/l))*l,n=r[n])for(;n%10==0;n/=10,i--);return i<0&&(i=0),i},o.dividedBy=o.div=function(t,e){return r(this,new D(t,e),S,E)},o.dividedToIntegerBy=o.idiv=function(t,e){return r(this,new D(t,e),0,1)},o.exponentiatedBy=o.pow=function(t,e){var r,i,n,o,a,f,c,d,p=this;if((t=new D(t)).c&&!t.isInteger())throw Error(h+"Exponent not an integer: "+U(t));if(null!=e&&(e=new D(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return d=new D(Math.pow(+U(p),a?2-_(t):+U(t))),e?d.mod(e):d;if(f=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new D(NaN);(i=!f&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&_(t)?-0:0,p.e>-1&&(o=1/o),new D(f?1/o:o);R&&(o=s(R/l+2))}for(a?(r=new D(.5),f&&(t.s=1),c=_(t)):c=(n=Math.abs(+U(t)))%2,d=new D(I);;){if(c){if(!(d=d.times(p)).c)break;o?d.c.length>o&&(d.c.length=o):i&&(d=d.mod(e))}if(n){if(0===(n=u(n/2)))break;c=n%2}else if(q(t=t.times(r),t.e+1,1),t.e>14)c=_(t);else{if(0===(n=+U(t)))break;c=n%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):i&&(p=p.mod(e))}return i?d:(f&&(d=I.div(d)),e?d.mod(e):o?q(d,R,E,void 0):d)},o.integerValue=function(t){var e=new D(this);return null==t?t=E:w(t,0,8),q(e,e.e+1,t)},o.isEqualTo=o.eq=function(t,e){return 0===y(this,new D(t,e))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(t,e){return y(this,new D(t,e))>0},o.isGreaterThanOrEqualTo=o.gte=function(t,e){return 1===(e=y(this,new D(t,e)))||0===e},o.isInteger=function(){return!!this.c&&b(this.e/l)>this.c.length-2},o.isLessThan=o.lt=function(t,e){return y(this,new D(t,e))<0},o.isLessThanOrEqualTo=o.lte=function(t,e){return-1===(e=y(this,new D(t,e)))||0===e},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(t,e){var r,i,n,o,a=this,s=a.s;if(e=(t=new D(t,e)).s,!s||!e)return new D(NaN);if(s!=e)return t.s=-e,a.plus(t);var u=a.e/l,h=t.e/l,f=a.c,d=t.c;if(!u||!h){if(!f||!d)return f?(t.s=-e,t):new D(d?a:NaN);if(!f[0]||!d[0])return d[0]?(t.s=-e,t):new D(f[0]?a:3==E?-0:0)}if(u=b(u),h=b(h),f=f.slice(),s=u-h){for((o=s<0)?(s=-s,n=f):(h=u,n=d),n.reverse(),e=s;e--;n.push(0));n.reverse()}else for(i=(o=(s=f.length)<(e=d.length))?s:e,s=e=0;e0)for(;e--;f[r++]=0);for(e=c-1;i>s;){if(f[--i]=0;){for(r=0,p=A[n]%w,g=A[n]/w|0,o=n+(a=u);o>n;)r=((h=p*(h=M[--a]%w)+(s=g*h+(f=M[a]/w|0)*p)%w*w+v[o]+r)/y|0)+(s/w|0)+g*f,v[o--]=h%y;v[o]=r}return r?++i:v.splice(0,1),K(t,v,i)},o.negated=function(){var t=new D(this);return t.s=-t.s||null,t},o.plus=function(t,e){var r,i=this,n=i.s;if(e=(t=new D(t,e)).s,!n||!e)return new D(NaN);if(n!=e)return t.s=-e,i.minus(t);var o=i.e/l,a=t.e/l,s=i.c,u=t.c;if(!o||!a){if(!s||!u)return new D(n/0);if(!s[0]||!u[0])return u[0]?t:new D(s[0]?i:0*n)}if(o=b(o),a=b(a),s=s.slice(),n=o-a){for(n>0?(a=o,r=u):(n=-n,r=s),r.reverse();n--;r.push(0));r.reverse()}for((n=s.length)-(e=u.length)<0&&(r=u,u=s,s=r,e=n),n=0;e;)n=(s[--e]=s[e]+u[e]+n)/c|0,s[e]=c===s[e]?0:s[e]%c;return n&&(s=[n].concat(s),++a),K(t,s,a)},o.precision=o.sd=function(t,e){var r,i,n,o=this;if(null!=t&&t!==!!t)return w(t,1,g),null==e?e=E:w(e,0,8),q(new D(o),t,e);if(!(r=o.c))return null;if(i=(n=r.length-1)*l+1,n=r[n]){for(;n%10==0;n/=10,i--);for(n=r[0];n>=10;n/=10,i++);}return t&&o.e+1>i&&(i=o.e+1),i},o.shiftedBy=function(t){return w(t,-d,d),this.times("1e"+t)},o.squareRoot=o.sqrt=function(){var t,e,i,n,o,a=this,s=a.c,u=a.s,h=a.e,f=S+4,c=new D("0.5");if(1!==u||!s||!s[0])return new D(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+U(a)))||u==1/0?(((e=v(s)).length+h)%2==0&&(e+="0"),u=Math.sqrt(+e),h=b((h+1)/2)-(h<0||h%2),i=new D(e=u==1/0?"1e"+h:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+h)):i=new D(u+""),i.c[0])for((u=(h=i.e)+f)<3&&(u=0);;)if(o=i,i=c.times(o.plus(r(a,o,f,1))),v(o.c).slice(0,u)===(e=v(i.c)).slice(0,u)){if(i.e0&&m>0){for(o=m%s||s,c=p.substr(0,o);o0&&(c+=f+p.slice(o)),d&&(c="-"+c)}i=l?c+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):c}return(r.prefix||"")+i+(r.suffix||"")},o.toFraction=function(t){var e,i,n,o,a,s,u,f,c,d,m,g,b=this,y=b.c;if(null!=t&&(!(u=new D(t)).isInteger()&&(u.c||1!==u.s)||u.lt(I)))throw Error(h+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+U(u));if(!y)return new D(b);for(e=new D(I),c=i=new D(I),n=f=new D(I),g=v(y),a=e.e=g.length-b.e-1,e.c[0]=p[(s=a%l)<0?l+s:s],t=!t||u.comparedTo(e)>0?a>0?e:c:u,s=C,C=1/0,u=new D(g),f.c[0]=0;d=r(u,e,0,1),1!=(o=i.plus(d.times(n))).comparedTo(t);)i=n,n=o,c=f.plus(d.times(o=c)),f=o,e=u.minus(d.times(o=e)),u=o;return o=r(t.minus(i),n,0,1),f=f.plus(o.times(c)),i=i.plus(o.times(n)),f.s=c.s=b.s,m=r(c,n,a*=2,E).minus(b).abs().comparedTo(r(f,i,a,E).minus(b).abs())<1?[c,n]:[f,i],C=s,m},o.toNumber=function(){return+U(this)},o.toPrecision=function(t,e){return null!=t&&w(t,1,g),N(this,t,e,2)},o.toString=function(t){var e,r=this,n=r.s,o=r.e;return null===o?n?(e="Infinity",n<0&&(e="-"+e)):e="NaN":(null==t?e=o<=k||o>=x?M(v(r.c),o):A(v(r.c),o,"0"):10===t?e=A(v((r=q(new D(r),S+o+1,E)).c),r.e,"0"):(w(t,2,j.length,"Base"),e=i(A(v(r.c),o,"0"),10,t,n,!0)),n<0&&r.c[0]&&(e="-"+e)),e},o.valueOf=o.toJSON=function(){return U(this)},o._isBigNumber=!0,null!=e&&D.set(e),D}()).default=o.BigNumber=o,void 0===(i=function(){return o}.call(e,r,e,t))||(t.exports=i)}()},function(t,e,r){"use strict";var i=r(81).decOut,n=r(123),o=r(3),a=r(3),s=a.hexToCy,u=a.isNewVersion,h=r(45),f=r(143),c=f.genTxParam,l=f.signTx,d=r(324),p=d.Asset,m=d.Token,g=d.Witness,b=d.ZPkg,v=r(144),y=v.selectUtxos,w=v.buildTxParam,_=v.PreTxParam,M=v.utxo,A=r(123),I=A.createPkrHash,S=A.createOldPkrHash,E={account:h,Wallet:n,decOut:i,genSeed:A.genSeed,createPkrHash:I,createOldPkrHash:S,selectUtxos:y,buildTxParam:w,entropyToMnemonic:A.entropyToMnemonic,PreTxParam:_,utxo:M,genTxParam:c,signTx:l,Asset:p,Token:m,Witness:g,ZPkg:b,hexToCy:s,isNewVersion:u,utils:o};t.exports=E},function(t,e){},function(t,e,r){"use strict";var i=r(2).Buffer,n=r(189);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e,r,n,o=i.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=o,n=s,e.copy(r,n),s+=a.data.length,a=a.next;return o},t}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var t=n.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t){var i="undefined"!==typeof t&&t||"undefined"!==typeof self&&self||window,n=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(n.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(n.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(191),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(10))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var i,n=1,o={},a=!1,s=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick((function(){f(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"===typeof r.data&&0===r.data.indexOf(e)&&f(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),i=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){f(t.data)},i=function(e){t.port2.postMessage(e)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var t=s.documentElement;i=function(e){var r=s.createElement("script");r.onreadystatechange=function(){f(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():i=function(t){setTimeout(f,0,t)},u.setImmediate=function(t){"function"!==typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r>>2}function f(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(u,n),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0;c<16;++c)r[c]=t.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var l=0;l<80;++l){var d=~~(l/20),p=0|((e=i)<<5|e>>>27)+f(d,n,o,s)+u+r[l]+a[d];u=s,s=o,o=h(n),n=i,i=p}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var i=r(1),n=r(24),o=r(2).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,n.call(this,64,56)}function h(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function c(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(u,n),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=(e=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=h(i)+c(p,n,o,s)+u+r[d]+a[p]|0;u=s,s=o,o=f(n),n=i,i=m}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var i=r(1),n=r(87),o=r(24),a=r(2).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}i(u,n),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,r){var i=r(1),n=r(88),o=r(24),a=r(2).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}i(u,n),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,r){"use strict";var i=r(1),n=r(2).Buffer,o=r(16),a=n.alloc(128),s=64;function u(t,e){o.call(this,"digest"),"string"===typeof e&&(e=n.from(e)),this._alg=t,this._key=e,e.length>s?e=t(e):e.length>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,i){for(var n=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=e>>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}r[i+0]=n>>>0,r[i+1]=o>>>0},e.rip=function(t,e,r,i){for(var n=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)n<<=1,n|=e>>>s+a&1,n<<=1,n|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;r[i+0]=n>>>0,r[i+1]=o>>>0},e.pc1=function(t,e,r,i){for(var n=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)n<<=1,n|=e>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=t>>s+a&1}for(s=0;s<=24;s+=8)n<<=1,n|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;r[i+0]=n>>>0,r[i+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,r,n){for(var o=0,a=0,s=i.length>>>1,u=0;u>>i[u]&1;for(u=s;u>>i[u]&1;r[n+0]=o>>>0,r[n+1]=a>>>0},e.expand=function(t,e,r){var i=0,n=0;i=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)i<<=6,i|=t>>>o&63;for(o=11;o>=3;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[r+0]=i>>>0,e[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,i=0;i<4;i++){r<<=4,r|=n[64*i+(t>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=n[256+64*i+(e>>>18-6*i&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r>>o[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var i=t.toString(2);i.length0;i--)e+=this._buffer(t,e),r+=this._flushBuffer(n,r);return e+=this._buffer(t,e),n},n.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},n.prototype._pad=function(t,e){if(0===e)return!1;for(;e>>1];r=a.r28shl(r,s),n=a.r28shl(n,s),a.pc2(r,n,t.keys,o)}},h.prototype._update=function(t,e,r,i){var n=this._desState,o=a.readUInt32BE(t,e),s=a.readUInt32BE(t,e+4);a.ip(o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,s,n.tmp,0):this._decrypt(n,o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],a.writeUInt32BE(r,o,i),a.writeUInt32BE(r,s,i+4)},h.prototype._pad=function(t,e){for(var r=t.length-e,i=e;i>>0,o=l}a.rip(s,o,i,n)},h.prototype._decrypt=function(t,e,r,i,n){for(var o=r,s=e,u=t.keys.length-2;u>=0;u-=2){var h=t.keys[u],f=t.keys[u+1];a.expand(o,t.tmp,0),h^=t.tmp[0],f^=t.tmp[1];var c=a.substitute(h,f),l=o;o=(s^a.permute(c))>>>0,s=l}a.rip(o,s,i,n)}},function(t,e,r){"use strict";var i=r(13),n=r(1),o={};function a(t){i.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},l.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r>a%8,t._prev=o(t._prev,r?i:n);return s}function o(t,e){var r=t.length,n=-1,o=i.allocUnsafe(t.length);for(t=i.concat([t,i.from([e])]);++n>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,a=i.allocUnsafe(o),s=-1;++s>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e0;e--)i[e]=i[e]>>>1|(1&i[e-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=o(n)},a.prototype.update=function(t){var e;for(this.cache=i.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(i.concat([this.cache,n],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=a},function(t,e,r){var i=r(99),n=r(2).Buffer,o=r(56),a=r(100),s=r(16),u=r(39),h=r(40);function f(t,e,r){s.call(this),this._cache=new c,this._last=void 0,this._cipher=new u.AES(e),this._prev=n.from(r),this._mode=t,this._autopadding=!0}function c(){this.cache=n.allocUnsafe(0)}function l(t,e,r){var s=o[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof r&&(r=n.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"===typeof e&&(e=n.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===s.type?new a(s.module,e,r,!0):"auth"===s.type?new i(s.module,e,r,!0):new f(s.module,e,r)}r(1)(f,s),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return n.concat(i)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},c.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=h(e,!1,r.key,r.iv);return l(t,i.key,i.iv)},e.createDecipheriv=l},function(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},function(t,e,r){(function(t){var i=r(101),n=r(226),o=r(227);var a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(e){var r=new t(n[e].prime,"hex"),i=new t(n[e].gen,"hex");return new o(r,i)},e.createDiffieHellman=e.DiffieHellman=function e(r,n,s,u){return t.isBuffer(n)||void 0===a[n]?e(r,"binary",n,s):(n=n||"binary",u=u||"binary",s=s||new t([2]),t.isBuffer(s)||(s=new t(s,u)),"number"===typeof r?new o(i(r,s),s,!0):(t.isBuffer(r)||(r=new t(r,n)),new o(r,s,!0)))}}).call(this,r(0).Buffer)},function(t,e){},function(t,e){},function(t){t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(t,e,r){(function(e){var i=r(5),n=new(r(102)),o=new i(24),a=new i(11),s=new i(10),u=new i(3),h=new i(7),f=r(101),c=r(21);function l(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._pub=new i(t),this}function d(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._priv=new i(t),this}t.exports=m;var p={};function m(t,e,r){this.setGenerator(e),this.__prime=new i(t),this._prime=i.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=d):this._primeCode=8}function g(t,r){var i=new e(t.toArray());return r?i.toString(r):i}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!==typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),i=[r,t.toString(16)].join("_");if(i in p)return p[i];var c,l=0;if(t.isEven()||!f.simpleSieve||!f.fermatTest(t)||!n.test(t))return l+=1,l+="02"===r||"05"===r?8:4,p[i]=l,l;switch(n.test(t.shrn(1))||(l+=2),r){case"02":t.mod(o).cmp(a)&&(l+=8);break;case"05":(c=t.mod(s)).cmp(u)&&c.cmp(h)&&(l+=8);break;default:l+=4}return p[i]=l,l}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new i(c(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(t){var r=(t=(t=new i(t)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new e(r.toArray()),o=this.getPrime();if(n.length0&&r.ishrn(i),r}function c(t,r,n){var o,a;do{for(o=new e(0);8*o.length=0&&(a=e,s=r),i.negative&&(i=i.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:i,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],i=e[1],n=i.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),a=n.mul(r.a),s=o.mul(i.a),u=n.mul(r.b),h=o.mul(i.b);return{k1:t.sub(a).sub(s),k2:u.add(h).neg()}},u.prototype.pointFromX=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=i.fromRed().isOdd();return(e&&!o||!e&&o)&&(i=i.redNeg()),this.point(t,i)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,i=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o":""},h.prototype.isInfinity=function(){return this.inf},h.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),i=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},h.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i),o=n.redSqr().redISub(this.x.redAdd(this.x)),a=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},h.prototype.getX=function(){return this.x.fromRed()},h.prototype.getY=function(){return this.y.fromRed()},h.prototype.mul=function(t){return t=new n(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},h.prototype.jmulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},h.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},h.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return e},h.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),u.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),i=this.y.redMul(e).redMul(t);return this.curve.point(r,i)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(e),n=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=i.redSub(n),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=s.redSqr(),f=h.redMul(s),c=i.redMul(h),l=u.redSqr().redIAdd(f).redISub(c).redISub(c),d=u.redMul(c.redISub(l)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(l,d,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,i=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),a=r.redSub(i),s=n.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),h=u.redMul(a),f=r.redMul(u),c=s.redSqr().redIAdd(h).redISub(f).redISub(f),l=s.redMul(f.redISub(c)).redISub(n.redMul(h)),d=this.z.redMul(a);return this.curve.jpoint(c,l,d)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,r){"use strict";var i=r(5),n=r(1),o=r(41),a=r(14);function s(t){o.call(this,"mont",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(e,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(s,o),t.exports=s,s.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),i=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===i.redSqrt().redSqr().cmp(i)},n(u,o.BasePoint),s.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},s.prototype.point=function(t,e){return new u(this,t,e)},s.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),i=t.redMul(e),n=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),a=n.redMul(i),s=e.z.redMul(o.redAdd(a).redSqr()),u=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,i=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,r){"use strict";var i=r(14),n=r(5),o=r(1),a=r(41),s=i.assert;function u(t){this.twisted=1!==(0|t.a),this.mOneA=this.twisted&&-1===(0|t.a),this.extended=this.mOneA,a.call(this,"edwards",t),this.a=new n(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|t.c)}function h(t,e,r,i,o){a.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(e,16),this.y=new n(r,16),this.z=i?new n(i,16):this.curve.one,this.t=o&&new n(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,a),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,i){return this.point(t,e,r,i)},u.prototype.pointFromX=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=i.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(e&&!u||!e&&u)&&(s=s.redNeg()),this.point(t,s)},u.prototype.pointFromY=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),i=e.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===i.cmp(n)},o(h,a.BasePoint),u.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},u.prototype.point=function(t,e,r,i){return new h(this,t,e,r,i)},h.fromJSON=function(t,e){return new h(t,e[0],e[1],e[2])},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},h.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=i.redAdd(e),a=o.redSub(r),s=i.redSub(e),u=n.redMul(a),h=o.redMul(s),f=n.redMul(s),c=a.redMul(o);return this.curve.point(u,h,c,f)},h.prototype._projDbl=function(){var t,e,r,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(h=this.curve._mulA(n)).redAdd(o);if(this.zOne)t=i.redSub(n).redSub(o).redMul(a.redSub(this.curve.two)),e=a.redMul(h.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),u=a.redSub(s).redISub(s);t=i.redSub(n).redISub(o).redMul(u),e=a.redMul(h.redSub(o)),r=a.redMul(u)}}else{var h=n.redAdd(o);s=this.curve._mulC(this.z).redSqr(),u=h.redSub(s).redSub(s);t=this.curve._mulC(i.redISub(h)).redMul(u),e=this.curve._mulC(h).redMul(n.redISub(o)),r=h.redMul(u)}return this.curve.point(t,e,r)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},h.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),a=n.redSub(i),s=n.redAdd(i),u=r.redAdd(e),h=o.redMul(a),f=s.redMul(u),c=o.redMul(u),l=a.redMul(s);return this.curve.point(h,f,l,c)},h.prototype._projAdd=function(t){var e,r,i=this.z.redMul(t.z),n=i.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),u=n.redSub(s),h=n.redAdd(s),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),c=i.redMul(u).redMul(f);return this.curve.twisted?(e=i.redMul(h).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(h)):(e=i.redMul(h).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(h)),this.curve.point(c,e,r)},h.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},h.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},h.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},h.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},h.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()},h.prototype.getY=function(){return this.normalize(),this.y.fromRed()},h.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},h.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(i),0===this.x.cmp(e))return!0}},h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add},function(t,e,r){"use strict";e.sha1=r(235),e.sha224=r(236),e.sha256=r(106),e.sha384=r(237),e.sha512=r(107)},function(t,e,r){"use strict";var i=r(15),n=r(34),o=r(105),a=i.rotl32,s=i.sum32,u=i.sum32_5,h=o.ft_1,f=n.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(l,f),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;ithis.blockSize&&(t=(new this.Hash).update(t).digest()),n(t.length<=this.blockSize);for(var e=t.length;e0))return a.iaddn(1),this.keyFromPrivate(a)}},c.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(t,e,r,o){"object"===typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new i(t,16));for(var a=this.n.byteLength(),s=e.getPrivate().toArray("be",a),u=t.toArray("be",a),h=new n({hash:this.hash,entropy:s,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),c=this.n.sub(new i(1)),l=0;;l++){var d=o.k?o.k(l):new i(h.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(c)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var b=d.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new f({r:g,s:b,recoveryParam:v})}}}}}},c.prototype.verify=function(t,e,r,n){t=this._truncateToN(new i(t,16)),r=this.keyFromPublic(r,n);var o=(e=new f(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),h=u.mul(t).umod(this.n),c=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(h,r.getPublic(),c)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(h,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(t,e,r,n){u((3&r)===r,"The recovery param is more than two bits"),e=new f(e,n);var o=this.n,a=new i(t),s=e.r,h=e.s,c=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var d=e.r.invm(o),p=o.sub(a).mul(d).umod(o),m=h.mul(d).umod(o);return this.g.mulAdd(p,s,m)},c.prototype.getKeyRecoveryParam=function(t,e,r,i){if(null!==(e=new f(e,i)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(t,e,n)}catch(t){continue}if(o.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},function(t,e,r){"use strict";var i=r(61),n=r(103),o=r(13);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=n.toArray(t.entropy,t.entropyEnc||"hex"),r=n.toArray(t.nonce,t.nonceEnc||"hex"),i=n.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}t.exports=a,a.prototype._init=function(t,e,r){var i=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},a.prototype.generate=function(t,e,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof e&&(i=r,r=e,e=null),r&&(r=n.toArray(r,i||"hex"),this._update(r));for(var o=[];o.length"}},function(t,e,r){"use strict";var i=r(5),n=r(14),o=n.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new i(t.r,16),this.s=new i(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;for(var i=15&r,n=0,o=0,a=e.place;o>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=a,a.prototype._importDER=function(t,e){t=n.toArray(t,e);var r=new s;if(48!==t[r.place++])return!1;if(u(t,r)+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var o=u(t,r),a=t.slice(r.place,o+r.place);if(r.place+=o,2!==t[r.place++])return!1;var h=u(t,r);if(t.length!==h+r.place)return!1;var f=t.slice(r.place,h+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===f[0]&&128&f[1]&&(f=f.slice(1)),this.r=new i(a),this.s=new i(f),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=h(e),r=h(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var i=[2];f(i,e.length),(i=i.concat(e)).push(2),f(i,r.length);var o=i.concat(r),a=[48];return f(a,o.length),a=a.concat(o),n.encode(a,t)}},function(t,e,r){"use strict";var i=r(61),n=r(60),o=r(14),a=o.assert,s=o.parseBytes,u=r(246),h=r(247);function f(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=n[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=i.sha512}t.exports=f,f.prototype.sign=function(t,e){t=s(t);var r=this.keyFromSecret(e),i=this.hashInt(r.messagePrefix(),t),n=this.g.mul(i),o=this.encodePoint(n),a=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=i.add(a).umod(this.curve.n);return this.makeSignature({R:n,S:u,Rencoded:o})},f.prototype.verify=function(t,e,r){t=s(t),e=this.makeSignature(e);var i=this.keyFromPublic(r),n=this.hashInt(e.Rencoded(),i.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(i.pub().mul(n)).eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e=e)throw new Error("invalid sig")}t.exports=function(t,r,u,h,f){var c=o(u);if("ec"===c.type){if("ecdsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");return function(t,e,r){var i=a[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new n(i),s=r.data.subjectPrivateKey.data;return o.verify(e,t,s)}(t,r,c)}if("dsa"===c.type){if("dsa"!==h)throw new Error("wrong public key type");return function(t,e,r){var n=r.data.p,a=r.data.q,u=r.data.g,h=r.data.pub_key,f=o.signature.decode(t,"der"),c=f.s,l=f.r;s(c,a),s(l,a);var d=i.mont(n),p=c.invm(a);return 0===u.toRed(d).redPow(new i(e).mul(p).mod(a)).fromRed().mul(h.toRed(d).redPow(l.mul(p).mod(a)).fromRed()).mod(n).mod(a).cmp(l)}(t,r,c)}if("rsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");r=e.concat([f,r]);for(var l=c.modulus.byteLength(),d=[1],p=0;r.length+d.length+2r-l-2)throw new Error("message too long");var d=c.alloc(r-i-l-2),p=r-f-1,m=n(f),g=s(c.concat([h,d,c.alloc(1,1),e],p),a(m,p)),b=s(m,a(g,f));return new u(c.concat([c.alloc(1),b,g],r))}(p,e);else if(1===l)d=function(t,e,r){var i,o=e.length,a=t.modulus.byteLength();if(o>a-11)throw new Error("message too long");i=r?c.alloc(a-o-3,255):function(t){var e,r=c.allocUnsafe(t),i=0,o=n(2*t),a=0;for(;i=0)throw new Error("data too long for modulus")}return r?f(d,p):h(d,p)}},function(t,e,r){var i=r(42),n=r(113),o=r(114),a=r(5),s=r(58),u=r(30),h=r(115),f=r(2).Buffer;t.exports=function(t,e,r){var c;c=t.padding?t.padding:r?1:4;var l,d=i(t),p=d.modulus.byteLength();if(e.length>p||new a(e).cmp(d.modulus)>=0)throw new Error("decryption error");l=r?h(new a(e),d):s(e,d);var m=f.alloc(p-l.length);if(l=f.concat([m,l],p),4===c)return function(t,e){var r=t.modulus.byteLength(),i=u("sha1").update(f.alloc(0)).digest(),a=i.length;if(0!==e[0])throw new Error("decryption error");var s=e.slice(1,a+1),h=e.slice(a+1),c=o(s,n(h,a)),l=o(h,n(c,r-a-1));if(function(t,e){t=f.from(t),e=f.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));var n=-1;for(;++n=e.length){o++;break}var a=e.slice(2,n-1);("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(n)}(0,l,r);if(3===c)return l;throw new Error("unknown padding")}},function(t,e,r){"use strict";(function(t,i){function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(2),a=r(21),s=o.Buffer,u=o.kMaxLength,h=t.crypto||t.msCrypto,f=Math.pow(2,32)-1;function c(t,e){if("number"!==typeof t||t!==t)throw new TypeError("offset must be a number");if(t>f||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function l(t,e,r){if("number"!==typeof t||t!==t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>u)throw new RangeError("buffer too small")}function d(t,e,r,n){if(i.browser){var o=t.buffer,s=new Uint8Array(o,e,r);return h.getRandomValues(s),n?void i.nextTick((function(){n(null,t)})):t}if(!n)return a(r).copy(t,e),t;a(r,(function(r,i){if(r)return n(r);i.copy(t,e),n(null,t)}))}h&&h.getRandomValues||!i.browser?(e.randomFill=function(e,r,i,n){if(!s.isBuffer(e)&&!(e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof r)n=r,r=0,i=e.length;else if("function"===typeof i)n=i,i=e.length-r;else if("function"!==typeof n)throw new TypeError('"cb" argument must be a function');return c(r,e.length),l(i,r,e.length),d(e,r,i,n)},e.randomFillSync=function(e,r,i){"undefined"===typeof r&&(r=0);if(!s.isBuffer(e)&&!(e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');c(r,e.length),void 0===i&&(i=e.length-r);return l(i,r,e.length),d(e,r,i)}):(e.randomFill=n,e.randomFillSync=n)}).call(this,r(10),r(8))},function(t,e,r){var i=r(116),n=r(268);function o(t,e,r){var i=t[e]+t[r],n=t[e+1]+t[r+1];i>=4294967296&&n++,t[e]=i,t[e+1]=n}function a(t,e,r,i){var n=t[e]+r;r<0&&(n+=4294967296);var o=t[e+1]+i;n>=4294967296&&o++,t[e]=n,t[e+1]=o}function s(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function u(t,e,r,i,n,s){var u=l[n],h=l[n+1],f=l[s],d=l[s+1];o(c,t,e),a(c,t,u,h);var p=c[i]^c[t],m=c[i+1]^c[t+1];c[i]=m,c[i+1]=p,o(c,r,i),p=c[e]^c[r],m=c[e+1]^c[r+1],c[e]=p>>>24^m<<8,c[e+1]=m>>>24^p<<8,o(c,t,e),a(c,t,f,d),p=c[i]^c[t],m=c[i+1]^c[t+1],c[i]=p>>>16^m<<16,c[i+1]=m>>>16^p<<16,o(c,r,i),p=c[e]^c[r],m=c[e+1]^c[r+1],c[e]=m>>>31^p<<1,c[e+1]=p>>>31^m<<1}var h=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),f=new Uint8Array([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].map((function(t){return 2*t}))),c=new Uint32Array(32),l=new Uint32Array(32);function d(t,e){var r=0;for(r=0;r<16;r++)c[r]=t.h[r],c[r+16]=h[r];for(c[24]=c[24]^t.t,c[25]=c[25]^t.t/4294967296,e&&(c[28]=~c[28],c[29]=~c[29]),r=0;r<32;r++)l[r]=s(t.b,4*r);for(r=0;r<12;r++)u(0,8,16,24,f[16*r+0],f[16*r+1]),u(2,10,18,26,f[16*r+2],f[16*r+3]),u(4,12,20,28,f[16*r+4],f[16*r+5]),u(6,14,22,30,f[16*r+6],f[16*r+7]),u(0,10,20,30,f[16*r+8],f[16*r+9]),u(2,12,22,24,f[16*r+10],f[16*r+11]),u(4,14,16,26,f[16*r+12],f[16*r+13]),u(6,8,18,28,f[16*r+14],f[16*r+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^c[r]^c[r+16]}var p=new Uint8Array([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]);function m(t,e,r,i){p.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=t,p[0]=t,e&&(p[1]=e.length),p[2]=1,p[3]=1,r&&p.set(r,32),i&&p.set(i,48);for(var n=0;n<16;n++)this.h[n]=h[n]^s(p,4*n);e&&(g(this,e),this.c=128)}function g(t,e){for(var r=0;r=this.outlen,"out must have at least outlen bytes of space"),function(t,e){t.t+=t.c;for(;t.c<128;)t.b[t.c++]=0;d(t,!0);for(var r=0;r>2]>>8*(3&r)}(this,e),"hex"===t?function(t){for(var e="",r=0;r=y,"outlen must be at least "+y+", was given "+t),i(t<=w,"outlen must be at most "+w+", was given "+t),null!=e&&i(e.length>=_,"key must be at least "+_+", was given "+e.length),null!=e&&i(e.length<=M,"key must be at most "+M+", was given "+e.length),null!=r&&i(r.length===A,"salt must be exactly "+A+", was given "+r.length),null!=n&&i(n.length===I,"personal must be exactly "+I+", was given "+n.length)),new v(t,e,r,n)},t.exports.ready=function(t){n.ready((function(){t()}))},t.exports.WASM_SUPPORTED=n.SUPPORTED,t.exports.WASM_LOADED=!1;var y=t.exports.BYTES_MIN=16,w=t.exports.BYTES_MAX=64,_=(t.exports.BYTES=32,t.exports.KEYBYTES_MIN=16),M=t.exports.KEYBYTES_MAX=64,A=(t.exports.KEYBYTES=32,t.exports.SALTBYTES=16),I=t.exports.PERSONALBYTES=16;n.ready((function(e){e||(t.exports.WASM_LOADED=!0,v=n)}))},function(t,e,r){var i=r(116),n=r(269)(),o=64,a=[];t.exports=d;var s=t.exports.BYTES_MIN=16,u=t.exports.BYTES_MAX=64,h=(t.exports.BYTES=32,t.exports.KEYBYTES_MIN=16),f=t.exports.KEYBYTES_MAX=64,c=(t.exports.KEYBYTES=32,t.exports.SALTBYTES=16),l=t.exports.PERSONALBYTES=16;function d(t,e,r,p,m){if(!(this instanceof d))return new d(t,e,r,p,m);if(!n||!n.exports)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");t||(t=32),!0!==m&&(i(t>=s,"digestLength must be at least "+s+", was given "+t),i(t<=u,"digestLength must be at most "+u+", was given "+t),null!=e&&i(e.length>=h,"key must be at least "+h+", was given "+e.length),null!=e&&i(e.length<=f,"key must be at least "+f+", was given "+e.length),null!=r&&i(r.length===c,"salt must be exactly "+c+", was given "+r.length),null!=p&&i(p.length===l,"personal must be exactly "+l+", was given "+p.length)),a.length||(a.push(o),o+=216),this.digestLength=t,this.finalized=!1,this.pointer=a.pop(),n.memory.fill(0,0,64),n.memory[0]=this.digestLength,n.memory[1]=e?e.length:0,n.memory[2]=1,n.memory[3]=1,r&&n.memory.set(r,32),p&&n.memory.set(p,48),this.pointer+216>n.memory.length&&n.realloc(this.pointer+216),n.exports.blake2b_init(this.pointer,this.digestLength),e&&(this.update(e),n.memory.fill(0,o,o+e.length),n.memory[this.pointer+200]=128)}function p(){}function m(t){return t<16?"0"+t.toString(16):t.toString(16)}d.prototype.update=function(t){return i(!1===this.finalized,"Hash instance finalized"),i(t,"input must be TypedArray or Buffer"),o+t.length>n.memory.length&&n.realloc(o+t.length),n.memory.set(t,o),n.exports.blake2b_update(this.pointer,o,o+t.length),this},d.prototype.digest=function(t){if(i(!1===this.finalized,"Hash instance finalized"),this.finalized=!0,a.push(this.pointer),n.exports.blake2b_final(this.pointer),!t||"binary"===t)return n.memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if("hex"===t)return function(t,e,r){for(var i="",n=0;n=this.digestLength,"input must be TypedArray or Buffer");for(var e=0;et)throw new Error("bad digestLength");var f,c,l;this.digestLength=u;var d=0;if(a(h))d=(f=h).length;else if("object"===typeof h)!function(t){for(var e in t)switch(e){case"key":case"personalization":case"salt":if(!a(t[e]))throw new TypeError(e+" must be a Uint8Array or an Array of bytes");break;default:throw new Error("unexpected key in config: "+e)}}(h),d=(f=h.key)?f.length:0,l=h.salt,c=h.personalization;else if(h)throw new Error("unexpected key or config type");if(d>r)throw new Error("key is too long");if(l&&l.length!==n)throw new Error("salt must be "+n+" bytes");if(c&&c.length!==i)throw new Error("personalization must be "+i+" bytes");this.isFinished=!1,this.h=new Uint32Array(o);var p=new Uint8Array([255&u,d,1,1]);if(this.h[0]^=s(p,0),l&&(this.h[4]^=s(l,0),this.h[5]^=s(l,4)),c&&(this.h[6]^=s(c,0),this.h[7]^=s(c,4)),this.x=new Uint8Array(e),this.nx=0,this.t0=0,this.t1=0,this.f0=0,this.f1=0,d>0){for(var m=0;m>>0&&(this.t0=0,this.t1++);var e=this.h[0],r=this.h[1],i=this.h[2],n=this.h[3],a=this.h[4],s=this.h[5],u=this.h[6],h=this.h[7],f=o[0],c=o[1],l=o[2],d=o[3],p=o[4]^this.t0,m=o[5]^this.t1,g=o[6]^this.f0,b=o[7]^this.f1,v=this.x,y=255&v[0]|(255&v[1])<<8|(255&v[2])<<16|(255&v[3])<<24,w=255&v[4]|(255&v[5])<<8|(255&v[6])<<16|(255&v[7])<<24,_=255&v[8]|(255&v[9])<<8|(255&v[10])<<16|(255&v[11])<<24,M=255&v[12]|(255&v[13])<<8|(255&v[14])<<16|(255&v[15])<<24,A=255&v[16]|(255&v[17])<<8|(255&v[18])<<16|(255&v[19])<<24,I=255&v[20]|(255&v[21])<<8|(255&v[22])<<16|(255&v[23])<<24,S=255&v[24]|(255&v[25])<<8|(255&v[26])<<16|(255&v[27])<<24,E=255&v[28]|(255&v[29])<<8|(255&v[30])<<16|(255&v[31])<<24,k=255&v[32]|(255&v[33])<<8|(255&v[34])<<16|(255&v[35])<<24,x=255&v[36]|(255&v[37])<<8|(255&v[38])<<16|(255&v[39])<<24,B=255&v[40]|(255&v[41])<<8|(255&v[42])<<16|(255&v[43])<<24,C=255&v[44]|(255&v[45])<<8|(255&v[46])<<16|(255&v[47])<<24,T=255&v[48]|(255&v[49])<<8|(255&v[50])<<16|(255&v[51])<<24,P=255&v[52]|(255&v[53])<<8|(255&v[54])<<16|(255&v[55])<<24,R=255&v[56]|(255&v[57])<<8|(255&v[58])<<16|(255&v[59])<<24,O=255&v[60]|(255&v[61])<<8|(255&v[62])<<16|(255&v[63])<<24;a=(a^=f=f+(p=(p^=e=(e=e+y|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+_|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+A|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+S|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+I|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+E|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+M|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+w|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+k|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+B|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+T|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+R|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+P|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+O|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+C|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+x|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+R|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+A|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+x|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+P|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+O|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+S|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+k|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+B|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+w|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+y|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+C|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+I|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+E|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+M|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+_|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+T|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+C|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+T|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+I|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+O|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+_|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+P|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+y|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+k|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+B|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+M|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+E|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+x|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+w|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+A|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+S|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+R|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+E|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+M|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+P|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+C|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+T|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+R|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+w|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+x|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+_|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+I|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+A|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+O|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+y|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+k|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+B|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+S|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+x|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+I|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+_|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+B|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+A|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+O|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+E|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+y|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+R|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+C|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+S|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+M|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+k|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+P|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+T|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+w|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+_|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+S|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+y|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+k|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+C|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+M|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+B|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+T|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+A|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+E|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+O|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+w|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+R|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+x|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+I|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+P|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+T|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+w|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+R|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+A|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+P|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+B|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+O|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+I|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+y|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+S|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+x|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+k|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+_|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+C|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+M|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+E|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+P|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+E|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+T|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+M|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+w|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+x|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+R|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+C|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+I|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+O|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+k|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+_|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+S|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+B|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+A|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+y|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+S|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+R|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+C|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+y|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+M|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+k|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+x|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+O|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+T|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+P|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+w|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+B|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+A|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+I|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+E|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+_|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+B|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+k|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+E|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+w|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+S|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+I|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+A|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+_|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+O|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+x|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+M|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+P|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+T|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+y|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+R|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+C|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,this.h[0]^=e^f,this.h[1]^=r^c,this.h[2]^=i^l,this.h[3]^=n^d,this.h[4]^=a^p,this.h[5]^=s^m,this.h[6]^=u^g,this.h[7]^=h^b},u.prototype.update=function(t,e,r){if("string"===typeof t)throw new TypeError("update() accepts Uint8Array or an Array of bytes");if(this.isFinished)throw new Error("update() after calling digest()");if("undefined"===typeof e&&(e=0),"undefined"===typeof r&&(r=t.length-e),0===r)return this;var i,n=64-this.nx;if(r>n){for(i=0;i64;){for(i=0;i<64;i++)this.x[i]=t[e+i];this.processBlock(64),e+=64,r-=64,this.nx=0}for(i=0;i>>0&255,e[4*t+1]=r>>>8&255,e[4*t+2]=r>>>16&255,e[4*t+3]=r>>>24&255}return this.result=new Uint8Array(e.subarray(0,this.digestLength)),this.isFinished=!0,this.result},u.prototype.hexDigest=function(){for(var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],e=[],r=this.digest(),i=0;i>4&15]),e.push(t[15&r[i]]);return e.join("")},u.digestLength=t,u.blockLength=e,u.keyLength=r,u.saltLength=n,u.personalizationLength=i,u}();t.exports&&(t.exports=i)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(274),n=r(119),o=r(3),a=r(44),s=r(4),u=r(37),h=r(6);e.genOutCm=function(e,r,f,c){if(e=u.newAsset(e),r=o.toBuffer(r),f=h.newFR(f),c=a.newPKr(c),s(64==r.length),e.isValid()&&c.isValid()){var l=i.genAssetCurrency(e.tkn_currency).mult(e.tkn_value);o.default.isEmptyBuffer(e.tkt_value,32)||(l=l.add(i.genAssetTkt(e.tkt_category,e.tkt_value)));var d=t.concat([l.toBuffer(),r,c.VPK.toBuffer(),c.BASE.toBuffer(),f.toBuffer()]);return s(192==d.length,"blob.length != 192,"),i.outCmBase.mult(new n.BitBuffer(d))}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(117),n=r(118),o=r(17),a=r(3),s=r(4);e.outCmBase=new i.Group("$SROOUTCMGEN",8,192,4),e.genAssetTkt=function(e,r){e=a.toBuffer(e),r=a.toBuffer(r),s(32==e.length),s(32==r.length);var i=t.concat([e,r]),u=n.findPoint("$SROASSETTK",o.blake2b("$SROASSETTK.H",i));if(!u)throw new Error("find point error");return u},e.genAssetCurrency=function(t){t=a.toBuffer(t),s(32==t.length);var e=n.findPoint("$SROASSETCY",t);if(!e)throw new Error("find point error");return e}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(37),n=r(6),o=r(64),a=r(3),s=r(4),u=function(){function e(t,e,r){this.asset=i.newAsset(t),this.rsk=n.newFR(e),this.memo=a.toBuffer(r)}return e.prototype.isValid=function(){return!!this.asset.isValid()&&!this.rsk.isZero()},e.prototype.toBuffer=function(){return t.concat([this.asset.toBuffer(),this.rsk.toBuffer(),this.memo])},e.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},e}();function h(e){if(e instanceof u)return e;var r=a.toBuffer(e);return s(224==r.length),new u(i.newAsset(r.slice(0,128)),new n.FR(r.slice(128,160)),t.from(r.slice(160,224)))}e.Info=u,e.newInfo=h,e.encInfo=function(t,e){t=a.toBuffer(t),e=h(e),s(32==t.length);var r=e.toBuffer();return o.default(r,t)},e.decEInfo=function(t,e,r){return s(r,"flag must true"),t=a.toBuffer(t),e=a.toBuffer(e),s(224==t.length),s(32==e.length),h(o.default(t,e))}}).call(this,r(0).Buffer)},function(t,e,r){t.exports=r(277)},function(t,e,r){(function(e){var i=r(124).pbkdf2Sync,n=2147483647;function o(t,r,i,n,o){if(e.isBuffer(t)&&e.isBuffer(i))t.copy(i,n,r,r+o);else for(;o--;)i[n++]=t[r++]}t.exports=function(t,r,a,s,u,h,f){if(0===a||0!==(a&a-1))throw Error("N must be > 0 and a power of 2");if(a>n/128/s)throw Error("Parameter N is too large");if(s>n/128/u)throw Error("Parameter r is too large");var c,l=new e(256*s),d=new e(128*s*a),p=new Int32Array(16),m=new Int32Array(16),g=new e(64),b=i(t,r,1,128*u*s,"sha256");if(f){var v=u*a*2,y=0;c=function(){++y%1e3===0&&f({current:y,total:v,percent:y/v*100})}}for(var w=0;w>>32-e}function I(t){var e;for(e=0;e<16;e++)p[e]=(255&t[4*e+0])<<0,p[e]|=(255&t[4*e+1])<<8,p[e]|=(255&t[4*e+2])<<16,p[e]|=(255&t[4*e+3])<<24;for(o(p,0,m,0,16),e=8;e>0;e-=2)m[4]^=A(m[0]+m[12],7),m[8]^=A(m[4]+m[0],9),m[12]^=A(m[8]+m[4],13),m[0]^=A(m[12]+m[8],18),m[9]^=A(m[5]+m[1],7),m[13]^=A(m[9]+m[5],9),m[1]^=A(m[13]+m[9],13),m[5]^=A(m[1]+m[13],18),m[14]^=A(m[10]+m[6],7),m[2]^=A(m[14]+m[10],9),m[6]^=A(m[2]+m[14],13),m[10]^=A(m[6]+m[2],18),m[3]^=A(m[15]+m[11],7),m[7]^=A(m[3]+m[15],9),m[11]^=A(m[7]+m[3],13),m[15]^=A(m[11]+m[7],18),m[1]^=A(m[0]+m[3],7),m[2]^=A(m[1]+m[0],9),m[3]^=A(m[2]+m[1],13),m[0]^=A(m[3]+m[2],18),m[6]^=A(m[5]+m[4],7),m[7]^=A(m[6]+m[5],9),m[4]^=A(m[7]+m[6],13),m[5]^=A(m[4]+m[7],18),m[11]^=A(m[10]+m[9],7),m[8]^=A(m[11]+m[10],9),m[9]^=A(m[8]+m[11],13),m[10]^=A(m[9]+m[8],18),m[12]^=A(m[15]+m[14],7),m[13]^=A(m[12]+m[15],9),m[14]^=A(m[13]+m[12],13),m[15]^=A(m[14]+m[13],18);for(e=0;e<16;++e)p[e]=m[e]+p[e];for(e=0;e<16;e++){var r=4*e;t[r+0]=p[e]>>0&255,t[r+1]=p[e]>>8&255,t[r+2]=p[e]>>16&255,t[r+3]=p[e]>>24&255}}function S(t,e,r,i,n){for(var o=0;o0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e,r,i,n=a.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=n,i=s,a.prototype.copy.call(e,r,i),s+=o.data.length,o=o.next;return n}},{key:"consume",value:function(t,e){var r;return tn.length?n.length:t;if(o===n.length?i+=n:i+=n.slice(0,t),0===(t-=o)){o===n.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var n=r.data,o=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,o),0===(t-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(o));break}++i}return this.length-=i,e}},{key:u,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){f||(f=t),t&&l.forEach(u),o||(l.forEach(u),c(f))}))}));return e.reduce(h)}},function(t,e,r){var i=r(9),n=r(28),o=r(7).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,n.call(this,64,56)}function h(t){return t<<30|t>>>2}function f(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(u,n),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0;c<16;++c)r[c]=t.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var l=0;l<80;++l){var d=~~(l/20),p=0|((e=i)<<5|e>>>27)+f(d,n,o,s)+u+r[l]+a[d];u=s,s=o,o=h(n),n=i,i=p}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var i=r(9),n=r(28),o=r(7).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,n.call(this,64,56)}function h(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function c(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(u,n),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=(e=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=h(i)+c(p,n,o,s)+u+r[d]+a[p]|0;u=s,s=o,o=f(n),n=i,i=m}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var i=r(9),n=r(138),o=r(28),a=r(7).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}i(u,n),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,r){var i=r(9),n=r(139),o=r(28),a=r(7).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}i(u,n),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,r){var i=r(294),n=r(295);t.exports=function(t,e,r){var o=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var a=(t=t||{}).random||(t.rng||i)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var s=0;s<16;++s)e[o+s]=a[s];return e||n(a)}},function(t,e){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var i=new Uint8Array(16);t.exports=function(){return r(i),i}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0===(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}},function(t,e){for(var r=[],i=0;i<256;++i)r[i]=(i+256).toString(16).substr(1);t.exports=function(t,e){var i=e||0,n=r;return[n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]]].join("")}},function(t,e,r){"use strict";(function(t){var i=r(297);Object.defineProperty(e,"__esModule",{value:!0});var n=r(301),o=r(124),a=r(43),s=r(141),u=s._default,h="Invalid mnemonic",f="Invalid entropy",c="Invalid mnemonic checksum",l="A wordlist is required but a default could not be found.\nPlease explicitly pass a 2048 word array explicitly.";function d(t,e,r){for(;t.length32)throw new Error(f);if(m.length%4!==0)throw new Error(f);var b=t.from(m);if(g(b)!==s)throw new Error(c);return b.toString("hex")}function y(e,r){if(t.isBuffer(e)||(e=t.from(e,"hex")),!(r=r||u))throw new Error(l);if(e.length<16)throw new TypeError(f);if(e.length>32)throw new TypeError(f);if(e.length%4!==0)throw new TypeError(f);var n=(m(i(e))+g(e)).match(/(.{1,11})/g).map((function(t){var e=p(t);return r[e]}));return"\u3042\u3044\u3053\u304f\u3057\u3093"===r[0]?n.join("\u3000"):n.join(" ")}e.mnemonicToSeedSync=function(e,r){var i=t.from((e||"").normalize("NFKD"),"utf8"),n=t.from(b((r||"").normalize("NFKD")),"utf8");return o.pbkdf2Sync(i,n,2048,64,"sha512")},e.mnemonicToSeed=function(e,r){return new Promise((function(i,n){try{var a=t.from((e||"").normalize("NFKD"),"utf8"),s=t.from(b((r||"").normalize("NFKD")),"utf8");o.pbkdf2(a,s,2048,64,"sha512",(function(t,e){return t?n(t):i(e)}))}catch(u){return n(u)}}))},e.mnemonicToEntropy=v,e.entropyToMnemonic=y,e.generateMnemonic=function(t,e,r){if((t=t||128)%32!==0)throw new TypeError(f);return y((e=e||a)(t/8),r)},e.validateMnemonic=function(t,e){try{v(t,e)}catch(r){return!1}return!0},e.setDefaultWordlist=function(t){var e=s.wordlists[t];if(!e)throw new Error('Could not find wordlist for language "'+t+'"');u=e},e.getDefaultWordlist=function(){if(!u)throw new Error("No Default Wordlist set");return Object.keys(s.wordlists).filter((function(t){return"JA"!==t&&"EN"!==t&&s.wordlists[t].every((function(t,e){return t===u[e]}))}))[0]};var w=r(141);e.wordlists=w.wordlists}).call(this,r(0).Buffer)},function(t,e,r){var i=r(298),n=r(299),o=r(300);t.exports=function(t){return i(t)||n(t)||o()}},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return e},o.prototype.copy=function(t){for(var e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=o},function(t,e,r){"use strict";var i=[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];e.p1600=function(t){for(var e=0;e<24;++e){var r=t[0]^t[10]^t[20]^t[30]^t[40],n=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],s=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],c=t[8]^t[18]^t[28]^t[38]^t[48],l=t[9]^t[19]^t[29]^t[39]^t[49],d=c^(o<<1|a>>>31),p=l^(a<<1|o>>>31),m=t[0]^d,g=t[1]^p,b=t[10]^d,v=t[11]^p,y=t[20]^d,w=t[21]^p,_=t[30]^d,M=t[31]^p,A=t[40]^d,I=t[41]^p;d=r^(s<<1|u>>>31),p=n^(u<<1|s>>>31);var S=t[2]^d,E=t[3]^p,k=t[12]^d,x=t[13]^p,B=t[22]^d,C=t[23]^p,T=t[32]^d,P=t[33]^p,R=t[42]^d,O=t[43]^p;d=o^(h<<1|f>>>31),p=a^(f<<1|h>>>31);var j=t[4]^d,D=t[5]^p,N=t[14]^d,z=t[15]^p,K=t[24]^d,q=t[25]^p,U=t[34]^d,F=t[35]^p,L=t[44]^d,Q=t[45]^p;d=s^(c<<1|l>>>31),p=u^(l<<1|c>>>31);var H=t[6]^d,V=t[7]^p,Z=t[16]^d,G=t[17]^p,Y=t[26]^d,W=t[27]^p,J=t[36]^d,X=t[37]^p,$=t[46]^d,tt=t[47]^p;d=h^(r<<1|n>>>31),p=f^(n<<1|r>>>31);var et=t[8]^d,rt=t[9]^p,it=t[18]^d,nt=t[19]^p,ot=t[28]^d,at=t[29]^p,st=t[38]^d,ut=t[39]^p,ht=t[48]^d,ft=t[49]^p,ct=m,lt=g,dt=v<<4|b>>>28,pt=b<<4|v>>>28,mt=y<<3|w>>>29,gt=w<<3|y>>>29,bt=M<<9|_>>>23,vt=_<<9|M>>>23,yt=A<<18|I>>>14,wt=I<<18|A>>>14,_t=S<<1|E>>>31,Mt=E<<1|S>>>31,At=x<<12|k>>>20,It=k<<12|x>>>20,St=B<<10|C>>>22,Et=C<<10|B>>>22,kt=P<<13|T>>>19,xt=T<<13|P>>>19,Bt=R<<2|O>>>30,Ct=O<<2|R>>>30,Tt=D<<30|j>>>2,Pt=j<<30|D>>>2,Rt=N<<6|z>>>26,Ot=z<<6|N>>>26,jt=q<<11|K>>>21,Dt=K<<11|q>>>21,Nt=U<<15|F>>>17,zt=F<<15|U>>>17,Kt=Q<<29|L>>>3,qt=L<<29|Q>>>3,Ut=H<<28|V>>>4,Ft=V<<28|H>>>4,Lt=G<<23|Z>>>9,Qt=Z<<23|G>>>9,Ht=Y<<25|W>>>7,Vt=W<<25|Y>>>7,Zt=J<<21|X>>>11,Gt=X<<21|J>>>11,Yt=tt<<24|$>>>8,Wt=$<<24|tt>>>8,Jt=et<<27|rt>>>5,Xt=rt<<27|et>>>5,$t=it<<20|nt>>>12,te=nt<<20|it>>>12,ee=at<<7|ot>>>25,re=ot<<7|at>>>25,ie=st<<8|ut>>>24,ne=ut<<8|st>>>24,oe=ht<<14|ft>>>18,ae=ft<<14|ht>>>18;t[0]=ct^~At&jt,t[1]=lt^~It&Dt,t[10]=Ut^~$t&mt,t[11]=Ft^~te>,t[20]=_t^~Rt&Ht,t[21]=Mt^~Ot&Vt,t[30]=Jt^~dt&St,t[31]=Xt^~pt&Et,t[40]=Tt^~Lt&ee,t[41]=Pt^~Qt&re,t[2]=At^~jt&Zt,t[3]=It^~Dt&Gt,t[12]=$t^~mt&kt,t[13]=te^~gt&xt,t[22]=Rt^~Ht&ie,t[23]=Ot^~Vt&ne,t[32]=dt^~St&Nt,t[33]=pt^~Et&zt,t[42]=Lt^~ee&bt,t[43]=Qt^~re&vt,t[4]=jt^~Zt&oe,t[5]=Dt^~Gt&ae,t[14]=mt^~kt&Kt,t[15]=gt^~xt&qt,t[24]=Ht^~ie&yt,t[25]=Vt^~ne&wt,t[34]=St^~Nt&Yt,t[35]=Et^~zt&Wt,t[44]=ee^~bt&Bt,t[45]=re^~vt&Ct,t[6]=Zt^~oe&ct,t[7]=Gt^~ae<,t[16]=kt^~Kt&Ut,t[17]=xt^~qt&Ft,t[26]=ie^~yt&_t,t[27]=ne^~wt&Mt,t[36]=Nt^~Yt&Jt,t[37]=zt^~Wt&Xt,t[46]=bt^~Bt&Tt,t[47]=vt^~Ct&Pt,t[8]=oe^~ct&At,t[9]=ae^~lt&It,t[18]=Kt^~Ut&$t,t[19]=qt^~Ft&te,t[28]=yt^~_t&Rt,t[29]=wt^~Mt&Ot,t[38]=Yt^~Jt&dt,t[39]=Wt^~Xt&pt,t[48]=Bt^~Tt&Lt,t[49]=Ct^~Pt&Qt,t[0]^=i[2*e],t[1]^=i[2*e+1]}}},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(318).Buffer}catch(I){}function s(t,e,r){for(var i=0,n=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return i}function u(t,e,r,i){for(var n=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)n=s(t,r,r+6),this.words[i]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);r+6!==e&&(n=s(t,e,r+6),this.words[i]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,a=o%i,s=Math.min(o,o-a)+r,h=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var h=1;h>>26,c=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=l;d++){var p=h-d|0;f+=(a=(n=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}r.words[h]=0|c,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:h[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,h=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),h[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,M=0|a[4],A=8191&M,I=M>>>13,S=0|a[5],E=8191&S,k=S>>>13,x=0|a[6],B=8191&x,C=x>>>13,T=0|a[7],P=8191&T,R=T>>>13,O=0|a[8],j=8191&O,D=O>>>13,N=0|a[9],z=8191&N,K=N>>>13,q=0|s[0],U=8191&q,F=q>>>13,L=0|s[1],Q=8191&L,H=L>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],W=8191&Y,J=Y>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,it=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ut=8191&st,ht=st>>>13,ft=0|s[8],ct=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(i=Math.imul(c,U))|0)+((8191&(n=(n=Math.imul(c,F))+Math.imul(l,U)|0))<<13)|0;h=((o=Math.imul(l,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,F))+Math.imul(m,U)|0,o=Math.imul(m,F);var bt=(h+(i=i+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(l,Q)|0))<<13)|0;h=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(b,U),n=(n=Math.imul(b,F))+Math.imul(v,U)|0,o=Math.imul(v,F),i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,H)|0;var vt=(h+(i=i+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,U),n=(n=Math.imul(w,F))+Math.imul(_,U)|0,o=Math.imul(_,F),i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,H)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var yt=(h+(i=i+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,J)|0)+Math.imul(l,W)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(A,U),n=(n=Math.imul(A,F))+Math.imul(I,U)|0,o=Math.imul(I,F),i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,J)|0;var wt=(h+(i=i+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,U),n=(n=Math.imul(E,F))+Math.imul(k,U)|0,o=Math.imul(k,F),i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(b,W)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,J)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(i=i+Math.imul(c,rt)|0)|0)+((8191&(n=(n=n+Math.imul(c,it)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(B,U),n=(n=Math.imul(B,F))+Math.imul(C,U)|0,o=Math.imul(C,F),i=i+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(h+(i=i+Math.imul(c,ot)|0)|0)+((8191&(n=(n=n+Math.imul(c,at)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,at)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,U),n=(n=Math.imul(P,F))+Math.imul(R,U)|0,o=Math.imul(R,F),i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,H)|0,i=i+Math.imul(E,Z)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(b,rt)|0,n=(n=n+Math.imul(b,it)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var At=(h+(i=i+Math.imul(c,ut)|0)|0)+((8191&(n=(n=n+Math.imul(c,ht)|0)+Math.imul(l,ut)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,F))+Math.imul(D,U)|0,o=Math.imul(D,F),i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,H)|0,i=i+Math.imul(B,Z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,G)|0,i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(b,ot)|0,n=(n=n+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var It=(h+(i=i+Math.imul(c,ct)|0)|0)+((8191&(n=(n=n+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(z,U),n=(n=Math.imul(z,F))+Math.imul(K,U)|0,o=Math.imul(K,F),i=i+Math.imul(j,Q)|0,n=(n=n+Math.imul(j,H)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,H)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,i=i+Math.imul(b,ut)|0,n=(n=n+Math.imul(b,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(p,ct)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(h+(i=i+Math.imul(c,pt)|0)|0)+((8191&(n=(n=n+Math.imul(c,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(z,Q),n=(n=Math.imul(z,H))+Math.imul(K,Q)|0,o=Math.imul(K,H),i=i+Math.imul(j,Z)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,J)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,i=i+Math.imul(b,ct)|0,n=(n=n+Math.imul(b,lt)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,lt)|0;var Et=(h+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(z,Z),n=(n=Math.imul(z,G))+Math.imul(K,Z)|0,o=Math.imul(K,G),i=i+Math.imul(j,W)|0,n=(n=n+Math.imul(j,J)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,J)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,it)|0,i=i+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(A,ut)|0,n=(n=n+Math.imul(A,ht)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(w,ct)|0,n=(n=n+Math.imul(w,lt)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,lt)|0;var kt=(h+(i=i+Math.imul(b,pt)|0)|0)+((8191&(n=(n=n+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(z,W),n=(n=Math.imul(z,J))+Math.imul(K,W)|0,o=Math.imul(K,J),i=i+Math.imul(j,$)|0,n=(n=n+Math.imul(j,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,i=i+Math.imul(E,ut)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(A,ct)|0,n=(n=n+Math.imul(A,lt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,lt)|0;var xt=(h+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(z,$),n=(n=Math.imul(z,tt))+Math.imul(K,$)|0,o=Math.imul(K,tt),i=i+Math.imul(j,rt)|0,n=(n=n+Math.imul(j,it)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,i=i+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,i=i+Math.imul(E,ct)|0,n=(n=n+Math.imul(E,lt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,lt)|0;var Bt=(h+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(I,pt)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(z,rt),n=(n=Math.imul(z,it))+Math.imul(K,rt)|0,o=Math.imul(K,it),i=i+Math.imul(j,ot)|0,n=(n=n+Math.imul(j,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,i=i+Math.imul(P,ut)|0,n=(n=n+Math.imul(P,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,i=i+Math.imul(B,ct)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Ct=(h+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(z,ot),n=(n=Math.imul(z,at))+Math.imul(K,ot)|0,o=Math.imul(K,at),i=i+Math.imul(j,ut)|0,n=(n=n+Math.imul(j,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,i=i+Math.imul(P,ct)|0,n=(n=n+Math.imul(P,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Tt=(h+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(z,ut),n=(n=Math.imul(z,ht))+Math.imul(K,ut)|0,o=Math.imul(K,ht),i=i+Math.imul(j,ct)|0,n=(n=n+Math.imul(j,lt)|0)+Math.imul(D,ct)|0,o=o+Math.imul(D,lt)|0;var Pt=(h+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(z,ct),n=(n=Math.imul(z,lt))+Math.imul(K,ct)|0,o=Math.imul(K,lt);var Rt=(h+(i=i+Math.imul(j,pt)|0)|0)+((8191&(n=(n=n+Math.imul(j,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(i=Math.imul(z,pt))|0)+((8191&(n=(n=Math.imul(z,mt))+Math.imul(K,pt)|0))<<13)|0;return h=((o=Math.imul(K,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=bt,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=It,u[9]=St,u[10]=Et,u[11]=kt,u[12]=xt,u[13]=Bt,u[14]=Ct,u[15]=Tt,u[16]=Pt,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var a=0;a>>=1)n++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==f||h>=n);h--){var c=0|this.words[h];this.words[h]=f<<26-o|c>>>o,f=c&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var h=0;h=0;c--){var l=67108864*(0|i.words[n.length+c])+(0|i.words[n.length+c-1]);for(l=Math.min(l/a|0,67108863),i._ishlnsubmul(n,l,c);0!==i.negative;)l--,i.negative=0,i._ishlnsubmul(n,1,c),i.isZero()||(i.negative^=1);s&&(s.words[c]=l)}return s&&s.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var f=r.clone(),c=e.clone();!e.isZero();){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(c)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),a.isub(u)):(r.isub(e),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0===(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,r=(t-e)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},n(v,b),v.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,n),l=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var h=e.words[i],f=u-1;f>=0;f--){var c=h>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},n(A,M),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(29)(t))},function(t,e){},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(46),n=r(25),o=r(65),a=r(3),s=r(3),u=r(320),h=r(37),f=r(81),c=r(122),l=r(6),d=r(19),p=r(45),m=r(142),g=r(321),b=function(){this.hash=t.alloc(32),this.param=new u.Params},v=function(e){this.p0_ins=new Array,this.p_ins=new Array,this.c_ins=new Array,this.c_outs=new Array,this.p_outs=new Array,this.keys=new Array,this.balance_desc=new b,this.s={Desc_O:{},Desc_Z:{},Desc_Pkg:{},Desc_Cmd:{},Tx1:{Ins_P:new Array,Ins_P0:new Array,Ins_C:new Array,Outs_C:new Array,Outs_P:new Array},Bcr:a.toHex(t.alloc(32,0)),Bsign:a.toHex(t.alloc(64,0))},this.param=e};function y(e){var r=t.alloc(32,0),i=t.alloc(32,0),n=t.alloc(32,0),o=t.alloc(32,0);return e.Tkn&&(e.Tkn.Currency&&(r=e.Tkn.Currency),e.Tkn.Value&&(i=a.default.toBN(e.Tkn.Value).toArrayLike(t,"le",32))),e.Tkt&&(e.Tkt.Category&&(n=e.Tkt.Category),e.Tkt.Value&&(o=e.Tkt.Value)),new h.Asset(r,i,n,o)}function w(e){var r=[s.toBuffer(e.Ehash),s.toBuffer(e.From),M(e.Fee)];return r.push(function(e){var r=new Array;return e.Ins&&e.Ins.forEach((function(e){r.push(function(e){return m(t.concat([s.toBuffer(e.Anchor),s.toBuffer(e.Nil),s.toBuffer(e.Trace),s.toBuffer(e.AssetCM),s.toBuffer(m(e.Proof))]))}(e))})),e.Outs&&e.Outs.forEach((function(e){r.push(function(e){return m(t.concat([s.toBuffer(e.AssetCM),s.toBuffer(e.OutCM),s.toBuffer(e.EInfo),s.toBuffer(e.PKr),s.toBuffer(m(e.Proof))]))}(e))})),m(t.concat(r))}(e.Desc_Z)),r.push(function(e){var r=new Array;return e.Ins&&e.Ins.forEach((function(e){r.push(function(e){return m(t.concat([s.toBuffer(e.Root),s.toBuffer(e.Nil),s.toBuffer(e.Sign)]))}(e))})),e.Outs&&e.Outs.forEach((function(e){r.push(function(e){return m(t.concat([s.toBuffer(e.Addr),A(e.Asset),s.toBuffer(e.Memo)]))}(e))})),m(t.concat(r))}(e.Desc_O)),0r.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(s=r.slice(o,c)).length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)u=e(s),h.push(u.data),s=u.remainder;return{data:h,remainder:r.slice(c)}}(u(e));if(r)return i;if(0!==i.remainder.length)throw new Error("invalid remainder");return i.data},e.getLength=function(e){if(!e||0===e.length)return t.from([]);var r=u(e),i=r[0];if(i<=127)return r.length;if(i<=183)return i-127;if(i<=191)return i-182;if(i<=247)return i-191;var o=i-246;return o+n(r.slice(1,o).toString("hex"),16)}}).call(this,r(0).Buffer)},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(323).Buffer}catch(I){}function s(t,e,r){for(var i=0,n=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return i}function u(t,e,r,i){for(var n=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)n=s(t,r,r+6),this.words[i]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);r+6!==e&&(n=s(t,e,r+6),this.words[i]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,a=o%i,s=Math.min(o,o-a)+r,h=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var h=1;h>>26,c=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=l;d++){var p=h-d|0;f+=(a=(n=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}r.words[h]=0|c,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:h[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,h=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),h[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,M=0|a[4],A=8191&M,I=M>>>13,S=0|a[5],E=8191&S,k=S>>>13,x=0|a[6],B=8191&x,C=x>>>13,T=0|a[7],P=8191&T,R=T>>>13,O=0|a[8],j=8191&O,D=O>>>13,N=0|a[9],z=8191&N,K=N>>>13,q=0|s[0],U=8191&q,F=q>>>13,L=0|s[1],Q=8191&L,H=L>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],W=8191&Y,J=Y>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,it=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ut=8191&st,ht=st>>>13,ft=0|s[8],ct=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(i=Math.imul(c,U))|0)+((8191&(n=(n=Math.imul(c,F))+Math.imul(l,U)|0))<<13)|0;h=((o=Math.imul(l,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,F))+Math.imul(m,U)|0,o=Math.imul(m,F);var bt=(h+(i=i+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(l,Q)|0))<<13)|0;h=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(b,U),n=(n=Math.imul(b,F))+Math.imul(v,U)|0,o=Math.imul(v,F),i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,H)|0;var vt=(h+(i=i+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,U),n=(n=Math.imul(w,F))+Math.imul(_,U)|0,o=Math.imul(_,F),i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,H)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var yt=(h+(i=i+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,J)|0)+Math.imul(l,W)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(A,U),n=(n=Math.imul(A,F))+Math.imul(I,U)|0,o=Math.imul(I,F),i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,J)|0;var wt=(h+(i=i+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,U),n=(n=Math.imul(E,F))+Math.imul(k,U)|0,o=Math.imul(k,F),i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(b,W)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,J)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(i=i+Math.imul(c,rt)|0)|0)+((8191&(n=(n=n+Math.imul(c,it)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(B,U),n=(n=Math.imul(B,F))+Math.imul(C,U)|0,o=Math.imul(C,F),i=i+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(h+(i=i+Math.imul(c,ot)|0)|0)+((8191&(n=(n=n+Math.imul(c,at)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,at)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,U),n=(n=Math.imul(P,F))+Math.imul(R,U)|0,o=Math.imul(R,F),i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,H)|0,i=i+Math.imul(E,Z)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(b,rt)|0,n=(n=n+Math.imul(b,it)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var At=(h+(i=i+Math.imul(c,ut)|0)|0)+((8191&(n=(n=n+Math.imul(c,ht)|0)+Math.imul(l,ut)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,F))+Math.imul(D,U)|0,o=Math.imul(D,F),i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,H)|0,i=i+Math.imul(B,Z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,G)|0,i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(b,ot)|0,n=(n=n+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var It=(h+(i=i+Math.imul(c,ct)|0)|0)+((8191&(n=(n=n+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(z,U),n=(n=Math.imul(z,F))+Math.imul(K,U)|0,o=Math.imul(K,F),i=i+Math.imul(j,Q)|0,n=(n=n+Math.imul(j,H)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,H)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,i=i+Math.imul(b,ut)|0,n=(n=n+Math.imul(b,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(p,ct)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(h+(i=i+Math.imul(c,pt)|0)|0)+((8191&(n=(n=n+Math.imul(c,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(z,Q),n=(n=Math.imul(z,H))+Math.imul(K,Q)|0,o=Math.imul(K,H),i=i+Math.imul(j,Z)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,J)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,i=i+Math.imul(b,ct)|0,n=(n=n+Math.imul(b,lt)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,lt)|0;var Et=(h+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(z,Z),n=(n=Math.imul(z,G))+Math.imul(K,Z)|0,o=Math.imul(K,G),i=i+Math.imul(j,W)|0,n=(n=n+Math.imul(j,J)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,J)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,it)|0,i=i+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(A,ut)|0,n=(n=n+Math.imul(A,ht)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(w,ct)|0,n=(n=n+Math.imul(w,lt)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,lt)|0;var kt=(h+(i=i+Math.imul(b,pt)|0)|0)+((8191&(n=(n=n+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(z,W),n=(n=Math.imul(z,J))+Math.imul(K,W)|0,o=Math.imul(K,J),i=i+Math.imul(j,$)|0,n=(n=n+Math.imul(j,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,i=i+Math.imul(E,ut)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(A,ct)|0,n=(n=n+Math.imul(A,lt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,lt)|0;var xt=(h+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(z,$),n=(n=Math.imul(z,tt))+Math.imul(K,$)|0,o=Math.imul(K,tt),i=i+Math.imul(j,rt)|0,n=(n=n+Math.imul(j,it)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,i=i+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,i=i+Math.imul(E,ct)|0,n=(n=n+Math.imul(E,lt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,lt)|0;var Bt=(h+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(I,pt)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(z,rt),n=(n=Math.imul(z,it))+Math.imul(K,rt)|0,o=Math.imul(K,it),i=i+Math.imul(j,ot)|0,n=(n=n+Math.imul(j,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,i=i+Math.imul(P,ut)|0,n=(n=n+Math.imul(P,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,i=i+Math.imul(B,ct)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Ct=(h+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(z,ot),n=(n=Math.imul(z,at))+Math.imul(K,ot)|0,o=Math.imul(K,at),i=i+Math.imul(j,ut)|0,n=(n=n+Math.imul(j,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,i=i+Math.imul(P,ct)|0,n=(n=n+Math.imul(P,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Tt=(h+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(z,ut),n=(n=Math.imul(z,ht))+Math.imul(K,ut)|0,o=Math.imul(K,ht),i=i+Math.imul(j,ct)|0,n=(n=n+Math.imul(j,lt)|0)+Math.imul(D,ct)|0,o=o+Math.imul(D,lt)|0;var Pt=(h+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(z,ct),n=(n=Math.imul(z,lt))+Math.imul(K,ct)|0,o=Math.imul(K,lt);var Rt=(h+(i=i+Math.imul(j,pt)|0)|0)+((8191&(n=(n=n+Math.imul(j,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(i=Math.imul(z,pt))|0)+((8191&(n=(n=Math.imul(z,mt))+Math.imul(K,pt)|0))<<13)|0;return h=((o=Math.imul(K,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=bt,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=It,u[9]=St,u[10]=Et,u[11]=kt,u[12]=xt,u[13]=Bt,u[14]=Ct,u[15]=Tt,u[16]=Pt,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var a=0;a>>=1)n++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==f||h>=n);h--){var c=0|this.words[h];this.words[h]=f<<26-o|c>>>o,f=c&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var h=0;h=0;c--){var l=67108864*(0|i.words[n.length+c])+(0|i.words[n.length+c-1]);for(l=Math.min(l/a|0,67108863),i._ishlnsubmul(n,l,c);0!==i.negative;)l--,i.negative=0,i._ishlnsubmul(n,1,c),i.isZero()||(i.negative^=1);s&&(s.words[c]=l)}return s&&s.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var f=r.clone(),c=e.clone();!e.isZero();){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(c)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),a.isub(u)):(r.isub(e),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0===(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,r=(t-e)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},n(v,b),v.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,n),l=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var h=e.words[i],f=u-1;f>=0;f--){var c=h>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},n(A,M),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(29)(t))},function(t,e){},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}]); \ No newline at end of file diff --git a/docs/static/js/1.2b24d25f.chunk.worker.js b/docs/static/js/1.2b24d25f.chunk.worker.js deleted file mode 100644 index 345fbf1..0000000 --- a/docs/static/js/1.2b24d25f.chunk.worker.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},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=145)}([function(t,e,r){"use strict";(function(t){var i=r(149),n=r(150),o=r(68);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(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 i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(t).length;default:if(i)return U(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){var i=!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 C(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return B(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function b(t,e,r,i,n){if(0===t.length)return-1;if("string"===typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"===typeof e&&(e=u.from(e,i)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,i,n);if("number"===typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,i,n){var o,a=1,s=t.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function h(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(n){var f=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var c=!0,l=0;ln&&(i=n):i=n;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var a=0;a>8,n=r%256,o.push(n),o.push(i);return o}(e,t.length-r),t,r,i)}function S(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n239?4:h>223?3:h>191?2:1;if(n+c<=r)switch(c){case 1:h<128&&(f=h);break;case 2:128===(192&(o=t[n+1]))&&(u=(31&h)<<6|63&o)>127&&(f=u);break;case 3:o=t[n+1],a=t[n+2],128===(192&o)&&128===(192&a)&&(u=(15&h)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[n+1],a=t[n+2],s=t[n+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&h)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,c=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|1023&f),i.push(f),n+=c}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var r="",i=0;for(;i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,i,n){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===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),h=this.slice(i,n),f=t.slice(e,r),c=0;cn)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return M(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function x(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;ni)&&(r=i);for(var n="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,r,i,n,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}function O(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(t.length-r,2);n>>8*(i?n:1-n)}function j(t,e,r,i){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(t.length-r,4);n>>8*(i?n:3-n)&255}function D(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,i,o){return o||D(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function z(t,e,r,i,o){return o||D(t,0,r,8),n.write(t,e,r,i,52,8),r+8}u.prototype.slice=function(t,e){var r,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(n*=256);)i+=this[t+--e]*n;return i},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 i=this[t],n=1,o=0;++o=(n*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=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),n.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),n.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),n.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),n.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,i){(t=+t,e|=0,r|=0,i)||R(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+n]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||R(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||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||R(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):j(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||R(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):j(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||R(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||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||R(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):j(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||R(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):j(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--n)t[n+e]=this[n+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(n=0;n>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(o=e;o55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=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 F(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(K,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function L(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}}).call(this,r(10))},function(t,e){"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){var i=r(0),n=i.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(o(i,e),e.Buffer=a),o(n,a),a.from=function(t,e,r){if("number"===typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},a.alloc=function(t,e,r){if("number"!==typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"===typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},a.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return n(t)},a.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(19),n=r(152)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),o=r(69),a=r(154),s=r(155),u=r(157),h=r(158),f=r(164),c=r(4);function l(e){var r;if(e instanceof t)r=e;else if(g(e))r=t.from(o(e),"hex");else{if(!m(e))return e;r=n.decode(e)}return n.encode(r)}function d(t,e,r){return o(t)+new Array(e-o(t).length+1).join(r||"0")}function p(t,e,r){return new Array(e-o(t).length+1).join(r||"0")+o(t)}function m(t){return/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{80,}$/i.test(t)}function g(t){return 0==t.indexOf("0x")&&(t=t.slice(2)),t.length%2==0&&/^(-)?[0-9a-f]*$/i.test(t)}function b(t){var e="";t=(t=(t=(t=(t=a.encode(t)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r>>4).toString(16)),e.push((15&t[r]).toString(16));return"0x"+e.join("")},hexToBytes:function(e){var r=t.from(o(e),"hex");return new Uint8Array(r)},utf8ToHex:b,bs58ToHex:function(t){return"0x"+n.decode(t).toString("hex")},bytesToBase58:function(t){return n.encode(t.buffer)},padLeft:p,padRight:d,bufferToHex:function(t){return"0x"+t.toString("hex")},cyToHex:function(t){return"0x"+p(b(t.toUpperCase()),64,"0")},hexToBN:function(t){return w(o(t))},hexToCy:y,toBN:w,isNotNull:function(t){return!u(t)&&void 0!==t},toBuffer:_,bufferToBN:function(t){return new i(t,"le")},isEmptyBuffer:function(e,r){return void 0===r&&(r=32),0==e.length||0==t.alloc(r).compare(e)},bufferToBs58:function(t){return n.encode(t)},addrToString:l};e.default=M}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){function i(t,e){if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n=0;h--)if(f[h]!==c[h])return!1;for(h=f.length-1;h>=0;h--)if(u=f[h],!v(t[u],e[u],r,i))return!1;return!0}(t,e,r,a))}return r?t===e:t==e}function y(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(r){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _(t,e,r,i){var n;if("function"!==typeof e)throw new TypeError('"block" argument must be a function');"string"===typeof r&&(i=r,r=null),n=function(t){var e;try{t()}catch(r){e=r}return e}(e),i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),t&&!n&&g(n,r,"Missing expected exception"+i);var a="string"===typeof i,s=!t&&n&&!r;if((!t&&o.isError(n)&&a&&w(n,r)||s)&&g(n,r,"Got unwanted exception"+i),t&&n&&r&&!w(n,r)||!t&&n)throw n}c.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return p(m(t.actual),128)+" "+t.operator+" "+p(m(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var i=r.stack,n=d(e),o=i.indexOf("\n"+n);if(o>=0){var a=i.indexOf("\n",o+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(c.AssertionError,Error),c.fail=g,c.ok=b,c.equal=function(t,e,r){t!=e&&g(t,e,r,"==",c.equal)},c.notEqual=function(t,e,r){t==e&&g(t,e,r,"!=",c.notEqual)},c.deepEqual=function(t,e,r){v(t,e,!1)||g(t,e,r,"deepEqual",c.deepEqual)},c.deepStrictEqual=function(t,e,r){v(t,e,!0)||g(t,e,r,"deepStrictEqual",c.deepStrictEqual)},c.notDeepEqual=function(t,e,r){v(t,e,!1)&&g(t,e,r,"notDeepEqual",c.notDeepEqual)},c.notDeepStrictEqual=function t(e,r,i){v(e,r,!0)&&g(e,r,i,"notDeepStrictEqual",t)},c.strictEqual=function(t,e,r){t!==e&&g(t,e,r,"===",c.strictEqual)},c.notStrictEqual=function(t,e,r){t===e&&g(t,e,r,"!==",c.notStrictEqual)},c.throws=function(t,e,r){_(!0,t,e,r)},c.doesNotThrow=function(t,e,r){_(!1,t,e,r)},c.ifError=function(t){if(t)throw t};var M=Object.keys||function(t){var e=[];for(var r in t)a.call(t,r)&&e.push(r);return e}}).call(this,r(10))},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(224).Buffer}catch(I){}function s(t,e,r){for(var i=0,n=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return i}function u(t,e,r,i){for(var n=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)n=s(t,r,r+6),this.words[i]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);r+6!==e&&(n=s(t,e,r+6),this.words[i]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,a=o%i,s=Math.min(o,o-a)+r,h=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var h=1;h>>26,c=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=l;d++){var p=h-d|0;f+=(a=(n=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}r.words[h]=0|c,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:h[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,h=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),h[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,M=0|a[4],A=8191&M,I=M>>>13,S=0|a[5],E=8191&S,k=S>>>13,x=0|a[6],B=8191&x,C=x>>>13,T=0|a[7],P=8191&T,R=T>>>13,O=0|a[8],j=8191&O,D=O>>>13,N=0|a[9],z=8191&N,K=N>>>13,q=0|s[0],U=8191&q,F=q>>>13,L=0|s[1],Q=8191&L,H=L>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],W=8191&Y,J=Y>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,it=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ut=8191&st,ht=st>>>13,ft=0|s[8],ct=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(i=Math.imul(c,U))|0)+((8191&(n=(n=Math.imul(c,F))+Math.imul(l,U)|0))<<13)|0;h=((o=Math.imul(l,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,F))+Math.imul(m,U)|0,o=Math.imul(m,F);var bt=(h+(i=i+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(l,Q)|0))<<13)|0;h=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(b,U),n=(n=Math.imul(b,F))+Math.imul(v,U)|0,o=Math.imul(v,F),i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,H)|0;var vt=(h+(i=i+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,U),n=(n=Math.imul(w,F))+Math.imul(_,U)|0,o=Math.imul(_,F),i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,H)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var yt=(h+(i=i+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,J)|0)+Math.imul(l,W)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(A,U),n=(n=Math.imul(A,F))+Math.imul(I,U)|0,o=Math.imul(I,F),i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,J)|0;var wt=(h+(i=i+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,U),n=(n=Math.imul(E,F))+Math.imul(k,U)|0,o=Math.imul(k,F),i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(b,W)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,J)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(i=i+Math.imul(c,rt)|0)|0)+((8191&(n=(n=n+Math.imul(c,it)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(B,U),n=(n=Math.imul(B,F))+Math.imul(C,U)|0,o=Math.imul(C,F),i=i+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(h+(i=i+Math.imul(c,ot)|0)|0)+((8191&(n=(n=n+Math.imul(c,at)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,at)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,U),n=(n=Math.imul(P,F))+Math.imul(R,U)|0,o=Math.imul(R,F),i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,H)|0,i=i+Math.imul(E,Z)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(b,rt)|0,n=(n=n+Math.imul(b,it)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var At=(h+(i=i+Math.imul(c,ut)|0)|0)+((8191&(n=(n=n+Math.imul(c,ht)|0)+Math.imul(l,ut)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,F))+Math.imul(D,U)|0,o=Math.imul(D,F),i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,H)|0,i=i+Math.imul(B,Z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,G)|0,i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(b,ot)|0,n=(n=n+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var It=(h+(i=i+Math.imul(c,ct)|0)|0)+((8191&(n=(n=n+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(z,U),n=(n=Math.imul(z,F))+Math.imul(K,U)|0,o=Math.imul(K,F),i=i+Math.imul(j,Q)|0,n=(n=n+Math.imul(j,H)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,H)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,i=i+Math.imul(b,ut)|0,n=(n=n+Math.imul(b,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(p,ct)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(h+(i=i+Math.imul(c,pt)|0)|0)+((8191&(n=(n=n+Math.imul(c,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(z,Q),n=(n=Math.imul(z,H))+Math.imul(K,Q)|0,o=Math.imul(K,H),i=i+Math.imul(j,Z)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,J)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,i=i+Math.imul(b,ct)|0,n=(n=n+Math.imul(b,lt)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,lt)|0;var Et=(h+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(z,Z),n=(n=Math.imul(z,G))+Math.imul(K,Z)|0,o=Math.imul(K,G),i=i+Math.imul(j,W)|0,n=(n=n+Math.imul(j,J)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,J)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,it)|0,i=i+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(A,ut)|0,n=(n=n+Math.imul(A,ht)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(w,ct)|0,n=(n=n+Math.imul(w,lt)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,lt)|0;var kt=(h+(i=i+Math.imul(b,pt)|0)|0)+((8191&(n=(n=n+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(z,W),n=(n=Math.imul(z,J))+Math.imul(K,W)|0,o=Math.imul(K,J),i=i+Math.imul(j,$)|0,n=(n=n+Math.imul(j,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,i=i+Math.imul(E,ut)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(A,ct)|0,n=(n=n+Math.imul(A,lt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,lt)|0;var xt=(h+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(z,$),n=(n=Math.imul(z,tt))+Math.imul(K,$)|0,o=Math.imul(K,tt),i=i+Math.imul(j,rt)|0,n=(n=n+Math.imul(j,it)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,i=i+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,i=i+Math.imul(E,ct)|0,n=(n=n+Math.imul(E,lt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,lt)|0;var Bt=(h+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(I,pt)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(z,rt),n=(n=Math.imul(z,it))+Math.imul(K,rt)|0,o=Math.imul(K,it),i=i+Math.imul(j,ot)|0,n=(n=n+Math.imul(j,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,i=i+Math.imul(P,ut)|0,n=(n=n+Math.imul(P,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,i=i+Math.imul(B,ct)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Ct=(h+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(z,ot),n=(n=Math.imul(z,at))+Math.imul(K,ot)|0,o=Math.imul(K,at),i=i+Math.imul(j,ut)|0,n=(n=n+Math.imul(j,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,i=i+Math.imul(P,ct)|0,n=(n=n+Math.imul(P,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Tt=(h+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(z,ut),n=(n=Math.imul(z,ht))+Math.imul(K,ut)|0,o=Math.imul(K,ht),i=i+Math.imul(j,ct)|0,n=(n=n+Math.imul(j,lt)|0)+Math.imul(D,ct)|0,o=o+Math.imul(D,lt)|0;var Pt=(h+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(z,ct),n=(n=Math.imul(z,lt))+Math.imul(K,ct)|0,o=Math.imul(K,lt);var Rt=(h+(i=i+Math.imul(j,pt)|0)|0)+((8191&(n=(n=n+Math.imul(j,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(i=Math.imul(z,pt))|0)+((8191&(n=(n=Math.imul(z,mt))+Math.imul(K,pt)|0))<<13)|0;return h=((o=Math.imul(K,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=bt,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=It,u[9]=St,u[10]=Et,u[11]=kt,u[12]=xt,u[13]=Bt,u[14]=Ct,u[15]=Tt,u[16]=Pt,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var a=0;a>>=1)n++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==f||h>=n);h--){var c=0|this.words[h];this.words[h]=f<<26-o|c>>>o,f=c&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var h=0;h=0;c--){var l=67108864*(0|i.words[n.length+c])+(0|i.words[n.length+c-1]);for(l=Math.min(l/a|0,67108863),i._ishlnsubmul(n,l,c);0!==i.negative;)l--,i.negative=0,i._ishlnsubmul(n,1,c),i.isZero()||(i.negative^=1);s&&(s.words[c]=l)}return s&&s.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var f=r.clone(),c=e.clone();!e.isZero();){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(c)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),a.isub(u)):(r.isub(e),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0===(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,r=(t-e)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):r.strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},n(v,b),v.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,n),l=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var h=e.words[i],f=u-1;f>=0;f--){var c=h>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},n(A,M),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(29)(t))},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(19),n=r(47),o=r(3),a=r(48),s=function(){function e(t){if(t instanceof e)this.n=t.n;else if(t instanceof i){var r=t;r.red?this.n=r:this.n=r.toRed(e.red)}else this.n=new i(t,"le").toRed(e.red)}return e.toFQ=function(t){return t instanceof e?t:new e(t)},e.prototype.add=function(t){return new e(this.n.redAdd(e.toFQ(t).n))},e.prototype.mul=function(t){return new e(this.n.redMul(e.toFQ(t).n))},e.prototype.sub=function(t){return new e(this.n.redSub(e.toFQ(t).n))},e.prototype.div=function(t){return new e(this.n.redMul(e.toFQ(t).n.redInvm()))},e.prototype.squared=function(){return new e(this.n.redSqr())},e.prototype.sqrt=function(){try{var t=this.n.redSqrt();return t?new e(t):void 0}catch(t){return}},e.prototype.pow=function(t){return new e(this.n.redPow(new i(t)))},e.prototype.nega=function(){return new e(this.n.redNeg())},e.prototype.inverse=function(){return new e(this.n.redInvm())},e.prototype.isOdd=function(){return this.n.fromRed().isOdd()},e.prototype.isZero=function(){return this.n.fromRed().isZero()},e.prototype.toBuffer=function(){return this.n.fromRed().toArrayLike(t,"le",32)},e.prototype.toBN=function(){return this.n.fromRed()},e.prototype.equal=function(t){return this.n.eq(t.n)},e.prototype.toString=function(t){return this.n.fromRed().toString(t)},e.red=i.mont(n.default.FQ_MODULUS),e.ONE=new e(1),e.ZERO=new e(0),e}();e.FQ=s;var u=function(){function e(t){if(t instanceof e)this.n=t.n;else if(t instanceof i){var r=t;r.red?this.n=r:this.n=r.toRed(e.red)}else this.n="number"==typeof t?new i(t).toRed(e.red):new i(t,"le").toRed(e.red)}return e.toFR=function(t){return t instanceof e?t:new e(t)},e.prototype.add=function(t){return new e(this.n.redAdd(e.toFR(t).n))},e.prototype.mul=function(t){return new e(this.n.redMul(e.toFR(t).n))},e.prototype.sub=function(t){return new e(this.n.redSub(e.toFR(t).n))},e.prototype.div=function(t){return new e(this.n.redMul(e.toFR(t).n.redInvm()))},e.prototype.squared=function(){return new e(this.n.redSqr())},e.prototype.sqrt=function(){try{var t=this.n.redSqrt();return t?new e(t):void 0}catch(t){return}},e.prototype.pow=function(t){return new e(this.n.redPow(new i(t)))},e.prototype.nega=function(){return new e(this.n.redNeg())},e.prototype.inverse=function(){return new e(this.n.redInvm())},e.prototype.isOdd=function(){return this.n.fromRed().isOdd()},e.prototype.isZero=function(){return this.n.fromRed().isZero()},e.prototype.toBuffer=function(){return this.n.fromRed().toArrayLike(t,"le",32)},e.prototype.toBN=function(){return this.n.fromRed()},e.prototype.equal=function(t){return this.n.eq(t.n)},e.prototype.toString=function(t){return this.n.fromRed().toString(t)},e.red=i.mont(n.default.FR_MODULUS),e.ONE=new e(1),e.ZERO=new e(0),e}();function h(t){if(t instanceof u)return t;var e=o.toBuffer(t);return new u(e)}e.FR=u,e.newFR=h,e.randomFR=function(){return h(a.randomBytes(32))}}).call(this,r(0).Buffer)},function(t,e,r){var i=r(0),n=i.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(o(i,e),e.Buffer=a),a.prototype=Object.create(n.prototype),o(n,a),a.from=function(t,e,r){if("number"===typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},a.alloc=function(t,e,r){if("number"!==typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"===typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},a.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return n(t)},a.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},function(t,e){var r,i,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"===typeof setTimeout?setTimeout:o}catch(t){r=o}try{i="function"===typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var u,h=[],f=!1,c=-1;function l(){f&&u&&(f=!1,u.length?h=u.concat(h):c=-1,h.length&&d())}function d(){if(!f){var t=s(l);f=!0;for(var e=h.length;e;){for(u=h,h=[];++c1)for(var r=1;r>7&1,u=t.from(n);u[31]&=-129;var h=new i.FQ(u),f=h.mul(h),c=e.ECC_D.mul(f),l=f.sub(i.FQ.ONE).mul(c.sub(e.ECC_A).inverse()).sqrt();if(l){var d=l;return l.isOdd()!==(0!=s)&&(d=i.FQ.ZERO.sub(l)),new e(d,h)}},e.ECC_A=new i.FQ(n.default.ECC_A),e.ECC_D=new i.FQ(n.default.ECC_D),e.ZERO=new e(i.FQ.ZERO,i.FQ.ONE),e}(),u=function(){function t(t,e,r){this.x=new i.FQ(t),this.y=new i.FQ(e),this.z=new i.FQ(r)}return t.prototype.toOriPoint=function(){var t=this.z.inverse();return new s(this.x.mul(t),this.y.mul(t))},t.prototype.add=function(e){var r=this.x,n=this.y,o=this.z,a=e.x,u=e.y,h=e.z,f=r.mul(a),c=n.mul(u),l=s.ECC_D.mul(f).mul(c);if(o.equal(i.FQ.ONE)&&h.equal(i.FQ.ONE))return new t(i.FQ.ONE.sub(l).mul(r.add(n).mul(a.add(u)).sub(f).sub(c)),i.FQ.ONE.add(l).mul(c.sub(s.ECC_A.mul(f))),i.FQ.ONE.sub(l.squared()));if(h.equal(i.FQ.ONE)){var d=(m=o.squared()).sub(l),p=m.add(l);return new t(o.mul(d).mul(r.add(n).mul(a.add(u)).sub(f).sub(c)),o.mul(p).mul(c.sub(s.ECC_A.mul(f))),d.mul(p))}var m,g=o.mul(h);return d=(m=g.squared()).sub(l),p=m.add(l),new t(g.mul(d).mul(r.add(n).mul(a.add(u)).sub(f).sub(c)),g.mul(p).mul(c.sub(s.ECC_A.mul(f))),d.mul(p))},t.prototype.double=function(){var e=this.x.add(this.y).squared(),r=this.x.squared(),n=this.y.squared(),o=s.ECC_A.mul(r),a=o.add(n);if(this.z.equal(i.FQ.ONE))return new t(e.sub(r).sub(n).mul(a.sub(2)),a.mul(o.sub(n)),a.squared().sub(a.mul(2)));var u=this.z.squared(),h=a.sub(u.mul(2));return new t(e.sub(r).sub(n).mul(h),a.mul(o.sub(n)),a.mul(h))},t.prototype.mult=function(e){for(var r=e.toBN(),i=this,n=t.ZERO;!r.isZero()&&(r.testn(0)&&(n=n.add(i)),!(r=r.shrn(1)).isZero());)i=i.double();return n},t.prototype.isValid=function(){var t=this.x.mul(this.x),e=this.y.mul(this.y),r=this.z.mul(this.z),i=s.ECC_A.mul(t),n=r.mul(r),o=s.ECC_D.mul(t).mul(e),a=r.mul(i.add(e)),u=n.add(o);return!!a.equal(u)},t.prototype.isEqualTo=function(t){return!(!this.x.mul(t.z).equal(this.z.mul(t.x))||!this.y.mul(t.z).equal(this.z.mul(t.y)))},t.prototype.isZero=function(){return this.isEqualTo(s.ZERO.toPoint())},t.prototype.toBuffer=function(){return this.toOriPoint().toBuffer()},t.prototype.toHex=function(){return this.toBuffer().reverse().toString("hex")},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t.bufferTo=function(t){var e=s.bufferTo(t);return e?e.toPoint():void 0},t.ZERO=new t(new i.FQ(0),new i.FQ(1),new i.FQ(1)),t}();e.Point=u,e.newPoint=function(t){return t instanceof u?t:u.bufferTo(t)}}).call(this,r(0).Buffer)},function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},function(t,e,r){"use strict";var i=e,n=r(5),o=r(13),a=r(103);i.assert=o,i.toArray=a.toArray,i.zero2=a.zero2,i.toHex=a.toHex,i.encode=a.encode,i.getNAF=function(t,e){for(var r=[],i=1<=0;){var o;if(n.isOdd()){var a=n.andln(i-1);o=a>(i>>1)-1?(i>>1)-a:a,n.isubn(o)}else o=0;r.push(o);for(var s=0!==n.cmpn(0)&&0===n.andln(i-1)?e+1:1,u=1;u0||e.cmpn(-n)>0;){var o,a,s,u=t.andln(3)+i&3,h=e.andln(3)+n&3;if(3===u&&(u=-1),3===h&&(h=-1),0===(1&u))o=0;else o=3!==(s=t.andln(7)+i&7)&&5!==s||2!==h?u:-u;if(r[0].push(o),0===(1&h))a=0;else a=3!==(s=e.andln(7)+n&7)&&5!==s||2!==u?h:-h;r[1].push(a),2*i===o+1&&(i=1-i),2*n===a+1&&(n=1-n),t.iushrn(1),e.iushrn(1)}return r},i.cachedProperty=function(t,e,r){var i="_"+e;t.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},i.parseBytes=function(t){return"string"===typeof t?i.toArray(t,"hex"):t},i.intFromLE=function(t){return new n(t,"hex","le")}},function(t,e,r){"use strict";var i=r(13),n=r(1);function o(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=n,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),n=0;n>6|192,r[i++]=63&a|128):o(t,n)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++n)),r[i++]=a>>18|240,r[i++]=a>>12&63|128,r[i++]=a>>6&63|128,r[i++]=63&a|128):(r[i++]=a>>12|224,r[i++]=a>>6&63|128,r[i++]=63&a|128)}else for(n=0;n>>0}return a},e.split32=function(t,e){for(var r=new Array(4*t.length),i=0,n=0;i>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,i){return t+e+r+i>>>0},e.sum32_5=function(t,e,r,i,n){return t+e+r+i+n>>>0},e.sum64=function(t,e,r,i){var n=t[e],o=i+t[e+1]>>>0,a=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,i){return(e+i>>>0>>0},e.sum64_lo=function(t,e,r,i){return e+i>>>0},e.sum64_4_hi=function(t,e,r,i,n,o,a,s){var u=0,h=e;return u+=(h=h+i>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,r,i,n,o,a,s){return e+i+o+s>>>0},e.sum64_5_hi=function(t,e,r,i,n,o,a,s,u,h){var f=0,c=e;return f+=(c=c+i>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,r,i,n,o,a,s,u,h){return e+i+o+s+h>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e,r){var i=r(2).Buffer,n=r(22).Transform,o=r(23).StringDecoder;function a(t){n.call(this),this.hashMode="string"===typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(1)(a,n),a.prototype.update=function(t,e,r){"string"===typeof t&&(t=i.from(t,e));var n=this._update(t);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(n){i=n}finally{r(i)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||i.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i},t.exports=a},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(267);e.blake2b=function(e,r){var n=t.alloc(16,0);n.fill(e,0,e.length);var o=i(32,null,null,n).update(r).digest("binary");return t.from(o)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(117),n=r(270),o=r(3),a=r(4);e.accountBase=new i.Group("$SROKEYSGEN",1,256,4),e.crBase=new i.Group("SZK$ASSET$CR",1,256,4),e.rootBase=new i.Group("SZK$ROOTCM",10,128,4),e.genTknBase=function(e){e=o.toBuffer(e),a(32==e.length);var r=t.alloc(64,0);r.set(e,0);var i=n.findPoint("SZK$TKN",r);if(!i)throw new Error("find point error");return i},e.genTktBase=function(e,r){e=o.toBuffer(e),r=o.toBuffer(r),a(32==e.length),a(32==r.length);var i=t.concat([e,r]),s=n.findPoint("SZK$TKT",i);if(!s)throw new Error("find point error");return s}}).call(this,r(0).Buffer)},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(151).Buffer}catch(k){}function s(t,e,r){for(var n=0,o=Math.min(t.length,r),a=0,s=e;s=49&&h<=54?h-49+10:h>=17&&h<=22?h-17+10:h,a|=u}return i(!(240&a),"Invalid character in "+t),n}function u(t,e,r,n){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?h-49+10:h>=17?h-17+10:h,i(h>=0&&a"}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)n=s(t,r,r+6),this.words[i]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);r+6!==e&&(n=s(t,e,r+6),this.words[i]|=n<>>26-o&4194303),this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,a=o%i,s=Math.min(o,o-a)+r,h=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for?o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f:o.prototype.inspect=f;var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],f=d[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(f).toString(t);r=(p=p.idivn(f)).isZero()?m+r:c[h-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function p(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var h=1;h>>26,c=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=l;d++){var p=h-d|0;f+=(a=(n=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}r.words[h]=0|c,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,n),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,i=0,n=0,o=0;n>8&255),r>16&255),6===o?(r>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(r>=0)for(t[r--]=i;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,M=0|a[4],A=8191&M,I=M>>>13,S=0|a[5],E=8191&S,k=S>>>13,x=0|a[6],B=8191&x,C=x>>>13,T=0|a[7],P=8191&T,R=T>>>13,O=0|a[8],j=8191&O,D=O>>>13,N=0|a[9],z=8191&N,K=N>>>13,q=0|s[0],U=8191&q,F=q>>>13,L=0|s[1],Q=8191&L,H=L>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],W=8191&Y,J=Y>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,it=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ut=8191&st,ht=st>>>13,ft=0|s[8],ct=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(i=Math.imul(c,U))|0)+((8191&(n=(n=Math.imul(c,F))+Math.imul(l,U)|0))<<13)|0;h=((o=Math.imul(l,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,F))+Math.imul(m,U)|0,o=Math.imul(m,F);var bt=(h+(i=i+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(l,Q)|0))<<13)|0;h=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(b,U),n=(n=Math.imul(b,F))+Math.imul(v,U)|0,o=Math.imul(v,F),i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,H)|0;var vt=(h+(i=i+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,U),n=(n=Math.imul(w,F))+Math.imul(_,U)|0,o=Math.imul(_,F),i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,H)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var yt=(h+(i=i+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,J)|0)+Math.imul(l,W)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(A,U),n=(n=Math.imul(A,F))+Math.imul(I,U)|0,o=Math.imul(I,F),i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,J)|0;var wt=(h+(i=i+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,U),n=(n=Math.imul(E,F))+Math.imul(k,U)|0,o=Math.imul(k,F),i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(b,W)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,J)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(i=i+Math.imul(c,rt)|0)|0)+((8191&(n=(n=n+Math.imul(c,it)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(B,U),n=(n=Math.imul(B,F))+Math.imul(C,U)|0,o=Math.imul(C,F),i=i+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(h+(i=i+Math.imul(c,ot)|0)|0)+((8191&(n=(n=n+Math.imul(c,at)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,at)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,U),n=(n=Math.imul(P,F))+Math.imul(R,U)|0,o=Math.imul(R,F),i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,H)|0,i=i+Math.imul(E,Z)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(b,rt)|0,n=(n=n+Math.imul(b,it)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var At=(h+(i=i+Math.imul(c,ut)|0)|0)+((8191&(n=(n=n+Math.imul(c,ht)|0)+Math.imul(l,ut)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,F))+Math.imul(D,U)|0,o=Math.imul(D,F),i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,H)|0,i=i+Math.imul(B,Z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,G)|0,i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(b,ot)|0,n=(n=n+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var It=(h+(i=i+Math.imul(c,ct)|0)|0)+((8191&(n=(n=n+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(z,U),n=(n=Math.imul(z,F))+Math.imul(K,U)|0,o=Math.imul(K,F),i=i+Math.imul(j,Q)|0,n=(n=n+Math.imul(j,H)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,H)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,i=i+Math.imul(b,ut)|0,n=(n=n+Math.imul(b,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(p,ct)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(h+(i=i+Math.imul(c,pt)|0)|0)+((8191&(n=(n=n+Math.imul(c,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(z,Q),n=(n=Math.imul(z,H))+Math.imul(K,Q)|0,o=Math.imul(K,H),i=i+Math.imul(j,Z)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,J)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,i=i+Math.imul(b,ct)|0,n=(n=n+Math.imul(b,lt)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,lt)|0;var Et=(h+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(z,Z),n=(n=Math.imul(z,G))+Math.imul(K,Z)|0,o=Math.imul(K,G),i=i+Math.imul(j,W)|0,n=(n=n+Math.imul(j,J)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,J)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,it)|0,i=i+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(A,ut)|0,n=(n=n+Math.imul(A,ht)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(w,ct)|0,n=(n=n+Math.imul(w,lt)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,lt)|0;var kt=(h+(i=i+Math.imul(b,pt)|0)|0)+((8191&(n=(n=n+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(z,W),n=(n=Math.imul(z,J))+Math.imul(K,W)|0,o=Math.imul(K,J),i=i+Math.imul(j,$)|0,n=(n=n+Math.imul(j,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,i=i+Math.imul(E,ut)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(A,ct)|0,n=(n=n+Math.imul(A,lt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,lt)|0;var xt=(h+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(z,$),n=(n=Math.imul(z,tt))+Math.imul(K,$)|0,o=Math.imul(K,tt),i=i+Math.imul(j,rt)|0,n=(n=n+Math.imul(j,it)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,i=i+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,i=i+Math.imul(E,ct)|0,n=(n=n+Math.imul(E,lt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,lt)|0;var Bt=(h+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(I,pt)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(z,rt),n=(n=Math.imul(z,it))+Math.imul(K,rt)|0,o=Math.imul(K,it),i=i+Math.imul(j,ot)|0,n=(n=n+Math.imul(j,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,i=i+Math.imul(P,ut)|0,n=(n=n+Math.imul(P,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,i=i+Math.imul(B,ct)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Ct=(h+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(z,ot),n=(n=Math.imul(z,at))+Math.imul(K,ot)|0,o=Math.imul(K,at),i=i+Math.imul(j,ut)|0,n=(n=n+Math.imul(j,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,i=i+Math.imul(P,ct)|0,n=(n=n+Math.imul(P,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Tt=(h+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(z,ut),n=(n=Math.imul(z,ht))+Math.imul(K,ut)|0,o=Math.imul(K,ht),i=i+Math.imul(j,ct)|0,n=(n=n+Math.imul(j,lt)|0)+Math.imul(D,ct)|0,o=o+Math.imul(D,lt)|0;var Pt=(h+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(z,ct),n=(n=Math.imul(z,lt))+Math.imul(K,ct)|0,o=Math.imul(K,lt);var Rt=(h+(i=i+Math.imul(j,pt)|0)|0)+((8191&(n=(n=n+Math.imul(j,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(i=Math.imul(z,pt))|0)+((8191&(n=(n=Math.imul(z,mt))+Math.imul(K,pt)|0))<<13)|0;return h=((o=Math.imul(K,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=bt,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=It,u[9]=St,u[10]=Et,u[11]=kt,u[12]=xt,u[13]=Bt,u[14]=Ct,u[15]=Tt,u[16]=Pt,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function b(t,e,r){return g(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=p),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?p(this,t,e):r<1024?g(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i>=1;return i},v.prototype.permute=function(t,e,r,i,n,o){for(var a=0;a>>=1)n++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==f||h>=n);h--){var c=0|this.words[h];this.words[h]=f<<26-o|c>>>o,f=c&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this._strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var h=0;h=0;c--){var l=67108864*(0|i.words[n.length+c])+(0|i.words[n.length+c-1]);for(l=Math.min(l/a|0,67108863),i._ishlnsubmul(n,l,c);0!==i.negative;)l--,i.negative=0,i._ishlnsubmul(n,1,c),i.isZero()||(i.negative^=1);s&&(s.words[c]=l)}return s&&s._strip(),i._strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%t;return e?-n:n},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var f=r.clone(),c=e.clone();!e.isZero();){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(c)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),a.isub(u)):(r.isub(e),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0===(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,r=(t-e)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},n(_,w),_.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new M;else if("p192"===t)e=new A;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new I}return y[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(h(t,t.umod(this.m)._forceRed(this)),t)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,n),l=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var h=e.words[i],f=u-1;f>=0;f--){var c=h>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},n(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(29)(t))},function(t,e,r){"use strict";var i=r(38),n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var o=r(32);o.inherits=r(1);var a=r(83),s=r(51);o.inherits(c,a);for(var u=n(s.prototype),h=0;ho)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(t);if(t>0)if(t>n)for(var u=0;u>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function h(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return n>0&&(t.lastNeed=n-1),n;if(--i=0)return n>0&&(t.lastNeed=n-2),n;if(--i=0)return n>0&&(2===n?n=0:t.lastNeed=n-3),n;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){var i=r(2).Buffer;function n(t,e){this._block=i.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}n.prototype.update=function(t,e){"string"===typeof t&&(e=e||"utf8",t=i.from(t,e));for(var r=this._block,n=this._blockSize,o=t.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(12),n=r(62),o=r(18),a=r(4),s=r(3),u=r(3);function h(t){t[t.length-1]|=64}function f(e){var r=t.from(e);return r[e.length-1]&=-65,r}function c(t){return 0!=(64&t[t.length-1])}e.SetFlag=h,e.ClearFlag=f,e.IsFlagSet=c;var l=function(){function e(t,e){this.ZPK=i.newPoint(t),this.VPK=i.newPoint(e)}return e.prototype.toBuffer=function(){var e=t.alloc(64);return e.fill(this.ZPK.toBuffer(),0),e.fill(this.VPK.toBuffer(),32),h(e),e},e.prototype.toHex=function(){return"0x"+this.toBuffer().toString("hex")},e.prototype.toString=function(){return u.default.bufferToBs58(this.toBuffer())},e}();function d(t){if(t instanceof l)return t;var e=f(s.toBuffer(t));a(64==e.length);var r=i.Point.bufferTo(e.slice(0,32));if(r){var n=i.Point.bufferTo(e.slice(32));if(n)return new l(r,n)}}e.PK=l,e.newPK=d,e.tk2PK=function(t){t=n.newTK(t);var e=o.accountBase.mult(t.vsk);return new l(t.ZPK,e)},e.isPKValid=function(t){var e=s.toBuffer(t);return!!c(e)&&!!d(e)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var i={};function n(t,e,r){r||(r=Error);var n=function(t){var r,i;function n(r,i,n){return t.call(this,function(t,r,i){return"string"===typeof e?e:e(t,r,i)}(r,i,n))||this}return i=t,(r=n).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,n}(r);n.prototype.name=r.name,n.prototype.code=t,i[t]=n}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,n,a,s;if("string"===typeof e&&(n="not ",e.substr(!a||a<0?0:+a,n.length)===n)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!==typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(u," ").concat(i," ").concat(o(e,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},function(t,e,r){"use strict";(function(e){var i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var n=r(130),o=r(134);r(9)(h,n);for(var a=i(o.prototype),s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";var i=r(1),n=r(49),o=r(52),a=r(53),s=r(16);function u(t){s.call(this,"digest"),this._hash=t}i(u,s),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new n:"rmd160"===t||"ripemd160"===t?new o:new u(a(t))}},function(t,e,r){"use strict";var i,n="object"===typeof Reflect?Reflect:null,o=n&&"function"===typeof n.apply?n.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};i=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!==t};function s(){s.init.call(this)}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function h(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function f(t,e,r,i){var n,o,a,s;if("function"!==typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"===typeof a?a=o[e]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),(n=h(t))>0&&a.length>n&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function c(){for(var t=[],e=0;e0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=n[t];if(void 0===u)return!1;if("function"===typeof u)o(u,this,e);else{var h=u.length,f=m(u,h);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,n=o;break}if(n<0)return this;0===n?r.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},s.prototype.listeners=function(t){return d(this,t,!0)},s.prototype.rawListeners=function(t){return d(this,t,!1)},s.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,r){(function(t){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"===typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"===typeof t},e.isString=function(t){return"string"===typeof t},e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"===typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"===typeof t},e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=t.isBuffer}).call(this,r(0).Buffer)},function(t,e,r){(function(e){t.exports=function(t,r){for(var i=Math.min(t.length,r.length),n=new e(i),o=0;o=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=i.join32(t,0,t.length-r,this.endian);for(var n=0;n>>24&255,i[n++]=t>>>16&255,i[n++]=t>>>8&255,i[n++]=255&t}else for(i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n++]=t>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,o=8;o>>24]^f[p>>>16&255]^c[m>>>8&255]^l[255&g]^e[b++],a=h[p>>>24]^f[m>>>16&255]^c[g>>>8&255]^l[255&d]^e[b++],s=h[m>>>24]^f[g>>>16&255]^c[d>>>8&255]^l[255&p]^e[b++],u=h[g>>>24]^f[d>>>16&255]^c[p>>>8&255]^l[255&m]^e[b++],d=o,p=a,m=s,g=u;return o=(i[d>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&g])^e[b++],a=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[g>>>8&255]<<8|i[255&d])^e[b++],s=(i[m>>>24]<<24|i[g>>>16&255]<<16|i[d>>>8&255]<<8|i[255&p])^e[b++],u=(i[g>>>24]<<24|i[d>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^e[b++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var h=s^s<<1^s<<2^s<<3^s<<4;h=h>>>8^255&h^99,r[a]=h,i[h]=a;var f=t[a],c=t[f],l=t[c],d=257*t[h]^16843008*h;n[0][a]=d<<24|d>>>8,n[1][a]=d<<16|d>>>16,n[2][a]=d<<8|d>>>24,n[3][a]=d,d=16843009*l^65537*c^257*f^16843008*a,o[0][h]=d<<24|d>>>8,o[1][h]=d<<16|d>>>16,o[2][h]=d<<8|d>>>24,o[3][h]=d,0===a?a=s=1:(a=f^t[t[t[l^f]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}}();function h(t){this._key=n(t),this._reset()}h.blockSize=16,h.keySize=32,h.prototype.blockSize=h.blockSize,h.prototype.keySize=h.keySize,h.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=4*(r+1),n=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e===4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),n[o]=n[o-e]^a}for(var h=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=h},h.prototype.encryptBlockRaw=function(t){return a(t=n(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},h.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=i.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},h.prototype.decryptBlock=function(t){var e=(t=n(t))[1];t[1]=t[3],t[3]=e;var r=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=i.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},h.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=h},function(t,e,r){var i=r(2).Buffer,n=r(49);t.exports=function(t,e,r,o){if(i.isBuffer(t)||(t=i.from(t,"binary")),e&&(i.isBuffer(e)||(e=i.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=i.alloc(a),u=i.alloc(o||0),h=i.alloc(0);a>0||o>0;){var f=new n;f.update(h),f.update(t),e&&f.update(e),h=f.digest();var c=0;if(a>0){var l=s.length-a;c=Math.min(a,h.length),h.copy(s,l,0,c),a-=c}if(c0){var d=u.length-o,p=Math.min(o,h.length-c);h.copy(u,d,c,c+p),o-=p}}return h.fill(0),{key:s,iv:u}}},function(t,e,r){"use strict";var i=r(5),n=r(14),o=n.getNAF,a=n.getJSF,s=n.assert;function u(t,e){this.type=t,this.p=new i(e.p,16),this.red=e.prime?i.red(e.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=e.n&&new i(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function h(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var r=t._getDoubles(),i=o(e,1),n=(1<=u;e--)h=(h<<1)+i[e];a.push(h)}for(var f=this.jpoint(null,null,null),c=this.jpoint(null,null,null),l=n;l>0;l--){for(u=0;u=0;h--){for(e=0;h>=0&&0===a[h];h--)e++;if(h>=0&&e++,u=u.dblp(e),h<0)break;var f=a[h];s(0!==f),u="affine"===t.type?f>0?u.mixedAdd(n[f-1>>1]):u.mixedAdd(n[-f-1>>1].neg()):f>0?u.add(n[f-1>>1]):u.add(n[-f-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,i,n){for(var s=this._wnafT1,u=this._wnafT2,h=this._wnafT3,f=0,c=0;c=1;c-=2){var d=c-1,p=c;if(1===s[d]&&1===s[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],b=a(r[d],r[p]);f=Math.max(b[0].length,f),h[d]=new Array(f),h[p]=new Array(f);for(var v=0;v=0;c--){for(var A=0;c>=0;){var I=!0;for(v=0;v=0&&A++,_=_.dblp(A),c<0)break;for(v=0;v0?S=u[v][E-1>>1]:E<0&&(S=u[v][-E-1>>1].neg()),_="affine"===S.type?_.mixedAdd(S):_.add(S))}}for(c=0;c=Math.ceil((t.bitLength()+1)/e.step)},h.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;no)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(t);if(t>0)if(t>n)for(var u=0;u>>32-e}function h(t,e,r,i,n,o,a){return u(t+(e&r|~e&i)+n+o|0,a)+e|0}function f(t,e,r,i,n,o,a){return u(t+(e&i|r&~i)+n+o|0,a)+e|0}function c(t,e,r,i,n,o,a){return u(t+(e^r^i)+n+o|0,a)+e|0}function l(t,e,r,i,n,o,a){return u(t+(r^(e|~i))+n+o|0,a)+e|0}i(s,n),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,i=this._b,n=this._c,o=this._d;r=h(r,i,n,o,t[0],3614090360,7),o=h(o,r,i,n,t[1],3905402710,12),n=h(n,o,r,i,t[2],606105819,17),i=h(i,n,o,r,t[3],3250441966,22),r=h(r,i,n,o,t[4],4118548399,7),o=h(o,r,i,n,t[5],1200080426,12),n=h(n,o,r,i,t[6],2821735955,17),i=h(i,n,o,r,t[7],4249261313,22),r=h(r,i,n,o,t[8],1770035416,7),o=h(o,r,i,n,t[9],2336552879,12),n=h(n,o,r,i,t[10],4294925233,17),i=h(i,n,o,r,t[11],2304563134,22),r=h(r,i,n,o,t[12],1804603682,7),o=h(o,r,i,n,t[13],4254626195,12),n=h(n,o,r,i,t[14],2792965006,17),r=f(r,i=h(i,n,o,r,t[15],1236535329,22),n,o,t[1],4129170786,5),o=f(o,r,i,n,t[6],3225465664,9),n=f(n,o,r,i,t[11],643717713,14),i=f(i,n,o,r,t[0],3921069994,20),r=f(r,i,n,o,t[5],3593408605,5),o=f(o,r,i,n,t[10],38016083,9),n=f(n,o,r,i,t[15],3634488961,14),i=f(i,n,o,r,t[4],3889429448,20),r=f(r,i,n,o,t[9],568446438,5),o=f(o,r,i,n,t[14],3275163606,9),n=f(n,o,r,i,t[3],4107603335,14),i=f(i,n,o,r,t[8],1163531501,20),r=f(r,i,n,o,t[13],2850285829,5),o=f(o,r,i,n,t[2],4243563512,9),n=f(n,o,r,i,t[7],1735328473,14),r=c(r,i=f(i,n,o,r,t[12],2368359562,20),n,o,t[5],4294588738,4),o=c(o,r,i,n,t[8],2272392833,11),n=c(n,o,r,i,t[11],1839030562,16),i=c(i,n,o,r,t[14],4259657740,23),r=c(r,i,n,o,t[1],2763975236,4),o=c(o,r,i,n,t[4],1272893353,11),n=c(n,o,r,i,t[7],4139469664,16),i=c(i,n,o,r,t[10],3200236656,23),r=c(r,i,n,o,t[13],681279174,4),o=c(o,r,i,n,t[0],3936430074,11),n=c(n,o,r,i,t[3],3572445317,16),i=c(i,n,o,r,t[6],76029189,23),r=c(r,i,n,o,t[9],3654602809,4),o=c(o,r,i,n,t[12],3873151461,11),n=c(n,o,r,i,t[15],530742520,16),r=l(r,i=c(i,n,o,r,t[2],3299628645,23),n,o,t[0],4096336452,6),o=l(o,r,i,n,t[7],1126891415,10),n=l(n,o,r,i,t[14],2878612391,15),i=l(i,n,o,r,t[5],4237533241,21),r=l(r,i,n,o,t[12],1700485571,6),o=l(o,r,i,n,t[3],2399980690,10),n=l(n,o,r,i,t[10],4293915773,15),i=l(i,n,o,r,t[1],2240044497,21),r=l(r,i,n,o,t[8],1873313359,6),o=l(o,r,i,n,t[15],4264355552,10),n=l(n,o,r,i,t[6],2734768916,15),i=l(i,n,o,r,t[13],1309151649,21),r=l(r,i,n,o,t[4],4149444226,6),o=l(o,r,i,n,t[11],3174756917,10),n=l(n,o,r,i,t[2],718787259,15),i=l(i,n,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},function(t,e,r){(e=t.exports=r(83)).Stream=e,e.Readable=e,e.Writable=r(51),e.Duplex=r(20),e.Transform=r(86),e.PassThrough=r(194)},function(t,e,r){"use strict";(function(e,i,n){var o=r(38);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var s,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?i:o.nextTick;v.WritableState=b;var h=r(32);h.inherits=r(1);var f={deprecate:r(192)},c=r(84),l=r(2).Buffer,d=n.Uint8Array||function(){};var p,m=r(85);function g(){}function b(t,e){s=s||r(20),t=t||{};var i=e instanceof s;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,h=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(h||0===h)?h:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,n){--e.pendingcb,r?(o.nextTick(n,i),o.nextTick(I,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),I(t,e))}(t,r,i,e,n);else{var a=M(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(t,r),i?u(w,t,r,a,n):w(t,r,a,n)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function v(t){if(s=s||r(20),!p.call(v,this)&&!(this instanceof s))return new v(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),c.call(this)}function y(t,e,r,i,n,o,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function w(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),I(t,e)}function _(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),o=e.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)n[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;n.allBuffers=u,y(t,e,!0,e.length,n,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var h=r.chunk,f=r.encoding,c=r.callback;if(y(t,e,!1,e.objectMode?1:h.length,h,f,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function M(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),I(t,e)}))}function I(t,e){var r=M(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(A,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}h.inherits(v,c),b.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(b.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===v&&(t&&t._writableState instanceof b)}})):p=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,r){var i,n=this._writableState,a=!1,s=!n.objectMode&&(i=t,l.isBuffer(i)||i instanceof d);return s&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),"function"===typeof e&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),"function"!==typeof r&&(r=g),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(s||function(t,e,r,i){var n=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"===typeof r||void 0===r||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(i,a),n=!1),n}(this,n,t,r))&&(n.pendingcb++,a=function(t,e,r,i,n,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=l.from(e,r));return e}(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var s=e.objectMode?1:i.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,r){var i=this._writableState;"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,e,r){e.ending=!0,I(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=m.destroy,v.prototype._undestroy=m.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(8),r(190).setImmediate,r(10))},function(t,e,r){"use strict";var i=r(0).Buffer,n=r(1),o=r(82),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],h=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],c=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<>>32-e}function m(t,e,r,i,n,o,a,s){return p(t+(e^r^i)+o+a|0,s)+n|0}function g(t,e,r,i,n,o,a,s){return p(t+(e&r|~e&i)+o+a|0,s)+n|0}function b(t,e,r,i,n,o,a,s){return p(t+((e|~r)^i)+o+a|0,s)+n|0}function v(t,e,r,i,n,o,a,s){return p(t+(e&i|r&~i)+o+a|0,s)+n|0}function y(t,e,r,i,n,o,a,s){return p(t+(e^(r|~i))+o+a|0,s)+n|0}n(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,A=0|this._d,I=0|this._e,S=0;S<80;S+=1){var E,k;S<16?(E=m(r,i,n,o,d,t[s[S]],c[0],h[S]),k=y(w,_,M,A,I,t[u[S]],l[0],f[S])):S<32?(E=g(r,i,n,o,d,t[s[S]],c[1],h[S]),k=v(w,_,M,A,I,t[u[S]],l[1],f[S])):S<48?(E=b(r,i,n,o,d,t[s[S]],c[2],h[S]),k=b(w,_,M,A,I,t[u[S]],l[2],f[S])):S<64?(E=v(r,i,n,o,d,t[s[S]],c[3],h[S]),k=g(w,_,M,A,I,t[u[S]],l[3],f[S])):(E=y(r,i,n,o,d,t[s[S]],c[4],h[S]),k=m(w,_,M,A,I,t[u[S]],l[4],f[S])),r=d,d=o,o=p(n,10),n=i,i=E,w=I,I=A,A=p(M,10),M=_,_=k}var x=this._b+n+A|0;this._b=this._c+o+I|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+i+M|0,this._a=x},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=i.alloc?i.alloc(20):new i(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(199),e.sha1=r(200),e.sha224=r(201),e.sha256=r(87),e.sha384=r(202),e.sha512=r(88)},function(t,e,r){"use strict";e.utils=r(208),e.Cipher=r(209),e.DES=r(210),e.CBC=r(211),e.EDE=r(212)},function(t,e,r){var i=r(213),n=r(221),o=r(98);e.createCipher=e.Cipher=i.createCipher,e.createCipheriv=e.Cipheriv=i.createCipheriv,e.createDecipher=e.Decipher=n.createDecipher,e.createDecipheriv=e.Decipheriv=n.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,r){var i={ECB:r(214),CBC:r(215),CFB:r(216),CFB8:r(217),CFB1:r(218),OFB:r(219),CTR:r(96),GCM:r(96)},n=r(98);for(var o in n)n[o].module=i[n[o].mode];t.exports=n},function(t,e,r){var i;function n(t){this.rand=t}if(t.exports=function(t){return i||(i=new n(null)),i.generate(t)},t.exports.Rand=n,n.prototype.generate=function(t){return this._rand(t)},n.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new i(n(e));return r}t.exports=o,o.getr=a}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var i=e;i.version=r(230).version,i.utils=r(14),i.rand=r(57),i.curve=r(104),i.curves=r(60),i.ec=r(241),i.eddsa=r(245)},function(t,e,r){"use strict";var i,n=e,o=r(61),a=r(104),s=r(14).assert;function u(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function h(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=u,h("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),h("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),h("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=r(240)}catch(f){i=void 0}h("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},function(t,e,r){var i=e;i.utils=r(15),i.common=r(34),i.sha=r(234),i.ripemd=r(238),i.hmac=r(239),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(17),n=r(6),o=r(12),a=r(18),s=r(3),u=r(4),h=r(25),f=function(){function e(t,e){this.zsk=n.newFR(t),this.vsk=n.newFR(e)}return e.prototype.isValid=function(){return!this.zsk.isZero()&&!this.vsk.isZero()},e.prototype.toBuffer=function(){var e=t.alloc(64);return e.fill(this.zsk.toBuffer(),0),e.fill(this.vsk.toBuffer(),32),h.SetFlag(e),e},e.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},e}();function c(t){if(t instanceof f)return t;var e=s.toBuffer(t);return 64>>=8,t[e+1]=r,r>>>=8,t[e+2]=r,r>>>=8,t[e+3]=r},t.ROTATE=function(t,e){return t<>>32-e},t}(),i=t.alloc(16,0);i.fill(0),e.default=function(e,n){var o=new r(n,i,0),a=t.alloc(e.length);return o.encrypt(a,e),a}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(12),n=r(6),o=r(18),a=r(17),s=r(120),u=r(63),h=r(44),f=r(3),c=r(4),l=r(66);e.fetchKey=function(e,r){e=l.newTK(e),r=t.from(f.toBuffer(r)),c(32==r.length),64&r[31]&&(r[31]&=-65);var n=i.newPoint(r);if(n){var o=n.mult(e.vsk);return a.blake2b("CZERO.KEYS.KDF",o.toBuffer())}},e.genPKrKey=function(t,e){t=h.newPKr(t),e=n.newFR(e);var r=t.ZPK.mult(e),i=t.VPK.mult(e),o=r.toBuffer(),s=a.blake2b("CZERO.KEYS.KDF",i.toBuffer());return o[31]|=64,{key:s,rpk:o}},e.signByPKr=function(t,e,r){if(e=f.toBuffer(e),t=l.newSK(t),r=h.newPKr(r),c(32==e.length),e&&0!=e.length&&t.isValid()&&r.isValid()){var i=r.BASE.add(o.accountBase.points.get(0));return u.sign(e,t.vsk.mul(t.zsk),i)}},e.verifyByPKr=function(t,e,r){if(t=f.toBuffer(t),e=f.toBuffer(e),r=h.newPKr(r),c(32==t.length),!t||0==t.length||!e||0==e.length||!r.isValid())return!1;var i=r.BASE.add(o.accountBase.points.get(0));return u.verify(t,e,r.VPK,i)},e.genNil=function(t,e){if(t=l.newSK(t),e=i.newPoint(e),t.isValid()&&e.isValid())return e.mult(t.vsk.mul(t.zsk))},e.signNil=function(t,e,r,n){if(t=f.toBuffer(t),e=l.newSK(e),r=h.newPKr(r),n=i.newPoint(n),c(32==t.length),t&&0!=t.length&&e.isValid()&&r.isValid()&&n.isValid()){var a=r.BASE.add(o.accountBase.points.get(0));return s.sign(t,e.vsk.mul(e.zsk),a,n)}},e.verifyNil=function(t,e,r,n,a){if(t=f.toBuffer(t),e=f.toBuffer(e),r=i.newPoint(r),n=h.newPKr(n),a=i.newPoint(a),c(32==t.length),c(96==e.length),!(t&&0!=t.length&&e&&0!=e.length&&n.isValid()&&a.isValid()))return!1;var u=n.BASE.add(o.accountBase.points.get(0));return s.verify(t,e,n.VPK,r,u,a)},e.genTrace=function(t,e){if(t=l.newTK(t),e=i.newPoint(e),t.isValid()&&e.isValid())return e.mult(t.vsk)},e.isMyPKr=function(t,e){if(t=l.newTK(t),e=h.newPKr(e),!t.isValid()||!e.isValid())return!1;var r=e.ZPK.add(t.ZPK.mult(n.FR.ONE.nega())).mult(t.vsk),i=e.VPK.add(t.ZPK.mult(t.vsk.mul(n.FR.ONE.nega())));return r.isEqualTo(i)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(17),n=r(6),o=r(12),a=r(18),s=r(3),u=r(4),h=function(){function e(t,e){this.zsk=n.newFR(t),this.vsk=n.newFR(e)}return e.prototype.isValid=function(){return!this.zsk.isZero()&&!this.vsk.isZero()},e.prototype.toBuffer=function(){var e=t.alloc(64);return e.fill(this.zsk.toBuffer(),0),e.fill(this.vsk.toBuffer(),32),e},e.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},e}();function f(t){if(t instanceof h)return t;var e=s.toBuffer(t);return 64=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(t){s.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){s.headers[t]=i.merge(o)})),t.exports=s}).call(this,r(8))},function(t,e,r){"use strict";var i=r(11),n=r(176),o=r(74),a=r(178),s=r(179),u=r(78);t.exports=function(t){return new Promise((function(e,h){var f=t.data,c=t.headers;i.isFormData(f)&&delete c["Content-Type"];var l=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",p=t.auth.password||"";c.Authorization="Basic "+btoa(d+":"+p)}if(l.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in l?a(l.getAllResponseHeaders()):null,i={data:t.responseType&&"text"!==t.responseType?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l};n(e,h,i),l=null}},l.onabort=function(){l&&(h(u("Request aborted",t,"ECONNABORTED",l)),l=null)},l.onerror=function(){h(u("Network Error",t,null,l)),l=null},l.ontimeout=function(){h(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",l)),l=null},i.isStandardBrowserEnv()){var m=r(180),g=(t.withCredentials||s(t.url))&&t.xsrfCookieName?m.read(t.xsrfCookieName):void 0;g&&(c[t.xsrfHeaderName]=g)}if("setRequestHeader"in l&&i.forEach(c,(function(t,e){"undefined"===typeof f&&"content-type"===e.toLowerCase()?delete c[e]:l.setRequestHeader(e,t)})),t.withCredentials&&(l.withCredentials=!0),t.responseType)try{l.responseType=t.responseType}catch(b){if("json"!==t.responseType)throw b}"function"===typeof t.onDownloadProgress&&l.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){l&&(l.abort(),h(t),l=null)})),void 0===f&&(f=null),l.send(f)}))}},function(t,e,r){"use strict";var i=r(177);t.exports=function(t,e,r,n,o){var a=new Error(t);return i(a,e,r,n,o)}},function(t,e,r){"use strict";var i=r(11);t.exports=function(t,e){e=e||{};var r={};return i.forEach(["url","method","params","data"],(function(t){"undefined"!==typeof e[t]&&(r[t]=e[t])})),i.forEach(["headers","auth","proxy"],(function(n){i.isObject(e[n])?r[n]=i.deepMerge(t[n],e[n]):"undefined"!==typeof e[n]?r[n]=e[n]:i.isObject(t[n])?r[n]=i.deepMerge(t[n]):"undefined"!==typeof t[n]&&(r[n]=t[n])})),i.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(i){"undefined"!==typeof e[i]?r[i]=e[i]:"undefined"!==typeof t[i]&&(r[i]=t[i])})),r}},function(t,e,r){"use strict";function i(t){this.message=t}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,t.exports=i},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(3),n=r(46),o=r(37),a=r(65),s=r(273),u=r(275),h=r(122),f=r(44);e.decOut=function(t,e){var r=new Array;return e.forEach((function(e){var o,s={},u=!1;s.Nils=new Array;var h=e.State.OS;if(h.Out_O)s.Asset=l(h.Out_O.Asset),s.Memo=h.Out_O.Memo,s.Nils.push(e.Root),s.Nils.push(i.toString(a.genTrace(t,h.RootCM))),o=h.Out_O.Addr;else if(h.Out_Z)null!==(c=d(i.toString(a.fetchKey(t,h.Out_Z.RPK)),h.Out_Z.EInfo,h.Out_Z.PKr,h.Out_Z.OutCM))&&(s.Asset=c.Asset,s.Memo=c.Memo,s.Nils.push(i.toString(a.genTrace(t,h.RootCM))),o=h.Out_Z.PKr,u=!0);else if(h.Out_P){var f=i.toString(n.genNil(t,h.RootCM,h.Out_P.PKr));s.Asset=l(h.Out_P.Asset),s.Memo=h.Out_P.Memo,s.Nils.push(f),o=h.Out_P.PKr}else{if(!h.Out_C)throw new Error("invalid out type");var c;null!==(c=p(i.toString(n.fetchRPKKey(h.Out_C.PKr,t,h.Out_C.RPK)),h.Out_C.EInfo,h.Out_C.AssetCM))&&(s.Asset=c.Asset,s.Memo=c.Memo,s.Nils.push(i.toString(n.genNil(t,h.RootCM,h.Out_C.PKr))),o=h.Out_C.PKr,u=!0)}if(o){var m={};m.Root=e.Root,m.State=e.State,m.Pkr=i.default.addrToString(o),m.Asset=s.Asset,m.Num=e.State.Num,m.Memo=s.Memo,m.Nils=s.Nils,m.IsZ=u,m.TxHash=e.State.TxHash,r.push(m)}})),r};var c=t.alloc(32,0);function l(e){var r={};return e instanceof o.Asset?(0!=t.compare(e.tkn_currency,c)&&(r.Tkn={Currency:i.toString(e.tkn_currency),Value:i.default.bufferToBN(e.tkn_value.toBuffer()).toString()}),0!=t.compare(e.tkt_value,c)&&(r.Tkt={Category:i.toString(e.tkt_category),Value:i.toString(e.tkt_value)})):(e.Tkn&&0!==t.compare(i.toBuffer(e.Tkn.Currency),c)&&(r.Tkn={Currency:e.Tkn.Currency,Value:i.default.toBN(e.Tkn.Value).toString(10)}),e.Tkt&&0!=t.compare(i.toBuffer(e.Tkt.Value),c)&&(r.Tkt={Category:e.Tkt.Category,Value:e.Tkt.Value})),r}function d(t,e,r,n){t=i.toBuffer(t),e=i.toBuffer(e),r=f.newPKr(r),n=i.toBuffer(n);var o=u.decEInfo(e,t,!0),a=s.genOutCm(o.asset,o.memo,o.rsk,r);return a?0!=a.toBuffer().compare(n)?null:{Asset:l(o.asset),Memo:i.toString(o.memo),Nils:new Array}:null}function p(t,e,r){t=i.toBuffer(t),e=i.toBuffer(e),r=i.toBuffer(r);var n=h.decEInfo(t,e),a=i.toString(n.ar);return 0!=o.genAssetCM(n.asset,a).toBuffer().compare(r)?null:{Asset:l(n.asset),Memo:i.toString(n.memo),Nils:new Array}}e.confirmOutZ=d,e.confirmOutC=p}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var i=r(2).Buffer,n=r(22).Transform;function o(t){n.call(this),this._block=i.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1)(o,n),o.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!i.isBuffer(t)&&"string"!==typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(t)||(t=i.from(t,e));for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,r){"use strict";(function(e,i){var n=r(38);t.exports=y;var o,a=r(68);y.ReadableState=v;r(31).EventEmitter;var s=function(t,e){return t.listeners(e).length},u=r(84),h=r(2).Buffer,f=e.Uint8Array||function(){};var c=r(32);c.inherits=r(1);var l=r(187),d=void 0;d=l&&l.debuglog?l.debuglog("stream"):function(){};var p,m=r(188),g=r(85);c.inherits(y,u);var b=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var i=e instanceof(o=o||r(20));this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(23).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function y(t){if(o=o||r(20),!(this instanceof y))return new y(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,i,n){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,I(t)}(t,a)):(n||(o=function(t,e){var r;i=e,h.isBuffer(i)||i instanceof f||"string"===typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===h.prototype||(e=function(t){return h.from(t)}(e)),i?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?_(t,a,e,!1):E(t,a)):_(t,a,e,!1))):i||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=M?t=M:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function I(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?n.nextTick(S,t):S(t))}function S(t){d("emit readable"),t.emit("readable"),C(t)}function E(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(k,t,e))}function k(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;to.length?o.length:t;if(a===o.length?n+=o:n+=o.slice(0,t),0===(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=h.allocUnsafe(t),i=e.head,n=1;i.data.copy(r),t-=i.data.length;for(;i=i.next;){var o=i.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(a));break}++n}return e.length-=n,r}(t,e);return i}(t,e.buffer,e.decoder),r);var r}function P(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,n.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function O(t,e){for(var r=0,i=t.length;r=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):I(this),null;if(0===(t=A(t,e))&&e.ended)return 0===e.length&&P(this),null;var i,n=e.needReadable;return d("need readable",n),(0===e.length||e.length-t0?T(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&P(this)),null!==i&&this.emit("data",i),i},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?f:y;function h(e,i){d("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),t.removeListener("close",b),t.removeListener("finish",v),t.removeListener("drain",c),t.removeListener("error",g),t.removeListener("unpipe",h),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",m),l=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function f(){d("onend"),t.end()}o.endEmitted?n.nextTick(u):r.once("end",u),t.on("unpipe",h);var c=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,C(t))}}(r);t.on("drain",c);var l=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==O(o.pipes,t))&&!l&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(e){d("onerror",e),y(),t.removeListener("error",g),0===s(t,"error")&&t.emit("error",e)}function b(){t.removeListener("finish",v),y()}function v(){d("onfinish"),t.removeListener("close",b),y()}function y(){d("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",b),t.once("finish",v),t.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),t},y.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}i(u,n),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,b=0;b<16;++b)r[b]=t.readInt32BE(4*b);for(;b<64;++b)r[b]=0|(((e=r[b-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[b-7]+d(r[b-15])+r[b-16];for(var v=0;v<64;++v){var y=g+l(u)+h(u,p,m)+a[v]+r[v]|0,w=c(i)+f(i,n,o)|0;g=m,m=p,p=u,u=s+y|0,s=o,o=n,n=i,i=y+w|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,r){var i=r(1),n=r(24),o=r(2).Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,n.call(this,128,112)}function h(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function b(t,e){return t>>>0>>0?1:0}i(u,n),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,A=0|this._dl,I=0|this._el,S=0|this._fl,E=0|this._gl,k=0|this._hl,x=0;x<32;x+=2)e[x]=t.readInt32BE(4*x),e[x+1]=t.readInt32BE(4*x+4);for(;x<160;x+=2){var B=e[x-30],C=e[x-30+1],T=d(B,C),P=p(C,B),R=m(B=e[x-4],C=e[x-4+1]),O=g(C,B),j=e[x-14],D=e[x-14+1],N=e[x-32],z=e[x-32+1],K=P+D|0,q=T+j+b(K,P)|0;q=(q=q+R+b(K=K+O|0,O)|0)+N+b(K=K+z|0,z)|0,e[x]=q,e[x+1]=K}for(var U=0;U<160;U+=2){q=e[U],K=e[U+1];var F=f(r,i,n),L=f(w,_,M),Q=c(r,w),H=c(w,r),V=l(s,I),Z=l(I,s),G=a[U],Y=a[U+1],W=h(s,u,v),J=h(I,S,E),X=k+Z|0,$=y+V+b(X,k)|0;$=($=($=$+W+b(X=X+J|0,J)|0)+G+b(X=X+Y|0,Y)|0)+q+b(X=X+K|0,K)|0;var tt=H+L|0,et=Q+F+b(tt,H)|0;y=v,k=E,v=u,E=S,u=s,S=I,s=o+$+b(I=A+X|0,A)|0,o=n,A=M,n=i,M=_,i=r,_=w,r=$+et+b(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+A|0,this._el=this._el+I|0,this._fl=this._fl+S|0,this._gl=this._gl+E|0,this._hl=this._hl+k|0,this._ah=this._ah+r+b(this._al,w)|0,this._bh=this._bh+i+b(this._bl,_)|0,this._ch=this._ch+n+b(this._cl,M)|0,this._dh=this._dh+o+b(this._dl,A)|0,this._eh=this._eh+s+b(this._el,I)|0,this._fh=this._fh+u+b(this._fl,S)|0,this._gh=this._gh+v+b(this._gl,E)|0,this._hh=this._hh+y+b(this._hl,k)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,r){"use strict";var i=r(1),n=r(203),o=r(16),a=r(2).Buffer,s=r(90),u=r(52),h=r(53),f=a.alloc(128);function c(t,e){o.call(this,"digest"),"string"===typeof e&&(e=a.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new u:h(t)).update(e).digest():e.lengthr||o!==o)throw new TypeError("Bad key length")}}).call(this,r(0).Buffer)},function(t,e,r){(function(e){var r;e.browser?r="utf-8":r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";t.exports=r}).call(this,r(8))},function(t,e,r){var i=r(90),n=r(52),o=r(53),a=r(93),s=r(94),u=r(2).Buffer,h=u.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function c(t,e,r){var a=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new n).update(t).digest()}:"md5"===t?i:function(e){return o(t).update(e).digest()}}(t),s="sha512"===t||"sha384"===t?128:64;e.length>s?e=a(e):e.lengtht;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(h))for(;r.mod(f).cmp(c);)r.iadd(d)}else for(;r.mod(o).cmp(l);)r.iadd(d);if(g(p=r.shrn(1))&&g(r)&&b(p)&&b(r)&&a.test(p)&&a.test(r))return r}}},function(t,e,r){var i=r(5),n=r(57);function o(t){this.rand=t||new n.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var n=new i(this.rand.generate(r))}while(n.cmp(t)>=0);return n},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var n=t.bitLength(),o=i.mont(t),a=new i(1).toRed(o);e||(e=Math.max(1,n/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var h=t.shrn(u),f=s.toRed(o);e>0;e--){var c=this._randrange(new i(2),s);r&&r(c);var l=c.toRed(o).redPow(h);if(0!==l.cmp(a)&&0!==l.cmp(f)){for(var d=1;d0;e--){var f=this._randrange(new i(2),a),c=t.gcd(f);if(0!==c.cmpn(1))return c;var l=f.toRed(n).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(h)){for(var d=1;d>8,a=255&n;o?r.push(o,a):r.push(a)}return r},i.zero2=n,i.toHex=o,i.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,r){"use strict";var i=e;i.base=r(41),i.short=r(231),i.mont=r(232),i.edwards=r(233)},function(t,e,r){"use strict";var i=r(15).rotr32;function n(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function a(t,e,r){return t^e^r}e.ft_1=function(t,e,r,i){return 0===t?n(e,r,i):1===t||3===t?a(e,r,i):2===t?o(e,r,i):void 0},e.ch32=n,e.maj32=o,e.p32=a,e.s0_256=function(t){return i(t,2)^i(t,13)^i(t,22)},e.s1_256=function(t){return i(t,6)^i(t,11)^i(t,25)},e.g0_256=function(t){return i(t,7)^i(t,18)^t>>>3},e.g1_256=function(t){return i(t,17)^i(t,19)^t>>>10}},function(t,e,r){"use strict";var i=r(15),n=r(34),o=r(105),a=r(13),s=i.sum32,u=i.sum32_4,h=i.sum32_5,f=o.ch32,c=o.maj32,l=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=n.BlockHash,b=[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];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}i.inherits(v,g),t.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;i>6],n=0===(32&r);if(31===(31&r)){var o=r;for(r=0;128===(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:i,primitive:n,tag:r,tagStr:s.tag[r]}}function c(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&128===i)return null;if(0===(128&i))return i;var n=127&i;if(n>4)return t.error("length octect is too long");i=0;for(var o=0;o=31)return i.error("Multi-octet tag encoding unsupported");e||(n|=32);return n|=s.tagClassByName[r||"universal"]<<6}(t,e,r,this.reporter);if(i.length<128)return(o=new n(2))[0]=a,o[1]=i.length,this._createEncoderBuffer([o,i]);for(var u=1,h=i.length;h>=256;h>>=8)u++;(o=new n(2+u))[0]=a,o[1]=128|u;h=1+u;for(var f=i.length;f>0;h--,f>>=8)o[h]=255&f;return this._createEncoderBuffer([o,i])},h.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new n(2*t.length),i=0;i=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(i=0;i=128;a>>=7)o++}var s=new n(o),u=s.length-1;for(i=t.length-1;i>=0;i--){a=t[i];for(s[u--]=127&a;(a>>=7)>0;)s[u--]=128|127&a}return this._createEncoderBuffer(s)},h.prototype._encodeTime=function(t,e){var r,i=new Date(t);return"gentime"===e?r=[f(i.getFullYear()),f(i.getUTCMonth()+1),f(i.getUTCDate()),f(i.getUTCHours()),f(i.getUTCMinutes()),f(i.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[f(i.getFullYear()%100),f(i.getUTCMonth()+1),f(i.getUTCDate()),f(i.getUTCHours()),f(i.getUTCMinutes()),f(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},h.prototype._encodeNull=function(){return this._createEncoderBuffer("")},h.prototype._encodeInt=function(t,e){if("string"===typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!==typeof t&&!n.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new n(r)}if(n.isBuffer(t)){var i=t.length;0===t.length&&i++;var o=new n(i);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);i=1;for(var a=t;a>=256;a>>=8)i++;for(a=(o=new Array(i)).length-1;a>=0;a--)o[a]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new n(o))},h.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},h.prototype._use=function(t,e){return"function"===typeof t&&(t=t(e)),t._getEncoder("der").tree},h.prototype._skipDefault=function(t,e,r){var i,n=this._baseState;if(null===n.default)return!1;var o=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;ithis.SegNum*this.SegBitsNum&&s(!1,"bigBuffer.length > SegNum * SegBitsNum");for(var i=Math.ceil(this.SegBitsNum/this.Bits),a=Math.ceil(r.bitsLength()/this.SegBitsNum),h=u.Point.ZERO,f=0;f=s),this.bitsLen=n,this.rightBits=r%8,this.buf=t.from(e.slice(Math.floor(r/8),Math.floor((a-1)/8)+1)),this.buf[this.buf.length-1]&=o.get(a%8)}return e.prototype.toBigNumber=function(){return new n(this.buf,"le").shrn(this.rightBits)},e.prototype.bitsLength=function(){return this.bitsLen},e.from=function(t,r,i){return new e(t.buf,r+t.rightBits,i)},e}();e.BitBuffer=a}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(12),n=r(6),o=r(4),a=r(17),s=r(43);function u(t){return a.blake2b("SZK$DSAN$HASH2",t)}function h(t){return new s(t)}e.sign=function(e,r,i,o){var s=t.concat([h(32),r.toBuffer(),e]),f=new n.FR(function(t){return a.blake2b("SZK$DSAN$HASH1",t)}(s)),c=i.mult(f);if(c&&!c.isZero()&&c.isValid()){var l=o.mult(f);if(l&&!l.isZero()&&l.isValid()){var d=i.mult(r);if(d&&!d.isZero()&&d.isValid()){var p=o.mult(r);if(p&&!p.isZero()&&p.isValid()){var m=t.concat([c.toBuffer(),l.toBuffer(),d.toBuffer(),p.toBuffer(),e]),g=new n.FR(u(m)),b=f.add(r.mul(g));return t.concat([b.toBuffer(),c.toBuffer(),l.toBuffer()])}}}}},e.verify=function(e,r,a,s,h,f){if(o(96==r.length,"sign.length != 96"),!a||a.isZero()||!a.isValid())return!1;if(!s||s.isZero()||!s.isValid())return!1;var c=new n.FR(r.slice(0,32)),l=i.Point.bufferTo(r.slice(32,64)),d=i.Point.bufferTo(r.slice(64,96));if(!c||c.isZero())return!1;if(!l||l.isZero()||!l.isValid())return!1;if(!d||d.isZero()||!d.isValid())return!1;var p=h.mult(c);if(!p||p.isZero()||!p.isValid())return!1;var m=f.mult(c);if(!m||m.isZero()||!m.isValid())return!1;var g=t.concat([l.toBuffer(),d.toBuffer(),a.toBuffer(),s.toBuffer(),e]),b=new n.FR(u(g)),v=a.mult(b),y=l.add(v);if(!p.isEqualTo(y))return!1;var w=s.mult(b),_=d.add(w);return!!m.isEqualTo(_)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(12),n=r(3),o=r(4),a=r(66),s=function(){function e(t,e){this.ZPK=i.newPoint(t),this.VPK=i.newPoint(e)}return e.prototype.toBuffer=function(){return t.concat([this.ZPK.toBuffer(),this.VPK.toBuffer()])},e.prototype.toString=function(){return n.default.bufferToBs58(this.toBuffer())},e}();e.PK=s,e.newPK=function(t){if(t instanceof s)return t;var e=n.toBuffer(t);o(64==e.length);var r=i.Point.bufferTo(e.slice(0,32)),a=i.Point.bufferTo(e.slice(32,64));return new s(r,a)},e.tk2PK=function(t){var e=(t=a.newTK(t)).ZPK,r=t.ZPK.mult(t.vsk);return new s(e,r)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(37),n=r(6),o=r(3),a=r(64),s=r(4),u=function(){function e(t,e,r){this.asset=i.newAsset(t),this.memo=o.toBuffer(e),this.ar=n.newFR(r)}return e.prototype.isValid=function(){return!!this.asset.isValid()&&!this.ar.isZero()},e.prototype.toBuffer=function(){return t.concat([this.asset.toBuffer(),this.memo,this.ar.toBuffer()])},e.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},e}();function h(t){if(t instanceof u)return t;var e=o.toBuffer(t);s(224==e.length);var r=0,a=128,h=i.newAsset(e.slice(r,r+a));r+=a,a=64;var f=e.slice(r,r+a);r+=a,a=32;var c=n.newFR(e.slice(r,r+a));return new u(h,f,c)}e.Info=u,e.newInfo=h,e.encInfo=function(t,e){t=o.toBuffer(t);var r=(e=h(e)).toBuffer();return a.default(r,t)},e.decEInfo=function(t,e){return t=o.toBuffer(t),e=o.toBuffer(e),h(a.default(e,t))}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(48),n=r(43),o=r(276),a=r(293),s=r(296),u=r(142),h=r(3),f=r(6),c=r(45),l=function(){function t(t,e){if(this.version=2,void 0!==t){void 0===e&&(e=g());var r=h.toBuffer(e);this.keystore=p(r,t,2);var i=c.seed2Sk(r,2),n=c.sk2Tk(i);return this.tk=n,this.pk=c.tk2PK(n),this.version=2,this}}return t.prototype.fromKeystore=function(t){var e="object"==typeof t?t:JSON.parse(t);this.keystore=e,this.tk=e.tk,this.version=this.keystore.version;var r=h.toBuffer(this.tk);if(h.isNewVersion(r)){if(2!==this.version)throw new Error("keystore version not match tk")}else if(1!==this.version)throw new Error("keystore version not match tk");var i=c.tk2PK(this.tk);return this.pk=i,this},t.prototype.fromMnemonic=function(t,e){var r=t.split(" "),i=1;if(25===r.length){if("v2"!==r[0])throw new Error("invalid mnemoic!");i=2,t=r.slice(1).join(" ")}if(s.validateMnemonic(t)){var n=s.mnemonicToEntropy(t),o=h.toBuffer(n);this.keystore=p(o,e,i);var a=c.seed2Sk(o,i),u=c.sk2Tk(a);return this.tk=u,this.pk=this.keystore.address,this.version=i,this}throw new Error("invald mnemonic!")},t.prototype.fromTk=function(t){var e=h.toBuffer(t),r=1;return h.isNewVersion(e)&&(r=2),this.tk=t,this.pk=c.tk2PK(e),this.keystore=function(t,e){var r=c.tk2PK(t);return{version:e,id:a({random:n(16)}),address:r,tk:t.toString(),at:0}}(this.tk,r),this.version=r,this},t.prototype.getSk=function(t){if(this.keystore.crypto){var e=d(this.keystore,t);return c.seed2Sk(e,this.keystore.version)}return""},t.prototype.getTk=function(){return this.tk.toString()},t.prototype.getPk=function(){return this.pk},t.prototype.getVersion=function(){return this.version},t.prototype.getKeystore=function(){return this.keystore},t.prototype.exportMnemonic=function(t){var e=d(this.keystore,t),r=this.keystore.version,i=s.entropyToMnemonic(e);return 2===r&&(i="v2 "+i),i},t}();function d(e,r){var n,a,s="object"==typeof e?e:JSON.parse(e);if("scrypt"!==s.crypto.kdf)throw new Error("Unsupported key derivation scheme");a=s.crypto.kdfparams,n=o(t.from(r),h.toBuffer(a.salt),a.n,a.r,a.p,a.dklen);var f=t.from(s.crypto.ciphertext,"hex");if(u(t.concat([n.slice(16,32),f])).toString("hex")!==s.crypto.mac)throw new Error("Key derivation failed - possibly wrong passphrase");return m(i.createDecipheriv(s.crypto.cipher,n.slice(0,16),t.from(s.crypto.cipherparams.iv,"hex")),f)}function p(e,r,s){if(!function(t){return null!=t}(e))throw new Error("This is a public key only wallet");var f={cipher:"aes-128-ctr",kdf:"scrypt",salt:n(32),iv:n(16),uuid:n(16),dklen:32,c:262144,n:262144,r:8,p:1},l=function(t){return{dklen:t.dklen,salt:t.salt.toString("hex"),n:t.n,r:t.r,p:t.p}}(f),d=o(t.from(r),h.toBuffer(l.salt),l.n,l.r,l.p,l.dklen),p=i.createCipheriv(f.cipher,d.slice(0,16),f.iv);if(!p)throw new Error("Unsupported cipher");var g=m(p,e),b=u(t.concat([d.slice(16,32),t.from(g)])),v=c.seed2Sk(e,s),y=c.sk2Tk(v),w=c.tk2PK(y);return l.salt=l.salt,{version:s,id:a({random:f.uuid}),address:w,tk:y.toString(),crypto:{ciphertext:g.toString("hex"),cipherparams:{iv:f.iv.toString("hex")},cipher:f.cipher,kdf:f.kdf,kdfparams:l,mac:b.toString("hex")},at:0}}function m(e,r){return t.concat([e.update(r),e.final()])}function g(){return f.randomFR().toBuffer().toString("hex")}e.default=l,e.createPkrHash=function(e,r,i){if(2!==i&&1!==i)throw new Error("ivalid version");e=h.toBuffer(e);var n=h.toBN(r).toArrayLike(t,"be");if(8r||e!==e)throw new TypeError("Bad key length")}},function(t,e,r){(function(e){var r;if(e.browser)r="utf-8";else if(e.version){r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";t.exports=r}).call(this,r(8))},function(t,e,r){var i=r(279),n=r(136),o=r(137),a=r(7).Buffer,s=r(125),u=r(126),h=r(140),f=a.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(t,e,r){var s=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new n).update(t).digest()}:"md5"===t?i:function(e){return o(t).update(e).digest()}}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=s(e):e.length>>32-e}function h(t,e,r,i,n,o,a){return u(t+(e&r|~e&i)+n+o|0,a)+e|0}function f(t,e,r,i,n,o,a){return u(t+(e&i|r&~i)+n+o|0,a)+e|0}function c(t,e,r,i,n,o,a){return u(t+(e^r^i)+n+o|0,a)+e|0}function l(t,e,r,i,n,o,a){return u(t+(r^(e|~i))+n+o|0,a)+e|0}i(s,n),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,i=this._b,n=this._c,o=this._d;r=h(r,i,n,o,t[0],3614090360,7),o=h(o,r,i,n,t[1],3905402710,12),n=h(n,o,r,i,t[2],606105819,17),i=h(i,n,o,r,t[3],3250441966,22),r=h(r,i,n,o,t[4],4118548399,7),o=h(o,r,i,n,t[5],1200080426,12),n=h(n,o,r,i,t[6],2821735955,17),i=h(i,n,o,r,t[7],4249261313,22),r=h(r,i,n,o,t[8],1770035416,7),o=h(o,r,i,n,t[9],2336552879,12),n=h(n,o,r,i,t[10],4294925233,17),i=h(i,n,o,r,t[11],2304563134,22),r=h(r,i,n,o,t[12],1804603682,7),o=h(o,r,i,n,t[13],4254626195,12),n=h(n,o,r,i,t[14],2792965006,17),r=f(r,i=h(i,n,o,r,t[15],1236535329,22),n,o,t[1],4129170786,5),o=f(o,r,i,n,t[6],3225465664,9),n=f(n,o,r,i,t[11],643717713,14),i=f(i,n,o,r,t[0],3921069994,20),r=f(r,i,n,o,t[5],3593408605,5),o=f(o,r,i,n,t[10],38016083,9),n=f(n,o,r,i,t[15],3634488961,14),i=f(i,n,o,r,t[4],3889429448,20),r=f(r,i,n,o,t[9],568446438,5),o=f(o,r,i,n,t[14],3275163606,9),n=f(n,o,r,i,t[3],4107603335,14),i=f(i,n,o,r,t[8],1163531501,20),r=f(r,i,n,o,t[13],2850285829,5),o=f(o,r,i,n,t[2],4243563512,9),n=f(n,o,r,i,t[7],1735328473,14),r=c(r,i=f(i,n,o,r,t[12],2368359562,20),n,o,t[5],4294588738,4),o=c(o,r,i,n,t[8],2272392833,11),n=c(n,o,r,i,t[11],1839030562,16),i=c(i,n,o,r,t[14],4259657740,23),r=c(r,i,n,o,t[1],2763975236,4),o=c(o,r,i,n,t[4],1272893353,11),n=c(n,o,r,i,t[7],4139469664,16),i=c(i,n,o,r,t[10],3200236656,23),r=c(r,i,n,o,t[13],681279174,4),o=c(o,r,i,n,t[0],3936430074,11),n=c(n,o,r,i,t[3],3572445317,16),i=c(i,n,o,r,t[6],76029189,23),r=c(r,i,n,o,t[9],3654602809,4),o=c(o,r,i,n,t[12],3873151461,11),n=c(n,o,r,i,t[15],530742520,16),r=l(r,i=c(i,n,o,r,t[2],3299628645,23),n,o,t[0],4096336452,6),o=l(o,r,i,n,t[7],1126891415,10),n=l(n,o,r,i,t[14],2878612391,15),i=l(i,n,o,r,t[5],4237533241,21),r=l(r,i,n,o,t[12],1700485571,6),o=l(o,r,i,n,t[3],2399980690,10),n=l(n,o,r,i,t[10],4293915773,15),i=l(i,n,o,r,t[1],2240044497,21),r=l(r,i,n,o,t[8],1873313359,6),o=l(o,r,i,n,t[15],4264355552,10),n=l(n,o,r,i,t[6],2734768916,15),i=l(i,n,o,r,t[13],1309151649,21),r=l(r,i,n,o,t[4],4149444226,6),o=l(o,r,i,n,t[11],3174756917,10),n=l(n,o,r,i,t[2],718787259,15),i=l(i,n,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},function(t,e,r){"use strict";var i=r(7).Buffer,n=r(280).Transform;function o(t){n.call(this),this._block=i.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(9)(o,n),o.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!i.isBuffer(t)&&"string"!==typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(t)||(t=i.from(t,e));for(var r=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,r){"use strict";(function(e,i){var n;t.exports=S,S.ReadableState=I;r(31).EventEmitter;var o=function(t,e){return t.listeners(e).length},a=r(131),s=r(0).Buffer,u=e.Uint8Array||function(){};var h,f=r(281);h=f&&f.debuglog?f.debuglog("stream"):function(){};var c,l,d,p=r(282),m=r(132),g=r(133).getHighWaterMark,b=r(26).codes,v=b.ERR_INVALID_ARG_TYPE,y=b.ERR_STREAM_PUSH_AFTER_EOF,w=b.ERR_METHOD_NOT_IMPLEMENTED,_=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(9)(S,a);var M=m.errorOrDestroy,A=["error","close","destroy","pause","resume"];function I(t,e,i){n=n||r(27),t=t||{},"boolean"!==typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=r(23).StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function S(t){if(n=n||r(27),!(this instanceof S))return new S(t);var e=this instanceof n;this._readableState=new I(t,this,e),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function E(t,e,r,i,n){h("readableAddChunk",e);var o,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(h("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?C(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,T(t)))}(t,a);else if(n||(o=function(t,e){var r;i=e,s.isBuffer(i)||i instanceof u||"string"===typeof e||void 0===e||t.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],e));var i;return r}(a,e)),o)M(t,o);else if(a.objectMode||e&&e.length>0)if("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),i)a.endEmitted?M(t,new _):k(t,a,e,!0);else if(a.ended)M(t,new y);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?k(t,a,e,!1):P(t,a)):k(t,a,e,!1)}else i||(a.reading=!1,P(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=x?t=x:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function C(t){var e=t._readableState;h("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(h("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(T,t))}function T(t){var e=t._readableState;h("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,N(t)}function P(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(R,t,e))}function R(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function j(t){h("readable nexttick read 0"),t.read(0)}function D(t,e){h("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),N(t),e.flowing&&!e.reading&&t.read(0)}function N(t){var e=t._readableState;for(h("flow",e.flowing);e.flowing&&null!==t.read(););}function z(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function K(t){var e=t._readableState;h("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(q,e,t))}function q(t,e){if(h("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function U(t,e){for(var r=0,i=t.length;r=e.highWaterMark:e.length>0)||e.ended))return h("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?K(this):C(this),null;if(0===(t=B(t,e))&&e.ended)return 0===e.length&&K(this),null;var i,n=e.needReadable;return h("need readable",n),(0===e.length||e.length-t0?z(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&K(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(t){M(this,new w("_read()"))},S.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,h("pipe count=%d opts=%j",n.pipesCount,e);var a=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?u:g;function s(e,i){h("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,h("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",f),t.removeListener("error",d),t.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",l),c=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function u(){h("onend"),t.end()}n.endEmitted?i.nextTick(a):r.once("end",a),t.on("unpipe",s);var f=function(t){return function(){var e=t._readableState;h("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,N(t))}}(r);t.on("drain",f);var c=!1;function l(e){h("ondata");var i=t.write(e);h("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==U(n.pipes,t))&&!c&&(h("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(e){h("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&M(t,e)}function p(){t.removeListener("finish",m),g()}function m(){h("onfinish"),t.removeListener("close",p),g()}function g(){h("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",r),n.flowing||(h("pipe resume"),r.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,h("on readable",n.length,n.reading),n.length?C(this):n.reading||i.nextTick(j,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(O,this),r},S.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(O,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(h("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(D,t,e))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(h("wrapped data"),r.decoder&&(n=r.decoder.write(n)),!r.objectMode||null!==n&&void 0!==n)&&((r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause())))})),t)void 0===this[n]&&"function"===typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var o=0;o-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,e,r){r(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,e,r){var n=this._writableState;return"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,T(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=c.destroy,S.prototype._undestroy=c.undestroy,S.prototype._destroy=function(t,e){e(t)}}).call(this,r(10),r(8))},function(t,e,r){"use strict";t.exports=f;var i=r(26).codes,n=i.ERR_METHOD_NOT_IMPLEMENTED,o=i.ERR_MULTIPLE_CALLBACK,a=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=i.ERR_TRANSFORM_WITH_LENGTH_0,u=r(27);function h(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length>>32-e}function m(t,e,r,i,n,o,a,s){return p(t+(e^r^i)+o+a|0,s)+n|0}function g(t,e,r,i,n,o,a,s){return p(t+(e&r|~e&i)+o+a|0,s)+n|0}function b(t,e,r,i,n,o,a,s){return p(t+((e|~r)^i)+o+a|0,s)+n|0}function v(t,e,r,i,n,o,a,s){return p(t+(e&i|r&~i)+o+a|0,s)+n|0}function y(t,e,r,i,n,o,a,s){return p(t+(e^(r|~i))+o+a|0,s)+n|0}n(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,A=0|this._d,I=0|this._e,S=0;S<80;S+=1){var E,k;S<16?(E=m(r,i,n,o,d,t[s[S]],c[0],h[S]),k=y(w,_,M,A,I,t[u[S]],l[0],f[S])):S<32?(E=g(r,i,n,o,d,t[s[S]],c[1],h[S]),k=v(w,_,M,A,I,t[u[S]],l[1],f[S])):S<48?(E=b(r,i,n,o,d,t[s[S]],c[2],h[S]),k=b(w,_,M,A,I,t[u[S]],l[2],f[S])):S<64?(E=v(r,i,n,o,d,t[s[S]],c[3],h[S]),k=g(w,_,M,A,I,t[u[S]],l[3],f[S])):(E=y(r,i,n,o,d,t[s[S]],c[4],h[S]),k=m(w,_,M,A,I,t[u[S]],l[4],f[S])),r=d,d=o,o=p(n,10),n=i,i=E,w=I,I=A,A=p(M,10),M=_,_=k}var x=this._b+n+A|0;this._b=this._c+o+I|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+i+M|0,this._a=x},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=i.alloc?i.alloc(20):new i(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(289),e.sha1=r(290),e.sha224=r(291),e.sha256=r(138),e.sha384=r(292),e.sha512=r(139)},function(t,e,r){var i=r(9),n=r(28),o=r(7).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,n.call(this,64,56)}function h(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}i(u,n),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,b=0;b<16;++b)r[b]=t.readInt32BE(4*b);for(;b<64;++b)r[b]=0|(((e=r[b-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[b-7]+d(r[b-15])+r[b-16];for(var v=0;v<64;++v){var y=g+l(u)+h(u,p,m)+a[v]+r[v]|0,w=c(i)+f(i,n,o)|0;g=m,m=p,p=u,u=s+y|0,s=o,o=n,n=i,i=y+w|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,r){var i=r(9),n=r(28),o=r(7).Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,n.call(this,128,112)}function h(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function b(t,e){return t>>>0>>0?1:0}i(u,n),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,A=0|this._dl,I=0|this._el,S=0|this._fl,E=0|this._gl,k=0|this._hl,x=0;x<32;x+=2)e[x]=t.readInt32BE(4*x),e[x+1]=t.readInt32BE(4*x+4);for(;x<160;x+=2){var B=e[x-30],C=e[x-30+1],T=d(B,C),P=p(C,B),R=m(B=e[x-4],C=e[x-4+1]),O=g(C,B),j=e[x-14],D=e[x-14+1],N=e[x-32],z=e[x-32+1],K=P+D|0,q=T+j+b(K,P)|0;q=(q=q+R+b(K=K+O|0,O)|0)+N+b(K=K+z|0,z)|0,e[x]=q,e[x+1]=K}for(var U=0;U<160;U+=2){q=e[U],K=e[U+1];var F=f(r,i,n),L=f(w,_,M),Q=c(r,w),H=c(w,r),V=l(s,I),Z=l(I,s),G=a[U],Y=a[U+1],W=h(s,u,v),J=h(I,S,E),X=k+Z|0,$=y+V+b(X,k)|0;$=($=($=$+W+b(X=X+J|0,J)|0)+G+b(X=X+Y|0,Y)|0)+q+b(X=X+K|0,K)|0;var tt=H+L|0,et=Q+F+b(tt,H)|0;y=v,k=E,v=u,E=S,u=s,S=I,s=o+$+b(I=A+X|0,A)|0,o=n,A=M,n=i,M=_,i=r,_=w,r=$+et+b(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+A|0,this._el=this._el+I|0,this._fl=this._fl+S|0,this._gl=this._gl+E|0,this._hl=this._hl+k|0,this._ah=this._ah+r+b(this._al,w)|0,this._bh=this._bh+i+b(this._bl,_)|0,this._ch=this._ch+n+b(this._cl,M)|0,this._dh=this._dh+o+b(this._dl,A)|0,this._eh=this._eh+s+b(this._el,I)|0,this._fh=this._fh+u+b(this._fl,S)|0,this._gh=this._gh+v+b(this._gl,E)|0,this._hh=this._hh+y+b(this._hl,k)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,r){var i=r(7).Buffer;t.exports=function(t,e,r){if(i.isBuffer(t))return t;if("string"===typeof t)return i.from(t,e);if(ArrayBuffer.isView(t))return i.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,n={};e.wordlists=n,e._default=i;try{e._default=i=r(303),n.chinese_simplified=i}catch(o){}try{e._default=i=r(304),n.chinese_traditional=i}catch(o){}try{e._default=i=r(305),n.korean=i}catch(o){}try{e._default=i=r(306),n.french=i}catch(o){}try{e._default=i=r(307),n.italian=i}catch(o){}try{e._default=i=r(308),n.spanish=i}catch(o){}try{e._default=i=r(309),n.japanese=i,n.JA=i}catch(o){}try{e._default=i=r(310),n.english=i,n.EN=i}catch(o){}},function(t,e,r){"use strict";(function(e){var i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=r(311),o=r(317);function a(t){var e=t;if("string"!==typeof e)throw new Error("while padding to even, value must be string, is currently "+("undefined"===typeof e?"undefined":i(e))+", while padToEven.");return e.length%2&&(e="0"+e),e}t.exports=function(t){return t=function(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"===typeof t)t=function(t,e){if("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))return!1;if(e&&t.length!==2+2*e)return!1;return!0}(t)?e.from(a(function(t){if("string"!==typeof t)return t;return function(t){if("string"!==typeof t)throw new Error("value must be type 'string', is currently type "+("undefined"===typeof t?"undefined":i(t))+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}(t)?t.slice(2):t}(t)),"hex"):e.from(t);else if("number"===typeof t)t=function(t){var r=function(t){return"0x"+t.toString(16)}(t);return e.from(a(r.slice(2)),"hex")}(t);else if(null===t||void 0===t)t=e.allocUnsafe(0);else if(o.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray())}return t}(t),n("keccak256").update(t).digest()}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var i=this&&this.__awaiter||function(t,e,r,i){return new(r=r||Promise)((function(n,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?n(t.value):((e=t.value)instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((i=i.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var r,i,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(n=0<(n=a.trys).length&&n[n.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]n[0]&&o[1]>>> ",l,d),[4,e.findRoots(t.From,a.default.hexToCy(l),d)]);case 4:return p=n.sent(),console.log("result >>>> ",p),p&&(p.remain.isNeg()||p.remain.isZero())?(o.push.apply(o,p.utxos),[3,3]):[2,new Promise((function(t,e){e("no enough unlocked utxos")}))];case 5:return[2,new Promise((function(t){t(o)}))]}}))}))},e.buildTxParam=function(e,r){return i(this,void 0,void 0,(function(){var i,o,u,f,c,l,d,p,m,g,b,v,y;return n(this,(function(n){switch(n.label){case 0:return i=new Array,r.Utxos.forEach((function(t){i.push(t.Root)})),[4,e.getAnchor(i)];case 1:if(null===(o=n.sent()))throw new Error("can not find Anchor by root");if(u=new Array,f=0,c=new h(!1,r.Fee),r.Utxos.forEach((function(e,r){if(null===e.State)throw new Error("can not find out by root");c.AddIn(e.Asset),u.push({SKr:a.toString(t.alloc(96)),Out:{Root:e.Root,State:e.State},Witness:o[r]}),a.default.isNotNull(e.State.OS.Out_O)&&f++})),2500 2500");for(l=new Array,r.Receptions.forEach((function(e){c.AddOut(e.Asset),l.push({PKr:a.toHex(e.Addr),Asset:e.Asset,Memo:a.toString(t.alloc(64))})})),null!==r.Cmds&&null!==(d=new s(r.Cmds).OutAsset())&&c.AddOut(d),p=c.GetTknList(),m=c.GetTktList(),g=Math.max(p.length,m.length),b=0;bn[0]&&a[1]>> ",r.value[0],!1),m.set(r.value[0],!1)),r=e.next();console.error("======= fetchHandler error>>> ",t),z("Fetch Error:","string"==typeof t?t:t.message)})),w=(new Date).getTime()}t(),_=setInterval((function(){t()}),M)}(),t.data="success",R(t)},healthyCheck:function(t){var e=!1;w&&(e=(new Date).getTime()-w<6e4);var r=t.data;d.get(r).selectId(a.tables.syncInfo.name,1).then((function(i){t.data={health:e,latestSyncTime:w,isSyncing:m.get(r),latestBlock:i.CurrentBlock,currentBlock:b.get(r),pkrIndex:i.PkrIndex,startBlock:v.get(r),checkNilPercent:y.get(r)},R(t)})).catch((function(i){t.data={health:e,latestSyncTime:w,isSyncing:m.get(r),latestBlock:0,pkrIndex:1,currentBlock:0,startBlock:0,checkNilPercent:0},R(t)}))},initAccount:function(t){var e,r,i,n=t.data;n&&d&&!d.get(n)&&(e=1,s.isNewVersion(s.default.toBuffer(n))&&(e=2),r=f.createPkrHash(n,1,e),a.dbConfig.databaseName="popup_"+n,i=new o.PopDB(a.dbConfig),d.set(n,i),i.select(a.tables.syncInfo.name,{TK:n}).then((function(e){var o;e&&0!==e.length?(b.set(n,e[0].CurrentBlock),v.set(n,e[0].CurrentBlock)):(o={TK:n,PkrIndex:1,CurrentBlock:0,LastCombineBlock:0,UseHashPKr:!1,MainPKr:r,PKr:r},i.insert(a.tables.syncInfo.name,o).then((function(e){t.data="success"})).catch((function(e){console.log(e),t.error=e.message})),b.set(n,0),v.set(n,0)),y.set(n,0),R(t)})).catch((function(e){var o={TK:n,PkrIndex:1,CurrentBlock:0,LastCombineBlock:0,UseHashPKr:!1,MainPKr:r,PKr:r};i.insert(a.tables.syncInfo.name,o).then((function(e){t.data="success"})).catch((function(e){console.log(e),t.error=e.message})),b.set(n,0),v.set(n,0),R(t)})))},clearData:function(t){(function(t){return i(this,void 0,void 0,(function(){function e(e){return i(this,void 0,void 0,(function(){var r;return n(this,(function(i){switch(i.label){case 0:return[4,e.selectId(a.tables.syncInfo.name,1)];case 1:return r=i.sent(),!0!==m.get(r.TK)?[3,3]:[4,new Promise((function(t,e){e("Data synchronization ...")}))];case 2:return i.sent(),[3,15];case 3:return m.set(t,!0),p.delete(t),r.CurrentBlock=0,r.PKr=r.MainPKr,r.PkrIndex=1,r.UseHashPKr=!1,[4,e.update(a.tables.syncInfo.name,r)];case 4:return i.sent(),[4,e.clearTable(a.tables.utxo.name)];case 5:return i.sent(),[4,e.clearTable(a.tables.txBase.name)];case 6:return i.sent(),[4,e.clearTable(a.tables.assets.name)];case 7:return i.sent(),[4,e.clearTable(a.tables.assetUtxo.name)];case 8:return i.sent(),[4,e.clearTable(a.tables.tx.name)];case 9:return i.sent(),[4,e.clearTable(a.tables.nils.name)];case 10:return i.sent(),[4,e.clearTable(a.tables.txCurrency.name)];case 11:return i.sent(),[4,e.clearTable(a.tables.utxoTkt.name)];case 12:return i.sent(),[4,e.clearTable(a.tables.tickets.name)];case 13:return i.sent(),b.set(t,0),v.set(t,0),[4,new Promise((function(t){t("Clear Data Success !")}))];case 14:i.sent(),i.label=15;case 15:return[2]}}))}))}var r,o;return n(this,(function(i){switch(i.label){case 0:return t?[4,e(d.get(t))]:[3,2];case 1:return i.sent(),[3,5];case 2:r=d.entries(),o=r.next(),i.label=3;case 3:return o.done?[3,5]:[4,e(o.value[1])];case 4:return i.sent(),o=r.next(),[3,3];case 5:return[2]}}))}))})(t.data).then((function(e){console.log("data>>> ",e),m.clear(),t.data="Success",R(t)})).catch((function(e){console.log("data e>>> ",e),m.clear(),t.error=e,R(t)}))},findUtxos:function(t,e,r){},balanceOf:function(t){var e=t.data;function r(){d.get(e).selectAll(a.tables.assets.name).then((function(r){var i=new Map;r&&0> ",t)})).catch((function(t){console.error(t)})),u(c.Hash))}))]}}))}))})(e).then((function(e){console.log("_commitTx hash:",e),t.data=e,R(t)})).catch((function(e){console.error("_commitTx err:",e),t.error=e,R(t)}))}catch(e){t.error=e.message,R(t)}},getSeroPrice:function(t){var e=t.data;u.default.get("https://data.gateio.co/api2/1/ticker/"+e).then((function(e){var r;e&&e.data&&(r=e.data,t.data=r,R(t))})).catch((function(t){}))},getPendingAndConfirming:function(t){return i(this,void 0,void 0,(function(){var e;return n(this,(function(r){return e=t.data,g.has(e)?t.data=g.get(e):t.data=[],R(t),[2]}))}))}};function E(t){return i(this,void 0,void 0,(function(){var e,r,i,o,u,f,c,l,d,p,m,g,b,v,y;return n(this,(function(n){switch(n.label){case 0:return[4,t.selectAll(a.tables.utxo.name)];case 1:if(!((e=n.sent())&&0>",c.utxos.length),h=!0),[4,D(c,e.TK,t)];case 3:return n.sent(),c.useHashPKr&&(r.UseHashPKr=!0),!0!==c.again?[3,5]:(r.PkrIndex=r.PkrIndex+1,l=1,s.isNewVersion(s.default.toBuffer(e.TK))&&(l=2),r.PKr=f.createPkrHash(e.TK,r.PkrIndex,l),o=c.lastBlockNumber,u=r.PkrIndex,r.CurrentBlock=c.lastBlockNumber,[4,t.update(a.tables.syncInfo.name,r)]);case 4:return n.sent(),[3,6];case 5:return c.lastBlockNumber,r.CurrentBlock=c.lastBlockNumber,[3,7];case 6:return[3,1];case 7:return[4,t.update(a.tables.syncInfo.name,r)];case 8:return n.sent(),[4,F(e.TK)];case 9:return d=n.sent(),!0!==h&&!0!==d?[3,11]:[4,E(t)];case 10:n.sent(),n.label=11;case 11:return y.set(e.TK,0),[4,L(e.TK)];case 12:return n.sent(),[2]}}))}))}function D(t,e,r){return i(this,void 0,void 0,(function(){var i,o,s,u,h,f,c,l,d,p,m;return n(this,(function(n){switch(n.label){case 0:if(!(t.utxos&&0> ",{Root:l.Root,Value:s.Asset.Tkt.Value,Category:s.Asset.Tkt.Category}),[4,r.update(a.tables.tickets.name,{Root:l.Root,Value:s.Asset.Tkt.Value,Category:s.Asset.Tkt.Category})];case 9:n.sent(),n.label=10;case 10:return i++,[3,1];case 11:if(!(t.txInfos&&0n[0]&&a[1]n[0]&&a[1]0?a-4:a;for(r=0;r>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[f++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,n=r%3,o=[],a=0,s=r-n;as?s:a+16383));1===n?(e=t[r-1],o.push(i[e>>2]+i[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],o.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return o.join("")};for(var i=[],n=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var n,o,a=[],s=e;s>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,i,n){var o,a,s=8*n-i-1,u=(1<>1,f=-7,c=r?n-1:0,l=r?-1:1,d=t[e+c];for(c+=l,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[e+c],c+=l,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=i;f>0;a=256*a+t[e+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,i),o-=h}return(d?-1:1)*a*Math.pow(2,o-i)},e.write=function(t,e,r,i,n,o){var a,s,u,h=8*o-n-1,f=(1<>1,l=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=f?(s=0,a=f):a+c>=1?(s=(e*u-1)*Math.pow(2,n),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,n),a=0));n>=8;t[r+d]=255&s,d+=p,s/=256,n-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,h-=8);t[r+d-p]|=128*m}},function(t,e){},function(t,e,r){"use strict";var i=r(7).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");var e=new Uint8Array(256);e.fill(255);for(var r=0;r>>0,f=new Uint8Array(h);t[r];){var c=e[t.charCodeAt(r)];if(255===c)return;for(var l=0,d=h-1;(0!==c||l>>0,f[d]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");o=l,r++}if(" "!==t[r]){for(var p=h-o;p!==h&&0===f[p];)p++;var m=i.allocUnsafe(n+(h-p));m.fill(0,0,n);for(var g=n;p!==h;)m[g++]=f[p++];return m}}}return{encode:function(e){if(!i.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,n=0,o=0,u=e.length;o!==u&&0===e[o];)o++,r++;for(var f=(u-o)*h+1>>>0,c=new Uint8Array(f);o!==u;){for(var l=e[o],d=0,p=f-1;(0!==l||d>>0,c[p]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=d,o++}for(var m=f-n;m!==f&&0===c[m];)m++;for(var g=s.repeat(r);m=55296&&e<=56319&&n=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function s(t,e){return n(t>>e&63|128)}function u(t){if(0==(4294967168&t))return n(t);var e="";return 0==(4294965248&t)?e=n(t>>6&31|192):0==(4294901760&t)?(a(t),e=n(t>>12&15|224),e+=s(t,6)):0==(4292870144&t)&&(e=n(t>>18&7|240),e+=s(t,12),e+=s(t,6)),e+=n(63&t|128)}function h(){if(i>=r)throw Error("Invalid byte index");var t=255&e[i];if(i++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function f(){var t,n;if(i>r)throw Error("Invalid byte index");if(i==r)return!1;if(t=255&e[i],i++,0==(128&t))return t;if(192==(224&t)){if((n=(31&t)<<6|h())>=128)return n;throw Error("Invalid continuation byte")}if(224==(240&t)){if((n=(15&t)<<12|h()<<6|h())>=2048)return a(n),n;throw Error("Invalid continuation byte")}if(240==(248&t)&&(n=(7&t)<<18|h()<<12|h()<<6|h())>=65536&&n<=1114111)return n;throw Error("Invalid UTF-8 detected")}t.version="3.0.0",t.encode=function(t){for(var e=o(t),r=e.length,i=-1,n="";++i65535&&(o+=n((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=n(e);return o}(s)}}(e)},function(t,e,r){var i=r(156),n=r(69);t.exports=function(t){if("string"===typeof t||"number"===typeof t){var e=new i(1),r=String(t).toLowerCase().trim(),o="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),a=n(r);if("-"===a.substr(0,1)&&(a=n(a.slice(1)),e=new i(-1,10)),!(a=""===a?"0":a).match(/^-?[0-9]+$/)&&a.match(/^[0-9A-Fa-f]+$/)||a.match(/^[a-fA-F]+$/)||!0===o&&a.match(/^[0-9A-Fa-f]+$/))return new i(a,16).mul(e);if((a.match(/^-?[0-9]+$/)||""===a)&&!1===o)return new i(a,10).mul(e)}else if("object"===typeof t&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new i(t.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(t)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(0).Buffer}catch(I){}function s(t,e,r){for(var i=0,n=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return i}function u(t,e,r,i){for(var n=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)n=s(t,r,r+6),this.words[i]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);r+6!==e&&(n=s(t,e,r+6),this.words[i]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,a=o%i,s=Math.min(o,o-a)+r,h=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var h=1;h>>26,c=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=l;d++){var p=h-d|0;f+=(a=(n=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}r.words[h]=0|c,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:h[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,h=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),h[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,M=0|a[4],A=8191&M,I=M>>>13,S=0|a[5],E=8191&S,k=S>>>13,x=0|a[6],B=8191&x,C=x>>>13,T=0|a[7],P=8191&T,R=T>>>13,O=0|a[8],j=8191&O,D=O>>>13,N=0|a[9],z=8191&N,K=N>>>13,q=0|s[0],U=8191&q,F=q>>>13,L=0|s[1],Q=8191&L,H=L>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],W=8191&Y,J=Y>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,it=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ut=8191&st,ht=st>>>13,ft=0|s[8],ct=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(i=Math.imul(c,U))|0)+((8191&(n=(n=Math.imul(c,F))+Math.imul(l,U)|0))<<13)|0;h=((o=Math.imul(l,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,F))+Math.imul(m,U)|0,o=Math.imul(m,F);var bt=(h+(i=i+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(l,Q)|0))<<13)|0;h=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(b,U),n=(n=Math.imul(b,F))+Math.imul(v,U)|0,o=Math.imul(v,F),i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,H)|0;var vt=(h+(i=i+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,U),n=(n=Math.imul(w,F))+Math.imul(_,U)|0,o=Math.imul(_,F),i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,H)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var yt=(h+(i=i+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,J)|0)+Math.imul(l,W)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(A,U),n=(n=Math.imul(A,F))+Math.imul(I,U)|0,o=Math.imul(I,F),i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,J)|0;var wt=(h+(i=i+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,U),n=(n=Math.imul(E,F))+Math.imul(k,U)|0,o=Math.imul(k,F),i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(b,W)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,J)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(i=i+Math.imul(c,rt)|0)|0)+((8191&(n=(n=n+Math.imul(c,it)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(B,U),n=(n=Math.imul(B,F))+Math.imul(C,U)|0,o=Math.imul(C,F),i=i+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(h+(i=i+Math.imul(c,ot)|0)|0)+((8191&(n=(n=n+Math.imul(c,at)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,at)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,U),n=(n=Math.imul(P,F))+Math.imul(R,U)|0,o=Math.imul(R,F),i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,H)|0,i=i+Math.imul(E,Z)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(b,rt)|0,n=(n=n+Math.imul(b,it)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var At=(h+(i=i+Math.imul(c,ut)|0)|0)+((8191&(n=(n=n+Math.imul(c,ht)|0)+Math.imul(l,ut)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,F))+Math.imul(D,U)|0,o=Math.imul(D,F),i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,H)|0,i=i+Math.imul(B,Z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,G)|0,i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(b,ot)|0,n=(n=n+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var It=(h+(i=i+Math.imul(c,ct)|0)|0)+((8191&(n=(n=n+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(z,U),n=(n=Math.imul(z,F))+Math.imul(K,U)|0,o=Math.imul(K,F),i=i+Math.imul(j,Q)|0,n=(n=n+Math.imul(j,H)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,H)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,i=i+Math.imul(b,ut)|0,n=(n=n+Math.imul(b,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(p,ct)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(h+(i=i+Math.imul(c,pt)|0)|0)+((8191&(n=(n=n+Math.imul(c,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(z,Q),n=(n=Math.imul(z,H))+Math.imul(K,Q)|0,o=Math.imul(K,H),i=i+Math.imul(j,Z)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,J)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,i=i+Math.imul(b,ct)|0,n=(n=n+Math.imul(b,lt)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,lt)|0;var Et=(h+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(z,Z),n=(n=Math.imul(z,G))+Math.imul(K,Z)|0,o=Math.imul(K,G),i=i+Math.imul(j,W)|0,n=(n=n+Math.imul(j,J)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,J)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,it)|0,i=i+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(A,ut)|0,n=(n=n+Math.imul(A,ht)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(w,ct)|0,n=(n=n+Math.imul(w,lt)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,lt)|0;var kt=(h+(i=i+Math.imul(b,pt)|0)|0)+((8191&(n=(n=n+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(z,W),n=(n=Math.imul(z,J))+Math.imul(K,W)|0,o=Math.imul(K,J),i=i+Math.imul(j,$)|0,n=(n=n+Math.imul(j,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,i=i+Math.imul(E,ut)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(A,ct)|0,n=(n=n+Math.imul(A,lt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,lt)|0;var xt=(h+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(z,$),n=(n=Math.imul(z,tt))+Math.imul(K,$)|0,o=Math.imul(K,tt),i=i+Math.imul(j,rt)|0,n=(n=n+Math.imul(j,it)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,i=i+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,i=i+Math.imul(E,ct)|0,n=(n=n+Math.imul(E,lt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,lt)|0;var Bt=(h+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(I,pt)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(z,rt),n=(n=Math.imul(z,it))+Math.imul(K,rt)|0,o=Math.imul(K,it),i=i+Math.imul(j,ot)|0,n=(n=n+Math.imul(j,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,i=i+Math.imul(P,ut)|0,n=(n=n+Math.imul(P,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,i=i+Math.imul(B,ct)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Ct=(h+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(z,ot),n=(n=Math.imul(z,at))+Math.imul(K,ot)|0,o=Math.imul(K,at),i=i+Math.imul(j,ut)|0,n=(n=n+Math.imul(j,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,i=i+Math.imul(P,ct)|0,n=(n=n+Math.imul(P,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Tt=(h+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(z,ut),n=(n=Math.imul(z,ht))+Math.imul(K,ut)|0,o=Math.imul(K,ht),i=i+Math.imul(j,ct)|0,n=(n=n+Math.imul(j,lt)|0)+Math.imul(D,ct)|0,o=o+Math.imul(D,lt)|0;var Pt=(h+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(z,ct),n=(n=Math.imul(z,lt))+Math.imul(K,ct)|0,o=Math.imul(K,lt);var Rt=(h+(i=i+Math.imul(j,pt)|0)|0)+((8191&(n=(n=n+Math.imul(j,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(i=Math.imul(z,pt))|0)+((8191&(n=(n=Math.imul(z,mt))+Math.imul(K,pt)|0))<<13)|0;return h=((o=Math.imul(K,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=bt,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=It,u[9]=St,u[10]=Et,u[11]=kt,u[12]=xt,u[13]=Bt,u[14]=Ct,u[15]=Tt,u[16]=Pt,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var a=0;a>>=1)n++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==f||h>=n);h--){var c=0|this.words[h];this.words[h]=f<<26-o|c>>>o,f=c&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var h=0;h=0;c--){var l=67108864*(0|i.words[n.length+c])+(0|i.words[n.length+c-1]);for(l=Math.min(l/a|0,67108863),i._ishlnsubmul(n,l,c);0!==i.negative;)l--,i.negative=0,i._ishlnsubmul(n,1,c),i.isZero()||(i.negative^=1);s&&(s.words[c]=l)}return s&&s.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var f=r.clone(),c=e.clone();!e.isZero();){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(c)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),a.isub(u)):(r.isub(e),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0===(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,r=(t-e)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):r.strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},n(v,b),v.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,n),l=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var h=e.words[i],f=u-1;f>=0;f--){var c=h>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},n(A,M),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(29)(t))},function(t,e){t.exports=function(t){return null===t}},function(t,e,r){var i=r(70),n=r(163),o=r(72),a="[object String]";t.exports=function(t){return"string"==typeof t||!n(t)&&o(t)&&i(t)==a}},function(t,e,r){var i=r(160),n="object"==typeof self&&self&&self.Object===Object&&self,o=i||n||Function("return this")();t.exports=o},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(10))},function(t,e,r){var i=r(71),n=Object.prototype,o=n.hasOwnProperty,a=n.toString,s=i?i.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),r=t[s];try{t[s]=void 0;var i=!0}catch(u){}var n=a.call(t);return i&&(e?t[s]=r:delete t[s]),n}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){var i=r(70),n=r(72),o="[object Number]";t.exports=function(t){return"number"==typeof t||n(t)&&i(t)==o}},function(t,e,r){(function(t){var i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},i=0;i=o)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return t}})),u=i[r];r=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),p(r)?i.showHidden=r:r&&e._extend(i,r),v(i.showHidden)&&(i.showHidden=!1),v(i.depth)&&(i.depth=2),v(i.colors)&&(i.colors=!1),v(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=u),f(i,t,i.depth)}function u(t,e){var r=s.styles[e];return r?"\x1b["+s.colors[r][0]+"m"+t+"\x1b["+s.colors[r][1]+"m":t}function h(t,e){return t}function f(t,r,i){if(t.customInspect&&r&&A(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(i,t);return b(n)||(n=f(t,n,i)),n}var o=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),M(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(r);if(0===a.length){if(A(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return t.stylize(Date.prototype.toString.call(r),"date");if(M(r))return c(r)}var h,w="",I=!1,S=["{","}"];(d(r)&&(I=!0,S=["[","]"]),A(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return y(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),M(r)&&(w=" "+c(r)),0!==a.length||I&&0!=r.length?i<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),h=I?function(t,e,r,i,n){for(var o=[],a=0,s=e.length;a=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(h,w,S)):S[0]+w+S[1]}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,i,n,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),x(i,n)||(a="["+n+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(r)?f(t,u.value,null):f(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),v(a)){if(o&&n.match(/^\d+$/))return s;(a=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function d(t){return Array.isArray(t)}function p(t){return"boolean"===typeof t}function m(t){return null===t}function g(t){return"number"===typeof t}function b(t){return"string"===typeof t}function v(t){return void 0===t}function y(t){return w(t)&&"[object RegExp]"===I(t)}function w(t){return"object"===typeof t&&null!==t}function _(t){return w(t)&&"[object Date]"===I(t)}function M(t){return w(t)&&("[object Error]"===I(t)||t instanceof Error)}function A(t){return"function"===typeof t}function I(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(v(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:"."}).NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var i=t.pid;a[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,i,t)}}else a[r]=function(){};return a[r]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=b,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=v,e.isRegExp=y,e.isObject=w,e.isDate=_,e.isError=M,e.isFunction=A,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=r(166);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var t=new Date,e=[S(t.getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":");return[t.getDate(),E[t.getMonth()],e].join(" ")}function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",k(),e.format.apply(e,arguments))},e.inherits=r(167),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t};var B="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');if(B&&t[B]){var e;if("function"!==typeof(e=t[B]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,B,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,i=new Promise((function(t,i){e=t,r=i})),n=[],o=0;o=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},function(t,e,r){"use strict";var i=r(11);t.exports=i.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(t){var i=t;return e&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=n(window.location.href),function(e){var r=i.isString(e)?n(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var i=r(11);t.exports=i.isStandardBrowserEnv()?{write:function(t,e,r,n,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),i.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),i.isString(n)&&s.push("path="+n),i.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,r){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,r){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,r){"use strict";var i=r(80);function n(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;t((function(t){r.reason||(r.reason=new i(t),e(r.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var t;return{token:new n((function(e){t=e})),cancel:t}},t.exports=n},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){var i;!function(n){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,h="[BigNumber Error] ",f=h+"Number primitive has more than 15 significant digits: ",c=1e14,l=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,g=1e9;function b(t){var e=0|t;return t>0||t===e?e:e-1}function v(t){for(var e,r,i=1,n=t.length,o=t[0]+"";ih^r?1:-1;for(s=(u=n.length)<(h=o.length)?u:h,a=0;ao[a]^r?1:-1;return u==h?0:u>h^r?1:-1}function w(t,e,r,i){if(tr||t!==u(t))throw Error(h+(i||"Argument")+("number"==typeof t?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function _(t){var e=t.c.length-1;return b(t.e/l)==e&&t.c[e]%2!=0}function M(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function A(t,e,r){var i,n;if(e<0){for(n=r+".";++e;n+=r);t=n+t}else if(++e>(i=t.length)){for(n=r,e-=i;--e;n+=r);t+=n}else eC?b.c=b.e=null:t.e=10;c/=10,h++);return void(h>C?b.c=b.e=null:(b.e=h,b.c=[t]))}g=String(t)}else{if(!a.test(g=String(t)))return n(b,g,p);b.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(h=g.indexOf("."))>-1&&(g=g.replace(".","")),(c=g.search(/e/i))>0?(h<0&&(h=c),h+=+g.slice(c+1),g=g.substring(0,c)):h<0&&(h=g.length)}else{if(w(e,2,j.length,"Base"),10==e)return q(b=new D(t),S+b.e+1,E);if(g=String(t),p="number"==typeof t){if(0*t!=0)return n(b,g,p,e);if(b.s=1/t<0?(g=g.slice(1),-1):1,D.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(f+t)}else b.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=j.slice(0,e),h=c=0,m=g.length;ch){h=m;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,c=-1,h=0;continue}return n(b,String(t),p,e)}p=!1,(h=(g=i(g,e,10,b.s)).indexOf("."))>-1?g=g.replace(".",""):h=g.length}for(c=0;48===g.charCodeAt(c);c++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(c,++m)){if(m-=c,p&&D.DEBUG&&m>15&&(t>d||t!==u(t)))throw Error(f+b.s*t);if((h=h-c-1)>C)b.c=b.e=null;else if(h=x)?M(u,a):A(u,a,"0");else if(o=(t=q(new D(t),e,r)).e,s=(u=v(t.c)).length,1==i||2==i&&(e<=o||o<=k)){for(;ss){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-s)>0)for(o+1==s&&(u+=".");e--;u+="0");return t.s<0&&n?"-"+u:u}function z(t,e){for(var r,i=1,n=new D(t[0]);i=10;n/=10,i++);return(r=i+r*l-1)>C?t.c=t.e=null:r=10;h/=10,n++);if((o=e-n)<0)o+=l,a=e,m=(f=g[d=0])/b[n-a-1]%10|0;else if((d=s((o+1)/l))>=g.length){if(!i)break t;for(;g.length<=d;g.push(0));f=m=0,n=1,a=(o%=l)-l+1}else{for(f=h=g[d],n=1;h>=10;h/=10,n++);m=(a=(o%=l)-l+n)<0?0:f/b[n-a-1]%10|0}if(i=i||e<0||null!=g[d+1]||(a<0?f:f%b[n-a-1]),i=r<4?(m||i)&&(0==r||r==(t.s<0?3:2)):m>5||5==m&&(4==r||i||6==r&&(o>0?a>0?f/b[n-a]:0:g[d-1])%10&1||r==(t.s<0?8:7)),e<1||!g[0])return g.length=0,i?(e-=t.e+1,g[0]=b[(l-e%l)%l],t.e=-e||0):g[0]=t.e=0,t;if(0==o?(g.length=d,h=1,d--):(g.length=d+1,h=b[l-o],g[d]=a>0?u(f/b[n-a]%b[a])*h:0),i)for(;;){if(0==d){for(o=1,a=g[0];a>=10;a/=10,o++);for(a=g[0]+=h,h=1;a>=10;a/=10,h++);o!=h&&(t.e++,g[0]==c&&(g[0]=1));break}if(g[d]+=h,g[d]!=c)break;g[d--]=0,h=1}for(o=g.length;0===g[--o];g.pop());}t.e>C?t.c=t.e=null:t.e=x?M(e,r):A(e,r,"0"),t.s<0?"-"+e:e)}return D.clone=t,D.ROUND_UP=0,D.ROUND_DOWN=1,D.ROUND_CEIL=2,D.ROUND_FLOOR=3,D.ROUND_HALF_UP=4,D.ROUND_HALF_DOWN=5,D.ROUND_HALF_EVEN=6,D.ROUND_HALF_CEIL=7,D.ROUND_HALF_FLOOR=8,D.EUCLID=9,D.config=D.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(h+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(w(r=t[e],0,g,e),S=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(w(r=t[e],0,8,e),E=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(w(r[0],-g,0,e),w(r[1],0,g,e),k=r[0],x=r[1]):(w(r,-g,g,e),k=-(x=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)w(r[0],-g,-1,e),w(r[1],1,g,e),B=r[0],C=r[1];else{if(w(r,-g,g,e),!r)throw Error(h+e+" cannot be zero: "+r);B=-(C=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(h+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw T=!r,Error(h+"crypto unavailable");T=r}else T=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(w(r=t[e],0,9,e),P=r),t.hasOwnProperty(e="POW_PRECISION")&&(w(r=t[e],0,g,e),R=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(h+e+" not an object: "+r);O=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(h+e+" invalid: "+r);j=r}}return{DECIMAL_PLACES:S,ROUNDING_MODE:E,EXPONENTIAL_AT:[k,x],RANGE:[B,C],CRYPTO:T,MODULO_MODE:P,POW_PRECISION:R,FORMAT:O,ALPHABET:j}},D.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!D.DEBUG)return!0;var e,r,i=t.c,n=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(i)){if((1===o||-1===o)&&n>=-g&&n<=g&&n===u(n)){if(0===i[0]){if(0===n&&1===i.length)return!0;break t}if((e=(n+1)%l)<1&&(e+=l),String(i[0]).length==e){for(e=0;e=c||r!==u(r))break t;if(0!==r)return!0}}}else if(null===i&&null===n&&(null===o||1===o||-1===o))return!0;throw Error(h+"Invalid BigNumber: "+t)},D.maximum=D.max=function(){return z(arguments,o.lt)},D.minimum=D.min=function(){return z(arguments,o.gt)},D.random=function(){var t=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var r,i,n,o,a,f=0,c=[],d=new D(I);if(null==e?e=S:w(e,0,g),o=s(e/l),T)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(o*=2));f>>11))>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),r[f]=i[0],r[f+1]=i[1]):(c.push(a%1e14),f+=2);f=o/2}else{if(!crypto.randomBytes)throw T=!1,Error(h+"crypto unavailable");for(r=crypto.randomBytes(o*=7);f=9e15?crypto.randomBytes(7).copy(r,f):(c.push(a%1e14),f+=7);f=o/7}if(!T)for(;f=10;a/=10,f++);fr-1&&(null==a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}return function(e,i,n,o,a){var s,u,h,f,c,l,d,p,m=e.indexOf("."),g=S,b=E;for(m>=0&&(f=R,R=0,e=e.replace(".",""),l=(p=new D(i)).pow(e.length-m),R=f,p.c=t(A(v(l.c),l.e,"0"),10,n,"0123456789"),p.e=p.c.length),h=f=(d=t(e,i,n,a?(s=j,"0123456789"):(s="0123456789",j))).length;0==d[--f];d.pop());if(!d[0])return s.charAt(0);if(m<0?--h:(l.c=d,l.e=h,l.s=o,d=(l=r(l,p,g,b,n)).c,c=l.r,h=l.e),m=d[u=h+g+1],f=n/2,c=c||u<0||null!=d[u+1],c=b<4?(null!=m||c)&&(0==b||b==(l.s<0?3:2)):m>f||m==f&&(4==b||c||6==b&&1&d[u-1]||b==(l.s<0?8:7)),u<1||!d[0])e=c?A(s.charAt(1),-g,s.charAt(0)):s.charAt(0);else{if(d.length=u,c)for(--n;++d[--u]>n;)d[u]=0,u||(++h,d=[1].concat(d));for(f=d.length;!d[--f];);for(m=0,e="";m<=f;e+=s.charAt(d[m++]));e=A(e,h,s.charAt(0))}return e}}(),r=function(){function t(t,e,r){var i,n,o,a,s=0,u=t.length,h=e%m,f=e/m|0;for(t=t.slice();u--;)s=((n=h*(o=t[u]%m)+(i=f*o+(a=t[u]/m|0)*h)%m*m+s)/r|0)+(i/m|0)+f*a,t[u]=n%r;return s&&(t=[s].concat(t)),t}function e(t,e,r,i){var n,o;if(r!=i)o=r>i?1:-1;else for(n=o=0;ne[n]?1:-1;break}return o}function r(t,e,r,i){for(var n=0;r--;)t[r]-=n,n=t[r]1;t.splice(0,1));}return function(i,n,o,a,s){var h,f,d,p,m,g,v,y,w,_,M,A,I,S,E,k,x,B=i.s==n.s?1:-1,C=i.c,T=n.c;if(!C||!C[0]||!T||!T[0])return new D(i.s&&n.s&&(C?!T||C[0]!=T[0]:T)?C&&0==C[0]||!T?0*B:B/0:NaN);for(w=(y=new D(B)).c=[],B=o+(f=i.e-n.e)+1,s||(s=c,f=b(i.e/l)-b(n.e/l),B=B/l|0),d=0;T[d]==(C[d]||0);d++);if(T[d]>(C[d]||0)&&f--,B<0)w.push(1),p=!0;else{for(S=C.length,k=T.length,d=0,B+=2,(m=u(s/(T[0]+1)))>1&&(T=t(T,m,s),C=t(C,m,s),k=T.length,S=C.length),I=k,M=(_=C.slice(0,k)).length;M=s/2&&E++;do{if(m=0,(h=e(T,_,k,M))<0){if(A=_[0],k!=M&&(A=A*s+(_[1]||0)),(m=u(A/E))>1)for(m>=s&&(m=s-1),v=(g=t(T,m,s)).length,M=_.length;1==e(g,_,v,M);)m--,r(g,k=10;B/=10,d++);q(y,o+(y.e=d+f*l-1)+1,a,p)}else y.e=f,y.r=+p;return y}}(),n=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,n=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,u){var f,c=s?a:a.replace(n,"");if(i.test(c))o.s=isNaN(c)?null:c<0?-1:1;else{if(!s&&(c=c.replace(t,(function(t,e,r){return f="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=f?t:e})),u&&(f=u,c=c.replace(e,"$1").replace(r,"0.$1")),a!=c))return new D(c,f);if(D.DEBUG)throw Error(h+"Not a"+(u?" base "+u:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var t=new D(this);return t.s<0&&(t.s=1),t},o.comparedTo=function(t,e){return y(this,new D(t,e))},o.decimalPlaces=o.dp=function(t,e){var r,i,n,o=this;if(null!=t)return w(t,0,g),null==e?e=E:w(e,0,8),q(new D(o),t+o.e+1,e);if(!(r=o.c))return null;if(i=((n=r.length-1)-b(this.e/l))*l,n=r[n])for(;n%10==0;n/=10,i--);return i<0&&(i=0),i},o.dividedBy=o.div=function(t,e){return r(this,new D(t,e),S,E)},o.dividedToIntegerBy=o.idiv=function(t,e){return r(this,new D(t,e),0,1)},o.exponentiatedBy=o.pow=function(t,e){var r,i,n,o,a,f,c,d,p=this;if((t=new D(t)).c&&!t.isInteger())throw Error(h+"Exponent not an integer: "+U(t));if(null!=e&&(e=new D(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return d=new D(Math.pow(+U(p),a?2-_(t):+U(t))),e?d.mod(e):d;if(f=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new D(NaN);(i=!f&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&_(t)?-0:0,p.e>-1&&(o=1/o),new D(f?1/o:o);R&&(o=s(R/l+2))}for(a?(r=new D(.5),f&&(t.s=1),c=_(t)):c=(n=Math.abs(+U(t)))%2,d=new D(I);;){if(c){if(!(d=d.times(p)).c)break;o?d.c.length>o&&(d.c.length=o):i&&(d=d.mod(e))}if(n){if(0===(n=u(n/2)))break;c=n%2}else if(q(t=t.times(r),t.e+1,1),t.e>14)c=_(t);else{if(0===(n=+U(t)))break;c=n%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):i&&(p=p.mod(e))}return i?d:(f&&(d=I.div(d)),e?d.mod(e):o?q(d,R,E,void 0):d)},o.integerValue=function(t){var e=new D(this);return null==t?t=E:w(t,0,8),q(e,e.e+1,t)},o.isEqualTo=o.eq=function(t,e){return 0===y(this,new D(t,e))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(t,e){return y(this,new D(t,e))>0},o.isGreaterThanOrEqualTo=o.gte=function(t,e){return 1===(e=y(this,new D(t,e)))||0===e},o.isInteger=function(){return!!this.c&&b(this.e/l)>this.c.length-2},o.isLessThan=o.lt=function(t,e){return y(this,new D(t,e))<0},o.isLessThanOrEqualTo=o.lte=function(t,e){return-1===(e=y(this,new D(t,e)))||0===e},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(t,e){var r,i,n,o,a=this,s=a.s;if(e=(t=new D(t,e)).s,!s||!e)return new D(NaN);if(s!=e)return t.s=-e,a.plus(t);var u=a.e/l,h=t.e/l,f=a.c,d=t.c;if(!u||!h){if(!f||!d)return f?(t.s=-e,t):new D(d?a:NaN);if(!f[0]||!d[0])return d[0]?(t.s=-e,t):new D(f[0]?a:3==E?-0:0)}if(u=b(u),h=b(h),f=f.slice(),s=u-h){for((o=s<0)?(s=-s,n=f):(h=u,n=d),n.reverse(),e=s;e--;n.push(0));n.reverse()}else for(i=(o=(s=f.length)<(e=d.length))?s:e,s=e=0;e0)for(;e--;f[r++]=0);for(e=c-1;i>s;){if(f[--i]=0;){for(r=0,p=A[n]%w,g=A[n]/w|0,o=n+(a=u);o>n;)r=((h=p*(h=M[--a]%w)+(s=g*h+(f=M[a]/w|0)*p)%w*w+v[o]+r)/y|0)+(s/w|0)+g*f,v[o--]=h%y;v[o]=r}return r?++i:v.splice(0,1),K(t,v,i)},o.negated=function(){var t=new D(this);return t.s=-t.s||null,t},o.plus=function(t,e){var r,i=this,n=i.s;if(e=(t=new D(t,e)).s,!n||!e)return new D(NaN);if(n!=e)return t.s=-e,i.minus(t);var o=i.e/l,a=t.e/l,s=i.c,u=t.c;if(!o||!a){if(!s||!u)return new D(n/0);if(!s[0]||!u[0])return u[0]?t:new D(s[0]?i:0*n)}if(o=b(o),a=b(a),s=s.slice(),n=o-a){for(n>0?(a=o,r=u):(n=-n,r=s),r.reverse();n--;r.push(0));r.reverse()}for((n=s.length)-(e=u.length)<0&&(r=u,u=s,s=r,e=n),n=0;e;)n=(s[--e]=s[e]+u[e]+n)/c|0,s[e]=c===s[e]?0:s[e]%c;return n&&(s=[n].concat(s),++a),K(t,s,a)},o.precision=o.sd=function(t,e){var r,i,n,o=this;if(null!=t&&t!==!!t)return w(t,1,g),null==e?e=E:w(e,0,8),q(new D(o),t,e);if(!(r=o.c))return null;if(i=(n=r.length-1)*l+1,n=r[n]){for(;n%10==0;n/=10,i--);for(n=r[0];n>=10;n/=10,i++);}return t&&o.e+1>i&&(i=o.e+1),i},o.shiftedBy=function(t){return w(t,-d,d),this.times("1e"+t)},o.squareRoot=o.sqrt=function(){var t,e,i,n,o,a=this,s=a.c,u=a.s,h=a.e,f=S+4,c=new D("0.5");if(1!==u||!s||!s[0])return new D(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+U(a)))||u==1/0?(((e=v(s)).length+h)%2==0&&(e+="0"),u=Math.sqrt(+e),h=b((h+1)/2)-(h<0||h%2),i=new D(e=u==1/0?"1e"+h:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+h)):i=new D(u+""),i.c[0])for((u=(h=i.e)+f)<3&&(u=0);;)if(o=i,i=c.times(o.plus(r(a,o,f,1))),v(o.c).slice(0,u)===(e=v(i.c)).slice(0,u)){if(i.e0&&m>0){for(o=m%s||s,c=p.substr(0,o);o0&&(c+=f+p.slice(o)),d&&(c="-"+c)}i=l?c+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):c}return(r.prefix||"")+i+(r.suffix||"")},o.toFraction=function(t){var e,i,n,o,a,s,u,f,c,d,m,g,b=this,y=b.c;if(null!=t&&(!(u=new D(t)).isInteger()&&(u.c||1!==u.s)||u.lt(I)))throw Error(h+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+U(u));if(!y)return new D(b);for(e=new D(I),c=i=new D(I),n=f=new D(I),g=v(y),a=e.e=g.length-b.e-1,e.c[0]=p[(s=a%l)<0?l+s:s],t=!t||u.comparedTo(e)>0?a>0?e:c:u,s=C,C=1/0,u=new D(g),f.c[0]=0;d=r(u,e,0,1),1!=(o=i.plus(d.times(n))).comparedTo(t);)i=n,n=o,c=f.plus(d.times(o=c)),f=o,e=u.minus(d.times(o=e)),u=o;return o=r(t.minus(i),n,0,1),f=f.plus(o.times(c)),i=i.plus(o.times(n)),f.s=c.s=b.s,m=r(c,n,a*=2,E).minus(b).abs().comparedTo(r(f,i,a,E).minus(b).abs())<1?[c,n]:[f,i],C=s,m},o.toNumber=function(){return+U(this)},o.toPrecision=function(t,e){return null!=t&&w(t,1,g),N(this,t,e,2)},o.toString=function(t){var e,r=this,n=r.s,o=r.e;return null===o?n?(e="Infinity",n<0&&(e="-"+e)):e="NaN":(null==t?e=o<=k||o>=x?M(v(r.c),o):A(v(r.c),o,"0"):10===t?e=A(v((r=q(new D(r),S+o+1,E)).c),r.e,"0"):(w(t,2,j.length,"Base"),e=i(A(v(r.c),o,"0"),10,t,n,!0)),n<0&&r.c[0]&&(e="-"+e)),e},o.valueOf=o.toJSON=function(){return U(this)},o._isBigNumber=!0,null!=e&&D.set(e),D}()).default=o.BigNumber=o,void 0===(i=function(){return o}.call(e,r,e,t))||(t.exports=i)}()},function(t,e,r){"use strict";var i=r(81).decOut,n=r(123),o=r(3),a=r(3),s=a.hexToCy,u=a.isNewVersion,h=r(45),f=r(143),c=f.genTxParam,l=f.signTx,d=r(324),p=d.Asset,m=d.Token,g=d.Witness,b=d.ZPkg,v=r(144),y=v.selectUtxos,w=v.buildTxParam,_=v.PreTxParam,M=v.utxo,A=r(123),I=A.createPkrHash,S=A.createOldPkrHash,E={account:h,Wallet:n,decOut:i,genSeed:A.genSeed,createPkrHash:I,createOldPkrHash:S,selectUtxos:y,buildTxParam:w,entropyToMnemonic:A.entropyToMnemonic,PreTxParam:_,utxo:M,genTxParam:c,signTx:l,Asset:p,Token:m,Witness:g,ZPkg:b,hexToCy:s,isNewVersion:u,utils:o};t.exports=E},function(t,e){},function(t,e,r){"use strict";var i=r(2).Buffer,n=r(189);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e,r,n,o=i.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=o,n=s,e.copy(r,n),s+=a.data.length,a=a.next;return o},t}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var t=n.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t){var i="undefined"!==typeof t&&t||"undefined"!==typeof self&&self||window,n=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(n.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(n.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(191),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(10))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var i,n=1,o={},a=!1,s=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick((function(){f(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"===typeof r.data&&0===r.data.indexOf(e)&&f(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),i=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){f(t.data)},i=function(e){t.port2.postMessage(e)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var t=s.documentElement;i=function(e){var r=s.createElement("script");r.onreadystatechange=function(){f(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():i=function(t){setTimeout(f,0,t)},u.setImmediate=function(t){"function"!==typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r>>2}function f(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(u,n),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0;c<16;++c)r[c]=t.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var l=0;l<80;++l){var d=~~(l/20),p=0|((e=i)<<5|e>>>27)+f(d,n,o,s)+u+r[l]+a[d];u=s,s=o,o=h(n),n=i,i=p}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var i=r(1),n=r(24),o=r(2).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,n.call(this,64,56)}function h(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function c(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(u,n),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=(e=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=h(i)+c(p,n,o,s)+u+r[d]+a[p]|0;u=s,s=o,o=f(n),n=i,i=m}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var i=r(1),n=r(87),o=r(24),a=r(2).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}i(u,n),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,r){var i=r(1),n=r(88),o=r(24),a=r(2).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}i(u,n),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,r){"use strict";var i=r(1),n=r(2).Buffer,o=r(16),a=n.alloc(128),s=64;function u(t,e){o.call(this,"digest"),"string"===typeof e&&(e=n.from(e)),this._alg=t,this._key=e,e.length>s?e=t(e):e.length>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,i){for(var n=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=e>>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}r[i+0]=n>>>0,r[i+1]=o>>>0},e.rip=function(t,e,r,i){for(var n=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)n<<=1,n|=e>>>s+a&1,n<<=1,n|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;r[i+0]=n>>>0,r[i+1]=o>>>0},e.pc1=function(t,e,r,i){for(var n=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)n<<=1,n|=e>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=t>>s+a&1}for(s=0;s<=24;s+=8)n<<=1,n|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;r[i+0]=n>>>0,r[i+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,r,n){for(var o=0,a=0,s=i.length>>>1,u=0;u>>i[u]&1;for(u=s;u>>i[u]&1;r[n+0]=o>>>0,r[n+1]=a>>>0},e.expand=function(t,e,r){var i=0,n=0;i=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)i<<=6,i|=t>>>o&63;for(o=11;o>=3;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[r+0]=i>>>0,e[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,i=0;i<4;i++){r<<=4,r|=n[64*i+(t>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=n[256+64*i+(e>>>18-6*i&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r>>o[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var i=t.toString(2);i.length0;i--)e+=this._buffer(t,e),r+=this._flushBuffer(n,r);return e+=this._buffer(t,e),n},n.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},n.prototype._pad=function(t,e){if(0===e)return!1;for(;e>>1];r=a.r28shl(r,s),n=a.r28shl(n,s),a.pc2(r,n,t.keys,o)}},h.prototype._update=function(t,e,r,i){var n=this._desState,o=a.readUInt32BE(t,e),s=a.readUInt32BE(t,e+4);a.ip(o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,s,n.tmp,0):this._decrypt(n,o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],a.writeUInt32BE(r,o,i),a.writeUInt32BE(r,s,i+4)},h.prototype._pad=function(t,e){for(var r=t.length-e,i=e;i>>0,o=l}a.rip(s,o,i,n)},h.prototype._decrypt=function(t,e,r,i,n){for(var o=r,s=e,u=t.keys.length-2;u>=0;u-=2){var h=t.keys[u],f=t.keys[u+1];a.expand(o,t.tmp,0),h^=t.tmp[0],f^=t.tmp[1];var c=a.substitute(h,f),l=o;o=(s^a.permute(c))>>>0,s=l}a.rip(o,s,i,n)}},function(t,e,r){"use strict";var i=r(13),n=r(1),o={};function a(t){i.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},l.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r>a%8,t._prev=o(t._prev,r?i:n);return s}function o(t,e){var r=t.length,n=-1,o=i.allocUnsafe(t.length);for(t=i.concat([t,i.from([e])]);++n>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,a=i.allocUnsafe(o),s=-1;++s>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e0;e--)i[e]=i[e]>>>1|(1&i[e-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=o(n)},a.prototype.update=function(t){var e;for(this.cache=i.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(i.concat([this.cache,n],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=a},function(t,e,r){var i=r(99),n=r(2).Buffer,o=r(56),a=r(100),s=r(16),u=r(39),h=r(40);function f(t,e,r){s.call(this),this._cache=new c,this._last=void 0,this._cipher=new u.AES(e),this._prev=n.from(r),this._mode=t,this._autopadding=!0}function c(){this.cache=n.allocUnsafe(0)}function l(t,e,r){var s=o[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof r&&(r=n.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"===typeof e&&(e=n.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===s.type?new a(s.module,e,r,!0):"auth"===s.type?new i(s.module,e,r,!0):new f(s.module,e,r)}r(1)(f,s),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return n.concat(i)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},c.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=h(e,!1,r.key,r.iv);return l(t,i.key,i.iv)},e.createDecipheriv=l},function(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},function(t,e,r){(function(t){var i=r(101),n=r(226),o=r(227);var a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(e){var r=new t(n[e].prime,"hex"),i=new t(n[e].gen,"hex");return new o(r,i)},e.createDiffieHellman=e.DiffieHellman=function e(r,n,s,u){return t.isBuffer(n)||void 0===a[n]?e(r,"binary",n,s):(n=n||"binary",u=u||"binary",s=s||new t([2]),t.isBuffer(s)||(s=new t(s,u)),"number"===typeof r?new o(i(r,s),s,!0):(t.isBuffer(r)||(r=new t(r,n)),new o(r,s,!0)))}}).call(this,r(0).Buffer)},function(t,e){},function(t,e){},function(t){t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(t,e,r){(function(e){var i=r(5),n=new(r(102)),o=new i(24),a=new i(11),s=new i(10),u=new i(3),h=new i(7),f=r(101),c=r(21);function l(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._pub=new i(t),this}function d(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._priv=new i(t),this}t.exports=m;var p={};function m(t,e,r){this.setGenerator(e),this.__prime=new i(t),this._prime=i.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=d):this._primeCode=8}function g(t,r){var i=new e(t.toArray());return r?i.toString(r):i}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!==typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),i=[r,t.toString(16)].join("_");if(i in p)return p[i];var c,l=0;if(t.isEven()||!f.simpleSieve||!f.fermatTest(t)||!n.test(t))return l+=1,l+="02"===r||"05"===r?8:4,p[i]=l,l;switch(n.test(t.shrn(1))||(l+=2),r){case"02":t.mod(o).cmp(a)&&(l+=8);break;case"05":(c=t.mod(s)).cmp(u)&&c.cmp(h)&&(l+=8);break;default:l+=4}return p[i]=l,l}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new i(c(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(t){var r=(t=(t=new i(t)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new e(r.toArray()),o=this.getPrime();if(n.length0&&r.ishrn(i),r}function c(t,r,n){var o,a;do{for(o=new e(0);8*o.length=0&&(a=e,s=r),i.negative&&(i=i.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:i,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],i=e[1],n=i.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),a=n.mul(r.a),s=o.mul(i.a),u=n.mul(r.b),h=o.mul(i.b);return{k1:t.sub(a).sub(s),k2:u.add(h).neg()}},u.prototype.pointFromX=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=i.fromRed().isOdd();return(e&&!o||!e&&o)&&(i=i.redNeg()),this.point(t,i)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,i=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o":""},h.prototype.isInfinity=function(){return this.inf},h.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),i=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},h.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i),o=n.redSqr().redISub(this.x.redAdd(this.x)),a=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},h.prototype.getX=function(){return this.x.fromRed()},h.prototype.getY=function(){return this.y.fromRed()},h.prototype.mul=function(t){return t=new n(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},h.prototype.jmulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},h.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},h.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return e},h.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),u.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),i=this.y.redMul(e).redMul(t);return this.curve.point(r,i)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(e),n=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=i.redSub(n),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=s.redSqr(),f=h.redMul(s),c=i.redMul(h),l=u.redSqr().redIAdd(f).redISub(c).redISub(c),d=u.redMul(c.redISub(l)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(l,d,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,i=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),a=r.redSub(i),s=n.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),h=u.redMul(a),f=r.redMul(u),c=s.redSqr().redIAdd(h).redISub(f).redISub(f),l=s.redMul(f.redISub(c)).redISub(n.redMul(h)),d=this.z.redMul(a);return this.curve.jpoint(c,l,d)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,r){"use strict";var i=r(5),n=r(1),o=r(41),a=r(14);function s(t){o.call(this,"mont",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(e,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(s,o),t.exports=s,s.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),i=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===i.redSqrt().redSqr().cmp(i)},n(u,o.BasePoint),s.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},s.prototype.point=function(t,e){return new u(this,t,e)},s.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),i=t.redMul(e),n=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),a=n.redMul(i),s=e.z.redMul(o.redAdd(a).redSqr()),u=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,i=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,r){"use strict";var i=r(14),n=r(5),o=r(1),a=r(41),s=i.assert;function u(t){this.twisted=1!==(0|t.a),this.mOneA=this.twisted&&-1===(0|t.a),this.extended=this.mOneA,a.call(this,"edwards",t),this.a=new n(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|t.c)}function h(t,e,r,i,o){a.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(e,16),this.y=new n(r,16),this.z=i?new n(i,16):this.curve.one,this.t=o&&new n(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,a),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,i){return this.point(t,e,r,i)},u.prototype.pointFromX=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=i.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(e&&!u||!e&&u)&&(s=s.redNeg()),this.point(t,s)},u.prototype.pointFromY=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),i=e.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===i.cmp(n)},o(h,a.BasePoint),u.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},u.prototype.point=function(t,e,r,i){return new h(this,t,e,r,i)},h.fromJSON=function(t,e){return new h(t,e[0],e[1],e[2])},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},h.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=i.redAdd(e),a=o.redSub(r),s=i.redSub(e),u=n.redMul(a),h=o.redMul(s),f=n.redMul(s),c=a.redMul(o);return this.curve.point(u,h,c,f)},h.prototype._projDbl=function(){var t,e,r,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(h=this.curve._mulA(n)).redAdd(o);if(this.zOne)t=i.redSub(n).redSub(o).redMul(a.redSub(this.curve.two)),e=a.redMul(h.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),u=a.redSub(s).redISub(s);t=i.redSub(n).redISub(o).redMul(u),e=a.redMul(h.redSub(o)),r=a.redMul(u)}}else{var h=n.redAdd(o);s=this.curve._mulC(this.z).redSqr(),u=h.redSub(s).redSub(s);t=this.curve._mulC(i.redISub(h)).redMul(u),e=this.curve._mulC(h).redMul(n.redISub(o)),r=h.redMul(u)}return this.curve.point(t,e,r)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},h.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),a=n.redSub(i),s=n.redAdd(i),u=r.redAdd(e),h=o.redMul(a),f=s.redMul(u),c=o.redMul(u),l=a.redMul(s);return this.curve.point(h,f,l,c)},h.prototype._projAdd=function(t){var e,r,i=this.z.redMul(t.z),n=i.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),u=n.redSub(s),h=n.redAdd(s),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),c=i.redMul(u).redMul(f);return this.curve.twisted?(e=i.redMul(h).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(h)):(e=i.redMul(h).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(h)),this.curve.point(c,e,r)},h.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},h.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},h.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},h.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},h.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()},h.prototype.getY=function(){return this.normalize(),this.y.fromRed()},h.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},h.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(i),0===this.x.cmp(e))return!0}},h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add},function(t,e,r){"use strict";e.sha1=r(235),e.sha224=r(236),e.sha256=r(106),e.sha384=r(237),e.sha512=r(107)},function(t,e,r){"use strict";var i=r(15),n=r(34),o=r(105),a=i.rotl32,s=i.sum32,u=i.sum32_5,h=o.ft_1,f=n.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(l,f),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;ithis.blockSize&&(t=(new this.Hash).update(t).digest()),n(t.length<=this.blockSize);for(var e=t.length;e0))return a.iaddn(1),this.keyFromPrivate(a)}},c.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(t,e,r,o){"object"===typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new i(t,16));for(var a=this.n.byteLength(),s=e.getPrivate().toArray("be",a),u=t.toArray("be",a),h=new n({hash:this.hash,entropy:s,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),c=this.n.sub(new i(1)),l=0;;l++){var d=o.k?o.k(l):new i(h.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(c)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var b=d.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new f({r:g,s:b,recoveryParam:v})}}}}}},c.prototype.verify=function(t,e,r,n){t=this._truncateToN(new i(t,16)),r=this.keyFromPublic(r,n);var o=(e=new f(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),h=u.mul(t).umod(this.n),c=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(h,r.getPublic(),c)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(h,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(t,e,r,n){u((3&r)===r,"The recovery param is more than two bits"),e=new f(e,n);var o=this.n,a=new i(t),s=e.r,h=e.s,c=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var d=e.r.invm(o),p=o.sub(a).mul(d).umod(o),m=h.mul(d).umod(o);return this.g.mulAdd(p,s,m)},c.prototype.getKeyRecoveryParam=function(t,e,r,i){if(null!==(e=new f(e,i)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(t,e,n)}catch(t){continue}if(o.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},function(t,e,r){"use strict";var i=r(61),n=r(103),o=r(13);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=n.toArray(t.entropy,t.entropyEnc||"hex"),r=n.toArray(t.nonce,t.nonceEnc||"hex"),i=n.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}t.exports=a,a.prototype._init=function(t,e,r){var i=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},a.prototype.generate=function(t,e,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof e&&(i=r,r=e,e=null),r&&(r=n.toArray(r,i||"hex"),this._update(r));for(var o=[];o.length"}},function(t,e,r){"use strict";var i=r(5),n=r(14),o=n.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new i(t.r,16),this.s=new i(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;for(var i=15&r,n=0,o=0,a=e.place;o>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=a,a.prototype._importDER=function(t,e){t=n.toArray(t,e);var r=new s;if(48!==t[r.place++])return!1;if(u(t,r)+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var o=u(t,r),a=t.slice(r.place,o+r.place);if(r.place+=o,2!==t[r.place++])return!1;var h=u(t,r);if(t.length!==h+r.place)return!1;var f=t.slice(r.place,h+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===f[0]&&128&f[1]&&(f=f.slice(1)),this.r=new i(a),this.s=new i(f),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=h(e),r=h(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var i=[2];f(i,e.length),(i=i.concat(e)).push(2),f(i,r.length);var o=i.concat(r),a=[48];return f(a,o.length),a=a.concat(o),n.encode(a,t)}},function(t,e,r){"use strict";var i=r(61),n=r(60),o=r(14),a=o.assert,s=o.parseBytes,u=r(246),h=r(247);function f(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=n[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=i.sha512}t.exports=f,f.prototype.sign=function(t,e){t=s(t);var r=this.keyFromSecret(e),i=this.hashInt(r.messagePrefix(),t),n=this.g.mul(i),o=this.encodePoint(n),a=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=i.add(a).umod(this.curve.n);return this.makeSignature({R:n,S:u,Rencoded:o})},f.prototype.verify=function(t,e,r){t=s(t),e=this.makeSignature(e);var i=this.keyFromPublic(r),n=this.hashInt(e.Rencoded(),i.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(i.pub().mul(n)).eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e=e)throw new Error("invalid sig")}t.exports=function(t,r,u,h,f){var c=o(u);if("ec"===c.type){if("ecdsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");return function(t,e,r){var i=a[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new n(i),s=r.data.subjectPrivateKey.data;return o.verify(e,t,s)}(t,r,c)}if("dsa"===c.type){if("dsa"!==h)throw new Error("wrong public key type");return function(t,e,r){var n=r.data.p,a=r.data.q,u=r.data.g,h=r.data.pub_key,f=o.signature.decode(t,"der"),c=f.s,l=f.r;s(c,a),s(l,a);var d=i.mont(n),p=c.invm(a);return 0===u.toRed(d).redPow(new i(e).mul(p).mod(a)).fromRed().mul(h.toRed(d).redPow(l.mul(p).mod(a)).fromRed()).mod(n).mod(a).cmp(l)}(t,r,c)}if("rsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");r=e.concat([f,r]);for(var l=c.modulus.byteLength(),d=[1],p=0;r.length+d.length+2r-l-2)throw new Error("message too long");var d=c.alloc(r-i-l-2),p=r-f-1,m=n(f),g=s(c.concat([h,d,c.alloc(1,1),e],p),a(m,p)),b=s(m,a(g,f));return new u(c.concat([c.alloc(1),b,g],r))}(p,e);else if(1===l)d=function(t,e,r){var i,o=e.length,a=t.modulus.byteLength();if(o>a-11)throw new Error("message too long");i=r?c.alloc(a-o-3,255):function(t){var e,r=c.allocUnsafe(t),i=0,o=n(2*t),a=0;for(;i=0)throw new Error("data too long for modulus")}return r?f(d,p):h(d,p)}},function(t,e,r){var i=r(42),n=r(113),o=r(114),a=r(5),s=r(58),u=r(30),h=r(115),f=r(2).Buffer;t.exports=function(t,e,r){var c;c=t.padding?t.padding:r?1:4;var l,d=i(t),p=d.modulus.byteLength();if(e.length>p||new a(e).cmp(d.modulus)>=0)throw new Error("decryption error");l=r?h(new a(e),d):s(e,d);var m=f.alloc(p-l.length);if(l=f.concat([m,l],p),4===c)return function(t,e){var r=t.modulus.byteLength(),i=u("sha1").update(f.alloc(0)).digest(),a=i.length;if(0!==e[0])throw new Error("decryption error");var s=e.slice(1,a+1),h=e.slice(a+1),c=o(s,n(h,a)),l=o(h,n(c,r-a-1));if(function(t,e){t=f.from(t),e=f.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));var n=-1;for(;++n=e.length){o++;break}var a=e.slice(2,n-1);("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(n)}(0,l,r);if(3===c)return l;throw new Error("unknown padding")}},function(t,e,r){"use strict";(function(t,i){function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(2),a=r(21),s=o.Buffer,u=o.kMaxLength,h=t.crypto||t.msCrypto,f=Math.pow(2,32)-1;function c(t,e){if("number"!==typeof t||t!==t)throw new TypeError("offset must be a number");if(t>f||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function l(t,e,r){if("number"!==typeof t||t!==t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>u)throw new RangeError("buffer too small")}function d(t,e,r,n){if(i.browser){var o=t.buffer,s=new Uint8Array(o,e,r);return h.getRandomValues(s),n?void i.nextTick((function(){n(null,t)})):t}if(!n)return a(r).copy(t,e),t;a(r,(function(r,i){if(r)return n(r);i.copy(t,e),n(null,t)}))}h&&h.getRandomValues||!i.browser?(e.randomFill=function(e,r,i,n){if(!s.isBuffer(e)&&!(e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof r)n=r,r=0,i=e.length;else if("function"===typeof i)n=i,i=e.length-r;else if("function"!==typeof n)throw new TypeError('"cb" argument must be a function');return c(r,e.length),l(i,r,e.length),d(e,r,i,n)},e.randomFillSync=function(e,r,i){"undefined"===typeof r&&(r=0);if(!s.isBuffer(e)&&!(e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');c(r,e.length),void 0===i&&(i=e.length-r);return l(i,r,e.length),d(e,r,i)}):(e.randomFill=n,e.randomFillSync=n)}).call(this,r(10),r(8))},function(t,e,r){var i=r(116),n=r(268);function o(t,e,r){var i=t[e]+t[r],n=t[e+1]+t[r+1];i>=4294967296&&n++,t[e]=i,t[e+1]=n}function a(t,e,r,i){var n=t[e]+r;r<0&&(n+=4294967296);var o=t[e+1]+i;n>=4294967296&&o++,t[e]=n,t[e+1]=o}function s(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function u(t,e,r,i,n,s){var u=l[n],h=l[n+1],f=l[s],d=l[s+1];o(c,t,e),a(c,t,u,h);var p=c[i]^c[t],m=c[i+1]^c[t+1];c[i]=m,c[i+1]=p,o(c,r,i),p=c[e]^c[r],m=c[e+1]^c[r+1],c[e]=p>>>24^m<<8,c[e+1]=m>>>24^p<<8,o(c,t,e),a(c,t,f,d),p=c[i]^c[t],m=c[i+1]^c[t+1],c[i]=p>>>16^m<<16,c[i+1]=m>>>16^p<<16,o(c,r,i),p=c[e]^c[r],m=c[e+1]^c[r+1],c[e]=m>>>31^p<<1,c[e+1]=p>>>31^m<<1}var h=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),f=new Uint8Array([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].map((function(t){return 2*t}))),c=new Uint32Array(32),l=new Uint32Array(32);function d(t,e){var r=0;for(r=0;r<16;r++)c[r]=t.h[r],c[r+16]=h[r];for(c[24]=c[24]^t.t,c[25]=c[25]^t.t/4294967296,e&&(c[28]=~c[28],c[29]=~c[29]),r=0;r<32;r++)l[r]=s(t.b,4*r);for(r=0;r<12;r++)u(0,8,16,24,f[16*r+0],f[16*r+1]),u(2,10,18,26,f[16*r+2],f[16*r+3]),u(4,12,20,28,f[16*r+4],f[16*r+5]),u(6,14,22,30,f[16*r+6],f[16*r+7]),u(0,10,20,30,f[16*r+8],f[16*r+9]),u(2,12,22,24,f[16*r+10],f[16*r+11]),u(4,14,16,26,f[16*r+12],f[16*r+13]),u(6,8,18,28,f[16*r+14],f[16*r+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^c[r]^c[r+16]}var p=new Uint8Array([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]);function m(t,e,r,i){p.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=t,p[0]=t,e&&(p[1]=e.length),p[2]=1,p[3]=1,r&&p.set(r,32),i&&p.set(i,48);for(var n=0;n<16;n++)this.h[n]=h[n]^s(p,4*n);e&&(g(this,e),this.c=128)}function g(t,e){for(var r=0;r=this.outlen,"out must have at least outlen bytes of space"),function(t,e){t.t+=t.c;for(;t.c<128;)t.b[t.c++]=0;d(t,!0);for(var r=0;r>2]>>8*(3&r)}(this,e),"hex"===t?function(t){for(var e="",r=0;r=y,"outlen must be at least "+y+", was given "+t),i(t<=w,"outlen must be at most "+w+", was given "+t),null!=e&&i(e.length>=_,"key must be at least "+_+", was given "+e.length),null!=e&&i(e.length<=M,"key must be at most "+M+", was given "+e.length),null!=r&&i(r.length===A,"salt must be exactly "+A+", was given "+r.length),null!=n&&i(n.length===I,"personal must be exactly "+I+", was given "+n.length)),new v(t,e,r,n)},t.exports.ready=function(t){n.ready((function(){t()}))},t.exports.WASM_SUPPORTED=n.SUPPORTED,t.exports.WASM_LOADED=!1;var y=t.exports.BYTES_MIN=16,w=t.exports.BYTES_MAX=64,_=(t.exports.BYTES=32,t.exports.KEYBYTES_MIN=16),M=t.exports.KEYBYTES_MAX=64,A=(t.exports.KEYBYTES=32,t.exports.SALTBYTES=16),I=t.exports.PERSONALBYTES=16;n.ready((function(e){e||(t.exports.WASM_LOADED=!0,v=n)}))},function(t,e,r){var i=r(116),n=r(269)(),o=64,a=[];t.exports=d;var s=t.exports.BYTES_MIN=16,u=t.exports.BYTES_MAX=64,h=(t.exports.BYTES=32,t.exports.KEYBYTES_MIN=16),f=t.exports.KEYBYTES_MAX=64,c=(t.exports.KEYBYTES=32,t.exports.SALTBYTES=16),l=t.exports.PERSONALBYTES=16;function d(t,e,r,p,m){if(!(this instanceof d))return new d(t,e,r,p,m);if(!n||!n.exports)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");t||(t=32),!0!==m&&(i(t>=s,"digestLength must be at least "+s+", was given "+t),i(t<=u,"digestLength must be at most "+u+", was given "+t),null!=e&&i(e.length>=h,"key must be at least "+h+", was given "+e.length),null!=e&&i(e.length<=f,"key must be at least "+f+", was given "+e.length),null!=r&&i(r.length===c,"salt must be exactly "+c+", was given "+r.length),null!=p&&i(p.length===l,"personal must be exactly "+l+", was given "+p.length)),a.length||(a.push(o),o+=216),this.digestLength=t,this.finalized=!1,this.pointer=a.pop(),n.memory.fill(0,0,64),n.memory[0]=this.digestLength,n.memory[1]=e?e.length:0,n.memory[2]=1,n.memory[3]=1,r&&n.memory.set(r,32),p&&n.memory.set(p,48),this.pointer+216>n.memory.length&&n.realloc(this.pointer+216),n.exports.blake2b_init(this.pointer,this.digestLength),e&&(this.update(e),n.memory.fill(0,o,o+e.length),n.memory[this.pointer+200]=128)}function p(){}function m(t){return t<16?"0"+t.toString(16):t.toString(16)}d.prototype.update=function(t){return i(!1===this.finalized,"Hash instance finalized"),i(t,"input must be TypedArray or Buffer"),o+t.length>n.memory.length&&n.realloc(o+t.length),n.memory.set(t,o),n.exports.blake2b_update(this.pointer,o,o+t.length),this},d.prototype.digest=function(t){if(i(!1===this.finalized,"Hash instance finalized"),this.finalized=!0,a.push(this.pointer),n.exports.blake2b_final(this.pointer),!t||"binary"===t)return n.memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if("hex"===t)return function(t,e,r){for(var i="",n=0;n=this.digestLength,"input must be TypedArray or Buffer");for(var e=0;et)throw new Error("bad digestLength");var f,c,l;this.digestLength=u;var d=0;if(a(h))d=(f=h).length;else if("object"===typeof h)!function(t){for(var e in t)switch(e){case"key":case"personalization":case"salt":if(!a(t[e]))throw new TypeError(e+" must be a Uint8Array or an Array of bytes");break;default:throw new Error("unexpected key in config: "+e)}}(h),d=(f=h.key)?f.length:0,l=h.salt,c=h.personalization;else if(h)throw new Error("unexpected key or config type");if(d>r)throw new Error("key is too long");if(l&&l.length!==n)throw new Error("salt must be "+n+" bytes");if(c&&c.length!==i)throw new Error("personalization must be "+i+" bytes");this.isFinished=!1,this.h=new Uint32Array(o);var p=new Uint8Array([255&u,d,1,1]);if(this.h[0]^=s(p,0),l&&(this.h[4]^=s(l,0),this.h[5]^=s(l,4)),c&&(this.h[6]^=s(c,0),this.h[7]^=s(c,4)),this.x=new Uint8Array(e),this.nx=0,this.t0=0,this.t1=0,this.f0=0,this.f1=0,d>0){for(var m=0;m>>0&&(this.t0=0,this.t1++);var e=this.h[0],r=this.h[1],i=this.h[2],n=this.h[3],a=this.h[4],s=this.h[5],u=this.h[6],h=this.h[7],f=o[0],c=o[1],l=o[2],d=o[3],p=o[4]^this.t0,m=o[5]^this.t1,g=o[6]^this.f0,b=o[7]^this.f1,v=this.x,y=255&v[0]|(255&v[1])<<8|(255&v[2])<<16|(255&v[3])<<24,w=255&v[4]|(255&v[5])<<8|(255&v[6])<<16|(255&v[7])<<24,_=255&v[8]|(255&v[9])<<8|(255&v[10])<<16|(255&v[11])<<24,M=255&v[12]|(255&v[13])<<8|(255&v[14])<<16|(255&v[15])<<24,A=255&v[16]|(255&v[17])<<8|(255&v[18])<<16|(255&v[19])<<24,I=255&v[20]|(255&v[21])<<8|(255&v[22])<<16|(255&v[23])<<24,S=255&v[24]|(255&v[25])<<8|(255&v[26])<<16|(255&v[27])<<24,E=255&v[28]|(255&v[29])<<8|(255&v[30])<<16|(255&v[31])<<24,k=255&v[32]|(255&v[33])<<8|(255&v[34])<<16|(255&v[35])<<24,x=255&v[36]|(255&v[37])<<8|(255&v[38])<<16|(255&v[39])<<24,B=255&v[40]|(255&v[41])<<8|(255&v[42])<<16|(255&v[43])<<24,C=255&v[44]|(255&v[45])<<8|(255&v[46])<<16|(255&v[47])<<24,T=255&v[48]|(255&v[49])<<8|(255&v[50])<<16|(255&v[51])<<24,P=255&v[52]|(255&v[53])<<8|(255&v[54])<<16|(255&v[55])<<24,R=255&v[56]|(255&v[57])<<8|(255&v[58])<<16|(255&v[59])<<24,O=255&v[60]|(255&v[61])<<8|(255&v[62])<<16|(255&v[63])<<24;a=(a^=f=f+(p=(p^=e=(e=e+y|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+_|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+A|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+S|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+I|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+E|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+M|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+w|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+k|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+B|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+T|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+R|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+P|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+O|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+C|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+x|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+R|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+A|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+x|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+P|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+O|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+S|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+k|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+B|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+w|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+y|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+C|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+I|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+E|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+M|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+_|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+T|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+C|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+T|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+I|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+O|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+_|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+P|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+y|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+k|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+B|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+M|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+E|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+x|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+w|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+A|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+S|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+R|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+E|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+M|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+P|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+C|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+T|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+R|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+w|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+x|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+_|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+I|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+A|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+O|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+y|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+k|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+B|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+S|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+x|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+I|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+_|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+B|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+A|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+O|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+E|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+y|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+R|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+C|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+S|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+M|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+k|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+P|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+T|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+w|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+_|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+S|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+y|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+k|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+C|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+M|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+B|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+T|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+A|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+E|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+O|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+w|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+R|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+x|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+I|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+P|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+T|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+w|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+R|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+A|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+P|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+B|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+O|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+I|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+y|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+S|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+x|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+k|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+_|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+C|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+M|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+E|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+P|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+E|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+T|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+M|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+w|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+x|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+R|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+C|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+I|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+O|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+k|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+_|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+S|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+B|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+A|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+y|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+S|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+R|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+C|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+y|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+M|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+k|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+x|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+O|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+T|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+P|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+w|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+B|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+A|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+I|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+E|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+_|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+B|0)+a|0)<<16|p>>>16)|0)<<20|a>>>12,s=(s^=c=c+(m=(m^=r=(r=r+k|0)+s|0)<<16|m>>>16)|0)<<20|s>>>12,u=(u^=l=l+(g=(g^=i=(i=i+E|0)+u|0)<<16|g>>>16)|0)<<20|u>>>12,h=(h^=d=d+(b=(b^=n=(n=n+w|0)+h|0)<<16|b>>>16)|0)<<20|h>>>12,u=(u^=l=l+(g=(g^=i=(i=i+S|0)+u|0)<<24|g>>>8)|0)<<25|u>>>7,h=(h^=d=d+(b=(b^=n=(n=n+I|0)+h|0)<<24|b>>>8)|0)<<25|h>>>7,s=(s^=c=c+(m=(m^=r=(r=r+A|0)+s|0)<<24|m>>>8)|0)<<25|s>>>7,a=(a^=f=f+(p=(p^=e=(e=e+_|0)+a|0)<<24|p>>>8)|0)<<25|a>>>7,s=(s^=l=l+(b=(b^=e=(e=e+O|0)+s|0)<<16|b>>>16)|0)<<20|s>>>12,u=(u^=d=d+(p=(p^=r=(r=r+x|0)+u|0)<<16|p>>>16)|0)<<20|u>>>12,h=(h^=f=f+(m=(m^=i=(i=i+M|0)+h|0)<<16|m>>>16)|0)<<20|h>>>12,a=(a^=c=c+(g=(g^=n=(n=n+P|0)+a|0)<<16|g>>>16)|0)<<20|a>>>12,h=(h^=f=f+(m=(m^=i=(i=i+T|0)+h|0)<<24|m>>>8)|0)<<25|h>>>7,a=(a^=c=c+(g=(g^=n=(n=n+y|0)+a|0)<<24|g>>>8)|0)<<25|a>>>7,u=(u^=d=d+(p=(p^=r=(r=r+R|0)+u|0)<<24|p>>>8)|0)<<25|u>>>7,s=(s^=l=l+(b=(b^=e=(e=e+C|0)+s|0)<<24|b>>>8)|0)<<25|s>>>7,this.h[0]^=e^f,this.h[1]^=r^c,this.h[2]^=i^l,this.h[3]^=n^d,this.h[4]^=a^p,this.h[5]^=s^m,this.h[6]^=u^g,this.h[7]^=h^b},u.prototype.update=function(t,e,r){if("string"===typeof t)throw new TypeError("update() accepts Uint8Array or an Array of bytes");if(this.isFinished)throw new Error("update() after calling digest()");if("undefined"===typeof e&&(e=0),"undefined"===typeof r&&(r=t.length-e),0===r)return this;var i,n=64-this.nx;if(r>n){for(i=0;i64;){for(i=0;i<64;i++)this.x[i]=t[e+i];this.processBlock(64),e+=64,r-=64,this.nx=0}for(i=0;i>>0&255,e[4*t+1]=r>>>8&255,e[4*t+2]=r>>>16&255,e[4*t+3]=r>>>24&255}return this.result=new Uint8Array(e.subarray(0,this.digestLength)),this.isFinished=!0,this.result},u.prototype.hexDigest=function(){for(var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],e=[],r=this.digest(),i=0;i>4&15]),e.push(t[15&r[i]]);return e.join("")},u.digestLength=t,u.blockLength=e,u.keyLength=r,u.saltLength=n,u.personalizationLength=i,u}();t.exports&&(t.exports=i)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(274),n=r(119),o=r(3),a=r(44),s=r(4),u=r(37),h=r(6);e.genOutCm=function(e,r,f,c){if(e=u.newAsset(e),r=o.toBuffer(r),f=h.newFR(f),c=a.newPKr(c),s(64==r.length),e.isValid()&&c.isValid()){var l=i.genAssetCurrency(e.tkn_currency).mult(e.tkn_value);o.default.isEmptyBuffer(e.tkt_value,32)||(l=l.add(i.genAssetTkt(e.tkt_category,e.tkt_value)));var d=t.concat([l.toBuffer(),r,c.VPK.toBuffer(),c.BASE.toBuffer(),f.toBuffer()]);return s(192==d.length,"blob.length != 192,"),i.outCmBase.mult(new n.BitBuffer(d))}}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(117),n=r(118),o=r(17),a=r(3),s=r(4);e.outCmBase=new i.Group("$SROOUTCMGEN",8,192,4),e.genAssetTkt=function(e,r){e=a.toBuffer(e),r=a.toBuffer(r),s(32==e.length),s(32==r.length);var i=t.concat([e,r]),u=n.findPoint("$SROASSETTK",o.blake2b("$SROASSETTK.H",i));if(!u)throw new Error("find point error");return u},e.genAssetCurrency=function(t){t=a.toBuffer(t),s(32==t.length);var e=n.findPoint("$SROASSETCY",t);if(!e)throw new Error("find point error");return e}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(37),n=r(6),o=r(64),a=r(3),s=r(4),u=function(){function e(t,e,r){this.asset=i.newAsset(t),this.rsk=n.newFR(e),this.memo=a.toBuffer(r)}return e.prototype.isValid=function(){return!!this.asset.isValid()&&!this.rsk.isZero()},e.prototype.toBuffer=function(){return t.concat([this.asset.toBuffer(),this.rsk.toBuffer(),this.memo])},e.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},e}();function h(e){if(e instanceof u)return e;var r=a.toBuffer(e);return s(224==r.length),new u(i.newAsset(r.slice(0,128)),new n.FR(r.slice(128,160)),t.from(r.slice(160,224)))}e.Info=u,e.newInfo=h,e.encInfo=function(t,e){t=a.toBuffer(t),e=h(e),s(32==t.length);var r=e.toBuffer();return o.default(r,t)},e.decEInfo=function(t,e,r){return s(r,"flag must true"),t=a.toBuffer(t),e=a.toBuffer(e),s(224==t.length),s(32==e.length),h(o.default(t,e))}}).call(this,r(0).Buffer)},function(t,e,r){t.exports=r(277)},function(t,e,r){(function(e){var i=r(124).pbkdf2Sync,n=2147483647;function o(t,r,i,n,o){if(e.isBuffer(t)&&e.isBuffer(i))t.copy(i,n,r,r+o);else for(;o--;)i[n++]=t[r++]}t.exports=function(t,r,a,s,u,h,f){if(0===a||0!==(a&a-1))throw Error("N must be > 0 and a power of 2");if(a>n/128/s)throw Error("Parameter N is too large");if(s>n/128/u)throw Error("Parameter r is too large");var c,l=new e(256*s),d=new e(128*s*a),p=new Int32Array(16),m=new Int32Array(16),g=new e(64),b=i(t,r,1,128*u*s,"sha256");if(f){var v=u*a*2,y=0;c=function(){++y%1e3===0&&f({current:y,total:v,percent:y/v*100})}}for(var w=0;w>>32-e}function I(t){var e;for(e=0;e<16;e++)p[e]=(255&t[4*e+0])<<0,p[e]|=(255&t[4*e+1])<<8,p[e]|=(255&t[4*e+2])<<16,p[e]|=(255&t[4*e+3])<<24;for(o(p,0,m,0,16),e=8;e>0;e-=2)m[4]^=A(m[0]+m[12],7),m[8]^=A(m[4]+m[0],9),m[12]^=A(m[8]+m[4],13),m[0]^=A(m[12]+m[8],18),m[9]^=A(m[5]+m[1],7),m[13]^=A(m[9]+m[5],9),m[1]^=A(m[13]+m[9],13),m[5]^=A(m[1]+m[13],18),m[14]^=A(m[10]+m[6],7),m[2]^=A(m[14]+m[10],9),m[6]^=A(m[2]+m[14],13),m[10]^=A(m[6]+m[2],18),m[3]^=A(m[15]+m[11],7),m[7]^=A(m[3]+m[15],9),m[11]^=A(m[7]+m[3],13),m[15]^=A(m[11]+m[7],18),m[1]^=A(m[0]+m[3],7),m[2]^=A(m[1]+m[0],9),m[3]^=A(m[2]+m[1],13),m[0]^=A(m[3]+m[2],18),m[6]^=A(m[5]+m[4],7),m[7]^=A(m[6]+m[5],9),m[4]^=A(m[7]+m[6],13),m[5]^=A(m[4]+m[7],18),m[11]^=A(m[10]+m[9],7),m[8]^=A(m[11]+m[10],9),m[9]^=A(m[8]+m[11],13),m[10]^=A(m[9]+m[8],18),m[12]^=A(m[15]+m[14],7),m[13]^=A(m[12]+m[15],9),m[14]^=A(m[13]+m[12],13),m[15]^=A(m[14]+m[13],18);for(e=0;e<16;++e)p[e]=m[e]+p[e];for(e=0;e<16;e++){var r=4*e;t[r+0]=p[e]>>0&255,t[r+1]=p[e]>>8&255,t[r+2]=p[e]>>16&255,t[r+3]=p[e]>>24&255}}function S(t,e,r,i,n){for(var o=0;o0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e,r,i,n=a.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=n,i=s,a.prototype.copy.call(e,r,i),s+=o.data.length,o=o.next;return n}},{key:"consume",value:function(t,e){var r;return tn.length?n.length:t;if(o===n.length?i+=n:i+=n.slice(0,t),0===(t-=o)){o===n.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var n=r.data,o=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,o),0===(t-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(o));break}++i}return this.length-=i,e}},{key:u,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){f||(f=t),t&&l.forEach(u),o||(l.forEach(u),c(f))}))}));return e.reduce(h)}},function(t,e,r){var i=r(9),n=r(28),o=r(7).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,n.call(this,64,56)}function h(t){return t<<30|t>>>2}function f(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(u,n),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0;c<16;++c)r[c]=t.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var l=0;l<80;++l){var d=~~(l/20),p=0|((e=i)<<5|e>>>27)+f(d,n,o,s)+u+r[l]+a[d];u=s,s=o,o=h(n),n=i,i=p}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var i=r(9),n=r(28),o=r(7).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,n.call(this,64,56)}function h(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function c(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}i(u,n),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=(e=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=h(i)+c(p,n,o,s)+u+r[d]+a[p]|0;u=s,s=o,o=f(n),n=i,i=m}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var i=r(9),n=r(138),o=r(28),a=r(7).Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}i(u,n),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,r){var i=r(9),n=r(139),o=r(28),a=r(7).Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}i(u,n),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,r){var i=r(294),n=r(295);t.exports=function(t,e,r){var o=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var a=(t=t||{}).random||(t.rng||i)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var s=0;s<16;++s)e[o+s]=a[s];return e||n(a)}},function(t,e){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var i=new Uint8Array(16);t.exports=function(){return r(i),i}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0===(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}},function(t,e){for(var r=[],i=0;i<256;++i)r[i]=(i+256).toString(16).substr(1);t.exports=function(t,e){var i=e||0,n=r;return[n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]]].join("")}},function(t,e,r){"use strict";(function(t){var i=r(297);Object.defineProperty(e,"__esModule",{value:!0});var n=r(301),o=r(124),a=r(43),s=r(141),u=s._default,h="Invalid mnemonic",f="Invalid entropy",c="Invalid mnemonic checksum",l="A wordlist is required but a default could not be found.\nPlease explicitly pass a 2048 word array explicitly.";function d(t,e,r){for(;t.length32)throw new Error(f);if(m.length%4!==0)throw new Error(f);var b=t.from(m);if(g(b)!==s)throw new Error(c);return b.toString("hex")}function y(e,r){if(t.isBuffer(e)||(e=t.from(e,"hex")),!(r=r||u))throw new Error(l);if(e.length<16)throw new TypeError(f);if(e.length>32)throw new TypeError(f);if(e.length%4!==0)throw new TypeError(f);var n=(m(i(e))+g(e)).match(/(.{1,11})/g).map((function(t){var e=p(t);return r[e]}));return"\u3042\u3044\u3053\u304f\u3057\u3093"===r[0]?n.join("\u3000"):n.join(" ")}e.mnemonicToSeedSync=function(e,r){var i=t.from((e||"").normalize("NFKD"),"utf8"),n=t.from(b((r||"").normalize("NFKD")),"utf8");return o.pbkdf2Sync(i,n,2048,64,"sha512")},e.mnemonicToSeed=function(e,r){return new Promise((function(i,n){try{var a=t.from((e||"").normalize("NFKD"),"utf8"),s=t.from(b((r||"").normalize("NFKD")),"utf8");o.pbkdf2(a,s,2048,64,"sha512",(function(t,e){return t?n(t):i(e)}))}catch(u){return n(u)}}))},e.mnemonicToEntropy=v,e.entropyToMnemonic=y,e.generateMnemonic=function(t,e,r){if((t=t||128)%32!==0)throw new TypeError(f);return y((e=e||a)(t/8),r)},e.validateMnemonic=function(t,e){try{v(t,e)}catch(r){return!1}return!0},e.setDefaultWordlist=function(t){var e=s.wordlists[t];if(!e)throw new Error('Could not find wordlist for language "'+t+'"');u=e},e.getDefaultWordlist=function(){if(!u)throw new Error("No Default Wordlist set");return Object.keys(s.wordlists).filter((function(t){return"JA"!==t&&"EN"!==t&&s.wordlists[t].every((function(t,e){return t===u[e]}))}))[0]};var w=r(141);e.wordlists=w.wordlists}).call(this,r(0).Buffer)},function(t,e,r){var i=r(298),n=r(299),o=r(300);t.exports=function(t){return i(t)||n(t)||o()}},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return e},o.prototype.copy=function(t){for(var e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=o},function(t,e,r){"use strict";var i=[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];e.p1600=function(t){for(var e=0;e<24;++e){var r=t[0]^t[10]^t[20]^t[30]^t[40],n=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],s=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],c=t[8]^t[18]^t[28]^t[38]^t[48],l=t[9]^t[19]^t[29]^t[39]^t[49],d=c^(o<<1|a>>>31),p=l^(a<<1|o>>>31),m=t[0]^d,g=t[1]^p,b=t[10]^d,v=t[11]^p,y=t[20]^d,w=t[21]^p,_=t[30]^d,M=t[31]^p,A=t[40]^d,I=t[41]^p;d=r^(s<<1|u>>>31),p=n^(u<<1|s>>>31);var S=t[2]^d,E=t[3]^p,k=t[12]^d,x=t[13]^p,B=t[22]^d,C=t[23]^p,T=t[32]^d,P=t[33]^p,R=t[42]^d,O=t[43]^p;d=o^(h<<1|f>>>31),p=a^(f<<1|h>>>31);var j=t[4]^d,D=t[5]^p,N=t[14]^d,z=t[15]^p,K=t[24]^d,q=t[25]^p,U=t[34]^d,F=t[35]^p,L=t[44]^d,Q=t[45]^p;d=s^(c<<1|l>>>31),p=u^(l<<1|c>>>31);var H=t[6]^d,V=t[7]^p,Z=t[16]^d,G=t[17]^p,Y=t[26]^d,W=t[27]^p,J=t[36]^d,X=t[37]^p,$=t[46]^d,tt=t[47]^p;d=h^(r<<1|n>>>31),p=f^(n<<1|r>>>31);var et=t[8]^d,rt=t[9]^p,it=t[18]^d,nt=t[19]^p,ot=t[28]^d,at=t[29]^p,st=t[38]^d,ut=t[39]^p,ht=t[48]^d,ft=t[49]^p,ct=m,lt=g,dt=v<<4|b>>>28,pt=b<<4|v>>>28,mt=y<<3|w>>>29,gt=w<<3|y>>>29,bt=M<<9|_>>>23,vt=_<<9|M>>>23,yt=A<<18|I>>>14,wt=I<<18|A>>>14,_t=S<<1|E>>>31,Mt=E<<1|S>>>31,At=x<<12|k>>>20,It=k<<12|x>>>20,St=B<<10|C>>>22,Et=C<<10|B>>>22,kt=P<<13|T>>>19,xt=T<<13|P>>>19,Bt=R<<2|O>>>30,Ct=O<<2|R>>>30,Tt=D<<30|j>>>2,Pt=j<<30|D>>>2,Rt=N<<6|z>>>26,Ot=z<<6|N>>>26,jt=q<<11|K>>>21,Dt=K<<11|q>>>21,Nt=U<<15|F>>>17,zt=F<<15|U>>>17,Kt=Q<<29|L>>>3,qt=L<<29|Q>>>3,Ut=H<<28|V>>>4,Ft=V<<28|H>>>4,Lt=G<<23|Z>>>9,Qt=Z<<23|G>>>9,Ht=Y<<25|W>>>7,Vt=W<<25|Y>>>7,Zt=J<<21|X>>>11,Gt=X<<21|J>>>11,Yt=tt<<24|$>>>8,Wt=$<<24|tt>>>8,Jt=et<<27|rt>>>5,Xt=rt<<27|et>>>5,$t=it<<20|nt>>>12,te=nt<<20|it>>>12,ee=at<<7|ot>>>25,re=ot<<7|at>>>25,ie=st<<8|ut>>>24,ne=ut<<8|st>>>24,oe=ht<<14|ft>>>18,ae=ft<<14|ht>>>18;t[0]=ct^~At&jt,t[1]=lt^~It&Dt,t[10]=Ut^~$t&mt,t[11]=Ft^~te>,t[20]=_t^~Rt&Ht,t[21]=Mt^~Ot&Vt,t[30]=Jt^~dt&St,t[31]=Xt^~pt&Et,t[40]=Tt^~Lt&ee,t[41]=Pt^~Qt&re,t[2]=At^~jt&Zt,t[3]=It^~Dt&Gt,t[12]=$t^~mt&kt,t[13]=te^~gt&xt,t[22]=Rt^~Ht&ie,t[23]=Ot^~Vt&ne,t[32]=dt^~St&Nt,t[33]=pt^~Et&zt,t[42]=Lt^~ee&bt,t[43]=Qt^~re&vt,t[4]=jt^~Zt&oe,t[5]=Dt^~Gt&ae,t[14]=mt^~kt&Kt,t[15]=gt^~xt&qt,t[24]=Ht^~ie&yt,t[25]=Vt^~ne&wt,t[34]=St^~Nt&Yt,t[35]=Et^~zt&Wt,t[44]=ee^~bt&Bt,t[45]=re^~vt&Ct,t[6]=Zt^~oe&ct,t[7]=Gt^~ae<,t[16]=kt^~Kt&Ut,t[17]=xt^~qt&Ft,t[26]=ie^~yt&_t,t[27]=ne^~wt&Mt,t[36]=Nt^~Yt&Jt,t[37]=zt^~Wt&Xt,t[46]=bt^~Bt&Tt,t[47]=vt^~Ct&Pt,t[8]=oe^~ct&At,t[9]=ae^~lt&It,t[18]=Kt^~Ut&$t,t[19]=qt^~Ft&te,t[28]=yt^~_t&Rt,t[29]=wt^~Mt&Ot,t[38]=Yt^~Jt&dt,t[39]=Wt^~Xt&pt,t[48]=Bt^~Tt&Lt,t[49]=Ct^~Pt&Qt,t[0]^=i[2*e],t[1]^=i[2*e+1]}}},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(318).Buffer}catch(I){}function s(t,e,r){for(var i=0,n=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return i}function u(t,e,r,i){for(var n=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)n=s(t,r,r+6),this.words[i]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);r+6!==e&&(n=s(t,e,r+6),this.words[i]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,a=o%i,s=Math.min(o,o-a)+r,h=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var h=1;h>>26,c=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=l;d++){var p=h-d|0;f+=(a=(n=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}r.words[h]=0|c,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:h[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,h=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),h[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,M=0|a[4],A=8191&M,I=M>>>13,S=0|a[5],E=8191&S,k=S>>>13,x=0|a[6],B=8191&x,C=x>>>13,T=0|a[7],P=8191&T,R=T>>>13,O=0|a[8],j=8191&O,D=O>>>13,N=0|a[9],z=8191&N,K=N>>>13,q=0|s[0],U=8191&q,F=q>>>13,L=0|s[1],Q=8191&L,H=L>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],W=8191&Y,J=Y>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,it=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ut=8191&st,ht=st>>>13,ft=0|s[8],ct=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(i=Math.imul(c,U))|0)+((8191&(n=(n=Math.imul(c,F))+Math.imul(l,U)|0))<<13)|0;h=((o=Math.imul(l,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,F))+Math.imul(m,U)|0,o=Math.imul(m,F);var bt=(h+(i=i+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(l,Q)|0))<<13)|0;h=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(b,U),n=(n=Math.imul(b,F))+Math.imul(v,U)|0,o=Math.imul(v,F),i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,H)|0;var vt=(h+(i=i+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,U),n=(n=Math.imul(w,F))+Math.imul(_,U)|0,o=Math.imul(_,F),i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,H)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var yt=(h+(i=i+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,J)|0)+Math.imul(l,W)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(A,U),n=(n=Math.imul(A,F))+Math.imul(I,U)|0,o=Math.imul(I,F),i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,J)|0;var wt=(h+(i=i+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,U),n=(n=Math.imul(E,F))+Math.imul(k,U)|0,o=Math.imul(k,F),i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(b,W)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,J)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(i=i+Math.imul(c,rt)|0)|0)+((8191&(n=(n=n+Math.imul(c,it)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(B,U),n=(n=Math.imul(B,F))+Math.imul(C,U)|0,o=Math.imul(C,F),i=i+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(h+(i=i+Math.imul(c,ot)|0)|0)+((8191&(n=(n=n+Math.imul(c,at)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,at)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,U),n=(n=Math.imul(P,F))+Math.imul(R,U)|0,o=Math.imul(R,F),i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,H)|0,i=i+Math.imul(E,Z)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(b,rt)|0,n=(n=n+Math.imul(b,it)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var At=(h+(i=i+Math.imul(c,ut)|0)|0)+((8191&(n=(n=n+Math.imul(c,ht)|0)+Math.imul(l,ut)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,F))+Math.imul(D,U)|0,o=Math.imul(D,F),i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,H)|0,i=i+Math.imul(B,Z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,G)|0,i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(b,ot)|0,n=(n=n+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var It=(h+(i=i+Math.imul(c,ct)|0)|0)+((8191&(n=(n=n+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(z,U),n=(n=Math.imul(z,F))+Math.imul(K,U)|0,o=Math.imul(K,F),i=i+Math.imul(j,Q)|0,n=(n=n+Math.imul(j,H)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,H)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,i=i+Math.imul(b,ut)|0,n=(n=n+Math.imul(b,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(p,ct)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(h+(i=i+Math.imul(c,pt)|0)|0)+((8191&(n=(n=n+Math.imul(c,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(z,Q),n=(n=Math.imul(z,H))+Math.imul(K,Q)|0,o=Math.imul(K,H),i=i+Math.imul(j,Z)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,J)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,i=i+Math.imul(b,ct)|0,n=(n=n+Math.imul(b,lt)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,lt)|0;var Et=(h+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(z,Z),n=(n=Math.imul(z,G))+Math.imul(K,Z)|0,o=Math.imul(K,G),i=i+Math.imul(j,W)|0,n=(n=n+Math.imul(j,J)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,J)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,it)|0,i=i+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(A,ut)|0,n=(n=n+Math.imul(A,ht)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(w,ct)|0,n=(n=n+Math.imul(w,lt)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,lt)|0;var kt=(h+(i=i+Math.imul(b,pt)|0)|0)+((8191&(n=(n=n+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(z,W),n=(n=Math.imul(z,J))+Math.imul(K,W)|0,o=Math.imul(K,J),i=i+Math.imul(j,$)|0,n=(n=n+Math.imul(j,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,i=i+Math.imul(E,ut)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(A,ct)|0,n=(n=n+Math.imul(A,lt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,lt)|0;var xt=(h+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(z,$),n=(n=Math.imul(z,tt))+Math.imul(K,$)|0,o=Math.imul(K,tt),i=i+Math.imul(j,rt)|0,n=(n=n+Math.imul(j,it)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,i=i+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,i=i+Math.imul(E,ct)|0,n=(n=n+Math.imul(E,lt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,lt)|0;var Bt=(h+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(I,pt)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(z,rt),n=(n=Math.imul(z,it))+Math.imul(K,rt)|0,o=Math.imul(K,it),i=i+Math.imul(j,ot)|0,n=(n=n+Math.imul(j,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,i=i+Math.imul(P,ut)|0,n=(n=n+Math.imul(P,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,i=i+Math.imul(B,ct)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Ct=(h+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(z,ot),n=(n=Math.imul(z,at))+Math.imul(K,ot)|0,o=Math.imul(K,at),i=i+Math.imul(j,ut)|0,n=(n=n+Math.imul(j,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,i=i+Math.imul(P,ct)|0,n=(n=n+Math.imul(P,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Tt=(h+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(z,ut),n=(n=Math.imul(z,ht))+Math.imul(K,ut)|0,o=Math.imul(K,ht),i=i+Math.imul(j,ct)|0,n=(n=n+Math.imul(j,lt)|0)+Math.imul(D,ct)|0,o=o+Math.imul(D,lt)|0;var Pt=(h+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(z,ct),n=(n=Math.imul(z,lt))+Math.imul(K,ct)|0,o=Math.imul(K,lt);var Rt=(h+(i=i+Math.imul(j,pt)|0)|0)+((8191&(n=(n=n+Math.imul(j,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(i=Math.imul(z,pt))|0)+((8191&(n=(n=Math.imul(z,mt))+Math.imul(K,pt)|0))<<13)|0;return h=((o=Math.imul(K,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=bt,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=It,u[9]=St,u[10]=Et,u[11]=kt,u[12]=xt,u[13]=Bt,u[14]=Ct,u[15]=Tt,u[16]=Pt,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var a=0;a>>=1)n++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==f||h>=n);h--){var c=0|this.words[h];this.words[h]=f<<26-o|c>>>o,f=c&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var h=0;h=0;c--){var l=67108864*(0|i.words[n.length+c])+(0|i.words[n.length+c-1]);for(l=Math.min(l/a|0,67108863),i._ishlnsubmul(n,l,c);0!==i.negative;)l--,i.negative=0,i._ishlnsubmul(n,1,c),i.isZero()||(i.negative^=1);s&&(s.words[c]=l)}return s&&s.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var f=r.clone(),c=e.clone();!e.isZero();){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(c)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),a.isub(u)):(r.isub(e),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0===(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,r=(t-e)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},n(v,b),v.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,n),l=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var h=e.words[i],f=u-1;f>=0;f--){var c=h>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},n(A,M),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(29)(t))},function(t,e){},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=r(46),n=r(25),o=r(65),a=r(3),s=r(3),u=r(320),h=r(37),f=r(81),c=r(122),l=r(6),d=r(19),p=r(45),m=r(142),g=r(321),b=function(){this.hash=t.alloc(32),this.param=new u.Params},v=function(e){this.p0_ins=new Array,this.p_ins=new Array,this.c_ins=new Array,this.c_outs=new Array,this.p_outs=new Array,this.keys=new Array,this.balance_desc=new b,this.s={Desc_O:{},Desc_Z:{},Desc_Pkg:{},Desc_Cmd:{},Tx1:{Ins_P:new Array,Ins_P0:new Array,Ins_C:new Array,Outs_C:new Array,Outs_P:new Array},Bcr:a.toHex(t.alloc(32,0)),Bsign:a.toHex(t.alloc(64,0))},this.param=e};function y(e){var r=t.alloc(32,0),i=t.alloc(32,0),n=t.alloc(32,0),o=t.alloc(32,0);return e.Tkn&&(e.Tkn.Currency&&(r=e.Tkn.Currency),e.Tkn.Value&&(i=a.default.toBN(e.Tkn.Value).toArrayLike(t,"le",32))),e.Tkt&&(e.Tkt.Category&&(n=e.Tkt.Category),e.Tkt.Value&&(o=e.Tkt.Value)),new h.Asset(r,i,n,o)}function w(e){var r=[s.toBuffer(e.Ehash),s.toBuffer(e.From),M(e.Fee)];return r.push(function(e){var r=new Array;return e.Ins&&e.Ins.forEach((function(e){r.push(function(e){return m(t.concat([s.toBuffer(e.Anchor),s.toBuffer(e.Nil),s.toBuffer(e.Trace),s.toBuffer(e.AssetCM),s.toBuffer(m(e.Proof))]))}(e))})),e.Outs&&e.Outs.forEach((function(e){r.push(function(e){return m(t.concat([s.toBuffer(e.AssetCM),s.toBuffer(e.OutCM),s.toBuffer(e.EInfo),s.toBuffer(e.PKr),s.toBuffer(m(e.Proof))]))}(e))})),m(t.concat(r))}(e.Desc_Z)),r.push(function(e){var r=new Array;return e.Ins&&e.Ins.forEach((function(e){r.push(function(e){return m(t.concat([s.toBuffer(e.Root),s.toBuffer(e.Nil),s.toBuffer(e.Sign)]))}(e))})),e.Outs&&e.Outs.forEach((function(e){r.push(function(e){return m(t.concat([s.toBuffer(e.Addr),A(e.Asset),s.toBuffer(e.Memo)]))}(e))})),m(t.concat(r))}(e.Desc_O)),0r.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(s=r.slice(o,c)).length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)u=e(s),h.push(u.data),s=u.remainder;return{data:h,remainder:r.slice(c)}}(u(e));if(r)return i;if(0!==i.remainder.length)throw new Error("invalid remainder");return i.data},e.getLength=function(e){if(!e||0===e.length)return t.from([]);var r=u(e),i=r[0];if(i<=127)return r.length;if(i<=183)return i-127;if(i<=191)return i-182;if(i<=247)return i-191;var o=i-246;return o+n(r.slice(1,o).toString("hex"),16)}}).call(this,r(0).Buffer)},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(323).Buffer}catch(I){}function s(t,e,r){for(var i=0,n=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return i}function u(t,e,r,i){for(var n=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)n=s(t,r,r+6),this.words[i]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);r+6!==e&&(n=s(t,e,r+6),this.words[i]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,a=o%i,s=Math.min(o,o-a)+r,h=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var h=1;h>>26,c=67108863&u,l=Math.min(h,e.length-1),d=Math.max(0,h-t.length+1);d<=l;d++){var p=h-d|0;f+=(a=(n=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}r.words[h]=0|c,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:h[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,h=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),h[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"===typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,M=0|a[4],A=8191&M,I=M>>>13,S=0|a[5],E=8191&S,k=S>>>13,x=0|a[6],B=8191&x,C=x>>>13,T=0|a[7],P=8191&T,R=T>>>13,O=0|a[8],j=8191&O,D=O>>>13,N=0|a[9],z=8191&N,K=N>>>13,q=0|s[0],U=8191&q,F=q>>>13,L=0|s[1],Q=8191&L,H=L>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],W=8191&Y,J=Y>>>13,X=0|s[4],$=8191&X,tt=X>>>13,et=0|s[5],rt=8191&et,it=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ut=8191&st,ht=st>>>13,ft=0|s[8],ct=8191&ft,lt=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(i=Math.imul(c,U))|0)+((8191&(n=(n=Math.imul(c,F))+Math.imul(l,U)|0))<<13)|0;h=((o=Math.imul(l,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,F))+Math.imul(m,U)|0,o=Math.imul(m,F);var bt=(h+(i=i+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,H)|0)+Math.imul(l,Q)|0))<<13)|0;h=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(b,U),n=(n=Math.imul(b,F))+Math.imul(v,U)|0,o=Math.imul(v,F),i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,H)|0;var vt=(h+(i=i+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,U),n=(n=Math.imul(w,F))+Math.imul(_,U)|0,o=Math.imul(_,F),i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,H)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,H)|0,i=i+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var yt=(h+(i=i+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,J)|0)+Math.imul(l,W)|0))<<13)|0;h=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(A,U),n=(n=Math.imul(A,F))+Math.imul(I,U)|0,o=Math.imul(I,F),i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,J)|0;var wt=(h+(i=i+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,tt)|0)+Math.imul(l,$)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,U),n=(n=Math.imul(E,F))+Math.imul(k,U)|0,o=Math.imul(k,F),i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,H)|0,i=i+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(b,W)|0,n=(n=n+Math.imul(b,J)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,J)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(i=i+Math.imul(c,rt)|0)|0)+((8191&(n=(n=n+Math.imul(c,it)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(B,U),n=(n=Math.imul(B,F))+Math.imul(C,U)|0,o=Math.imul(C,F),i=i+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(b,$)|0,n=(n=n+Math.imul(b,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(h+(i=i+Math.imul(c,ot)|0)|0)+((8191&(n=(n=n+Math.imul(c,at)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,at)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,U),n=(n=Math.imul(P,F))+Math.imul(R,U)|0,o=Math.imul(R,F),i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,H)|0,i=i+Math.imul(E,Z)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,J)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(b,rt)|0,n=(n=n+Math.imul(b,it)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var At=(h+(i=i+Math.imul(c,ut)|0)|0)+((8191&(n=(n=n+Math.imul(c,ht)|0)+Math.imul(l,ut)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,F))+Math.imul(D,U)|0,o=Math.imul(D,F),i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,H)|0,i=i+Math.imul(B,Z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,G)|0,i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(b,ot)|0,n=(n=n+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var It=(h+(i=i+Math.imul(c,ct)|0)|0)+((8191&(n=(n=n+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(z,U),n=(n=Math.imul(z,F))+Math.imul(K,U)|0,o=Math.imul(K,F),i=i+Math.imul(j,Q)|0,n=(n=n+Math.imul(j,H)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,H)|0,i=i+Math.imul(P,Z)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,J)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,i=i+Math.imul(b,ut)|0,n=(n=n+Math.imul(b,ht)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(p,ct)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(h+(i=i+Math.imul(c,pt)|0)|0)+((8191&(n=(n=n+Math.imul(c,mt)|0)+Math.imul(l,pt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(z,Q),n=(n=Math.imul(z,H))+Math.imul(K,Q)|0,o=Math.imul(K,H),i=i+Math.imul(j,Z)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,G)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,J)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,i=i+Math.imul(b,ct)|0,n=(n=n+Math.imul(b,lt)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,lt)|0;var Et=(h+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(z,Z),n=(n=Math.imul(z,G))+Math.imul(K,Z)|0,o=Math.imul(K,G),i=i+Math.imul(j,W)|0,n=(n=n+Math.imul(j,J)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,J)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,it)|0,i=i+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(A,ut)|0,n=(n=n+Math.imul(A,ht)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(w,ct)|0,n=(n=n+Math.imul(w,lt)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,lt)|0;var kt=(h+(i=i+Math.imul(b,pt)|0)|0)+((8191&(n=(n=n+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(z,W),n=(n=Math.imul(z,J))+Math.imul(K,W)|0,o=Math.imul(K,J),i=i+Math.imul(j,$)|0,n=(n=n+Math.imul(j,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,i=i+Math.imul(E,ut)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(A,ct)|0,n=(n=n+Math.imul(A,lt)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,lt)|0;var xt=(h+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(z,$),n=(n=Math.imul(z,tt))+Math.imul(K,$)|0,o=Math.imul(K,tt),i=i+Math.imul(j,rt)|0,n=(n=n+Math.imul(j,it)|0)+Math.imul(D,rt)|0,o=o+Math.imul(D,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,i=i+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ht)|0,i=i+Math.imul(E,ct)|0,n=(n=n+Math.imul(E,lt)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,lt)|0;var Bt=(h+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(I,pt)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(z,rt),n=(n=Math.imul(z,it))+Math.imul(K,rt)|0,o=Math.imul(K,it),i=i+Math.imul(j,ot)|0,n=(n=n+Math.imul(j,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,i=i+Math.imul(P,ut)|0,n=(n=n+Math.imul(P,ht)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ht)|0,i=i+Math.imul(B,ct)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Ct=(h+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,mt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(z,ot),n=(n=Math.imul(z,at))+Math.imul(K,ot)|0,o=Math.imul(K,at),i=i+Math.imul(j,ut)|0,n=(n=n+Math.imul(j,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,i=i+Math.imul(P,ct)|0,n=(n=n+Math.imul(P,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Tt=(h+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(C,pt)|0))<<13)|0;h=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(z,ut),n=(n=Math.imul(z,ht))+Math.imul(K,ut)|0,o=Math.imul(K,ht),i=i+Math.imul(j,ct)|0,n=(n=n+Math.imul(j,lt)|0)+Math.imul(D,ct)|0,o=o+Math.imul(D,lt)|0;var Pt=(h+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(R,pt)|0))<<13)|0;h=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(z,ct),n=(n=Math.imul(z,lt))+Math.imul(K,ct)|0,o=Math.imul(K,lt);var Rt=(h+(i=i+Math.imul(j,pt)|0)|0)+((8191&(n=(n=n+Math.imul(j,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Ot=(h+(i=Math.imul(z,pt))|0)+((8191&(n=(n=Math.imul(z,mt))+Math.imul(K,pt)|0))<<13)|0;return h=((o=Math.imul(K,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=bt,u[2]=vt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=At,u[8]=It,u[9]=St,u[10]=Et,u[11]=kt,u[12]=xt,u[13]=Bt,u[14]=Ct,u[15]=Tt,u[16]=Pt,u[17]=Rt,u[18]=Ot,0!==h&&(u[19]=h,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var a=0;a>>=1)n++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==f||h>=n);h--){var c=0|this.words[h];this.words[h]=f<<26-o|c>>>o,f=c&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"===typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,a=0|n.words[n.length-1];0!==(r=26-this._countBits(a))&&(n=n.ushln(r),i.iushln(r),a=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var h=0;h=0;c--){var l=67108864*(0|i.words[n.length+c])+(0|i.words[n.length+c-1]);for(l=Math.min(l/a|0,67108863),i._ishlnsubmul(n,l,c);0!==i.negative;)l--,i.negative=0,i._ishlnsubmul(n,1,c),i.isZero()||(i.negative^=1);s&&(s.words[c]=l)}return s&&s.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),u=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var f=r.clone(),c=e.clone();!e.isZero();){for(var l=0,d=1;0===(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(f),a.isub(c)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),a.isub(u)):(r.isub(e),s.isub(n),u.isub(a))}return{a:s,b:u,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,f=1;0===(e.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,l=1;0===(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"===typeof t);var e=t%26,r=(t-e)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},n(v,b),v.prototype.split=function(t,e){for(var r=Math.min(t.length,9),i=0;i>>22,n=o}n>>>=22,t.words[i-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0===(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);i(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var c=this.pow(f,n),l=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var h=e.words[i],f=u-1;f>=0;f--){var c=h>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===i&&0===f)&&(n=this.mul(n,r[a]),s=0,a=0)):s=0}u=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},n(A,M),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(29)(t))},function(t,e){},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}]); \ No newline at end of file diff --git a/docs/static/js/main.1b09b402.chunk.js b/docs/static/js/main.1e9a7ed3.chunk.js similarity index 59% rename from docs/static/js/main.1b09b402.chunk.js rename to docs/static/js/main.1e9a7ed3.chunk.js index c498199..f854d56 100644 --- a/docs/static/js/main.1b09b402.chunk.js +++ b/docs/static/js/main.1e9a7ed3.chunk.js @@ -1 +1 @@ -(window.webpackJsonppopup=window.webpackJsonppopup||[]).push([[0],{1:function(e,t,a){"use strict";var n=a(15),r=a.n(n),o=a(13),s=a(14),i=a(57),c=function(){function e(){Object(o.a)(this,e),this.Home="/",this.AccountCreate1="/account/create1",this.AccountCreate2="/account/create2",this.AccountCreate3="/account/create3",this.AccountCreate4="/account/create4",this.ImportAccount="/account/import",this.Personal="/my",this.Stake="/stake",this.DApp="/dapp",this.WalletManager="/walletManage",this.AddressAdd="/address/add",this.AddressDetail="/",this.AddressList="/address",this.AddressSelect="/addressSelect",this.TransferList="/",this.Receive="/receive",this.Settings="/settings",this.About="/about",this.HistoryPKr="/manage/historyPKr",this.Embed="/embed",this.ThirdPay="/thirdpay",this.PayResult="/thirdpay/result/"}return Object(s.a)(e,[{key:"manage",value:function(e){return"/manage/"+e}},{key:"manageName",value:function(e){return"/manage/name/"+e}},{key:"addressDetail",value:function(e){return"/address/detail/"+e}},{key:"addressEdit",value:function(e){return"/address/edit/"+e}},{key:"transferList",value:function(e){return"/transfer/list/"+e}},{key:"transferDetail",value:function(e){if("0x0000000000000000000000000000000000000000000000000000000000000001"!==e&&"0x0000000000000000000000000000000000000000000000000000000000000002"!==e&&"0x0000000000000000000000000000000000000000000000000000000000000003"!==e)return"/transfer/detail/"+e}},{key:"transfer",value:function(e){return"/transfer/"+e}},{key:"transferResult",value:function(e){return"/transfer/result/"+e}},{key:"receive",value:function(e,t){return"/receive/"+t+"/"+e}},{key:"browser",value:function(e){return"/browser/"+encodeURIComponent(e)}},{key:"addressSelect",value:function(e){return"/addressSelect/"+e}},{key:"payResult",value:function(e){return this.PayResult+e}},{key:"scan",value:function(e,t){return t?"/scan/"+e+"/"+t:"/scan/"+e}},{key:"goPage",value:function(e,t){if(t){var a=JSON.parse(sessionStorage.getItem("backUrl"));a&&a.length>0?a.push(t):(a=new Array).push(t),sessionStorage.setItem("backUrl",JSON.stringify(a))}e!==this.Home&&e!==this.Personal&&e!==this.DApp&&e!==this.Stake||sessionStorage.setItem("backUrl",JSON.stringify([])),Object(i.b)().push(e)}},{key:"goBack",value:function(){var e=JSON.parse(sessionStorage.getItem("backUrl"));if(e&&e.length>0){var t=e.pop();sessionStorage.setItem("backUrl",JSON.stringify(e)),Object(i.b)().push(t)}else Object(i.b)().push(this.Home)}}]),e}(),l=function(){function e(){Object(o.a)(this,e),this.isZH=function(){return-8===(new Date).getTimezoneOffset()/60},this.setting={moneyType:{usd:"USD",cny:"CNY"},language:{zh_CN:"\u7b80\u4f53\u4e2d\u6587",en_US:"English"},network:{}},this.host={host:"http://popup.sero.cash/#/",rpc:"https://sero-light-node.ririniannian.com",price:""},this.moneyType="USD",this.language="en_US"}return Object(s.a)(e,[{key:"init",value:function(){var e=f.get(m.settings.moneyType);e&&(this.moneyType=e);var t=f.get(m.settings.language);t?this.language=t:-8===(new Date).getTimezoneOffset()/60?(f.set(m.settings.language,"zh_CN"),this.language="zh_CN"):(f.set(m.settings.language,"en_US"),this.language="en_US");var a=f.get(m.settings.seroRpcHost);a?this.isZH()?a.indexOf("f-sero-light-node")?(f.set(m.settings.seroRpcName,v.e().page.setting.cnNode),f.set(m.settings.seroRpcHost,"https://sero-light-node.ririniannian.com"),this.host.rpc="https://sero-light-node.ririniannian.com"):this.host.rpc=a:this.host.rpc="https://f-sero-light-node.ririniannian.com":this.isZH()?this.host.rpc="https://sero-light-node.ririniannian.com":this.host.rpc="https://f-sero-light-node.ririniannian.com"}},{key:"seroRpc",value:function(){var e=f.get(m.settings.seroRpcHost);return e||this.host.rpc}},{key:"seroRpcName",value:function(){var e=f.get(m.settings.seroRpcName);return e||(this.isZH()?v.e().page.setting.cnNode:v.e().page.setting.enNode)}},{key:"setLanguage",value:function(e){f.set(m.settings.language,e),this.init()}},{key:"setRpc",value:function(e,t){f.set(m.settings.seroRpcHost,e),f.set(m.settings.seroRpcName,t||e),this.host.rpc=e}},{key:"setMoneyType",value:function(e){f.set(m.settings.moneyType,e),this.init()}}]),e}(),u=a(178),p=function(){function e(){Object(o.a)(this,e),this.account={addresses:"account:addresses",infoPrefix:"account:info:",pkrIndex:"account:pkrIndex:",detail:"account:detail:",tempKeystore:"account:keystore:temp",current:"account:current",currentPKr:"account:currentPKr:",assets:"account:assets:"},this.config={seroRpcHost:"config:seroRpcHost"},this.sync={latestBlockNumber:"sync:latestBlockNumber",nils:"sync:nils",roots:"sync:roots",root:"sync:root:"},this.address={book:"address:book",info:"address:info:"},this.scan={value:"scan:value",type:"scan:type"},this.transaction={Tx:"Tx",TxInfo:"TxInfo",TxPending:"TxPending"},this.settings={moneyType:"settings:moneyType",seroRpcHost:"settings:seroRpcHost",seroRpcName:"settings:seroRpcName",language:"settings:language"},this.dapp={list:"dapps:list",info:"dapps:info:",read:"dapps:read:"},this.decimals="decimals"}return Object(s.a)(e,[{key:"dappsRead",value:function(e){return this.dapp.read+e}},{key:"dappsInfoKey",value:function(e){return this.dapp.info+e}},{key:"decimalsKey",value:function(e){return[this.decimals,e].join(":")}},{key:"infoKey",value:function(e){return this.account.infoPrefix+e}},{key:"rootKey",value:function(e){return this.sync.root+e}},{key:"pkrIndexKey",value:function(e){return this.account.pkrIndex+e}},{key:"currentPKrIndex",value:function(e){return this.account.currentPKr+e}},{key:"detailKey",value:function(e){return this.account.detail+e}},{key:"txKey",value:function(e,t,a,n){return[this.transaction.Tx,e,t,a,n].join(":")}},{key:"txInfoKey",value:function(e,t){return[this.transaction.TxInfo,e,t].join(":")}},{key:"txKeyPrefix",value:function(e){return[this.transaction.Tx,e].join(":")}},{key:"txKeyHashPrefix",value:function(e,t){return[this.transaction.Tx,e,t].join(":")}},{key:"txKeyPending",value:function(e,t,a){return[this.transaction.TxPending,e,t,a].join(":")}},{key:"txKeyPendingPrefix",value:function(e,t){return[this.transaction.TxPending,e,t].join(":")}}]),e}(),d=function e(){var t=this;Object(o.a)(this,e),this.e=function(){var e=f.get(m.settings.language);return e?"en_US"===e?t.en_US:"zh_CN"===e?t.zh_CN:"ja_JP"===e?t.ja_JP:"be_BY"===e?t.be_BY:"ko_KR"===e?t.ko_KR:t.en_US:-8===(new Date).getTimezoneOffset()/60?(f.set(m.settings.language,"zh_CN"),t.zh_CN):(f.set(m.settings.language,"en_US"),t.en_US)},this.en_US={key:"en_US",value:"English",button:{confirm:"Confirm",cancel:"Cancel",next:"Next",receive:"Receive",transfer:"Transfer",add:"Add",save:"Save",deleteAddress:"Delete",createWallet:"Create Wallet",importWallet:"Import Wallet",create:"Create",done:"Done",import:"Import",ok:"OK",openTip:"Open on October 31",update:"Update",repair:"Repair data",share:"Share",copyLink:"Copy Link",refresh:"Refresh",selectFromAlbum:"Scan From Album"},navbar:{wallet:"Wallet",dapp:"DApp",my:"My"},toast:{info:{quitApp:"Press again to exit App !",isLatest:"You are the latest version!",createWallet:"Please create wallet first !",removeAccount:"Warning: If you do not back up properly, you will not be able to retrieve your wallet after deleting it. Please handle this operation carefully"},success:{add:"Add Successfully",copy:"Copy Successfully",create:"Create Wallet Successfully",export:"Export Successfully",save:"Save Successfully",import:"Import Successfully",send:"Send Successfully",clear:"Clear Successfully",operation:"Operation Successfully"},loading:{creating:"Creating...",exporting:"Exporting...",importing:"Importing...",sending:"Sending...",deleting:"Deleting...",synchronizing:"Synchronizing...",synccompleted:"Sync completed!"},error:{passwordVerify:"Password at least 8 characters!",passwordNotMatch:"Password do not match!",incorrectOrder:"Incorrect order of Mnemonic Phrase!",invalidAddress:"Invalid Address!",accountExisted:"The account has existed!",notEnough:"The balance is not enough!",passwordError:"Password is incorrect!",notEnoughFee:"Not enough SERO to pay gas fee !",invalidMnemonic:"Invalid Mnemonic!",clearData:"Cleanup failed, please try again later!",useFrom:"Please use the designated account to initiate payment!",scanFailed:"The picture cannot be identify"}},modal:{help:"Help",sure:"Are you sure???",mainPKr:"This is a collection address that can be used for frequent collections such as mining.",pkr:"The collection address will change after each successful transaction.",createWallet:"Create Wallet",importWallet:"Import Wallet",clearData:"Clear app data",confirmClear:"Please confirm that you have backed up your account. Cleared will resynchronize transaction data",clearTip:'Click "Confirm" to start syncing data. There may be a white screen during the process. Please wait patiently for data synchronization to complete, do not end the process easily.',blockHeight:"For asset security, 12 blocks behind the main chain",dappTip1:"You are visiting a third-party DApp",dappTip2:"You are about to visit an application developed by a third party . Please read carefully [",dappTip3:"Potential risks of DApp and SERO Foundation's Disclaimers",dappTip4:"]",haveRead:"I have read it\u2028"},page:{wallet:{mainPKr:"mainPKr",PKr:"PKr",Assets:"Assets",selectWallet:"Select Wallet"},txList:{all:"All",out:"Out",in:"In",noData:"No data"},txDetail:{title:"Transaction info",success:"Success",pending:"Confirming",amount:"Amount",fee:"Fee",from:"From",to:"To",hash:"Hash",block:"Block",goto:"Go to block explorer for more details >",pendingDesc:"Submitted, please waiting",contractSuccess:"Contract execute successfully!",contractFailed:"Contract execute failed!"},txTransfer:{balance:"Balance",address:"Address",inputAmount:"Input Amount",inputAddress:"Please Input SERO Address",fee:"Fee",total:"Total",amount:"Amount",gas:"Gas",gasPrice:"Gas Price",inputPassword:"Input Password",passwordMsg:"Your account password",failed:"Transfer failed, please keep synchronized to the latest block!",thirdpay:"This payment is initiated by a third party. If you have any questions, please contact the third party."},addressBook:{title:"Address book",add:"Add Address",name:"Name",address:"Address",description:"Description(optional)",detail:"Address Detail"},walletManage:{mainPKr:"MainPKr",PKr:"PKr",passwordHint:"Password hint",export:"Export Mnemonic Phrase",password:"Input password",changePasswordHint:"Change Password Hint",changeProfilePhoto:"Change Profile Photo",changeWalletName:"Change Wallet Name"},setting:{language:"Language",unit:"Currency Unit",node:"Node Settings",pkr:"Check synchronization status",source:"Select Wallet Source",cnNode:"Node 2 (Mainland China)",enNode:"Node 1 (Global)"},create:{import:"Import",step1:{title:"Create SERO Wallet",walletName:"Wallet Name",password:"Password",rePassword:"Repeat Password",hint:"Password hint(optional)",passwordTips:"At least 8 characters, recommended to mix uppercase and lowercase alphabets, numbers and symbols"},step2:{title:"Backup Tips",d1:"Obtaining Mnemonic equals owning all assets",d2:"Backup Mnemonic",d3:"Please write down the Mnemonic . If your phone is lost, stolen, damaged, the Mnemonic will be able to recover your assets",d4:"Offline storage",d5:"Please save it in a secure place, isolated from the internet . Please do not share or store the Mnemonic in a network environment, such as email, albums, social apps and others.",d6:"Do not take screenshot .",d7:"Please do not share or store the screenshots, which may be collected by third-party, resulting in loss of assets."},step3:{title:"Backup Mnemonic Phrase",d1:"Please transcribe the Mnemonic phrase properly and back up it securely"},step4:{title:"Confirm",d1:"Please select Mnemonic Phrase in correct order",skip:"Already backed up? Skip this step"}},import:{tips:"You can reset the password while importing the Mnemonic Phrase",inputTips:"Enter mnemonic phrases separated by spaces",name:"Wallet Name",password:"Wallet Password",rePassword:"Repeat Password",hint:"Password hint"},my:{addressBook:"Address Book",walletManage:"Wallet Manage",settings:"Settings",termOfUse:"Term of use",about:"About us",help:"FAQ",clear:"Clear app data",address:{name:"Name",address:"Address",description:"Description(optional)",add:"Add Address",edit:"Edit Address",detail:"Address detail"},manage:{mainPKr:"MainPKr",pkr:"PKr",hint:"Password hint",export:"Export Mnemonic Phrase"}},dapp:{search:"Enter DApp url",invalidDApp:"Invalid DApp url",recent:"Recent",popup:"Recommended",recommended:"Community voted DApps",seroLab:"SERO Lab"}}},this.zh_CN={key:"zh_CN",value:"\u7b80\u4f53\u4e2d\u6587",button:{confirm:"\u786e\u8ba4",cancel:"\u53d6\u6d88",next:"\u4e0b\u4e00\u6b65",receive:"\u6536\u6b3e",transfer:"\u4ea4\u6613",add:"\u589e\u52a0",save:"\u4fdd\u5b58",deleteAddress:"\u5220\u9664",createWallet:"\u521b\u5efa\u94b1\u5305",importWallet:"\u5bfc\u5165\u94b1\u5305",create:"\u521b\u5efa",done:"\u5b8c\u6210",import:"\u5bfc\u5165",ok:"\u597d\u7684",openTip:"10\u670831\u53f7\u5f00\u542f\u6b64\u529f\u80fd",update:"\u7acb\u5373\u66f4\u65b0",repair:"\u4fee\u590d\u6570\u636e",share:"\u5206\u4eab",copyLink:"\u590d\u5236\u94fe\u63a5",refresh:"\u5237\u65b0",selectFromAlbum:"\u4ece\u76f8\u518c\u9009\u62e9"},navbar:{wallet:"\u94b1\u5305",dapp:"\u5e94\u7528",my:"\u6211\u7684"},toast:{info:{quitApp:"\u518d\u6309\u4e00\u6b21\u9000\u51fa\u5e94\u7528!",isLatest:"\u5df2\u7ecf\u662f\u6700\u65b0\u7248\u672c!",createWallet:"\u8bf7\u5148\u521b\u5efa\u94b1\u5305\u8d26\u6237 !",removeAccount:"\u8b66\u544a\uff1a\u82e5\u65e0\u59a5\u5584\u5907\u4efd\uff0c\u5220\u9664\u94b1\u5305\u540e\u5c06\u65e0\u6cd5\u627e\u56de\u94b1\u5305\uff0c\u8bf7\u614e\u91cd\u5904\u7406\u8be5\u64cd\u4f5c"},success:{add:"\u589e\u52a0\u6210\u529f",copy:"\u62f7\u8d1d\u6210\u529f",create:"\u521b\u5efa\u94b1\u5305\u6210\u529f",export:"\u5bfc\u51fa\u6210\u529f",save:"\u4fdd\u5b58\u6210\u529f",import:"\u5bfc\u5165\u6210\u529f",send:"\u53d1\u9001\u6210\u529f",clear:"\u6e05\u7406\u6210\u529f",operation:"\u64cd\u4f5c\u6210\u529f"},loading:{creating:"\u521b\u5efa\u4e2d...",exporting:"\u5bfc\u51fa\u4e2d...",importing:"\u5bfc\u5165\u4e2d...",sending:"\u53d1\u9001\u4e2d...",deleting:"\u5220\u9664\u4e2d...",synchronizing:"\u8bf7\u52ff\u5173\u95ed!\u6b63\u5728\u540c\u6b65...",synccompleted:"\u540c\u6b65\u5b8c\u6210!"},error:{passwordVerify:"\u5bc6\u7801\u4e3a8\u4f4d\u4ee5\u4e0a\u5b57\u7b26\u957f\u5ea6!",passwordNotMatch:"\u4e24\u6b21\u5bc6\u7801\u8f93\u5165\u7684\u4e0d\u4e00\u81f4!",incorrectOrder:"\u52a9\u8bb0\u8bcd\u7684\u987a\u5e8f\u4e0d\u6b63\u786e!",invalidAddress:"\u65e0\u6548\u7684\u6536\u6b3e\u5730\u5740!",accountExisted:"\u8d26\u6237\u5b58\u5728!",notEnough:"\u4f59\u989d\u4e0d\u8db3!",passwordError:"\u5bc6\u7801\u4e0d\u6b63\u786e!",notEnoughFee:"\u6ca1\u6709\u8db3\u591f\u7684SERO\u652f\u4ed8\u77ff\u5de5\u8d39\u7528",invalidMnemonic:"\u65e0\u6548\u7684\u52a9\u8bb0\u8bcd!",clearData:"\u6b63\u5728\u540c\u6b65\u533a\u5757\uff0c\u6e05\u9664\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5!",useFrom:"\u8bf7\u4f7f\u7528\u6307\u5b9a\u7684\u8d26\u6237\u53d1\u8d77\u652f\u4ed8!",scanFailed:"\u56fe\u7247\u65e0\u6cd5\u8bc6\u522b!"}},modal:{help:"\u5e2e\u52a9",sure:"\u786e\u8ba4\u5220\u9664\u5417???",mainPKr:"\u6b64\u6536\u6b3e\u5730\u5740\u53ef\u4f5c\u4e3a\u5e38\u7528\u6536\u6b3e\u7801\uff0c\u4f8b\u5982\uff1a\u6316\u77ff\u5730\u5740\u3002",pkr:"\u6b64\u6536\u6b3e\u5730\u5740\u4e0d\u53ef\u505a\u5e38\u7528\u6536\u6b3e\u7801\uff0c\u6bcf\u6b21\u6536\u6b3e\u540e\u5c06\u4f1a\u5237\u65b0\u3002",createWallet:"\u65b0\u5efa\u94b1\u5305",importWallet:"\u5bfc\u5165\u94b1\u5305",clearData:"\u6e05\u9664\u5e94\u7528\u6570\u636e",confirmClear:"\u8bf7\u786e\u8ba4\u4f60\u5df2\u7ecf\u5907\u4efd\u597d\u8d26\u6237\u3002\u6e05\u9664\u540e\u5c06\u91cd\u65b0\u540c\u6b65\u4ea4\u6613\u6570\u636e",clearTip:"\u70b9\u51fb\u201c\u786e\u8ba4\u201d\u540e\uff0c\u5c06\u4f1a\u91cd\u65b0\u540c\u6b65\u6570\u636e\uff0c\u540c\u6b65\u8fc7\u7a0b\u4e2d\u4fdd\u6301\u94b1\u5305\u5728\u624b\u673a\u524d\u7aef\u8fd0\u884c\uff0c\u76f4\u5230\u7b49\u5f85\u6570\u636e\u540c\u6b65\u5b8c\u6210\u3002",blockHeight:"\u4e3a\u4e86\u8d44\u4ea7\u7684\u5b89\u5168\u6027\uff0c\u94b1\u5305\u540c\u6b65\u7684\u533a\u5757\u6bd4\u4e3b\u94fe\u843d\u540e\u4e8612\u4e2a\u533a\u5757",dappTip1:"\u4f60\u6b63\u5728\u8bbf\u95ee\u7b2c\u4e09\u65b9DApp",dappTip2:"\u4f60\u5c06\u8981\u8bbf\u95ee\u7684\u5e94\u7528\u7a0b\u5e8f\u5b8c\u5168\u7531\u7b2c\u4e09\u65b9\u5f00\u53d1\uff0c\u8bf7\u8ba4\u771f\u9605\u8bfb\u3010",dappTip3:"\u53bb\u4e2d\u5fc3\u5316\u5e94\u7528\u7684\u53ef\u80fd\u98ce\u9669\u4ee5\u53caSERO\u57fa\u91d1\u4f1a\u7684\u514d\u8d23\u6761\u6b3e",dappTip4:"\u3011",haveRead:"\u5df2\u7ecf\u9605\u8bfb\u2028"},page:{wallet:{mainPKr:"\u4e3b\u6536\u6b3e\u7801",PKr:"\u6536\u6b3e\u7801",Assets:"\u8d44\u4ea7",selectWallet:"\u9009\u62e9\u94b1\u5305"},txList:{all:"\u5168\u90e8",out:"\u8f6c\u51fa",in:"\u8f6c\u5165",noData:"\u6682\u65e0\u6570\u636e"},txDetail:{title:"\u4ea4\u6613\u8be6\u60c5",pending:"\u786e\u8ba4\u4e2d",success:"\u4ea4\u6613\u6210\u529f",amount:"\u91d1\u989d",fee:"\u8d39\u7528",from:"\u53d1\u9001",to:"\u6536\u6b3e",hash:"\u4ea4\u6613\u54c8\u5e0c",block:"\u5757\u53f7",goto:"\u5230\u533a\u5757\u6d4f\u89c8\u5668\u67e5\u770b\u8be6\u60c5 >",pendingDesc:"\u5df2\u63d0\u4ea4\uff0c\u8bf7\u7b49\u5f85\u5904\u7406",contractSuccess:"\u5408\u7ea6\u6267\u884c\u6210\u529f\uff01",contractFailed:"\u5408\u7ea6\u6267\u884c\u5931\u8d25\uff01"},txTransfer:{balance:"\u4f59\u989d",address:"\u6536\u6b3e\u5730\u5740",inputAmount:"\u8bf7\u8f93\u5165\u91d1\u989d",inputAddress:"\u8bf7\u8f93\u5165\u5730\u5740",fee:"\u8d39\u7528",total:"\u603b\u8ba1",amount:"\u91d1\u989d",gas:"Gas",gasPrice:"Gas Price",inputPassword:"\u8bf7\u8f93\u5165\u5bc6\u7801",passwordMsg:"\u8d26\u6237\u5bc6\u7801",failed:"\u4ea4\u6613\u53d1\u9001\u5931\u8d25\uff0c\u8bf7\u4fdd\u6301\u540c\u6b65\u5230\u6700\u65b0\u533a\u5757!",thirdpay:"\u672c\u6b21\u652f\u4ed8\u7531\u7b2c\u4e09\u65b9\u53d1\u8d77\uff0c\u5982\u6709\u7591\u95ee\u8bf7\u8054\u7cfb\u7b2c\u4e09\u65b9\u3002"},addressBook:{title:"\u5730\u5740\u7c3f",add:"\u6dfb\u52a0\u5730\u5740\u7c3f",name:"\u94b1\u5305\u540d\u79f0",address:"\u5730\u5740",description:"\u63cf\u8ff0(\u53ef\u9009)",detail:"\u5730\u5740\u8be6\u60c5"},walletManage:{mainPKr:"\u4e3b\u6536\u6b3e\u7801",PKr:"\u6536\u6b3e\u7801",password:"\u8bf7\u8f93\u5165\u5bc6\u7801",passwordHint:"\u5bc6\u7801\u63d0\u793a\u4fe1\u606f",export:"\u5bfc\u51fa\u52a9\u8bb0\u8bcd",changePasswordHint:"\u4fee\u6539\u5bc6\u7801\u63d0\u793a\u4fe1\u606f",changeProfilePhoto:"\u4fee\u6539\u5934\u50cf",changeWalletName:"\u4fee\u6539\u94b1\u5305\u540d\u79f0"},setting:{language:"\u8bed\u8a00",unit:"\u5e01\u79cd\u5355\u4f4d",node:"\u8282\u70b9\u8bbe\u7f6e",pkr:"\u540c\u6b65\u72b6\u6001",source:"\u8bbe\u7f6e\u94b1\u5305\u5f00\u6e90\u793e\u533a",cnNode:"\u8282\u70b92(\u4e2d\u56fd\u5927\u9646)",enNode:"\u8282\u70b91(\u5168\u7403)"},create:{import:"\u5bfc\u5165",step1:{title:"\u521b\u5efa\u94b1\u5305",walletName:"\u94b1\u5305\u540d\u79f0",password:"\u5bc6\u7801",rePassword:"\u91cd\u590d\u8f93\u5165\u5bc6\u7801",hint:"\u5bc6\u7801\u63d0\u793a\u4fe1\u606f(\u53ef\u9009)",passwordTips:"\u4e0d\u5c11\u4e8e8\u4f4d\u5b57\u7b26\uff0c\u5efa\u8bae\u6df7\u5408\u5927\u5c0f\u5b57\u6bcd\u3001\u6570\u5b57\u7ec4\u5408"},step2:{title:"\u5907\u4efd\u63d0\u793a",d1:"\u83b7\u5f97\u52a9\u8bb0\u8bcd\u7b49\u4e8e\u62e5\u6709\u94b1\u5305\u8d44\u4ea7\u6240\u6709\u6743\u5229",d2:"\u5907\u4efd\u52a9\u8bb0\u8bcd",d3:"\u4f7f\u7528\u7eb8\u548c\u7b14\u6b63\u786e\u6284\u5199\u52a9\u8bb0\u8bcd\uff0c\u5982\u679c\u4f60\u7684\u624b\u673a\u4e22\u5931\u3001\u88ab\u76d7\u3001\u635f\u574f\u3001\u52a9\u8bb0\u8bcd\u5c06\u53ef\u4ee5\u6062\u590d\u4f60\u7684\u8d44\u4ea7",d4:"\u79bb\u7ebf\u4fdd\u7ba1",d5:"\u59a5\u5584\u4fdd\u7ba1\u81f3\u9694\u79bb\u7f51\u7edc\u7684\u5b89\u5168\u5730\u65b9\uff0c\u8bf7\u52ff\u5c06\u52a9\u8bb0\u8bcd\u5728\u8054\u7f51\u73af\u5883\u4e0b\u5206\u4eab\u548c\u5b58\u50a8\uff0c\u6bd4\u5982\uff1a\u90ae\u4ef6\u3001\u76f8\u518c\u3001\u793e\u4ea4\u5e94\u7528\u7b49",d6:"\u8bf7\u52ff\u622a\u5c4f",d7:"\u8bf7\u52ff\u622a\u5c4f\u5206\u4eab\u548c\u5b58\u50a8\uff0c\u8fd9\u5c06\u53ef\u80fd\u88ab\u7b2c\u4e09\u65b9\u6076\u610f\u8f6f\u4ef6\u6536\u96c6\uff0c\u9020\u6210\u8d44\u4ea7\u635f\u5931"},step3:{title:"\u5907\u4efd\u52a9\u8bb0\u8bcd",d1:"\u8bf7\u6309\u987a\u5e8f\u9009\u62e9\u52a9\u8bb0\u8bcd\uff0c\u786e\u4fdd\u5907\u4efd\u6b63\u786e"},step4:{title:"\u786e\u8ba4\u52a9\u8bb0\u8bcd",d1:"\u8bf7\u6309\u987a\u5e8f\u70b9\u51fb\u52a9\u8bb0\u8bcd\uff0c\u4ee5\u786e\u8ba4\u60a8\u6b63\u786e\u5907\u4efd",skip:"\u5df2\u5907\u4efd? \u8df3\u8fc7\u6b64\u6b65\u9aa4"}},import:{tips:"\u4f7f\u7528\u52a9\u8bb0\u8bcd\u5bfc\u5165\u7684\u540c\u65f6\u53ef\u4ee5\u4fee\u6539\u94b1\u5305\u5bc6\u7801\u3002",inputTips:"\u8f93\u5165\u52a9\u8bb0\u8bcd\u5355\u8bcd\uff0c\u5e76\u4f7f\u7528\u7a7a\u683c\u5206\u9694",name:"\u94b1\u5305\u540d\u79f0",password:"\u94b1\u5305\u5bc6\u7801",rePassword:"\u91cd\u590d\u8f93\u5165\u5bc6\u7801",hint:"\u5bc6\u7801\u63d0\u793a\u4fe1\u606f"},my:{addressBook:"\u5730\u5740\u7c3f",walletManage:"\u94b1\u5305\u7ba1\u7406",settings:"\u4f7f\u7528\u8bbe\u7f6e",termOfUse:"\u7528\u6237\u534f\u8bae",about:"\u5173\u4e8e\u6211\u4eec",help:"\u4f7f\u7528\u5e2e\u52a9",clear:"\u6e05\u9664\u7f13\u5b58",address:{name:"\u94b1\u5305\u540d\u79f0",address:"\u5730\u5740",description:"\u5907\u6ce8(\u53ef\u9009)",add:"\u589e\u52a0\u5730\u5740",edit:"\u7f16\u8f91\u5730\u5740",detail:"\u5730\u5740\u8be6\u60c5"},manage:{mainPKr:"\u4e3b\u6536\u6b3e\u7801",pkr:"\u6536\u6b3e\u7801",hint:"\u5bc6\u7801\u63d0\u793a\u4fe1\u606f",export:"\u5bfc\u51fa\u52a9\u8bb0\u8bcd"}},dapp:{search:"\u8f93\u5165DApp\u7684\u5730\u5740",invalidDApp:"\u65e0\u6548\u7684DApp url",recent:"\u6700\u8fd1\u4f7f\u7528",popup:"\u63a8\u8350",recommended:"\u793e\u533a\u6295\u7968\u7684DApps",seroLab:"SERO\u5b9e\u9a8c\u5ba4"}}},this.ja_JP={key:"ja_JP",value:"\u65e5\u672c\u8a9e",button:{confirm:"\u78ba\u8a8d\u3059\u308b",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",next:"\u6b21",receive:"\u53d7\u3051\u53d6\u308b",transfer:"\u8ee2\u9001",add:"\u52a0\u3048\u308b",save:"\u30bb\u30fc\u30d6",deleteAddress:"\u524a\u9664",createWallet:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u4f5c\u6210",importWallet:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8",create:"\u30fc\u30c8",done:"\u5b8c\u4e86",import:"\u5b8c\u4e86",ok:"OK",openTip:"10\u670831\u65e5\u306b\u30aa\u30fc\u30d7\u30f3",update:"\u4eca\u3059\u3050\u66f4\u65b0",repair:"\u4fee\u7406\u30c7\u30fc\u30bf",share:"\u5171\u6709",copyLink:"\u30ea\u30f3\u30af\u3092\u30b3\u30d4\u30fc",refresh:"\u66f4\u65b0",selectFromAlbum:"\u30a2\u30eb\u30d0\u30e0\u304b\u3089\u9078\u629e"},navbar:{wallet:"\u8ca1\u5e03",dapp:"DApp",my:"\u50d5\u306e"},toast:{info:{quitApp:"\u3082\u3046\u4e00\u5ea6\u62bc\u3059\u3068\u30a2\u30d7\u30ea\u304c\u7d42\u4e86\u3057\u307e\u3059\uff01",isLatest:"\u3059\u3067\u306b\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059!",createWallet:"\u6700\u521d\u306b\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044!",removeAccount:"\u8b66\u544a\uff1a\u9069\u5207\u306b\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u306a\u3044\u3068\u3001\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u524a\u9664\u3057\u305f\u5f8c\u3001\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u306e\u64cd\u4f5c\u306f\u614e\u91cd\u306b\u51e6\u7406\u3057\u3066\u304f\u3060\u3055\u3044\u3002"},success:{add:"\u6b63\u5e38\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f",copy:"\u6b63\u5e38\u306b\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3057\u305f",create:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f \u9996\u5c3e\u3088\u304f",export:"\u6b63\u5e38\u306b\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3055\u308c\u307e\u3057\u305f",save:"\u6b63\u5e38\u306b\u4fdd\u5b58",import:"\u6b63\u5e38\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3055\u308c\u307e\u3057\u305f",send:"\u6b63\u5e38\u306b\u9001\u4fe1\u3055\u308c\u307e\u3057\u305f",clear:"\u6b63\u5e38\u306b\u30af\u30ea\u30a2\u3055\u308c\u307e\u3057\u305f",operation:"\u64cd\u4f5c\u304c\u6210\u529f\u3057\u307e\u3057\u305f"},loading:{creating:"\u4f5c\u6210...",exporting:"\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059...",importing:"\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059...",sending:"\u9001\u4fe1 ...",deleting:"\u524a\u9664\u4e2d...",synchronizing:"\u540c\u671f\u4e2d...",synccompleted:"\u540c\u671f\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\uff01"},error:{passwordVerify:"\u5c11\u306a\u304f\u3068\u30828\u6587\u5b57\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\uff01",passwordNotMatch:"\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\uff01",incorrectOrder:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u306e\u9806\u5e8f\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\uff01",invalidAddress:"\u7121\u52b9\u306a\u30a2\u30c9\u30ec\u30b9\uff01",accountExisted:"\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u65e2\u306b\u5b58\u5728\u3057\u307e\u3059\uff01",notEnough:"\u30d0\u30e9\u30f3\u30b9\u304c\u5341\u5206\u3067\u306f\u3042\u308a\u307e\u305b\u3093\uff01",passwordError:"\u9593\u9055\u3063\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\uff01",notEnoughFee:"\u6599\u91d1\u3092\u652f\u6255\u3046\u306e\u306b\u5341\u5206\u306aSERO\u304c\u3042\u308a\u307e\u305b\u3093\uff01",invalidMnemonic:"\u7121\u52b9\u306a\u30cb\u30fc\u30e2\u30cb\u30c3\u30af!",clearData:"\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u3057\u3070\u3089\u304f\u3057\u3066\u304b\u3089\u3082\u3046\u4e00\u5ea6\u304a\u8a66\u3057\u304f\u3060\u3055\u3044!",useFrom:"\u6307\u5b9a\u3055\u308c\u305f\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u652f\u6255\u3044\u3092\u958b\u59cb\u3057\u3066\u304f\u3060\u3055\u3044!",scanFailed:"\u5199\u771f\u3092\u8b58\u5225\u3067\u304d\u307e\u305b\u3093"}},modal:{help:"\u52a9\u3051\u3066",sure:"\u672c\u6c17\u3067\u3059\u304b\uff1f\uff1f\uff1f",mainPKr:"\u3053\u308c\u306f\u3001\u30de\u30a4\u30cb\u30f3\u30b0\u306a\u3069\u306e\u983b\u7e41\u306a\u53ce\u96c6\u306b\u4f7f\u7528\u3067\u304d\u308b\u53ce\u96c6\u30a2\u30c9\u30ec\u30b9\u3067\u3059\u3002",pkr:"\u53ce\u96c6\u30a2\u30c9\u30ec\u30b9\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u6210\u529f\u3059\u308b\u305f\u3073\u306b\u5909\u66f4\u3055\u308c\u307e\u3059\u3002",createWallet:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u4f5c\u6210",importWallet:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8",clearData:"\u30a2\u30d7\u30ea\u30c7\u30fc\u30bf\u3092\u6d88\u53bb\u3059\u308b",confirmClear:"\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u306f\u30af\u30ea\u30a2\u5f8c\u306b\u518d\u540c\u671f\u3055\u308c\u307e\u3059",clearTip:"[\u78ba\u8a8d]\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u30c7\u30fc\u30bf\u306e\u540c\u671f\u3092\u958b\u59cb\u3057\u307e\u3059\u3002\u30d7\u30ed\u30bb\u30b9\u4e2d\u306b\u767d\u3044\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u30c7\u30fc\u30bf\u306e\u540c\u671f\u304c\u5b8c\u4e86\u3059\u308b\u307e\u3067\u304a\u5f85\u3061\u304f\u3060\u3055\u3044\u3002\u30d7\u30ed\u30bb\u30b9\u3092\u7a81\u7136\u7d42\u4e86\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002",blockHeight:"\u8cc7\u7523\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u305f\u3081\u306b\u3001\u30e1\u30a4\u30f3\u30c1\u30a7\u30fc\u30f3\u306e\u80cc\u5f8c\u306b12\u30d6\u30ed\u30c3\u30af",dappTip1:"\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306eDApp\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u307e\u3059",dappTip2:"\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u304c\u958b\u767a\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u3088\u304f\u304a\u8aad\u307f\u304f\u3060\u3055\u3044[",dappTip3:"DApp\u3068SERO Foundation\u306e\u514d\u8cac\u4e8b\u9805\u306e\u6f5c\u5728\u7684\u306a\u30ea\u30b9\u30af",dappTip4:"]",haveRead:"\u8aad\u307f\u307e\u3057\u305fhave"},page:{wallet:{mainPKr:"\u30e1\u30a4\u30f3PKr",PKr:"PKr",Assets:"\u8cc7\u7523",selectWallet:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u9078\u629e"},txList:{all:"\u3059\u3079\u3066",out:"\u3067\u308b",in:"\u306b",noData:"\u30c7\u30fc\u30bf\u306a\u3057"},txDetail:{title:"\u53d6\u5f15\u60c5\u5831",success:"\u6210\u529f",pending:"\u30da\u30f3\u30c7\u30a3\u30f3\u30b0",amount:"\u91cf",fee:"\u6599\u91d1",from:"\u304b\u3089",to:"\u306b",hash:"\u30cf\u30c3\u30b7\u30e5",block:"\u30d6\u30ed\u30c3\u30af",goto:"\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u30fc\u306b\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044",pendingDesc:"\u9001\u4fe1\u3055\u308c\u307e\u3057\u305f\u3002\u304a\u5f85\u3061\u304f\u3060\u3055\u3044",contractSuccess:"\u5951\u7d04\u306f\u6b63\u5e38\u306b\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\uff01",contractFailed:"\u5951\u7d04\u306e\u5b9f\u884c\u306b\u5931\u6557\u3057\u307e\u3057\u305f\uff01"},txTransfer:{balance:"\u30d0\u30e9\u30f3\u30b9",address:"\u4f4f\u6240\u3092",inputAmount:"\u5165\u529b\u91cf",inputAddress:"SERO\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",fee:"\u6599\u91d1",total:"\u5408\u8a08",amount:"\u91cf",gas:"\u30ac\u30b9",gasPrice:"\u30ac\u30b9\u4fa1\u683c",inputPassword:"\u5165\u529b\u30d1\u30b9\u30ef\u30fc\u30c9",passwordMsg:"\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u30d1\u30b9\u30ef\u30fc\u30c9",failed:"\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u9001\u4fe1\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u6700\u65b0\u306e\u30d6\u30ed\u30c3\u30af\u306b\u540c\u671f\u3057\u3066\u304f\u3060\u3055\u3044!",thirdpay:"\u3053\u306e\u652f\u6255\u3044\u306f\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306b\u3088\u3063\u3066\u958b\u59cb\u3055\u308c\u307e\u3059\u3002\u7591\u554f\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002"},addressBook:{title:"\u4f4f\u6240\u9332",add:"\u4f4f\u6240\u3092\u8ffd\u52a0",name:"\u540d",address:"\u4f4f\u6240\u3092",description:"\u8aac\u660e\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09",detail:"\u4f4f\u6240\u306e\u8a73\u7d30"},walletManage:{mainPKr:"\u30e1\u30a4\u30f3PKr",PKr:"PKr",passwordHint:"\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30d2\u30f3\u30c8",export:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8",password:"\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",changePasswordHint:"\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30d2\u30f3\u30c8\u3092\u5909\u66f4\u3059\u308b",changeProfilePhoto:"\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u5199\u771f\u306e\u5909\u66f4",changeWalletName:"\u30a6\u30a9\u30ec\u30c3\u30c8\u540d\u3092\u5909\u66f4"},setting:{language:"\u8a00\u8a9e",unit:"\u901a\u8ca8\u5358\u4f4d",node:"\u30ce\u30fc\u30c9\u8a2d\u5b9a",pkr:"PKr\u3092\u78ba\u8a8d\u3059\u308b",source:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306b\u8a2d\u5b9a\u3057\u307e\u3059",cnNode:"\u30ce\u30fc\u30c92\uff08\u4e2d\u56fd\u672c\u571f\uff09",enNode:"\u30ce\u30fc\u30c91\uff08\u30b0\u30ed\u30fc\u30d0\u30eb\uff09"},create:{import:"\u30a4\u30f3\u30dd\u30fc\u30c8",step1:{title:"SERO\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u4f5c\u6210",walletName:"\u30a6\u30a9\u30ec\u30c3\u30c8\u540d",password:"\u30d1\u30b9\u30ef\u30fc\u30c9",rePassword:"\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u518d\u5ea6\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",hint:"\u30d1\u30b9\u30ef\u30fc\u30c9\u30d2\u30f3\u30c8\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09",passwordTips:"\u5c11\u306a\u304f\u3068\u30828\u6587\u5b57\u3002\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u306e\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u3001\u6570\u5b57\u3001\u8a18\u53f7\u3092\u6df7\u5728\u3055\u305b\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059"},step2:{title:"\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306e\u30d2\u30f3\u30c8",d1:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u306f\u3001\u3059\u3079\u3066\u306e\u8cc7\u7523\u3092\u6240\u6709\u3059\u308b\u3053\u3068\u306b\u7b49\u3057\u3044",d2:"\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u30cb\u30fc\u30e2\u30cb\u30c3\u30af",d3:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u3092\u66f8\u304d\u7559\u3081\u3066\u304f\u3060\u3055\u3044\u3002\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u304c\u7d1b\u5931\u3001\u76d7\u96e3\u3001\u7834\u640d\u3057\u305f\u5834\u5408\u3001Mnemonic\u3092\u4f7f\u7528\u3057\u3066\u8cc7\u7523\u3092\u56de\u5fa9\u3067\u304d\u307e\u3059",d4:"\u30aa\u30d5\u30e9\u30a4\u30f3\u30b9\u30c8\u30ec\u30fc\u30b8",d5:"\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089\u9694\u96e2\u3055\u308c\u305f\u5b89\u5168\u306a\u5834\u6240\u306b\u4fdd\u5b58\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30e1\u30fc\u30eb\u3001\u30a2\u30eb\u30d0\u30e0\u3001\u30bd\u30fc\u30b7\u30e3\u30eb\u30a2\u30d7\u30ea\u306a\u3069\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u74b0\u5883\u3067\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u3092\u5171\u6709\u307e\u305f\u306f\u4fdd\u5b58\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002",d6:"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u3092\u64ae\u3089\u306a\u3044\u3067\u304f\u3060\u3055\u3044",d7:"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u3092\u5171\u6709\u307e\u305f\u306f\u4fdd\u5b58\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u304c\u53ce\u96c6\u3057\u305f\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u306f\u3001\u8cc7\u7523\u306e\u640d\u5931\u306b\u3064\u306a\u304c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002"},step3:{title:"\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba",d1:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u3092\u9069\u5207\u306b\u30e1\u30e2\u3057\u3001\u5b89\u5168\u306b\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044"},step4:{title:"\u78ba\u8a8d\u3059\u308b",d1:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u3092\u6b63\u3057\u3044\u9806\u5e8f\u3067\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044",skip:"\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u6e08\u307f\u3067\u3059\u304b\uff1f\u3053\u306e\u30b9\u30c6\u30c3\u30d7\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044"}},import:{tips:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u4e2d\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30ea\u30bb\u30c3\u30c8\u3067\u304d\u307e\u3059",inputTips:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u3092\u30b9\u30da\u30fc\u30b9\u3067\u533a\u5207\u3063\u3066\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",name:"\u30a6\u30a9\u30ec\u30c3\u30c8\u540d",password:"\u30a6\u30a9\u30ec\u30c3\u30c8\u30d1\u30b9\u30ef\u30fc\u30c9",rePassword:"\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u518d\u5ea6\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",hint:"\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30d2\u30f3\u30c8"},my:{addressBook:"\u4f4f\u6240\u9332",walletManage:"\u30a6\u30a9\u30ec\u30c3\u30c8\u7ba1\u7406",settings:"\u8a2d\u5b9a",termOfUse:"\u5229\u7528\u898f\u7d04",about:"\u79c1\u305f\u3061\u306b\u95a2\u3057\u3066\u306f",help:"\u3088\u304f\u3042\u308b\u8cea\u554f",clear:"\u30a2\u30d7\u30ea\u306e\u30c7\u30fc\u30bf\u3092\u6d88\u53bb",address:{name:"\u540d",address:"\u4f4f\u6240\u3092",description:"\u8aac\u660e\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09",add:"\u4f4f\u6240\u3092\u8ffd\u52a0",edit:"\u4f4f\u6240\u3092\u7de8\u96c6",detail:"\u4f4f\u6240\u306e\u8a73\u7d30"},manage:{mainPKr:"\u30e1\u30a4\u30f3PKr",pkr:"PKr",hint:"\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30d2\u30f3\u30c8",export:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8"}},dapp:{search:"DApp URL\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",invalidDApp:"\u7121\u52b9\u306aDApp URL",recent:"\u6700\u8fd1",popup:"\u304a\u52e7\u3081",recommended:"\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304cDApps\u306b\u6295\u7968\u3057\u307e\u3057\u305f",seroLab:"SERO\u7814\u7a76\u6240"}}},this.be_BY={key:"be_BY",value:"\u0440\u0443\u0441\u0441\u043a\u0438\u0439",button:{confirm:"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435",cancel:"\u041e\u0442\u043c\u0435\u043d\u0430",next:"\u0441\u043b\u0435\u0434\u0443\u044e\u0449",receive:"\u041f\u043e\u043b\u0443\u0447\u0430\u0442\u044c",transfer:"\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c",add:"\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c",save:"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c",deleteAddress:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c",createWallet:"\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u0448\u0435\u043b\u0435\u043a",importWallet:"\u0418\u043c\u043f\u043e\u0440\u0442\u043d\u044b\u0439 \u043a\u043e\u0448\u0435\u043b\u0435\u043a",create:"\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435",done:"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e",import:"\u0438\u043c\u043f\u043e\u0440\u0442",ok:"OK",openTip:"\u041e\u0442\u043a\u0440\u044b\u0442 31 \u043e\u043a\u0442\u044f\u0431\u0440\u044f",update:"\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435",repair:"\u0420\u0430\u043c\u043e\u043d\u0442 \u0434\u0430\u0434\u0437\u0435\u043d\u044b\u0445",share:"\u041f\u0430\u0434\u0437\u044f\u043b\u0456\u0446\u0446\u0430",copyLink:"\u0421\u043a\u0430\u043f\u0456\u044f\u0432\u0430\u0446\u044c \u0441\u043f\u0430\u0441\u044b\u043b\u043a\u0443",refresh:"\u0410\u0431\u043d\u0430\u0432\u0456\u0446\u044c",selectFromAlbum:"\u0412\u044b\u0431\u0435\u0440\u044b\u0446\u0435 \u0437 \u0430\u043b\u044c\u0431\u043e\u043c\u0430"},navbar:{wallet:"\u0431\u0443\u043c\u0430\u0436\u043d\u0438\u043a",dapp:"DApp",my:"\u041c\u043e\u0439"},toast:{info:{quitApp:"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f!",isLatest:"\u0423\u0436\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f!",createWallet:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u0448\u0435\u043b\u0435\u043a!",removeAccount:"\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435: \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0448\u0435\u043b\u0435\u043a \u043f\u043e\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0439\u0442\u0435 \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e"},success:{add:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0423\u0441\u043f\u0435\u0448\u043d\u043e",copy:"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e",create:"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u0421\u043e\u0437\u0434\u0430\u043d \u041a\u043e\u0448\u0435\u043b\u0435\u043a",export:"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e",save:"\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e \u0423\u0441\u043f\u0435\u0448\u043d\u043e",import:"\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0423\u0441\u043f\u0435\u0448\u043d\u043e",send:"\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u0423\u0441\u043f\u0435\u0448\u043d\u043e",clear:"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0447\u0438\u0449\u0435\u043d\u043e",operation:"\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e"},loading:{creating:"\u0422\u0432\u043e\u0440\u044f...",exporting:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442...",importing:"\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439...",sending:"\u041f\u043e\u0441\u044b\u043b\u043a\u0430 ...",deleting:"\u0421\u0456\u043d\u0445\u0440\u0430\u043d\u0456\u0437\u0430\u0446\u044b\u044f...",synchronizing:"\u0421\u0456\u043d\u0445\u0440\u0430\u043d\u0456\u0437\u0430\u0446\u044b\u044f...",synccompleted:"\u0421\u0456\u043d\u0445\u0440\u0430\u043d\u0456\u0437\u0430\u0446\u044b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u043d\u0430!"},error:{passwordVerify:"\u041f\u0430\u0440\u043e\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 8 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432!",passwordNotMatch:"\u041f\u0430\u0440\u043e\u043b\u0438 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442!",incorrectOrder:"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0444\u0440\u0430\u0437\u044b!",invalidAddress:"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441!",accountExisted:"\u0410\u043a\u043a\u0430\u0443\u043d\u0442 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442!",notEnough:"\u0411\u0430\u043b\u0430\u043d\u0441\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e!",passwordError:"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c!",notEnoughFee:"\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e SERO \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u043f\u043b\u0430\u0442\u044b \u0437\u0430 \u0433\u0430\u0437!",invalidMnemonic:"\u041d\u044f\u043f\u0440\u0430\u0432\u0456\u043b\u044c\u043d\u044b \u043c\u043d\u0435\u043c\u0430\u043d\u0456\u0447\u043d\u044b \u0445\u0430\u0440\u0430\u043a\u0442\u0430\u0440 !",clearData:"\u0423\u0431\u043e\u0440\u043a\u0430 \u043d\u0435 \u0430\u0442\u0440\u044b\u043c\u0430\u043b\u0430\u0441\u044f. \u041f\u0430\u0441\u043f\u0440\u0430\u0431\u0443\u0439\u0446\u0435 \u044f\u0448\u0447\u044d \u0440\u0430\u0437 \u043f\u0430\u0437\u043d\u0435\u0439!",useFrom:"\u041a\u0430\u043b\u0456 \u043b\u0430\u0441\u043a\u0430, \u0432\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u043e\u045e\u0432\u0430\u0439\u0446\u0435 \u043f\u0430\u0437\u043d\u0430\u0447\u0430\u043d\u044b \u045e\u043b\u0456\u043a\u043e\u0432\u044b \u0437\u0430\u043f\u0456\u0441, \u043a\u0430\u0431 \u043f\u0430\u0447\u0430\u0446\u044c \u0430\u043f\u043b\u0430\u0442\u0443!",scanFailed:"\u041c\u0430\u043b\u044e\u043d\u0430\u043a \u043d\u0435\u043c\u0430\u0433\u0447\u044b\u043c\u0430 \u0456\u0434\u044d\u043d\u0442\u044b\u0444\u0456\u043a\u0430\u0432\u0430\u0446\u044c"}},modal:{help:"\u041f\u043e\u043c\u043e\u0433\u0438\u0442\u0435",sure:"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b???",mainPKr:"\u042d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0447\u0430\u0441\u0442\u044b\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043c\u0430\u0439\u043d\u0438\u043d\u0433.",pkr:"\u0410\u0434\u0440\u0435\u0441 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.",createWallet:"\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u0448\u0435\u043b\u0435\u043a",importWallet:"\u0418\u043c\u043f\u043e\u0440\u0442\u043d\u044b\u0439 \u043a\u043e\u0448\u0435\u043b\u0435\u043a",clearData:"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f",confirmClear:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0441\u0432\u043e\u0435\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438",clearTip:"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \xab\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c\xbb, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u0435\u043b\u044b\u0439 \u044d\u043a\u0440\u0430\u043d. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u043e \u0434\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e.",blockHeight:"\u0412\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u043c\u0443 DApp",dappTip1:"\u0412\u044b \u0430\u0442\u0440\u044b\u043c\u043b\u0456\u0432\u0430\u0435\u0446\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u0430 \u0441\u0442\u0430\u0440\u043e\u043d\u043d\u044f\u0433\u0430 DApp",dappTip2:"\u0412\u044b \u0437\u0431\u0456\u0440\u0430\u0435\u0446\u0435\u0441\u044f \u043d\u0430\u0432\u0435\u0434\u0430\u0446\u044c \u043f\u0440\u044b\u043a\u043b\u0430\u0434\u0430\u043d\u043d\u0435, \u0440\u0430\u0441\u043f\u0440\u0430\u0446\u0430\u0432\u0430\u043d\u0430\u0435 \u0442\u0440\u044d\u0446\u0456\u043c \u0431\u043e\u043a\u0430\u043c. \u041a\u0430\u043b\u0456 \u043b\u0430\u0441\u043a\u0430, \u0443\u0432\u0430\u0436\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0447\u044b\u0442\u0430\u0439\u0446\u0435 [",dappTip3:"\u043f\u0430\u0442\u044d\u043d\u0446\u044b\u0439\u043d\u044b\u044f \u0440\u044b\u0437\u044b\u043a\u0456 \u0430\u0434\u043c\u043e\u0432\u044b \u0430\u0434 \u0444\u043e\u043d\u0434\u0443 DApp \u0456 \u0444\u043e\u043d\u0434\u0443 SERO",dappTip4:"]",haveRead:"\u042f \u043f\u0440\u0430\u0447\u044b\u0442\u0430\u045e"},page:{wallet:{mainPKr:"mainPKr",PKr:"PKr",Assets:"\u0430\u043a\u0442\u0438\u0432\u044b",selectWallet:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u043e\u0448\u0435\u043b\u0435\u043a"},txList:{all:"\u0432\u0435\u0441\u044c",out:"\u043d\u0430\u0440\u0443\u0436\u0443",in:"\u0432",noData:"\u041d\u0438\u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435"},txDetail:{title:"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438",success:"\u0443\u0441\u043f\u0435\u0445",pending:"\u0412 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438",amount:"\u0441\u0443\u043c\u043c\u0430",fee:"\u0441\u0431\u043e\u0440\u044b",from:"\u043e\u0442",to:"\u043a",hash:"\u0425\u044d\u0448",block:"\u0431\u043b\u043e\u043a",goto:"\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043e\u0431\u043e\u0437\u0440\u0435\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u043b\u043e\u043a\u043e\u0432 >",pendingDesc:"\u041f\u0440\u0430\u0434\u0441\u0442\u0430\u045e\u043b\u0435\u043d\u0430, \u043a\u0430\u043b\u0456 \u043b\u0430\u0441\u043a\u0430, \u043f\u0430\u0447\u0430\u043a\u0430\u0439\u0446\u0435",contractSuccess:"\u041a\u0430\u043d\u0442\u0440\u0430\u043a\u0442 \u043f\u0430\u0441\u043f\u044f\u0445\u043e\u0432\u0430 \u0432\u044b\u043a\u043e\u043d\u0432\u0430\u0435\u0446\u0446\u0430!",contractFailed:"\u0412\u044b\u043a\u0430\u043d\u0430\u043d\u043d\u0435 \u043a\u0430\u043d\u0442\u0440\u0430\u043a\u0442\u0443 \u043d\u0435 \u0430\u0442\u0440\u044b\u043c\u0430\u043b\u0430\u0441\u044f!"},txTransfer:{balance:"\u041e\u0441\u0442\u0430\u0442\u043e\u043a \u0441\u0440\u0435\u0434\u0441\u0442\u0432",address:"\u0410\u0434\u0440\u0435\u0441",inputAmount:"\u0421\u0443\u043c\u043c\u0430 \u0432\u0432\u043e\u0434\u0430",inputAddress:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 SERO",fee:"\u0441\u0431\u043e\u0440\u044b",total:"\u0432\u0435\u0441\u044c",amount:"\u0441\u0443\u043c\u043c\u0430",gas:"\u0433\u0430\u0437",gasPrice:"\u0426\u0435\u043d\u0430 \u043d\u0430 \u0433\u0430\u0437",inputPassword:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c",passwordMsg:"\u041f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438",failed:"\u041d\u0435 \u0430\u0442\u0440\u044b\u043c\u0430\u043b\u0430\u0441\u044f \u0430\u0434\u043f\u0440\u0430\u0432\u0456\u0446\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u044b\u044e. \u041f\u0440\u0430\u0446\u044f\u0433\u0432\u0430\u0439\u0446\u0435 \u0441\u0456\u043d\u0445\u0440\u0430\u043d\u0456\u0437\u0430\u0432\u0430\u0446\u044c \u0430\u043f\u043e\u0448\u043d\u0456 \u0431\u043b\u043e\u043a!",thirdpay:"\u0413\u044d\u0442\u044b \u043f\u043b\u0430\u0446\u0435\u0436 \u0456\u043d\u0456\u0446\u044b\u044f\u0432\u0430\u043d\u044b \u0442\u0440\u044d\u0446\u0456\u043c \u0431\u043e\u043a\u0430\u043c, \u043a\u0430\u043b\u0456 \u0432\u044b \u0441\u0443\u043c\u043d\u044f\u0432\u0430\u0435\u0446\u0435\u0441\u044f, \u043a\u0430\u043b\u0456 \u043b\u0430\u0441\u043a\u0430, \u0442\u0440\u044d\u0446\u0456\u043c \u0431\u043e\u043a\u0430\u043c."},addressBook:{title:"\u0430\u0434\u0440\u0435\u0441\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430",add:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441",name:"\u0438\u043c\u044f",address:"\u0410\u0434\u0440\u0435\u0441",description:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)",detail:"\u0414\u0435\u0442\u0430\u043b\u044c \u0430\u0434\u0440\u0435\u0441\u0430"},walletManage:{mainPKr:"MainPKr",PKr:"PKr",passwordHint:"\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043f\u0430\u0440\u043e\u043b\u044f",export:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u0440\u0430\u0437\u0443",password:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c",changePasswordHint:"\u0421\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430",changeProfilePhoto:"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u043f\u0440\u043e\u0444\u0438\u043b\u044f",changeWalletName:"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u044f \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430"},setting:{language:"\u044f\u0437\u044b\u043a",unit:"\u0412\u0430\u043b\u044e\u0442\u043d\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430",node:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443\u0437\u043b\u0430",pkr:"\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 PKr",source:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430",cnNode:"\u0412\u0443\u0437\u0435\u043b 2 (\u041a\u0456\u0442\u0430\u0439)",enNode:"\u0412\u0443\u0437\u0435\u043b 1 (\u0433\u043b\u0430\u0431\u0430\u043b\u044c\u043d\u044b)"},create:{import:"\u0438\u043c\u043f\u043e\u0440\u0442",step1:{title:"\u0421\u043e\u0437\u0434\u0430\u0442\u044c SERO \u041a\u043e\u0448\u0435\u043b\u0435\u043a",walletName:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430",password:"\u043f\u0430\u0440\u043e\u043b\u044c",rePassword:"\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c",hint:"\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043a \u043f\u0430\u0440\u043e\u043b\u044e (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)",passwordTips:"\u041d\u0435 \u043c\u0435\u043d\u0435\u0435 8 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0435 \u0438 \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b, \u0446\u0438\u0444\u0440\u044b \u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044b."},step2:{title:"\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0421\u043e\u0432\u0435\u0442\u044b",d1:"\u0412\u043b\u0430\u0434\u0435\u043d\u0438\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u043a\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044e \u0432\u0441\u0435\u043c\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u043c\u0438",d2:"\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u041c\u043d\u0435\u043c\u043e\u043d\u0438\u043a\u0430",d3:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u043a\u0443. \u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043f\u043e\u0442\u0435\u0440\u044f\u043d, \u0443\u043a\u0440\u0430\u0434\u0435\u043d, \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d, Mnemonic \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u0430\u043a\u0442\u0438\u0432\u043e\u0432",d4:"Offline storage",d5:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043e\u0442 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0435 Mnemonic \u0432 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0440\u0435\u0434\u0435, \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u043a \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0430\u044f \u043f\u043e\u0447\u0442\u0430, \u0430\u043b\u044c\u0431\u043e\u043c\u044b, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0438 \u0442. \u0414.",d6:"\u041d\u0435 \u0441\u043d\u0438\u043c\u0430\u0439\u0442\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442.",d7:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0435 \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0438 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0442\u0440\u0435\u0442\u044c\u0438\u043c\u0438 \u043b\u0438\u0446\u0430\u043c\u0438, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043e\u0442\u0435\u0440\u0435 \u0430\u043a\u0442\u0438\u0432\u043e\u0432."},step3:{title:"\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u041c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0424\u0440\u0430\u0437\u044b",d1:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0444\u0440\u0430\u0437\u0443-\u043c\u043d\u0435\u043c\u043e\u043d\u0438\u043a\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e"},step4:{title:"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435",d1:"\u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u0440\u0430\u0437\u0443 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435",skip:"\u0423\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f? \u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0448\u0430\u0433"}},import:{tips:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0444\u0440\u0430\u0437\u044b",inputTips:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0440\u0430\u0437\u044b, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438",name:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430",password:"\u041f\u0430\u0440\u043e\u043b\u044c \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430",rePassword:"\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c",hint:"\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043f\u0430\u0440\u043e\u043b\u044f"},my:{addressBook:"\u0410\u0434\u0440\u0435\u0441\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430",walletManage:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u043c",settings:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438",termOfUse:"\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f",about:"\u041e \u043d\u0430\u0441",help:"FAQ",clear:"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f",address:{name:"\u0438\u043c\u044f",address:"\u0410\u0434\u0440\u0435\u0441",description:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)",add:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441",edit:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0410\u0434\u0440\u0435\u0441",detail:"\u0410\u0434\u0440\u0435\u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e"},manage:{mainPKr:"MainPKr",pkr:"PKr",hint:"\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043f\u0430\u0440\u043e\u043b\u044f",export:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u0440\u0430\u0437\u0443"}},dapp:{search:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 DApp URL",invalidDApp:"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 DApp URL",recent:"\u041d\u0435\u0434\u0430\u0432\u043d\u0438\u0439",popup:"\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0435",recommended:"\u0414\u0430\u0447\u0447\u044b\u043d\u044b DApps\u0421\u0443\u043f\u043e\u043b\u043a\u0430 \u043f\u0440\u0430\u0433\u0430\u043b\u0430\u0441\u0430\u0432\u0430\u043b\u0430 \u0437\u0430 \u0414\u043e\u043f\u0441\u0430",seroLab:"\u041b\u0430\u0431\u0430\u0440\u0430\u0442\u043e\u0440\u044b\u044f SERO"}}},this.ko_KR={key:"ko_KR",value:"\uc5b8\uc5b4",button:{confirm:"\ud655\uc778",cancel:"\ucde8\uc18c",next:"\ub2e4\uc74c \uac83",receive:"\ubc1b\ub2e4",transfer:"\ubcf4\ub0b4\uae30",add:"\ub354\ud558\ub2e4",save:"\uad6c\ud558\ub2e4",deleteAddress:"\uc0ad\uc81c",createWallet:"\uc6d4\ub81b \ub9cc\ub4e4\uae30",importWallet:"\uc218\uc785 \uc9c0\uac11",create:"\ucc3d\uc870\ud558\ub2e4",done:"\ub05d\ub09c",import:"\uac00\uc838\uc624\uae30",ok:"OK",openTip:"10 \uc6d4 31 \uc77c \uc624\ud508",update:"\uc5c5\ub370\uc774\ud2b8",repair:"\uc218\ub9ac \ub370\uc774\ud130",share:"\uacf5\uc720",copyLink:"\ub9c1\ud06c \ubcf5\uc0ac",refresh:"\uc0c8\ub85c \uace0\uce68",selectFromAlbum:"\uc568\ubc94\uc5d0\uc11c \uc120\ud0dd"},navbar:{wallet:"\uc9c0\uac11",dapp:"DApp",my:"\ub0b4"},toast:{info:{quitApp:"\ub2e4\uc2dc \ub204\ub974\uba74 \uc571\uc774 \uc885\ub8cc\ub429\ub2c8\ub2e4!",isLatest:"\uc774\ubbf8 \ucd5c\uc2e0 \ubc84\uc804\uc785\ub2c8\ub2e4!",createWallet:"\uba3c\uc800 \uc9c0\uac11\uc744 \ub9cc\ub4dc\uc2ed\uc2dc\uc624!",removeAccount:"\uacbd\uace0 : \uc81c\ub300\ub85c \ubc31\uc5c5\ud558\uc9c0 \uc54a\uc73c\uba74 \uc9c0\uac11\uc744 \uc0ad\uc81c \ud55c \ud6c4 \uc9c0\uac11\uc744 \uac80\uc0c9 \ud560 \uc218 \uc5c6\uc73c\ubbc0\ub85c\uc774 \uc791\uc5c5\uc744\uc8fc\uc758\ud574\uc11c \ucc98\ub9ac\ud558\uc2ed\uc2dc\uc624."},success:{add:"\uc131\uacf5\uc801\uc73c\ub85c \ucd94\uac00\ub418\uc5c8\uc2b5\ub2c8\ub2e4",copy:"\uc131\uacf5\uc801\uc73c\ub85c \ubcf5\uc0ac",create:"\uc6d4\ub81b\uc774 \uc131\uacf5\uc801\uc73c\ub85c \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4",export:"\uc131\uacf5\uc801\uc73c\ub85c \uc218\ucd9c",save:"\uc131\uacf5\uc801\uc73c\ub85c \uc800\uc7a5 \ub418\uc5c8\uc74c",import:"\uc131\uacf5\uc801\uc73c\ub85c \uac00\uc838\uc624\uae30",send:"\uc131\uacf5\uc801\uc73c\ub85c \ubcf4\ub0c4",clear:"\uc131\uacf5\uc801\uc73c\ub85c \ud074\ub9ac\uc5b4",operation:"\uc791\uc5c5 \uc131\uacf5"},loading:{creating:"\ub9cc\ub4dc\ub294 \uc911 ...",exporting:"\ub0b4\ubcf4\ub0b4\ub294 \uc911 ...",importing:"\uac00\uc838 \uc624\uae30 ...",sending:"\ubcf4\ub0b4\uae30...",deleting:"\uc0ad\uc81c...",synchronizing:"\ub3d9\uae30\ud654",synccompleted:"\ub3d9\uae30\ud654 \uc644\ub8cc!"},error:{passwordVerify:"\ube44\ubc00\ubc88\ud638 \ucd5c\uc18c 8 \uae00\uc790!",passwordNotMatch:"\ube44\ubc00\ubc88\ud638\uac00 \uc77c\uce58\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4!",incorrectOrder:"\ub2c8\ubaa8\ub2c9\uc758 \uc798\ubabb\ub41c \uc21c\uc11c!",invalidAddress:"\uc798\ubabb\ub41c \uc8fc\uc18c!",accountExisted:"\uacc4\uc815\uc774 \uc774\ubbf8 \uc874\uc7ac\ud569\ub2c8\ub2e4!",notEnough:"\uade0\ud615\uc774 \ucda9\ubd84\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4!",passwordError:"\ube44\ubc00\ubc88\ud638\uac00 \ub9de\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4!",notEnoughFee:"SERO\ub294 \uac00\uc2a4\ub97c \uc9c0\ubd88\ud558\uae30\uc5d0 \ucda9\ubd84\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4\uc218\uc218\ub8cc!",invalidMnemonic:"\uc798\ubabb\ub41c \ub2c8\ubaa8\ub2c9 !",clearData:"\uc815\ub9ac\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. \ub098\uc911\uc5d0 \ub2e4\uc2dc \uc2dc\ub3c4\ud558\uc2ed\uc2dc\uc624!",useFrom:"\uacb0\uc81c\ub97c \uc2dc\uc791\ud558\ub824\uba74 \uc9c0\uc815\ub41c \uacc4\uc815\uc744 \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624!",scanFailed:"\uc0ac\uc9c4\uc740 \uc2dd\ubcc4 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4"}},modal:{help:"\ub3c4\uc6c0",sure:"\ud655\uc2e4\ud569\ub2c8\uae4c???",mainPKr:"\ucc44\uad74\uacfc \uac19\uc774 \uc790\uc8fc \uc218\uc9d1\ud558\ub294 \ub370 \uc0ac\uc6a9\ud560 \uc218\uc788\ub294 \uc218\uc9d1 \uc8fc\uc18c\uc785\ub2c8\ub2e4.",pkr:"\uc218\uc9d1 \uc8fc\uc18c\ub294 \uac01 \uc131\uacf5\uc801\uc778 \uac70\ub798 \ud6c4 \ubcc0\uacbd\ub429\ub2c8\ub2e4.",createWallet:"\uc6d4\ub81b \ub9cc\ub4e4\uae30",importWallet:"\uac00\uc838\uc624\uae30 \uc9c0\uac11",clearData:"\uba85\ud655\ud55c \uc571 \ub370\uc774\ud130",confirmClear:"\uacc4\uc815\uc744 \ubc31\uc5c5\ud588\ub294\uc9c0 \ud655\uc778\ud558\uc2ed\uc2dc\uc624. \uc571 \ub370\uc774\ud130\ub97c \uc9c0\uc6b4 \ud6c4 \ud2b8\ub79c\uc7ad\uc158 \ub370\uc774\ud130\uac00 \ub2e4\uc2dc \ub3d9\uae30\ud654\ub429\ub2c8\ub2e4.",clearTip:'"\ud655\uc778"\uc744 \ud074\ub9ad\ud558\uc5ec \ub370\uc774\ud130 \ub3d9\uae30\ud654\ub97c \uc2dc\uc791\ud558\uc2ed\uc2dc\uc624. \ucc98\ub9ac\ud558\ub294 \ub3d9\uc548 \ud770\uc0c9 \ud654\uba74\uc774 \ud45c\uc2dc \ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub370\uc774\ud130 \ub3d9\uae30\ud654\uac00 \uc644\ub8cc \ub420 \ub54c\uae4c\uc9c0 \uae30\ub2e4\ub9ac\uc2ed\uc2dc\uc624. \ud504\ub85c\uc138\uc2a4\ub97c \uac11\uc790\uae30 \uc885\ub8cc\ud558\uc9c0 \ub9c8\uc2ed\uc2dc\uc624.',blockHeight:"\uc790\uc0b0 \ubcf4\uc548\uc744 \uc704\ud574 \uba54\uc778 \uccb4\uc778 \ub4a4 12 \ube14\ub85d",dappTip1:"\ud0c0\uc0ac DApp\uc5d0 \uc561\uc138\uc2a4\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4",dappTip2:"\ud0c0\uc0ac\uc5d0\uc11c \uac1c\ubc1c \ud55c \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8\uc744 \ubc29\ubb38\ud558\ub824\uace0\ud569\ub2c8\ub2e4. \uc744 (\ub97c)\uc8fc\uc758 \uae4a\uac8c \uc77d\uc73c\uc2ed\uc2dc\uc624[",dappTip3:"DApp \ubc0f SERO Foundation\uc758 \uace0\uc9c0 \uc0ac\ud56d\uc758 \uc7a0\uc7ac\uc801 \uc704\ud5d8",dappTip4:"]",haveRead:"\uc77d\uc5c8\uc2b5\ub2c8\ub2e4."},page:{wallet:{mainPKr:"mainPKr",PKr:"PKr",Assets:"\uc790\uc0b0",selectWallet:"\uc9c0\uac11 \uc120\ud0dd"},txList:{all:"\ubaa8\ub4e0",out:"\uc544\uc6c3",in:"\uc5d0\uc11c",noData:"\ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4"},txDetail:{title:"\uac70\ub798 \uc815\ubcf4",success:"\uc131\uacf5",pending:"\ubcf4\ub958 \uc911",amount:"\uc591",fee:"\uc218\uc218\ub8cc",from:"\ubd80\ud130",to:"\uc73c\ub85c",hash:"\ud574\uc2dc",block:"\ube14\ub85d",goto:"\uc790\uc138\ud55c \ub0b4\uc6a9\uc740 \ube14\ub85d \ud0d0\uc0c9\uae30\ub85c \uc774\ub3d9\ud558\uc2ed\uc2dc\uc624.>",pendingDesc:"\uc81c\ucd9c\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc7a0\uc2dc\ub9cc \uae30\ub2e4\ub824\uc8fc\uc138\uc694.",contractSuccess:"\uacc4\uc57d\uc774 \uc131\uacf5\uc801\uc73c\ub85c \uc2e4\ud589\ub418\uc5c8\uc2b5\ub2c8\ub2e4!",contractFailed:"\uacc4\uc57d \uccb4\uacb0 \uc2e4\ud328!"},txTransfer:{balance:"\uade0\ud615",address:"\uc8fc\uc18c",inputAmount:"\uc785\ub825 \uae08\uc561",inputAddress:"SERO \uc8fc\uc18c\ub97c \uc785\ub825\ud558\uc2ed\uc2dc\uc624",fee:"\uc218\uc218\ub8cc",total:"\ud569\uacc4",amount:"\uc591",gas:"\uac00\uc2a4",gasPrice:"\uac00\uc2a4 \uac00\uaca9",inputPassword:"\uc785\ub825 \ube44\ubc00\ubc88\ud638",passwordMsg:"\uacc4\uc815 \ube44\ubc00\ubc88\ud638",failed:"\uac70\ub798 \uc804\uc1a1 \uc2e4\ud328, \ucd5c\uc2e0 \ube14\ub85d\uacfc \ub3d9\uae30\ud654 \uc0c1\ud0dc\ub97c \uc720\uc9c0\ud558\uc2ed\uc2dc\uc624!",thirdpay:"\uc774 \uc9c0\ubd88\uc740 \uc81c 3\uc790\uac00 \uc2dc\uc791\ud569\ub2c8\ub2e4. \ud655\uc2e4\ud558\uc9c0 \uc54a\uc740 \uacbd\uc6b0 \uc81c 3\uc790\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624."},addressBook:{title:"\uc8fc\uc18c\ub85d",add:"\uc8fc\uc18c \ucd94\uac00",name:"\uc774\ub984",address:"\uc8fc\uc18c",description:"\uc124\uba85 (\uc120\ud0dd \uc0ac\ud56d)",detail:"\uc8fc\uc18c \uc138\ubd80 \uc0ac\ud56d"},walletManage:{mainPKr:"MainPKr",PKr:"PKr",passwordHint:"\uc554\ud638 \ud78c\ud2b8",export:"\ub2c8\ubaa8\ub2c9 \ubb38\uad6c \ub0b4\ubcf4\ub0b4\uae30",password:"\ube44\ubc00\ubc88\ud638 \uc785\ub825",changePasswordHint:"\ube44\ubc00\ubc88\ud638\ud78c\ud2b8\ubcc0\uacbd",changeProfilePhoto:"\ud504\ub85c\ud544 \uc0ac\uc9c4 \ubcc0\uacbd",changeWalletName:"\uc6d4\ub81b \uc774\ub984 \ubcc0\uacbd"},setting:{language:"\uc5b8\uc5b4",unit:"\ud1b5\ud654 \ub2e8\uc704",node:"\ub178\ub4dc \uc124\uc815",pkr:"PKr \ud655\uc778",source:"\uc6d4\ub81b \uc624\ud508 \uc18c\uc2a4 \ucee4\ubba4\ub2c8\ud2f0 \uc124\uc815",cnNode:"\ub178\ub4dc 2 (\uc911\uad6d \ubcf8\ud1a0)",enNode:"\ub178\ub4dc 1 (\uae00\ub85c\ubc8c)"},create:{import:"\uac00\uc838\uc624\uae30",step1:{title:"SERO Wallet \uc0dd\uc131",walletName:"\uc9c0\uac11 \uc774\ub984",password:"\uc554\ud638",rePassword:"\uc554\ud638 \ubc18\ubcf5",hint:"\uc554\ud638 \ud78c\ud2b8(\uc120\ud0dd \uc0ac\ud56d)",passwordTips:"\ucd5c\uc18c 8 \uc790, \ub300\ubb38\uc790\uc640 \uc18c\ubb38\uc790 \uc54c\ud30c\ubcb3, \uc22b\uc790 \ubc0f \uae30\ud638\ub97c \ud63c\ud569\ud558\ub294 \uac83\uc774 \uc88b\uc2b5\ub2c8\ub2e4."},step2:{title:"\ubc31\uc5c5 \ud301",d1:"\ub2c8\ubaa8\ub2c9\uc744 \uc18c\uc720\ud558\ub294 \uac83\uc740 \ubaa8\ub4e0 \uc790\uc0b0\uc744 \uc18c\uc720\ud558\ub294 \uac83\uacfc \uc720\uc0ac\ud569\ub2c8\ub2e4",d2:"\ubc31\uc5c5 \ub2c8\ubaa8\ub2c9",d3:"\ub2c8\ubaa8\ub2c9 \ubb38\uad6c\ub97c \uc801\uc5b4 \ub461\ub2c8\ub2e4. \ub2c8\ubaa8\ub2c9\uc740 \ud734\ub300 \uc804\ud654\ub97c \ubd84\uc2e4, \ub3c4\ub09c \ub2f9\ud558\uac70\ub098 \uc190\uc0c1\ub41c \uacbd\uc6b0 \uc790\uc0b0\uc744 \ubcf5\uad6c \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.",d4:"\uc624\ud504\ub77c\uc778 \uc800\uc7a5\uc18c",d5:"\uc778\ud130\ub137\uacfc \uaca9\ub9ac \ub41c \uc548\uc804\ud55c \uc7a5\uc18c\uc5d0 \ubcf4\uad00\ud558\uc2ed\uc2dc\uc624. \uc774\uba54\uc77c, \uc568\ubc94, \uc18c\uc15c \uc571 \ub4f1\uacfc \uac19\uc740 \ub124\ud2b8\uc6cc\ud06c \ud658\uacbd\uc5d0\uc11c Mnemonic\uc744 \uacf5\uc720\ud558\uac70\ub098 \uc800\uc7a5\ud558\uc9c0 \ub9c8\uc2ed\uc2dc\uc624.",d6:"Do not take screenshot .",d7:"\uc2a4\ud06c\ub9b0 \uc0f7\uc744 \uacf5\uc720\ud558\uac70\ub098 \uc800\uc7a5\ud558\uc9c0 \ub9c8\uc2ed\uc2dc\uc624. \ud0c0\uc0ac\uc5d0\uc11c \uc218\uc9d1 \ud55c \uc2a4\ud06c\ub9b0 \uc0f7\uc740 \uc790\uc0b0 \uc190\uc2e4\ub85c \uc774\uc5b4\uc9c8 \uc218 \uc788\uc2b5\ub2c8\ub2e4."},step3:{title:"\ub2c8\ubaa8\ub2c9 \ubb38\uad6c \ubc31\uc5c5",d1:"\uc81c\ub300\ub85c \ub2c8\ubaa8\ub2c9 \ud14d\uc2a4\ud2b8\ub97c\uc8fc\uc758\ud558\uace0 \uc548\uc804\ud558\uac8c \ubc31\uc5c5"},step4:{title:"\ud655\uc778",d1:"\uc62c\ubc14\ub978 \uc21c\uc11c\ub85c \ub2c8\ubaa8\ub2c9 \uad6c\ubb38\uc744 \uc120\ud0dd\ud558\uc2ed\uc2dc\uc624",skip:"\uc774\ubbf8 \ubc31\uc5c5 \ub418\uc5c8\uc2b5\ub2c8\uae4c? \uc774 \ub2e8\uacc4\ub97c \uac74\ub108 \ub6f0\uc2ed\uc2dc\uc624"}},import:{tips:"\uac00\uc838 \uc624\ub294 \ub3d9\uc548 \ube44\ubc00\ubc88\ud638\ub97c \uc7ac\uc124\uc815 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4 \ub2c8\ubaa8\ub2c9 \ubb38\uad6c.",inputTips:"\uacf5\ubc31\uc73c\ub85c \uad6c\ubd84 \ub41c \ub2c8\ubaa8\ub2c9 \ubb38\uad6c\ub97c \uc785\ub825\ud558\uc2ed\uc2dc\uc624.",name:"\uc9c0\uac11 \uc774\ub984",password:"\uc6d4\ub81b \ube44\ubc00\ubc88\ud638",rePassword:"\uc554\ud638 \ubc18\ubcf5",hint:"\uc554\ud638 \ud78c\ud2b8"},my:{addressBook:"\uc8fc\uc18c\ub85d",walletManage:"\uc6d4\ub81b \uad00\ub9ac",settings:"\uc124\uc815",termOfUse:"\uc11c\ube44\uc2a4 \uc57d\uad00",about:"\uc6b0\ub9ac\uc5d0 \ub300\ud574",help:"\uc790\uc8fc\ud558\ub294 \uc9c8\ubb38",clear:"\uba85\ud655\ud55c \uc571 \ub370\uc774\ud130",address:{name:"\uc774\ub984",address:"\uc8fc\uc18c",description:"\uc124\uba85 (\uc120\ud0dd \uc0ac\ud56d)",add:"\uc8fc\uc18c \ucd94\uac00",edit:"\uc8fc\uc18c \ud3b8\uc9d1",detail:"\uc8fc\uc18c \uc138\ubd80 \uc0ac\ud56d"},manage:{mainPKr:"MainPKr",pkr:"PKr",hint:"\uc554\ud638 \ud78c\ud2b8",export:"\ub2c8\ubaa8\ub2c9 \ubb38\uad6c \ub0b4\ubcf4\ub0b4\uae30"}},dapp:{search:"DApp URL \uc785\ub825",invalidDApp:"\uc798\ubabb\ub41c DApp URL",recent:"\ucda9\uc801\uc138",popup:"\uc81c\uc548 \ub428",recommended:"\ucee4\ubba4\ub2c8\ud2f0 \ud22c\ud45c DApps",seroLab:"SERO \uc5f0\uad6c\uc18c"}}}};a.d(t,"d",(function(){return f})),a.d(t,"b",(function(){return m})),a.d(t,"a",(function(){return h})),a.d(t,"e",(function(){return g})),a.d(t,"c",(function(){return v}));var f=new u.a,m=new p,h=new l,g=new c,v=new d;new r.a(10).pow(new r.a(18))},103:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(116),o=a(48),s=a(89),i=a(90),c=a(219),l=a(27),u=a(220),p=a(313),d=a(27),f=a(39),m=a(221);function h(e){var t=e.toBuffer(),a=s.blake2b("SZK$PKR$HR$Z",t);return new o.FR(a)}function g(e){var t=e.toBuffer(),a=s.blake2b("SZK$PKR$HR$V",t);return new o.FR(a)}function v(e,t,a){var n=i.accountBase.mult(e),r=i.accountBase.mult(t);return{ZPKr:n.add(a.ZPK),VPKr:r.add(a.VPK)}}function y(e){return s.blake2b("SZK$PKR$KDF",e.toBuffer())}t.toHr_Z=h,t.toHr_V=g;var k=function(){function t(e,t,a){this.i=0,this.ZPKr=n.newPoint(e),this.VPKr=n.newPoint(t),this.BASEr=n.newPoint(a)}return t.prototype.toBuffer=function(){var t=e.alloc(96);return t.fill(this.ZPKr.toBuffer(),0),t.fill(this.VPKr.toBuffer(),32),t.fill(this.BASEr.toBuffer(),64),r.SetFlag(t),t},t.prototype.toString=function(){return d.default.bufferToBs58(this.toBuffer())},t.prototype.toHex=function(){return"0x"+this.toBuffer().toString("hex")},t}();function E(t){var a;if(t instanceof k)a=t;else{var o=void 0;o=t instanceof e?r.ClearFlag(t):r.ClearFlag(l.toBuffer(t)),f(96==o.length);var s=n.Point.bufferTo(o.slice(0,32));if(!s)return;var i=n.Point.bufferTo(o.slice(32,64));if(!i)return;var c=n.Point.bufferTo(o.slice(64));if(!c)return;a=new k(s,i,c)}return a}function b(e,t){return e=E(e),t=c.newTK(t),g(e.BASEr.mult(t.vsk)).add(t.vsk)}t.PKr=k,t.newPKr=E,t.pk2PKr=function(e,t){var a=v(h((e=r.newPK(e)).VPK.mult(t)),g(e.VPK.mult(t)),e),n=i.accountBase.mult(t);return new k(a.ZPKr,a.VPKr,n)},t.isMyPKr=function(e,t){e=c.newTK(e),t=E(t);var a=r.tk2PK(e),n=t.BASEr.mult(e.vsk),o=v(h(n),g(n),a);return!!o.VPKr.isEqualTo(t.VPKr)&&!!o.ZPKr.isEqualTo(t.ZPKr)},t.isPKrValid=function(e){var t=l.toBuffer(e);return!!r.IsFlagSet(t)&&!!E(t)},t.signPKr=function(e,t,a){e=c.newSK(e),a=E(a),t=l.toBuffer(t);var n=h(a.BASEr.mult(e.vsk)).add(e.zsk);return u.sign(t,n,i.accountBase)},t.verifyPKr=function(e,t,a){return e=l.toBuffer(e),t=l.toBuffer(t),a=E(a),u.verify(e,t,a.ZPKr,i.accountBase)},t.genZPKa=function(e,t){return e=E(e),t=o.newFR(t),e.ZPKr.mult(t)},t.signZPKa=function(e,t,a,n){e=l.toBuffer(e),t=c.newSK(t),a=o.newFR(a);var r=h((n=E(n)).BASEr.mult(t.vsk)).add(t.zsk),s=a.mul(r);return u.sign(e,s,i.accountBase)},t.verifyZPKa=function(e,t,a){return e=l.toBuffer(e),t=l.toBuffer(t),a=n.newPoint(a),u.verify(e,t,a,i.accountBase)},t.genNil=function(e,t,a){e=c.newTK(e),t=n.newPoint(t);var o=g((a=E(a)).BASEr.mult(e.vsk)).add(e.vsk),s=t.mult(o).toBuffer();return r.SetFlag(s),s},t.signNil=function(e,t,a,r){e=l.toBuffer(e),t=c.newTK(t),a=n.newPoint(a);var o=g((r=E(r)).BASEr.mult(t.vsk)).add(t.vsk);return p.sign(e,o,i.accountBase,a)},t.verifyNil=function(e,t,a,o,s){e=l.toBuffer(e),t=l.toBuffer(t),a=l.toBuffer(a),a=r.ClearFlag(a),o=n.newPoint(o),s=E(s);var c=n.newPoint(a);return p.verify(e,t,s.VPKr,c,i.accountBase,o)},t.genPKrKey=function(e,t){return e=E(e),t=o.newFR(t),{key:y(e.VPKr.mult(t)),rpk:i.accountBase.mult(t)}},t.fetchRPKKey=function(e,t,a){e=E(e),t=c.newTK(t),a=n.newPoint(a);var r=g(e.BASEr.mult(t.vsk)).add(t.vsk);return y(a.mult(r))},t.fetchVskr=b,t.pkrCrypte=function(e,t,a,n){e=l.toBuffer(e),t=E(t),a=c.newTK(a),n=E(n);var r=b(t,a),o=y(n.VPKr.mult(r));return m.default(e,o)},t.pkrEncrypt=function(t,a){t=l.toBuffer(t),a=E(a);var n=o.randomFR(),r=y(a.VPKr.mult(n)),s=m.default(t,r),c=i.accountBase.mult(n);return e.concat([c.toBuffer(),s])},t.pkrDecrypt=function(e,t,a){var r=(e=l.toBuffer(e)).slice(32,64),o=n.newPoint(e.slice(0,32)),s=b(t=E(t),a=c.newTK(a)),i=y(o.mult(s));return m.default(r,i)}}).call(this,a(23).Buffer)},116:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(219),o=a(90),s=a(39),i=a(27),c=a(27);function l(e){e[e.length-1]|=64}function u(t){var a=e.from(t);return a[t.length-1]&=-65,a}function p(e){return 0!=(64&e[e.length-1])}t.SetFlag=l,t.ClearFlag=u,t.IsFlagSet=p;var d=function(){function t(e,t){this.ZPK=n.newPoint(e),this.VPK=n.newPoint(t)}return t.prototype.toBuffer=function(){var t=e.alloc(64);return t.fill(this.ZPK.toBuffer(),0),t.fill(this.VPK.toBuffer(),32),l(t),t},t.prototype.toHex=function(){return"0x"+this.toBuffer().toString("hex")},t.prototype.toString=function(){return c.default.bufferToBs58(this.toBuffer())},t}();function f(e){if(e instanceof d)return e;var t=u(i.toBuffer(e));s(64==t.length);var a=n.Point.bufferTo(t.slice(0,32));if(a){var r=n.Point.bufferTo(t.slice(32));if(r)return new d(a,r)}}t.PK=d,t.newPK=f,t.tk2PK=function(e){e=r.newTK(e);var t=o.accountBase.mult(e.vsk);return new d(e.ZPK,t)},t.isPKValid=function(e){var t=i.toBuffer(e);return!!p(t)&&!!f(t)}}).call(this,a(23).Buffer)},131:function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return s}));var n=a(13),r=a(14),o=new Worker(e,{}),s=new(function(){function e(){Object(n.a)(this,e),this.callbackHandler=new Map,this.messageId=0;var t=this;t.callbackHandler=new Map,t.messageId=0,o.onmessage=function(e){var a=e.data,n=t.callbackHandler.get(a.messageId);t.callbackHandler.delete(a.messageId),n&&"function"===typeof n&&n(a)}}return Object(r.a)(e,[{key:"importMnemonic",value:function(e,t){var a={method:"importMnemonic",data:e};this.handlerMsg(a,t)}},{key:"createAccount",value:function(e,t){var a={method:"createAccount",data:e};this.handlerMsg(a,t)}},{key:"exportMnemonic",value:function(e,t){var a={method:"exportMnemonic",data:e};this.handlerMsg(a,t)}},{key:"getSK",value:function(e,t){var a={method:"getSK",data:e};this.handlerMsg(a,t)}},{key:"handlerMsg",value:function(e,t){if(t){var a=this.messageId++;e.messageId=a,console.log("account service handlerMsg: ",e),o.postMessage(e),this.callbackHandler.set(a,t)}}}]),e}())}).call(this,a(470))},143:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(48),r=a(27),o=a(90),s=a(39),i=function(){function t(t,a,o,s){"string"==typeof a&&(a=r.toBN(a).toArrayLike(e,"le",32)),t=r.toBuffer(t),a=n.newFR(a),o=r.toBuffer(o),s=r.toBuffer(s),this.tkn_currency=t,this.tkn_value=a,this.tkt_category=o,this.tkt_value=s}return t.prototype.isValid=function(){return 0==this.tkn_value.toBuffer()[31]&&0==this.tkn_value.toBuffer()[30]},t.prototype.hasTkt=function(){return 0!=e.compare(this.tkt_value,t.tkt_empty)},t.prototype.toBuffer=function(){return e.concat([this.tkn_currency,this.tkn_value.toBuffer(),this.tkt_category,this.tkt_value])},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t.tkt_empty=e.alloc(32,0),t}();function c(e){if(e instanceof i)return e;var t=r.toBuffer(e);s(128==t.length);var a=0,o=t.slice(a,32);a+=32;var c=n.newFR(t.slice(a,a+32));a+=32;var l=t.slice(a,a+32);a+=32;var u=t.slice(a,a+32);return new i(o,c,l,u)}function l(e){e=c(e);var t=o.genTknBase(e.tkn_currency).mult(e.tkn_value);if(e.hasTkt()){var a=o.genTktBase(e.tkt_category,e.tkt_value);return t.add(a)}return t}t.Asset=i,t.newAsset=c,t.genAssetCC=l,t.genAssetCM=function(e,t){var a=l(e=c(e));t=n.newFR(t);var r=o.crBase.mult(t);return a.add(r)}}).call(this,a(23).Buffer)},146:function(e,t,a){},150:function(e,t,a){"use strict";a.r(t),a.d(t,"sortTxMap",(function(){return m})),a.d(t,"genTxMap",(function(){return f})),a.d(t,"genTxInfo",(function(){return u})),a.d(t,"convertTx",(function(){return p})),a.d(t,"cutZero",(function(){return h}));var n=a(393),r=a(27),o=a.n(r),s=a(15),i=a.n(s),c=a(42),l=a(1);function u(e,t,a,n){var s=l.d.get(n),u=l.d.get(a);if(u&&s&&s.Asset&&s.Asset.Tkn){var p=o.a.hexToCy(s.Asset.Tkn.Currency),f=d(s),m=new i.a(u.GasUsed).multipliedBy(u.GasPrice).dividedBy(new i.a(10).pow(18)),h=c.a.convert(s.Asset.Tkn.Value,p);console.log(n,s.Asset.Tkn.Value,h),"out"===e&&(h=new i.a(h).multipliedBy(-1));var g=t.get(a+p);if(g){var v=g.value;g.value=new i.a(v).plus(new i.a(h))}else g={root:n,type:e,hash:a,block:u.Num,currency:p,value:new i.a(h),fee:m,gas:u.Gas,gasUsed:u.GasUsed,gasPrice:u.GasPrice,time:u.Time,from:u.From,to:Object(r.addrToString)(f),blockHash:u.BlockHash};g.from!==Object(r.addrToString)(f)&&(g.To=g.from),t.set(a+p,g)}}function p(e){-1===new i.a(e.value).comparedTo(0)&&(e.type="out",e.value=new i.a(e.value).plus(e.fee).toString(10)),e.fee=new i.a(e.fee).toFixed(8),e.value=new i.a(e.value).toFixed(8)}function d(e){var t="";return e.State.OS.Out_C?t=e.State.OS.Out_C.PKr:e.State.OS.Out_O?t=e.State.OS.Out_O.Addr:e.State.OS.Out_P?t=e.State.OS.Out_P.PKr:e.State.OS.Out_Z&&(t=e.State.OS.Out_Z.PKr),t}function f(e,t,a,n,r){var s=l.d.get(e),c=l.d.get(t);if(s&&s.Asset&&s.Asset.Tkn&&c){var u=o.a.hexToCy(s.Asset.Tkn.Currency);if(a&&a===u){var p=t+u,f=c.Num;if("0x0000000000000000000000000000000000000000000000000000000000000001"===t||"0x0000000000000000000000000000000000000000000000000000000000000002"===t||"0x0000000000000000000000000000000000000000000000000000000000000003"===t){var m=d(s);p=s.State.Num+m,f=s.State.Num}var h=n.get(p),g=new i.a(s.Asset.Tkn.Value);if("out"===r&&(g=new i.a(g).multipliedBy(-1)),h){var v=h.value;h.value=new i.a(v).plus(new i.a(g))}else h={root:e,type:r,hash:t,block:f,currency:u,value:new i.a(g),fee:new i.a(c.GasUsed?c.GasUsed:c.Gas).multipliedBy(c.GasPrice),gas:c.Gas,gasUsed:c.GasUsed,gasPrice:c.GasPrice,time:c.Time,blockHash:c.BlockHash};n.set(p,h)}}}function m(e){var t=new Map;return e.forEach((function(e,a,n){new i.a(e.value).isNegative()&&(e.type="out","SERO"===e.currency&&(e.value=new i.a(e.value).plus(e.fee))),e.value.isZero()||(e.value=c.a.convert(e.value,e.currency),t.set(a,e))})),new Map(Object(n.a)(t.entries()).sort((function(e,t){return e[1].blockt[1].block?-1:0})))}function h(e){if(e.indexOf(".")>-1&&"0"==e.charAt(e.length-1))for(var t=e.length-1;t>0;t--)if("0"!=e.charAt(t))return"."==e.charAt(t)?e.substring(0,t):e.substring(0,t+1);return e}},167:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(27),o=a(314),s=a(48),i=a(90),c=a(39),l=a(27),u=a(116),p=function(){function t(e,t,a){this.ZPK=n.newPoint(e),this.VPK=n.newPoint(t),this.BASE=n.newPoint(a),c(this.isValid())}return t.prototype.isValid=function(){return this.ZPK.isValid()&&this.VPK.isValid()&&this.BASE.isValid()},t.prototype.toBuffer=function(){return e.concat([this.ZPK.toBuffer(),this.VPK.toBuffer(),this.BASE.toBuffer()])},t.prototype.toString=function(){return l.default.bufferToBs58(this.toBuffer())},t}();function d(e){if(e instanceof p)return e;var t=r.toBuffer(e);return c(96==t.length),new p(n.newPoint(t.slice(0,32)),n.newPoint(t.slice(32,64)),n.newPoint(t.slice(64,96)))}t.PKr=p,t.newPKr=d,t.isPKrValid=function(e){var t=r.toBuffer(e);return!u.IsFlagSet(t)&&!!d(t).isValid()},t.pk2PKr=function(e,t){e=o.newPK(e),t=s.newFR(t);var a=e.ZPK.mult(t).add(e.ZPK),n=e.VPK.mult(t).add(e.VPK),r=i.accountBase.mult(t);return new p(a,n,r)}}).call(this,a(23).Buffer)},171:function(e,t,a){},178:function(e,t,a){"use strict";var n=a(13),r=a(14),o=function(){function e(){Object(n.a)(this,e)}return Object(r.a)(e,[{key:"clear",value:function(){this._clear(),this._clearPlus()}},{key:"_clear",value:function(){window.localStorage.clear()}},{key:"_clearPlus",value:function(){try{plus&&plus.storage&&plus.storage.clear()}catch(e){console.log(e.message)}}},{key:"get",value:function(e){var t=this._get(e),a=this._getPlus(e);return 0===t?t:t||a}},{key:"_get",value:function(e){var t=window.localStorage.getItem(e);return t||"0"===t?JSON.parse(t):null}},{key:"_getPlus",value:function(e){try{if(plus&&plus.storage){var t=plus.storage.getItem(e);return t||"0"===t?JSON.parse(t):null}return null}catch(a){console.log(a.message)}}},{key:"key",value:function(e){return this._key(e)||this._keyPlus(e)}},{key:"_key",value:function(e){return window.localStorage.key(e)}},{key:"_keyPlus",value:function(e){try{if(plus&&plus.storage)return plus.storage.key(e)}catch(t){console.log(t.message)}}},{key:"delete",value:function(e){this._delete(e),this._deletePlus(e)}},{key:"_delete",value:function(e){window.localStorage.removeItem(e)}},{key:"_deletePlus",value:function(e){try{plus&&plus.storage&&plus.storage.removeItem(e)}catch(t){console.log(t.message)}}},{key:"set",value:function(e,t){try{this._set(e,t)}catch(a){window.localStorage.removeItem(e),this._setPlus(e,t)}}},{key:"_set",value:function(e,t){window.localStorage.setItem(e,JSON.stringify(t))}},{key:"_setPlus",value:function(e,t){try{plus&&plus.storage&&plus.storage.setItem(e,JSON.stringify(t))}catch(a){console.log(a.message)}}},{key:"has",value:function(e){return this._has(e)||this._hasPlus(e)}},{key:"_has",value:function(e){return!!window.localStorage.getItem(e)}},{key:"_hasPlus",value:function(e){try{if(plus&&plus.storage)return!!plus.storage.getItem(e)}catch(t){consol}}},{key:"length",value:function(){return this._length()||this._lengthPlus()}},{key:"_length",value:function(){return window.localStorage.length}},{key:"_lengthPlus",value:function(){if(plus&&plus.storage)return plus.storage.getLength()}}]),e}();t.a=o},181:function(e,t,a){e.exports=a.p+"static/media/logo.2f0a4ff7.png"},204:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(97),r=new n("21888242871839275222246405745257275088548364400416034343698204186575808495617"),o=new n("2736030358979909402780800718157159386076813972158567259200215660948447373041"),s={ECC_A:new n("168700"),ECC_D:new n("168696"),FQ_MODULUS:r,FR_MODULUS:o,CRS:e.from("096b36a5804bfacef1691e173c366a47ff5ba84a44f26ddd7e8d9f79d5b42df0","hex").reverse()};t.default=s}).call(this,a(23).Buffer)},219:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(89),r=a(48),o=a(62),s=a(90),i=a(27),c=a(39),l=a(116),u=function(){function t(e,t){this.zsk=r.newFR(e),this.vsk=r.newFR(t)}return t.prototype.isValid=function(){return!this.zsk.isZero()&&!this.vsk.isZero()},t.prototype.toBuffer=function(){var t=e.alloc(64);return t.fill(this.zsk.toBuffer(),0),t.fill(this.vsk.toBuffer(),32),l.SetFlag(t),t},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t}();function p(e){if(e instanceof u)return e;var t=i.toBuffer(e);return 64>>=8,e[t+1]=a,a>>>=8,e[t+2]=a,a>>>=8,e[t+3]=a},e.ROTATE=function(e,t){return e<>>32-t},e}(),n=e.alloc(16,0);n.fill(0),t.default=function(t,r){var o=new a(r,n,0),s=e.alloc(t.length);return o.encrypt(s,t),s}}).call(this,a(23).Buffer)},222:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(48),o=a(90),s=a(89),i=a(313),c=a(220),l=a(167),u=a(27),p=a(39),d=a(223);t.fetchKey=function(t,a){t=d.newTK(t),a=e.from(u.toBuffer(a)),p(32==a.length),64&a[31]&&(a[31]&=-65);var r=n.newPoint(a);if(r){var o=r.mult(t.vsk);return s.blake2b("CZERO.KEYS.KDF",o.toBuffer())}},t.genPKrKey=function(e,t){e=l.newPKr(e),t=r.newFR(t);var a=e.ZPK.mult(t),n=e.VPK.mult(t),o=a.toBuffer(),i=s.blake2b("CZERO.KEYS.KDF",n.toBuffer());return o[31]|=64,{key:i,rpk:o}},t.signByPKr=function(e,t,a){if(t=u.toBuffer(t),e=d.newSK(e),a=l.newPKr(a),p(32==t.length),t&&0!=t.length&&e.isValid()&&a.isValid()){var n=a.BASE.add(o.accountBase.points.get(0));return c.sign(t,e.vsk.mul(e.zsk),n)}},t.verifyByPKr=function(e,t,a){if(e=u.toBuffer(e),t=u.toBuffer(t),a=l.newPKr(a),p(32==e.length),!e||0==e.length||!t||0==t.length||!a.isValid())return!1;var n=a.BASE.add(o.accountBase.points.get(0));return c.verify(e,t,a.VPK,n)},t.genNil=function(e,t){if(e=d.newSK(e),t=n.newPoint(t),e.isValid()&&t.isValid())return t.mult(e.vsk.mul(e.zsk))},t.signNil=function(e,t,a,r){if(e=u.toBuffer(e),t=d.newSK(t),a=l.newPKr(a),r=n.newPoint(r),p(32==e.length),e&&0!=e.length&&t.isValid()&&a.isValid()&&r.isValid()){var s=a.BASE.add(o.accountBase.points.get(0));return i.sign(e,t.vsk.mul(t.zsk),s,r)}},t.verifyNil=function(e,t,a,r,s){if(e=u.toBuffer(e),t=u.toBuffer(t),a=n.newPoint(a),r=l.newPKr(r),s=n.newPoint(s),p(32==e.length),p(96==t.length),!(e&&0!=e.length&&t&&0!=t.length&&r.isValid()&&s.isValid()))return!1;var c=r.BASE.add(o.accountBase.points.get(0));return i.verify(e,t,r.VPK,a,c,s)},t.genTrace=function(e,t){if(e=d.newTK(e),t=n.newPoint(t),e.isValid()&&t.isValid())return t.mult(e.vsk)},t.isMyPKr=function(e,t){if(e=d.newTK(e),t=l.newPKr(t),!e.isValid()||!t.isValid())return!1;var a=t.ZPK.add(e.ZPK.mult(r.FR.ONE.nega())).mult(e.vsk),n=t.VPK.add(e.ZPK.mult(e.vsk.mul(r.FR.ONE.nega())));return a.isEqualTo(n)}}).call(this,a(23).Buffer)},223:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(89),r=a(48),o=a(62),s=a(90),i=a(27),c=a(39),l=function(){function t(e,t){this.zsk=r.newFR(e),this.vsk=r.newFR(t)}return t.prototype.isValid=function(){return!this.zsk.isZero()&&!this.vsk.isZero()},t.prototype.toBuffer=function(){var t=e.alloc(64);return t.fill(this.zsk.toBuffer(),0),t.fill(this.vsk.toBuffer(),32),t},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t}();function u(e){if(e instanceof l)return e;var t=i.toBuffer(e);return 64>>4).toString(16)),t.push((15&e[a]).toString(16));return"0x"+t.join("")},hexToBytes:function(t){var a=e.from(o(t),"hex");return new Uint8Array(a)},utf8ToHex:v,bs58ToHex:function(e){return"0x"+r.decode(e).toString("hex")},bytesToBase58:function(e){return r.encode(e.buffer)},padLeft:m,padRight:f,bufferToHex:function(e){return"0x"+e.toString("hex")},cyToHex:function(e){return"0x"+m(v(e.toUpperCase()),64,"0")},hexToBN:function(e){return E(o(e))},hexToCy:k,toBN:E,isNotNull:function(e){return!c(e)&&void 0!==e},toBuffer:b,bufferToBN:function(e){return new n(e,"le")},isEmptyBuffer:function(t,a){return void 0===a&&(a=32),0==t.length||0==e.alloc(a).compare(t)},bufferToBs58:function(e){return r.encode(e)},addrToString:d};t.default=w}).call(this,a(23).Buffer)},310:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(311),r=a(48),o=a(312),s=a(97),i=a(39),c=a(62),l=function(){function t(e,t,a,n){this.personal=e,this.SegNum=t,this.SegBitsNum=a,this.Bits=n,this.indexPoints=new Map,this.points=new Map,this.init()}return t.prototype.init=function(){for(var t=new s(2).pow(new s(this.Bits)),a=Math.ceil(this.SegBitsNum/this.Bits),o=new r.FR(t),c=0;cthis.SegNum*this.SegBitsNum&&i(!1,"bigBuffer.length > SegNum * SegBitsNum");for(var n=Math.ceil(this.SegBitsNum/this.Bits),s=Math.ceil(a.bitsLength()/this.SegBitsNum),l=c.Point.ZERO,u=0;u=i),this.bitsLen=r,this.rightBits=a%8,this.buf=e.from(t.slice(Math.floor(a/8),Math.floor((s-1)/8)+1)),this.buf[this.buf.length-1]&=o.get(s%8)}return t.prototype.toBigNumber=function(){return new r(this.buf,"le").shrn(this.rightBits)},t.prototype.bitsLength=function(){return this.bitsLen},t.from=function(e,a,n){return new t(e.buf,a+e.rightBits,n)},t}();t.BitBuffer=s}).call(this,a(23).Buffer)},313:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(48),o=a(39),s=a(89),i=a(166);function c(e){return s.blake2b("SZK$DSAN$HASH2",e)}function l(e){return new i(e)}t.sign=function(t,a,n,o){var i=e.concat([l(32),a.toBuffer(),t]),u=new r.FR(function(e){return s.blake2b("SZK$DSAN$HASH1",e)}(i)),p=n.mult(u);if(p&&!p.isZero()&&p.isValid()){var d=o.mult(u);if(d&&!d.isZero()&&d.isValid()){var f=n.mult(a);if(f&&!f.isZero()&&f.isValid()){var m=o.mult(a);if(m&&!m.isZero()&&m.isValid()){var h=e.concat([p.toBuffer(),d.toBuffer(),f.toBuffer(),m.toBuffer(),t]),g=new r.FR(c(h)),v=u.add(a.mul(g));return e.concat([v.toBuffer(),p.toBuffer(),d.toBuffer()])}}}}},t.verify=function(t,a,s,i,l,u){if(o(96==a.length,"sign.length != 96"),!s||s.isZero()||!s.isValid())return!1;if(!i||i.isZero()||!i.isValid())return!1;var p=new r.FR(a.slice(0,32)),d=n.Point.bufferTo(a.slice(32,64)),f=n.Point.bufferTo(a.slice(64,96));if(!p||p.isZero())return!1;if(!d||d.isZero()||!d.isValid())return!1;if(!f||f.isZero()||!f.isValid())return!1;var m=l.mult(p);if(!m||m.isZero()||!m.isValid())return!1;var h=u.mult(p);if(!h||h.isZero()||!h.isValid())return!1;var g=e.concat([d.toBuffer(),f.toBuffer(),s.toBuffer(),i.toBuffer(),t]),v=new r.FR(c(g)),y=s.mult(v),k=d.add(y);if(!m.isEqualTo(k))return!1;var E=i.mult(v),b=f.add(E);return!!h.isEqualTo(b)}}).call(this,a(23).Buffer)},314:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(27),o=a(39),s=a(223),i=function(){function t(e,t){this.ZPK=n.newPoint(e),this.VPK=n.newPoint(t)}return t.prototype.toBuffer=function(){return e.concat([this.ZPK.toBuffer(),this.VPK.toBuffer()])},t.prototype.toString=function(){return r.default.bufferToBs58(this.toBuffer())},t}();t.PK=i,t.newPK=function(e){if(e instanceof i)return e;var t=r.toBuffer(e);o(64==t.length);var a=n.Point.bufferTo(t.slice(0,32)),s=n.Point.bufferTo(t.slice(32,64));return new i(a,s)},t.tk2PK=function(e){var t=(e=s.newTK(e)).ZPK,a=e.ZPK.mult(e.vsk);return new i(t,a)}}).call(this,a(23).Buffer)},315:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(143),r=a(48),o=a(27),s=a(221),i=a(39),c=function(){function t(e,t,a){this.asset=n.newAsset(e),this.memo=o.toBuffer(t),this.ar=r.newFR(a)}return t.prototype.isValid=function(){return!!this.asset.isValid()&&!this.ar.isZero()},t.prototype.toBuffer=function(){return e.concat([this.asset.toBuffer(),this.memo,this.ar.toBuffer()])},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t}();function l(e){if(e instanceof c)return e;var t=o.toBuffer(e);i(224==t.length);var a=0,s=128,l=n.newAsset(t.slice(a,a+s));a+=s,s=64;var u=t.slice(a,a+s);a+=s,s=32;var p=r.newFR(t.slice(a,a+s));return new c(l,u,p)}t.Info=c,t.newInfo=l,t.encInfo=function(e,t){e=o.toBuffer(e);var a=(t=l(t)).toBuffer();return s.default(a,e)},t.decEInfo=function(e,t){return e=o.toBuffer(e),t=o.toBuffer(t),l(s.default(t,e))}}).call(this,a(23).Buffer)},335:function(e,t,a){"use strict";(function(e){var n=this&&this.__awaiter||function(e,t,a,n){return new(a=a||Promise)((function(r,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function i(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a((function(e){e(t)}))).then(s,i)}c((n=n.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var a,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(o){return function(i){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=0<(r=s.trys).length&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]>>> ",d,f),[4,t.findRoots(e.From,s.default.hexToCy(d),f)]);case 4:return m=r.sent(),console.log("result >>>> ",m),m&&(m.remain.isNeg()||m.remain.isZero())?(o.push.apply(o,m.utxos),[3,3]):[2,new Promise((function(e,t){t("no enough unlocked utxos")}))];case 5:return[2,new Promise((function(e){e(o)}))]}}))}))},t.buildTxParam=function(t,a){return n(this,void 0,void 0,(function(){var n,o,c,u,p,d,f,m,h,g,v,y,k;return r(this,(function(r){switch(r.label){case 0:return n=new Array,a.Utxos.forEach((function(e){n.push(e.Root)})),[4,t.getAnchor(n)];case 1:if(null===(o=r.sent()))throw new Error("can not find Anchor by root");if(c=new Array,u=0,p=new l(!1,a.Fee),a.Utxos.forEach((function(t,a){if(null===t.State)throw new Error("can not find out by root");p.AddIn(t.Asset),c.push({SKr:s.toString(e.alloc(96)),Out:{Root:t.Root,State:t.State},Witness:o[a]}),s.default.isNotNull(t.State.OS.Out_O)&&u++})),2500 2500");for(d=new Array,a.Receptions.forEach((function(t){p.AddOut(t.Asset),d.push({PKr:s.toHex(t.Addr),Asset:t.Asset,Memo:s.toString(e.alloc(64))})})),null!==a.Cmds&&null!==(f=new i(a.Cmds).OutAsset())&&p.AddOut(f),m=p.GetTknList(),h=p.GetTktList(),g=Math.max(m.length,h.length),v=0;v"+n.operator+" > "+n.content+""):(a=t.callbackHandler.get(n.messageId),t.callbackHandler.delete(n.messageId),a&&"function"==typeof a&&a(n))}}return t.prototype.init=function(e,t,a){var n={rpc:e,syncTime:t},o={method:r.Method.Init,data:n};this.handlerMsg(o,a)},t.prototype.initAccount=function(e,t){var a={method:r.Method.InitAccount,data:e};this.handlerMsg(a,t)},t.prototype.balanceOf=function(e,t){var a={method:r.Method.BalanceOf,data:e};this.handlerMsg(a,t)},t.prototype.ticketsOf=function(e,t){var a={method:r.Method.TicketsOf,data:e};this.handlerMsg(a,t)},t.prototype.getTxList=function(e,t){var a={method:r.Method.GetTxList,data:e};this.handlerMsg(a,t)},t.prototype.getTxDetail=function(e,t,a){var n={method:r.Method.GetTxDetail,data:{tk:e,hash:t}};this.handlerMsg(n,a)},t.prototype.getPKrIndex=function(e,t){var a={method:r.Method.GetPKrIndex,data:e};this.handlerMsg(a,t)},t.prototype.commitTx=function(e,t){var a={method:r.Method.CommitTx,data:e};this.handlerMsg(a,t)},t.prototype.getSeroPrice=function(e,t){var a={method:r.Method.GetPrice,data:e};this.handlerMsg(a,t)},t.prototype.clearData=function(e,t){var a={method:r.Method.ClearData,data:e};this.handlerMsg(a,t)},t.prototype.getSyncState=function(e,t){var a={method:r.Method.HealthyCheck,data:e};this.handlerMsg(a,t)},t.prototype.getPendingAndConfirming=function(e,t){var a={method:r.Method.GetPendingAndConfirming,data:e};this.handlerMsg(a,t)},t.prototype.handlerMsg=function(e,t){var a;t&&(a=this.messageId++,e.messageId=a,n.postMessage(e),this.callbackHandler.set(a,t))},t}();t.PopupService=o}).call(this,a(468))},371:function(e,t,a){e.exports=a.p+"static/media/NONT.2a63a1cf.png"},372:function(e,t,a){e.exports=a.p+"static/media/HAPY.f7229625.png"},373:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAABcSAAAXEgFnn9JSAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAABbxSURBVHja7J17uFRV3cc/a5+BjcYl4NiNnvdtv3FQUzBJK8vj7XnfthfELpqSWmmpaJl4Q7wmpvXiFa28VGZvCampBwTF0RBkLDMVb0+CpC4BLyH5bC4KeODs9f6x9snRBPbsmT2z98zv+ycwzMxe6zN7rb0+67eUMQaJRPL+ceQSSCQCiEQigEgktU4h6QuVUnL1qoznFQvAHlr7pff7+7DL+RkOq9WQcLLqpFuuWOWpdo4td5DGweEDzwCnb/Yfvan+Uw0Jz+FN9ZqZo74qVy1HdxBJYjA6gCuBMdEfPbfVF/U3Q4A7wpnOU2pIOE51skiupADSbGAMBM4DJgB9Eg1rh4S7EPK3sMuZrtrD76tOVsmVlUl63sFwPK94DPB34MykcJS1mFLt4ZFsUK+FM50zTIk2ucoCSF7h+ALwCPBr4EM1/c/7mX5qSHiZWe0sM/er/eRqyxArT2AMAy4FvpH2e6lB4ceAuWGXU1Lt4TdVJy9JCwggWQVjG+xTqbOBbev53qo97GQTL4RdznWqPZyoOlknLSJDrCzBcSjwLPCjesNR9nPnqPbwe6xTK8LZzrGmhCxWCSANB2OU5xXnA38APpGJD7Wt6a8GhTeawFli5qrdpZVkiNUIMNqju8XxWf2hUYPD4Rj+GnY5s1V7+F3VyQppObmDpA1GwfOKp2Af247P/DVUoNrDMWxUy8OZzsWmRF9pRQEkLTh84GlgKvDBXH34PqaPGhKey5vqVdFWZIhVazCGY/WQg3P/ZfqboYi2IoDUCIyBwLnAqVS7Ap61kZdoKzLEqgKMXj1kCTCx2eAoa33RVgSQiuEo10M+3BJfWrQVGWLFAKNuekhmh13v1laOVp0sFUAEjIbpIZkFxWorL4ZdzrWqPTyrlbUVp8XhaLwekt2fTke1h99nnfpHK2srTouCkT09JKvZ1gyItJXnzFy1mwyxmhuMzOshmR12DQ47MDwa3unMVtu1jrZSaBEwCsBJwGTytgKeKUpAbReOoVstD2eqKWpI+KNmr7bitAAcXwKeAq4WOGqUvqaPGhKeF2krX5E7SD7BGA5cAYyVHp1SrLZyZzjDeVINDcepThYLINkHYwDvVA8Rc7UeI6+h4acJeTbscqap9vDkZtJWnCYCw/G84rexGvpEgaPuPUmp9vAoNqhXw7uc002pOfqW0yRw7AH8BbiJVtFDspp+Zhs1OLzcrFHLzP1qXxliNRaMYcAU4EjpmRkbdg00w4AHwi5nQVRtZakAUj8w+mH1kHOQFfBsg9Ie7pVnbcXJIRxfAxYBFwscufkZzq224uQIjFGeV5wH3I7oIflMDrWVQg7AGBrdLY4D2dDTFMOuHGkrhQyDIXpIU1OSD23FySgcooe0Snq1lbXqFTNHfVnuIFsGQ/SQVs0A0w50RdrKEaozxsFCrQKI6CGSf428rLayKOxybo60ldUtO8QSPUSymV6pVHt4NBvUa+Es59RGaitOA+EQPUSy5fQz26gPhldG1VYaoq0UGgCG6CGSyoZdg8JybeVo1cmypgMk0kNOw1YqlBVwSeWgWG1Fh13Oz1V7OKke2opTJzi+itVDLhE4JFX+pDuqPTyZt9Q/wtnOMWlrK07KYIz0vOIDwB2IHiKpZT5gBqhB4a/T1lYKKYExlHeqh4geIklv2NWrrXQ5d6n28DjVyeuZvYNEh8ucjH1se6LAIakPJaDaw7F0q5fDmc5FtTwkqFBDOFzgXmAfabHaZNNV/X9n3lZj5ErETh8Up+FwF6x6LFOAaO2/7XnFrwA/BL6P1P2tOiZwuuUqVJQ/Az9wdfB4JodYWvurtPZPBUZGdxOJpB55BVuVf89awlFzQMpAWay1fwAwJpqPSCRpZAP2YdAIVwe/d3Vgav0GqT7m1dq/G9gZOBNYI+0pqWH+AOzo6uACVwepLRgmBsSU+M+YkHRr7V8OjABuBIy0raSKPAXs4+rg664OXkr7zZLfQXp4PuxyfmpK8VbGtfZXaO1/F9gN+JO0s6TC/BN7Lv1nXB08uLV/7HnFgZ5XvLRxgLRRSFKpQmt/IdAZTapelnaXbCWbsDtLO1wd3ODqoGcrYDieVzw2mvue2fg5SIJKFVr7Rmv/98D2wEXRZEsieW+KwChXBxNcHayKcdf4AvDXaCj/oUxN0tXgsIM+5tHwTmeWKcXb36G1v05r/4fADsBt0h8kUf4OHOzqYH9XB4tigPFxzytOj4bun8nGHOR9KSmvVBF/yV9rf6nW/uHA3tEkTNKaWYvdWbqzq4PZMcDYxvOK5wPPAeOyNUnfUmylivMrrVShtb8AGB1NxlZKf2mZGOy59B2uDi5zddAdA47DsFsoLiLFLRTp7gcZYNrpb7rCmc5CU2L7mJCEWvs3YB8LT40maZLmzZ+B3V0dfMfVwYoYYOwSHcB6G8RbasguIL0jryHhrlGlit+aEoNigiLaSnOnIj3E84rbeV7xemBhNBSvS+pXtCFhpYoybeVgRFtphlSkh0RbKCYAS4ATqHOhkfpXNUlYqUJrfzZWW5kYTeYk+UtFeojnFX3gGeAqGlRhs2Flf9SgcBj9zANhl/OgKfEfMSHp1tq/DOiIJnWireQjT1OBHuJ5xQ7PK86KhtY7NPKDN7w2b1mlimsq1Fa+A+weTfIk2cw/sTtLR1eoh/wNa4I3PNkoXp2wUoXW/uPAntFk7xXpj5lJD1YPGeHq4PoEekifrHyRbFV3T1CpokxbGRFN/kRbaWzuA0ZGekgQ465Rcz2keQHpHXb1aitdzkxTinfRIm3lAmDHaDIoqW+eB8a6OvAbrYc0PSCWkmSVKrT2X9La/zq2eIRoK+lnLXAWsJOrg1kxwEhdD2kNQHqTXFt5MPplGh9NFiW1jcEWHu9wdXBpTD3kUOqgh7QWIL1Jpq30RNpKRzRpFG2lNnkY+Kyrg2Nj6iGjIj3kD9RBD2lNQHpHXsm1lQnAKOweA0myvIKtyv9FVwePxQCj3fOK1wFPUEc9pKUBiT51Um1lkdb+/oi2Umk2YE8a3t7VwfSYesgp0TUen9t+lucPDoi2Up/cjtVDznd18FaMu4aPXTmfShMcwOo0QwuWaSvzRVupWZ4G9nV1cFhMPWS45xXvwuohOzbLRXCaqUVVe7g3m3gxnOFcbUpsExMU0VbenXI9ZH4MMAZ6XnEK8Gw0dG2qOE3XvAXa1NDwB1G1lW+LthI7SfSQY7Aa+kQypIcIIHGyrRmoBoU3mcBZbOYzOiYkraqtJNFDHomGpk19AKvT7C2vBocjcHg87HJmiLbyb6lUDxnmecVpWD1kt1b45XBa4UtG2sohdKuXwxnOZFOKNxwo01b2jSatzZIkesh50XDqG6007nRa6cvS1/RRQ8MLWKteNXPUIXFfprU/H1tt5UTyra0k1UOejYacLXcAq0MrxmorM8KZzuMVaivXR/OTq6NJbZ7yMPC5hHrIJ2jROLRw1JBwND0sCruc/6tAWwkibWVkNLnNel4FjsLqIY/GACP3eogAUsu0oVR7+M1IW5lQobbiA2OjyW7WsgF7Lv0IVwfTWkkPEUDSiNVWrjKrnaXmfrVPBfOTWcBO0aQ3K9rKHcCnXB2c14p6iACS5rBrUPhx+pl5CbSVS7Hayk00Tlt5BquHHOrqQMcAoyn1EAGkHqAk11aOBT4bTYrrlTeAk4BdY+ohA5pZDxFA6pXk2spjwBexeyfS1FZ6gGuwj22vi6mHfDuaZzStHiKA1DvJtZXp2EOCLqb22sp92MNlTomph+wB/CUaAn5YGlUAqf2wK5m28pbW/vnRGP/2GnyMF4BDIj3k2RhgDPO84s1EVdSlFQWQlCmpSls5jOTaylpgEvbp1F0xwOjnecVzsXrIkdJwAkh9Uz9txQC/wa5nTImph3wNWz3kYlpQD6np76ExCZ9IPqRkB155L37DWaiGhuNUJ0vivsbzioOB/bT273i/v3/bGzwKcOOsgEf/3yisBrOPtIjNiy9+SQkgWUkPxgTOb1V7eIrqZHW93tbzikOju8VxQJs0hACS7WxQ680Gdbb6YPhT1UmYIhgF7PrHZGQFPBVAZA6SRqy2MjXSVvZOCY4vYUurXi1wpJeCXIIUJ3iDwo8D88MuZ55qD7+lOlleAzCGA1dgJUlJVifp5uZCwAYlv1xx04cVZq2a0HbyxlsSgjEAOA+YAPEKeUuqH2IlvoNsvGDgU8h+gUqyHbDH2x63uTpIMi8Ziz3EUuCoY2QOUp88iK0zdUpCONDan4a1hX8B6U38JQJIPbMU+Lqrg31cHVR9VonW/kqt/ROwxzoskMsrgOQ164ALsDVta142SGv/Sa39vYHDIwglAkhu8ntsFfQfuTpYn+Ybae3fhpUgLwTWy6UXQLKcx7GFEb7h6uDler2p1v56rf3JWK3+FmkGASRreR34DvbEpYqLX3tecbNtEN7pfNiU+HJMUJZr7Y8DOrEVSSQCSEOzEbgMu5vv15U+nSor47nZLa8907cdC3SZuapkSuwUE5SHsGVBj4vglQggdc9sbNnOia4O1lQIxnvLeG5pIcv+XV+zJ4ZnzDyuMyWGxIAk1Nr/FbbI3RURzBIBJPUsBvZ3dXCwq4OKj3CL9mkkK+OpUBQYzyaWmgV8z5S2vsirtb9aa/8M7Gla90jzCSBpZRVwKvaIgGICMEZ5XnEedsvtJ6r6JAX6o/gZ3WqxKbFfzGHXEq39g4ADseeTSwSQmiQEbsDu5pvq6mBThWAMjcp4LqTWm5j6mk8Cc81cdbcp4cUEZQ62ZOppUL/9KgJIc6ZXDxnv6mBlhWAUPK/4A2xJ0vGkuYmprzmQkCVmHlNMif4xINmotX9VND/5BXI2owBSYarSQxqyT8OhQIGJdKulpsTRcep3ae2/Hmkro4GSNLsAsrVUpYdEZTxnAkXgUw35Bn3NEOC3dKsnTInPxhx2Pam1vxdwBLBMuoEA8n5JrIeUlfH8G1nZxNTX7AI8Yuaq6abER2OCciuwA6KtCCBlSayHvE8Zz+zt0+hrxtGDNgs425RwY0Ai2ooAAtgV5u+SXA/JTxnPNlwUP6ZbvSjaigCytWwELsfqITcm1EPyWcazr/kYoq0IIFvI3cDOrg7OTKCHNE8ZT9FWBJD3ZDFwgKuDMa4OllT64qYs4/lubeUk0VZaE5DVWD1klKuDexOAUTs9JKux2srP6VaLTIl9Yw67WkpbaUZAQuwKcUekh2ysEIz09JDsDruGAw+YuWq2aCvNDcgC4DOuDk7ItB6SXVAOImSJmc9PTIkPxICkXFv5JU2orTQLIEuBw10d7O3q4MkEwykp4/lOjyjQxiQ2qqWmxFEVaCvHY6utlASQ7GQ98EOsHnJbAjAar4dkNX3MUOB3vF2RtvIEtpjgEVB9mVUBpLrcgtXQL2oKPSSrcc0umH9pKx+JAYmJtJXtsVXn1wsg9c1CYE9XB+MS6CEq83pIFqPo1VZeMguYVIG2ciHW77pVAEk/vXrI7q4O/pRgOPV54BHklNfksdrKT+hWL5gSsY6d09pfprV/BLAXOdRW8gBILfSQ3wEPI6e81iZ9zTBghvmjWlCBtlLCaivHAysFkNqkWj3kHOxi1lHSq1OZn3RG2sq1psTgGJCEWvu/xBbhvpIcaCtZBaRaPeSrWD3kEtj683xJVfMTRYET2cQyU+LECrSV07ELjXMEkPipVg8Z6XnFB4A7aFY9JKsp0B+4lm71bAXaynNa+wditZUlAsjmUws95NpoEriv9NaGzk86SKat7AycDqwRQN6davWQk7GPbU9EjkDOEihJtJUro/lJZrSVRgKyjOr0kP/B6iHXwNYniJKG9K7cayuNAGQ9tjDADgn1kE96XnEGcB+ih+QjvdpKt1qYN22l3oDcgq0eMjmhHvK/2Nq2h0ivy+Ww69N501bqBcgTQGekhyyvEIxePWQJcBaih+Q7OdNW0gbkdeyG/91cHTyUYDhVrod8RHpXE+Xd2kosYbQR2kpagGzEbvAf4ergV6KHSLYw7BoGzDR/VA+aUrw5ZT21lTQAuQerh5zh6mB1hWCIHtKqcc1ekbby8yxpK7UE5DngQFcHB4keIkk4P3EocBKbWBppK20xQCnXVu7NIiCrsRv3R7o6mJMADNFDJO9OgQFYbWWRKcUrnBFpKwcAB1FDbaUaQHr1kBGuDq4SPUSSwvykA5hn5qpZFWgr90R3kzOogbZSqOK141wdrEhwxyhgtZDJyAq4JB4oY+hhfzOfy2jjEtXJW1uBpBu4InrQ05g7SEI4/hvRQyRJ0kaBNs6OtJUj42orWZqkbwmM/4r0kPsRPURSTay2cjPd6nFTSn8JoJAyGAOAc6JJvKyAS2o57NoVw1/NA2oafcwZqpN/pPE2TkpgKM8rfgv76HeSwCFJJQroY46MDgmaZEq172dOCnB8Hnu4zG8g3vFfEkmV85N+kbbyYlxtpe5DLM8rfhSYAhwtLVabmFedN3umbSsXIn6GMTi8sOfK8K2207rnZm0O0g28CfQgO/tqA8hrbet6XpNLWcklAx4FnrHdMUNDLK39N7T2TwJ2BeZJW0nqnBIwOtq6XbPj4mo+B9Haf0Zrfz/ga8BL0m6SlLMMOMLVwV5Jtm7XHZAyUO4EdgTOhS2vfEokCVK+dTu1TVSpLhRq7W/Q2v8xdsvkzdKmkhrlVhJu3c4UIGWgvKK1fzSwRzSJkkiS5AlgL1cHR1S6dTvTgJSB8hfgc8AxkM7Kp6QpsxK7e3A3Vwd1LQVU97I/UaWK32DPtZtCrZ7HSZoxG7G7BTtcHfyy0q3buQSkDJS1WvuTsPLiTOkLkvdkDnYT3umVbt1uCkDKQHlBa//LgI+teSVp7SzBbt0+0NVBw89hz0x1d639+4BdgFOAVdJPWi5rsMWrd06ydbvpAYkg2aS1fw0wHLgeq61ImjsGW6y6w9XBlZVu3W4pQMpAeUNr/0RgNDBf+lDTpoSt7H98LfWQpgekDJSntfb3BQ5FtJVmynJsUeq9XR1k+mDPXJxyq7V/B1ZbOQ9YJ/0rt1mPLdaxvauDW10dmKx/4NwcAx1pK5dg10+mSV/LXW7FelMXpq2HtCQgZaC8orV/FPAFRFvJQ8r1kGV5+/BOXq+61v7DwOex2soK6YeZS8P0EAHkHUjCSFvpAC5FtJUspOF6iADy76Cs1do/C9gJuEv6aMOSCT1EANk8KM9r7R+CaCv1Tqb0EAFk66CItlKfZFIPEUDiQSLaSnoxwK/IqB4igFQGimgrtc1D2CdTx2VVDxFAkoEi2kp1WQ6Mw65pLGyVL+20WiuLtlJxNmD1kB1cHdySBz1EAKkeknJtZbowsNnchvWmLnR10JI/Jk4rt36krRwJfBF4THj4V57EmraH51EPEUBqD8qfsdVWjqW1tZWVwAnYPRoLpGcIIOWQhFr7N0XDrktJ6dztjGYTcBX2se0v8q6HCCDpgrIm0lY+Bcxqga98L3ah77Rm0UMEkPqA8rzW/lhgf2BRE37FJcBBrg4OaDY9RACpLyhFYBQwgebQVtZgzxAf6ergHmlhAaQWkGzS2r8aq9VfD+RxjF6uh1zh6kC2BgggNQfln5G2sivwYI4+ekvpIQJI40F5Wmt/H+Awsq2ttKQeIoBkB5TbsU+7zidb2kpL6yECSLYgWa+1fzHZ0VZaXg8RQLIJSqO1lScRPUQAyQEo9dZWVgLjET1EAMkRJPXQVjYBU4ERrg5uED1EAMkjKGlpK/diF/pOdXWwSq60AJJ3UGqlrfwdGBPpIYvlygogzQZKr7ZyKpVpK2uAM7FS4d1yJQWQZoZkk9b+1Gh+cgNbrrYSAjdG84zLRQ+pf5QxsoYkkcgdRCIRQCSS2ub/BwCOh6MuZHG4qQAAAABJRU5ErkJggg=="},374:function(e,t,a){e.exports=a.p+"static/media/EUSDT.0a5458ff.png"},375:function(e,t,a){e.exports=a.p+"static/media/EWBTC.9091f9fa.png"},376:function(e,t,a){e.exports=a.p+"static/media/EWETH.f4891222.png"},377:function(e,t,a){e.exports=a.p+"static/media/TUSDT.eae850c9.png"},394:function(e,t,a){e.exports=a(879)},42:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(13),r=a(14),o=a(1),s=a(15),i=a.n(s),c=a(244),l=a.n(c),u=a(150).cutZero,p=new(function(){function e(){Object(n.a)(this,e)}return Object(r.a)(e,[{key:"get",value:function(e){var t=18;if("SERO"===e);else if(!(t=o.d.get(o.b.decimalsKey(e)))&&0!==t){var a=new l.a(o.a.host.rpc).send({id:0,jsonrpc:"2.0",method:"sero_getDecimal",params:[e]});if(a.error){if(!a.error||"contract not support SER20 decimals"!==a.error.message)throw new Error(a.error.message);o.d.set(o.b.decimalsKey(e),0)}else t=parseInt(a.result),o.d.set(o.b.decimalsKey(e),t)}return t}},{key:"convert",value:function(e,t,a){var n=0;try{n=this.get(t)}catch(r){console.log(r.message)}return a||(a=n),u(new i.a(e).dividedBy(new i.a(10).pow(new i.a(n))).toFixed(n))}},{key:"mul",value:function(e,t,a){var n=this.get(t);return a||0===a||(a=n),u(new i.a(e).multipliedBy(new i.a(10).pow(new i.a(n))).toFixed(n))}}]),e}())},468:function(e,t,a){e.exports=a.p+"static/js/1.2b24d25f.chunk.worker.js"},469:function(e,t,a){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),(n=t.Method||(t.Method={})).Init="init",n.BalanceOf="balanceOf",n.HealthyCheck="healthyCheck",n.InitAccount="initAccount",n.ClearData="clearData",n.FindUtxos="findUtxos",n.TicketsOf="ticketsOf",n.GetTxList="getTxList",n.GetTxDetail="getTxDetail",n.GetPKrIndex="getPKrIndex",n.CommitTx="commitTx",n.GetPrice="getPrice",n.GetPendingAndConfirming="getPendingAndConfirming"},470:function(e,t,a){e.exports=a.p+"static/js/0.93946bfa.chunk.worker.js"},471:function(e,t){},48:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(97),r=a(204),o=a(27),s=a(205),i=function(){function t(e){if(e instanceof t)this.n=e.n;else if(e instanceof n){var a=e;a.red?this.n=a:this.n=a.toRed(t.red)}else this.n=new n(e,"le").toRed(t.red)}return t.toFQ=function(e){return e instanceof t?e:new t(e)},t.prototype.add=function(e){return new t(this.n.redAdd(t.toFQ(e).n))},t.prototype.mul=function(e){return new t(this.n.redMul(t.toFQ(e).n))},t.prototype.sub=function(e){return new t(this.n.redSub(t.toFQ(e).n))},t.prototype.div=function(e){return new t(this.n.redMul(t.toFQ(e).n.redInvm()))},t.prototype.squared=function(){return new t(this.n.redSqr())},t.prototype.sqrt=function(){try{var e=this.n.redSqrt();return e?new t(e):void 0}catch(e){return}},t.prototype.pow=function(e){return new t(this.n.redPow(new n(e)))},t.prototype.nega=function(){return new t(this.n.redNeg())},t.prototype.inverse=function(){return new t(this.n.redInvm())},t.prototype.isOdd=function(){return this.n.fromRed().isOdd()},t.prototype.isZero=function(){return this.n.fromRed().isZero()},t.prototype.toBuffer=function(){return this.n.fromRed().toArrayLike(e,"le",32)},t.prototype.toBN=function(){return this.n.fromRed()},t.prototype.equal=function(e){return this.n.eq(e.n)},t.prototype.toString=function(e){return this.n.fromRed().toString(e)},t.red=n.mont(r.default.FQ_MODULUS),t.ONE=new t(1),t.ZERO=new t(0),t}();t.FQ=i;var c=function(){function t(e){if(e instanceof t)this.n=e.n;else if(e instanceof n){var a=e;a.red?this.n=a:this.n=a.toRed(t.red)}else this.n="number"==typeof e?new n(e).toRed(t.red):new n(e,"le").toRed(t.red)}return t.toFR=function(e){return e instanceof t?e:new t(e)},t.prototype.add=function(e){return new t(this.n.redAdd(t.toFR(e).n))},t.prototype.mul=function(e){return new t(this.n.redMul(t.toFR(e).n))},t.prototype.sub=function(e){return new t(this.n.redSub(t.toFR(e).n))},t.prototype.div=function(e){return new t(this.n.redMul(t.toFR(e).n.redInvm()))},t.prototype.squared=function(){return new t(this.n.redSqr())},t.prototype.sqrt=function(){try{var e=this.n.redSqrt();return e?new t(e):void 0}catch(e){return}},t.prototype.pow=function(e){return new t(this.n.redPow(new n(e)))},t.prototype.nega=function(){return new t(this.n.redNeg())},t.prototype.inverse=function(){return new t(this.n.redInvm())},t.prototype.isOdd=function(){return this.n.fromRed().isOdd()},t.prototype.isZero=function(){return this.n.fromRed().isZero()},t.prototype.toBuffer=function(){return this.n.fromRed().toArrayLike(e,"le",32)},t.prototype.toBN=function(){return this.n.fromRed()},t.prototype.equal=function(e){return this.n.eq(e.n)},t.prototype.toString=function(e){return this.n.fromRed().toString(e)},t.red=n.mont(r.default.FR_MODULUS),t.ONE=new t(1),t.ZERO=new t(0),t}();function l(e){if(e instanceof c)return e;var t=o.toBuffer(e);return new c(t)}t.FR=c,t.newFR=l,t.randomFR=function(){return l(s.randomBytes(32))}}).call(this,a(23).Buffer)},487:function(e,t){},489:function(e,t){},49:function(e,t,a){e.exports=a.p+"static/media/sero.ef3f4514.png"},524:function(e,t){},525:function(e,t){},570:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(571),o=a(48),s=a(39),i=new o.FR(8);function c(e,t){var a=r.blake2s(e,t);a[31]&=159;var o=n.Point.bufferTo(a);return o&&!o.isZero()&&o.isValid()?o.mult(i):void 0}t.findPoint=function(t,a){s(t.length<=8&&64==a.length);for(var n=e.from(a),r=0;r<256;r++){n[63]=r;var o=c(t,n);if(o)return o}}}).call(this,a(23).Buffer)},571:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(572);t.blake2s=function(t,a){var r=e.alloc(8,0);r.fill(t,0,t.length);var o=new n(32,{salt:e.alloc(8,0),personalization:r}).update(a).digest();return e.from(o)}}).call(this,a(23).Buffer)},573:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(574),r=a(312),o=a(27),s=a(167),i=a(39),c=a(143),l=a(48);t.genOutCm=function(t,a,u,p){if(t=c.newAsset(t),a=o.toBuffer(a),u=l.newFR(u),p=s.newPKr(p),i(64==a.length),t.isValid()&&p.isValid()){var d=n.genAssetCurrency(t.tkn_currency).mult(t.tkn_value);o.default.isEmptyBuffer(t.tkt_value,32)||(d=d.add(n.genAssetTkt(t.tkt_category,t.tkt_value)));var f=e.concat([d.toBuffer(),a,p.VPK.toBuffer(),p.BASE.toBuffer(),u.toBuffer()]);return i(192==f.length,"blob.length != 192,"),n.outCmBase.mult(new r.BitBuffer(f))}}}).call(this,a(23).Buffer)},574:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(310),r=a(311),o=a(89),s=a(27),i=a(39);t.outCmBase=new n.Group("$SROOUTCMGEN",8,192,4),t.genAssetTkt=function(t,a){t=s.toBuffer(t),a=s.toBuffer(a),i(32==t.length),i(32==a.length);var n=e.concat([t,a]),c=r.findPoint("$SROASSETTK",o.blake2b("$SROASSETTK.H",n));if(!c)throw new Error("find point error");return c},t.genAssetCurrency=function(e){e=s.toBuffer(e),i(32==e.length);var t=r.findPoint("$SROASSETCY",e);if(!t)throw new Error("find point error");return t}}).call(this,a(23).Buffer)},575:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(143),r=a(48),o=a(221),s=a(27),i=a(39),c=function(){function t(e,t,a){this.asset=n.newAsset(e),this.rsk=r.newFR(t),this.memo=s.toBuffer(a)}return t.prototype.isValid=function(){return!!this.asset.isValid()&&!this.rsk.isZero()},t.prototype.toBuffer=function(){return e.concat([this.asset.toBuffer(),this.rsk.toBuffer(),this.memo])},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t}();function l(t){if(t instanceof c)return t;var a=s.toBuffer(t);return i(224==a.length),new c(n.newAsset(a.slice(0,128)),new r.FR(a.slice(128,160)),e.from(a.slice(160,224)))}t.Info=c,t.newInfo=l,t.encInfo=function(e,t){e=s.toBuffer(e),t=l(t),i(32==e.length);var a=t.toBuffer();return o.default(a,e)},t.decEInfo=function(e,t,a){return i(a,"flag must true"),e=s.toBuffer(e),t=s.toBuffer(t),i(224==e.length),i(32==t.length),l(o.default(e,t))}}).call(this,a(23).Buffer)},581:function(e,t){},583:function(e,t){},618:function(e,t){},619:function(e,t,a){"use strict";var n=this&&this.__awaiter||function(e,t,a,n){return new(a=a||Promise)((function(r,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function i(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a((function(e){e(t)}))).then(s,i)}c((n=n.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var a,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(o){return function(i){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=0<(r=s.trys).length&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]>7&1,c=e.from(r);c[31]&=-129;var l=new n.FQ(c),u=l.mul(l),p=t.ECC_D.mul(u),d=u.sub(n.FQ.ONE).mul(p.sub(t.ECC_A).inverse()).sqrt();if(d){var f=d;return d.isOdd()!==(0!=i)&&(f=n.FQ.ZERO.sub(d)),new t(f,l)}},t.ECC_A=new n.FQ(r.default.ECC_A),t.ECC_D=new n.FQ(r.default.ECC_D),t.ZERO=new t(n.FQ.ZERO,n.FQ.ONE),t}(),c=function(){function e(e,t,a){this.x=new n.FQ(e),this.y=new n.FQ(t),this.z=new n.FQ(a)}return e.prototype.toOriPoint=function(){var e=this.z.inverse();return new i(this.x.mul(e),this.y.mul(e))},e.prototype.add=function(t){var a=this.x,r=this.y,o=this.z,s=t.x,c=t.y,l=t.z,u=a.mul(s),p=r.mul(c),d=i.ECC_D.mul(u).mul(p);if(o.equal(n.FQ.ONE)&&l.equal(n.FQ.ONE))return new e(n.FQ.ONE.sub(d).mul(a.add(r).mul(s.add(c)).sub(u).sub(p)),n.FQ.ONE.add(d).mul(p.sub(i.ECC_A.mul(u))),n.FQ.ONE.sub(d.squared()));if(l.equal(n.FQ.ONE)){var f=(h=o.squared()).sub(d),m=h.add(d);return new e(o.mul(f).mul(a.add(r).mul(s.add(c)).sub(u).sub(p)),o.mul(m).mul(p.sub(i.ECC_A.mul(u))),f.mul(m))}var h,g=o.mul(l);return f=(h=g.squared()).sub(d),m=h.add(d),new e(g.mul(f).mul(a.add(r).mul(s.add(c)).sub(u).sub(p)),g.mul(m).mul(p.sub(i.ECC_A.mul(u))),f.mul(m))},e.prototype.double=function(){var t=this.x.add(this.y).squared(),a=this.x.squared(),r=this.y.squared(),o=i.ECC_A.mul(a),s=o.add(r);if(this.z.equal(n.FQ.ONE))return new e(t.sub(a).sub(r).mul(s.sub(2)),s.mul(o.sub(r)),s.squared().sub(s.mul(2)));var c=this.z.squared(),l=s.sub(c.mul(2));return new e(t.sub(a).sub(r).mul(l),s.mul(o.sub(r)),s.mul(l))},e.prototype.mult=function(t){for(var a=t.toBN(),n=this,r=e.ZERO;!a.isZero()&&(a.testn(0)&&(r=r.add(n)),!(a=a.shrn(1)).isZero());)n=n.double();return r},e.prototype.isValid=function(){var e=this.x.mul(this.x),t=this.y.mul(this.y),a=this.z.mul(this.z),n=i.ECC_A.mul(e),r=a.mul(a),o=i.ECC_D.mul(e).mul(t),s=a.mul(n.add(t)),c=r.add(o);return!!s.equal(c)},e.prototype.isEqualTo=function(e){return!(!this.x.mul(e.z).equal(this.z.mul(e.x))||!this.y.mul(e.z).equal(this.z.mul(e.y)))},e.prototype.isZero=function(){return this.isEqualTo(i.ZERO.toPoint())},e.prototype.toBuffer=function(){return this.toOriPoint().toBuffer()},e.prototype.toHex=function(){return this.toBuffer().reverse().toString("hex")},e.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},e.bufferTo=function(e){var t=i.bufferTo(e);return t?t.toPoint():void 0},e.ZERO=new e(new n.FQ(0),new n.FQ(1),new n.FQ(1)),e}();t.Point=c,t.newPoint=function(e){return e instanceof c?e:c.bufferTo(e)}}).call(this,a(23).Buffer)},620:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(103),r=a(116),o=a(222),s=a(27),i=a(27),c=a(621),l=a(143),u=a(269),p=a(315),d=a(48),f=a(97),m=a(225),h=a(334),g=a(622),v=function(){this.hash=e.alloc(32),this.param=new c.Params},y=function(t){this.p0_ins=new Array,this.p_ins=new Array,this.c_ins=new Array,this.c_outs=new Array,this.p_outs=new Array,this.keys=new Array,this.balance_desc=new v,this.s={Desc_O:{},Desc_Z:{},Desc_Pkg:{},Desc_Cmd:{},Tx1:{Ins_P:new Array,Ins_P0:new Array,Ins_C:new Array,Outs_C:new Array,Outs_P:new Array},Bcr:s.toHex(e.alloc(32,0)),Bsign:s.toHex(e.alloc(64,0))},this.param=t};function k(t){var a=e.alloc(32,0),n=e.alloc(32,0),r=e.alloc(32,0),o=e.alloc(32,0);return t.Tkn&&(t.Tkn.Currency&&(a=t.Tkn.Currency),t.Tkn.Value&&(n=s.default.toBN(t.Tkn.Value).toArrayLike(e,"le",32))),t.Tkt&&(t.Tkt.Category&&(r=t.Tkt.Category),t.Tkt.Value&&(o=t.Tkt.Value)),new l.Asset(a,n,r,o)}function E(t){var a=[i.toBuffer(t.Ehash),i.toBuffer(t.From),w(t.Fee)];return a.push(function(t){var a=new Array;return t.Ins&&t.Ins.forEach((function(t){a.push(function(t){return h(e.concat([i.toBuffer(t.Anchor),i.toBuffer(t.Nil),i.toBuffer(t.Trace),i.toBuffer(t.AssetCM),i.toBuffer(h(t.Proof))]))}(t))})),t.Outs&&t.Outs.forEach((function(t){a.push(function(t){return h(e.concat([i.toBuffer(t.AssetCM),i.toBuffer(t.OutCM),i.toBuffer(t.EInfo),i.toBuffer(t.PKr),i.toBuffer(h(t.Proof))]))}(t))})),h(e.concat(a))}(t.Desc_Z)),a.push(function(t){var a=new Array;return t.Ins&&t.Ins.forEach((function(t){a.push(function(t){return h(e.concat([i.toBuffer(t.Root),i.toBuffer(t.Nil),i.toBuffer(t.Sign)]))}(t))})),t.Outs&&t.Outs.forEach((function(t){a.push(function(t){return h(e.concat([i.toBuffer(t.Addr),x(t.Asset),i.toBuffer(t.Memo)]))}(t))})),h(e.concat(a))}(t.Desc_O)),010&&clearInterval(e.intervalId);try{plus&&(clearInterval(e.intervalId),e._init())}catch(t){console.error(t),clearInterval(e.intervalId)}this.interCount++}),1e3)}},{key:"get",value:function(e,t){if(plus&&plus.net){var a=new plus.net.XMLHttpRequest;a.onreadystatechange=function(){switch(a.readyState){case 0:console.log("xhr\u8bf7\u6c42\u5df2\u521d\u59cb\u5316");break;case 1:console.log("xhr\u8bf7\u6c42\u5df2\u6253\u5f00");break;case 2:console.log("xhr\u8bf7\u6c42\u5df2\u53d1\u9001");break;case 3:console.log("xhr\u8bf7\u6c42\u5df2\u54cd\u5e94");break;case 4:200===a.status?t(a.responseText,null):t(null,a.readyState)}},a.open("GET",e),a.send()}}}]),e}());function X(){try{return plus&&plus.sqlite}catch(e){return!1}}var $=new(function(){function e(){Object(l.a)(this,e),this.init()}return Object(u.a)(e,[{key:"init",value:function(){X()&&Y.db.openDatabase().then((function(){Y.db.executeSql('create table if not exists lstorage("key" CHAR(1000),"value" CHAR(1000))').then((function(e){})).catch((function(e){console.log("create table>>> "+e)}))}))}},{key:"set",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a&&(U.d.set(t,a),X()&&this.setWithSqlLite(t,a).then().catch()),e.abrupt("return",new Promise((function(e){e()})));case 2:case"end":return e.stop()}}),e,this)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"get",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this,n=U.d.get(t),e.abrupt("return",new Promise((function(e){n?e(n):X()?a.getWithSqlLite(t).then((function(a){a?(U.d.set(t,a),e(a)):e("")})).catch((function(t){e("")})):e("")})));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getPlus",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this,e.abrupt("return",new Promise((function(e){X()?a.getWithSqlLite(t).then((function(t){e(t||"")})).catch((function(t){e("")})):e("")})));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return U.d.delete(t),X()&&this.deleteWithSqlLite(t).then(),e.abrupt("return",new Promise((function(e){e()})));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setWithStorage",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){U.d.set(t,a),e()})));case 1:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"getWithStorage",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){e(U.d.get(t))})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"deleteWithStorage",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){U.d.delete(t),e()})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"setWithSqlLite",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y.db.selectSql("select value from lstorage where key='".concat(t,"' "));case 2:if((n=e.sent)&&0!==n.length){e.next=8;break}return e.next=6,Y.db.executeSql("insert into lstorage values('".concat(t,"','").concat(JSON.stringify(a),"')"));case 6:e.next=10;break;case 8:return e.next=10,Y.db.executeSql("update lstorage set value='".concat(JSON.stringify(a),"' where key = '").concat(t,"'"));case 10:return e.abrupt("return",new Promise((function(e){e()})));case 11:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"getWithSqlLite",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this,e.abrupt("return",new Promise((function(e){Y.db.selectSql("select value from lstorage where key ='".concat(t,"'")).then((function(t){t&&t.length>0?e(JSON.parse(t[0].value)):e("")})).catch((function(t){a.init(),e("")}))})));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"deleteWithSqlLite",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y.db.executeSql("delete from lstorage where key ='".concat(t,"'"));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),e}()),ee=new(a(370).PopupService),te=new(function(){function e(){Object(l.a)(this,e)}return Object(u.a)(e,[{key:"init",value:function(){ee.init(U.a.seroRpc(),15e3,(function(e){console.log("init data:",e)}))}},{key:"balanceOf",value:function(e){return new Promise((function(t,a){ee.balanceOf(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"ticketsOf",value:function(e){return new Promise((function(t,a){ee.ticketsOf(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"initAccount",value:function(e){return new Promise((function(t,a){ee.initAccount(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"getTxList",value:function(e,t,a){return console.log("getTxList>>>>>>",t,a),new Promise((function(n,r){var o={tk:e,cy:t,count:a};ee.getTxList(o,(function(e){e.error?r(e.error):n(e.data)}))}))}},{key:"getTxDetail",value:function(e,t){return new Promise((function(a,n){ee.getTxDetail(e,t,(function(e){e.error?n(e.error):a(e.data)}))}))}},{key:"getPKrIndex",value:function(e){return new Promise((function(t,a){ee.getPKrIndex(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"commitTx",value:function(e){return new Promise((function(t,a){ee.commitTx(e,(function(e){e.error?"stx Verify error"===e.error?a(U.c.e().page.txTransfer.failed):a(e.error):t(e.data)}))}))}},{key:"getPrice",value:function(e){return new Promise((function(t,a){ee.getSeroPrice(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"clearData",value:function(e){return new Promise((function(t,a){ee.clearData(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"getSyncState",value:function(e){return new Promise((function(t,a){ee.getSyncState(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"getPendingAndConfirming",value:function(e,t){return new Promise((function(a,n){ee.getPendingAndConfirming(e,(function(e){if(console.log("getPendingAndConfirming",e),e.error)n(e.error);else{var r=e.data;if(t){var o=[],s=!0,i=!1,c=void 0;try{for(var l,u=r[Symbol.iterator]();!(s=(l=u.next()).done);s=!0){var p=l.value;p.Tkn.has(t)&&o.push(p)}}catch(d){i=!0,c=d}finally{try{s||null==u.return||u.return()}finally{if(i)throw c}}a(o)}else a(r)}}))}))}},{key:"getPendingAndConfirmingGroupByCy",value:function(e){return new Promise((function(t,a){console.log("tl",e),ee.getPendingAndConfirming(e,(function(e){if(e.error)a(e.error);else{var n=e.data,r=new Map,o=!0,s=!1,i=void 0;try{for(var c,l=n[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var u=c.value,p=!0,d=!1,f=void 0;try{for(var m,h=u.Tkn[Symbol.iterator]();!(p=(m=h.next()).done);p=!0){var g=m.value,v=Object(C.a)(g,2),y=v[0];v[1];r.has(y)?r.set(y,r.get(y)+1):r.set(y,1)}}catch(k){d=!0,f=k}finally{try{p||null==h.return||h.return()}finally{if(d)throw f}}}}catch(k){s=!0,i=k}finally{try{o||null==l.return||l.return()}finally{if(s)throw i}}t(r)}}))}))}}]),e}()),ae=a(131),ne=a(243),re=new q,oe=function(){function e(t){Object(l.a)(this,e),this.getAddresses=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o,s,i,c,l,u,p,d,f,m,h,g,v,y,k,E,b,w,x,S,P,O,B;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Map,e.next=3,$.get(U.b.account.addresses);case 3:return a=e.sent,console.log("addressesStore,"+JSON.stringify(a)),e.next=7,$.getPlus(U.b.account.addresses);case 7:if(n=e.sent,r=0,o=0,!(a&&a.length>0)){e.next=31;break}for(r=a.length,s=!0,i=!1,c=void 0,e.prev=15,l=a[Symbol.iterator]();!(s=(u=l.next()).done);s=!0)p=u.value,t.set(p,1);e.next=23;break;case 19:e.prev=19,e.t0=e.catch(15),i=!0,c=e.t0;case 23:e.prev=23,e.prev=24,s||null==l.return||l.return();case 26:if(e.prev=26,!i){e.next=29;break}throw c;case 29:return e.finish(26);case 30:return e.finish(23);case 31:if(console.log("addressesPlus,"+JSON.stringify(n)),d=!1,!(n&&n.length>0)){e.next=54;break}for(o=n.length,f=!0,m=!1,h=void 0,e.prev=38,g=n[Symbol.iterator]();!(f=(v=g.next()).done);f=!0)y=v.value,t.has(y)||(d=!0,t.set(y,1));e.next=46;break;case 42:e.prev=42,e.t1=e.catch(38),m=!0,h=e.t1;case 46:e.prev=46,e.prev=47,f||null==g.return||g.return();case 49:if(e.prev=49,!m){e.next=52;break}throw h;case 52:return e.finish(49);case 53:return e.finish(46);case 54:if(d||o==r||(d=!0),!d){e.next=80;break}if(k=[],!(t&&t.size>0)){e.next=77;break}for(E=!0,b=!1,w=void 0,e.prev=61,x=t[Symbol.iterator]();!(E=(S=x.next()).done);E=!0)P=S.value,O=Object(C.a)(P,2),B=O[0],O[1],k.push(B);e.next=69;break;case 65:e.prev=65,e.t2=e.catch(61),b=!0,w=e.t2;case 69:e.prev=69,e.prev=70,E||null==x.return||x.return();case 72:if(e.prev=72,!b){e.next=75;break}throw w;case 75:return e.finish(72);case 76:return e.finish(69);case 77:if(!(k.length>0)){e.next=80;break}return e.next=80,$.set(U.b.account.addresses,k);case 80:return e.abrupt("return",t);case 81:case"end":return e.stop()}}),e,null,[[15,19,23,31],[24,,26,30],[38,42,46,54],[47,,49,53],[61,65,69,77],[70,,72,76]])}))),this.address=t}return Object(u.a)(e,[{key:"genWord",value:function(){try{var e=ne.genSeed(),t=ne.entropyToMnemonic(e);return sessionStorage.setItem("worddata",t),sessionStorage.setItem("MnemonicType","create"),t}catch(a){throw new Error(a.message)}}},{key:"getSK",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(a=this).address){e.next=7;break}return e.next=5,a.getCurrent();case 5:r=e.sent,n=r.address;case 7:return e.next=9,$.get(U.b.infoKey(n));case 9:return o=e.sent,e.abrupt("return",new Promise((function(e,a){ae.a.getSK({password:t,keystore:o},(function(t){t.error?a(t.error):e(t.data)}))})));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"PreCreate",value:function(e,t,a,n){return new Promise((function(r,o){try{var s={password:t,word:n};$.delete(U.b.account.tempKeystore).then((function(){ae.a.createAccount(s,(function(t){var n=t.data,r={detail:{address:n.address,name:e,hint:a,tk:n.tk,avatar:re.getRandomAvatar()},keystore:n};$.set(U.b.account.tempKeystore,r).then()}))})),r()}catch(i){o(i)}}))}},{key:"CopyTempKeystore",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.account.tempKeystore);case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return",new Promise((function(e,t){t("create account failed! please try again!")})));case 5:return a=t.keystore,e.next=8,$.get(U.b.account.addresses);case 8:return(n=e.sent)?n.push(a.address):n=[a.address],e.next=12,$.set(U.b.account.addresses,n);case 12:return e.next=14,$.set(U.b.infoKey(a.address),a);case 14:return e.next=16,$.set(U.b.detailKey(a.address),t.detail);case 16:return e.next=18,this.setCurrent(t.detail);case 18:return e.next=20,$.delete(U.b.account.tempKeystore);case 20:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"remove",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n,r;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.infoKey(t));case 2:return n=e.sent,e.next=5,$.get(U.b.account.addresses);case 5:return r=e.sent,e.abrupt("return",new Promise((function(e,o){ae.a.getSK({password:a,keystore:n},(function(a){if(a.error)o(a.error);else{if(r){var n=[],s=!0,i=!1,c=void 0;try{for(var l,u=r[Symbol.iterator]();!(s=(l=u.next()).done);s=!0){var p=l.value;p===t||n.push(p)}}catch(d){i=!0,c=d}finally{try{s||null==u.return||u.return()}finally{if(i)throw c}}$.set(U.b.account.addresses,n).then()}e()}}))})));case 7:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"getTempKeystore",value:function(){var e=Object(F.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$.get(U.b.account.tempKeystore));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"exportMnemonic",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.infoKey(t));case 2:return n=e.sent,e.abrupt("return",new Promise((function(e,t){ae.a.exportMnemonic({keystore:n,password:a},(function(a){if(a.error)t("ERROR=[".concat(a.error,"],[").concat(JSON.stringify(n),"]"));else{var r=a.data;sessionStorage.setItem("worddata",r),sessionStorage.setItem("MnemonicType","export"),e(!0)}}))})));case 4:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"importMnemonic",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a,n,r){var o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this,e.abrupt("return",new Promise((function(e,s){ae.a.importMnemonic({word:n,password:r},(function(n){if(n.error)s(n.error);else{var r=n.data;o._setStorage(r,t,a).then((function(){e(!0)})).then((function(e){s(e)}))}}))})));case 2:case"end":return e.stop()}}),e,this)})));return function(t,a,n,r){return e.apply(this,arguments)}}()},{key:"_setStorage",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a,n){var r,o,s,i,c,l,u,p,d;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.account.addresses);case 2:if(r=e.sent,o=t.address,!r){e.next=28;break}for(s=!1,i=!0,c=!1,l=void 0,e.prev=9,u=r[Symbol.iterator]();!(i=(p=u.next()).done);i=!0)p.value===o&&(s=!0);e.next=17;break;case 13:e.prev=13,e.t0=e.catch(9),c=!0,l=e.t0;case 17:e.prev=17,e.prev=18,i||null==u.return||u.return();case 20:if(e.prev=20,!c){e.next=23;break}throw l;case 23:return e.finish(20);case 24:return e.finish(17);case 25:s||r.push(o),e.next=29;break;case 28:r=[o];case 29:return e.next=31,$.set(U.b.account.addresses,r);case 31:return e.next=33,$.set(U.b.infoKey(o),t);case 33:return d={address:o,name:a,hint:n,tk:t.tk,avatar:re.getRandomAvatar()},e.next=36,this.setCurrent(d);case 36:return e.next=38,$.set(U.b.detailKey(o),d);case 38:case"end":return e.stop()}}),e,this,[[9,13,17,25],[18,,20,24]])})));return function(t,a,n){return e.apply(this,arguments)}}()},{key:"List",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o,s;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],e.next=3,this.getAddresses();case 3:if(!((a=e.sent)&&a.size>0)){e.next=17;break}n=a.entries(),r=n.next();case 7:if(r.done){e.next=16;break}return o=r.value[0],e.next=11,$.get(U.b.infoKey(o));case 11:s=e.sent,t.push(s),r=n.next(),e.next=7;break;case 16:return e.abrupt("return",t);case 17:return e.abrupt("return",[]);case 18:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Details",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o,s,i;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this,a=[],e.next=4,this.getAddresses();case 4:if(!((n=e.sent)&&n.size>0)){e.next=18;break}r=n.entries(),o=r.next();case 8:if(o.done){e.next=17;break}return s=o.value[0],e.next=12,t.Detail(s);case 12:i=e.sent,a.push(i),o=r.next(),e.next=8;break;case 17:return e.abrupt("return",a);case 18:return e.abrupt("return",[]);case 19:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getCurrent",value:function(){var e=Object(F.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.account.current);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"setCurrent",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.set(U.b.account.current,t);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"isMyPKr",value:function(e){var t=U.d.get(U.b.account.current);return console.log("isMyPKr,",ne.account.isMyPKr(t.tk,e)),ne.account.isMyPKr(t.tk,e)}},{key:"setDefaultCurrent",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this,e.next=3,$.get(U.b.account.addresses);case 3:if(!(a=e.sent)){e.next=10;break}return e.next=7,t.Detail(a[0]);case 7:return n=e.sent,e.next=10,$.set(U.b.account.current,n);case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setDetail",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.account.current);case 2:if(e.sent.address!==t.address){e.next=6;break}return e.next=6,$.set(U.b.account.current,t);case 6:return e.next=8,$.set(U.b.detailKey(t.address),t);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"Keystore",value:function(){var e=Object(F.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$.get(U.b.infoKey(this.address)));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Detail",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",new Promise((function(e,t){t("params address required!")})));case 2:return e.next=4,$.get(U.b.detailKey(t));case 4:if(!(a=e.sent)){e.next=13;break}return e.next=8,$.get(U.b.infoKey(t));case 8:return(n=e.sent).tk&&(a.mainPKr||(a.mainPKr=ne.createPkrHash(n.tk,1,n.version)),a.currentPKr||(a.currentPKr=ne.createPkrHash(n.tk,1,n.version)),te.getPKrIndex(n.tk).then((function(e){var r=ne.createPkrHash(n.tk,e.PkrIndex,n.version);a.currentPKr!==r&&(a.currentPKr=r,$.set(U.b.detailKey(t),a).then())}))),e.abrupt("return",new Promise((function(e,t){e(a)})));case 13:return e.abrupt("return",new Promise((function(e,t){t("Account not exist! ")})));case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),se=(a(626),a(154)),ie=a.n(se),ce=(a(638),function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={showDApp:!1},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){window.frames.length!==parent.frames.length?this.setState({showDApp:!1}):this.setState({showDApp:!0})}},{key:"render",value:function(){var e=this.state.showDApp;return s.a.createElement("div",null,this.props.children,s.a.createElement("div",{className:"tabbar"},s.a.createElement(ie.a,null,s.a.createElement(ie.a.Item,{icon:s.a.createElement(T.a,{type:"iconcopper-coin-line"}),selectedIcon:s.a.createElement(T.a,{type:"iconcopper-coin-line1"}),title:U.c.e().navbar.wallet,key:"home",selected:"home"===this.props.selectedTab,onPress:function(){U.e.goPage(U.e.Home,"")}}),!0===e?s.a.createElement(ie.a.Item,{icon:s.a.createElement(T.a,{type:"icondapp"}),selectedIcon:s.a.createElement(T.a,{type:"icondapp1"}),title:U.c.e().navbar.dapp,key:"dapp",selected:"dapp"===this.props.selectedTab,onPress:function(){U.e.goPage(U.e.DApp,"")}}," "):"",s.a.createElement(ie.a.Item,{icon:s.a.createElement(T.a,{type:"iconmy2"}),selectedIcon:s.a.createElement(T.a,{type:"iconmy1"}),title:U.c.e().navbar.my,key:"my",selected:"my"===this.props.selectedTab,onPress:function(){U.e.goPage(U.e.Personal,"")}}))))}}]),t}(o.Component)),le=a(49),ue=a.n(le),pe=a(125),de=a.n(pe),fe=a(41),me=a.n(fe),he=(a(659),a(15)),ge=a.n(he),ve=a(184),ye=a.n(ve),ke=function(){function e(t){var a=this;Object(l.a)(this,e),this.latestBlock=Object(F.a)(j.a.mark((function e(){var t;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.seroRpcAsync("sero_blockNumber",[]);case 2:return t=e.sent,e.abrupt("return",new ge.a(t.result).toNumber()-12);case 4:case"end":return e.stop()}}),e)}))),t&&(this.rpc=t)}return Object(u.a)(e,[{key:"seroRpc",value:function(e,t,a){var n=U.a.host.rpc;this.rpc&&(n=this.rpc);var r={id:0,jsonrpc:"2.0",method:e,params:t};ye.a.post(n,r).then((function(e){var t=e.data;a&&a(t)})).catch((function(e){console.log("req error: ",e)}))}},{key:"seroRpcAsync",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=U.a.host.rpc,this.rpc&&(n=this.rpc),r={id:0,jsonrpc:"2.0",method:t,params:a},e.next=5,ye.a.post(n,r);case 5:return o=e.sent,e.abrupt("return",new Promise((function(e){e(o.data)})));case 7:case"end":return e.stop()}}),e,this)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"get",value:function(e,t){ye.a.get(e).then((function(e){t&&t(e.data)}))}}]),e}(),Ee=new ke,be=new ke,we=function(){function e(){Object(l.a)(this,e)}return Object(u.a)(e,[{key:"seroTotal",value:function(e,t){var a={};be.get(U.a.host.price+"sero_usdt",(function(n){if(n&&""!==n){var r=(n=JSON.parse(n)).last,o=new ge.a(e).multipliedBy(new ge.a(r)),s=U.d.get(U.b.settings.moneyType);(s=s||"").toUpperCase()===U.a.setting.moneyType.cny?be.get(U.a.host.price+"usdt_cny",(function(e){var n=(e=JSON.parse(e)).last;o=new ge.a(o).multipliedBy(new ge.a(n)).toFixed(5),a.type="\xa5",a.total=o,t(a)})):(o=o.toFixed(5),a.type="$",a.total=o,t(a))}}))}}]),e}(),xe=a(42),Se=a(371),Pe=a.n(Se),Oe=a(372),Be=a.n(Oe),Ce=a(373),Ae=a.n(Ce),Te=a(374),Ne=a.n(Te),Ke=a(375),De=a.n(Ke),Me=a(376),Ie=a.n(Me),je=a(377),Re=a.n(je),_e=new we,Fe=new q,Le=z.a.Item,He=Le.Brief,ze=new oe,Ve=null,We=null,qe=null,Ze=function(e){function t(e){var a;Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).init=Object(F.a)(j.a.mark((function e(){var t;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(L.a)(a);try{t.accounts().then(),Ve||(Ve=setInterval((function(){ze.getCurrent().then((function(e){clearInterval(Ve),e&&e.address?t.accounts().then():(_.a.info(U.c.e().toast.info.createWallet,1.5),setTimeout((function(){U.e.goPage(U.e.AccountCreate1,U.e.Home)}),1e3))})).catch((function(e){}))}),1e3)),We&&clearInterval(We),We=setInterval((function(){t.accounts().then()}),5e3),qe&&clearInterval(qe),qe=setInterval((function(){t.getSyncState()}),1e3)}catch(n){console.log(n)}case 2:case"end":return e.stop()}}),e)}))),a.getSyncState=Object(F.a)(j.a.mark((function e(){var t,n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=Object(L.a)(a)).state.tk){e.next=9;break}return e.next=4,Ee.latestBlock();case 4:return n=e.sent,e.next=7,te.getSyncState(t.state.tk);case 7:(r=e.sent)&&(o="normal",!0===r.health?!0===r.isSyncing?(o="syncing"):(o="normal",0):(o="dead",0),t.setState({healthy:o,healthData:r,latestBlock:n}));case 9:case"end":return e.stop()}}),e)}))),a.showQrCode=function(e){M.a.alert("QR-Code",s.a.createElement("div",null,s.a.createElement("canvas",{id:"qrImg"}),s.a.createElement("p",{style:{marginTop:"0",fontSize:"12px",overflowWrap:"break-word"}},e),s.a.createElement(K.a,{className:"copyTxt",size:"small",onClick:function(){me()(e),_.a.success(U.c.e().toast.success.copy,1)}},"Copy")),[{text:"Close"}]);var t=document.getElementById("qrImg");de.a.toCanvas(t,e,(function(e){e&&console.error(e)}))},a.renLogo=function(e){return"NONT"===e?Pe.a:"HAPY"===e?Be.a:"VERYBOOM"===e?Ae.a:"EUSDT"===e?Ne.a:"TUSDT"===e?Re.a:"EWBTC"===e?De.a:"EWETH"===e?Ie.a:ue.a};var n=U.d.get(U.b.account.assets);n=n?a._objToMap(n):new Map;var r=U.d.get(U.b.account.current);return a.state={accountHtml:[],address:"",assetsHtml:[],seroPriceInfo:{},current:"",account:"",detail:r,assets:n,healthy:"normal",healthData:"",tk:"",confirmingMap:new Map,percent:0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.init().catch((function(e){console.error(e)}))}},{key:"showWallet",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o,i,c,l,u,p;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ze.Details();case 2:if(n=e.sent,r=[],!n){e.next=25;break}for(o=!0,i=!1,c=void 0,e.prev=8,l=function(){var e=p.value;r.push(s.a.createElement(Le,{thumb:s.a.createElement(T.a,{type:e.avatar,className:"icon-avatar"}),multipleLine:!0,onClick:function(){ze.setCurrent(e).then((function(){t.accounts().then(),a.close()}))}},e.name,"(",e.mainPKr,")"))},u=n[Symbol.iterator]();!(o=(p=u.next()).done);o=!0)l();e.next=17;break;case 13:e.prev=13,e.t0=e.catch(8),i=!0,c=e.t0;case 17:e.prev=17,e.prev=18,o||null==u.return||u.return();case 20:if(e.prev=20,!i){e.next=23;break}throw c;case 23:return e.finish(20);case 24:return e.finish(17);case 25:a=M.a.alert(s.a.createElement("div",null,s.a.createElement("span",null,U.c.e().page.wallet.selectWallet),s.a.createElement(T.a,{type:"iconsetting",className:"icon-select-account-setting",onClick:function(){a.close(),U.e.goPage(U.e.WalletManager,U.e.Home)}})),s.a.createElement("div",{style:{maxHeight:"400px",overflowY:"scroll"}},s.a.createElement(z.a,null,r)),[{text:U.c.e().button.ok}]);case 26:case"end":return e.stop()}}),e,null,[[8,13,17,25],[18,,20,24]])})));return function(t){return e.apply(this,arguments)}}()},{key:"modalTips",value:function(e){M.a.alert(U.c.e().modal.help,e,[{text:U.c.e().button.ok}])}},{key:"calSeroTotal",value:function(){var e=this;_e.seroTotal(1,(function(t){e.setState({seroPriceInfo:t})}))}},{key:"accounts",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this,e.next=3,ze.getCurrent();case 3:if(a=e.sent,t.setState({current:a}),!a){e.next=17;break}return e.next=8,ze.Detail(a.address);case 8:return n=e.sent,e.next=11,te.balanceOf(n.tk);case 11:return(r=e.sent)&&U.d.set(U.b.account.assets,t._mapToObj(r)),e.next=15,te.getPendingAndConfirmingGroupByCy(n.tk);case 15:o=e.sent,t.setState({detail:n,account:ze,tk:n.tk,assets:r,confirmingMap:o});case 17:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_mapToObj",value:function(e){var t=Object.create(null),a=!0,n=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done);a=!0){var i=o.value,c=Object(C.a)(i,2),l=c[0],u=c[1];t[l]=u}}catch(p){n=!0,r=p}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}return t}},{key:"_objToMap",value:function(e){for(var t=new Map,a=0,n=Object.keys(e);a0&&(E+=.09*l.checkNilPercent);var w="".concat(U.c.e().toast.loading.synchronizing).concat(U.c.e().page.wallet.PKr," [").concat(l&&l.pkrIndex,"]");y<1&&l.startBlock-1?"&":"?")+(new Date).getTime()),a.setState({modal2:!0,dapp:e.text,dappUrl:r,read:n,visitDApp:!n})},a.onClose=function(){a.setState({modal2:!1})},a.read=function(){"zh_CN"===U.c.e().key?U.e.goPage(U.e.browser("https://sero.cash/app/disclaimer/index-zh.html"),U.e.DApp):U.e.goPage(U.e.browser("https://sero.cash/app/disclaimer/index-en.html"),U.e.DApp)},a.state={data:Bt,popupData:wt,seroLab:Pt,modal2:!1,dapp:"",dappUrl:"",visitDApp:!0,read:!1,now:0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){this.clearState()}},{key:"componentDidMount",value:function(){U.a.isZH()?this.setState({data:Ot,popupData:xt,seroLab:St}):this.setState({data:Bt,popupData:wt,seroLab:Pt}),this.clearState()}},{key:"visitDApp",value:function(e,t){var a=this.state.dapp;U.d.set(U.b.dappsRead(a),!e),this.setState({visitDApp:e,read:!e})}},{key:"clearRecent",value:function(){U.d.delete(U.b.dapp.list),this.setState({now:(new Date).getTime()})}},{key:"render",value:function(){var e=this,t=this.state,a=t.data,n=t.popupData,r=t.visitDApp,o=t.read,i=t.seroLab,c=U.d.get(U.b.dapp.list);if(c){Ct=[];var l=new Map,u=!0,p=!1,d=void 0;try{for(var f,m=c[Symbol.iterator]();!(u=(f=m.next()).done);u=!0){var h=f.value;if(!0===!l.get(h)){l.set(h,!0);var g=U.d.get(U.b.dappsInfoKey(h));if(Ct.push({icon:s.a.createElement("div",{className:"dapp-icon"},s.a.createElement("img",{src:g.logo,className:"dapp-img"})),text:g.name,url:g.url}),Ct.length>=8)break}}}catch(v){p=!0,d=v}finally{try{u||null==m.return||m.return()}finally{if(p)throw d}}}else Ct=[];return s.a.createElement(ce,{selectedTab:"dapp"},s.a.createElement("div",null,s.a.createElement("div",{className:"layout-top",style:{color:"#f7f7f7"}},s.a.createElement(kt.a,{placeholder:U.c.e().page.dapp.search,maxLength:200,onSubmit:function(e){e&&(e.indexOf("http")>-1?U.e.goPage(U.e.browser(e),U.e.DApp):_.a.fail(U.c.e().page.dapp.invalidDApp,3))}})),s.a.createElement("div",{style:{padding:"45px 0 60px",overflow:"scroll",background:"#fdfdfd"}},s.a.createElement("div",{className:"sub-title"},U.c.e().page.dapp.popup," "),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(vt.a,{data:n,activeStyle:!1,onClick:function(e,t){U.e.goPage(U.e.browser(e.url+(e.url.indexOf("?")>-1?"&":"?")+(new Date).getTime()),U.e.DApp)},hasLine:!1})),s.a.createElement("div",{className:"sub-title"},U.c.e().page.dapp.seroLab," "),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(vt.a,{data:i,activeStyle:!1,onClick:function(e,t){U.e.goPage(U.e.browser(e.url+(e.url.indexOf("?")>-1?"&":"?")+(new Date).getTime()),U.e.DApp)},hasLine:!1})),s.a.createElement("div",{className:"sub-title"},U.c.e().page.dapp.recommended," "),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(vt.a,{data:a,activeStyle:!1,onClick:function(t,a){e.showModal(t,!0)},hasLine:!1})),s.a.createElement("div",null,Ct.length>0?s.a.createElement("div",{style:{height:"auto"}},s.a.createElement("div",{className:"sub-title"},U.c.e().page.dapp.recent,s.a.createElement("div",{className:"sub-title2",onClick:function(){e.clearRecent()}},s.a.createElement(T.a,{type:"iconclear"}))),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(vt.a,{data:Ct,activeStyle:!1,onClick:function(t,a){e.showModal(t)},hasLine:!1}))):""))),s.a.createElement(M.a,{popup:!0,visible:this.state.modal2,onClose:function(){return e.onClose()},animationType:"slide-up"},s.a.createElement(z.a,{renderHeader:function(){return s.a.createElement("div",null,s.a.createElement("h3",null,U.c.e().modal.dappTip1))}},s.a.createElement(z.a.Item,{key:"1"},s.a.createElement("p",{className:"popup-list"},U.c.e().modal.dappTip2,s.a.createElement("a",{onClick:function(){e.read()}},U.c.e().modal.dappTip3),U.c.e().modal.dappTip4),s.a.createElement(At,{"data-seed":"logId",defaultChecked:o,onChange:function(t){return e.visitDApp(!t.target.checked)}},U.c.e().modal.haveRead)),s.a.createElement(z.a.Item,null,s.a.createElement(K.a,{type:"primary",disabled:r,onClick:function(){e.onClose(),U.e.goPage(U.e.browser(e.state.dappUrl),U.e.DApp)}},U.c.e().button.confirm)))))}}]),t}(o.Component),Nt=new oe,Kt=new q,Dt=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).showQrCode=function(e){M.a.alert("QR-Code",s.a.createElement("div",null,s.a.createElement("canvas",{id:"qrImg"}),s.a.createElement("p",{style:{marginTop:"0",fontSize:"12px",overflowWrap:"break-word"}},e),s.a.createElement(K.a,{className:"copyTxt",size:"small",onClick:function(){me()(e),_.a.success("Copy Successfully",1)}},"Copy")),[{text:"Close"}]);var t=document.getElementById("qrImg");de.a.toCanvas(t,e,(function(e){e&&console.error(e)}))},a.state={accountHtml:[]},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"modalTips",value:function(e){M.a.alert(U.c.e().modal.help,e,[{text:U.c.e().button.ok}])}},{key:"componentDidMount",value:function(){this.loadAccounts().then()}},{key:"loadAccounts",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o,i,c,l,u,p;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this,e.next=3,Nt.List();case 3:a=e.sent,n=0,r=[],o=!0,i=!1,c=void 0,e.prev=9,l=j.a.mark((function e(){var a,o,i,c;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=p.value,e.next=3,Nt.Detail(a.address);case 3:o=e.sent,i=o.mainPKr,c=o.currentPKr,r.push(s.a.createElement(Ge.a,{size:"lg",key:n++},s.a.createElement(v.a,{size:"lg"}),s.a.createElement(b.a,null,s.a.createElement(b.a.Header,{thumb:s.a.createElement("div",null,s.a.createElement(T.a,{className:"icon-avatar",type:o.avatar,size:"lg"})),title:o.name,extra:s.a.createElement(T.a,{type:"ellipsis",onClick:function(){U.e.goPage(U.e.manage(a.address),U.e.WalletManager)}})}),s.a.createElement(b.a.Body,{style:{padding:"0px 15px 6px"}},s.a.createElement("div",null,s.a.createElement("span",{style:{color:"#f6c23e"}},s.a.createElement(T.a,{type:"iconhelp",className:"icon-pkr",onClick:function(){t.modalTips(U.c.e().modal.mainPKr)}}),U.c.e().page.walletManage.mainPKr,":"),s.a.createElement("span",null," ",Kt.ellipsisAddress(i)),s.a.createElement(T.a,{type:"iconqr-code",className:"icon-qrcode",onClick:function(){U.e.goPage(U.e.receive(o.address,"mainPKr"),U.e.WalletManager)}})),s.a.createElement("div",null,s.a.createElement("span",{style:{color:"#f6c23e"}},s.a.createElement(T.a,{type:"iconhelp",className:"icon-pkr",onClick:function(){t.modalTips(U.c.e().modal.pkr)}}),U.c.e().page.walletManage.PKr,":"),s.a.createElement("span",null," ",Kt.ellipsisAddress(c)),s.a.createElement(T.a,{type:"iconqr-code",className:"icon-qrcode",onClick:function(){U.e.goPage(U.e.receive(o.address,"pkr"),U.e.WalletManager)}}))))));case 7:case"end":return e.stop()}}),e)})),u=a[Symbol.iterator]();case 12:if(o=(p=u.next()).done){e.next=17;break}return e.delegateYield(l(),"t0",14);case 14:o=!0,e.next=12;break;case 17:e.next=23;break;case 19:e.prev=19,e.t1=e.catch(9),i=!0,c=e.t1;case 23:e.prev=23,e.prev=24,o||null==u.return||u.return();case 26:if(e.prev=26,!i){e.next=29;break}throw c;case 29:return e.finish(26);case 30:return e.finish(23);case 31:0===r.length&&(r=s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(T.a,{type:"iconwushuju",style:{width:"100px",height:"100px"}}),s.a.createElement("br",null),s.a.createElement("span",{style:{color:"gray"}},"No Data"))),t.setState({accountHtml:r});case 33:case"end":return e.stop()}}),e,this,[[9,19,23,31],[24,,26,30]])})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),rightContent:s.a.createElement(T.a,{onClick:function(){M.a.operation([{text:s.a.createElement("span",{style:{textAlign:"center",color:"#108ee9",fontWeight:"800"}},U.c.e().modal.createWallet),onPress:function(){U.e.goPage(U.e.AccountCreate1,U.e.WalletManager)}},{text:s.a.createElement("span",{style:{textAlign:"center",color:"#108ee9",fontWeight:"800"}},U.c.e().modal.importWallet),onPress:function(){U.e.goPage(U.e.ImportAccount,U.e.WalletManager)}}])},type:"iconadd"}),onLeftClick:function(){U.e.goBack()}},U.c.e().page.my.walletManage)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{background:"#f7f7f7",marginTop:"45px",height:"100%",overflowY:"scroll"}},this.state.accountHtml))}}]),t}(o.Component),Mt=new oe,It=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).removeAccount=function(){var e=Object(L.a)(a);M.a.prompt(U.c.e().page.txTransfer.inputPassword,U.c.e().toast.info.removeAccount,[{text:U.c.e().button.cancel,onPress:function(){}},{text:U.c.e().button.confirm,onPress:function(t){if(t){_.a.loading(U.c.e().toast.loading.deleting,60);var a=e.props.match.params.address;Mt.remove(a,t).then((function(){Mt.getCurrent().then((function(e){e.address===a&&Mt.setDefaultCurrent().then()})),_.a.success(U.c.e().toast.success.operation,2),setTimeout((function(){U.e.goBack()}),2e3)})).catch((function(){_.a.fail(U.c.e().toast.error.passwordError,2)}))}else _.a.fail(U.c.e().page.txTransfer.inputPassword,2)}}],"secure-text",null,[U.c.e().page.txTransfer.inputPassword])},a.clearData=function(){var e=Object(L.a)(a);try{M.a.alert(U.c.e().modal.clearData,U.c.e().modal.clearTip,[{text:U.c.e().button.cancel,onPress:function(){}},{text:U.c.e().button.confirm,onPress:function(){_.a.loading("Repairing..."),te.clearData(e.state.detail.tk).then((function(t){Mt.setCurrent(e.state.detail).then((function(e){_.a.success(U.c.e().toast.success.clear,2),setTimeout((function(){U.e.goPage(U.e.Home)}),2e3)}))})).catch((function(e){_.a.success(U.c.e().toast.error.clearData,3),console.log(e)}))}}])}catch(t){_.a.success(U.c.e().toast.error.clearData,3)}},a.changePasswordHint=function(){var e=a.state.detail;M.a.prompt(U.c.e().page.walletManage.changePasswordHint,"",[{text:U.c.e().button.cancel,onPress:function(e){return new Promise((function(e){e()}))}},{text:U.c.e().button.confirm,onPress:function(t){return new Promise((function(a,n){t?(e.hint=t,U.d.set(U.b.detailKey(e.address),e),a(),_.a.success(U.c.e().toast.success.save,1)):n()}))}}],"default",e.hint,[U.c.e().page.walletManage.changePasswordHint])},a.exportMnemonicPhrase=function(){var e=Object(L.a)(a);M.a.prompt(U.c.e().page.walletManage.export,"",[{text:U.c.e().button.cancel,onPress:function(e){return new Promise((function(e){e()}))}},{text:U.c.e().button.confirm,onPress:function(t){return new Promise((function(a,n){t?(_.a.loading(U.c.e().toast.loading.exporting,60),Mt.exportMnemonic(e.props.match.params.address,t).then((function(){_.a.success(U.c.e().toast.success.export,2),a(),setTimeout((function(){U.e.goPage(U.e.AccountCreate2,U.e.manage(e.props.match.params.address))}),2e3)})).catch((function(e){e.indexOf("wrong passphrase")>-1?_.a.fail(U.c.e().toast.error.passwordError,2):_.a.fail(e,3),n()}))):n()}))}}],"secure-text",null,[U.c.e().page.walletManage.password])},a.state={detail:""},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){var e=this,t=e.props.match.params.address;new oe(t).Detail(t).then((function(t){t?e.setState({detail:t}):(_.a.fail(U.c.e().toast.error.accountExisted,1),setTimeout((function(){U.e.goPage(U.e.Personal,"")}),1e3))}))}},{key:"render",value:function(){var e=this,t=this.state.detail;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()}},U.c.e().page.my.walletManage)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement(z.a,null,s.a.createElement(Ge.a,{size:"lg"},s.a.createElement(z.a.Item,{arrow:"horizontal",thumb:s.a.createElement(T.a,{className:"icon-avatar",type:t.avatar,size:"lg"}),multipleLine:!0,onClick:function(){U.e.goPage(U.e.manageName(t.address),U.e.manage(e.props.match.params.address))}},t.name," ",s.a.createElement(z.a.Item.Brief,null,t.mainPKr)))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(z.a,null,s.a.createElement(Ge.a,{size:"lg"},s.a.createElement(z.a.Item,{arrow:"horizontal",onClick:this.changePasswordHint,thumb:s.a.createElement(T.a,{type:"iconcustom-hint",color:"gray"})},s.a.createElement("span",null,U.c.e().page.walletManage.changePasswordHint)),s.a.createElement(z.a.Item,{arrow:"horizontal",onClick:this.exportMnemonicPhrase,thumb:s.a.createElement(T.a,{type:"iconword",color:"gray"})},s.a.createElement("span",null,U.c.e().page.walletManage.export)))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(K.a,{style:{color:"#009688"},onClick:function(){e.clearData()}},U.c.e().button.repair),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(K.a,{style:{color:"red"},onClick:function(){e.removeAccount()}},U.c.e().button.deleteAddress)))}}]),t}(o.Component),jt=new q,Rt=new oe,_t=Array.from(jt.avatars).map((function(e,t){return{icon:s.a.createElement(T.a,{type:e,className:"icon-avatar",size:"lg"}),text:""}})),Ft=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).showChangeAvatar=function(){var e;e=M.a.alert(U.c.e().page.walletManage.changeProfilePhoto,s.a.createElement("div",null,s.a.createElement(vt.a,{data:_t,hasLine:!1,onClick:function(t,n){var r=t.icon.props.type,o=a.state.detail;o.avatar=r,Rt.setDetail(o).then(),a.setState({detail:o}),e.close()},columnNum:3})),[{text:U.c.e().button.confirm,onPress:function(){return new Promise((function(e){e()}))}}],"default")},a.showChangeName=function(){M.a.prompt(U.c.e().page.walletManage.changeWalletName,"",[{text:U.c.e().button.cancel,onPress:function(e){return new Promise((function(e){e()}))}},{text:U.c.e().button.confirm,onPress:function(e){return new Promise((function(t,n){if(e){var r=a.state.detail;r.name=e,Rt.setDetail(r).then(),a.setState({detail:r}),t()}else n()}))}}],"default",null,[U.c.e().page.walletManage.changeWalletName])},a.state={detail:{}},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){var e=this.props.match.params.address,t=this;new oe(e).Detail(e).then((function(e){e?t.setState({detail:e}):(_.a.fail("Account not exist!",1),setTimeout((function(){U.e.goPage(U.e.Personal,"")}),1e3))}))}},{key:"render",value:function(){var e=this.state.detail;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()}},U.c.e().page.my.walletManage)),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement(v.a,{size:"lg"}),s.a.createElement(z.a,null,s.a.createElement(Ge.a,{size:"lg"},s.a.createElement(z.a.Item,{onClick:this.showChangeAvatar,extra:s.a.createElement(T.a,{type:e?e.avatar:"",className:"icon-avatar",size:"lg"}),thumb:s.a.createElement(T.a,{type:"iconavatar",color:"gray"})},s.a.createElement("span",null,U.c.e().page.walletManage.changeProfilePhoto)),s.a.createElement(z.a.Item,{onClick:this.showChangeName,extra:s.a.createElement("span",{style:{color:"#4e73df"}},e?e.name:""),thumb:s.a.createElement(T.a,{type:"iconname",color:"gray"})},s.a.createElement("span",null,U.c.e().page.walletManage.changeWalletName))))))}}]),t}(o.Component),Lt=function(){function e(){Object(l.a)(this,e)}return Object(u.a)(e,[{key:"add",value:function(e){if(U.d.get(U.b.address.info+e.address))throw new Error("Address has in book");var t=U.d.get(U.b.address.book);t?t.push(e.address):t=[e.address],U.d.set(U.b.address.book,t),U.d.set(U.b.address.info+e.address,e)}},{key:"set",value:function(e){U.d.set(U.b.address.info+e.address,e)}},{key:"List",value:function(){var e=U.d.get(U.b.address.book);if(e){var t=[],a=!0,n=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done);a=!0){var i=o.value,c=U.d.get(U.b.address.info+i);c&&t.push(c)}}catch(l){n=!0,r=l}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}return t}return[]}},{key:"info",value:function(e){return U.d.get(U.b.address.info+e)}},{key:"remove",value:function(e){var t=U.d.get(U.b.address.book);if(t){var a=[],n=!0,r=!1,o=void 0;try{for(var s,i=t[Symbol.iterator]();!(n=(s=i.next()).done);n=!0){var c=s.value;c===e||a.push(c)}}catch(l){r=!0,o=l}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}U.d.delete(U.b.address.info+e),U.d.set(U.b.address.book,a)}}}]),e}(),Ht=(a(146),new q,new Lt),zt=z.a.Item,Vt=zt.Brief,Wt=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={addressHtml:[]},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.load()}},{key:"load",value:function(){var e=Ht.List(),t=[],a=0,n=!0,r=!1,o=void 0;try{for(var i,c=function(){var e=i.value;t.push(s.a.createElement(zt,{wrap:!0,thumb:s.a.createElement("img",{src:ue.a}),key:a++},e.name,s.a.createElement("br",null),s.a.createElement("div",{className:"list-address",onClick:function(){U.e.goPage(U.e.addressDetail(e.address),U.e.AddressList)}},e.address),s.a.createElement(T.a,{type:"iconcopy",style:{position:"relative",float:"right",color:"gray"},onClick:function(){me()(e.address),_.a.success(U.c.e().toast.success.copy,1)}}),s.a.createElement(Vt,null,e.desc)))},l=e[Symbol.iterator]();!(n=(i=l.next()).done);n=!0)c()}catch(u){r=!0,o=u}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}0===t.length&&(t=s.a.createElement("div",{style:{textAlign:"center",background:"#f7f7f7",padding:"15px 0"}},s.a.createElement(T.a,{type:"iconwushuju",style:{width:"100px",height:"100px"}}),s.a.createElement("br",null),s.a.createElement("span",{style:{color:"gray"}},U.c.e().page.txList.noData))),this.setState({addressHtml:t})}},{key:"render",value:function(){return s.a.createElement("div",null,s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()},rightContent:s.a.createElement(T.a,{type:"iconadd",onClick:function(){U.e.goPage(U.e.AddressAdd,U.e.AddressList)}})},U.c.e().page.addressBook.title)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{marginTop:"45px",overflowY:"scroll"}},s.a.createElement(z.a,null,this.state.addressHtml)))}}]),t}(o.Component),qt=(a(173),a(71)),Zt=a.n(qt),Ut=a(73),Gt=(new q,new Lt),Qt=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).checkConfirming=function(){var e=Object(L.a)(a);a.props.form.validateFields((function(t,a){a.name&&a.address?e.setState({confirming:!1}):e.setState({confirming:!0})}))},a.state={confirming:!0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){var e=this.props.form,t=e.getFieldDecorator,a=e.setFieldsValue;this.nameDecorator=t("name",{rules:[{required:!0}]}),this.addressDecorator=t("address",{rules:[{required:!0}]}),this.descDecorator=t("desc",{rules:[{required:!1}]}),a({address:this.props.address})}},{key:"submit",value:function(){var e=this;e.setState({confirming:!0}),this.props.form.validateFields((function(t,a){if(null==t)if(Object(Ut.validPkr)(a.address))try{Gt.add({name:a.name,address:a.address,desc:a.desc}),_.a.success(U.c.e().toast.success.add,1),setTimeout((function(){U.e.goBack()}),1e3)}catch(n){console.log(n.message),_.a.fail(n.message,1),e.setState({confirming:!1})}else _.a.fail(U.c.e().toast.error.invalidAddress,1),e.setState({confirming:!1})}))}},{key:"render",value:function(){var e=this;this.props.form.getFieldProps;return s.a.createElement("div",{style:{background:"#f7f7f7"}},s.a.createElement(v.a,{size:"lg"}),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement("img",{src:ue.a,width:40})),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",null,this.nameDecorator(s.a.createElement(Zt.a,{className:"textarea-bottom",title:"",placeholder:U.c.e().page.addressBook.name,name:"name",ref:function(t){return e.autoFocusInst=t},autoHeight:!0,clear:!0,onBlur:this.checkConfirming,style:{fontSize:"14px"}}))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",null,this.addressDecorator(s.a.createElement(Zt.a,{className:"textarea-bottom",title:"",clear:!0,placeholder:U.c.e().page.addressBook.address,name:"address",ref:function(t){return e.autoFocusInst=t},rows:4,count:150,autoHeight:!0,onBlur:this.checkConfirming,style:{fontSize:"14px",width:"92%"}})),s.a.createElement(T.a,{type:"iconscan",className:"address-add-iconscan",onClick:function(){U.e.goPage(U.e.scan("address"),U.e.AddressAdd)}})),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{background:"#fdfdfd"}},this.descDecorator(s.a.createElement(Zt.a,{className:"textarea-bottom",title:"",clear:!0,placeholder:U.c.e().page.addressBook.description,name:"desc",ref:function(t){return e.autoFocusInst=t},autoHeight:!0,onBlur:this.checkConfirming,style:{fontSize:"14px"}}))),s.a.createElement("div",{className:"btn-bottom"},s.a.createElement(K.a,{type:"primary",onClick:function(){e.submit()},disabled:this.state.confirming},U.c.e().button.add)))}}]),t}(s.a.Component),Jt=Object(Xe.a)()(Qt),Yt=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.setState({})}},{key:"render",value:function(){return s.a.createElement("div",{style:{background:"#f7f7f7",height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()}},U.c.e().page.addressBook.add)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement(Jt,{address:this.props.match.params.address})))}}]),t}(o.Component),Xt=new Lt,$t=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={address:""},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this.props.match.params.address;if(e){var t=Xt.info(e);this.setState({address:t})}else U.e.goPage(U.e.AddressList,U.e.WalletManager)}},{key:"render",value:function(){var e=this.state.address;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()},rightContent:s.a.createElement(T.a,{type:"iconedit",style:{color:"#108ee9"},onClick:function(){U.e.goPage(U.e.addressEdit(e.address),U.e.addressDetail(e.address))}})},U.c.e().page.addressBook.detail)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(v.a,{size:"lg"}),s.a.createElement("img",{src:ue.a,width:40}),s.a.createElement(v.a,{size:"lg"})),s.a.createElement(z.a,{style:{background:"#fdfdfd"}},s.a.createElement(z.a.Item,{wrap:!0},s.a.createElement("span",{style:{color:"gray",fontSize:"12px"}},U.c.e().page.addressBook.name),s.a.createElement(z.a.Item.Brief,null,s.a.createElement("div",{style:{color:"#333",fontSize:"16px"}},e.name))),s.a.createElement(z.a.Item,{wrap:!0},s.a.createElement("span",{style:{color:"gray",fontSize:"12px"}},U.c.e().page.addressBook.address),s.a.createElement("br",null),s.a.createElement("div",{className:"list-address"},e.address),s.a.createElement(T.a,{type:"iconcopy",style:{position:"relative",float:"right",color:"gray",top:"-5px"},onClick:function(){me()(e.address),_.a.success(U.c.e().toast.success.copy,1)}})),s.a.createElement(z.a.Item,{wrap:!0},s.a.createElement("span",{style:{color:"gray",fontSize:"12px"}},U.c.e().page.addressBook.description),s.a.createElement(z.a.Item.Brief,null,s.a.createElement("div",{style:{color:"#333",fontSize:"16px"}},e.desc))))))}}]),t}(o.Component),ea=(new q,new Lt),ta=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={confirming:!0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){this.props.address?(this.nameDecorator=this.props.form.getFieldDecorator("name",{rules:[{required:!0}],initialValue:this.props.address.name||""}),this.addressDecorator=this.props.form.getFieldDecorator("address",{rules:[{required:!0}],initialValue:this.props.address.address||""}),this.descDecorator=this.props.form.getFieldDecorator("desc",{rules:[{required:!1}],initialValue:this.props.address.desc||""})):U.e.goPage(U.e.AddressList,U.e.WalletManager)}},{key:"submit",value:function(){var e=this;this.props.form.validateFields((function(t,a){if(null==t)if(Object(Ut.validPkr)(a.address))try{ea.remove(e.props.address.address),ea.add({name:a.name,address:a.address,desc:a.desc}),_.a.success(U.c.e().toast.success.save,1),setTimeout((function(){U.e.goBack()}),1e3)}catch(n){_.a.fail(n.message,1)}else _.a.fail(U.c.e().toast.error.invalidAddress,1);else t.name?_.a.fail(t.name.errors[0].message,1):t.address&&_.a.fail(t.address.errors[0].message,1)}))}},{key:"render",value:function(){var e=this;return s.a.createElement("div",null,s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:U.c.e().button.cancel,onLeftClick:function(){U.e.goBack()},rightContent:s.a.createElement("span",{style:{color:"#108ee9"},onClick:function(){e.submit()}},U.c.e().button.save)},U.c.e().page.addressBook.detail)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement("div",null,s.a.createElement(v.a,{size:"lg"}),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement("img",{src:ue.a,width:40})),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",null,this.nameDecorator(s.a.createElement(Zt.a,{className:"textarea-bottom",title:"",placeholder:U.c.e().page.addressBook.name,name:"name",ref:function(t){return e.autoFocusInst=t},autoHeight:!0,autoFocus:!0,clear:!0,onBlur:this.checkConfirming,style:{fontSize:"14px"}}))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",null,this.addressDecorator(s.a.createElement(Zt.a,{title:"",placeholder:U.c.e().page.addressBook.address,name:"address",ref:function(t){return e.autoFocusInst=t},autoHeight:!0,clear:!0,style:{fontSize:"14px"},editable:!1,rows:4}))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{background:"#fdfdfd"}},this.descDecorator(s.a.createElement(Zt.a,{title:"",clear:!0,placeholder:U.c.e().page.addressBook.description,name:"desc",ref:function(t){return e.autoFocusInst=t},autoHeight:!0,onBlur:this.checkConfirming})))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(K.a,{onClick:function(){M.a.alert(U.c.e().button.deleteAddress,U.c.e().modal.sure,[{text:U.c.e().button.cancel,onPress:function(){}},{text:U.c.e().button.confirm,onPress:function(){ea.remove(e.props.address.address),_.a.success("Delete Successfully",1),setTimeout((function(){U.e.goPage(U.e.AddressList,U.e.WalletManager)}),1e3)}}])}},s.a.createElement("span",{style:{color:"red"}},U.c.e().button.deleteAddress))))}}]),t}(s.a.Component),aa=Object(Xe.a)()(ta),na=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={address:"",save:!1},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){var e=this.props.match.params.address,t=ea.info(e);this.setState({address:t})}},{key:"render",value:function(){return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement(aa,{address:this.state.address,save:this.state.save}))}}]),t}(o.Component),ra=(a(803),a(387)),oa=a.n(ra),sa=(a(356),new q),ia=new oe,ca=(s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.all),s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.out),s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.in),z.a.Item),la=ca.Brief,ua=1,pa=null,da=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).onRefresh=function(){var e=Object(L.a)(a);e.setState({refreshing:!0,isLoading:!0,datas:[]}),_.a.loading("loading...",1),e.initTxList().then((function(t){e.setState({datas:t,refreshing:!1,isLoading:!1,hasMore:t.length>=10})}))},a.onEndReached=function(e){var t=Object(L.a)(a);t.state.isLoading||(t.setState({isLoading:!0}),_.a.loading("loading...",1),t.initTxList(++ua).then((function(e){e.length>t.state.datas.length?t.setState({datas:e,isLoading:!1,hasMore:e.length>=10}):t.setState({datas:e,isLoading:!1,hasMore:!1})})))},a.state={all:[],in:[],out:[],datas:[],refreshing:!0,isLoading:!0,height:document.documentElement.clientHeight-45,hasMore:!0,address:"",latestBlock:0,confirmMap:new Map},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this;[{title:s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.all)},{title:s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.out)},{title:s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.in)}],ua=1;var t=this.state.height;(new oe).getCurrent().then((function(t){e.setState({address:t.address})})),_.a.loading("loading...",2),setTimeout((function(){e.initTxList(10).then((function(a){e.setState({datas:a,height:t,refreshing:!1,isLoading:!1,hasMore:a.length>=10})}))}),200),pa&&clearInterval(pa),pa=setInterval((function(){e.initTxList(10).then((function(a){e.setState({datas:a,height:t,refreshing:!1,isLoading:!1,hasMore:a.length>=10})}))}),1e4)}},{key:"getSyncState",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ia.getCurrent();case 2:return t=e.sent,e.next=5,te.getSyncState(t.tk);case 5:a=e.sent,this.setState({latestBlock:a.latestBlock});case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initTxList",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o,s,i,c,l,u,p,d,f,m,h,g,v,y,k,E;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=t?10*ua:10,e.next=3,this.getSyncState();case 3:return e.next=5,ia.getCurrent();case 5:return a=e.sent,n=this.props.match.params.currency,e.next=9,te.getTxList(a.tk,n,t);case 9:return r=e.sent,e.next=12,te.getPendingAndConfirming(a.tk,n);case 12:for(o=e.sent,s=[],i=[],c=!0,l=!1,u=void 0,e.prev=18,p=r[Symbol.iterator]();!(c=(d=p.next()).done);c=!0)"pending"===(f=d.value).State&&i.push(f.TxHash);e.next=26;break;case 22:e.prev=22,e.t0=e.catch(18),l=!0,u=e.t0;case 26:e.prev=26,e.prev=27,c||null==p.return||p.return();case 29:if(e.prev=29,!l){e.next=32;break}throw u;case 32:return e.finish(29);case 33:return e.finish(26);case 34:for(m=new Map,h=!0,g=!1,v=void 0,e.prev=38,y=o[Symbol.iterator]();!(h=(k=y.next()).done);h=!0)E=k.value,i.indexOf(E.TxHash)<0&&s.push(E),m.set(E.TxHash,E);e.next=46;break;case 42:e.prev=42,e.t1=e.catch(38),g=!0,v=e.t1;case 46:e.prev=46,e.prev=47,h||null==y.return||y.return();case 49:if(e.prev=49,!g){e.next=52;break}throw v;case 52:return e.finish(49);case 53:return e.finish(46);case 54:return this.setState({confirmMap:m}),s.reverse(),e.abrupt("return",r.concat(s));case 57:case"end":return e.stop()}}),e,this,[[18,22,26,34],[27,,29,33],[38,42,46,54],[47,,49,53]])})));return function(t){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=this.props.match.params.currency,a=this.state,n=a.datas,r=a.hasMore,o=a.isLoading,i=a.latestBlock,c=a.confirmMap,l=[];if(n&&n.length>0){for(var u=function(e){var a=void 0,r=n[e];c.has(r.TxHash)&&c.get(r.TxHash).Num&&(r.Num=c.get(r.TxHash).Num,r.isConfirm=!0),r&&r.Time&&(a=sa.formatDate(r.Time));var o=0;r.Tkn.forEach((function(e,a){a===t&&(o=xe.a.convert(e,a))})),"out"===r.Type&&1===new ge.a(o).comparedTo(0)?r.Type="in":"in"===r.Type&&-1===new ge.a(o).comparedTo(0)&&(r.Type="out");var u="out"===r.Type?"iconzhichu":"iconshouru",p="out"===r.Type?"#24bdd2":"#198fea",d="out"===r.Type?"":"+";"pending"===r.State&&(u="iconsystem_pending_line",p="#f47402"),"pending"!==r.State&&r.isConfirm&&ia.isMyPKr(r.From)&&(o="0"),l.push(s.a.createElement(ca,{key:e,style:"pending"===r.State||r.isConfirm?{opacity:.5}:{},multipleLine:!0,onClick:function(){U.d.set(U.b.txInfoKey("",r.TxHash),r),U.e.goPage(U.e.transferDetail(r.TxHash),U.e.transferList(t))},thumb:s.a.createElement(T.a,{type:u,size:"lg",style:{color:"".concat(p)}}),extra:s.a.createElement("span",{className:"income-span",style:{color:p}},d,o)},s.a.createElement("span",{style:{fontSize:"14px",color:"#64727c"}},sa.ellipsisHash(r.TxHash)),s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"14px",color:"#64727c"}},U.c.e().page.txDetail.block+" : "+(99999999999===r.Num?0:r.Num)),s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"14px",color:"#64727c"}},r.isConfirm?U.c.e().page.txDetail.pending+" : "+(r.Num&&12-r.Num+i>=0?12-r.Num+i:0)+"/12":""),s.a.createElement(la,{style:{fontSize:"12px",color:"#c4c7cc"}},a)))},p=n.length-1;p>=0;p--)u(p);l.push(s.a.createElement(ca,{key:n.length+1,multipleLine:!0},s.a.createElement("p",{style:{textAlign:"center",color:"#198fea"}},o?"loading...":r?s.a.createElement(K.a,{size:"small",type:"ghost",onClick:function(){return e.onEndReached()}},"Show more"):"~")))}else o||l.push(s.a.createElement(ca,{key:1,multipleLine:!0},s.a.createElement("div",{style:{textAlign:"center",background:"#fdfdfd",padding:"15px 0"}},s.a.createElement(T.a,{type:"iconwushuju",style:{width:"100px",height:"100px"}}),s.a.createElement("br",null),s.a.createElement("span",{style:{color:"gray"}},U.c.e().page.txList.noData))));return s.a.createElement("div",{style:{height:document.documentElement.clientHeight,background:"#fdfdfd"}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",icon:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()}},this.props.match.params.currency)),s.a.createElement(oa.a,{damping:100,ref:function(t){return e.ptr=t},style:{height:this.state.height,overflow:"auto"},indicator:this.state.down?{}:{deactivate:"pull to refresh"},direction:"down",refreshing:this.state.refreshing,onRefresh:this.onRefresh},s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement(z.a,null,l))),s.a.createElement("div",{className:"bottom-button-div"},s.a.createElement("div",{className:"bottom-button-div-left"},s.a.createElement(K.a,{className:"bottom-button-div-receive",onClick:function(){e.state.address&&U.e.goPage(U.e.receive(e.state.address,"pkr"),U.e.transferList(e.props.match.params.currency))}},U.c.e().button.receive)),s.a.createElement("div",{className:"bottom-button-div-right"},s.a.createElement(K.a,{className:"bottom-button-div-transfer",onClick:function(){U.e.goPage(U.e.transfer(e.props.match.params.currency),U.e.transferList(e.props.match.params.currency))}},U.c.e().button.transfer))))}}]),t}(o.Component),fa=(a(236),a(26)),ma=a.n(fa),ha=new ke,ga=new q,va=new oe,ya=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={state:"pending",txInfo:{},txState:"",tos:[],cmdType:"",blockNum:0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.match.params.hash;va.getCurrent().then((function(a){te.getTxDetail(a.tk,t).then((function(t){e.setState({txInfo:t})})).catch((function(n){te.getPendingAndConfirming(a.tk).then((function(a){var n=!0,r=!1,o=void 0;try{for(var s,i=a[Symbol.iterator]();!(n=(s=i.next()).done);n=!0){var c=s.value;t===c.TxHash&&(c.Fee=xe.a.convert(new ge.a(c.GasUsed).multipliedBy(new ge.a(c.GasPrice)),"SERO"),e.setState({txInfo:c}))}}catch(l){r=!0,o=l}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}}))}))})),e.getTxState().catch()}},{key:"getTxState",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o,i,c,l,u,p,d,f,m,h;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.match.params.hash,e.next=3,ha.seroRpcAsync("sero_getTransactionReceipt",[t]);case 3:return a=e.sent,n=a.result,r="",n&&(r=1===new ge.a(n.status).comparedTo(0)?s.a.createElement(ot.a,null,U.c.e().page.txDetail.contractSuccess):s.a.createElement(ot.a,null,U.c.e().page.txDetail.contractFailed)),e.next=9,ha.seroRpcAsync("sero_getTransactionByHash",[t]);case 9:if(o=e.sent,i=o.result){if(n&&(i.Num=new ge.a(n.blockNumber).toNumber()),c=i.stx.Desc_Cmd,l="",c&&(c.BuyShare?l="Buy Share":c.RegistPool?l="Regist Pool":c.ClosePool?l="Close Pool":c.Contract&&(l="Contract")),u=[],l)"Contract"===l&&(u.push(i.to),h=(h=ga.base58ToHex(i.to)).length>64?h.slice(0,h.length-64):h,u.push("(".concat(ga.ellipsisAddress(ga.hexToBase58(h)),")")));else{if(i.stx.Tx1.Outs_P)for(p=0;p32?s.a.createElement("div",null,s.a.createElement("div",{style:{overflowWrap:"break-word",fontSize:"10px",padding:"5px 0"},onClick:function(){me()(e),_.a.success("Copy Successfully",1)}},e,s.a.createElement(T.a,{type:"iconcopy",className:"transfer-detail-copy-icon"}))):s.a.createElement("div",null,s.a.createElement("div",{style:{overflowWrap:"break-word",fontSize:"10px",fontWeight:"600",color:"#000"}},"Contract Address: ",e))})))),s.a.createElement(v.a,{size:"lg"}),"Contract"===c?s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},o)):c),s.a.createElement("div",null,s.a.createElement(Ge.a,null,s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.hash,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",{onClick:function(){me()(a.props.match.params.hash),_.a.success("Copy Successfully",1)}},ga.ellipsisHash(this.props.match.params.hash),s.a.createElement(T.a,{type:"iconcopy",className:"transfer-detail-copy-icon"})))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.block,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",{style:{color:"#007bff"}},99999999999===l?0:l))))))),s.a.createElement("p",{className:"transfer-detail-p"},s.a.createElement("a",{onClick:function(){U.e.goPage(U.e.browser("https://explorer.sero.cash/txsInfo.html?hash=".concat(r.BlockHash)),U.e.transferDetail(a.props.match.params.hash))},style:{color:"#108ee9"}},U.c.e().page.txDetail.goto)))}}]),t}(o.Component),ka=a(178),Ea=a(150),ba=new oe,wa=new ka.a,xa=function(){function e(t){if(Object(l.a)(this,e),t)this.address=t;else{var a=wa.get(U.b.account.current);a&&(this.address=a.address)}}return Object(u.a)(e,[{key:"query",value:function(e){var t=this;return new Promise((function(a,n){try{a(t.queryStorage(e))}catch(r){a(t.queryStorage(e))}}))}},{key:"queryStorage",value:function(e){for(var t=wa.length(),a=U.b.txKeyPrefix(this.address),n=new Map,r=0;r-1){var s=o.split(":")[2],i=o.split(":")[3],c=o.split(":")[4];Object(Ea.genTxMap)(i,s,e,n,c)}}if(n)return Object(Ea.sortTxMap)(n)}},{key:"info",value:function(e){var t=this;return new Promise((function(a,n){try{a(t.infoStorage(e))}catch(r){a(t.infoStorage(e))}}))}},{key:"infoStorage",value:function(e){var t=wa.get(e);if(t.currency)return{state:"pending",data:t};for(var a=U.b.txKeyHashPrefix(this.address,e),n=wa.length(),r=new Map,o=0;o-1){var i=s.split(":")[3],c=s.split(":")[4];Object(Ea.genTxInfo)(c,r,e,i)}}var l=null,u=[];return r.forEach((function(e,t,a){l=e,u.push({cy:e.currency,value:e.value})})),l.assets=u,{state:"completed",data:l}}},{key:"transfer",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n,r,o,s,i,c,l,u,p;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.cy,o=t.gas,s=t.gasPrice,i=t.from,r||(r="SERO"),o||(o="0x"+new ge.a("4700000").toString(16)),s||(s="0x"+new ge.a("1000000000").toString(16)),i){e.next=15;break}return e.next=10,ba.getCurrent();case 10:c=e.sent,n=new oe(c.address),i=c.tk,e.next=20;break;case 15:return n=new oe(i),e.next=18,n.Detail(i);case 18:l=e.sent,i=l.tk;case 20:return(u={}).From=i,u.To=t.to,u.Cy=r,u.Value=t.value,u.Data=t.data,u.Gas=new ge.a(o).toString(16),u.GasPrice=new ge.a(s).toString(16),e.next=30,n.getSK(a);case 30:return u.SK=e.sent,u.FeeCy=t.feeCy?t.feeCy:"SERO",u.BuyShare=t.BuyShare,t.feeValue&&(u.FeeValue=t.feeValue),t.catg&&t.tkt&&((p=new Map).set(t.catg,t.tkt),u.Tkts=p),e.abrupt("return",te.commitTx(u));case 36:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"storePendingTx",value:function(e){wa.set(U.b.txKeyPending(this.address,e.currency,e.hash),1),wa.set(e.hash,e)}},{key:"pendingTxList",value:function(e){var t=this;return new Promise((function(a,n){for(var r=wa.length(),o=[],s=0;s-1){var c=i.split(":")[3],l=wa.get(c);l.currency&&o.push(l)}}a(o)}))}},{key:"pendingTxInfo",value:function(e){return wa.get(e)}}]),e}();function Sa(){this._map={}}Sa.prototype.add=function(e,t){this._map[e]=t},Sa.prototype.get=function(e){return this._map[e]};var Pa=new oe,Oa=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).checkConfirming=function(){var e=Object(L.a)(a);a.props.form.validateFields((function(t,a){a.amount&&a.address&&e.setState({total:new ge.a(a.amount).toString(10)})}))},a.amountDecorator=a.props.form.getFieldDecorator("amount",{rules:[{required:!0}]}),a.addressDecorator=a.props.form.getFieldDecorator("address",{rules:[{required:!0}]}),a.state={confirming:!1,total:0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){if(this.props.address)if(Object(Ut.validPkr)(this.props.address)){(0,this.props.form.setFieldsValue)({address:this.props.address})}else _.a.fail(U.c.e().toast.error.invalidAddress,2)}},{key:"submit",value:function(){var e=this,t=this;t.setState({confirming:!0}),this.props.form.validateFields((function(a,n){if(!n.address)return _.a.fail(U.c.e().page.txTransfer.inputAddress,1.5),void t.setState({confirming:!1});if(!n.amount||0===parseFloat(n.amount))return _.a.fail(U.c.e().page.txTransfer.inputAmount,1.5),void t.setState({confirming:!1});if("SERO"===e.props.currency){if(1===new ge.a(n.amount).plus(new ge.a("0.00002500")).comparedTo(new ge.a(t.props.amount)))return _.a.fail(U.c.e().toast.error.notEnough,1.5),void t.setState({confirming:!1})}else(Pa=new oe).getCurrent().then((function(e){te.balanceOf(e.tk).then((function(e){e&&"object"===typeof e&&e.forEach((function(e,a){"SERO"===a&&(1===new ge.a("0.00002500").comparedTo(e)&&(_.a.fail(U.c.e().toast.error.notEnoughFee,1.5),t.setState({confirming:!1})),1===new ge.a(n.amount).comparedTo(new ge.a(t.props.amount))&&(_.a.fail(U.c.e().toast.error.notEnough,1.5),t.setState({confirming:!1})))}))}))}));if(!Object(Ut.validPkr)(n.address))return _.a.fail(U.c.e().toast.error.invalidAddress,1.5),void t.setState({confirming:!1});null==a&&M.a.prompt(U.c.e().page.txTransfer.inputPassword,U.c.e().page.txTransfer.passwordMsg,[{text:U.c.e().button.cancel,onPress:function(){t.setState({confirming:!1})}},{text:U.c.e().button.confirm,onPress:function(e){if(!e)return _.a.fail(U.c.e().page.txTransfer.inputPassword,1.5),void t.setState({confirming:!1});_.a.loading(U.c.e().toast.loading.sending,120);var a=new xa(t.props.pk),r={to:n.address,cy:t.props.cy,value:xe.a.mul(n.amount,t.props.cy,0),gas:25e3,gasPrice:1000000001};a.transfer(r,e).then((function(e){e&&(_.a.success(U.c.e().toast.success.send,2),setTimeout((function(){U.e.goPage(U.e.transferDetail(e),U.e.transferList(t.props.cy))}),1500))})).catch((function(e){"object"===typeof e&&(e=e.message),e.indexOf("wrong passphrase")>-1?_.a.fail(U.c.e().toast.error.passwordError,2):e.indexOf("no enough")>-1?_.a.fail(U.c.e().toast.error.notEnough,2):_.a.fail(e,3),t.setState({confirming:!1})}))}}],"secure-text",null,[U.c.e().page.txTransfer.inputPassword])}))}},{key:"render",value:function(){var e=this,t=this.props,a=t.cy,n=t.amount;return s.a.createElement("div",null,s.a.createElement("div",{className:"coin"},s.a.createElement(Ge.a,null,s.a.createElement("div",{className:"title"},s.a.createElement("div",{className:"left"},s.a.createElement("strong",null,a)),s.a.createElement("div",{className:"right"},n)),s.a.createElement("div",{className:"content"},this.amountDecorator(s.a.createElement(Ye.a,{placeholder:U.c.e().page.txTransfer.inputAmount,type:"money",name:"amount",moneyKeyboardAlign:"left",onBlur:this.checkConfirming,onChange:this.checkConfirming}))))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{className:"address"},s.a.createElement(Ge.a,null,s.a.createElement("div",{className:"title"},s.a.createElement("div",{className:"left"},U.c.e().page.txTransfer.address),s.a.createElement("div",{className:"right"})),s.a.createElement("div",{className:"content"},this.addressDecorator(s.a.createElement(Zt.a,{placeholder:U.c.e().page.txTransfer.inputAddress,rows:"4",name:"address",style:{fontSize:" 12px"},onBlur:this.checkConfirming,onChange:this.checkConfirming})),s.a.createElement(T.a,{type:"iconAddressbook-",className:"transfer-address",onClick:function(){U.e.goPage(U.e.addressSelect(a),U.e.transfer(a+(e.props.address?"/"+e.props.address:"")))}})))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{className:"fee"},s.a.createElement(Ge.a,null,s.a.createElement("div",{className:"title"},s.a.createElement("div",{className:"left"},U.c.e().page.txTransfer.fee," "),s.a.createElement("div",{className:"right",style:{textAlign:"right"}},s.a.createElement("span",{style:{fontSize:"14px"}},"0.00002500"," SERO"),s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"12px",color:"rgb(136, 136, 136)"}},"Gas(25000) * GasPrice(1Gta)"))))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{className:"fee"},s.a.createElement(Ge.a,null,s.a.createElement("div",{className:"title"},s.a.createElement("div",{className:"left"},U.c.e().page.txTransfer.total," "),s.a.createElement("div",{className:"right",style:{textAlign:"right"}},"SERO"===this.props.cy?s.a.createElement("div",null,s.a.createElement("span",{style:{fontSize:"14px",color:"#333",fontWeight:"bold"}},new ge.a(this.state.total).plus(new ge.a("0.00002500")).toString(10))," ",this.props.cy):s.a.createElement("div",null,s.a.createElement("span",{style:{fontSize:"14px",color:"#333",fontWeight:"bold"}},this.state.total)," ",this.props.cy,s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"14px",color:"#333",fontWeight:"bold"}},"+ ","0.00002500")," SERO"))))),s.a.createElement(v.a,null),s.a.createElement("div",{className:"btn-bottom"},s.a.createElement(K.a,{type:"primary",disabled:this.state.confirming,onClick:function(){e.submit()}},U.c.e().button.next)))}}]),t}(o.Component),Ba=Object(Xe.a)()(Oa),Ca=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={amount:0,currency:"SERO",current:"",detail:{}},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.init().then()}},{key:"init",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(t=this).props.match.params.currency,e.next=4,Pa.getCurrent();case 4:return n=e.sent,e.next=7,Pa.Detail(n.address);case 7:return r=e.sent,e.next=10,te.balanceOf(r.tk);case 10:(o=e.sent)&&"object"===typeof o&&o.forEach((function(e,n){n===a&&(e=xe.a.convert(e,a),t.setState({amount:e}))})),t.setState({currency:a,current:n,detail:r});case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.state,t=e.currency,a=e.detail,n=e.amount;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight}},s.a.createElement(x.a,{mode:"light",icon:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()},rightContent:s.a.createElement(T.a,{type:"iconscan",onClick:function(){U.e.goPage(U.e.scan("transfer",t),U.e.transfer(t))}})},U.c.e().button.transfer),s.a.createElement(Ba,{amount:n,tk:a.tk,cy:t,address:this.props.match.params.address}))}}]),t}(o.Component),Aa=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={prk:"",tips:"",name:"",act:{}},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.match.params.address,a=this.props.match.params.type;new oe(t).Detail(t).then((function(t){var n=t.currentPKr,r=U.c.e().modal.pkr;"mainPKr"===a&&(n=t.mainPKr,r=U.c.e().modal.mainPKr);var o=document.getElementById("qrImg");de.a.toCanvas(o,n,(function(e){e&&console.error(e)})),e.setState({pkr:n,tips:r,act:t})}))}},{key:"render",value:function(){var e=this;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight,background:"#353c4b"}},s.a.createElement(x.a,{mode:"light",icon:s.a.createElement(T.a,{type:"left",style:{color:"#f7f7f7"}}),onLeftClick:function(){U.e.goBack()},style:{backgroundColor:"unset"}},s.a.createElement("span",{style:{color:"#f7f7f7"}},"pkr"===this.props.match.params.type?U.c.e().page.wallet.PKr:U.c.e().page.wallet.mainPKr)),s.a.createElement("div",{className:"transfer-receive-border"},s.a.createElement("div",{className:"transfer-receive-icon"},s.a.createElement(T.a,{type:this.state.act.avatar,style:{width:"40px",height:"40px"}})),s.a.createElement("div",{className:"transfer-receive-header"},s.a.createElement("strong",null,this.state.act.name),s.a.createElement("br",null),s.a.createElement("div",{className:"transfer-receive-header-hash",onClick:function(){me()(e.state.pkr),_.a.success(U.c.e().toast.success.copy,1)}},this.state.pkr,s.a.createElement(T.a,{type:"iconcopy",style:{width:"14px",height:"14px"}}))),s.a.createElement("div",{className:"transfer-receive-body",style:{height:.6*document.documentElement.clientHeight}},s.a.createElement("canvas",{id:"qrImg"}),s.a.createElement("br",null),s.a.createElement("p",{style:{color:"#dfab14"}},this.state.tips))))}}]),t}(o.Component),Ta=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).clearData=function(){try{_.a.loading("Clearing..."),te.clearData("").then((function(e){_.a.success(U.c.e().toast.success.clear,2),setTimeout((function(){M.a.alert(U.c.e().modal.clearData,U.c.e().modal.clearTip,[{text:U.c.e().button.confirm,onPress:function(){window.location.href="./index.html#/"}}])}),2e3)})).catch((function(e){_.a.success(U.c.e().toast.error.clearData,3),console.log(e)}))}catch(e){_.a.success(U.c.e().toast.error.clearData,3),console.log("clear Data:",e.message)}},a.state={network:[],showNetwork:!1},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){U.a.init(),this.setState({network:[{id:"2",network:"main",name:U.c.e().page.setting.enNode,rpc:"https://f-sero-light-node.ririniannian.com"},{id:"1",network:"main",name:U.c.e().page.setting.cnNode,rpc:"https://sero-light-node.ririniannian.com"}]})}},{key:"setRpc",value:function(e,t){e&&(U.a.setRpc(e,t),te.init()),this.setState({showNetwork:!1})}},{key:"actionSheet",value:function(e){var t=[];e.forEach((function(e){t.push({text:e.url,onPress:function(){window.location.href=e.url+"#/"}})})),M.a.operation(t)}},{key:"render",value:function(){var e=this,t=this.state.network;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()}},U.c.e().page.my.settings)),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement(v.a,{size:"lg"}),s.a.createElement(z.a,null,s.a.createElement(Ge.a,{size:"lg"},s.a.createElement(z.a.Item,{extra:s.a.createElement("span",{style:{fontSize:"14px"}},U.c.e().value),arrow:"horizontal",onClick:function(){M.a.operation([{text:U.c.en_US.value,onPress:function(){U.a.setLanguage(U.c.en_US.key),U.e.goPage(U.e.Settings+"?"+new Date)}},{text:U.c.zh_CN.value,onPress:function(){U.a.setLanguage(U.c.zh_CN.key),U.e.goPage(U.e.Settings+"?"+new Date)}},{text:U.c.ja_JP.value,onPress:function(){U.a.setLanguage(U.c.ja_JP.key),U.e.goPage(U.e.Settings+"?"+new Date)}},{text:U.c.be_BY.value,onPress:function(){U.a.setLanguage(U.c.be_BY.key),U.e.goPage(U.e.Settings+"?"+new Date)}},{text:U.c.ko_KR.value,onPress:function(){U.a.setLanguage(U.c.ko_KR.key),U.e.goPage(U.e.Settings+"?"+new Date)}}])}},s.a.createElement("span",null,U.c.e().page.setting.language)),s.a.createElement(z.a.Item,{extra:s.a.createElement("span",{style:{fontSize:"14px"}},U.a.seroRpcName()),arrow:"horizontal",onClick:function(){e.setState({showNetwork:!0})}},s.a.createElement("span",null,U.c.e().page.setting.node)),s.a.createElement(z.a.Item,{arrow:"horizontal",onClick:function(){U.e.goPage(U.e.HistoryPKr,U.e.Settings)}},s.a.createElement("span",null,U.c.e().page.setting.pkr)))),s.a.createElement(M.a,{popup:!0,visible:this.state.showNetwork,onClose:function(){e.setState({showNetwork:!1})},animationType:"slide-up"},s.a.createElement(z.a,{renderHeader:function(){return s.a.createElement("div",null,U.c.e().page.setting.node)},className:"popup-list"},t.map((function(t,a){return s.a.createElement(Ge.a,null,s.a.createElement(z.a.Item,{key:a,onClick:function(){e.setRpc(t.rpc,t.name)}},t.name))})),s.a.createElement(z.a.Item,null,s.a.createElement(Ye.a,{placeholder:"http://",id:"customer"}),s.a.createElement("div",{style:{marginTop:"15px"}},s.a.createElement(K.a,{type:"primary",onClick:function(){var t=document.getElementById("customer").value;e.setRpc(t)}},s.a.createElement("span",{style:{color:"#fff"}},U.c.e().button.confirm))))))))}}]),t}(o.Component),Na=(a(806),a(388)),Ka=a.n(Na),Da=a(182),Ma=a.n(Da),Ia=a(103),ja=a(27),Ra=a.n(ja),_a=new Ma.a,Fa=new xa,La=new oe;new RegExp("\\biPhone\\b|\\biPod\\b","i").test(window.navigator.userAgent);var Ha,za={method:{init:"init",accountDetail:"accountDetail",accountList:"accountList",executeContract:"executeContract",call:"call",estimateGas:"estimateGas",getInfo:"getInfo",pkrCrypto:"pkrCrypto",pkrEncrypt:"pkrEncrypt",pkrDecrypt:"pkrDecrypt",goPage:"goPage"}},Va={barColor:"#f7f7f7",barMode:"light",navColor:"#F7F7F7",navMode:"dark",navTitle:"Browser"},Wa=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).setPassword=function(e){a.setState({password:e})},a.initTile=function(){var e=Object(L.a)(a);window.addEventListener("message",a.receiveMessage,{passive:!0}),-1===a.props.match.params.url.indexOf("http")?setTimeout((function(){var e=document.getElementById("ifrModel");e&&(Va.navTitle=e.contentWindow.document.title)}),200):e.setState({navTitle:"Browser"})},a.initDApp=function(e){return e&&"success"!==e&&(Va.navTitle=e.name,e.name&&e.contractAddress&&e.github&&e.author&&e.url&&e.logo&&(e.url&&-1===e.url.indexOf("http")&&(e.url="http://"+e.url,e.logo="http://"+e.logo),a.storageDapp(e)),e.navMode&&e.navColor&&e.barMode&&e.barColor&&(Va.barColor=e.barColor,Va.barMode=e.barMode,Va.navMode=e.navMode,Va.navColor=e.navColor)),console.log("browserData>>",e,Va),"success"},a.getInfo=function(){return new Promise((function(e,t){var a={};a.language=U.c.e().key,a.rpc=U.a.seroRpc();try{plus&&plus.device?(a.uuid=plus.device.uuid,e(a)):e(a)}catch(n){console.log("getInfo fail:",n.message),e(a)}}))},a.call=function(e,t){try{var a=_a.sero.call(e,"latest");return t.data=a,t}catch(n){return t.data="0x",t.error=n.message,t}},a.estimateGas=function(e,t){try{var a=_a.sero.estimateGas(e);return t.data=a,t}catch(n){return t.data="0x0",t.error=n.message,console.error(n),t}},a.executeContract=function(e,t){try{if(!e)return;e&&!e.cy&&(e.cy="SERO"),e&&!e.gas&&(e.gas="0x"+new ge.a("4700000").toString(16)),e&&!e.gasPrice&&(e.gasPrice="0x"+new ge.a("1000000000").toString(16)),e&&!e.value&&(e.value="0x0"),a.setState({txInfo:s.a.createElement(z.a,null,s.a.createElement(z.a.Item,{extra:s.a.createElement("span",null,e.from)},U.c.e().page.txDetail.from),s.a.createElement(z.a.Item,{extra:s.a.createElement("span",null,xe.a.convert(e.value,e.cy).toString(10)," ",e.cy)},U.c.e().page.txDetail.amount),s.a.createElement(z.a.Item,{extra:s.a.createElement("span",null,e.data)},"Data"),s.a.createElement(z.a.Item,{extra:s.a.createElement("div",null,xe.a.convert(new ge.a(e.gas).multipliedBy(new ge.a(e.gasPrice)),"SERO").toString(10),s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"12px",color:"#ddd"}},new ge.a(e.gas).toString(10),"(Gas) * ",new ge.a(e.gasPrice).dividedBy(new ge.a(10).pow(9)).toString(10),"(Gta)"),s.a.createElement("br",null))},U.c.e().page.txDetail.fee),s.a.createElement(z.a.Item,null,s.a.createElement("div",{style:{width:"100%",float:"left",display:"flex"}},s.a.createElement("div",{style:{width:"25%",marginRight:"15px"}},s.a.createElement(K.a,{onClick:function(){a.setState({showTxInfo:!1}),t("")}},U.c.e().button.cancel)),s.a.createElement("div",{style:{width:"70%"}},s.a.createElement(K.a,{type:"primary",onClick:function(){a.submit(e,t)}},U.c.e().button.confirm)))))}),a.setState({showTxInfo:!0})}catch(n){_.a.fail(n.message,3),t("")}},a.submit=function(e,t){try{M.a.prompt(U.c.e().button.transfer,s.a.createElement("div",null),[{text:U.c.e().button.cancel,onPress:function(){console.log("cancel"),t("")}},{text:U.c.e().button.confirm,onPress:function(a){if(a)try{_.a.loading(U.c.e().toast.loading.sending,60),Fa.transfer(e,a).then((function(e){_.a.success(U.c.e().toast.success.send,2),t(e)})).catch((function(e){var a="string"===typeof e?e:e.message;a?a.indexOf("wrong passphrase")>-1?(_.a.fail(U.c.e().toast.error.passwordError,2),t("")):(_.a.fail(a,3),t("")):_.a.fail(JSON.stringify(e),3)}))}catch(n){_.a.fail(n.message),t("")}else _.a.fail(U.c.e().page.txTransfer.inputPassword)}}],"secure-text",null,[U.c.e().page.txTransfer.inputPassword]),a.setState({showTxInfo:!1})}catch(n){_.a.fail(n.message,3)}},a.storageDapp=function(e){try{var t=U.d.get(U.b.dapp.list);if(t&&0!==t.length){var a=[],n=!1,r=!0,o=!1,s=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done);r=!0){if(i.value===e.contractAddress){n=!0;break}}}catch(l){o=!0,s=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw s}}n||a.push(e.contractAddress),U.d.set(U.b.dapp.list,a.concat(t))}else t=[e.contractAddress],U.d.set(U.b.dapp.list,t);U.d.set(U.b.dappsInfoKey(e.contractAddress),e)}catch(u){_.a.fail(u.message,3)}},a.receiveMessage=function(e){var t=Object(L.a)(a);if(void 0!==e&&e.data){var n=e.data;console.log("popup receive msg: ",n),n.method?n.method===za.method.init?(n.data=t.initDApp(n.data),t.sendMessage(n)):n.method===za.method.accountDetail?t.getAccountDetail(n.data,n).then((function(e){t.sendMessage(e)})):n.method===za.method.accountList?t.getAccountList(n).then((function(e){t.sendMessage(e)})):n.method===za.method.executeContract?t.executeContract(n.data.tx,(function(e){if(e)n.data=e;else{var a=document.getElementsByClassName("h5-iframe");a&&a.length>0&&a[0].focus(),n.data="",n.error="Operation cancel"}t.sendMessage(n)})):n.method===za.method.call?t.sendMessage(t.call(n.data,n)):n.method===za.method.estimateGas?t.sendMessage(t.estimateGas(n.data,n)):n.method===za.method.getInfo?t.getInfo().then((function(e){n.data=e,t.sendMessage(n)})).catch((function(e){n.error=e,t.sendMessage(n)})):n.method===za.method.pkrCrypto?t.pkrCrypto(n.data).then((function(e){n.data=e,t.sendMessage(n)})).catch((function(e){n.error="string"===typeof e?e:e.message,t.sendMessage(n)})):n.method===za.method.pkrEncrypt?t.pkrEncrypt(n.data).then((function(e){n.data=e,t.sendMessage(n)})).catch((function(e){n.error="string"===typeof e?e:e.message,t.sendMessage(n)})):n.method===za.method.pkrDecrypt?t.pkrDecrypt(n.data).then((function(e){n.data=e,t.sendMessage(n)})).catch((function(e){n.error="string"===typeof e?e:e.message,t.sendMessage(n)})):n.method===za.method.goPage?t.goPage(n.data):t.sendMessage("operation method is invalid !"):t.sendMessage("operation method is required !")}},a.sendMessage=function(e){var t=document.getElementById("ifrModel");t&&t.contentWindow.postMessage(e,"*")},a.dataList=[{method:"share",icon:s.a.createElement(T.a,{type:"iconshare"}),title:U.c.e().button.share},{method:"copy",icon:s.a.createElement(T.a,{type:"iconcopy"}),title:U.c.e().button.copyLink},{method:"fresh",icon:s.a.createElement(T.a,{type:"iconrefresh"}),title:U.c.e().button.refresh}],a.share=function(e){plus&&plus.share&&plus.share.sendWithSystem({type:"text",content:a.state.navTitle,href:e},(function(){console.log("\u5206\u4eab\u6210\u529f")}),(function(e){console.log("\u5206\u4eab\u5931\u8d25\uff1a"+JSON.stringify(e))}))},a.copyLink=function(e){me()(e),_.a.success(U.c.e().toast.success.copy,1)},a.refresh=function(e){document.getElementById("ifrModel").src=e},a.showActionSheet=function(){var e=Object(L.a)(a),t=a.dataList;plus&&plus.share||(t=a.dataList.slice(1)),Ka.a.showShareActionSheetWithOptions({options:t},(function(a){if(t&&t[a])switch(t[a].method){case"share":e.share(e.state.url);break;case"copy":e.copyLink(e.state.url);break;case"fresh":e.refresh(e.state.url)}}))},a.state={url:"",hasListener:!1,navTitle:"Browser",password:"",showTxInfo:!1,txInfo:"",barColor:"#f7f7f7",barMode:"light"},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){var e=this.props.match.params.url;e=decodeURIComponent(e),this.setState({url:e})}},{key:"componentDidMount",value:function(){var e=this;Va={barColor:"#f7f7f7",barMode:"light",navColor:"#F7F7F7",navMode:"dark",navTitle:"Browser"},this.initTile(),_a.setProvider(new _a.providers.HttpProvider(U.a.seroRpc()));var t=window.sessionStorage.getItem("browserData");t&&clearInterval(t),t=setInterval((function(){plus&&plus.navigator&&(plus.navigator.setStatusBarBackground(Va.navColor),plus.navigator.setStatusBarStyle(Va.navMode)),e.setState({barColor:Va.barColor,barMode:Va.barMode,navTitle:Va.navTitle})}),200),window.sessionStorage.setItem("browserData",t)}},{key:"getAccountList",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o,s,i,c,l,u,p,d,f;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a=U.d.get(U.b.account.addresses),n=[],!a){e.next=41;break}return e.next=6,La.getCurrent();case 6:r=e.sent,o=!0,s=!1,i=void 0,e.prev=10,c=a[Symbol.iterator]();case 12:if(o=(l=c.next()).done){e.next=27;break}return u=l.value,e.next=16,La.Detail(u);case 16:return p=e.sent,e.next=19,te.balanceOf(p.tk);case 19:return d=e.sent,e.next=22,te.ticketsOf(p.tk);case 22:f=e.sent,n.push({Name:p.name,PK:p.address,MainPKr:p.mainPKr,Balance:d,Tickets:f,IsCurrent:u===r.address});case 24:o=!0,e.next=12;break;case 27:e.next=33;break;case 29:e.prev=29,e.t0=e.catch(10),s=!0,i=e.t0;case 33:e.prev=33,e.prev=34,o||null==c.return||c.return();case 36:if(e.prev=36,!s){e.next=39;break}throw i;case 39:return e.finish(36);case 40:return e.finish(33);case 41:return t.data=n,e.abrupt("return",t);case 45:return e.prev=45,e.t1=e.catch(0),t.data=null,t.error=e.t1.message,e.abrupt("return",t);case 50:case"end":return e.stop()}}),e,null,[[0,45],[10,29,33,41],[34,,36,40]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getAccountDetail",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t){e.next=13;break}return e.next=4,La.Detail(t);case 4:return n=e.sent,e.next=7,te.balanceOf(n.tk);case 7:return r=e.sent,e.next=10,te.ticketsOf(n.tk);case 10:return o=e.sent,a.data={Name:n.name,PK:n.address,MainPKr:n.mainPKr,Balance:r,Tickets:o},e.abrupt("return",a);case 13:e.next=20;break;case 15:return e.prev=15,e.t0=e.catch(0),a.data=null,a.error=e.t0.message,e.abrupt("return",a);case 20:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t,a){return e.apply(this,arguments)}}()},{key:"pkrCrypto",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,La.Detail(t.pk);case 2:if(a=e.sent,Object(ja.isNewVersion)(Ra.a.toBuffer(a.tk))){e.next=8;break}return e.abrupt("return",new Promise((function(e,t){t("Only support v2 account")})));case 8:return n=Object(Ia.pkrCrypte)(t.data,a.mainPKr,a.tk,t.pkr),e.abrupt("return",Object(ja.toString)(n));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"pkrEncrypt",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Object(Ia.pkrEncrypt)(t.data,t.pkr),e.abrupt("return",Object(ja.toString)(a));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"pkrDecrypt",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,La.Detail(t.pk);case 2:if(a=e.sent,Object(ja.isNewVersion)(Ra.a.toBuffer(a.tk))){e.next=8;break}return e.abrupt("return",new Promise((function(e,t){t("Only support v2 account")})));case 8:return n=Object(Ia.pkrDecrypt)(t.data,a.mainPKr,a.tk),e.abrupt("return",Object(ja.toString)(n));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"goPage",value:function(e){e&&e.indexOf("scan/")?plus&&plus.barcode&&U.e.goPage(e):U.e.goPage(e)}},{key:"render",value:function(){var e=this,t=this.state,a=t.barMode,n=t.barColor;return s.a.createElement("div",null,s.a.createElement(x.a,{mode:a,style:{background:"light"===a?"":n},leftContent:s.a.createElement(T.a,{type:"left",style:{color:"light"===a?"":"#fff"}}),rightContent:s.a.createElement("div",{className:"browser-right",style:{background:"light"===a?"#fff":"none"}},s.a.createElement("div",null,s.a.createElement(T.a,{type:"ellipsis",size:"md",onClick:this.showActionSheet})),s.a.createElement("div",{className:"ant-divider ant-divider-vertical ant-divider-dashed"}),s.a.createElement("div",null,s.a.createElement(T.a,{type:"cross",size:"md",onClick:function(){window.removeEventListener("message",e.receiveMessage,!1),U.e.goBack(),plus&&plus.navigator&&(plus.navigator.setStatusBarBackground("#F7F7F7"),plus.navigator.setStatusBarStyle("dark")),Va={barColor:"#f7f7f7",barMode:"light",navColor:"#F7F7F7",navMode:"dark",navTitle:"Browser"}}}))),className:"layout-top",onLeftClick:function(){history.back()}},this.state.navTitle),s.a.createElement("iframe",{className:"h5-iframe",style:{width:"100%",height:this.state.iFrameHeight,overflow:"visible",marginTop:"45px"},onLoad:function(){e.setState({iFrameHeight:document.documentElement.clientHeight-45})},id:"ifrModel",ref:"iframe",src:this.state.url,width:"100%",height:this.state.iFrameHeight,frameBorder:"no",border:"0"}),s.a.createElement(M.a,{popup:!0,maskClosable:!0,visible:this.state.showTxInfo,animationType:"slide-up"},this.state.txInfo))}}]),t}(o.Component),qa=new q,Za=new xa,Ua=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={txInfo:{}},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this.props.match.params.hash,t=Za.pendingTxInfo(e);this.setState({txInfo:t})}},{key:"render",value:function(){var e=this,t=this.state.txInfo;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight},className:"transfer-detail-bg"},s.a.createElement(x.a,{icon:s.a.createElement(T.a,{type:"left",style:{color:"#f7f7f7"}}),onLeftClick:function(){U.e.goBack(U.e.transferList(t.currency))},style:{backgroundColor:"unset"}},"SERO"),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(Ge.a,null,s.a.createElement("div",{className:"transfer-detail",style:{height:.8*document.documentElement.clientHeight}},s.a.createElement("div",{className:"transfer-detail-indiv0"},s.a.createElement(T.a,{type:"icondengdaichuli",style:{width:"50px",height:"50px",marginTop:"5px"}}),s.a.createElement("h3",null,U.c.e().page.txDetail.pending),s.a.createElement("span",{className:"transfer-detail-indiv0-span"},new Date(1e3*t.time).toLocaleString())),s.a.createElement("div",{className:"transfer-detail-indiv1"},s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.amount,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",null,t.value," ",t.currency))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.fee,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",null,s.a.createElement("span",null,t.fee," SERO"),s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"10px",color:"#888"}},"=Gas(",t.gas,") * GasPrice(",new ge.a(t.gasPrice).dividedBy(new ge.a(10).pow(9)).toString(10)," Gta)")))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.from,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",{style:{overflowWrap:"break-word",fontSize:"12px"},onClick:function(){me()(t.from),_.a.success("Copy Successfully",1)}},t.from,s.a.createElement(T.a,{type:"iconcopy",className:"transfer-detail-copy-icon"})))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.to,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",null,s.a.createElement("div",{style:{overflowWrap:"break-word",fontSize:"12px"},onClick:function(){me()(t.to),_.a.success("Copy Successfully",1)}},t.to,s.a.createElement(T.a,{type:"iconcopy",className:"transfer-detail-copy-icon"})))))),s.a.createElement("div",null,s.a.createElement(Ge.a,null,s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.hash,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",{onClick:function(){me()(e.props.match.params.hash),_.a.success("Copy Successfully",1)}},qa.ellipsisHash(this.props.match.params.hash),s.a.createElement(T.a,{type:"iconcopy",className:"transfer-detail-copy-icon"})))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.block,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",null,t.block))))))),s.a.createElement("p",{className:"transfer-detail-p"},s.a.createElement("a",{onClick:function(){U.e.goPage(U.e.browser("https://explorer.sero.cash/txsInfo.html?hash=".concat(t.hash)),U.e.Home)},style:{color:"#108ee9"}},U.c.e().page.txDetail.goto)))}}]),t}(o.Component),Ga=new oe,Qa=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).checkConfirming=function(){a.props.form.validateFields((function(e,t){t.name&&t.word&&t.password&&t.repassword?a.setState({checkConfirming:!1}):a.setState({checkConfirming:!0})}))},a.state={checkConfirming:!0,tipsShow:"none"},a.nameDecorator=a.props.form.getFieldDecorator("name",{rules:[{required:!0}]}),a.wordDecorator=a.props.form.getFieldDecorator("word",{rules:[{required:!0}]}),a.passwordDecorator=a.props.form.getFieldDecorator("password",{rules:[{required:!0}]}),a.repasswordDecorator=a.props.form.getFieldDecorator("repassword",{rules:[{required:!0}]}),a.hindDecorator=a.props.form.getFieldDecorator("hint",{rules:[{required:!1}]}),a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"import",value:function(){var e=this;e.setState({checkConfirming:!0}),this.props.form.validateFields((function(t,a){if(null==t){if(a.password.length<8||a.repassword.length<8)return _.a.fail(U.c.e().toast.error.passwordVerify,1.5),void e.setState({checkConfirming:!1});if(a.password!==a.repassword)_.a.fail(U.c.e().toast.error.passwordNotMatch,1.5),e.setState({checkConfirming:!1});else{for(var n=a.word,r=(n=n.trim()).split(" "),o=[],s=0;s10&&(c=n-10);for(var l=n;l>c;l--){var u=ln.a.createPkrHash(t.tk,l,o);i.push(s.a.createElement(pn,{extra:l},s.a.createElement("span",{style:{fontSize:"14px"}},Z.ellipsisAddress(u))))}e.setState({pkrs:i,currentBlock:r})}))}))}))},a.state={current:{},pkrs:[],currentBlock:0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this;_.a.loading("loading..."),setTimeout((function(){e.loadData()}),300);var t=document.getElementById("log");console.log=function(e){if(e.indexOf("span")>-1){t.innerHTML="
".concat((new Date).toLocaleTimeString(),"").concat(e,"
")+t.innerHTML;var a=t.childNodes;if(a.length>100)for(var n=100;n-1?_.a.fail(U.c.e().toast.error.passwordError,2):_.a.fail(e,3)}))}catch(i){_.a.fail(i.message)}else _.a.fail(U.c.e().page.txTransfer.inputPassword)},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.init()}},{key:"init",value:function(){this.initPayInfo();var e=sessionStorage.getItem("thirdPayInterId");e&&clearInterval(e),e=setInterval((function(){try{plus&&plus.nativeUI&&plus.nativeUI.closeWaiting()}catch(e){}}),1e3),sessionStorage.setItem("thirdPayInterId",e)}},{key:"componentDidUpdate",value:function(e,t,a){this.initPayInfo()}},{key:"initPayInfo",value:function(){var e=this,t=U.d.get("seropay:info");t&&"thirdpay"===t.type&&(e.getAccount(t).then((function(){})).catch((function(t){e.setState({valid:"string"===typeof t?t:t.message})})),e.setState({cachePayInfo:t}),U.d.delete("seropay:info"))}},{key:"getAccount",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o,s,i,c,l,u,p,d;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this,e.next=3,fn.Details();case 3:return n=e.sent,e.next=6,fn.getCurrent();case 6:return r=e.sent,e.next=9,fn.Detail(r.address);case 9:if(o=e.sent,!t){e.next=47;break}if(!t.from){e.next=46;break}s=!1,i=!0,c=!1,l=void 0,e.prev=16,u=n[Symbol.iterator]();case 18:if(i=(p=u.next()).done){e.next=29;break}if((d=p.value).mainPKr!==t.from){e.next=26;break}return e.next=23,fn.Detail(d.address);case 23:o=e.sent,n=[o],s=!0;case 26:i=!0,e.next=18;break;case 29:e.next=35;break;case 31:e.prev=31,e.t0=e.catch(16),c=!0,l=e.t0;case 35:e.prev=35,e.prev=36,i||null==u.return||u.return();case 38:if(e.prev=38,!c){e.next=41;break}throw l;case 41:return e.finish(38);case 42:return e.finish(35);case 43:s?a.setState({accountDetail:o,accountList:n}):a.setState({valid:"Account[".concat(t.from,"] not Exist! "),accountDetail:{},accountList:[]}),e.next=47;break;case 46:a.setState({accountDetail:o,accountList:n});case 47:case"end":return e.stop()}}),e,this,[[16,31,35,43],[36,,38,42]])})));return function(t){return e.apply(this,arguments)}}()},{key:"switchAccount",value:function(e){this.setState({showAccount:e})}},{key:"selectAccount",value:function(e){this.setState({accountDetail:e,showAccount:!1})}},{key:"callbackApp",value:function(e,t){if(e){var a={hash:t};setTimeout((function(){U.e.goPage(U.e.payResult(t))}),1500),setTimeout((function(){if(plus&&plus.os)if("Android"===plus.os.name)plus.runtime.launchApplication({pname:e.pname,newTask:!1,extra:a},(function(e){_.a.fail("Can not open launcher",3)}));else if("iOS"===plus.os.name){var t=function(e){for(var t=Object.keys(e),a=[],n=0;n-1?t(U.c.e().toast.error.passwordError):t(e)}))}},this.receiveMessage=function(e){var a=t;if(void 0!==e&&e.data){var n=e.data;console.log("popup receive msg: ",n),n.method?n.method===On.method.init?(n.data="SUCCESS",a.sendMessage(n)):n.method===On.method.accountDetail?a.getAccountDetail(n.data,n).then((function(e){a.sendMessage(e)})):n.method===On.method.accountList?a.getAccountList(n).then((function(e){a.sendMessage(e)})):n.method===On.method.executeContract?a.executeContract(n.data.tx,(function(e){if(e)n.data=e;else{var t=document.getElementsByClassName("h5-iframe");t&&t.length>0&&t[0].focus(),n.data="",n.error="Operation cancel"}a.sendMessage(n)})):n.method===On.method.call?a.sendMessage(a.call(n.data,n)):n.method===On.method.estimateGas?a.sendMessage(a.estimateGas(n.data,n)):n.method===On.method.getInfo?(n.data=a.getInfo(),a.sendMessage(n)):a.sendMessage("operation method is invalid !"):a.sendMessage("operation method is required !")}},this.sendMessage=function(e){!function(e){console.log("embed send msg >>>> ",e),parent.postMessage(e,"*")}(e)},xn.setProvider(new xn.providers.HttpProvider(U.a.seroRpc()))}return Object(u.a)(e,[{key:"getAccountList",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o,s,i,c,l,u,p;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a=U.d.get(U.b.account.addresses),n=[],!a){e.next=35;break}r=!0,o=!1,s=void 0,e.prev=7,i=a[Symbol.iterator]();case 9:if(r=(c=i.next()).done){e.next=21;break}return l=c.value,e.next=13,Pn.Detail(l);case 13:return u=e.sent,e.next=16,te.balanceOf(u.tk);case 16:p=e.sent,n.push({Name:u.name,PK:u.address,MainPKr:u.mainPKr,Balance:p});case 18:r=!0,e.next=9;break;case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(7),o=!0,s=e.t0;case 27:e.prev=27,e.prev=28,r||null==i.return||i.return();case 30:if(e.prev=30,!o){e.next=33;break}throw s;case 33:return e.finish(30);case 34:return e.finish(27);case 35:return t.data=n,e.abrupt("return",t);case 39:return e.prev=39,e.t1=e.catch(0),t.data=null,t.error=e.t1.message,e.abrupt("return",t);case 44:case"end":return e.stop()}}),e,null,[[0,39],[7,23,27,35],[28,,30,34]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getAccountDetail",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n,r;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t){e.next=10;break}return e.next=4,Pn.Detail(t);case 4:return n=e.sent,e.next=7,te.balanceOf(n.tk);case 7:return r=e.sent,a.data={Name:n.name,PK:n.address,MainPKr:n.mainPKr,Balance:r},e.abrupt("return",a);case 10:e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(0),a.data=null,a.error=e.t0.message,e.abrupt("return",a);case 17:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(t,a){return e.apply(this,arguments)}}()}]),e}();function Cn(){window.hasSet||(window.hasSet=new Map);var e=new oe;e.List().then((function(t){var a=!0,n=!1,r=void 0;try{for(var o,s=t[Symbol.iterator]();!(a=(o=s.next()).done);a=!0){var i=o.value;window.hasSet.get(i.address)||(e=new oe(i.address),te.initAccount(i.tk),window.hasSet.set(i.address,!0),console.log("init account success, address: ",i.address,e.Keystore().version))}}catch(c){n=!0,r=c}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}}))}window.hasSet=new Map,document.onvisibilitychange=function(){"visible"===document.visibilityState&&te.init()};var An=a(392),Tn=a.n(An);a(878);c.a.render(s.a.createElement(r.a,{locale:Tn.a},s.a.createElement(wn,null)),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})),te.init(),console.log("init worker success"),Cn(),setInterval((function(){Cn()}),1e4),function(){if(window.frames.length!==parent.frames.length){var e=new Bn;window.addEventListener("message",e.receiveMessage,{passive:!0})}}(),console.log=function(e){},console.debug=function(e){},console.info=function(e){},console.warn=function(e){},console.trace=function(e){},Y.init(),setTimeout((function(){U.a.init()}),1e3),sessionStorage.clear()},89:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(567);t.blake2b=function(t,a){var r=e.alloc(16,0);r.fill(t,0,t.length);var o=n(32,null,null,r).update(a).digest("binary");return e.from(o)}}).call(this,a(23).Buffer)},90:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(310),r=a(570),o=a(27),s=a(39);t.accountBase=new n.Group("$SROKEYSGEN",1,256,4),t.crBase=new n.Group("SZK$ASSET$CR",1,256,4),t.rootBase=new n.Group("SZK$ROOTCM",10,128,4),t.genTknBase=function(t){t=o.toBuffer(t),s(32==t.length);var a=e.alloc(64,0);a.set(t,0);var n=r.findPoint("SZK$TKN",a);if(!n)throw new Error("find point error");return n},t.genTktBase=function(t,a){t=o.toBuffer(t),a=o.toBuffer(a),s(32==t.length),s(32==a.length);var n=e.concat([t,a]),i=r.findPoint("SZK$TKT",n);if(!i)throw new Error("find point error");return i}}).call(this,a(23).Buffer)}},[[394,1,2]]]); \ No newline at end of file +(window.webpackJsonppopup=window.webpackJsonppopup||[]).push([[0],{1:function(e,t,a){"use strict";var n=a(15),r=a.n(n),o=a(13),s=a(14),i=a(57),c=function(){function e(){Object(o.a)(this,e),this.Home="/",this.AccountCreate1="/account/create1",this.AccountCreate2="/account/create2",this.AccountCreate3="/account/create3",this.AccountCreate4="/account/create4",this.ImportAccount="/account/import",this.Personal="/my",this.Stake="/stake",this.DApp="/dapp",this.WalletManager="/walletManage",this.AddressAdd="/address/add",this.AddressDetail="/",this.AddressList="/address",this.AddressSelect="/addressSelect",this.TransferList="/",this.Receive="/receive",this.Settings="/settings",this.About="/about",this.HistoryPKr="/manage/historyPKr",this.Embed="/embed",this.ThirdPay="/thirdpay",this.PayResult="/thirdpay/result/"}return Object(s.a)(e,[{key:"manage",value:function(e){return"/manage/"+e}},{key:"manageName",value:function(e){return"/manage/name/"+e}},{key:"addressDetail",value:function(e){return"/address/detail/"+e}},{key:"addressEdit",value:function(e){return"/address/edit/"+e}},{key:"transferList",value:function(e){return"/transfer/list/"+e}},{key:"transferDetail",value:function(e){if("0x0000000000000000000000000000000000000000000000000000000000000001"!==e&&"0x0000000000000000000000000000000000000000000000000000000000000002"!==e&&"0x0000000000000000000000000000000000000000000000000000000000000003"!==e)return"/transfer/detail/"+e}},{key:"transfer",value:function(e){return"/transfer/"+e}},{key:"transferResult",value:function(e){return"/transfer/result/"+e}},{key:"receive",value:function(e,t){return"/receive/"+t+"/"+e}},{key:"browser",value:function(e){return"/browser/"+encodeURIComponent(e)}},{key:"addressSelect",value:function(e){return"/addressSelect/"+e}},{key:"payResult",value:function(e){return this.PayResult+e}},{key:"scan",value:function(e,t){return t?"/scan/"+e+"/"+t:"/scan/"+e}},{key:"goPage",value:function(e,t){if(t){var a=JSON.parse(sessionStorage.getItem("backUrl"));a&&a.length>0?a.push(t):(a=new Array).push(t),sessionStorage.setItem("backUrl",JSON.stringify(a))}e!==this.Home&&e!==this.Personal&&e!==this.DApp&&e!==this.Stake||sessionStorage.setItem("backUrl",JSON.stringify([])),Object(i.b)().push(e)}},{key:"goBack",value:function(){var e=JSON.parse(sessionStorage.getItem("backUrl"));if(e&&e.length>0){var t=e.pop();sessionStorage.setItem("backUrl",JSON.stringify(e)),Object(i.b)().push(t)}else Object(i.b)().push(this.Home)}}]),e}(),l=function(){function e(){Object(o.a)(this,e),this.isZH=function(){return-8===(new Date).getTimezoneOffset()/60},this.setting={moneyType:{usd:"USD",cny:"CNY"},language:{zh_CN:"\u7b80\u4f53\u4e2d\u6587",en_US:"English"},network:{}},this.host={host:"http://popup.sero.cash/#/",rpc:"https://sero-light-node.ririniannian.com",price:""},this.moneyType="USD",this.language="en_US"}return Object(s.a)(e,[{key:"init",value:function(){var e=f.get(m.settings.moneyType);e&&(this.moneyType=e);var t=f.get(m.settings.language);t?this.language=t:-8===(new Date).getTimezoneOffset()/60?(f.set(m.settings.language,"zh_CN"),this.language="zh_CN"):(f.set(m.settings.language,"en_US"),this.language="en_US");var a=f.get(m.settings.seroRpcHost);a?this.isZH()?a.indexOf("f-sero-light-node")?(f.set(m.settings.seroRpcName,v.e().page.setting.cnNode),f.set(m.settings.seroRpcHost,"https://sero-light-node.ririniannian.com"),this.host.rpc="https://sero-light-node.ririniannian.com"):this.host.rpc=a:this.host.rpc="https://f-sero-light-node.ririniannian.com":this.isZH()?this.host.rpc="https://sero-light-node.ririniannian.com":this.host.rpc="https://f-sero-light-node.ririniannian.com"}},{key:"seroRpc",value:function(){var e=f.get(m.settings.seroRpcHost);return e||this.host.rpc}},{key:"seroRpcName",value:function(){var e=f.get(m.settings.seroRpcName);return e||(this.isZH()?v.e().page.setting.cnNode:v.e().page.setting.enNode)}},{key:"setLanguage",value:function(e){f.set(m.settings.language,e),this.init()}},{key:"setRpc",value:function(e,t){f.set(m.settings.seroRpcHost,e),f.set(m.settings.seroRpcName,t||e),this.host.rpc=e}},{key:"setMoneyType",value:function(e){f.set(m.settings.moneyType,e),this.init()}}]),e}(),u=a(178),p=function(){function e(){Object(o.a)(this,e),this.account={addresses:"account:addresses",infoPrefix:"account:info:",pkrIndex:"account:pkrIndex:",detail:"account:detail:",tempKeystore:"account:keystore:temp",current:"account:current",currentPKr:"account:currentPKr:",assets:"account:assets:"},this.config={seroRpcHost:"config:seroRpcHost"},this.sync={latestBlockNumber:"sync:latestBlockNumber",nils:"sync:nils",roots:"sync:roots",root:"sync:root:"},this.address={book:"address:book",info:"address:info:"},this.scan={value:"scan:value",type:"scan:type"},this.transaction={Tx:"Tx",TxInfo:"TxInfo",TxPending:"TxPending"},this.settings={moneyType:"settings:moneyType",seroRpcHost:"settings:seroRpcHost",seroRpcName:"settings:seroRpcName",language:"settings:language"},this.dapp={list:"dapps:list",info:"dapps:info:",read:"dapps:read:"},this.decimals="decimals"}return Object(s.a)(e,[{key:"dappsRead",value:function(e){return this.dapp.read+e}},{key:"dappsInfoKey",value:function(e){return this.dapp.info+e}},{key:"decimalsKey",value:function(e){return[this.decimals,e].join(":")}},{key:"infoKey",value:function(e){return this.account.infoPrefix+e}},{key:"rootKey",value:function(e){return this.sync.root+e}},{key:"pkrIndexKey",value:function(e){return this.account.pkrIndex+e}},{key:"currentPKrIndex",value:function(e){return this.account.currentPKr+e}},{key:"detailKey",value:function(e){return this.account.detail+e}},{key:"txKey",value:function(e,t,a,n){return[this.transaction.Tx,e,t,a,n].join(":")}},{key:"txInfoKey",value:function(e,t){return[this.transaction.TxInfo,e,t].join(":")}},{key:"txKeyPrefix",value:function(e){return[this.transaction.Tx,e].join(":")}},{key:"txKeyHashPrefix",value:function(e,t){return[this.transaction.Tx,e,t].join(":")}},{key:"txKeyPending",value:function(e,t,a){return[this.transaction.TxPending,e,t,a].join(":")}},{key:"txKeyPendingPrefix",value:function(e,t){return[this.transaction.TxPending,e,t].join(":")}}]),e}(),d=function e(){var t=this;Object(o.a)(this,e),this.e=function(){var e=f.get(m.settings.language);return e?"en_US"===e?t.en_US:"zh_CN"===e?t.zh_CN:"ja_JP"===e?t.ja_JP:"be_BY"===e?t.be_BY:"ko_KR"===e?t.ko_KR:t.en_US:-8===(new Date).getTimezoneOffset()/60?(f.set(m.settings.language,"zh_CN"),t.zh_CN):(f.set(m.settings.language,"en_US"),t.en_US)},this.en_US={key:"en_US",value:"English",button:{confirm:"Confirm",cancel:"Cancel",next:"Next",receive:"Receive",transfer:"Transfer",add:"Add",save:"Save",deleteAddress:"Delete",createWallet:"Create Wallet",importWallet:"Import Wallet",create:"Create",done:"Done",import:"Import",ok:"OK",openTip:"Open on October 31",update:"Update",repair:"Repair data",share:"Share",copyLink:"Copy Link",refresh:"Refresh",selectFromAlbum:"Scan From Album"},navbar:{wallet:"Wallet",dapp:"DApp",my:"My"},toast:{info:{quitApp:"Press again to exit App !",isLatest:"You are the latest version!",createWallet:"Please create wallet first !",removeAccount:"Warning: If you do not back up properly, you will not be able to retrieve your wallet after deleting it. Please handle this operation carefully"},success:{add:"Add Successfully",copy:"Copy Successfully",create:"Create Wallet Successfully",export:"Export Successfully",save:"Save Successfully",import:"Import Successfully",send:"Send Successfully",clear:"Clear Successfully",operation:"Operation Successfully"},loading:{creating:"Creating...",exporting:"Exporting...",importing:"Importing...",sending:"Sending...",deleting:"Deleting...",synchronizing:"Synchronizing...",synccompleted:"Sync completed!"},error:{passwordVerify:"Password at least 8 characters!",passwordNotMatch:"Password do not match!",incorrectOrder:"Incorrect order of Mnemonic Phrase!",invalidAddress:"Invalid Address!",accountExisted:"The account has existed!",notEnough:"The balance is not enough!",passwordError:"Password is incorrect!",notEnoughFee:"Not enough SERO to pay gas fee !",invalidMnemonic:"Invalid Mnemonic!",clearData:"Cleanup failed, please try again later!",useFrom:"Please use the designated account to initiate payment!",scanFailed:"The picture cannot be identify"}},modal:{help:"Help",sure:"Are you sure???",mainPKr:"This is a collection address that can be used for frequent collections such as mining.",pkr:"The collection address will change after each successful transaction.",createWallet:"Create Wallet",importWallet:"Import Wallet",clearData:"Clear app data",confirmClear:"Please confirm that you have backed up your account. Cleared will resynchronize transaction data",clearTip:'Click "Confirm" to start syncing data. There may be a white screen during the process. Please wait patiently for data synchronization to complete, do not end the process easily.',blockHeight:"For asset security, 12 blocks behind the main chain",dappTip1:"You are visiting a third-party DApp",dappTip2:"You are about to visit an application developed by a third party . Please read carefully [",dappTip3:"Potential risks of DApp and SERO Foundation's Disclaimers",dappTip4:"]",haveRead:"I have read it\u2028"},page:{wallet:{mainPKr:"mainPKr",PKr:"PKr",Assets:"Assets",selectWallet:"Select Wallet"},txList:{all:"All",out:"Out",in:"In",noData:"No data"},txDetail:{title:"Transaction info",success:"Success",pending:"Confirming",amount:"Amount",fee:"Fee",from:"From",to:"To",hash:"Hash",block:"Block",goto:"Go to block explorer for more details >",pendingDesc:"Submitted, please waiting",contractSuccess:"Contract execute successfully!",contractFailed:"Contract execute failed!"},txTransfer:{balance:"Balance",address:"Address",inputAmount:"Input Amount",inputAddress:"Please Input SERO Address",fee:"Fee",total:"Total",amount:"Amount",gas:"Gas",gasPrice:"Gas Price",inputPassword:"Input Password",passwordMsg:"Your account password",failed:"Transfer failed, please keep synchronized to the latest block!",thirdpay:"This payment is initiated by a third party. If you have any questions, please contact the third party."},addressBook:{title:"Address book",add:"Add Address",name:"Name",address:"Address",description:"Description(optional)",detail:"Address Detail"},walletManage:{mainPKr:"MainPKr",PKr:"PKr",passwordHint:"Password hint",export:"Export Mnemonic Phrase",password:"Input password",changePasswordHint:"Change Password Hint",changeProfilePhoto:"Change Profile Photo",changeWalletName:"Change Wallet Name"},setting:{language:"Language",unit:"Currency Unit",node:"Node Settings",pkr:"Check synchronization status",source:"Select Wallet Source",cnNode:"Node 2 (Mainland China)",enNode:"Node 1 (Global)"},create:{import:"Import",step1:{title:"Create SERO Wallet",walletName:"Wallet Name",password:"Password",rePassword:"Repeat Password",hint:"Password hint(optional)",passwordTips:"At least 8 characters, recommended to mix uppercase and lowercase alphabets, numbers and symbols"},step2:{title:"Backup Tips",d1:"Obtaining Mnemonic equals owning all assets",d2:"Backup Mnemonic",d3:"Please write down the Mnemonic . If your phone is lost, stolen, damaged, the Mnemonic will be able to recover your assets",d4:"Offline storage",d5:"Please save it in a secure place, isolated from the internet . Please do not share or store the Mnemonic in a network environment, such as email, albums, social apps and others.",d6:"Do not take screenshot .",d7:"Please do not share or store the screenshots, which may be collected by third-party, resulting in loss of assets."},step3:{title:"Backup Mnemonic Phrase",d1:"Please transcribe the Mnemonic phrase properly and back up it securely"},step4:{title:"Confirm",d1:"Please select Mnemonic Phrase in correct order",skip:"Already backed up? Skip this step"}},import:{tips:"You can reset the password while importing the Mnemonic Phrase",inputTips:"Enter mnemonic phrases separated by spaces",name:"Wallet Name",password:"Wallet Password",rePassword:"Repeat Password",hint:"Password hint"},my:{addressBook:"Address Book",walletManage:"Wallet Manage",settings:"Settings",termOfUse:"Term of use",about:"About us",help:"FAQ",clear:"Clear app data",address:{name:"Name",address:"Address",description:"Description(optional)",add:"Add Address",edit:"Edit Address",detail:"Address detail"},manage:{mainPKr:"MainPKr",pkr:"PKr",hint:"Password hint",export:"Export Mnemonic Phrase"}},dapp:{search:"Enter DApp url",invalidDApp:"Invalid DApp url",recent:"Recent",popup:"Recommended",recommended:"Community voted DApps",seroLab:"SERO Lab"}}},this.zh_CN={key:"zh_CN",value:"\u7b80\u4f53\u4e2d\u6587",button:{confirm:"\u786e\u8ba4",cancel:"\u53d6\u6d88",next:"\u4e0b\u4e00\u6b65",receive:"\u6536\u6b3e",transfer:"\u4ea4\u6613",add:"\u589e\u52a0",save:"\u4fdd\u5b58",deleteAddress:"\u5220\u9664",createWallet:"\u521b\u5efa\u94b1\u5305",importWallet:"\u5bfc\u5165\u94b1\u5305",create:"\u521b\u5efa",done:"\u5b8c\u6210",import:"\u5bfc\u5165",ok:"\u597d\u7684",openTip:"10\u670831\u53f7\u5f00\u542f\u6b64\u529f\u80fd",update:"\u7acb\u5373\u66f4\u65b0",repair:"\u4fee\u590d\u6570\u636e",share:"\u5206\u4eab",copyLink:"\u590d\u5236\u94fe\u63a5",refresh:"\u5237\u65b0",selectFromAlbum:"\u4ece\u76f8\u518c\u9009\u62e9"},navbar:{wallet:"\u94b1\u5305",dapp:"\u5e94\u7528",my:"\u6211\u7684"},toast:{info:{quitApp:"\u518d\u6309\u4e00\u6b21\u9000\u51fa\u5e94\u7528!",isLatest:"\u5df2\u7ecf\u662f\u6700\u65b0\u7248\u672c!",createWallet:"\u8bf7\u5148\u521b\u5efa\u94b1\u5305\u8d26\u6237 !",removeAccount:"\u8b66\u544a\uff1a\u82e5\u65e0\u59a5\u5584\u5907\u4efd\uff0c\u5220\u9664\u94b1\u5305\u540e\u5c06\u65e0\u6cd5\u627e\u56de\u94b1\u5305\uff0c\u8bf7\u614e\u91cd\u5904\u7406\u8be5\u64cd\u4f5c"},success:{add:"\u589e\u52a0\u6210\u529f",copy:"\u62f7\u8d1d\u6210\u529f",create:"\u521b\u5efa\u94b1\u5305\u6210\u529f",export:"\u5bfc\u51fa\u6210\u529f",save:"\u4fdd\u5b58\u6210\u529f",import:"\u5bfc\u5165\u6210\u529f",send:"\u53d1\u9001\u6210\u529f",clear:"\u6e05\u7406\u6210\u529f",operation:"\u64cd\u4f5c\u6210\u529f"},loading:{creating:"\u521b\u5efa\u4e2d...",exporting:"\u5bfc\u51fa\u4e2d...",importing:"\u5bfc\u5165\u4e2d...",sending:"\u53d1\u9001\u4e2d...",deleting:"\u5220\u9664\u4e2d...",synchronizing:"\u8bf7\u52ff\u5173\u95ed!\u6b63\u5728\u540c\u6b65...",synccompleted:"\u540c\u6b65\u5b8c\u6210!"},error:{passwordVerify:"\u5bc6\u7801\u4e3a8\u4f4d\u4ee5\u4e0a\u5b57\u7b26\u957f\u5ea6!",passwordNotMatch:"\u4e24\u6b21\u5bc6\u7801\u8f93\u5165\u7684\u4e0d\u4e00\u81f4!",incorrectOrder:"\u52a9\u8bb0\u8bcd\u7684\u987a\u5e8f\u4e0d\u6b63\u786e!",invalidAddress:"\u65e0\u6548\u7684\u6536\u6b3e\u5730\u5740!",accountExisted:"\u8d26\u6237\u5b58\u5728!",notEnough:"\u4f59\u989d\u4e0d\u8db3!",passwordError:"\u5bc6\u7801\u4e0d\u6b63\u786e!",notEnoughFee:"\u6ca1\u6709\u8db3\u591f\u7684SERO\u652f\u4ed8\u77ff\u5de5\u8d39\u7528",invalidMnemonic:"\u65e0\u6548\u7684\u52a9\u8bb0\u8bcd!",clearData:"\u6b63\u5728\u540c\u6b65\u533a\u5757\uff0c\u6e05\u9664\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5!",useFrom:"\u8bf7\u4f7f\u7528\u6307\u5b9a\u7684\u8d26\u6237\u53d1\u8d77\u652f\u4ed8!",scanFailed:"\u56fe\u7247\u65e0\u6cd5\u8bc6\u522b!"}},modal:{help:"\u5e2e\u52a9",sure:"\u786e\u8ba4\u5220\u9664\u5417???",mainPKr:"\u6b64\u6536\u6b3e\u5730\u5740\u53ef\u4f5c\u4e3a\u5e38\u7528\u6536\u6b3e\u7801\uff0c\u4f8b\u5982\uff1a\u6316\u77ff\u5730\u5740\u3002",pkr:"\u6b64\u6536\u6b3e\u5730\u5740\u4e0d\u53ef\u505a\u5e38\u7528\u6536\u6b3e\u7801\uff0c\u6bcf\u6b21\u6536\u6b3e\u540e\u5c06\u4f1a\u5237\u65b0\u3002",createWallet:"\u65b0\u5efa\u94b1\u5305",importWallet:"\u5bfc\u5165\u94b1\u5305",clearData:"\u6e05\u9664\u5e94\u7528\u6570\u636e",confirmClear:"\u8bf7\u786e\u8ba4\u4f60\u5df2\u7ecf\u5907\u4efd\u597d\u8d26\u6237\u3002\u6e05\u9664\u540e\u5c06\u91cd\u65b0\u540c\u6b65\u4ea4\u6613\u6570\u636e",clearTip:"\u70b9\u51fb\u201c\u786e\u8ba4\u201d\u540e\uff0c\u5c06\u4f1a\u91cd\u65b0\u540c\u6b65\u6570\u636e\uff0c\u540c\u6b65\u8fc7\u7a0b\u4e2d\u4fdd\u6301\u94b1\u5305\u5728\u624b\u673a\u524d\u7aef\u8fd0\u884c\uff0c\u76f4\u5230\u7b49\u5f85\u6570\u636e\u540c\u6b65\u5b8c\u6210\u3002",blockHeight:"\u4e3a\u4e86\u8d44\u4ea7\u7684\u5b89\u5168\u6027\uff0c\u94b1\u5305\u540c\u6b65\u7684\u533a\u5757\u6bd4\u4e3b\u94fe\u843d\u540e\u4e8612\u4e2a\u533a\u5757",dappTip1:"\u4f60\u6b63\u5728\u8bbf\u95ee\u7b2c\u4e09\u65b9DApp",dappTip2:"\u4f60\u5c06\u8981\u8bbf\u95ee\u7684\u5e94\u7528\u7a0b\u5e8f\u5b8c\u5168\u7531\u7b2c\u4e09\u65b9\u5f00\u53d1\uff0c\u8bf7\u8ba4\u771f\u9605\u8bfb\u3010",dappTip3:"\u53bb\u4e2d\u5fc3\u5316\u5e94\u7528\u7684\u53ef\u80fd\u98ce\u9669\u4ee5\u53caSERO\u57fa\u91d1\u4f1a\u7684\u514d\u8d23\u6761\u6b3e",dappTip4:"\u3011",haveRead:"\u5df2\u7ecf\u9605\u8bfb\u2028"},page:{wallet:{mainPKr:"\u4e3b\u6536\u6b3e\u7801",PKr:"\u6536\u6b3e\u7801",Assets:"\u8d44\u4ea7",selectWallet:"\u9009\u62e9\u94b1\u5305"},txList:{all:"\u5168\u90e8",out:"\u8f6c\u51fa",in:"\u8f6c\u5165",noData:"\u6682\u65e0\u6570\u636e"},txDetail:{title:"\u4ea4\u6613\u8be6\u60c5",pending:"\u786e\u8ba4\u4e2d",success:"\u4ea4\u6613\u6210\u529f",amount:"\u91d1\u989d",fee:"\u8d39\u7528",from:"\u53d1\u9001",to:"\u6536\u6b3e",hash:"\u4ea4\u6613\u54c8\u5e0c",block:"\u5757\u53f7",goto:"\u5230\u533a\u5757\u6d4f\u89c8\u5668\u67e5\u770b\u8be6\u60c5 >",pendingDesc:"\u5df2\u63d0\u4ea4\uff0c\u8bf7\u7b49\u5f85\u5904\u7406",contractSuccess:"\u5408\u7ea6\u6267\u884c\u6210\u529f\uff01",contractFailed:"\u5408\u7ea6\u6267\u884c\u5931\u8d25\uff01"},txTransfer:{balance:"\u4f59\u989d",address:"\u6536\u6b3e\u5730\u5740",inputAmount:"\u8bf7\u8f93\u5165\u91d1\u989d",inputAddress:"\u8bf7\u8f93\u5165\u5730\u5740",fee:"\u8d39\u7528",total:"\u603b\u8ba1",amount:"\u91d1\u989d",gas:"Gas",gasPrice:"Gas Price",inputPassword:"\u8bf7\u8f93\u5165\u5bc6\u7801",passwordMsg:"\u8d26\u6237\u5bc6\u7801",failed:"\u4ea4\u6613\u53d1\u9001\u5931\u8d25\uff0c\u8bf7\u4fdd\u6301\u540c\u6b65\u5230\u6700\u65b0\u533a\u5757!",thirdpay:"\u672c\u6b21\u652f\u4ed8\u7531\u7b2c\u4e09\u65b9\u53d1\u8d77\uff0c\u5982\u6709\u7591\u95ee\u8bf7\u8054\u7cfb\u7b2c\u4e09\u65b9\u3002"},addressBook:{title:"\u5730\u5740\u7c3f",add:"\u6dfb\u52a0\u5730\u5740\u7c3f",name:"\u94b1\u5305\u540d\u79f0",address:"\u5730\u5740",description:"\u63cf\u8ff0(\u53ef\u9009)",detail:"\u5730\u5740\u8be6\u60c5"},walletManage:{mainPKr:"\u4e3b\u6536\u6b3e\u7801",PKr:"\u6536\u6b3e\u7801",password:"\u8bf7\u8f93\u5165\u5bc6\u7801",passwordHint:"\u5bc6\u7801\u63d0\u793a\u4fe1\u606f",export:"\u5bfc\u51fa\u52a9\u8bb0\u8bcd",changePasswordHint:"\u4fee\u6539\u5bc6\u7801\u63d0\u793a\u4fe1\u606f",changeProfilePhoto:"\u4fee\u6539\u5934\u50cf",changeWalletName:"\u4fee\u6539\u94b1\u5305\u540d\u79f0"},setting:{language:"\u8bed\u8a00",unit:"\u5e01\u79cd\u5355\u4f4d",node:"\u8282\u70b9\u8bbe\u7f6e",pkr:"\u540c\u6b65\u72b6\u6001",source:"\u8bbe\u7f6e\u94b1\u5305\u5f00\u6e90\u793e\u533a",cnNode:"\u8282\u70b92(\u4e2d\u56fd\u5927\u9646)",enNode:"\u8282\u70b91(\u5168\u7403)"},create:{import:"\u5bfc\u5165",step1:{title:"\u521b\u5efa\u94b1\u5305",walletName:"\u94b1\u5305\u540d\u79f0",password:"\u5bc6\u7801",rePassword:"\u91cd\u590d\u8f93\u5165\u5bc6\u7801",hint:"\u5bc6\u7801\u63d0\u793a\u4fe1\u606f(\u53ef\u9009)",passwordTips:"\u4e0d\u5c11\u4e8e8\u4f4d\u5b57\u7b26\uff0c\u5efa\u8bae\u6df7\u5408\u5927\u5c0f\u5b57\u6bcd\u3001\u6570\u5b57\u7ec4\u5408"},step2:{title:"\u5907\u4efd\u63d0\u793a",d1:"\u83b7\u5f97\u52a9\u8bb0\u8bcd\u7b49\u4e8e\u62e5\u6709\u94b1\u5305\u8d44\u4ea7\u6240\u6709\u6743\u5229",d2:"\u5907\u4efd\u52a9\u8bb0\u8bcd",d3:"\u4f7f\u7528\u7eb8\u548c\u7b14\u6b63\u786e\u6284\u5199\u52a9\u8bb0\u8bcd\uff0c\u5982\u679c\u4f60\u7684\u624b\u673a\u4e22\u5931\u3001\u88ab\u76d7\u3001\u635f\u574f\u3001\u52a9\u8bb0\u8bcd\u5c06\u53ef\u4ee5\u6062\u590d\u4f60\u7684\u8d44\u4ea7",d4:"\u79bb\u7ebf\u4fdd\u7ba1",d5:"\u59a5\u5584\u4fdd\u7ba1\u81f3\u9694\u79bb\u7f51\u7edc\u7684\u5b89\u5168\u5730\u65b9\uff0c\u8bf7\u52ff\u5c06\u52a9\u8bb0\u8bcd\u5728\u8054\u7f51\u73af\u5883\u4e0b\u5206\u4eab\u548c\u5b58\u50a8\uff0c\u6bd4\u5982\uff1a\u90ae\u4ef6\u3001\u76f8\u518c\u3001\u793e\u4ea4\u5e94\u7528\u7b49",d6:"\u8bf7\u52ff\u622a\u5c4f",d7:"\u8bf7\u52ff\u622a\u5c4f\u5206\u4eab\u548c\u5b58\u50a8\uff0c\u8fd9\u5c06\u53ef\u80fd\u88ab\u7b2c\u4e09\u65b9\u6076\u610f\u8f6f\u4ef6\u6536\u96c6\uff0c\u9020\u6210\u8d44\u4ea7\u635f\u5931"},step3:{title:"\u5907\u4efd\u52a9\u8bb0\u8bcd",d1:"\u8bf7\u6309\u987a\u5e8f\u9009\u62e9\u52a9\u8bb0\u8bcd\uff0c\u786e\u4fdd\u5907\u4efd\u6b63\u786e"},step4:{title:"\u786e\u8ba4\u52a9\u8bb0\u8bcd",d1:"\u8bf7\u6309\u987a\u5e8f\u70b9\u51fb\u52a9\u8bb0\u8bcd\uff0c\u4ee5\u786e\u8ba4\u60a8\u6b63\u786e\u5907\u4efd",skip:"\u5df2\u5907\u4efd? \u8df3\u8fc7\u6b64\u6b65\u9aa4"}},import:{tips:"\u4f7f\u7528\u52a9\u8bb0\u8bcd\u5bfc\u5165\u7684\u540c\u65f6\u53ef\u4ee5\u4fee\u6539\u94b1\u5305\u5bc6\u7801\u3002",inputTips:"\u8f93\u5165\u52a9\u8bb0\u8bcd\u5355\u8bcd\uff0c\u5e76\u4f7f\u7528\u7a7a\u683c\u5206\u9694",name:"\u94b1\u5305\u540d\u79f0",password:"\u94b1\u5305\u5bc6\u7801",rePassword:"\u91cd\u590d\u8f93\u5165\u5bc6\u7801",hint:"\u5bc6\u7801\u63d0\u793a\u4fe1\u606f"},my:{addressBook:"\u5730\u5740\u7c3f",walletManage:"\u94b1\u5305\u7ba1\u7406",settings:"\u4f7f\u7528\u8bbe\u7f6e",termOfUse:"\u7528\u6237\u534f\u8bae",about:"\u5173\u4e8e\u6211\u4eec",help:"\u4f7f\u7528\u5e2e\u52a9",clear:"\u6e05\u9664\u7f13\u5b58",address:{name:"\u94b1\u5305\u540d\u79f0",address:"\u5730\u5740",description:"\u5907\u6ce8(\u53ef\u9009)",add:"\u589e\u52a0\u5730\u5740",edit:"\u7f16\u8f91\u5730\u5740",detail:"\u5730\u5740\u8be6\u60c5"},manage:{mainPKr:"\u4e3b\u6536\u6b3e\u7801",pkr:"\u6536\u6b3e\u7801",hint:"\u5bc6\u7801\u63d0\u793a\u4fe1\u606f",export:"\u5bfc\u51fa\u52a9\u8bb0\u8bcd"}},dapp:{search:"\u8f93\u5165DApp\u7684\u5730\u5740",invalidDApp:"\u65e0\u6548\u7684DApp url",recent:"\u6700\u8fd1\u4f7f\u7528",popup:"\u63a8\u8350",recommended:"\u793e\u533a\u6295\u7968\u7684DApps",seroLab:"SERO\u5b9e\u9a8c\u5ba4"}}},this.ja_JP={key:"ja_JP",value:"\u65e5\u672c\u8a9e",button:{confirm:"\u78ba\u8a8d\u3059\u308b",cancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",next:"\u6b21",receive:"\u53d7\u3051\u53d6\u308b",transfer:"\u8ee2\u9001",add:"\u52a0\u3048\u308b",save:"\u30bb\u30fc\u30d6",deleteAddress:"\u524a\u9664",createWallet:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u4f5c\u6210",importWallet:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8",create:"\u30fc\u30c8",done:"\u5b8c\u4e86",import:"\u5b8c\u4e86",ok:"OK",openTip:"10\u670831\u65e5\u306b\u30aa\u30fc\u30d7\u30f3",update:"\u4eca\u3059\u3050\u66f4\u65b0",repair:"\u4fee\u7406\u30c7\u30fc\u30bf",share:"\u5171\u6709",copyLink:"\u30ea\u30f3\u30af\u3092\u30b3\u30d4\u30fc",refresh:"\u66f4\u65b0",selectFromAlbum:"\u30a2\u30eb\u30d0\u30e0\u304b\u3089\u9078\u629e"},navbar:{wallet:"\u8ca1\u5e03",dapp:"DApp",my:"\u50d5\u306e"},toast:{info:{quitApp:"\u3082\u3046\u4e00\u5ea6\u62bc\u3059\u3068\u30a2\u30d7\u30ea\u304c\u7d42\u4e86\u3057\u307e\u3059\uff01",isLatest:"\u3059\u3067\u306b\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059!",createWallet:"\u6700\u521d\u306b\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044!",removeAccount:"\u8b66\u544a\uff1a\u9069\u5207\u306b\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u306a\u3044\u3068\u3001\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u524a\u9664\u3057\u305f\u5f8c\u3001\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u306e\u64cd\u4f5c\u306f\u614e\u91cd\u306b\u51e6\u7406\u3057\u3066\u304f\u3060\u3055\u3044\u3002"},success:{add:"\u6b63\u5e38\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f",copy:"\u6b63\u5e38\u306b\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3057\u305f",create:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f \u9996\u5c3e\u3088\u304f",export:"\u6b63\u5e38\u306b\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3055\u308c\u307e\u3057\u305f",save:"\u6b63\u5e38\u306b\u4fdd\u5b58",import:"\u6b63\u5e38\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3055\u308c\u307e\u3057\u305f",send:"\u6b63\u5e38\u306b\u9001\u4fe1\u3055\u308c\u307e\u3057\u305f",clear:"\u6b63\u5e38\u306b\u30af\u30ea\u30a2\u3055\u308c\u307e\u3057\u305f",operation:"\u64cd\u4f5c\u304c\u6210\u529f\u3057\u307e\u3057\u305f"},loading:{creating:"\u4f5c\u6210...",exporting:"\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059...",importing:"\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059...",sending:"\u9001\u4fe1 ...",deleting:"\u524a\u9664\u4e2d...",synchronizing:"\u540c\u671f\u4e2d...",synccompleted:"\u540c\u671f\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\uff01"},error:{passwordVerify:"\u5c11\u306a\u304f\u3068\u30828\u6587\u5b57\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\uff01",passwordNotMatch:"\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\uff01",incorrectOrder:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u306e\u9806\u5e8f\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\uff01",invalidAddress:"\u7121\u52b9\u306a\u30a2\u30c9\u30ec\u30b9\uff01",accountExisted:"\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u65e2\u306b\u5b58\u5728\u3057\u307e\u3059\uff01",notEnough:"\u30d0\u30e9\u30f3\u30b9\u304c\u5341\u5206\u3067\u306f\u3042\u308a\u307e\u305b\u3093\uff01",passwordError:"\u9593\u9055\u3063\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\uff01",notEnoughFee:"\u6599\u91d1\u3092\u652f\u6255\u3046\u306e\u306b\u5341\u5206\u306aSERO\u304c\u3042\u308a\u307e\u305b\u3093\uff01",invalidMnemonic:"\u7121\u52b9\u306a\u30cb\u30fc\u30e2\u30cb\u30c3\u30af!",clearData:"\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u3057\u3070\u3089\u304f\u3057\u3066\u304b\u3089\u3082\u3046\u4e00\u5ea6\u304a\u8a66\u3057\u304f\u3060\u3055\u3044!",useFrom:"\u6307\u5b9a\u3055\u308c\u305f\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u652f\u6255\u3044\u3092\u958b\u59cb\u3057\u3066\u304f\u3060\u3055\u3044!",scanFailed:"\u5199\u771f\u3092\u8b58\u5225\u3067\u304d\u307e\u305b\u3093"}},modal:{help:"\u52a9\u3051\u3066",sure:"\u672c\u6c17\u3067\u3059\u304b\uff1f\uff1f\uff1f",mainPKr:"\u3053\u308c\u306f\u3001\u30de\u30a4\u30cb\u30f3\u30b0\u306a\u3069\u306e\u983b\u7e41\u306a\u53ce\u96c6\u306b\u4f7f\u7528\u3067\u304d\u308b\u53ce\u96c6\u30a2\u30c9\u30ec\u30b9\u3067\u3059\u3002",pkr:"\u53ce\u96c6\u30a2\u30c9\u30ec\u30b9\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u6210\u529f\u3059\u308b\u305f\u3073\u306b\u5909\u66f4\u3055\u308c\u307e\u3059\u3002",createWallet:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u4f5c\u6210",importWallet:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8",clearData:"\u30a2\u30d7\u30ea\u30c7\u30fc\u30bf\u3092\u6d88\u53bb\u3059\u308b",confirmClear:"\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u306f\u30af\u30ea\u30a2\u5f8c\u306b\u518d\u540c\u671f\u3055\u308c\u307e\u3059",clearTip:"[\u78ba\u8a8d]\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u30c7\u30fc\u30bf\u306e\u540c\u671f\u3092\u958b\u59cb\u3057\u307e\u3059\u3002\u30d7\u30ed\u30bb\u30b9\u4e2d\u306b\u767d\u3044\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u30c7\u30fc\u30bf\u306e\u540c\u671f\u304c\u5b8c\u4e86\u3059\u308b\u307e\u3067\u304a\u5f85\u3061\u304f\u3060\u3055\u3044\u3002\u30d7\u30ed\u30bb\u30b9\u3092\u7a81\u7136\u7d42\u4e86\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002",blockHeight:"\u8cc7\u7523\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u305f\u3081\u306b\u3001\u30e1\u30a4\u30f3\u30c1\u30a7\u30fc\u30f3\u306e\u80cc\u5f8c\u306b12\u30d6\u30ed\u30c3\u30af",dappTip1:"\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306eDApp\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u307e\u3059",dappTip2:"\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u304c\u958b\u767a\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u3088\u304f\u304a\u8aad\u307f\u304f\u3060\u3055\u3044[",dappTip3:"DApp\u3068SERO Foundation\u306e\u514d\u8cac\u4e8b\u9805\u306e\u6f5c\u5728\u7684\u306a\u30ea\u30b9\u30af",dappTip4:"]",haveRead:"\u8aad\u307f\u307e\u3057\u305fhave"},page:{wallet:{mainPKr:"\u30e1\u30a4\u30f3PKr",PKr:"PKr",Assets:"\u8cc7\u7523",selectWallet:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u9078\u629e"},txList:{all:"\u3059\u3079\u3066",out:"\u3067\u308b",in:"\u306b",noData:"\u30c7\u30fc\u30bf\u306a\u3057"},txDetail:{title:"\u53d6\u5f15\u60c5\u5831",success:"\u6210\u529f",pending:"\u30da\u30f3\u30c7\u30a3\u30f3\u30b0",amount:"\u91cf",fee:"\u6599\u91d1",from:"\u304b\u3089",to:"\u306b",hash:"\u30cf\u30c3\u30b7\u30e5",block:"\u30d6\u30ed\u30c3\u30af",goto:"\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u30fc\u306b\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044",pendingDesc:"\u9001\u4fe1\u3055\u308c\u307e\u3057\u305f\u3002\u304a\u5f85\u3061\u304f\u3060\u3055\u3044",contractSuccess:"\u5951\u7d04\u306f\u6b63\u5e38\u306b\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\uff01",contractFailed:"\u5951\u7d04\u306e\u5b9f\u884c\u306b\u5931\u6557\u3057\u307e\u3057\u305f\uff01"},txTransfer:{balance:"\u30d0\u30e9\u30f3\u30b9",address:"\u4f4f\u6240\u3092",inputAmount:"\u5165\u529b\u91cf",inputAddress:"SERO\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",fee:"\u6599\u91d1",total:"\u5408\u8a08",amount:"\u91cf",gas:"\u30ac\u30b9",gasPrice:"\u30ac\u30b9\u4fa1\u683c",inputPassword:"\u5165\u529b\u30d1\u30b9\u30ef\u30fc\u30c9",passwordMsg:"\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u30d1\u30b9\u30ef\u30fc\u30c9",failed:"\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u9001\u4fe1\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u6700\u65b0\u306e\u30d6\u30ed\u30c3\u30af\u306b\u540c\u671f\u3057\u3066\u304f\u3060\u3055\u3044!",thirdpay:"\u3053\u306e\u652f\u6255\u3044\u306f\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306b\u3088\u3063\u3066\u958b\u59cb\u3055\u308c\u307e\u3059\u3002\u7591\u554f\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002"},addressBook:{title:"\u4f4f\u6240\u9332",add:"\u4f4f\u6240\u3092\u8ffd\u52a0",name:"\u540d",address:"\u4f4f\u6240\u3092",description:"\u8aac\u660e\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09",detail:"\u4f4f\u6240\u306e\u8a73\u7d30"},walletManage:{mainPKr:"\u30e1\u30a4\u30f3PKr",PKr:"PKr",passwordHint:"\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30d2\u30f3\u30c8",export:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8",password:"\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",changePasswordHint:"\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30d2\u30f3\u30c8\u3092\u5909\u66f4\u3059\u308b",changeProfilePhoto:"\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u5199\u771f\u306e\u5909\u66f4",changeWalletName:"\u30a6\u30a9\u30ec\u30c3\u30c8\u540d\u3092\u5909\u66f4"},setting:{language:"\u8a00\u8a9e",unit:"\u901a\u8ca8\u5358\u4f4d",node:"\u30ce\u30fc\u30c9\u8a2d\u5b9a",pkr:"PKr\u3092\u78ba\u8a8d\u3059\u308b",source:"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306b\u8a2d\u5b9a\u3057\u307e\u3059",cnNode:"\u30ce\u30fc\u30c92\uff08\u4e2d\u56fd\u672c\u571f\uff09",enNode:"\u30ce\u30fc\u30c91\uff08\u30b0\u30ed\u30fc\u30d0\u30eb\uff09"},create:{import:"\u30a4\u30f3\u30dd\u30fc\u30c8",step1:{title:"SERO\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u4f5c\u6210",walletName:"\u30a6\u30a9\u30ec\u30c3\u30c8\u540d",password:"\u30d1\u30b9\u30ef\u30fc\u30c9",rePassword:"\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u518d\u5ea6\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",hint:"\u30d1\u30b9\u30ef\u30fc\u30c9\u30d2\u30f3\u30c8\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09",passwordTips:"\u5c11\u306a\u304f\u3068\u30828\u6587\u5b57\u3002\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u306e\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u3001\u6570\u5b57\u3001\u8a18\u53f7\u3092\u6df7\u5728\u3055\u305b\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059"},step2:{title:"\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306e\u30d2\u30f3\u30c8",d1:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u306f\u3001\u3059\u3079\u3066\u306e\u8cc7\u7523\u3092\u6240\u6709\u3059\u308b\u3053\u3068\u306b\u7b49\u3057\u3044",d2:"\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u30cb\u30fc\u30e2\u30cb\u30c3\u30af",d3:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u3092\u66f8\u304d\u7559\u3081\u3066\u304f\u3060\u3055\u3044\u3002\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u304c\u7d1b\u5931\u3001\u76d7\u96e3\u3001\u7834\u640d\u3057\u305f\u5834\u5408\u3001Mnemonic\u3092\u4f7f\u7528\u3057\u3066\u8cc7\u7523\u3092\u56de\u5fa9\u3067\u304d\u307e\u3059",d4:"\u30aa\u30d5\u30e9\u30a4\u30f3\u30b9\u30c8\u30ec\u30fc\u30b8",d5:"\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089\u9694\u96e2\u3055\u308c\u305f\u5b89\u5168\u306a\u5834\u6240\u306b\u4fdd\u5b58\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30e1\u30fc\u30eb\u3001\u30a2\u30eb\u30d0\u30e0\u3001\u30bd\u30fc\u30b7\u30e3\u30eb\u30a2\u30d7\u30ea\u306a\u3069\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u74b0\u5883\u3067\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u3092\u5171\u6709\u307e\u305f\u306f\u4fdd\u5b58\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002",d6:"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u3092\u64ae\u3089\u306a\u3044\u3067\u304f\u3060\u3055\u3044",d7:"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u3092\u5171\u6709\u307e\u305f\u306f\u4fdd\u5b58\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u304c\u53ce\u96c6\u3057\u305f\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u306f\u3001\u8cc7\u7523\u306e\u640d\u5931\u306b\u3064\u306a\u304c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002"},step3:{title:"\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba",d1:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u3092\u9069\u5207\u306b\u30e1\u30e2\u3057\u3001\u5b89\u5168\u306b\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044"},step4:{title:"\u78ba\u8a8d\u3059\u308b",d1:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u3092\u6b63\u3057\u3044\u9806\u5e8f\u3067\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044",skip:"\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u6e08\u307f\u3067\u3059\u304b\uff1f\u3053\u306e\u30b9\u30c6\u30c3\u30d7\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u3066\u304f\u3060\u3055\u3044"}},import:{tips:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u4e2d\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30ea\u30bb\u30c3\u30c8\u3067\u304d\u307e\u3059",inputTips:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u3092\u30b9\u30da\u30fc\u30b9\u3067\u533a\u5207\u3063\u3066\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",name:"\u30a6\u30a9\u30ec\u30c3\u30c8\u540d",password:"\u30a6\u30a9\u30ec\u30c3\u30c8\u30d1\u30b9\u30ef\u30fc\u30c9",rePassword:"\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u518d\u5ea6\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",hint:"\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30d2\u30f3\u30c8"},my:{addressBook:"\u4f4f\u6240\u9332",walletManage:"\u30a6\u30a9\u30ec\u30c3\u30c8\u7ba1\u7406",settings:"\u8a2d\u5b9a",termOfUse:"\u5229\u7528\u898f\u7d04",about:"\u79c1\u305f\u3061\u306b\u95a2\u3057\u3066\u306f",help:"\u3088\u304f\u3042\u308b\u8cea\u554f",clear:"\u30a2\u30d7\u30ea\u306e\u30c7\u30fc\u30bf\u3092\u6d88\u53bb",address:{name:"\u540d",address:"\u4f4f\u6240\u3092",description:"\u8aac\u660e\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09",add:"\u4f4f\u6240\u3092\u8ffd\u52a0",edit:"\u4f4f\u6240\u3092\u7de8\u96c6",detail:"\u4f4f\u6240\u306e\u8a73\u7d30"},manage:{mainPKr:"\u30e1\u30a4\u30f3PKr",pkr:"PKr",hint:"\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30d2\u30f3\u30c8",export:"\u30cb\u30fc\u30e2\u30cb\u30c3\u30af\u30d5\u30ec\u30fc\u30ba\u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8"}},dapp:{search:"DApp URL\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044",invalidDApp:"\u7121\u52b9\u306aDApp URL",recent:"\u6700\u8fd1",popup:"\u304a\u52e7\u3081",recommended:"\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304cDApps\u306b\u6295\u7968\u3057\u307e\u3057\u305f",seroLab:"SERO\u7814\u7a76\u6240"}}},this.be_BY={key:"be_BY",value:"\u0440\u0443\u0441\u0441\u043a\u0438\u0439",button:{confirm:"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435",cancel:"\u041e\u0442\u043c\u0435\u043d\u0430",next:"\u0441\u043b\u0435\u0434\u0443\u044e\u0449",receive:"\u041f\u043e\u043b\u0443\u0447\u0430\u0442\u044c",transfer:"\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c",add:"\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c",save:"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c",deleteAddress:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c",createWallet:"\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u0448\u0435\u043b\u0435\u043a",importWallet:"\u0418\u043c\u043f\u043e\u0440\u0442\u043d\u044b\u0439 \u043a\u043e\u0448\u0435\u043b\u0435\u043a",create:"\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435",done:"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e",import:"\u0438\u043c\u043f\u043e\u0440\u0442",ok:"OK",openTip:"\u041e\u0442\u043a\u0440\u044b\u0442 31 \u043e\u043a\u0442\u044f\u0431\u0440\u044f",update:"\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435",repair:"\u0420\u0430\u043c\u043e\u043d\u0442 \u0434\u0430\u0434\u0437\u0435\u043d\u044b\u0445",share:"\u041f\u0430\u0434\u0437\u044f\u043b\u0456\u0446\u0446\u0430",copyLink:"\u0421\u043a\u0430\u043f\u0456\u044f\u0432\u0430\u0446\u044c \u0441\u043f\u0430\u0441\u044b\u043b\u043a\u0443",refresh:"\u0410\u0431\u043d\u0430\u0432\u0456\u0446\u044c",selectFromAlbum:"\u0412\u044b\u0431\u0435\u0440\u044b\u0446\u0435 \u0437 \u0430\u043b\u044c\u0431\u043e\u043c\u0430"},navbar:{wallet:"\u0431\u0443\u043c\u0430\u0436\u043d\u0438\u043a",dapp:"DApp",my:"\u041c\u043e\u0439"},toast:{info:{quitApp:"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f!",isLatest:"\u0423\u0436\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f!",createWallet:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u0448\u0435\u043b\u0435\u043a!",removeAccount:"\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435: \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0448\u0435\u043b\u0435\u043a \u043f\u043e\u0441\u043b\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0439\u0442\u0435 \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e"},success:{add:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0423\u0441\u043f\u0435\u0448\u043d\u043e",copy:"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e",create:"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u0421\u043e\u0437\u0434\u0430\u043d \u041a\u043e\u0448\u0435\u043b\u0435\u043a",export:"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e",save:"\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e \u0423\u0441\u043f\u0435\u0448\u043d\u043e",import:"\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0423\u0441\u043f\u0435\u0448\u043d\u043e",send:"\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u0423\u0441\u043f\u0435\u0448\u043d\u043e",clear:"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0447\u0438\u0449\u0435\u043d\u043e",operation:"\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e"},loading:{creating:"\u0422\u0432\u043e\u0440\u044f...",exporting:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442...",importing:"\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439...",sending:"\u041f\u043e\u0441\u044b\u043b\u043a\u0430 ...",deleting:"\u0421\u0456\u043d\u0445\u0440\u0430\u043d\u0456\u0437\u0430\u0446\u044b\u044f...",synchronizing:"\u0421\u0456\u043d\u0445\u0440\u0430\u043d\u0456\u0437\u0430\u0446\u044b\u044f...",synccompleted:"\u0421\u0456\u043d\u0445\u0440\u0430\u043d\u0456\u0437\u0430\u0446\u044b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u043d\u0430!"},error:{passwordVerify:"\u041f\u0430\u0440\u043e\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 8 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432!",passwordNotMatch:"\u041f\u0430\u0440\u043e\u043b\u0438 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442!",incorrectOrder:"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0444\u0440\u0430\u0437\u044b!",invalidAddress:"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441!",accountExisted:"\u0410\u043a\u043a\u0430\u0443\u043d\u0442 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442!",notEnough:"\u0411\u0430\u043b\u0430\u043d\u0441\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e!",passwordError:"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c!",notEnoughFee:"\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e SERO \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u043f\u043b\u0430\u0442\u044b \u0437\u0430 \u0433\u0430\u0437!",invalidMnemonic:"\u041d\u044f\u043f\u0440\u0430\u0432\u0456\u043b\u044c\u043d\u044b \u043c\u043d\u0435\u043c\u0430\u043d\u0456\u0447\u043d\u044b \u0445\u0430\u0440\u0430\u043a\u0442\u0430\u0440 !",clearData:"\u0423\u0431\u043e\u0440\u043a\u0430 \u043d\u0435 \u0430\u0442\u0440\u044b\u043c\u0430\u043b\u0430\u0441\u044f. \u041f\u0430\u0441\u043f\u0440\u0430\u0431\u0443\u0439\u0446\u0435 \u044f\u0448\u0447\u044d \u0440\u0430\u0437 \u043f\u0430\u0437\u043d\u0435\u0439!",useFrom:"\u041a\u0430\u043b\u0456 \u043b\u0430\u0441\u043a\u0430, \u0432\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u043e\u045e\u0432\u0430\u0439\u0446\u0435 \u043f\u0430\u0437\u043d\u0430\u0447\u0430\u043d\u044b \u045e\u043b\u0456\u043a\u043e\u0432\u044b \u0437\u0430\u043f\u0456\u0441, \u043a\u0430\u0431 \u043f\u0430\u0447\u0430\u0446\u044c \u0430\u043f\u043b\u0430\u0442\u0443!",scanFailed:"\u041c\u0430\u043b\u044e\u043d\u0430\u043a \u043d\u0435\u043c\u0430\u0433\u0447\u044b\u043c\u0430 \u0456\u0434\u044d\u043d\u0442\u044b\u0444\u0456\u043a\u0430\u0432\u0430\u0446\u044c"}},modal:{help:"\u041f\u043e\u043c\u043e\u0433\u0438\u0442\u0435",sure:"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b???",mainPKr:"\u042d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0447\u0430\u0441\u0442\u044b\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043c\u0430\u0439\u043d\u0438\u043d\u0433.",pkr:"\u0410\u0434\u0440\u0435\u0441 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.",createWallet:"\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u0448\u0435\u043b\u0435\u043a",importWallet:"\u0418\u043c\u043f\u043e\u0440\u0442\u043d\u044b\u0439 \u043a\u043e\u0448\u0435\u043b\u0435\u043a",clearData:"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f",confirmClear:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0441\u0432\u043e\u0435\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438",clearTip:"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \xab\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c\xbb, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u0435\u043b\u044b\u0439 \u044d\u043a\u0440\u0430\u043d. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u043e \u0434\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e.",blockHeight:"\u0412\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u043c\u0443 DApp",dappTip1:"\u0412\u044b \u0430\u0442\u0440\u044b\u043c\u043b\u0456\u0432\u0430\u0435\u0446\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u0430 \u0441\u0442\u0430\u0440\u043e\u043d\u043d\u044f\u0433\u0430 DApp",dappTip2:"\u0412\u044b \u0437\u0431\u0456\u0440\u0430\u0435\u0446\u0435\u0441\u044f \u043d\u0430\u0432\u0435\u0434\u0430\u0446\u044c \u043f\u0440\u044b\u043a\u043b\u0430\u0434\u0430\u043d\u043d\u0435, \u0440\u0430\u0441\u043f\u0440\u0430\u0446\u0430\u0432\u0430\u043d\u0430\u0435 \u0442\u0440\u044d\u0446\u0456\u043c \u0431\u043e\u043a\u0430\u043c. \u041a\u0430\u043b\u0456 \u043b\u0430\u0441\u043a\u0430, \u0443\u0432\u0430\u0436\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0447\u044b\u0442\u0430\u0439\u0446\u0435 [",dappTip3:"\u043f\u0430\u0442\u044d\u043d\u0446\u044b\u0439\u043d\u044b\u044f \u0440\u044b\u0437\u044b\u043a\u0456 \u0430\u0434\u043c\u043e\u0432\u044b \u0430\u0434 \u0444\u043e\u043d\u0434\u0443 DApp \u0456 \u0444\u043e\u043d\u0434\u0443 SERO",dappTip4:"]",haveRead:"\u042f \u043f\u0440\u0430\u0447\u044b\u0442\u0430\u045e"},page:{wallet:{mainPKr:"mainPKr",PKr:"PKr",Assets:"\u0430\u043a\u0442\u0438\u0432\u044b",selectWallet:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u043e\u0448\u0435\u043b\u0435\u043a"},txList:{all:"\u0432\u0435\u0441\u044c",out:"\u043d\u0430\u0440\u0443\u0436\u0443",in:"\u0432",noData:"\u041d\u0438\u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435"},txDetail:{title:"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438",success:"\u0443\u0441\u043f\u0435\u0445",pending:"\u0412 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438",amount:"\u0441\u0443\u043c\u043c\u0430",fee:"\u0441\u0431\u043e\u0440\u044b",from:"\u043e\u0442",to:"\u043a",hash:"\u0425\u044d\u0448",block:"\u0431\u043b\u043e\u043a",goto:"\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043e\u0431\u043e\u0437\u0440\u0435\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u043b\u043e\u043a\u043e\u0432 >",pendingDesc:"\u041f\u0440\u0430\u0434\u0441\u0442\u0430\u045e\u043b\u0435\u043d\u0430, \u043a\u0430\u043b\u0456 \u043b\u0430\u0441\u043a\u0430, \u043f\u0430\u0447\u0430\u043a\u0430\u0439\u0446\u0435",contractSuccess:"\u041a\u0430\u043d\u0442\u0440\u0430\u043a\u0442 \u043f\u0430\u0441\u043f\u044f\u0445\u043e\u0432\u0430 \u0432\u044b\u043a\u043e\u043d\u0432\u0430\u0435\u0446\u0446\u0430!",contractFailed:"\u0412\u044b\u043a\u0430\u043d\u0430\u043d\u043d\u0435 \u043a\u0430\u043d\u0442\u0440\u0430\u043a\u0442\u0443 \u043d\u0435 \u0430\u0442\u0440\u044b\u043c\u0430\u043b\u0430\u0441\u044f!"},txTransfer:{balance:"\u041e\u0441\u0442\u0430\u0442\u043e\u043a \u0441\u0440\u0435\u0434\u0441\u0442\u0432",address:"\u0410\u0434\u0440\u0435\u0441",inputAmount:"\u0421\u0443\u043c\u043c\u0430 \u0432\u0432\u043e\u0434\u0430",inputAddress:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 SERO",fee:"\u0441\u0431\u043e\u0440\u044b",total:"\u0432\u0435\u0441\u044c",amount:"\u0441\u0443\u043c\u043c\u0430",gas:"\u0433\u0430\u0437",gasPrice:"\u0426\u0435\u043d\u0430 \u043d\u0430 \u0433\u0430\u0437",inputPassword:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c",passwordMsg:"\u041f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438",failed:"\u041d\u0435 \u0430\u0442\u0440\u044b\u043c\u0430\u043b\u0430\u0441\u044f \u0430\u0434\u043f\u0440\u0430\u0432\u0456\u0446\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u044b\u044e. \u041f\u0440\u0430\u0446\u044f\u0433\u0432\u0430\u0439\u0446\u0435 \u0441\u0456\u043d\u0445\u0440\u0430\u043d\u0456\u0437\u0430\u0432\u0430\u0446\u044c \u0430\u043f\u043e\u0448\u043d\u0456 \u0431\u043b\u043e\u043a!",thirdpay:"\u0413\u044d\u0442\u044b \u043f\u043b\u0430\u0446\u0435\u0436 \u0456\u043d\u0456\u0446\u044b\u044f\u0432\u0430\u043d\u044b \u0442\u0440\u044d\u0446\u0456\u043c \u0431\u043e\u043a\u0430\u043c, \u043a\u0430\u043b\u0456 \u0432\u044b \u0441\u0443\u043c\u043d\u044f\u0432\u0430\u0435\u0446\u0435\u0441\u044f, \u043a\u0430\u043b\u0456 \u043b\u0430\u0441\u043a\u0430, \u0442\u0440\u044d\u0446\u0456\u043c \u0431\u043e\u043a\u0430\u043c."},addressBook:{title:"\u0430\u0434\u0440\u0435\u0441\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430",add:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441",name:"\u0438\u043c\u044f",address:"\u0410\u0434\u0440\u0435\u0441",description:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)",detail:"\u0414\u0435\u0442\u0430\u043b\u044c \u0430\u0434\u0440\u0435\u0441\u0430"},walletManage:{mainPKr:"MainPKr",PKr:"PKr",passwordHint:"\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043f\u0430\u0440\u043e\u043b\u044f",export:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u0440\u0430\u0437\u0443",password:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c",changePasswordHint:"\u0421\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430",changeProfilePhoto:"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u043f\u0440\u043e\u0444\u0438\u043b\u044f",changeWalletName:"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u044f \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430"},setting:{language:"\u044f\u0437\u044b\u043a",unit:"\u0412\u0430\u043b\u044e\u0442\u043d\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430",node:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443\u0437\u043b\u0430",pkr:"\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 PKr",source:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430",cnNode:"\u0412\u0443\u0437\u0435\u043b 2 (\u041a\u0456\u0442\u0430\u0439)",enNode:"\u0412\u0443\u0437\u0435\u043b 1 (\u0433\u043b\u0430\u0431\u0430\u043b\u044c\u043d\u044b)"},create:{import:"\u0438\u043c\u043f\u043e\u0440\u0442",step1:{title:"\u0421\u043e\u0437\u0434\u0430\u0442\u044c SERO \u041a\u043e\u0448\u0435\u043b\u0435\u043a",walletName:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430",password:"\u043f\u0430\u0440\u043e\u043b\u044c",rePassword:"\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c",hint:"\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043a \u043f\u0430\u0440\u043e\u043b\u044e (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)",passwordTips:"\u041d\u0435 \u043c\u0435\u043d\u0435\u0435 8 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0435 \u0438 \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b, \u0446\u0438\u0444\u0440\u044b \u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044b."},step2:{title:"\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0421\u043e\u0432\u0435\u0442\u044b",d1:"\u0412\u043b\u0430\u0434\u0435\u043d\u0438\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u043a\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044e \u0432\u0441\u0435\u043c\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u043c\u0438",d2:"\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u041c\u043d\u0435\u043c\u043e\u043d\u0438\u043a\u0430",d3:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u043a\u0443. \u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043f\u043e\u0442\u0435\u0440\u044f\u043d, \u0443\u043a\u0440\u0430\u0434\u0435\u043d, \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d, Mnemonic \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u0430\u043a\u0442\u0438\u0432\u043e\u0432",d4:"Offline storage",d5:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043e\u0442 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0435 Mnemonic \u0432 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0440\u0435\u0434\u0435, \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u043a \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0430\u044f \u043f\u043e\u0447\u0442\u0430, \u0430\u043b\u044c\u0431\u043e\u043c\u044b, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0438 \u0442. \u0414.",d6:"\u041d\u0435 \u0441\u043d\u0438\u043c\u0430\u0439\u0442\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442.",d7:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0435 \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0438 \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0442\u0440\u0435\u0442\u044c\u0438\u043c\u0438 \u043b\u0438\u0446\u0430\u043c\u0438, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043e\u0442\u0435\u0440\u0435 \u0430\u043a\u0442\u0438\u0432\u043e\u0432."},step3:{title:"\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u041c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0424\u0440\u0430\u0437\u044b",d1:"\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0444\u0440\u0430\u0437\u0443-\u043c\u043d\u0435\u043c\u043e\u043d\u0438\u043a\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e"},step4:{title:"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435",d1:"\u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u0440\u0430\u0437\u0443 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435",skip:"\u0423\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f? \u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0448\u0430\u0433"}},import:{tips:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0444\u0440\u0430\u0437\u044b",inputTips:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0440\u0430\u0437\u044b, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438",name:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430",password:"\u041f\u0430\u0440\u043e\u043b\u044c \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430",rePassword:"\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c",hint:"\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043f\u0430\u0440\u043e\u043b\u044f"},my:{addressBook:"\u0410\u0434\u0440\u0435\u0441\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430",walletManage:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u043c",settings:"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438",termOfUse:"\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f",about:"\u041e \u043d\u0430\u0441",help:"FAQ",clear:"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f",address:{name:"\u0438\u043c\u044f",address:"\u0410\u0434\u0440\u0435\u0441",description:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)",add:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441",edit:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0410\u0434\u0440\u0435\u0441",detail:"\u0410\u0434\u0440\u0435\u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e"},manage:{mainPKr:"MainPKr",pkr:"PKr",hint:"\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043f\u0430\u0440\u043e\u043b\u044f",export:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u0440\u0430\u0437\u0443"}},dapp:{search:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 DApp URL",invalidDApp:"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 DApp URL",recent:"\u041d\u0435\u0434\u0430\u0432\u043d\u0438\u0439",popup:"\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0435",recommended:"\u0414\u0430\u0447\u0447\u044b\u043d\u044b DApps\u0421\u0443\u043f\u043e\u043b\u043a\u0430 \u043f\u0440\u0430\u0433\u0430\u043b\u0430\u0441\u0430\u0432\u0430\u043b\u0430 \u0437\u0430 \u0414\u043e\u043f\u0441\u0430",seroLab:"\u041b\u0430\u0431\u0430\u0440\u0430\u0442\u043e\u0440\u044b\u044f SERO"}}},this.ko_KR={key:"ko_KR",value:"\uc5b8\uc5b4",button:{confirm:"\ud655\uc778",cancel:"\ucde8\uc18c",next:"\ub2e4\uc74c \uac83",receive:"\ubc1b\ub2e4",transfer:"\ubcf4\ub0b4\uae30",add:"\ub354\ud558\ub2e4",save:"\uad6c\ud558\ub2e4",deleteAddress:"\uc0ad\uc81c",createWallet:"\uc6d4\ub81b \ub9cc\ub4e4\uae30",importWallet:"\uc218\uc785 \uc9c0\uac11",create:"\ucc3d\uc870\ud558\ub2e4",done:"\ub05d\ub09c",import:"\uac00\uc838\uc624\uae30",ok:"OK",openTip:"10 \uc6d4 31 \uc77c \uc624\ud508",update:"\uc5c5\ub370\uc774\ud2b8",repair:"\uc218\ub9ac \ub370\uc774\ud130",share:"\uacf5\uc720",copyLink:"\ub9c1\ud06c \ubcf5\uc0ac",refresh:"\uc0c8\ub85c \uace0\uce68",selectFromAlbum:"\uc568\ubc94\uc5d0\uc11c \uc120\ud0dd"},navbar:{wallet:"\uc9c0\uac11",dapp:"DApp",my:"\ub0b4"},toast:{info:{quitApp:"\ub2e4\uc2dc \ub204\ub974\uba74 \uc571\uc774 \uc885\ub8cc\ub429\ub2c8\ub2e4!",isLatest:"\uc774\ubbf8 \ucd5c\uc2e0 \ubc84\uc804\uc785\ub2c8\ub2e4!",createWallet:"\uba3c\uc800 \uc9c0\uac11\uc744 \ub9cc\ub4dc\uc2ed\uc2dc\uc624!",removeAccount:"\uacbd\uace0 : \uc81c\ub300\ub85c \ubc31\uc5c5\ud558\uc9c0 \uc54a\uc73c\uba74 \uc9c0\uac11\uc744 \uc0ad\uc81c \ud55c \ud6c4 \uc9c0\uac11\uc744 \uac80\uc0c9 \ud560 \uc218 \uc5c6\uc73c\ubbc0\ub85c\uc774 \uc791\uc5c5\uc744\uc8fc\uc758\ud574\uc11c \ucc98\ub9ac\ud558\uc2ed\uc2dc\uc624."},success:{add:"\uc131\uacf5\uc801\uc73c\ub85c \ucd94\uac00\ub418\uc5c8\uc2b5\ub2c8\ub2e4",copy:"\uc131\uacf5\uc801\uc73c\ub85c \ubcf5\uc0ac",create:"\uc6d4\ub81b\uc774 \uc131\uacf5\uc801\uc73c\ub85c \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4",export:"\uc131\uacf5\uc801\uc73c\ub85c \uc218\ucd9c",save:"\uc131\uacf5\uc801\uc73c\ub85c \uc800\uc7a5 \ub418\uc5c8\uc74c",import:"\uc131\uacf5\uc801\uc73c\ub85c \uac00\uc838\uc624\uae30",send:"\uc131\uacf5\uc801\uc73c\ub85c \ubcf4\ub0c4",clear:"\uc131\uacf5\uc801\uc73c\ub85c \ud074\ub9ac\uc5b4",operation:"\uc791\uc5c5 \uc131\uacf5"},loading:{creating:"\ub9cc\ub4dc\ub294 \uc911 ...",exporting:"\ub0b4\ubcf4\ub0b4\ub294 \uc911 ...",importing:"\uac00\uc838 \uc624\uae30 ...",sending:"\ubcf4\ub0b4\uae30...",deleting:"\uc0ad\uc81c...",synchronizing:"\ub3d9\uae30\ud654",synccompleted:"\ub3d9\uae30\ud654 \uc644\ub8cc!"},error:{passwordVerify:"\ube44\ubc00\ubc88\ud638 \ucd5c\uc18c 8 \uae00\uc790!",passwordNotMatch:"\ube44\ubc00\ubc88\ud638\uac00 \uc77c\uce58\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4!",incorrectOrder:"\ub2c8\ubaa8\ub2c9\uc758 \uc798\ubabb\ub41c \uc21c\uc11c!",invalidAddress:"\uc798\ubabb\ub41c \uc8fc\uc18c!",accountExisted:"\uacc4\uc815\uc774 \uc774\ubbf8 \uc874\uc7ac\ud569\ub2c8\ub2e4!",notEnough:"\uade0\ud615\uc774 \ucda9\ubd84\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4!",passwordError:"\ube44\ubc00\ubc88\ud638\uac00 \ub9de\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4!",notEnoughFee:"SERO\ub294 \uac00\uc2a4\ub97c \uc9c0\ubd88\ud558\uae30\uc5d0 \ucda9\ubd84\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4\uc218\uc218\ub8cc!",invalidMnemonic:"\uc798\ubabb\ub41c \ub2c8\ubaa8\ub2c9 !",clearData:"\uc815\ub9ac\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. \ub098\uc911\uc5d0 \ub2e4\uc2dc \uc2dc\ub3c4\ud558\uc2ed\uc2dc\uc624!",useFrom:"\uacb0\uc81c\ub97c \uc2dc\uc791\ud558\ub824\uba74 \uc9c0\uc815\ub41c \uacc4\uc815\uc744 \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624!",scanFailed:"\uc0ac\uc9c4\uc740 \uc2dd\ubcc4 \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4"}},modal:{help:"\ub3c4\uc6c0",sure:"\ud655\uc2e4\ud569\ub2c8\uae4c???",mainPKr:"\ucc44\uad74\uacfc \uac19\uc774 \uc790\uc8fc \uc218\uc9d1\ud558\ub294 \ub370 \uc0ac\uc6a9\ud560 \uc218\uc788\ub294 \uc218\uc9d1 \uc8fc\uc18c\uc785\ub2c8\ub2e4.",pkr:"\uc218\uc9d1 \uc8fc\uc18c\ub294 \uac01 \uc131\uacf5\uc801\uc778 \uac70\ub798 \ud6c4 \ubcc0\uacbd\ub429\ub2c8\ub2e4.",createWallet:"\uc6d4\ub81b \ub9cc\ub4e4\uae30",importWallet:"\uac00\uc838\uc624\uae30 \uc9c0\uac11",clearData:"\uba85\ud655\ud55c \uc571 \ub370\uc774\ud130",confirmClear:"\uacc4\uc815\uc744 \ubc31\uc5c5\ud588\ub294\uc9c0 \ud655\uc778\ud558\uc2ed\uc2dc\uc624. \uc571 \ub370\uc774\ud130\ub97c \uc9c0\uc6b4 \ud6c4 \ud2b8\ub79c\uc7ad\uc158 \ub370\uc774\ud130\uac00 \ub2e4\uc2dc \ub3d9\uae30\ud654\ub429\ub2c8\ub2e4.",clearTip:'"\ud655\uc778"\uc744 \ud074\ub9ad\ud558\uc5ec \ub370\uc774\ud130 \ub3d9\uae30\ud654\ub97c \uc2dc\uc791\ud558\uc2ed\uc2dc\uc624. \ucc98\ub9ac\ud558\ub294 \ub3d9\uc548 \ud770\uc0c9 \ud654\uba74\uc774 \ud45c\uc2dc \ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub370\uc774\ud130 \ub3d9\uae30\ud654\uac00 \uc644\ub8cc \ub420 \ub54c\uae4c\uc9c0 \uae30\ub2e4\ub9ac\uc2ed\uc2dc\uc624. \ud504\ub85c\uc138\uc2a4\ub97c \uac11\uc790\uae30 \uc885\ub8cc\ud558\uc9c0 \ub9c8\uc2ed\uc2dc\uc624.',blockHeight:"\uc790\uc0b0 \ubcf4\uc548\uc744 \uc704\ud574 \uba54\uc778 \uccb4\uc778 \ub4a4 12 \ube14\ub85d",dappTip1:"\ud0c0\uc0ac DApp\uc5d0 \uc561\uc138\uc2a4\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4",dappTip2:"\ud0c0\uc0ac\uc5d0\uc11c \uac1c\ubc1c \ud55c \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8\uc744 \ubc29\ubb38\ud558\ub824\uace0\ud569\ub2c8\ub2e4. \uc744 (\ub97c)\uc8fc\uc758 \uae4a\uac8c \uc77d\uc73c\uc2ed\uc2dc\uc624[",dappTip3:"DApp \ubc0f SERO Foundation\uc758 \uace0\uc9c0 \uc0ac\ud56d\uc758 \uc7a0\uc7ac\uc801 \uc704\ud5d8",dappTip4:"]",haveRead:"\uc77d\uc5c8\uc2b5\ub2c8\ub2e4."},page:{wallet:{mainPKr:"mainPKr",PKr:"PKr",Assets:"\uc790\uc0b0",selectWallet:"\uc9c0\uac11 \uc120\ud0dd"},txList:{all:"\ubaa8\ub4e0",out:"\uc544\uc6c3",in:"\uc5d0\uc11c",noData:"\ub370\uc774\ud130\uac00 \uc5c6\uc2b5\ub2c8\ub2e4"},txDetail:{title:"\uac70\ub798 \uc815\ubcf4",success:"\uc131\uacf5",pending:"\ubcf4\ub958 \uc911",amount:"\uc591",fee:"\uc218\uc218\ub8cc",from:"\ubd80\ud130",to:"\uc73c\ub85c",hash:"\ud574\uc2dc",block:"\ube14\ub85d",goto:"\uc790\uc138\ud55c \ub0b4\uc6a9\uc740 \ube14\ub85d \ud0d0\uc0c9\uae30\ub85c \uc774\ub3d9\ud558\uc2ed\uc2dc\uc624.>",pendingDesc:"\uc81c\ucd9c\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc7a0\uc2dc\ub9cc \uae30\ub2e4\ub824\uc8fc\uc138\uc694.",contractSuccess:"\uacc4\uc57d\uc774 \uc131\uacf5\uc801\uc73c\ub85c \uc2e4\ud589\ub418\uc5c8\uc2b5\ub2c8\ub2e4!",contractFailed:"\uacc4\uc57d \uccb4\uacb0 \uc2e4\ud328!"},txTransfer:{balance:"\uade0\ud615",address:"\uc8fc\uc18c",inputAmount:"\uc785\ub825 \uae08\uc561",inputAddress:"SERO \uc8fc\uc18c\ub97c \uc785\ub825\ud558\uc2ed\uc2dc\uc624",fee:"\uc218\uc218\ub8cc",total:"\ud569\uacc4",amount:"\uc591",gas:"\uac00\uc2a4",gasPrice:"\uac00\uc2a4 \uac00\uaca9",inputPassword:"\uc785\ub825 \ube44\ubc00\ubc88\ud638",passwordMsg:"\uacc4\uc815 \ube44\ubc00\ubc88\ud638",failed:"\uac70\ub798 \uc804\uc1a1 \uc2e4\ud328, \ucd5c\uc2e0 \ube14\ub85d\uacfc \ub3d9\uae30\ud654 \uc0c1\ud0dc\ub97c \uc720\uc9c0\ud558\uc2ed\uc2dc\uc624!",thirdpay:"\uc774 \uc9c0\ubd88\uc740 \uc81c 3\uc790\uac00 \uc2dc\uc791\ud569\ub2c8\ub2e4. \ud655\uc2e4\ud558\uc9c0 \uc54a\uc740 \uacbd\uc6b0 \uc81c 3\uc790\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624."},addressBook:{title:"\uc8fc\uc18c\ub85d",add:"\uc8fc\uc18c \ucd94\uac00",name:"\uc774\ub984",address:"\uc8fc\uc18c",description:"\uc124\uba85 (\uc120\ud0dd \uc0ac\ud56d)",detail:"\uc8fc\uc18c \uc138\ubd80 \uc0ac\ud56d"},walletManage:{mainPKr:"MainPKr",PKr:"PKr",passwordHint:"\uc554\ud638 \ud78c\ud2b8",export:"\ub2c8\ubaa8\ub2c9 \ubb38\uad6c \ub0b4\ubcf4\ub0b4\uae30",password:"\ube44\ubc00\ubc88\ud638 \uc785\ub825",changePasswordHint:"\ube44\ubc00\ubc88\ud638\ud78c\ud2b8\ubcc0\uacbd",changeProfilePhoto:"\ud504\ub85c\ud544 \uc0ac\uc9c4 \ubcc0\uacbd",changeWalletName:"\uc6d4\ub81b \uc774\ub984 \ubcc0\uacbd"},setting:{language:"\uc5b8\uc5b4",unit:"\ud1b5\ud654 \ub2e8\uc704",node:"\ub178\ub4dc \uc124\uc815",pkr:"PKr \ud655\uc778",source:"\uc6d4\ub81b \uc624\ud508 \uc18c\uc2a4 \ucee4\ubba4\ub2c8\ud2f0 \uc124\uc815",cnNode:"\ub178\ub4dc 2 (\uc911\uad6d \ubcf8\ud1a0)",enNode:"\ub178\ub4dc 1 (\uae00\ub85c\ubc8c)"},create:{import:"\uac00\uc838\uc624\uae30",step1:{title:"SERO Wallet \uc0dd\uc131",walletName:"\uc9c0\uac11 \uc774\ub984",password:"\uc554\ud638",rePassword:"\uc554\ud638 \ubc18\ubcf5",hint:"\uc554\ud638 \ud78c\ud2b8(\uc120\ud0dd \uc0ac\ud56d)",passwordTips:"\ucd5c\uc18c 8 \uc790, \ub300\ubb38\uc790\uc640 \uc18c\ubb38\uc790 \uc54c\ud30c\ubcb3, \uc22b\uc790 \ubc0f \uae30\ud638\ub97c \ud63c\ud569\ud558\ub294 \uac83\uc774 \uc88b\uc2b5\ub2c8\ub2e4."},step2:{title:"\ubc31\uc5c5 \ud301",d1:"\ub2c8\ubaa8\ub2c9\uc744 \uc18c\uc720\ud558\ub294 \uac83\uc740 \ubaa8\ub4e0 \uc790\uc0b0\uc744 \uc18c\uc720\ud558\ub294 \uac83\uacfc \uc720\uc0ac\ud569\ub2c8\ub2e4",d2:"\ubc31\uc5c5 \ub2c8\ubaa8\ub2c9",d3:"\ub2c8\ubaa8\ub2c9 \ubb38\uad6c\ub97c \uc801\uc5b4 \ub461\ub2c8\ub2e4. \ub2c8\ubaa8\ub2c9\uc740 \ud734\ub300 \uc804\ud654\ub97c \ubd84\uc2e4, \ub3c4\ub09c \ub2f9\ud558\uac70\ub098 \uc190\uc0c1\ub41c \uacbd\uc6b0 \uc790\uc0b0\uc744 \ubcf5\uad6c \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.",d4:"\uc624\ud504\ub77c\uc778 \uc800\uc7a5\uc18c",d5:"\uc778\ud130\ub137\uacfc \uaca9\ub9ac \ub41c \uc548\uc804\ud55c \uc7a5\uc18c\uc5d0 \ubcf4\uad00\ud558\uc2ed\uc2dc\uc624. \uc774\uba54\uc77c, \uc568\ubc94, \uc18c\uc15c \uc571 \ub4f1\uacfc \uac19\uc740 \ub124\ud2b8\uc6cc\ud06c \ud658\uacbd\uc5d0\uc11c Mnemonic\uc744 \uacf5\uc720\ud558\uac70\ub098 \uc800\uc7a5\ud558\uc9c0 \ub9c8\uc2ed\uc2dc\uc624.",d6:"Do not take screenshot .",d7:"\uc2a4\ud06c\ub9b0 \uc0f7\uc744 \uacf5\uc720\ud558\uac70\ub098 \uc800\uc7a5\ud558\uc9c0 \ub9c8\uc2ed\uc2dc\uc624. \ud0c0\uc0ac\uc5d0\uc11c \uc218\uc9d1 \ud55c \uc2a4\ud06c\ub9b0 \uc0f7\uc740 \uc790\uc0b0 \uc190\uc2e4\ub85c \uc774\uc5b4\uc9c8 \uc218 \uc788\uc2b5\ub2c8\ub2e4."},step3:{title:"\ub2c8\ubaa8\ub2c9 \ubb38\uad6c \ubc31\uc5c5",d1:"\uc81c\ub300\ub85c \ub2c8\ubaa8\ub2c9 \ud14d\uc2a4\ud2b8\ub97c\uc8fc\uc758\ud558\uace0 \uc548\uc804\ud558\uac8c \ubc31\uc5c5"},step4:{title:"\ud655\uc778",d1:"\uc62c\ubc14\ub978 \uc21c\uc11c\ub85c \ub2c8\ubaa8\ub2c9 \uad6c\ubb38\uc744 \uc120\ud0dd\ud558\uc2ed\uc2dc\uc624",skip:"\uc774\ubbf8 \ubc31\uc5c5 \ub418\uc5c8\uc2b5\ub2c8\uae4c? \uc774 \ub2e8\uacc4\ub97c \uac74\ub108 \ub6f0\uc2ed\uc2dc\uc624"}},import:{tips:"\uac00\uc838 \uc624\ub294 \ub3d9\uc548 \ube44\ubc00\ubc88\ud638\ub97c \uc7ac\uc124\uc815 \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4 \ub2c8\ubaa8\ub2c9 \ubb38\uad6c.",inputTips:"\uacf5\ubc31\uc73c\ub85c \uad6c\ubd84 \ub41c \ub2c8\ubaa8\ub2c9 \ubb38\uad6c\ub97c \uc785\ub825\ud558\uc2ed\uc2dc\uc624.",name:"\uc9c0\uac11 \uc774\ub984",password:"\uc6d4\ub81b \ube44\ubc00\ubc88\ud638",rePassword:"\uc554\ud638 \ubc18\ubcf5",hint:"\uc554\ud638 \ud78c\ud2b8"},my:{addressBook:"\uc8fc\uc18c\ub85d",walletManage:"\uc6d4\ub81b \uad00\ub9ac",settings:"\uc124\uc815",termOfUse:"\uc11c\ube44\uc2a4 \uc57d\uad00",about:"\uc6b0\ub9ac\uc5d0 \ub300\ud574",help:"\uc790\uc8fc\ud558\ub294 \uc9c8\ubb38",clear:"\uba85\ud655\ud55c \uc571 \ub370\uc774\ud130",address:{name:"\uc774\ub984",address:"\uc8fc\uc18c",description:"\uc124\uba85 (\uc120\ud0dd \uc0ac\ud56d)",add:"\uc8fc\uc18c \ucd94\uac00",edit:"\uc8fc\uc18c \ud3b8\uc9d1",detail:"\uc8fc\uc18c \uc138\ubd80 \uc0ac\ud56d"},manage:{mainPKr:"MainPKr",pkr:"PKr",hint:"\uc554\ud638 \ud78c\ud2b8",export:"\ub2c8\ubaa8\ub2c9 \ubb38\uad6c \ub0b4\ubcf4\ub0b4\uae30"}},dapp:{search:"DApp URL \uc785\ub825",invalidDApp:"\uc798\ubabb\ub41c DApp URL",recent:"\ucda9\uc801\uc138",popup:"\uc81c\uc548 \ub428",recommended:"\ucee4\ubba4\ub2c8\ud2f0 \ud22c\ud45c DApps",seroLab:"SERO \uc5f0\uad6c\uc18c"}}}};a.d(t,"d",(function(){return f})),a.d(t,"b",(function(){return m})),a.d(t,"a",(function(){return h})),a.d(t,"e",(function(){return g})),a.d(t,"c",(function(){return v}));var f=new u.a,m=new p,h=new l,g=new c,v=new d;new r.a(10).pow(new r.a(18))},103:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(116),o=a(48),s=a(89),i=a(90),c=a(219),l=a(27),u=a(220),p=a(313),d=a(27),f=a(39),m=a(221);function h(e){var t=e.toBuffer(),a=s.blake2b("SZK$PKR$HR$Z",t);return new o.FR(a)}function g(e){var t=e.toBuffer(),a=s.blake2b("SZK$PKR$HR$V",t);return new o.FR(a)}function v(e,t,a){var n=i.accountBase.mult(e),r=i.accountBase.mult(t);return{ZPKr:n.add(a.ZPK),VPKr:r.add(a.VPK)}}function y(e){return s.blake2b("SZK$PKR$KDF",e.toBuffer())}t.toHr_Z=h,t.toHr_V=g;var k=function(){function t(e,t,a){this.i=0,this.ZPKr=n.newPoint(e),this.VPKr=n.newPoint(t),this.BASEr=n.newPoint(a)}return t.prototype.toBuffer=function(){var t=e.alloc(96);return t.fill(this.ZPKr.toBuffer(),0),t.fill(this.VPKr.toBuffer(),32),t.fill(this.BASEr.toBuffer(),64),r.SetFlag(t),t},t.prototype.toString=function(){return d.default.bufferToBs58(this.toBuffer())},t.prototype.toHex=function(){return"0x"+this.toBuffer().toString("hex")},t}();function E(t){var a;if(t instanceof k)a=t;else{var o=void 0;o=t instanceof e?r.ClearFlag(t):r.ClearFlag(l.toBuffer(t)),f(96==o.length);var s=n.Point.bufferTo(o.slice(0,32));if(!s)return;var i=n.Point.bufferTo(o.slice(32,64));if(!i)return;var c=n.Point.bufferTo(o.slice(64));if(!c)return;a=new k(s,i,c)}return a}function b(e,t){return e=E(e),t=c.newTK(t),g(e.BASEr.mult(t.vsk)).add(t.vsk)}t.PKr=k,t.newPKr=E,t.pk2PKr=function(e,t){var a=v(h((e=r.newPK(e)).VPK.mult(t)),g(e.VPK.mult(t)),e),n=i.accountBase.mult(t);return new k(a.ZPKr,a.VPKr,n)},t.isMyPKr=function(e,t){e=c.newTK(e),t=E(t);var a=r.tk2PK(e),n=t.BASEr.mult(e.vsk),o=v(h(n),g(n),a);return!!o.VPKr.isEqualTo(t.VPKr)&&!!o.ZPKr.isEqualTo(t.ZPKr)},t.isPKrValid=function(e){var t=l.toBuffer(e);return!!r.IsFlagSet(t)&&!!E(t)},t.signPKr=function(e,t,a){e=c.newSK(e),a=E(a),t=l.toBuffer(t);var n=h(a.BASEr.mult(e.vsk)).add(e.zsk);return u.sign(t,n,i.accountBase)},t.verifyPKr=function(e,t,a){return e=l.toBuffer(e),t=l.toBuffer(t),a=E(a),u.verify(e,t,a.ZPKr,i.accountBase)},t.genZPKa=function(e,t){return e=E(e),t=o.newFR(t),e.ZPKr.mult(t)},t.signZPKa=function(e,t,a,n){e=l.toBuffer(e),t=c.newSK(t),a=o.newFR(a);var r=h((n=E(n)).BASEr.mult(t.vsk)).add(t.zsk),s=a.mul(r);return u.sign(e,s,i.accountBase)},t.verifyZPKa=function(e,t,a){return e=l.toBuffer(e),t=l.toBuffer(t),a=n.newPoint(a),u.verify(e,t,a,i.accountBase)},t.genNil=function(e,t,a){e=c.newTK(e),t=n.newPoint(t);var o=g((a=E(a)).BASEr.mult(e.vsk)).add(e.vsk),s=t.mult(o).toBuffer();return r.SetFlag(s),s},t.signNil=function(e,t,a,r){e=l.toBuffer(e),t=c.newTK(t),a=n.newPoint(a);var o=g((r=E(r)).BASEr.mult(t.vsk)).add(t.vsk);return p.sign(e,o,i.accountBase,a)},t.verifyNil=function(e,t,a,o,s){e=l.toBuffer(e),t=l.toBuffer(t),a=l.toBuffer(a),a=r.ClearFlag(a),o=n.newPoint(o),s=E(s);var c=n.newPoint(a);return p.verify(e,t,s.VPKr,c,i.accountBase,o)},t.genPKrKey=function(e,t){return e=E(e),t=o.newFR(t),{key:y(e.VPKr.mult(t)),rpk:i.accountBase.mult(t)}},t.fetchRPKKey=function(e,t,a){e=E(e),t=c.newTK(t),a=n.newPoint(a);var r=g(e.BASEr.mult(t.vsk)).add(t.vsk);return y(a.mult(r))},t.fetchVskr=b,t.pkrCrypte=function(e,t,a,n){e=l.toBuffer(e),t=E(t),a=c.newTK(a),n=E(n);var r=b(t,a),o=y(n.VPKr.mult(r));return m.default(e,o)},t.pkrEncrypt=function(t,a){t=l.toBuffer(t),a=E(a);var n=o.randomFR(),r=y(a.VPKr.mult(n)),s=m.default(t,r),c=i.accountBase.mult(n);return e.concat([c.toBuffer(),s])},t.pkrDecrypt=function(e,t,a){var r=(e=l.toBuffer(e)).slice(32,64),o=n.newPoint(e.slice(0,32)),s=b(t=E(t),a=c.newTK(a)),i=y(o.mult(s));return m.default(r,i)}}).call(this,a(23).Buffer)},116:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(219),o=a(90),s=a(39),i=a(27),c=a(27);function l(e){e[e.length-1]|=64}function u(t){var a=e.from(t);return a[t.length-1]&=-65,a}function p(e){return 0!=(64&e[e.length-1])}t.SetFlag=l,t.ClearFlag=u,t.IsFlagSet=p;var d=function(){function t(e,t){this.ZPK=n.newPoint(e),this.VPK=n.newPoint(t)}return t.prototype.toBuffer=function(){var t=e.alloc(64);return t.fill(this.ZPK.toBuffer(),0),t.fill(this.VPK.toBuffer(),32),l(t),t},t.prototype.toHex=function(){return"0x"+this.toBuffer().toString("hex")},t.prototype.toString=function(){return c.default.bufferToBs58(this.toBuffer())},t}();function f(e){if(e instanceof d)return e;var t=u(i.toBuffer(e));s(64==t.length);var a=n.Point.bufferTo(t.slice(0,32));if(a){var r=n.Point.bufferTo(t.slice(32));if(r)return new d(a,r)}}t.PK=d,t.newPK=f,t.tk2PK=function(e){e=r.newTK(e);var t=o.accountBase.mult(e.vsk);return new d(e.ZPK,t)},t.isPKValid=function(e){var t=i.toBuffer(e);return!!p(t)&&!!f(t)}}).call(this,a(23).Buffer)},131:function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return s}));var n=a(13),r=a(14),o=new Worker(e,{}),s=new(function(){function e(){Object(n.a)(this,e),this.callbackHandler=new Map,this.messageId=0;var t=this;t.callbackHandler=new Map,t.messageId=0,o.onmessage=function(e){var a=e.data,n=t.callbackHandler.get(a.messageId);t.callbackHandler.delete(a.messageId),n&&"function"===typeof n&&n(a)}}return Object(r.a)(e,[{key:"importMnemonic",value:function(e,t){var a={method:"importMnemonic",data:e};this.handlerMsg(a,t)}},{key:"createAccount",value:function(e,t){var a={method:"createAccount",data:e};this.handlerMsg(a,t)}},{key:"exportMnemonic",value:function(e,t){var a={method:"exportMnemonic",data:e};this.handlerMsg(a,t)}},{key:"getSK",value:function(e,t){var a={method:"getSK",data:e};this.handlerMsg(a,t)}},{key:"handlerMsg",value:function(e,t){if(t){var a=this.messageId++;e.messageId=a,console.log("account service handlerMsg: ",e),o.postMessage(e),this.callbackHandler.set(a,t)}}}]),e}())}).call(this,a(470))},143:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(48),r=a(27),o=a(90),s=a(39),i=function(){function t(t,a,o,s){"string"==typeof a&&(a=r.toBN(a).toArrayLike(e,"le",32)),t=r.toBuffer(t),a=n.newFR(a),o=r.toBuffer(o),s=r.toBuffer(s),this.tkn_currency=t,this.tkn_value=a,this.tkt_category=o,this.tkt_value=s}return t.prototype.isValid=function(){return 0==this.tkn_value.toBuffer()[31]&&0==this.tkn_value.toBuffer()[30]},t.prototype.hasTkt=function(){return 0!=e.compare(this.tkt_value,t.tkt_empty)},t.prototype.toBuffer=function(){return e.concat([this.tkn_currency,this.tkn_value.toBuffer(),this.tkt_category,this.tkt_value])},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t.tkt_empty=e.alloc(32,0),t}();function c(e){if(e instanceof i)return e;var t=r.toBuffer(e);s(128==t.length);var a=0,o=t.slice(a,32);a+=32;var c=n.newFR(t.slice(a,a+32));a+=32;var l=t.slice(a,a+32);a+=32;var u=t.slice(a,a+32);return new i(o,c,l,u)}function l(e){e=c(e);var t=o.genTknBase(e.tkn_currency).mult(e.tkn_value);if(e.hasTkt()){var a=o.genTktBase(e.tkt_category,e.tkt_value);return t.add(a)}return t}t.Asset=i,t.newAsset=c,t.genAssetCC=l,t.genAssetCM=function(e,t){var a=l(e=c(e));t=n.newFR(t);var r=o.crBase.mult(t);return a.add(r)}}).call(this,a(23).Buffer)},146:function(e,t,a){},150:function(e,t,a){"use strict";a.r(t),a.d(t,"sortTxMap",(function(){return m})),a.d(t,"genTxMap",(function(){return f})),a.d(t,"genTxInfo",(function(){return u})),a.d(t,"convertTx",(function(){return p})),a.d(t,"cutZero",(function(){return h}));var n=a(393),r=a(27),o=a.n(r),s=a(15),i=a.n(s),c=a(42),l=a(1);function u(e,t,a,n){var s=l.d.get(n),u=l.d.get(a);if(u&&s&&s.Asset&&s.Asset.Tkn){var p=o.a.hexToCy(s.Asset.Tkn.Currency),f=d(s),m=new i.a(u.GasUsed).multipliedBy(u.GasPrice).dividedBy(new i.a(10).pow(18)),h=c.a.convert(s.Asset.Tkn.Value,p);console.log(n,s.Asset.Tkn.Value,h),"out"===e&&(h=new i.a(h).multipliedBy(-1));var g=t.get(a+p);if(g){var v=g.value;g.value=new i.a(v).plus(new i.a(h))}else g={root:n,type:e,hash:a,block:u.Num,currency:p,value:new i.a(h),fee:m,gas:u.Gas,gasUsed:u.GasUsed,gasPrice:u.GasPrice,time:u.Time,from:u.From,to:Object(r.addrToString)(f),blockHash:u.BlockHash};g.from!==Object(r.addrToString)(f)&&(g.To=g.from),t.set(a+p,g)}}function p(e){-1===new i.a(e.value).comparedTo(0)&&(e.type="out",e.value=new i.a(e.value).plus(e.fee).toString(10)),e.fee=new i.a(e.fee).toFixed(8),e.value=new i.a(e.value).toFixed(8)}function d(e){var t="";return e.State.OS.Out_C?t=e.State.OS.Out_C.PKr:e.State.OS.Out_O?t=e.State.OS.Out_O.Addr:e.State.OS.Out_P?t=e.State.OS.Out_P.PKr:e.State.OS.Out_Z&&(t=e.State.OS.Out_Z.PKr),t}function f(e,t,a,n,r){var s=l.d.get(e),c=l.d.get(t);if(s&&s.Asset&&s.Asset.Tkn&&c){var u=o.a.hexToCy(s.Asset.Tkn.Currency);if(a&&a===u){var p=t+u,f=c.Num;if("0x0000000000000000000000000000000000000000000000000000000000000001"===t||"0x0000000000000000000000000000000000000000000000000000000000000002"===t||"0x0000000000000000000000000000000000000000000000000000000000000003"===t){var m=d(s);p=s.State.Num+m,f=s.State.Num}var h=n.get(p),g=new i.a(s.Asset.Tkn.Value);if("out"===r&&(g=new i.a(g).multipliedBy(-1)),h){var v=h.value;h.value=new i.a(v).plus(new i.a(g))}else h={root:e,type:r,hash:t,block:f,currency:u,value:new i.a(g),fee:new i.a(c.GasUsed?c.GasUsed:c.Gas).multipliedBy(c.GasPrice),gas:c.Gas,gasUsed:c.GasUsed,gasPrice:c.GasPrice,time:c.Time,blockHash:c.BlockHash};n.set(p,h)}}}function m(e){var t=new Map;return e.forEach((function(e,a,n){new i.a(e.value).isNegative()&&(e.type="out","SERO"===e.currency&&(e.value=new i.a(e.value).plus(e.fee))),e.value.isZero()||(e.value=c.a.convert(e.value,e.currency),t.set(a,e))})),new Map(Object(n.a)(t.entries()).sort((function(e,t){return e[1].blockt[1].block?-1:0})))}function h(e){if(e.indexOf(".")>-1&&"0"==e.charAt(e.length-1))for(var t=e.length-1;t>0;t--)if("0"!=e.charAt(t))return"."==e.charAt(t)?e.substring(0,t):e.substring(0,t+1);return e}},167:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(27),o=a(314),s=a(48),i=a(90),c=a(39),l=a(27),u=a(116),p=function(){function t(e,t,a){this.ZPK=n.newPoint(e),this.VPK=n.newPoint(t),this.BASE=n.newPoint(a),c(this.isValid())}return t.prototype.isValid=function(){return this.ZPK.isValid()&&this.VPK.isValid()&&this.BASE.isValid()},t.prototype.toBuffer=function(){return e.concat([this.ZPK.toBuffer(),this.VPK.toBuffer(),this.BASE.toBuffer()])},t.prototype.toString=function(){return l.default.bufferToBs58(this.toBuffer())},t}();function d(e){if(e instanceof p)return e;var t=r.toBuffer(e);return c(96==t.length),new p(n.newPoint(t.slice(0,32)),n.newPoint(t.slice(32,64)),n.newPoint(t.slice(64,96)))}t.PKr=p,t.newPKr=d,t.isPKrValid=function(e){var t=r.toBuffer(e);return!u.IsFlagSet(t)&&!!d(t).isValid()},t.pk2PKr=function(e,t){e=o.newPK(e),t=s.newFR(t);var a=e.ZPK.mult(t).add(e.ZPK),n=e.VPK.mult(t).add(e.VPK),r=i.accountBase.mult(t);return new p(a,n,r)}}).call(this,a(23).Buffer)},171:function(e,t,a){},178:function(e,t,a){"use strict";var n=a(13),r=a(14),o=function(){function e(){Object(n.a)(this,e)}return Object(r.a)(e,[{key:"clear",value:function(){this._clear(),this._clearPlus()}},{key:"_clear",value:function(){window.localStorage.clear()}},{key:"_clearPlus",value:function(){try{plus&&plus.storage&&plus.storage.clear()}catch(e){console.log(e.message)}}},{key:"get",value:function(e){var t=this._get(e),a=this._getPlus(e);return 0===t?t:t||a}},{key:"_get",value:function(e){var t=window.localStorage.getItem(e);return t||"0"===t?JSON.parse(t):null}},{key:"_getPlus",value:function(e){try{if(plus&&plus.storage){var t=plus.storage.getItem(e);return t||"0"===t?JSON.parse(t):null}return null}catch(a){console.log(a.message)}}},{key:"key",value:function(e){return this._key(e)||this._keyPlus(e)}},{key:"_key",value:function(e){return window.localStorage.key(e)}},{key:"_keyPlus",value:function(e){try{if(plus&&plus.storage)return plus.storage.key(e)}catch(t){console.log(t.message)}}},{key:"delete",value:function(e){this._delete(e),this._deletePlus(e)}},{key:"_delete",value:function(e){window.localStorage.removeItem(e)}},{key:"_deletePlus",value:function(e){try{plus&&plus.storage&&plus.storage.removeItem(e)}catch(t){console.log(t.message)}}},{key:"set",value:function(e,t){try{this._set(e,t)}catch(a){window.localStorage.removeItem(e),this._setPlus(e,t)}}},{key:"_set",value:function(e,t){window.localStorage.setItem(e,JSON.stringify(t))}},{key:"_setPlus",value:function(e,t){try{plus&&plus.storage&&plus.storage.setItem(e,JSON.stringify(t))}catch(a){console.log(a.message)}}},{key:"has",value:function(e){return this._has(e)||this._hasPlus(e)}},{key:"_has",value:function(e){return!!window.localStorage.getItem(e)}},{key:"_hasPlus",value:function(e){try{if(plus&&plus.storage)return!!plus.storage.getItem(e)}catch(t){consol}}},{key:"length",value:function(){return this._length()||this._lengthPlus()}},{key:"_length",value:function(){return window.localStorage.length}},{key:"_lengthPlus",value:function(){if(plus&&plus.storage)return plus.storage.getLength()}}]),e}();t.a=o},181:function(e,t,a){e.exports=a.p+"static/media/logo.2f0a4ff7.png"},204:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(97),r=new n("21888242871839275222246405745257275088548364400416034343698204186575808495617"),o=new n("2736030358979909402780800718157159386076813972158567259200215660948447373041"),s={ECC_A:new n("168700"),ECC_D:new n("168696"),FQ_MODULUS:r,FR_MODULUS:o,CRS:e.from("096b36a5804bfacef1691e173c366a47ff5ba84a44f26ddd7e8d9f79d5b42df0","hex").reverse()};t.default=s}).call(this,a(23).Buffer)},219:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(89),r=a(48),o=a(62),s=a(90),i=a(27),c=a(39),l=a(116),u=function(){function t(e,t){this.zsk=r.newFR(e),this.vsk=r.newFR(t)}return t.prototype.isValid=function(){return!this.zsk.isZero()&&!this.vsk.isZero()},t.prototype.toBuffer=function(){var t=e.alloc(64);return t.fill(this.zsk.toBuffer(),0),t.fill(this.vsk.toBuffer(),32),l.SetFlag(t),t},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t}();function p(e){if(e instanceof u)return e;var t=i.toBuffer(e);return 64>>=8,e[t+1]=a,a>>>=8,e[t+2]=a,a>>>=8,e[t+3]=a},e.ROTATE=function(e,t){return e<>>32-t},e}(),n=e.alloc(16,0);n.fill(0),t.default=function(t,r){var o=new a(r,n,0),s=e.alloc(t.length);return o.encrypt(s,t),s}}).call(this,a(23).Buffer)},222:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(48),o=a(90),s=a(89),i=a(313),c=a(220),l=a(167),u=a(27),p=a(39),d=a(223);t.fetchKey=function(t,a){t=d.newTK(t),a=e.from(u.toBuffer(a)),p(32==a.length),64&a[31]&&(a[31]&=-65);var r=n.newPoint(a);if(r){var o=r.mult(t.vsk);return s.blake2b("CZERO.KEYS.KDF",o.toBuffer())}},t.genPKrKey=function(e,t){e=l.newPKr(e),t=r.newFR(t);var a=e.ZPK.mult(t),n=e.VPK.mult(t),o=a.toBuffer(),i=s.blake2b("CZERO.KEYS.KDF",n.toBuffer());return o[31]|=64,{key:i,rpk:o}},t.signByPKr=function(e,t,a){if(t=u.toBuffer(t),e=d.newSK(e),a=l.newPKr(a),p(32==t.length),t&&0!=t.length&&e.isValid()&&a.isValid()){var n=a.BASE.add(o.accountBase.points.get(0));return c.sign(t,e.vsk.mul(e.zsk),n)}},t.verifyByPKr=function(e,t,a){if(e=u.toBuffer(e),t=u.toBuffer(t),a=l.newPKr(a),p(32==e.length),!e||0==e.length||!t||0==t.length||!a.isValid())return!1;var n=a.BASE.add(o.accountBase.points.get(0));return c.verify(e,t,a.VPK,n)},t.genNil=function(e,t){if(e=d.newSK(e),t=n.newPoint(t),e.isValid()&&t.isValid())return t.mult(e.vsk.mul(e.zsk))},t.signNil=function(e,t,a,r){if(e=u.toBuffer(e),t=d.newSK(t),a=l.newPKr(a),r=n.newPoint(r),p(32==e.length),e&&0!=e.length&&t.isValid()&&a.isValid()&&r.isValid()){var s=a.BASE.add(o.accountBase.points.get(0));return i.sign(e,t.vsk.mul(t.zsk),s,r)}},t.verifyNil=function(e,t,a,r,s){if(e=u.toBuffer(e),t=u.toBuffer(t),a=n.newPoint(a),r=l.newPKr(r),s=n.newPoint(s),p(32==e.length),p(96==t.length),!(e&&0!=e.length&&t&&0!=t.length&&r.isValid()&&s.isValid()))return!1;var c=r.BASE.add(o.accountBase.points.get(0));return i.verify(e,t,r.VPK,a,c,s)},t.genTrace=function(e,t){if(e=d.newTK(e),t=n.newPoint(t),e.isValid()&&t.isValid())return t.mult(e.vsk)},t.isMyPKr=function(e,t){if(e=d.newTK(e),t=l.newPKr(t),!e.isValid()||!t.isValid())return!1;var a=t.ZPK.add(e.ZPK.mult(r.FR.ONE.nega())).mult(e.vsk),n=t.VPK.add(e.ZPK.mult(e.vsk.mul(r.FR.ONE.nega())));return a.isEqualTo(n)}}).call(this,a(23).Buffer)},223:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(89),r=a(48),o=a(62),s=a(90),i=a(27),c=a(39),l=function(){function t(e,t){this.zsk=r.newFR(e),this.vsk=r.newFR(t)}return t.prototype.isValid=function(){return!this.zsk.isZero()&&!this.vsk.isZero()},t.prototype.toBuffer=function(){var t=e.alloc(64);return t.fill(this.zsk.toBuffer(),0),t.fill(this.vsk.toBuffer(),32),t},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t}();function u(e){if(e instanceof l)return e;var t=i.toBuffer(e);return 64>>4).toString(16)),t.push((15&e[a]).toString(16));return"0x"+t.join("")},hexToBytes:function(t){var a=e.from(o(t),"hex");return new Uint8Array(a)},utf8ToHex:v,bs58ToHex:function(e){return"0x"+r.decode(e).toString("hex")},bytesToBase58:function(e){return r.encode(e.buffer)},padLeft:m,padRight:f,bufferToHex:function(e){return"0x"+e.toString("hex")},cyToHex:function(e){return"0x"+m(v(e.toUpperCase()),64,"0")},hexToBN:function(e){return E(o(e))},hexToCy:k,toBN:E,isNotNull:function(e){return!c(e)&&void 0!==e},toBuffer:b,bufferToBN:function(e){return new n(e,"le")},isEmptyBuffer:function(t,a){return void 0===a&&(a=32),0==t.length||0==e.alloc(a).compare(t)},bufferToBs58:function(e){return r.encode(e)},addrToString:d};t.default=w}).call(this,a(23).Buffer)},310:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(311),r=a(48),o=a(312),s=a(97),i=a(39),c=a(62),l=function(){function t(e,t,a,n){this.personal=e,this.SegNum=t,this.SegBitsNum=a,this.Bits=n,this.indexPoints=new Map,this.points=new Map,this.init()}return t.prototype.init=function(){for(var t=new s(2).pow(new s(this.Bits)),a=Math.ceil(this.SegBitsNum/this.Bits),o=new r.FR(t),c=0;cthis.SegNum*this.SegBitsNum&&i(!1,"bigBuffer.length > SegNum * SegBitsNum");for(var n=Math.ceil(this.SegBitsNum/this.Bits),s=Math.ceil(a.bitsLength()/this.SegBitsNum),l=c.Point.ZERO,u=0;u=i),this.bitsLen=r,this.rightBits=a%8,this.buf=e.from(t.slice(Math.floor(a/8),Math.floor((s-1)/8)+1)),this.buf[this.buf.length-1]&=o.get(s%8)}return t.prototype.toBigNumber=function(){return new r(this.buf,"le").shrn(this.rightBits)},t.prototype.bitsLength=function(){return this.bitsLen},t.from=function(e,a,n){return new t(e.buf,a+e.rightBits,n)},t}();t.BitBuffer=s}).call(this,a(23).Buffer)},313:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(48),o=a(39),s=a(89),i=a(166);function c(e){return s.blake2b("SZK$DSAN$HASH2",e)}function l(e){return new i(e)}t.sign=function(t,a,n,o){var i=e.concat([l(32),a.toBuffer(),t]),u=new r.FR(function(e){return s.blake2b("SZK$DSAN$HASH1",e)}(i)),p=n.mult(u);if(p&&!p.isZero()&&p.isValid()){var d=o.mult(u);if(d&&!d.isZero()&&d.isValid()){var f=n.mult(a);if(f&&!f.isZero()&&f.isValid()){var m=o.mult(a);if(m&&!m.isZero()&&m.isValid()){var h=e.concat([p.toBuffer(),d.toBuffer(),f.toBuffer(),m.toBuffer(),t]),g=new r.FR(c(h)),v=u.add(a.mul(g));return e.concat([v.toBuffer(),p.toBuffer(),d.toBuffer()])}}}}},t.verify=function(t,a,s,i,l,u){if(o(96==a.length,"sign.length != 96"),!s||s.isZero()||!s.isValid())return!1;if(!i||i.isZero()||!i.isValid())return!1;var p=new r.FR(a.slice(0,32)),d=n.Point.bufferTo(a.slice(32,64)),f=n.Point.bufferTo(a.slice(64,96));if(!p||p.isZero())return!1;if(!d||d.isZero()||!d.isValid())return!1;if(!f||f.isZero()||!f.isValid())return!1;var m=l.mult(p);if(!m||m.isZero()||!m.isValid())return!1;var h=u.mult(p);if(!h||h.isZero()||!h.isValid())return!1;var g=e.concat([d.toBuffer(),f.toBuffer(),s.toBuffer(),i.toBuffer(),t]),v=new r.FR(c(g)),y=s.mult(v),k=d.add(y);if(!m.isEqualTo(k))return!1;var E=i.mult(v),b=f.add(E);return!!h.isEqualTo(b)}}).call(this,a(23).Buffer)},314:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(27),o=a(39),s=a(223),i=function(){function t(e,t){this.ZPK=n.newPoint(e),this.VPK=n.newPoint(t)}return t.prototype.toBuffer=function(){return e.concat([this.ZPK.toBuffer(),this.VPK.toBuffer()])},t.prototype.toString=function(){return r.default.bufferToBs58(this.toBuffer())},t}();t.PK=i,t.newPK=function(e){if(e instanceof i)return e;var t=r.toBuffer(e);o(64==t.length);var a=n.Point.bufferTo(t.slice(0,32)),s=n.Point.bufferTo(t.slice(32,64));return new i(a,s)},t.tk2PK=function(e){var t=(e=s.newTK(e)).ZPK,a=e.ZPK.mult(e.vsk);return new i(t,a)}}).call(this,a(23).Buffer)},315:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(143),r=a(48),o=a(27),s=a(221),i=a(39),c=function(){function t(e,t,a){this.asset=n.newAsset(e),this.memo=o.toBuffer(t),this.ar=r.newFR(a)}return t.prototype.isValid=function(){return!!this.asset.isValid()&&!this.ar.isZero()},t.prototype.toBuffer=function(){return e.concat([this.asset.toBuffer(),this.memo,this.ar.toBuffer()])},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t}();function l(e){if(e instanceof c)return e;var t=o.toBuffer(e);i(224==t.length);var a=0,s=128,l=n.newAsset(t.slice(a,a+s));a+=s,s=64;var u=t.slice(a,a+s);a+=s,s=32;var p=r.newFR(t.slice(a,a+s));return new c(l,u,p)}t.Info=c,t.newInfo=l,t.encInfo=function(e,t){e=o.toBuffer(e);var a=(t=l(t)).toBuffer();return s.default(a,e)},t.decEInfo=function(e,t){return e=o.toBuffer(e),t=o.toBuffer(t),l(s.default(t,e))}}).call(this,a(23).Buffer)},335:function(e,t,a){"use strict";(function(e){var n=this&&this.__awaiter||function(e,t,a,n){return new(a=a||Promise)((function(r,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function i(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a((function(e){e(t)}))).then(s,i)}c((n=n.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var a,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(o){return function(i){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=0<(r=s.trys).length&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]>>> ",d,f),[4,t.findRoots(e.From,s.default.hexToCy(d),f)]);case 4:return m=r.sent(),console.log("result >>>> ",m),m&&(m.remain.isNeg()||m.remain.isZero())?(o.push.apply(o,m.utxos),[3,3]):[2,new Promise((function(e,t){t("no enough unlocked utxos")}))];case 5:return[2,new Promise((function(e){e(o)}))]}}))}))},t.buildTxParam=function(t,a){return n(this,void 0,void 0,(function(){var n,o,c,u,p,d,f,m,h,g,v,y,k;return r(this,(function(r){switch(r.label){case 0:return n=new Array,a.Utxos.forEach((function(e){n.push(e.Root)})),[4,t.getAnchor(n)];case 1:if(null===(o=r.sent()))throw new Error("can not find Anchor by root");if(c=new Array,u=0,p=new l(!1,a.Fee),a.Utxos.forEach((function(t,a){if(null===t.State)throw new Error("can not find out by root");p.AddIn(t.Asset),c.push({SKr:s.toString(e.alloc(96)),Out:{Root:t.Root,State:t.State},Witness:o[a]}),s.default.isNotNull(t.State.OS.Out_O)&&u++})),2500 2500");for(d=new Array,a.Receptions.forEach((function(t){p.AddOut(t.Asset),d.push({PKr:s.toHex(t.Addr),Asset:t.Asset,Memo:s.toString(e.alloc(64))})})),null!==a.Cmds&&null!==(f=new i(a.Cmds).OutAsset())&&p.AddOut(f),m=p.GetTknList(),h=p.GetTktList(),g=Math.max(m.length,h.length),v=0;v"+n.operator+" > "+n.content+""):(a=t.callbackHandler.get(n.messageId),t.callbackHandler.delete(n.messageId),a&&"function"==typeof a&&a(n))}}return t.prototype.init=function(e,t,a){var n={rpc:e,syncTime:t},o={method:r.Method.Init,data:n};this.handlerMsg(o,a)},t.prototype.initAccount=function(e,t){var a={method:r.Method.InitAccount,data:e};this.handlerMsg(a,t)},t.prototype.balanceOf=function(e,t){var a={method:r.Method.BalanceOf,data:e};this.handlerMsg(a,t)},t.prototype.ticketsOf=function(e,t){var a={method:r.Method.TicketsOf,data:e};this.handlerMsg(a,t)},t.prototype.getTxList=function(e,t){var a={method:r.Method.GetTxList,data:e};this.handlerMsg(a,t)},t.prototype.getTxDetail=function(e,t,a){var n={method:r.Method.GetTxDetail,data:{tk:e,hash:t}};this.handlerMsg(n,a)},t.prototype.getPKrIndex=function(e,t){var a={method:r.Method.GetPKrIndex,data:e};this.handlerMsg(a,t)},t.prototype.commitTx=function(e,t){var a={method:r.Method.CommitTx,data:e};this.handlerMsg(a,t)},t.prototype.getSeroPrice=function(e,t){var a={method:r.Method.GetPrice,data:e};this.handlerMsg(a,t)},t.prototype.clearData=function(e,t){var a={method:r.Method.ClearData,data:e};this.handlerMsg(a,t)},t.prototype.getSyncState=function(e,t){var a={method:r.Method.HealthyCheck,data:e};this.handlerMsg(a,t)},t.prototype.getPendingAndConfirming=function(e,t){var a={method:r.Method.GetPendingAndConfirming,data:e};this.handlerMsg(a,t)},t.prototype.handlerMsg=function(e,t){var a;t&&(a=this.messageId++,e.messageId=a,n.postMessage(e),this.callbackHandler.set(a,t))},t}();t.PopupService=o}).call(this,a(468))},371:function(e,t,a){e.exports=a.p+"static/media/NONT.2a63a1cf.png"},372:function(e,t,a){e.exports=a.p+"static/media/HAPY.f7229625.png"},373:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAABcSAAAXEgFnn9JSAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABxmkCZrcCjg/1xYW52rlKO58sEQjFu9+cj/seFf/2OKdHiNLFcLBWK8ViJuFAiTcd5uVKRRCHJleIS6X8y8R+W/QmTdw0ArIZPwE62B7XLbMB+7gECiw5Y0nYAQH7zLYwaC5EAEGc0Mnn3AACTv/mPQCsBAM2XpOMAALzoGFyolBdMxggAAESggSqwQQcMwRSswA6cwR28wBcCYQZEQAwkwDwQQgbkgBwKoRiWQRlUwDrYBLWwAxqgEZrhELTBMTgN5+ASXIHrcBcGYBiewhi8hgkEQcgIE2EhOogRYo7YIs4IF5mOBCJhSDSSgKQg6YgUUSLFyHKkAqlCapFdSCPyLXIUOY1cQPqQ28ggMor8irxHMZSBslED1AJ1QLmoHxqKxqBz0XQ0D12AlqJr0Rq0Hj2AtqKn0UvodXQAfYqOY4DRMQ5mjNlhXIyHRWCJWBomxxZj5Vg1Vo81Yx1YN3YVG8CeYe8IJAKLgBPsCF6EEMJsgpCQR1hMWEOoJewjtBK6CFcJg4Qxwicik6hPtCV6EvnEeGI6sZBYRqwm7iEeIZ4lXicOE1+TSCQOyZLkTgohJZAySQtJa0jbSC2kU6Q+0hBpnEwm65Btyd7kCLKArCCXkbeQD5BPkvvJw+S3FDrFiOJMCaIkUqSUEko1ZT/lBKWfMkKZoKpRzame1AiqiDqfWkltoHZQL1OHqRM0dZolzZsWQ8ukLaPV0JppZ2n3aC/pdLoJ3YMeRZfQl9Jr6Afp5+mD9HcMDYYNg8dIYigZaxl7GacYtxkvmUymBdOXmchUMNcyG5lnmA+Yb1VYKvYqfBWRyhKVOpVWlX6V56pUVXNVP9V5qgtUq1UPq15WfaZGVbNQ46kJ1Bar1akdVbupNq7OUndSj1DPUV+jvl/9gvpjDbKGhUaghkijVGO3xhmNIRbGMmXxWELWclYD6yxrmE1iW7L57Ex2Bfsbdi97TFNDc6pmrGaRZp3mcc0BDsax4PA52ZxKziHODc57LQMtPy2x1mqtZq1+rTfaetq+2mLtcu0W7eva73VwnUCdLJ31Om0693UJuja6UbqFutt1z+o+02PreekJ9cr1Dund0Uf1bfSj9Rfq79bv0R83MDQINpAZbDE4Y/DMkGPoa5hpuNHwhOGoEctoupHEaKPRSaMnuCbuh2fjNXgXPmasbxxirDTeZdxrPGFiaTLbpMSkxeS+Kc2Ua5pmutG003TMzMgs3KzYrMnsjjnVnGueYb7ZvNv8jYWlRZzFSos2i8eW2pZ8ywWWTZb3rJhWPlZ5VvVW16xJ1lzrLOtt1ldsUBtXmwybOpvLtqitm63Edptt3xTiFI8p0in1U27aMez87ArsmuwG7Tn2YfYl9m32zx3MHBId1jt0O3xydHXMdmxwvOuk4TTDqcSpw+lXZxtnoXOd8zUXpkuQyxKXdpcXU22niqdun3rLleUa7rrStdP1o5u7m9yt2W3U3cw9xX2r+00umxvJXcM970H08PdY4nHM452nm6fC85DnL152Xlle+70eT7OcJp7WMG3I28Rb4L3Le2A6Pj1l+s7pAz7GPgKfep+Hvqa+It89viN+1n6Zfgf8nvs7+sv9j/i/4XnyFvFOBWABwQHlAb2BGoGzA2sDHwSZBKUHNQWNBbsGLww+FUIMCQ1ZH3KTb8AX8hv5YzPcZyya0RXKCJ0VWhv6MMwmTB7WEY6GzwjfEH5vpvlM6cy2CIjgR2yIuB9pGZkX+X0UKSoyqi7qUbRTdHF09yzWrORZ+2e9jvGPqYy5O9tqtnJ2Z6xqbFJsY+ybuIC4qriBeIf4RfGXEnQTJAntieTE2MQ9ieNzAudsmjOc5JpUlnRjruXcorkX5unOy553PFk1WZB8OIWYEpeyP+WDIEJQLxhP5aduTR0T8oSbhU9FvqKNolGxt7hKPJLmnVaV9jjdO31D+miGT0Z1xjMJT1IreZEZkrkj801WRNberM/ZcdktOZSclJyjUg1plrQr1zC3KLdPZisrkw3keeZtyhuTh8r35CP5c/PbFWyFTNGjtFKuUA4WTC+oK3hbGFt4uEi9SFrUM99m/ur5IwuCFny9kLBQuLCz2Lh4WfHgIr9FuxYji1MXdy4xXVK6ZHhp8NJ9y2jLspb9UOJYUlXyannc8o5Sg9KlpUMrglc0lamUycturvRauWMVYZVkVe9ql9VbVn8qF5VfrHCsqK74sEa45uJXTl/VfPV5bdra3kq3yu3rSOuk626s91m/r0q9akHV0IbwDa0b8Y3lG19tSt50oXpq9Y7NtM3KzQM1YTXtW8y2rNvyoTaj9nqdf13LVv2tq7e+2Sba1r/dd3vzDoMdFTve75TsvLUreFdrvUV99W7S7oLdjxpiG7q/5n7duEd3T8Wej3ulewf2Re/ranRvbNyvv7+yCW1SNo0eSDpw5ZuAb9qb7Zp3tXBaKg7CQeXBJ9+mfHvjUOihzsPcw83fmX+39QjrSHkr0jq/dawto22gPaG97+iMo50dXh1Hvrf/fu8x42N1xzWPV56gnSg98fnkgpPjp2Snnp1OPz3Umdx590z8mWtdUV29Z0PPnj8XdO5Mt1/3yfPe549d8Lxw9CL3Ytslt0utPa49R35w/eFIr1tv62X3y+1XPK509E3rO9Hv03/6asDVc9f41y5dn3m978bsG7duJt0cuCW69fh29u0XdwruTNxdeo94r/y+2v3qB/oP6n+0/rFlwG3g+GDAYM/DWQ/vDgmHnv6U/9OH4dJHzEfVI0YjjY+dHx8bDRq98mTOk+GnsqcTz8p+Vv9563Or59/94vtLz1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAABbxSURBVHja7J17uFRV3cc/a5+BjcYl4NiNnvdtv3FQUzBJK8vj7XnfthfELpqSWmmpaJl4Q7wmpvXiFa28VGZvCampBwTF0RBkLDMVb0+CpC4BLyH5bC4KeODs9f6x9snRBPbsmT2z98zv+ycwzMxe6zN7rb0+67eUMQaJRPL+ceQSSCQCiEQigEgktU4h6QuVUnL1qoznFQvAHlr7pff7+7DL+RkOq9WQcLLqpFuuWOWpdo4td5DGweEDzwCnb/Yfvan+Uw0Jz+FN9ZqZo74qVy1HdxBJYjA6gCuBMdEfPbfVF/U3Q4A7wpnOU2pIOE51skiupADSbGAMBM4DJgB9Eg1rh4S7EPK3sMuZrtrD76tOVsmVlUl63sFwPK94DPB34MykcJS1mFLt4ZFsUK+FM50zTIk2ucoCSF7h+ALwCPBr4EM1/c/7mX5qSHiZWe0sM/er/eRqyxArT2AMAy4FvpH2e6lB4ceAuWGXU1Lt4TdVJy9JCwggWQVjG+xTqbOBbev53qo97GQTL4RdznWqPZyoOlknLSJDrCzBcSjwLPCjesNR9nPnqPbwe6xTK8LZzrGmhCxWCSANB2OU5xXnA38APpGJD7Wt6a8GhTeawFli5qrdpZVkiNUIMNqju8XxWf2hUYPD4Rj+GnY5s1V7+F3VyQppObmDpA1GwfOKp2Af247P/DVUoNrDMWxUy8OZzsWmRF9pRQEkLTh84GlgKvDBXH34PqaPGhKey5vqVdFWZIhVazCGY/WQg3P/ZfqboYi2IoDUCIyBwLnAqVS7Ap61kZdoKzLEqgKMXj1kCTCx2eAoa33RVgSQiuEo10M+3BJfWrQVGWLFAKNuekhmh13v1laOVp0sFUAEjIbpIZkFxWorL4ZdzrWqPTyrlbUVp8XhaLwekt2fTke1h99nnfpHK2srTouCkT09JKvZ1gyItJXnzFy1mwyxmhuMzOshmR12DQ47MDwa3unMVtu1jrZSaBEwCsBJwGTytgKeKUpAbReOoVstD2eqKWpI+KNmr7bitAAcXwKeAq4WOGqUvqaPGhKeF2krX5E7SD7BGA5cAYyVHp1SrLZyZzjDeVINDcepThYLINkHYwDvVA8Rc7UeI6+h4acJeTbscqap9vDkZtJWnCYCw/G84rexGvpEgaPuPUmp9vAoNqhXw7uc002pOfqW0yRw7AH8BbiJVtFDspp+Zhs1OLzcrFHLzP1qXxliNRaMYcAU4EjpmRkbdg00w4AHwi5nQVRtZakAUj8w+mH1kHOQFfBsg9Ie7pVnbcXJIRxfAxYBFwscufkZzq224uQIjFGeV5wH3I7oIflMDrWVQg7AGBrdLY4D2dDTFMOuHGkrhQyDIXpIU1OSD23FySgcooe0Snq1lbXqFTNHfVnuIFsGQ/SQVs0A0w50RdrKEaozxsFCrQKI6CGSf428rLayKOxybo60ldUtO8QSPUSymV6pVHt4NBvUa+Es59RGaitOA+EQPUSy5fQz26gPhldG1VYaoq0UGgCG6CGSyoZdg8JybeVo1cmypgMk0kNOw1YqlBVwSeWgWG1Fh13Oz1V7OKke2opTJzi+itVDLhE4JFX+pDuqPTyZt9Q/wtnOMWlrK07KYIz0vOIDwB2IHiKpZT5gBqhB4a/T1lYKKYExlHeqh4geIklv2NWrrXQ5d6n28DjVyeuZvYNEh8ucjH1se6LAIakPJaDaw7F0q5fDmc5FtTwkqFBDOFzgXmAfabHaZNNV/X9n3lZj5ErETh8Up+FwF6x6LFOAaO2/7XnFrwA/BL6P1P2tOiZwuuUqVJQ/Az9wdfB4JodYWvurtPZPBUZGdxOJpB55BVuVf89awlFzQMpAWay1fwAwJpqPSCRpZAP2YdAIVwe/d3Vgav0GqT7m1dq/G9gZOBNYI+0pqWH+AOzo6uACVwepLRgmBsSU+M+YkHRr7V8OjABuBIy0raSKPAXs4+rg664OXkr7zZLfQXp4PuxyfmpK8VbGtfZXaO1/F9gN+JO0s6TC/BN7Lv1nXB08uLV/7HnFgZ5XvLRxgLRRSFKpQmt/IdAZTapelnaXbCWbsDtLO1wd3ODqoGcrYDieVzw2mvue2fg5SIJKFVr7Rmv/98D2wEXRZEsieW+KwChXBxNcHayKcdf4AvDXaCj/oUxN0tXgsIM+5tHwTmeWKcXb36G1v05r/4fADsBt0h8kUf4OHOzqYH9XB4tigPFxzytOj4bun8nGHOR9KSmvVBF/yV9rf6nW/uHA3tEkTNKaWYvdWbqzq4PZMcDYxvOK5wPPAeOyNUnfUmylivMrrVShtb8AGB1NxlZKf2mZGOy59B2uDi5zddAdA47DsFsoLiLFLRTp7gcZYNrpb7rCmc5CU2L7mJCEWvs3YB8LT40maZLmzZ+B3V0dfMfVwYoYYOwSHcB6G8RbasguIL0jryHhrlGlit+aEoNigiLaSnOnIj3E84rbeV7xemBhNBSvS+pXtCFhpYoybeVgRFtphlSkh0RbKCYAS4ATqHOhkfpXNUlYqUJrfzZWW5kYTeYk+UtFeojnFX3gGeAqGlRhs2Flf9SgcBj9zANhl/OgKfEfMSHp1tq/DOiIJnWireQjT1OBHuJ5xQ7PK86KhtY7NPKDN7w2b1mlimsq1Fa+A+weTfIk2cw/sTtLR1eoh/wNa4I3PNkoXp2wUoXW/uPAntFk7xXpj5lJD1YPGeHq4PoEekifrHyRbFV3T1CpokxbGRFN/kRbaWzuA0ZGekgQ465Rcz2keQHpHXb1aitdzkxTinfRIm3lAmDHaDIoqW+eB8a6OvAbrYc0PSCWkmSVKrT2X9La/zq2eIRoK+lnLXAWsJOrg1kxwEhdD2kNQHqTXFt5MPplGh9NFiW1jcEWHu9wdXBpTD3kUOqgh7QWIL1Jpq30RNpKRzRpFG2lNnkY+Kyrg2Nj6iGjIj3kD9RBD2lNQHpHXsm1lQnAKOweA0myvIKtyv9FVwePxQCj3fOK1wFPUEc9pKUBiT51Um1lkdb+/oi2Umk2YE8a3t7VwfSYesgp0TUen9t+lucPDoi2Up/cjtVDznd18FaMu4aPXTmfShMcwOo0QwuWaSvzRVupWZ4G9nV1cFhMPWS45xXvwuohOzbLRXCaqUVVe7g3m3gxnOFcbUpsExMU0VbenXI9ZH4MMAZ6XnEK8Gw0dG2qOE3XvAXa1NDwB1G1lW+LthI7SfSQY7Aa+kQypIcIIHGyrRmoBoU3mcBZbOYzOiYkraqtJNFDHomGpk19AKvT7C2vBocjcHg87HJmiLbyb6lUDxnmecVpWD1kt1b45XBa4UtG2sohdKuXwxnOZFOKNxwo01b2jSatzZIkesh50XDqG6007nRa6cvS1/RRQ8MLWKteNXPUIXFfprU/H1tt5UTyra0k1UOejYacLXcAq0MrxmorM8KZzuMVaivXR/OTq6NJbZ7yMPC5hHrIJ2jROLRw1JBwND0sCruc/6tAWwkibWVkNLnNel4FjsLqIY/GACP3eogAUsu0oVR7+M1IW5lQobbiA2OjyW7WsgF7Lv0IVwfTWkkPEUDSiNVWrjKrnaXmfrVPBfOTWcBO0aQ3K9rKHcCnXB2c14p6iACS5rBrUPhx+pl5CbSVS7Hayk00Tlt5BquHHOrqQMcAoyn1EAGkHqAk11aOBT4bTYrrlTeAk4BdY+ohA5pZDxFA6pXk2spjwBexeyfS1FZ6gGuwj22vi6mHfDuaZzStHiKA1DvJtZXp2EOCLqb22sp92MNlTomph+wB/CUaAn5YGlUAqf2wK5m28pbW/vnRGP/2GnyMF4BDIj3k2RhgDPO84s1EVdSlFQWQlCmpSls5jOTaylpgEvbp1F0xwOjnecVzsXrIkdJwAkh9Uz9txQC/wa5nTImph3wNWz3kYlpQD6np76ExCZ9IPqRkB155L37DWaiGhuNUJ0vivsbzioOB/bT273i/v3/bGzwKcOOsgEf/3yisBrOPtIjNiy9+SQkgWUkPxgTOb1V7eIrqZHW93tbzikOju8VxQJs0hACS7WxQ680Gdbb6YPhT1UmYIhgF7PrHZGQFPBVAZA6SRqy2MjXSVvZOCY4vYUurXi1wpJeCXIIUJ3iDwo8D88MuZ55qD7+lOlleAzCGA1dgJUlJVifp5uZCwAYlv1xx04cVZq2a0HbyxlsSgjEAOA+YAPEKeUuqH2IlvoNsvGDgU8h+gUqyHbDH2x63uTpIMi8Ziz3EUuCoY2QOUp88iK0zdUpCONDan4a1hX8B6U38JQJIPbMU+Lqrg31cHVR9VonW/kqt/ROwxzoskMsrgOQ164ALsDVta142SGv/Sa39vYHDIwglAkhu8ntsFfQfuTpYn+Ybae3fhpUgLwTWy6UXQLKcx7GFEb7h6uDler2p1v56rf3JWK3+FmkGASRreR34DvbEpYqLX3tecbNtEN7pfNiU+HJMUJZr7Y8DOrEVSSQCSEOzEbgMu5vv15U+nSor47nZLa8907cdC3SZuapkSuwUE5SHsGVBj4vglQggdc9sbNnOia4O1lQIxnvLeG5pIcv+XV+zJ4ZnzDyuMyWGxIAk1Nr/FbbI3RURzBIBJPUsBvZ3dXCwq4OKj3CL9mkkK+OpUBQYzyaWmgV8z5S2vsirtb9aa/8M7Gla90jzCSBpZRVwKvaIgGICMEZ5XnEedsvtJ6r6JAX6o/gZ3WqxKbFfzGHXEq39g4ADseeTSwSQmiQEbsDu5pvq6mBThWAMjcp4LqTWm5j6mk8Cc81cdbcp4cUEZQ62ZOppUL/9KgJIc6ZXDxnv6mBlhWAUPK/4A2xJ0vGkuYmprzmQkCVmHlNMif4xINmotX9VND/5BXI2owBSYarSQxqyT8OhQIGJdKulpsTRcep3ae2/Hmkro4GSNLsAsrVUpYdEZTxnAkXgUw35Bn3NEOC3dKsnTInPxhx2Pam1vxdwBLBMuoEA8n5JrIeUlfH8G1nZxNTX7AI8Yuaq6abER2OCciuwA6KtCCBlSayHvE8Zz+zt0+hrxtGDNgs425RwY0Ai2ooAAtgV5u+SXA/JTxnPNlwUP6ZbvSjaigCytWwELsfqITcm1EPyWcazr/kYoq0IIFvI3cDOrg7OTKCHNE8ZT9FWBJD3ZDFwgKuDMa4OllT64qYs4/lubeUk0VZaE5DVWD1klKuDexOAUTs9JKux2srP6VaLTIl9Yw67WkpbaUZAQuwKcUekh2ysEIz09JDsDruGAw+YuWq2aCvNDcgC4DOuDk7ItB6SXVAOImSJmc9PTIkPxICkXFv5JU2orTQLIEuBw10d7O3q4MkEwykp4/lOjyjQxiQ2qqWmxFEVaCvHY6utlASQ7GQ98EOsHnJbAjAar4dkNX3MUOB3vF2RtvIEtpjgEVB9mVUBpLrcgtXQL2oKPSSrcc0umH9pKx+JAYmJtJXtsVXn1wsg9c1CYE9XB+MS6CEq83pIFqPo1VZeMguYVIG2ciHW77pVAEk/vXrI7q4O/pRgOPV54BHklNfksdrKT+hWL5gSsY6d09pfprV/BLAXOdRW8gBILfSQ3wEPI6e81iZ9zTBghvmjWlCBtlLCaivHAysFkNqkWj3kHOxi1lHSq1OZn3RG2sq1psTgGJCEWvu/xBbhvpIcaCtZBaRaPeSrWD3kEtj683xJVfMTRYET2cQyU+LECrSV07ELjXMEkPipVg8Z6XnFB4A7aFY9JKsp0B+4lm71bAXaynNa+wditZUlAsjmUws95NpoEriv9NaGzk86SKat7AycDqwRQN6davWQk7GPbU9EjkDOEihJtJUro/lJZrSVRgKyjOr0kP/B6iHXwNYniJKG9K7cayuNAGQ9tjDADgn1kE96XnEGcB+ih+QjvdpKt1qYN22l3oDcgq0eMjmhHvK/2Nq2h0ivy+Ww69N501bqBcgTQGekhyyvEIxePWQJcBaih+Q7OdNW0gbkdeyG/91cHTyUYDhVrod8RHpXE+Xd2kosYbQR2kpagGzEbvAf4ergV6KHSLYw7BoGzDR/VA+aUrw5ZT21lTQAuQerh5zh6mB1hWCIHtKqcc1ekbby8yxpK7UE5DngQFcHB4keIkk4P3EocBKbWBppK20xQCnXVu7NIiCrsRv3R7o6mJMADNFDJO9OgQFYbWWRKcUrnBFpKwcAB1FDbaUaQHr1kBGuDq4SPUSSwvykA5hn5qpZFWgr90R3kzOogbZSqOK141wdrEhwxyhgtZDJyAq4JB4oY+hhfzOfy2jjEtXJW1uBpBu4InrQ05g7SEI4/hvRQyRJ0kaBNs6OtJUj42orWZqkbwmM/4r0kPsRPURSTay2cjPd6nFTSn8JoJAyGAOAc6JJvKyAS2o57NoVw1/NA2oafcwZqpN/pPE2TkpgKM8rfgv76HeSwCFJJQroY46MDgmaZEq172dOCnB8Hnu4zG8g3vFfEkmV85N+kbbyYlxtpe5DLM8rfhSYAhwtLVabmFedN3umbSsXIn6GMTi8sOfK8K2207rnZm0O0g28CfQgO/tqA8hrbet6XpNLWcklAx4FnrHdMUNDLK39N7T2TwJ2BeZJW0nqnBIwOtq6XbPj4mo+B9Haf0Zrfz/ga8BL0m6SlLMMOMLVwV5Jtm7XHZAyUO4EdgTOhS2vfEokCVK+dTu1TVSpLhRq7W/Q2v8xdsvkzdKmkhrlVhJu3c4UIGWgvKK1fzSwRzSJkkiS5AlgL1cHR1S6dTvTgJSB8hfgc8AxkM7Kp6QpsxK7e3A3Vwd1LQVU97I/UaWK32DPtZtCrZ7HSZoxG7G7BTtcHfyy0q3buQSkDJS1WvuTsPLiTOkLkvdkDnYT3umVbt1uCkDKQHlBa//LgI+teSVp7SzBbt0+0NVBw89hz0x1d639+4BdgFOAVdJPWi5rsMWrd06ydbvpAYkg2aS1fw0wHLgeq61ImjsGW6y6w9XBlZVu3W4pQMpAeUNr/0RgNDBf+lDTpoSt7H98LfWQpgekDJSntfb3BQ5FtJVmynJsUeq9XR1k+mDPXJxyq7V/B1ZbOQ9YJ/0rt1mPLdaxvauDW10dmKx/4NwcAx1pK5dg10+mSV/LXW7FelMXpq2HtCQgZaC8orV/FPAFRFvJQ8r1kGV5+/BOXq+61v7DwOex2soK6YeZS8P0EAHkHUjCSFvpAC5FtJUspOF6iADy76Cs1do/C9gJuEv6aMOSCT1EANk8KM9r7R+CaCv1Tqb0EAFk66CItlKfZFIPEUDiQSLaSnoxwK/IqB4igFQGimgrtc1D2CdTx2VVDxFAkoEi2kp1WQ6Mw65pLGyVL+20WiuLtlJxNmD1kB1cHdySBz1EAKkeknJtZbowsNnchvWmLnR10JI/Jk4rt36krRwJfBF4THj4V57EmraH51EPEUBqD8qfsdVWjqW1tZWVwAnYPRoLpGcIIOWQhFr7N0XDrktJ6dztjGYTcBX2se0v8q6HCCDpgrIm0lY+Bcxqga98L3ah77Rm0UMEkPqA8rzW/lhgf2BRE37FJcBBrg4OaDY9RACpLyhFYBQwgebQVtZgzxAf6ergHmlhAaQWkGzS2r8aq9VfD+RxjF6uh1zh6kC2BgggNQfln5G2sivwYI4+ekvpIQJI40F5Wmt/H+Awsq2ttKQeIoBkB5TbsU+7zidb2kpL6yECSLYgWa+1fzHZ0VZaXg8RQLIJSqO1lScRPUQAyQEo9dZWVgLjET1EAMkRJPXQVjYBU4ERrg5uED1EAMkjKGlpK/diF/pOdXWwSq60AJJ3UGqlrfwdGBPpIYvlygogzQZKr7ZyKpVpK2uAM7FS4d1yJQWQZoZkk9b+1Gh+cgNbrrYSAjdG84zLRQ+pf5QxsoYkkcgdRCIRQCSS2ub/BwCOh6MuZHG4qQAAAABJRU5ErkJggg=="},374:function(e,t,a){e.exports=a.p+"static/media/EUSDT.0a5458ff.png"},375:function(e,t,a){e.exports=a.p+"static/media/EWBTC.9091f9fa.png"},376:function(e,t,a){e.exports=a.p+"static/media/EWETH.f4891222.png"},377:function(e,t,a){e.exports=a.p+"static/media/TUSDT.eae850c9.png"},394:function(e,t,a){e.exports=a(879)},42:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(13),r=a(14),o=a(1),s=a(15),i=a.n(s),c=a(244),l=a.n(c),u=a(150).cutZero,p=new(function(){function e(){Object(n.a)(this,e)}return Object(r.a)(e,[{key:"get",value:function(e){var t=18;if("SERO"===e);else if(!(t=o.d.get(o.b.decimalsKey(e)))&&0!==t){var a=new l.a(o.a.host.rpc).send({id:0,jsonrpc:"2.0",method:"sero_getDecimal",params:[e]});if(a.error){if(!a.error||"contract not support SER20 decimals"!==a.error.message)throw new Error(a.error.message);o.d.set(o.b.decimalsKey(e),0)}else t=parseInt(a.result),o.d.set(o.b.decimalsKey(e),t)}return t}},{key:"convert",value:function(e,t,a){var n=0;try{n=this.get(t)}catch(r){console.log(r.message)}return a||(a=n),u(new i.a(e).dividedBy(new i.a(10).pow(new i.a(n))).toFixed(n))}},{key:"mul",value:function(e,t,a){var n=this.get(t);return a||0===a||(a=n),u(new i.a(e).multipliedBy(new i.a(10).pow(new i.a(n))).toFixed(n))}}]),e}())},468:function(e,t,a){e.exports=a.p+"static/js/1.0eb902b2.chunk.worker.js"},469:function(e,t,a){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),(n=t.Method||(t.Method={})).Init="init",n.BalanceOf="balanceOf",n.HealthyCheck="healthyCheck",n.InitAccount="initAccount",n.ClearData="clearData",n.FindUtxos="findUtxos",n.TicketsOf="ticketsOf",n.GetTxList="getTxList",n.GetTxDetail="getTxDetail",n.GetPKrIndex="getPKrIndex",n.CommitTx="commitTx",n.GetPrice="getPrice",n.GetPendingAndConfirming="getPendingAndConfirming"},470:function(e,t,a){e.exports=a.p+"static/js/0.93946bfa.chunk.worker.js"},471:function(e,t){},48:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(97),r=a(204),o=a(27),s=a(205),i=function(){function t(e){if(e instanceof t)this.n=e.n;else if(e instanceof n){var a=e;a.red?this.n=a:this.n=a.toRed(t.red)}else this.n=new n(e,"le").toRed(t.red)}return t.toFQ=function(e){return e instanceof t?e:new t(e)},t.prototype.add=function(e){return new t(this.n.redAdd(t.toFQ(e).n))},t.prototype.mul=function(e){return new t(this.n.redMul(t.toFQ(e).n))},t.prototype.sub=function(e){return new t(this.n.redSub(t.toFQ(e).n))},t.prototype.div=function(e){return new t(this.n.redMul(t.toFQ(e).n.redInvm()))},t.prototype.squared=function(){return new t(this.n.redSqr())},t.prototype.sqrt=function(){try{var e=this.n.redSqrt();return e?new t(e):void 0}catch(e){return}},t.prototype.pow=function(e){return new t(this.n.redPow(new n(e)))},t.prototype.nega=function(){return new t(this.n.redNeg())},t.prototype.inverse=function(){return new t(this.n.redInvm())},t.prototype.isOdd=function(){return this.n.fromRed().isOdd()},t.prototype.isZero=function(){return this.n.fromRed().isZero()},t.prototype.toBuffer=function(){return this.n.fromRed().toArrayLike(e,"le",32)},t.prototype.toBN=function(){return this.n.fromRed()},t.prototype.equal=function(e){return this.n.eq(e.n)},t.prototype.toString=function(e){return this.n.fromRed().toString(e)},t.red=n.mont(r.default.FQ_MODULUS),t.ONE=new t(1),t.ZERO=new t(0),t}();t.FQ=i;var c=function(){function t(e){if(e instanceof t)this.n=e.n;else if(e instanceof n){var a=e;a.red?this.n=a:this.n=a.toRed(t.red)}else this.n="number"==typeof e?new n(e).toRed(t.red):new n(e,"le").toRed(t.red)}return t.toFR=function(e){return e instanceof t?e:new t(e)},t.prototype.add=function(e){return new t(this.n.redAdd(t.toFR(e).n))},t.prototype.mul=function(e){return new t(this.n.redMul(t.toFR(e).n))},t.prototype.sub=function(e){return new t(this.n.redSub(t.toFR(e).n))},t.prototype.div=function(e){return new t(this.n.redMul(t.toFR(e).n.redInvm()))},t.prototype.squared=function(){return new t(this.n.redSqr())},t.prototype.sqrt=function(){try{var e=this.n.redSqrt();return e?new t(e):void 0}catch(e){return}},t.prototype.pow=function(e){return new t(this.n.redPow(new n(e)))},t.prototype.nega=function(){return new t(this.n.redNeg())},t.prototype.inverse=function(){return new t(this.n.redInvm())},t.prototype.isOdd=function(){return this.n.fromRed().isOdd()},t.prototype.isZero=function(){return this.n.fromRed().isZero()},t.prototype.toBuffer=function(){return this.n.fromRed().toArrayLike(e,"le",32)},t.prototype.toBN=function(){return this.n.fromRed()},t.prototype.equal=function(e){return this.n.eq(e.n)},t.prototype.toString=function(e){return this.n.fromRed().toString(e)},t.red=n.mont(r.default.FR_MODULUS),t.ONE=new t(1),t.ZERO=new t(0),t}();function l(e){if(e instanceof c)return e;var t=o.toBuffer(e);return new c(t)}t.FR=c,t.newFR=l,t.randomFR=function(){return l(s.randomBytes(32))}}).call(this,a(23).Buffer)},487:function(e,t){},489:function(e,t){},49:function(e,t,a){e.exports=a.p+"static/media/sero.ef3f4514.png"},524:function(e,t){},525:function(e,t){},570:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(62),r=a(571),o=a(48),s=a(39),i=new o.FR(8);function c(e,t){var a=r.blake2s(e,t);a[31]&=159;var o=n.Point.bufferTo(a);return o&&!o.isZero()&&o.isValid()?o.mult(i):void 0}t.findPoint=function(t,a){s(t.length<=8&&64==a.length);for(var n=e.from(a),r=0;r<256;r++){n[63]=r;var o=c(t,n);if(o)return o}}}).call(this,a(23).Buffer)},571:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(572);t.blake2s=function(t,a){var r=e.alloc(8,0);r.fill(t,0,t.length);var o=new n(32,{salt:e.alloc(8,0),personalization:r}).update(a).digest();return e.from(o)}}).call(this,a(23).Buffer)},573:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(574),r=a(312),o=a(27),s=a(167),i=a(39),c=a(143),l=a(48);t.genOutCm=function(t,a,u,p){if(t=c.newAsset(t),a=o.toBuffer(a),u=l.newFR(u),p=s.newPKr(p),i(64==a.length),t.isValid()&&p.isValid()){var d=n.genAssetCurrency(t.tkn_currency).mult(t.tkn_value);o.default.isEmptyBuffer(t.tkt_value,32)||(d=d.add(n.genAssetTkt(t.tkt_category,t.tkt_value)));var f=e.concat([d.toBuffer(),a,p.VPK.toBuffer(),p.BASE.toBuffer(),u.toBuffer()]);return i(192==f.length,"blob.length != 192,"),n.outCmBase.mult(new r.BitBuffer(f))}}}).call(this,a(23).Buffer)},574:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(310),r=a(311),o=a(89),s=a(27),i=a(39);t.outCmBase=new n.Group("$SROOUTCMGEN",8,192,4),t.genAssetTkt=function(t,a){t=s.toBuffer(t),a=s.toBuffer(a),i(32==t.length),i(32==a.length);var n=e.concat([t,a]),c=r.findPoint("$SROASSETTK",o.blake2b("$SROASSETTK.H",n));if(!c)throw new Error("find point error");return c},t.genAssetCurrency=function(e){e=s.toBuffer(e),i(32==e.length);var t=r.findPoint("$SROASSETCY",e);if(!t)throw new Error("find point error");return t}}).call(this,a(23).Buffer)},575:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(143),r=a(48),o=a(221),s=a(27),i=a(39),c=function(){function t(e,t,a){this.asset=n.newAsset(e),this.rsk=r.newFR(t),this.memo=s.toBuffer(a)}return t.prototype.isValid=function(){return!!this.asset.isValid()&&!this.rsk.isZero()},t.prototype.toBuffer=function(){return e.concat([this.asset.toBuffer(),this.rsk.toBuffer(),this.memo])},t.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},t}();function l(t){if(t instanceof c)return t;var a=s.toBuffer(t);return i(224==a.length),new c(n.newAsset(a.slice(0,128)),new r.FR(a.slice(128,160)),e.from(a.slice(160,224)))}t.Info=c,t.newInfo=l,t.encInfo=function(e,t){e=s.toBuffer(e),t=l(t),i(32==e.length);var a=t.toBuffer();return o.default(a,e)},t.decEInfo=function(e,t,a){return i(a,"flag must true"),e=s.toBuffer(e),t=s.toBuffer(t),i(224==e.length),i(32==t.length),l(o.default(e,t))}}).call(this,a(23).Buffer)},581:function(e,t){},583:function(e,t){},618:function(e,t){},619:function(e,t,a){"use strict";var n=this&&this.__awaiter||function(e,t,a,n){return new(a=a||Promise)((function(r,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function i(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a((function(e){e(t)}))).then(s,i)}c((n=n.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var a,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(o){return function(i){return function(o){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=0<(r=s.trys).length&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]>7&1,c=e.from(r);c[31]&=-129;var l=new n.FQ(c),u=l.mul(l),p=t.ECC_D.mul(u),d=u.sub(n.FQ.ONE).mul(p.sub(t.ECC_A).inverse()).sqrt();if(d){var f=d;return d.isOdd()!==(0!=i)&&(f=n.FQ.ZERO.sub(d)),new t(f,l)}},t.ECC_A=new n.FQ(r.default.ECC_A),t.ECC_D=new n.FQ(r.default.ECC_D),t.ZERO=new t(n.FQ.ZERO,n.FQ.ONE),t}(),c=function(){function e(e,t,a){this.x=new n.FQ(e),this.y=new n.FQ(t),this.z=new n.FQ(a)}return e.prototype.toOriPoint=function(){var e=this.z.inverse();return new i(this.x.mul(e),this.y.mul(e))},e.prototype.add=function(t){var a=this.x,r=this.y,o=this.z,s=t.x,c=t.y,l=t.z,u=a.mul(s),p=r.mul(c),d=i.ECC_D.mul(u).mul(p);if(o.equal(n.FQ.ONE)&&l.equal(n.FQ.ONE))return new e(n.FQ.ONE.sub(d).mul(a.add(r).mul(s.add(c)).sub(u).sub(p)),n.FQ.ONE.add(d).mul(p.sub(i.ECC_A.mul(u))),n.FQ.ONE.sub(d.squared()));if(l.equal(n.FQ.ONE)){var f=(h=o.squared()).sub(d),m=h.add(d);return new e(o.mul(f).mul(a.add(r).mul(s.add(c)).sub(u).sub(p)),o.mul(m).mul(p.sub(i.ECC_A.mul(u))),f.mul(m))}var h,g=o.mul(l);return f=(h=g.squared()).sub(d),m=h.add(d),new e(g.mul(f).mul(a.add(r).mul(s.add(c)).sub(u).sub(p)),g.mul(m).mul(p.sub(i.ECC_A.mul(u))),f.mul(m))},e.prototype.double=function(){var t=this.x.add(this.y).squared(),a=this.x.squared(),r=this.y.squared(),o=i.ECC_A.mul(a),s=o.add(r);if(this.z.equal(n.FQ.ONE))return new e(t.sub(a).sub(r).mul(s.sub(2)),s.mul(o.sub(r)),s.squared().sub(s.mul(2)));var c=this.z.squared(),l=s.sub(c.mul(2));return new e(t.sub(a).sub(r).mul(l),s.mul(o.sub(r)),s.mul(l))},e.prototype.mult=function(t){for(var a=t.toBN(),n=this,r=e.ZERO;!a.isZero()&&(a.testn(0)&&(r=r.add(n)),!(a=a.shrn(1)).isZero());)n=n.double();return r},e.prototype.isValid=function(){var e=this.x.mul(this.x),t=this.y.mul(this.y),a=this.z.mul(this.z),n=i.ECC_A.mul(e),r=a.mul(a),o=i.ECC_D.mul(e).mul(t),s=a.mul(n.add(t)),c=r.add(o);return!!s.equal(c)},e.prototype.isEqualTo=function(e){return!(!this.x.mul(e.z).equal(this.z.mul(e.x))||!this.y.mul(e.z).equal(this.z.mul(e.y)))},e.prototype.isZero=function(){return this.isEqualTo(i.ZERO.toPoint())},e.prototype.toBuffer=function(){return this.toOriPoint().toBuffer()},e.prototype.toHex=function(){return this.toBuffer().reverse().toString("hex")},e.prototype.toString=function(){return"0x"+this.toBuffer().toString("hex")},e.bufferTo=function(e){var t=i.bufferTo(e);return t?t.toPoint():void 0},e.ZERO=new e(new n.FQ(0),new n.FQ(1),new n.FQ(1)),e}();t.Point=c,t.newPoint=function(e){return e instanceof c?e:c.bufferTo(e)}}).call(this,a(23).Buffer)},620:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(103),r=a(116),o=a(222),s=a(27),i=a(27),c=a(621),l=a(143),u=a(269),p=a(315),d=a(48),f=a(97),m=a(225),h=a(334),g=a(622),v=function(){this.hash=e.alloc(32),this.param=new c.Params},y=function(t){this.p0_ins=new Array,this.p_ins=new Array,this.c_ins=new Array,this.c_outs=new Array,this.p_outs=new Array,this.keys=new Array,this.balance_desc=new v,this.s={Desc_O:{},Desc_Z:{},Desc_Pkg:{},Desc_Cmd:{},Tx1:{Ins_P:new Array,Ins_P0:new Array,Ins_C:new Array,Outs_C:new Array,Outs_P:new Array},Bcr:s.toHex(e.alloc(32,0)),Bsign:s.toHex(e.alloc(64,0))},this.param=t};function k(t){var a=e.alloc(32,0),n=e.alloc(32,0),r=e.alloc(32,0),o=e.alloc(32,0);return t.Tkn&&(t.Tkn.Currency&&(a=t.Tkn.Currency),t.Tkn.Value&&(n=s.default.toBN(t.Tkn.Value).toArrayLike(e,"le",32))),t.Tkt&&(t.Tkt.Category&&(r=t.Tkt.Category),t.Tkt.Value&&(o=t.Tkt.Value)),new l.Asset(a,n,r,o)}function E(t){var a=[i.toBuffer(t.Ehash),i.toBuffer(t.From),w(t.Fee)];return a.push(function(t){var a=new Array;return t.Ins&&t.Ins.forEach((function(t){a.push(function(t){return h(e.concat([i.toBuffer(t.Anchor),i.toBuffer(t.Nil),i.toBuffer(t.Trace),i.toBuffer(t.AssetCM),i.toBuffer(h(t.Proof))]))}(t))})),t.Outs&&t.Outs.forEach((function(t){a.push(function(t){return h(e.concat([i.toBuffer(t.AssetCM),i.toBuffer(t.OutCM),i.toBuffer(t.EInfo),i.toBuffer(t.PKr),i.toBuffer(h(t.Proof))]))}(t))})),h(e.concat(a))}(t.Desc_Z)),a.push(function(t){var a=new Array;return t.Ins&&t.Ins.forEach((function(t){a.push(function(t){return h(e.concat([i.toBuffer(t.Root),i.toBuffer(t.Nil),i.toBuffer(t.Sign)]))}(t))})),t.Outs&&t.Outs.forEach((function(t){a.push(function(t){return h(e.concat([i.toBuffer(t.Addr),x(t.Asset),i.toBuffer(t.Memo)]))}(t))})),h(e.concat(a))}(t.Desc_O)),010&&clearInterval(e.intervalId);try{plus&&(clearInterval(e.intervalId),e._init())}catch(t){console.error(t),clearInterval(e.intervalId)}this.interCount++}),1e3)}},{key:"get",value:function(e,t){if(plus&&plus.net){var a=new plus.net.XMLHttpRequest;a.onreadystatechange=function(){switch(a.readyState){case 0:console.log("xhr\u8bf7\u6c42\u5df2\u521d\u59cb\u5316");break;case 1:console.log("xhr\u8bf7\u6c42\u5df2\u6253\u5f00");break;case 2:console.log("xhr\u8bf7\u6c42\u5df2\u53d1\u9001");break;case 3:console.log("xhr\u8bf7\u6c42\u5df2\u54cd\u5e94");break;case 4:200===a.status?t(a.responseText,null):t(null,a.readyState)}},a.open("GET",e),a.send()}}}]),e}());function X(){try{return plus&&plus.sqlite}catch(e){return!1}}var $=new(function(){function e(){Object(l.a)(this,e),this.init()}return Object(u.a)(e,[{key:"init",value:function(){X()&&Y.db.openDatabase().then((function(){Y.db.executeSql('create table if not exists lstorage("key" CHAR(1000),"value" CHAR(1000))').then((function(e){})).catch((function(e){console.log("create table>>> "+e)}))}))}},{key:"set",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a&&(U.d.set(t,a),X()&&this.setWithSqlLite(t,a).then().catch()),e.abrupt("return",new Promise((function(e){e()})));case 2:case"end":return e.stop()}}),e,this)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"get",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this,n=U.d.get(t),e.abrupt("return",new Promise((function(e){n?e(n):X()?a.getWithSqlLite(t).then((function(a){a?(U.d.set(t,a),e(a)):e("")})).catch((function(t){e("")})):e("")})));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getPlus",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this,e.abrupt("return",new Promise((function(e){X()?a.getWithSqlLite(t).then((function(t){e(t||"")})).catch((function(t){e("")})):e("")})));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return U.d.delete(t),X()&&this.deleteWithSqlLite(t).then(),e.abrupt("return",new Promise((function(e){e()})));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setWithStorage",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){U.d.set(t,a),e()})));case 1:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"getWithStorage",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){e(U.d.get(t))})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"deleteWithStorage",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){U.d.delete(t),e()})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"setWithSqlLite",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y.db.selectSql("select value from lstorage where key='".concat(t,"' "));case 2:if((n=e.sent)&&0!==n.length){e.next=8;break}return e.next=6,Y.db.executeSql("insert into lstorage values('".concat(t,"','").concat(JSON.stringify(a),"')"));case 6:e.next=10;break;case 8:return e.next=10,Y.db.executeSql("update lstorage set value='".concat(JSON.stringify(a),"' where key = '").concat(t,"'"));case 10:return e.abrupt("return",new Promise((function(e){e()})));case 11:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"getWithSqlLite",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this,e.abrupt("return",new Promise((function(e){Y.db.selectSql("select value from lstorage where key ='".concat(t,"'")).then((function(t){t&&t.length>0?e(JSON.parse(t[0].value)):e("")})).catch((function(t){a.init(),e("")}))})));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"deleteWithSqlLite",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y.db.executeSql("delete from lstorage where key ='".concat(t,"'"));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),e}()),ee=new(a(370).PopupService),te=new(function(){function e(){Object(l.a)(this,e)}return Object(u.a)(e,[{key:"init",value:function(){ee.init(U.a.seroRpc(),15e3,(function(e){console.log("init data:",e)}))}},{key:"balanceOf",value:function(e){return new Promise((function(t,a){ee.balanceOf(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"ticketsOf",value:function(e){return new Promise((function(t,a){ee.ticketsOf(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"initAccount",value:function(e){return new Promise((function(t,a){ee.initAccount(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"getTxList",value:function(e,t,a){return console.log("getTxList>>>>>>",t,a),new Promise((function(n,r){var o={tk:e,cy:t,count:a};ee.getTxList(o,(function(e){e.error?r(e.error):n(e.data)}))}))}},{key:"getTxDetail",value:function(e,t){return new Promise((function(a,n){ee.getTxDetail(e,t,(function(e){e.error?n(e.error):a(e.data)}))}))}},{key:"getPKrIndex",value:function(e){return new Promise((function(t,a){ee.getPKrIndex(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"commitTx",value:function(e){return new Promise((function(t,a){ee.commitTx(e,(function(e){e.error?"stx Verify error"===e.error?a(U.c.e().page.txTransfer.failed):a(e.error):t(e.data)}))}))}},{key:"getPrice",value:function(e){return new Promise((function(t,a){ee.getSeroPrice(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"clearData",value:function(e){return new Promise((function(t,a){ee.clearData(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"getSyncState",value:function(e){return new Promise((function(t,a){ee.getSyncState(e,(function(e){e.error?a(e.error):t(e.data)}))}))}},{key:"getPendingAndConfirming",value:function(e,t){return new Promise((function(a,n){ee.getPendingAndConfirming(e,(function(e){if(console.log("getPendingAndConfirming",e),e.error)n(e.error);else{var r=e.data;if(t){var o=[],s=!0,i=!1,c=void 0;try{for(var l,u=r[Symbol.iterator]();!(s=(l=u.next()).done);s=!0){var p=l.value;p.Tkn.has(t)&&o.push(p)}}catch(d){i=!0,c=d}finally{try{s||null==u.return||u.return()}finally{if(i)throw c}}a(o)}else a(r)}}))}))}},{key:"getPendingAndConfirmingGroupByCy",value:function(e){return new Promise((function(t,a){console.log("tl",e),ee.getPendingAndConfirming(e,(function(e){if(e.error)a(e.error);else{var n=e.data,r=new Map,o=!0,s=!1,i=void 0;try{for(var c,l=n[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var u=c.value,p=!0,d=!1,f=void 0;try{for(var m,h=u.Tkn[Symbol.iterator]();!(p=(m=h.next()).done);p=!0){var g=m.value,v=Object(C.a)(g,2),y=v[0];v[1];r.has(y)?r.set(y,r.get(y)+1):r.set(y,1)}}catch(k){d=!0,f=k}finally{try{p||null==h.return||h.return()}finally{if(d)throw f}}}}catch(k){s=!0,i=k}finally{try{o||null==l.return||l.return()}finally{if(s)throw i}}t(r)}}))}))}}]),e}()),ae=a(131),ne=a(243),re=new q,oe=function(){function e(t){Object(l.a)(this,e),this.getAddresses=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o,s,i,c,l,u,p,d,f,m,h,g,v,y,k,E,b,w,x,S,P,O,B;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Map,e.next=3,$.get(U.b.account.addresses);case 3:return a=e.sent,console.log("addressesStore,"+JSON.stringify(a)),e.next=7,$.getPlus(U.b.account.addresses);case 7:if(n=e.sent,r=0,o=0,!(a&&a.length>0)){e.next=31;break}for(r=a.length,s=!0,i=!1,c=void 0,e.prev=15,l=a[Symbol.iterator]();!(s=(u=l.next()).done);s=!0)p=u.value,t.set(p,1);e.next=23;break;case 19:e.prev=19,e.t0=e.catch(15),i=!0,c=e.t0;case 23:e.prev=23,e.prev=24,s||null==l.return||l.return();case 26:if(e.prev=26,!i){e.next=29;break}throw c;case 29:return e.finish(26);case 30:return e.finish(23);case 31:if(console.log("addressesPlus,"+JSON.stringify(n)),d=!1,!(n&&n.length>0)){e.next=54;break}for(o=n.length,f=!0,m=!1,h=void 0,e.prev=38,g=n[Symbol.iterator]();!(f=(v=g.next()).done);f=!0)y=v.value,t.has(y)||(d=!0,t.set(y,1));e.next=46;break;case 42:e.prev=42,e.t1=e.catch(38),m=!0,h=e.t1;case 46:e.prev=46,e.prev=47,f||null==g.return||g.return();case 49:if(e.prev=49,!m){e.next=52;break}throw h;case 52:return e.finish(49);case 53:return e.finish(46);case 54:if(d||o==r||(d=!0),!d){e.next=80;break}if(k=[],!(t&&t.size>0)){e.next=77;break}for(E=!0,b=!1,w=void 0,e.prev=61,x=t[Symbol.iterator]();!(E=(S=x.next()).done);E=!0)P=S.value,O=Object(C.a)(P,2),B=O[0],O[1],k.push(B);e.next=69;break;case 65:e.prev=65,e.t2=e.catch(61),b=!0,w=e.t2;case 69:e.prev=69,e.prev=70,E||null==x.return||x.return();case 72:if(e.prev=72,!b){e.next=75;break}throw w;case 75:return e.finish(72);case 76:return e.finish(69);case 77:if(!(k.length>0)){e.next=80;break}return e.next=80,$.set(U.b.account.addresses,k);case 80:return e.abrupt("return",t);case 81:case"end":return e.stop()}}),e,null,[[15,19,23,31],[24,,26,30],[38,42,46,54],[47,,49,53],[61,65,69,77],[70,,72,76]])}))),this.address=t}return Object(u.a)(e,[{key:"genWord",value:function(){try{var e=ne.genSeed(),t=ne.entropyToMnemonic(e);return sessionStorage.setItem("worddata",t),sessionStorage.setItem("MnemonicType","create"),t}catch(a){throw new Error(a.message)}}},{key:"getSK",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(a=this).address){e.next=7;break}return e.next=5,a.getCurrent();case 5:r=e.sent,n=r.address;case 7:return e.next=9,$.get(U.b.infoKey(n));case 9:return o=e.sent,e.abrupt("return",new Promise((function(e,a){ae.a.getSK({password:t,keystore:o},(function(t){t.error?a(t.error):e(t.data)}))})));case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"PreCreate",value:function(e,t,a,n){return new Promise((function(r,o){try{var s={password:t,word:n};$.delete(U.b.account.tempKeystore).then((function(){ae.a.createAccount(s,(function(t){var n=t.data,r={detail:{address:n.address,name:e,hint:a,tk:n.tk,avatar:re.getRandomAvatar()},keystore:n};$.set(U.b.account.tempKeystore,r).then()}))})),r()}catch(i){o(i)}}))}},{key:"CopyTempKeystore",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.account.tempKeystore);case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return",new Promise((function(e,t){t("create account failed! please try again!")})));case 5:return a=t.keystore,e.next=8,$.get(U.b.account.addresses);case 8:return(n=e.sent)?n.push(a.address):n=[a.address],e.next=12,$.set(U.b.account.addresses,n);case 12:return e.next=14,$.set(U.b.infoKey(a.address),a);case 14:return e.next=16,$.set(U.b.detailKey(a.address),t.detail);case 16:return e.next=18,this.setCurrent(t.detail);case 18:return e.next=20,$.delete(U.b.account.tempKeystore);case 20:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"remove",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n,r;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.infoKey(t));case 2:return n=e.sent,e.next=5,$.get(U.b.account.addresses);case 5:return r=e.sent,e.abrupt("return",new Promise((function(e,o){ae.a.getSK({password:a,keystore:n},(function(a){if(a.error)o(a.error);else{if(r){var n=[],s=!0,i=!1,c=void 0;try{for(var l,u=r[Symbol.iterator]();!(s=(l=u.next()).done);s=!0){var p=l.value;p===t||n.push(p)}}catch(d){i=!0,c=d}finally{try{s||null==u.return||u.return()}finally{if(i)throw c}}$.set(U.b.account.addresses,n).then()}e()}}))})));case 7:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"getTempKeystore",value:function(){var e=Object(F.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$.get(U.b.account.tempKeystore));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"exportMnemonic",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.infoKey(t));case 2:return n=e.sent,e.abrupt("return",new Promise((function(e,t){ae.a.exportMnemonic({keystore:n,password:a},(function(a){if(a.error)t("ERROR=[".concat(a.error,"],[").concat(JSON.stringify(n),"]"));else{var r=a.data;sessionStorage.setItem("worddata",r),sessionStorage.setItem("MnemonicType","export"),e(!0)}}))})));case 4:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"importMnemonic",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a,n,r){var o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this,e.abrupt("return",new Promise((function(e,s){ae.a.importMnemonic({word:n,password:r},(function(n){if(n.error)s(n.error);else{var r=n.data;o._setStorage(r,t,a).then((function(){e(!0)})).then((function(e){s(e)}))}}))})));case 2:case"end":return e.stop()}}),e,this)})));return function(t,a,n,r){return e.apply(this,arguments)}}()},{key:"_setStorage",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a,n){var r,o,s,i,c,l,u,p,d;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.account.addresses);case 2:if(r=e.sent,o=t.address,!r){e.next=28;break}for(s=!1,i=!0,c=!1,l=void 0,e.prev=9,u=r[Symbol.iterator]();!(i=(p=u.next()).done);i=!0)p.value===o&&(s=!0);e.next=17;break;case 13:e.prev=13,e.t0=e.catch(9),c=!0,l=e.t0;case 17:e.prev=17,e.prev=18,i||null==u.return||u.return();case 20:if(e.prev=20,!c){e.next=23;break}throw l;case 23:return e.finish(20);case 24:return e.finish(17);case 25:s||r.push(o),e.next=29;break;case 28:r=[o];case 29:return e.next=31,$.set(U.b.account.addresses,r);case 31:return e.next=33,$.set(U.b.infoKey(o),t);case 33:return d={address:o,name:a,hint:n,tk:t.tk,avatar:re.getRandomAvatar()},e.next=36,this.setCurrent(d);case 36:return e.next=38,$.set(U.b.detailKey(o),d);case 38:case"end":return e.stop()}}),e,this,[[9,13,17,25],[18,,20,24]])})));return function(t,a,n){return e.apply(this,arguments)}}()},{key:"List",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o,s;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],e.next=3,this.getAddresses();case 3:if(!((a=e.sent)&&a.size>0)){e.next=17;break}n=a.entries(),r=n.next();case 7:if(r.done){e.next=16;break}return o=r.value[0],e.next=11,$.get(U.b.infoKey(o));case 11:s=e.sent,t.push(s),r=n.next(),e.next=7;break;case 16:return e.abrupt("return",t);case 17:return e.abrupt("return",[]);case 18:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Details",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o,s,i;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this,a=[],e.next=4,this.getAddresses();case 4:if(!((n=e.sent)&&n.size>0)){e.next=18;break}r=n.entries(),o=r.next();case 8:if(o.done){e.next=17;break}return s=o.value[0],e.next=12,t.Detail(s);case 12:i=e.sent,a.push(i),o=r.next(),e.next=8;break;case 17:return e.abrupt("return",a);case 18:return e.abrupt("return",[]);case 19:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getCurrent",value:function(){var e=Object(F.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.account.current);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"setCurrent",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.set(U.b.account.current,t);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"isMyPKr",value:function(e){var t=U.d.get(U.b.account.current);return console.log("isMyPKr,",ne.account.isMyPKr(t.tk,e)),ne.account.isMyPKr(t.tk,e)}},{key:"setDefaultCurrent",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this,e.next=3,$.get(U.b.account.addresses);case 3:if(!(a=e.sent)){e.next=10;break}return e.next=7,t.Detail(a[0]);case 7:return n=e.sent,e.next=10,$.set(U.b.account.current,n);case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setDetail",value:function(){var e=Object(F.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$.get(U.b.account.current);case 2:if(e.sent.address!==t.address){e.next=6;break}return e.next=6,$.set(U.b.account.current,t);case 6:return e.next=8,$.set(U.b.detailKey(t.address),t);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"Keystore",value:function(){var e=Object(F.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$.get(U.b.infoKey(this.address)));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Detail",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",new Promise((function(e,t){t("params address required!")})));case 2:return e.next=4,$.get(U.b.detailKey(t));case 4:if(!(a=e.sent)){e.next=13;break}return e.next=8,$.get(U.b.infoKey(t));case 8:return(n=e.sent).tk&&(a.mainPKr||(a.mainPKr=ne.createPkrHash(n.tk,1,n.version)),a.currentPKr||(a.currentPKr=ne.createPkrHash(n.tk,1,n.version)),te.getPKrIndex(n.tk).then((function(e){var r=ne.createPkrHash(n.tk,e.PkrIndex,n.version);a.currentPKr!==r&&(a.currentPKr=r,$.set(U.b.detailKey(t),a).then())}))),e.abrupt("return",new Promise((function(e,t){e(a)})));case 13:return e.abrupt("return",new Promise((function(e,t){t("Account not exist! ")})));case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),se=(a(626),a(154)),ie=a.n(se),ce=(a(638),function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={showDApp:!1},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){window.frames.length!==parent.frames.length?this.setState({showDApp:!1}):this.setState({showDApp:!0})}},{key:"render",value:function(){var e=this.state.showDApp;return s.a.createElement("div",null,this.props.children,s.a.createElement("div",{className:"tabbar"},s.a.createElement(ie.a,null,s.a.createElement(ie.a.Item,{icon:s.a.createElement(T.a,{type:"iconcopper-coin-line"}),selectedIcon:s.a.createElement(T.a,{type:"iconcopper-coin-line1"}),title:U.c.e().navbar.wallet,key:"home",selected:"home"===this.props.selectedTab,onPress:function(){U.e.goPage(U.e.Home,"")}}),!0===e?s.a.createElement(ie.a.Item,{icon:s.a.createElement(T.a,{type:"icondapp"}),selectedIcon:s.a.createElement(T.a,{type:"icondapp1"}),title:U.c.e().navbar.dapp,key:"dapp",selected:"dapp"===this.props.selectedTab,onPress:function(){U.e.goPage(U.e.DApp,"")}}," "):"",s.a.createElement(ie.a.Item,{icon:s.a.createElement(T.a,{type:"iconmy2"}),selectedIcon:s.a.createElement(T.a,{type:"iconmy1"}),title:U.c.e().navbar.my,key:"my",selected:"my"===this.props.selectedTab,onPress:function(){U.e.goPage(U.e.Personal,"")}}))))}}]),t}(o.Component)),le=a(49),ue=a.n(le),pe=a(125),de=a.n(pe),fe=a(41),me=a.n(fe),he=(a(659),a(15)),ge=a.n(he),ve=a(184),ye=a.n(ve),ke=function(){function e(t){var a=this;Object(l.a)(this,e),this.latestBlock=Object(F.a)(j.a.mark((function e(){var t;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.seroRpcAsync("sero_blockNumber",[]);case 2:return t=e.sent,e.abrupt("return",new ge.a(t.result).toNumber()-12);case 4:case"end":return e.stop()}}),e)}))),t&&(this.rpc=t)}return Object(u.a)(e,[{key:"seroRpc",value:function(e,t,a){var n=U.a.host.rpc;this.rpc&&(n=this.rpc);var r={id:0,jsonrpc:"2.0",method:e,params:t};ye.a.post(n,r).then((function(e){var t=e.data;a&&a(t)})).catch((function(e){console.log("req error: ",e)}))}},{key:"seroRpcAsync",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=U.a.host.rpc,this.rpc&&(n=this.rpc),r={id:0,jsonrpc:"2.0",method:t,params:a},e.next=5,ye.a.post(n,r);case 5:return o=e.sent,e.abrupt("return",new Promise((function(e){e(o.data)})));case 7:case"end":return e.stop()}}),e,this)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"get",value:function(e,t){ye.a.get(e).then((function(e){t&&t(e.data)}))}}]),e}(),Ee=new ke,be=new ke,we=function(){function e(){Object(l.a)(this,e)}return Object(u.a)(e,[{key:"seroTotal",value:function(e,t){var a={};be.get(U.a.host.price+"sero_usdt",(function(n){if(n&&""!==n){var r=(n=JSON.parse(n)).last,o=new ge.a(e).multipliedBy(new ge.a(r)),s=U.d.get(U.b.settings.moneyType);(s=s||"").toUpperCase()===U.a.setting.moneyType.cny?be.get(U.a.host.price+"usdt_cny",(function(e){var n=(e=JSON.parse(e)).last;o=new ge.a(o).multipliedBy(new ge.a(n)).toFixed(5),a.type="\xa5",a.total=o,t(a)})):(o=o.toFixed(5),a.type="$",a.total=o,t(a))}}))}}]),e}(),xe=a(42),Se=a(371),Pe=a.n(Se),Oe=a(372),Be=a.n(Oe),Ce=a(373),Ae=a.n(Ce),Te=a(374),Ne=a.n(Te),Ke=a(375),De=a.n(Ke),Me=a(376),Ie=a.n(Me),je=a(377),Re=a.n(je),_e=new we,Fe=new q,Le=z.a.Item,He=Le.Brief,ze=new oe,Ve=null,We=null,qe=null,Ze=function(e){function t(e){var a;Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).init=Object(F.a)(j.a.mark((function e(){var t;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(L.a)(a);try{t.accounts().then(),Ve||(Ve=setInterval((function(){ze.getCurrent().then((function(e){clearInterval(Ve),e&&e.address?t.accounts().then():(_.a.info(U.c.e().toast.info.createWallet,1.5),setTimeout((function(){U.e.goPage(U.e.AccountCreate1,U.e.Home)}),1e3))})).catch((function(e){}))}),1e3)),We&&clearInterval(We),We=setInterval((function(){t.accounts().then()}),5e3),qe&&clearInterval(qe),qe=setInterval((function(){t.getSyncState()}),1e3)}catch(n){console.log(n)}case 2:case"end":return e.stop()}}),e)}))),a.getSyncState=Object(F.a)(j.a.mark((function e(){var t,n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=Object(L.a)(a)).state.tk){e.next=9;break}return e.next=4,Ee.latestBlock();case 4:return n=e.sent,e.next=7,te.getSyncState(t.state.tk);case 7:(r=e.sent)&&(o="normal",!0===r.health?!0===r.isSyncing?(o="syncing"):(o="normal",0):(o="dead",0),t.setState({healthy:o,healthData:r,latestBlock:n}));case 9:case"end":return e.stop()}}),e)}))),a.showQrCode=function(e){M.a.alert("QR-Code",s.a.createElement("div",null,s.a.createElement("canvas",{id:"qrImg"}),s.a.createElement("p",{style:{marginTop:"0",fontSize:"12px",overflowWrap:"break-word"}},e),s.a.createElement(K.a,{className:"copyTxt",size:"small",onClick:function(){me()(e),_.a.success(U.c.e().toast.success.copy,1)}},"Copy")),[{text:"Close"}]);var t=document.getElementById("qrImg");de.a.toCanvas(t,e,(function(e){e&&console.error(e)}))},a.renLogo=function(e){return"NONT"===e?Pe.a:"HAPY"===e?Be.a:"VERYBOOM"===e?Ae.a:"EUSDT"===e?Ne.a:"TUSDT"===e?Re.a:"EWBTC"===e?De.a:"EWETH"===e?Ie.a:ue.a};var n=U.d.get(U.b.account.assets);n=n?a._objToMap(n):new Map;var r=U.d.get(U.b.account.current);return a.state={accountHtml:[],address:"",assetsHtml:[],seroPriceInfo:{},current:"",account:"",detail:r,assets:n,healthy:"normal",healthData:"",tk:"",confirmingMap:new Map,percent:0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.init().catch((function(e){console.error(e)}))}},{key:"showWallet",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o,i,c,l,u,p;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ze.Details();case 2:if(n=e.sent,r=[],!n){e.next=25;break}for(o=!0,i=!1,c=void 0,e.prev=8,l=function(){var e=p.value;r.push(s.a.createElement(Le,{thumb:s.a.createElement(T.a,{type:e.avatar,className:"icon-avatar"}),multipleLine:!0,onClick:function(){ze.setCurrent(e).then((function(){t.accounts().then(),a.close()}))}},e.name,"(",e.mainPKr,")"))},u=n[Symbol.iterator]();!(o=(p=u.next()).done);o=!0)l();e.next=17;break;case 13:e.prev=13,e.t0=e.catch(8),i=!0,c=e.t0;case 17:e.prev=17,e.prev=18,o||null==u.return||u.return();case 20:if(e.prev=20,!i){e.next=23;break}throw c;case 23:return e.finish(20);case 24:return e.finish(17);case 25:a=M.a.alert(s.a.createElement("div",null,s.a.createElement("span",null,U.c.e().page.wallet.selectWallet),s.a.createElement(T.a,{type:"iconsetting",className:"icon-select-account-setting",onClick:function(){a.close(),U.e.goPage(U.e.WalletManager,U.e.Home)}})),s.a.createElement("div",{style:{maxHeight:"400px",overflowY:"scroll"}},s.a.createElement(z.a,null,r)),[{text:U.c.e().button.ok}]);case 26:case"end":return e.stop()}}),e,null,[[8,13,17,25],[18,,20,24]])})));return function(t){return e.apply(this,arguments)}}()},{key:"modalTips",value:function(e){M.a.alert(U.c.e().modal.help,e,[{text:U.c.e().button.ok}])}},{key:"calSeroTotal",value:function(){var e=this;_e.seroTotal(1,(function(t){e.setState({seroPriceInfo:t})}))}},{key:"accounts",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this,e.next=3,ze.getCurrent();case 3:if(a=e.sent,t.setState({current:a}),!a){e.next=17;break}return e.next=8,ze.Detail(a.address);case 8:return n=e.sent,e.next=11,te.balanceOf(n.tk);case 11:return(r=e.sent)&&U.d.set(U.b.account.assets,t._mapToObj(r)),e.next=15,te.getPendingAndConfirmingGroupByCy(n.tk);case 15:o=e.sent,t.setState({detail:n,account:ze,tk:n.tk,assets:r,confirmingMap:o});case 17:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_mapToObj",value:function(e){var t=Object.create(null),a=!0,n=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done);a=!0){var i=o.value,c=Object(C.a)(i,2),l=c[0],u=c[1];t[l]=u}}catch(p){n=!0,r=p}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}return t}},{key:"_objToMap",value:function(e){for(var t=new Map,a=0,n=Object.keys(e);a0&&(y+=.09*l.checkNilPercent);var E="".concat(U.c.e().toast.loading.synchronizing).concat(U.c.e().page.wallet.PKr," [").concat(l&&l.pkrIndex,"]");l.startBlock-1?"&":"?")+(new Date).getTime()),a.setState({modal2:!0,dapp:e.text,dappUrl:r,read:n,visitDApp:!n})},a.onClose=function(){a.setState({modal2:!1})},a.read=function(){"zh_CN"===U.c.e().key?U.e.goPage(U.e.browser("https://sero.cash/app/disclaimer/index-zh.html"),U.e.DApp):U.e.goPage(U.e.browser("https://sero.cash/app/disclaimer/index-en.html"),U.e.DApp)},a.state={data:Bt,popupData:wt,seroLab:Pt,modal2:!1,dapp:"",dappUrl:"",visitDApp:!0,read:!1,now:0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){this.clearState()}},{key:"componentDidMount",value:function(){U.a.isZH()?this.setState({data:Ot,popupData:xt,seroLab:St}):this.setState({data:Bt,popupData:wt,seroLab:Pt}),this.clearState()}},{key:"visitDApp",value:function(e,t){var a=this.state.dapp;U.d.set(U.b.dappsRead(a),!e),this.setState({visitDApp:e,read:!e})}},{key:"clearRecent",value:function(){U.d.delete(U.b.dapp.list),this.setState({now:(new Date).getTime()})}},{key:"render",value:function(){var e=this,t=this.state,a=t.data,n=t.popupData,r=t.visitDApp,o=t.read,i=t.seroLab,c=U.d.get(U.b.dapp.list);if(c){Ct=[];var l=new Map,u=!0,p=!1,d=void 0;try{for(var f,m=c[Symbol.iterator]();!(u=(f=m.next()).done);u=!0){var h=f.value;if(!0===!l.get(h)){l.set(h,!0);var g=U.d.get(U.b.dappsInfoKey(h));if(Ct.push({icon:s.a.createElement("div",{className:"dapp-icon"},s.a.createElement("img",{src:g.logo,className:"dapp-img"})),text:g.name,url:g.url}),Ct.length>=8)break}}}catch(v){p=!0,d=v}finally{try{u||null==m.return||m.return()}finally{if(p)throw d}}}else Ct=[];return s.a.createElement(ce,{selectedTab:"dapp"},s.a.createElement("div",null,s.a.createElement("div",{className:"layout-top",style:{color:"#f7f7f7"}},s.a.createElement(kt.a,{placeholder:U.c.e().page.dapp.search,maxLength:200,onSubmit:function(e){e&&(e.indexOf("http")>-1?U.e.goPage(U.e.browser(e),U.e.DApp):_.a.fail(U.c.e().page.dapp.invalidDApp,3))}})),s.a.createElement("div",{style:{padding:"45px 0 60px",overflow:"scroll",background:"#fdfdfd"}},s.a.createElement("div",{className:"sub-title"},U.c.e().page.dapp.popup," "),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(vt.a,{data:n,activeStyle:!1,onClick:function(e,t){U.e.goPage(U.e.browser(e.url+(e.url.indexOf("?")>-1?"&":"?")+(new Date).getTime()),U.e.DApp)},hasLine:!1})),s.a.createElement("div",{className:"sub-title"},U.c.e().page.dapp.seroLab," "),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(vt.a,{data:i,activeStyle:!1,onClick:function(e,t){U.e.goPage(U.e.browser(e.url+(e.url.indexOf("?")>-1?"&":"?")+(new Date).getTime()),U.e.DApp)},hasLine:!1})),s.a.createElement("div",{className:"sub-title"},U.c.e().page.dapp.recommended," "),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(vt.a,{data:a,activeStyle:!1,onClick:function(t,a){e.showModal(t,!0)},hasLine:!1})),s.a.createElement("div",null,Ct.length>0?s.a.createElement("div",{style:{height:"auto"}},s.a.createElement("div",{className:"sub-title"},U.c.e().page.dapp.recent,s.a.createElement("div",{className:"sub-title2",onClick:function(){e.clearRecent()}},s.a.createElement(T.a,{type:"iconclear"}))),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(vt.a,{data:Ct,activeStyle:!1,onClick:function(t,a){e.showModal(t)},hasLine:!1}))):""))),s.a.createElement(M.a,{popup:!0,visible:this.state.modal2,onClose:function(){return e.onClose()},animationType:"slide-up"},s.a.createElement(z.a,{renderHeader:function(){return s.a.createElement("div",null,s.a.createElement("h3",null,U.c.e().modal.dappTip1))}},s.a.createElement(z.a.Item,{key:"1"},s.a.createElement("p",{className:"popup-list"},U.c.e().modal.dappTip2,s.a.createElement("a",{onClick:function(){e.read()}},U.c.e().modal.dappTip3),U.c.e().modal.dappTip4),s.a.createElement(At,{"data-seed":"logId",defaultChecked:o,onChange:function(t){return e.visitDApp(!t.target.checked)}},U.c.e().modal.haveRead)),s.a.createElement(z.a.Item,null,s.a.createElement(K.a,{type:"primary",disabled:r,onClick:function(){e.onClose(),U.e.goPage(U.e.browser(e.state.dappUrl),U.e.DApp)}},U.c.e().button.confirm)))))}}]),t}(o.Component),Nt=new oe,Kt=new q,Dt=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).showQrCode=function(e){M.a.alert("QR-Code",s.a.createElement("div",null,s.a.createElement("canvas",{id:"qrImg"}),s.a.createElement("p",{style:{marginTop:"0",fontSize:"12px",overflowWrap:"break-word"}},e),s.a.createElement(K.a,{className:"copyTxt",size:"small",onClick:function(){me()(e),_.a.success("Copy Successfully",1)}},"Copy")),[{text:"Close"}]);var t=document.getElementById("qrImg");de.a.toCanvas(t,e,(function(e){e&&console.error(e)}))},a.state={accountHtml:[]},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"modalTips",value:function(e){M.a.alert(U.c.e().modal.help,e,[{text:U.c.e().button.ok}])}},{key:"componentDidMount",value:function(){this.loadAccounts().then()}},{key:"loadAccounts",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o,i,c,l,u,p;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this,e.next=3,Nt.List();case 3:a=e.sent,n=0,r=[],o=!0,i=!1,c=void 0,e.prev=9,l=j.a.mark((function e(){var a,o,i,c;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=p.value,e.next=3,Nt.Detail(a.address);case 3:o=e.sent,i=o.mainPKr,c=o.currentPKr,r.push(s.a.createElement(Ge.a,{size:"lg",key:n++},s.a.createElement(v.a,{size:"lg"}),s.a.createElement(b.a,null,s.a.createElement(b.a.Header,{thumb:s.a.createElement("div",null,s.a.createElement(T.a,{className:"icon-avatar",type:o.avatar,size:"lg"})),title:o.name,extra:s.a.createElement(T.a,{type:"ellipsis",onClick:function(){U.e.goPage(U.e.manage(a.address),U.e.WalletManager)}})}),s.a.createElement(b.a.Body,{style:{padding:"0px 15px 6px"}},s.a.createElement("div",null,s.a.createElement("span",{style:{color:"#f6c23e"}},s.a.createElement(T.a,{type:"iconhelp",className:"icon-pkr",onClick:function(){t.modalTips(U.c.e().modal.mainPKr)}}),U.c.e().page.walletManage.mainPKr,":"),s.a.createElement("span",null," ",Kt.ellipsisAddress(i)),s.a.createElement(T.a,{type:"iconqr-code",className:"icon-qrcode",onClick:function(){U.e.goPage(U.e.receive(o.address,"mainPKr"),U.e.WalletManager)}})),s.a.createElement("div",null,s.a.createElement("span",{style:{color:"#f6c23e"}},s.a.createElement(T.a,{type:"iconhelp",className:"icon-pkr",onClick:function(){t.modalTips(U.c.e().modal.pkr)}}),U.c.e().page.walletManage.PKr,":"),s.a.createElement("span",null," ",Kt.ellipsisAddress(c)),s.a.createElement(T.a,{type:"iconqr-code",className:"icon-qrcode",onClick:function(){U.e.goPage(U.e.receive(o.address,"pkr"),U.e.WalletManager)}}))))));case 7:case"end":return e.stop()}}),e)})),u=a[Symbol.iterator]();case 12:if(o=(p=u.next()).done){e.next=17;break}return e.delegateYield(l(),"t0",14);case 14:o=!0,e.next=12;break;case 17:e.next=23;break;case 19:e.prev=19,e.t1=e.catch(9),i=!0,c=e.t1;case 23:e.prev=23,e.prev=24,o||null==u.return||u.return();case 26:if(e.prev=26,!i){e.next=29;break}throw c;case 29:return e.finish(26);case 30:return e.finish(23);case 31:0===r.length&&(r=s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(T.a,{type:"iconwushuju",style:{width:"100px",height:"100px"}}),s.a.createElement("br",null),s.a.createElement("span",{style:{color:"gray"}},"No Data"))),t.setState({accountHtml:r});case 33:case"end":return e.stop()}}),e,this,[[9,19,23,31],[24,,26,30]])})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),rightContent:s.a.createElement(T.a,{onClick:function(){M.a.operation([{text:s.a.createElement("span",{style:{textAlign:"center",color:"#108ee9",fontWeight:"800"}},U.c.e().modal.createWallet),onPress:function(){U.e.goPage(U.e.AccountCreate1,U.e.WalletManager)}},{text:s.a.createElement("span",{style:{textAlign:"center",color:"#108ee9",fontWeight:"800"}},U.c.e().modal.importWallet),onPress:function(){U.e.goPage(U.e.ImportAccount,U.e.WalletManager)}}])},type:"iconadd"}),onLeftClick:function(){U.e.goBack()}},U.c.e().page.my.walletManage)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{background:"#f7f7f7",marginTop:"45px",height:"100%",overflowY:"scroll"}},this.state.accountHtml))}}]),t}(o.Component),Mt=new oe,It=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).removeAccount=function(){var e=Object(L.a)(a);M.a.prompt(U.c.e().page.txTransfer.inputPassword,U.c.e().toast.info.removeAccount,[{text:U.c.e().button.cancel,onPress:function(){}},{text:U.c.e().button.confirm,onPress:function(t){if(t){_.a.loading(U.c.e().toast.loading.deleting,60);var a=e.props.match.params.address;Mt.remove(a,t).then((function(){Mt.getCurrent().then((function(e){e.address===a&&Mt.setDefaultCurrent().then()})),_.a.success(U.c.e().toast.success.operation,2),setTimeout((function(){U.e.goBack()}),2e3)})).catch((function(){_.a.fail(U.c.e().toast.error.passwordError,2)}))}else _.a.fail(U.c.e().page.txTransfer.inputPassword,2)}}],"secure-text",null,[U.c.e().page.txTransfer.inputPassword])},a.clearData=function(){var e=Object(L.a)(a);try{M.a.alert(U.c.e().modal.clearData,U.c.e().modal.clearTip,[{text:U.c.e().button.cancel,onPress:function(){}},{text:U.c.e().button.confirm,onPress:function(){_.a.loading("Repairing..."),te.clearData(e.state.detail.tk).then((function(t){Mt.setCurrent(e.state.detail).then((function(e){_.a.success(U.c.e().toast.success.clear,2),setTimeout((function(){U.e.goPage(U.e.Home)}),2e3)}))})).catch((function(e){_.a.success(U.c.e().toast.error.clearData,3),console.log(e)}))}}])}catch(t){_.a.success(U.c.e().toast.error.clearData,3)}},a.changePasswordHint=function(){var e=a.state.detail;M.a.prompt(U.c.e().page.walletManage.changePasswordHint,"",[{text:U.c.e().button.cancel,onPress:function(e){return new Promise((function(e){e()}))}},{text:U.c.e().button.confirm,onPress:function(t){return new Promise((function(a,n){t?(e.hint=t,U.d.set(U.b.detailKey(e.address),e),a(),_.a.success(U.c.e().toast.success.save,1)):n()}))}}],"default",e.hint,[U.c.e().page.walletManage.changePasswordHint])},a.exportMnemonicPhrase=function(){var e=Object(L.a)(a);M.a.prompt(U.c.e().page.walletManage.export,"",[{text:U.c.e().button.cancel,onPress:function(e){return new Promise((function(e){e()}))}},{text:U.c.e().button.confirm,onPress:function(t){return new Promise((function(a,n){t?(_.a.loading(U.c.e().toast.loading.exporting,60),Mt.exportMnemonic(e.props.match.params.address,t).then((function(){_.a.success(U.c.e().toast.success.export,2),a(),setTimeout((function(){U.e.goPage(U.e.AccountCreate2,U.e.manage(e.props.match.params.address))}),2e3)})).catch((function(e){e.indexOf("wrong passphrase")>-1?_.a.fail(U.c.e().toast.error.passwordError,2):_.a.fail(e,3),n()}))):n()}))}}],"secure-text",null,[U.c.e().page.walletManage.password])},a.state={detail:""},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){var e=this,t=e.props.match.params.address;new oe(t).Detail(t).then((function(t){t?e.setState({detail:t}):(_.a.fail(U.c.e().toast.error.accountExisted,1),setTimeout((function(){U.e.goPage(U.e.Personal,"")}),1e3))}))}},{key:"render",value:function(){var e=this,t=this.state.detail;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()}},U.c.e().page.my.walletManage)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement(z.a,null,s.a.createElement(Ge.a,{size:"lg"},s.a.createElement(z.a.Item,{arrow:"horizontal",thumb:s.a.createElement(T.a,{className:"icon-avatar",type:t.avatar,size:"lg"}),multipleLine:!0,onClick:function(){U.e.goPage(U.e.manageName(t.address),U.e.manage(e.props.match.params.address))}},t.name," ",s.a.createElement(z.a.Item.Brief,null,t.mainPKr)))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(z.a,null,s.a.createElement(Ge.a,{size:"lg"},s.a.createElement(z.a.Item,{arrow:"horizontal",onClick:this.changePasswordHint,thumb:s.a.createElement(T.a,{type:"iconcustom-hint",color:"gray"})},s.a.createElement("span",null,U.c.e().page.walletManage.changePasswordHint)),s.a.createElement(z.a.Item,{arrow:"horizontal",onClick:this.exportMnemonicPhrase,thumb:s.a.createElement(T.a,{type:"iconword",color:"gray"})},s.a.createElement("span",null,U.c.e().page.walletManage.export)))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(K.a,{style:{color:"#009688"},onClick:function(){e.clearData()}},U.c.e().button.repair),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(K.a,{style:{color:"red"},onClick:function(){e.removeAccount()}},U.c.e().button.deleteAddress)))}}]),t}(o.Component),jt=new q,Rt=new oe,_t=Array.from(jt.avatars).map((function(e,t){return{icon:s.a.createElement(T.a,{type:e,className:"icon-avatar",size:"lg"}),text:""}})),Ft=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).showChangeAvatar=function(){var e;e=M.a.alert(U.c.e().page.walletManage.changeProfilePhoto,s.a.createElement("div",null,s.a.createElement(vt.a,{data:_t,hasLine:!1,onClick:function(t,n){var r=t.icon.props.type,o=a.state.detail;o.avatar=r,Rt.setDetail(o).then(),a.setState({detail:o}),e.close()},columnNum:3})),[{text:U.c.e().button.confirm,onPress:function(){return new Promise((function(e){e()}))}}],"default")},a.showChangeName=function(){M.a.prompt(U.c.e().page.walletManage.changeWalletName,"",[{text:U.c.e().button.cancel,onPress:function(e){return new Promise((function(e){e()}))}},{text:U.c.e().button.confirm,onPress:function(e){return new Promise((function(t,n){if(e){var r=a.state.detail;r.name=e,Rt.setDetail(r).then(),a.setState({detail:r}),t()}else n()}))}}],"default",null,[U.c.e().page.walletManage.changeWalletName])},a.state={detail:{}},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){var e=this.props.match.params.address,t=this;new oe(e).Detail(e).then((function(e){e?t.setState({detail:e}):(_.a.fail("Account not exist!",1),setTimeout((function(){U.e.goPage(U.e.Personal,"")}),1e3))}))}},{key:"render",value:function(){var e=this.state.detail;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()}},U.c.e().page.my.walletManage)),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement(v.a,{size:"lg"}),s.a.createElement(z.a,null,s.a.createElement(Ge.a,{size:"lg"},s.a.createElement(z.a.Item,{onClick:this.showChangeAvatar,extra:s.a.createElement(T.a,{type:e?e.avatar:"",className:"icon-avatar",size:"lg"}),thumb:s.a.createElement(T.a,{type:"iconavatar",color:"gray"})},s.a.createElement("span",null,U.c.e().page.walletManage.changeProfilePhoto)),s.a.createElement(z.a.Item,{onClick:this.showChangeName,extra:s.a.createElement("span",{style:{color:"#4e73df"}},e?e.name:""),thumb:s.a.createElement(T.a,{type:"iconname",color:"gray"})},s.a.createElement("span",null,U.c.e().page.walletManage.changeWalletName))))))}}]),t}(o.Component),Lt=function(){function e(){Object(l.a)(this,e)}return Object(u.a)(e,[{key:"add",value:function(e){if(U.d.get(U.b.address.info+e.address))throw new Error("Address has in book");var t=U.d.get(U.b.address.book);t?t.push(e.address):t=[e.address],U.d.set(U.b.address.book,t),U.d.set(U.b.address.info+e.address,e)}},{key:"set",value:function(e){U.d.set(U.b.address.info+e.address,e)}},{key:"List",value:function(){var e=U.d.get(U.b.address.book);if(e){var t=[],a=!0,n=!1,r=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done);a=!0){var i=o.value,c=U.d.get(U.b.address.info+i);c&&t.push(c)}}catch(l){n=!0,r=l}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}return t}return[]}},{key:"info",value:function(e){return U.d.get(U.b.address.info+e)}},{key:"remove",value:function(e){var t=U.d.get(U.b.address.book);if(t){var a=[],n=!0,r=!1,o=void 0;try{for(var s,i=t[Symbol.iterator]();!(n=(s=i.next()).done);n=!0){var c=s.value;c===e||a.push(c)}}catch(l){r=!0,o=l}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}U.d.delete(U.b.address.info+e),U.d.set(U.b.address.book,a)}}}]),e}(),Ht=(a(146),new q,new Lt),zt=z.a.Item,Vt=zt.Brief,Wt=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={addressHtml:[]},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.load()}},{key:"load",value:function(){var e=Ht.List(),t=[],a=0,n=!0,r=!1,o=void 0;try{for(var i,c=function(){var e=i.value;t.push(s.a.createElement(zt,{wrap:!0,thumb:s.a.createElement("img",{src:ue.a}),key:a++},e.name,s.a.createElement("br",null),s.a.createElement("div",{className:"list-address",onClick:function(){U.e.goPage(U.e.addressDetail(e.address),U.e.AddressList)}},e.address),s.a.createElement(T.a,{type:"iconcopy",style:{position:"relative",float:"right",color:"gray"},onClick:function(){me()(e.address),_.a.success(U.c.e().toast.success.copy,1)}}),s.a.createElement(Vt,null,e.desc)))},l=e[Symbol.iterator]();!(n=(i=l.next()).done);n=!0)c()}catch(u){r=!0,o=u}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}0===t.length&&(t=s.a.createElement("div",{style:{textAlign:"center",background:"#f7f7f7",padding:"15px 0"}},s.a.createElement(T.a,{type:"iconwushuju",style:{width:"100px",height:"100px"}}),s.a.createElement("br",null),s.a.createElement("span",{style:{color:"gray"}},U.c.e().page.txList.noData))),this.setState({addressHtml:t})}},{key:"render",value:function(){return s.a.createElement("div",null,s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()},rightContent:s.a.createElement(T.a,{type:"iconadd",onClick:function(){U.e.goPage(U.e.AddressAdd,U.e.AddressList)}})},U.c.e().page.addressBook.title)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{marginTop:"45px",overflowY:"scroll"}},s.a.createElement(z.a,null,this.state.addressHtml)))}}]),t}(o.Component),qt=(a(173),a(71)),Zt=a.n(qt),Ut=a(73),Gt=(new q,new Lt),Qt=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).checkConfirming=function(){var e=Object(L.a)(a);a.props.form.validateFields((function(t,a){a.name&&a.address?e.setState({confirming:!1}):e.setState({confirming:!0})}))},a.state={confirming:!0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){var e=this.props.form,t=e.getFieldDecorator,a=e.setFieldsValue;this.nameDecorator=t("name",{rules:[{required:!0}]}),this.addressDecorator=t("address",{rules:[{required:!0}]}),this.descDecorator=t("desc",{rules:[{required:!1}]}),a({address:this.props.address})}},{key:"submit",value:function(){var e=this;e.setState({confirming:!0}),this.props.form.validateFields((function(t,a){if(null==t)if(Object(Ut.validPkr)(a.address))try{Gt.add({name:a.name,address:a.address,desc:a.desc}),_.a.success(U.c.e().toast.success.add,1),setTimeout((function(){U.e.goBack()}),1e3)}catch(n){console.log(n.message),_.a.fail(n.message,1),e.setState({confirming:!1})}else _.a.fail(U.c.e().toast.error.invalidAddress,1),e.setState({confirming:!1})}))}},{key:"render",value:function(){var e=this;this.props.form.getFieldProps;return s.a.createElement("div",{style:{background:"#f7f7f7"}},s.a.createElement(v.a,{size:"lg"}),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement("img",{src:ue.a,width:40})),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",null,this.nameDecorator(s.a.createElement(Zt.a,{className:"textarea-bottom",title:"",placeholder:U.c.e().page.addressBook.name,name:"name",ref:function(t){return e.autoFocusInst=t},autoHeight:!0,clear:!0,onBlur:this.checkConfirming,style:{fontSize:"14px"}}))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",null,this.addressDecorator(s.a.createElement(Zt.a,{className:"textarea-bottom",title:"",clear:!0,placeholder:U.c.e().page.addressBook.address,name:"address",ref:function(t){return e.autoFocusInst=t},rows:4,count:150,autoHeight:!0,onBlur:this.checkConfirming,style:{fontSize:"14px",width:"92%"}})),s.a.createElement(T.a,{type:"iconscan",className:"address-add-iconscan",onClick:function(){U.e.goPage(U.e.scan("address"),U.e.AddressAdd)}})),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{background:"#fdfdfd"}},this.descDecorator(s.a.createElement(Zt.a,{className:"textarea-bottom",title:"",clear:!0,placeholder:U.c.e().page.addressBook.description,name:"desc",ref:function(t){return e.autoFocusInst=t},autoHeight:!0,onBlur:this.checkConfirming,style:{fontSize:"14px"}}))),s.a.createElement("div",{className:"btn-bottom"},s.a.createElement(K.a,{type:"primary",onClick:function(){e.submit()},disabled:this.state.confirming},U.c.e().button.add)))}}]),t}(s.a.Component),Jt=Object(Xe.a)()(Qt),Yt=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.setState({})}},{key:"render",value:function(){return s.a.createElement("div",{style:{background:"#f7f7f7",height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()}},U.c.e().page.addressBook.add)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement(Jt,{address:this.props.match.params.address})))}}]),t}(o.Component),Xt=new Lt,$t=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={address:""},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this.props.match.params.address;if(e){var t=Xt.info(e);this.setState({address:t})}else U.e.goPage(U.e.AddressList,U.e.WalletManager)}},{key:"render",value:function(){var e=this.state.address;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()},rightContent:s.a.createElement(T.a,{type:"iconedit",style:{color:"#108ee9"},onClick:function(){U.e.goPage(U.e.addressEdit(e.address),U.e.addressDetail(e.address))}})},U.c.e().page.addressBook.detail)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement(v.a,{size:"lg"}),s.a.createElement("img",{src:ue.a,width:40}),s.a.createElement(v.a,{size:"lg"})),s.a.createElement(z.a,{style:{background:"#fdfdfd"}},s.a.createElement(z.a.Item,{wrap:!0},s.a.createElement("span",{style:{color:"gray",fontSize:"12px"}},U.c.e().page.addressBook.name),s.a.createElement(z.a.Item.Brief,null,s.a.createElement("div",{style:{color:"#333",fontSize:"16px"}},e.name))),s.a.createElement(z.a.Item,{wrap:!0},s.a.createElement("span",{style:{color:"gray",fontSize:"12px"}},U.c.e().page.addressBook.address),s.a.createElement("br",null),s.a.createElement("div",{className:"list-address"},e.address),s.a.createElement(T.a,{type:"iconcopy",style:{position:"relative",float:"right",color:"gray",top:"-5px"},onClick:function(){me()(e.address),_.a.success(U.c.e().toast.success.copy,1)}})),s.a.createElement(z.a.Item,{wrap:!0},s.a.createElement("span",{style:{color:"gray",fontSize:"12px"}},U.c.e().page.addressBook.description),s.a.createElement(z.a.Item.Brief,null,s.a.createElement("div",{style:{color:"#333",fontSize:"16px"}},e.desc))))))}}]),t}(o.Component),ea=(new q,new Lt),ta=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={confirming:!0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){this.props.address?(this.nameDecorator=this.props.form.getFieldDecorator("name",{rules:[{required:!0}],initialValue:this.props.address.name||""}),this.addressDecorator=this.props.form.getFieldDecorator("address",{rules:[{required:!0}],initialValue:this.props.address.address||""}),this.descDecorator=this.props.form.getFieldDecorator("desc",{rules:[{required:!1}],initialValue:this.props.address.desc||""})):U.e.goPage(U.e.AddressList,U.e.WalletManager)}},{key:"submit",value:function(){var e=this;this.props.form.validateFields((function(t,a){if(null==t)if(Object(Ut.validPkr)(a.address))try{ea.remove(e.props.address.address),ea.add({name:a.name,address:a.address,desc:a.desc}),_.a.success(U.c.e().toast.success.save,1),setTimeout((function(){U.e.goBack()}),1e3)}catch(n){_.a.fail(n.message,1)}else _.a.fail(U.c.e().toast.error.invalidAddress,1);else t.name?_.a.fail(t.name.errors[0].message,1):t.address&&_.a.fail(t.address.errors[0].message,1)}))}},{key:"render",value:function(){var e=this;return s.a.createElement("div",null,s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:U.c.e().button.cancel,onLeftClick:function(){U.e.goBack()},rightContent:s.a.createElement("span",{style:{color:"#108ee9"},onClick:function(){e.submit()}},U.c.e().button.save)},U.c.e().page.addressBook.detail)),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement("div",null,s.a.createElement(v.a,{size:"lg"}),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{textAlign:"center"}},s.a.createElement("img",{src:ue.a,width:40})),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",null,this.nameDecorator(s.a.createElement(Zt.a,{className:"textarea-bottom",title:"",placeholder:U.c.e().page.addressBook.name,name:"name",ref:function(t){return e.autoFocusInst=t},autoHeight:!0,autoFocus:!0,clear:!0,onBlur:this.checkConfirming,style:{fontSize:"14px"}}))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",null,this.addressDecorator(s.a.createElement(Zt.a,{title:"",placeholder:U.c.e().page.addressBook.address,name:"address",ref:function(t){return e.autoFocusInst=t},autoHeight:!0,clear:!0,style:{fontSize:"14px"},editable:!1,rows:4}))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{style:{background:"#fdfdfd"}},this.descDecorator(s.a.createElement(Zt.a,{title:"",clear:!0,placeholder:U.c.e().page.addressBook.description,name:"desc",ref:function(t){return e.autoFocusInst=t},autoHeight:!0,onBlur:this.checkConfirming})))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(K.a,{onClick:function(){M.a.alert(U.c.e().button.deleteAddress,U.c.e().modal.sure,[{text:U.c.e().button.cancel,onPress:function(){}},{text:U.c.e().button.confirm,onPress:function(){ea.remove(e.props.address.address),_.a.success("Delete Successfully",1),setTimeout((function(){U.e.goPage(U.e.AddressList,U.e.WalletManager)}),1e3)}}])}},s.a.createElement("span",{style:{color:"red"}},U.c.e().button.deleteAddress))))}}]),t}(s.a.Component),aa=Object(Xe.a)()(ta),na=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={address:"",save:!1},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){var e=this.props.match.params.address,t=ea.info(e);this.setState({address:t})}},{key:"render",value:function(){return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement(aa,{address:this.state.address,save:this.state.save}))}}]),t}(o.Component),ra=(a(803),a(387)),oa=a.n(ra),sa=(a(356),new q),ia=new oe,ca=(s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.all),s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.out),s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.in),z.a.Item),la=ca.Brief,ua=1,pa=null,da=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).onRefresh=function(){var e=Object(L.a)(a);e.setState({refreshing:!0,isLoading:!0,datas:[]}),_.a.loading("loading...",1),e.initTxList().then((function(t){e.setState({datas:t,refreshing:!1,isLoading:!1,hasMore:t.length>=10})}))},a.onEndReached=function(e){var t=Object(L.a)(a);t.state.isLoading||(t.setState({isLoading:!0}),_.a.loading("loading...",1),t.initTxList(++ua).then((function(e){e.length>t.state.datas.length?t.setState({datas:e,isLoading:!1,hasMore:e.length>=10}):t.setState({datas:e,isLoading:!1,hasMore:!1})})))},a.state={all:[],in:[],out:[],datas:[],refreshing:!0,isLoading:!0,height:document.documentElement.clientHeight-45,hasMore:!0,address:"",latestBlock:0,confirmMap:new Map},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this;[{title:s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.all)},{title:s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.out)},{title:s.a.createElement("span",{style:{color:"#64727c",fontWeight:"bold"}},U.c.e().page.txList.in)}],ua=1;var t=this.state.height;(new oe).getCurrent().then((function(t){e.setState({address:t.address})})),_.a.loading("loading...",2),setTimeout((function(){e.initTxList(10).then((function(a){e.setState({datas:a,height:t,refreshing:!1,isLoading:!1,hasMore:a.length>=10})}))}),200),pa&&clearInterval(pa),pa=setInterval((function(){e.initTxList(10).then((function(a){e.setState({datas:a,height:t,refreshing:!1,isLoading:!1,hasMore:a.length>=10})}))}),1e4)}},{key:"getSyncState",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ia.getCurrent();case 2:return t=e.sent,e.next=5,te.getSyncState(t.tk);case 5:a=e.sent,this.setState({latestBlock:a.latestBlock});case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"initTxList",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o,s,i,c,l,u,p,d,f,m,h,g,v,y,k,E;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=t?10*ua:10,e.next=3,this.getSyncState();case 3:return e.next=5,ia.getCurrent();case 5:return a=e.sent,n=this.props.match.params.currency,e.next=9,te.getTxList(a.tk,n,t);case 9:return r=e.sent,e.next=12,te.getPendingAndConfirming(a.tk,n);case 12:for(o=e.sent,s=[],i=[],c=!0,l=!1,u=void 0,e.prev=18,p=r[Symbol.iterator]();!(c=(d=p.next()).done);c=!0)"pending"===(f=d.value).State&&i.push(f.TxHash);e.next=26;break;case 22:e.prev=22,e.t0=e.catch(18),l=!0,u=e.t0;case 26:e.prev=26,e.prev=27,c||null==p.return||p.return();case 29:if(e.prev=29,!l){e.next=32;break}throw u;case 32:return e.finish(29);case 33:return e.finish(26);case 34:for(m=new Map,h=!0,g=!1,v=void 0,e.prev=38,y=o[Symbol.iterator]();!(h=(k=y.next()).done);h=!0)E=k.value,i.indexOf(E.TxHash)<0&&s.push(E),m.set(E.TxHash,E);e.next=46;break;case 42:e.prev=42,e.t1=e.catch(38),g=!0,v=e.t1;case 46:e.prev=46,e.prev=47,h||null==y.return||y.return();case 49:if(e.prev=49,!g){e.next=52;break}throw v;case 52:return e.finish(49);case 53:return e.finish(46);case 54:return this.setState({confirmMap:m}),s.reverse(),e.abrupt("return",r.concat(s));case 57:case"end":return e.stop()}}),e,this,[[18,22,26,34],[27,,29,33],[38,42,46,54],[47,,49,53]])})));return function(t){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=this.props.match.params.currency,a=this.state,n=a.datas,r=a.hasMore,o=a.isLoading,i=a.latestBlock,c=a.confirmMap,l=[];if(n&&n.length>0){for(var u=function(e){var a=void 0,r=n[e];c.has(r.TxHash)&&c.get(r.TxHash).Num&&(r.Num=c.get(r.TxHash).Num,r.isConfirm=!0),r&&r.Time&&(a=sa.formatDate(r.Time));var o=0;r.Tkn.forEach((function(e,a){a===t&&(o=xe.a.convert(e,a))})),"out"===r.Type&&1===new ge.a(o).comparedTo(0)?r.Type="in":"in"===r.Type&&-1===new ge.a(o).comparedTo(0)&&(r.Type="out");var u="out"===r.Type?"iconzhichu":"iconshouru",p="out"===r.Type?"#24bdd2":"#198fea",d="out"===r.Type?"":"+";"pending"===r.State&&(u="iconsystem_pending_line",p="#f47402"),"pending"!==r.State&&r.isConfirm&&ia.isMyPKr(r.From)&&(o="0"),l.push(s.a.createElement(ca,{key:e,style:"pending"===r.State||r.isConfirm?{opacity:.5}:{},multipleLine:!0,onClick:function(){U.d.set(U.b.txInfoKey("",r.TxHash),r),U.e.goPage(U.e.transferDetail(r.TxHash),U.e.transferList(t))},thumb:s.a.createElement(T.a,{type:u,size:"lg",style:{color:"".concat(p)}}),extra:s.a.createElement("span",{className:"income-span",style:{color:p}},d,o)},s.a.createElement("span",{style:{fontSize:"14px",color:"#64727c"}},sa.ellipsisHash(r.TxHash)),s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"14px",color:"#64727c"}},U.c.e().page.txDetail.block+" : "+(99999999999===r.Num?0:r.Num)),s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"14px",color:"#64727c"}},r.isConfirm?U.c.e().page.txDetail.pending+" : "+(r.Num&&12-r.Num+i>=0?12-r.Num+i:0)+"/12":""),s.a.createElement(la,{style:{fontSize:"12px",color:"#c4c7cc"}},a)))},p=n.length-1;p>=0;p--)u(p);l.push(s.a.createElement(ca,{key:n.length+1,multipleLine:!0},s.a.createElement("p",{style:{textAlign:"center",color:"#198fea"}},o?"loading...":r?s.a.createElement(K.a,{size:"small",type:"ghost",onClick:function(){return e.onEndReached()}},"Show more"):"~")))}else o||l.push(s.a.createElement(ca,{key:1,multipleLine:!0},s.a.createElement("div",{style:{textAlign:"center",background:"#fdfdfd",padding:"15px 0"}},s.a.createElement(T.a,{type:"iconwushuju",style:{width:"100px",height:"100px"}}),s.a.createElement("br",null),s.a.createElement("span",{style:{color:"gray"}},U.c.e().page.txList.noData))));return s.a.createElement("div",{style:{height:document.documentElement.clientHeight,background:"#fdfdfd"}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",icon:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()}},this.props.match.params.currency)),s.a.createElement(oa.a,{damping:100,ref:function(t){return e.ptr=t},style:{height:this.state.height,overflow:"auto"},indicator:this.state.down?{}:{deactivate:"pull to refresh"},direction:"down",refreshing:this.state.refreshing,onRefresh:this.onRefresh},s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement(z.a,null,l))),s.a.createElement("div",{className:"bottom-button-div"},s.a.createElement("div",{className:"bottom-button-div-left"},s.a.createElement(K.a,{className:"bottom-button-div-receive",onClick:function(){e.state.address&&U.e.goPage(U.e.receive(e.state.address,"pkr"),U.e.transferList(e.props.match.params.currency))}},U.c.e().button.receive)),s.a.createElement("div",{className:"bottom-button-div-right"},s.a.createElement(K.a,{className:"bottom-button-div-transfer",onClick:function(){U.e.goPage(U.e.transfer(e.props.match.params.currency),U.e.transferList(e.props.match.params.currency))}},U.c.e().button.transfer))))}}]),t}(o.Component),fa=(a(236),a(26)),ma=a.n(fa),ha=new ke,ga=new q,va=new oe,ya=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={state:"pending",txInfo:{},txState:"",tos:[],cmdType:"",blockNum:0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.match.params.hash;va.getCurrent().then((function(a){te.getTxDetail(a.tk,t).then((function(t){e.setState({txInfo:t})})).catch((function(n){te.getPendingAndConfirming(a.tk).then((function(a){var n=!0,r=!1,o=void 0;try{for(var s,i=a[Symbol.iterator]();!(n=(s=i.next()).done);n=!0){var c=s.value;t===c.TxHash&&(c.Fee=xe.a.convert(new ge.a(c.GasUsed).multipliedBy(new ge.a(c.GasPrice)),"SERO"),e.setState({txInfo:c}))}}catch(l){r=!0,o=l}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}}))}))})),e.getTxState().catch()}},{key:"getTxState",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o,i,c,l,u,p,d,f,m,h;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.match.params.hash,e.next=3,ha.seroRpcAsync("sero_getTransactionReceipt",[t]);case 3:return a=e.sent,n=a.result,r="",n&&(r=1===new ge.a(n.status).comparedTo(0)?s.a.createElement(ot.a,null,U.c.e().page.txDetail.contractSuccess):s.a.createElement(ot.a,null,U.c.e().page.txDetail.contractFailed)),e.next=9,ha.seroRpcAsync("sero_getTransactionByHash",[t]);case 9:if(o=e.sent,i=o.result){if(n&&(i.Num=new ge.a(n.blockNumber).toNumber()),c=i.stx.Desc_Cmd,l="",c&&(c.BuyShare?l="Buy Share":c.RegistPool?l="Regist Pool":c.ClosePool?l="Close Pool":c.Contract&&(l="Contract")),u=[],l)"Contract"===l&&(u.push(i.to),h=(h=ga.base58ToHex(i.to)).length>64?h.slice(0,h.length-64):h,u.push("(".concat(ga.ellipsisAddress(ga.hexToBase58(h)),")")));else{if(i.stx.Tx1.Outs_P)for(p=0;p32?s.a.createElement("div",null,s.a.createElement("div",{style:{overflowWrap:"break-word",fontSize:"10px",padding:"5px 0"},onClick:function(){me()(e),_.a.success("Copy Successfully",1)}},e,s.a.createElement(T.a,{type:"iconcopy",className:"transfer-detail-copy-icon"}))):s.a.createElement("div",null,s.a.createElement("div",{style:{overflowWrap:"break-word",fontSize:"10px",fontWeight:"600",color:"#000"}},"Contract Address: ",e))})))),s.a.createElement(v.a,{size:"lg"}),"Contract"===c?s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},o)):c),s.a.createElement("div",null,s.a.createElement(Ge.a,null,s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.hash,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",{onClick:function(){me()(a.props.match.params.hash),_.a.success("Copy Successfully",1)}},ga.ellipsisHash(this.props.match.params.hash),s.a.createElement(T.a,{type:"iconcopy",className:"transfer-detail-copy-icon"})))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.block,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",{style:{color:"#007bff"}},99999999999===l?0:l))))))),s.a.createElement("p",{className:"transfer-detail-p"},s.a.createElement("a",{onClick:function(){U.e.goPage(U.e.browser("https://explorer.sero.cash/txsInfo.html?hash=".concat(r.BlockHash)),U.e.transferDetail(a.props.match.params.hash))},style:{color:"#108ee9"}},U.c.e().page.txDetail.goto)))}}]),t}(o.Component),ka=a(178),Ea=a(150),ba=new oe,wa=new ka.a,xa=function(){function e(t){if(Object(l.a)(this,e),t)this.address=t;else{var a=wa.get(U.b.account.current);a&&(this.address=a.address)}}return Object(u.a)(e,[{key:"query",value:function(e){var t=this;return new Promise((function(a,n){try{a(t.queryStorage(e))}catch(r){a(t.queryStorage(e))}}))}},{key:"queryStorage",value:function(e){for(var t=wa.length(),a=U.b.txKeyPrefix(this.address),n=new Map,r=0;r-1){var s=o.split(":")[2],i=o.split(":")[3],c=o.split(":")[4];Object(Ea.genTxMap)(i,s,e,n,c)}}if(n)return Object(Ea.sortTxMap)(n)}},{key:"info",value:function(e){var t=this;return new Promise((function(a,n){try{a(t.infoStorage(e))}catch(r){a(t.infoStorage(e))}}))}},{key:"infoStorage",value:function(e){var t=wa.get(e);if(t.currency)return{state:"pending",data:t};for(var a=U.b.txKeyHashPrefix(this.address,e),n=wa.length(),r=new Map,o=0;o-1){var i=s.split(":")[3],c=s.split(":")[4];Object(Ea.genTxInfo)(c,r,e,i)}}var l=null,u=[];return r.forEach((function(e,t,a){l=e,u.push({cy:e.currency,value:e.value})})),l.assets=u,{state:"completed",data:l}}},{key:"transfer",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n,r,o,s,i,c,l,u,p;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.cy,o=t.gas,s=t.gasPrice,i=t.from,r||(r="SERO"),o||(o="0x"+new ge.a("4700000").toString(16)),s||(s="0x"+new ge.a("1000000000").toString(16)),i){e.next=15;break}return e.next=10,ba.getCurrent();case 10:c=e.sent,n=new oe(c.address),i=c.tk,e.next=20;break;case 15:return n=new oe(i),e.next=18,n.Detail(i);case 18:l=e.sent,i=l.tk;case 20:return(u={}).From=i,u.To=t.to,u.Cy=r,u.Value=t.value,u.Data=t.data,u.Gas=new ge.a(o).toString(16),u.GasPrice=new ge.a(s).toString(16),e.next=30,n.getSK(a);case 30:return u.SK=e.sent,u.FeeCy=t.feeCy?t.feeCy:"SERO",u.BuyShare=t.BuyShare,t.feeValue&&(u.FeeValue=t.feeValue),t.catg&&t.tkt&&((p=new Map).set(t.catg,t.tkt),u.Tkts=p),e.abrupt("return",te.commitTx(u));case 36:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()},{key:"storePendingTx",value:function(e){wa.set(U.b.txKeyPending(this.address,e.currency,e.hash),1),wa.set(e.hash,e)}},{key:"pendingTxList",value:function(e){var t=this;return new Promise((function(a,n){for(var r=wa.length(),o=[],s=0;s-1){var c=i.split(":")[3],l=wa.get(c);l.currency&&o.push(l)}}a(o)}))}},{key:"pendingTxInfo",value:function(e){return wa.get(e)}}]),e}();function Sa(){this._map={}}Sa.prototype.add=function(e,t){this._map[e]=t},Sa.prototype.get=function(e){return this._map[e]};var Pa=new oe,Oa=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).checkConfirming=function(){var e=Object(L.a)(a);a.props.form.validateFields((function(t,a){a.amount&&a.address&&e.setState({total:new ge.a(a.amount).toString(10)})}))},a.amountDecorator=a.props.form.getFieldDecorator("amount",{rules:[{required:!0}]}),a.addressDecorator=a.props.form.getFieldDecorator("address",{rules:[{required:!0}]}),a.state={confirming:!1,total:0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){if(this.props.address)if(Object(Ut.validPkr)(this.props.address)){(0,this.props.form.setFieldsValue)({address:this.props.address})}else _.a.fail(U.c.e().toast.error.invalidAddress,2)}},{key:"submit",value:function(){var e=this,t=this;t.setState({confirming:!0}),this.props.form.validateFields((function(a,n){if(!n.address)return _.a.fail(U.c.e().page.txTransfer.inputAddress,1.5),void t.setState({confirming:!1});if(!n.amount||0===parseFloat(n.amount))return _.a.fail(U.c.e().page.txTransfer.inputAmount,1.5),void t.setState({confirming:!1});if("SERO"===e.props.currency){if(1===new ge.a(n.amount).plus(new ge.a("0.00002500")).comparedTo(new ge.a(t.props.amount)))return _.a.fail(U.c.e().toast.error.notEnough,1.5),void t.setState({confirming:!1})}else(Pa=new oe).getCurrent().then((function(e){te.balanceOf(e.tk).then((function(e){e&&"object"===typeof e&&e.forEach((function(e,a){"SERO"===a&&(1===new ge.a("0.00002500").comparedTo(e)&&(_.a.fail(U.c.e().toast.error.notEnoughFee,1.5),t.setState({confirming:!1})),1===new ge.a(n.amount).comparedTo(new ge.a(t.props.amount))&&(_.a.fail(U.c.e().toast.error.notEnough,1.5),t.setState({confirming:!1})))}))}))}));if(!Object(Ut.validPkr)(n.address))return _.a.fail(U.c.e().toast.error.invalidAddress,1.5),void t.setState({confirming:!1});null==a&&M.a.prompt(U.c.e().page.txTransfer.inputPassword,U.c.e().page.txTransfer.passwordMsg,[{text:U.c.e().button.cancel,onPress:function(){t.setState({confirming:!1})}},{text:U.c.e().button.confirm,onPress:function(e){if(!e)return _.a.fail(U.c.e().page.txTransfer.inputPassword,1.5),void t.setState({confirming:!1});_.a.loading(U.c.e().toast.loading.sending,120);var a=new xa(t.props.pk),r={to:n.address,cy:t.props.cy,value:xe.a.mul(n.amount,t.props.cy,0),gas:25e3,gasPrice:1000000001};a.transfer(r,e).then((function(e){e&&(_.a.success(U.c.e().toast.success.send,2),setTimeout((function(){U.e.goPage(U.e.transferDetail(e),U.e.transferList(t.props.cy))}),1500))})).catch((function(e){"object"===typeof e&&(e=e.message),e.indexOf("wrong passphrase")>-1?_.a.fail(U.c.e().toast.error.passwordError,2):e.indexOf("no enough")>-1?_.a.fail(U.c.e().toast.error.notEnough,2):_.a.fail(e,3),t.setState({confirming:!1})}))}}],"secure-text",null,[U.c.e().page.txTransfer.inputPassword])}))}},{key:"render",value:function(){var e=this,t=this.props,a=t.cy,n=t.amount;return s.a.createElement("div",null,s.a.createElement("div",{className:"coin"},s.a.createElement(Ge.a,null,s.a.createElement("div",{className:"title"},s.a.createElement("div",{className:"left"},s.a.createElement("strong",null,a)),s.a.createElement("div",{className:"right"},n)),s.a.createElement("div",{className:"content"},this.amountDecorator(s.a.createElement(Ye.a,{placeholder:U.c.e().page.txTransfer.inputAmount,type:"money",name:"amount",moneyKeyboardAlign:"left",onBlur:this.checkConfirming,onChange:this.checkConfirming}))))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{className:"address"},s.a.createElement(Ge.a,null,s.a.createElement("div",{className:"title"},s.a.createElement("div",{className:"left"},U.c.e().page.txTransfer.address),s.a.createElement("div",{className:"right"})),s.a.createElement("div",{className:"content"},this.addressDecorator(s.a.createElement(Zt.a,{placeholder:U.c.e().page.txTransfer.inputAddress,rows:"4",name:"address",style:{fontSize:" 12px"},onBlur:this.checkConfirming,onChange:this.checkConfirming})),s.a.createElement(T.a,{type:"iconAddressbook-",className:"transfer-address",onClick:function(){U.e.goPage(U.e.addressSelect(a),U.e.transfer(a+(e.props.address?"/"+e.props.address:"")))}})))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{className:"fee"},s.a.createElement(Ge.a,null,s.a.createElement("div",{className:"title"},s.a.createElement("div",{className:"left"},U.c.e().page.txTransfer.fee," "),s.a.createElement("div",{className:"right",style:{textAlign:"right"}},s.a.createElement("span",{style:{fontSize:"14px"}},"0.00002500"," SERO"),s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"12px",color:"rgb(136, 136, 136)"}},"Gas(25000) * GasPrice(1Gta)"))))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement("div",{className:"fee"},s.a.createElement(Ge.a,null,s.a.createElement("div",{className:"title"},s.a.createElement("div",{className:"left"},U.c.e().page.txTransfer.total," "),s.a.createElement("div",{className:"right",style:{textAlign:"right"}},"SERO"===this.props.cy?s.a.createElement("div",null,s.a.createElement("span",{style:{fontSize:"14px",color:"#333",fontWeight:"bold"}},new ge.a(this.state.total).plus(new ge.a("0.00002500")).toString(10))," ",this.props.cy):s.a.createElement("div",null,s.a.createElement("span",{style:{fontSize:"14px",color:"#333",fontWeight:"bold"}},this.state.total)," ",this.props.cy,s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"14px",color:"#333",fontWeight:"bold"}},"+ ","0.00002500")," SERO"))))),s.a.createElement(v.a,null),s.a.createElement("div",{className:"btn-bottom"},s.a.createElement(K.a,{type:"primary",disabled:this.state.confirming,onClick:function(){e.submit()}},U.c.e().button.next)))}}]),t}(o.Component),Ba=Object(Xe.a)()(Oa),Ca=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={amount:0,currency:"SERO",current:"",detail:{}},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.init().then()}},{key:"init",value:function(){var e=Object(F.a)(j.a.mark((function e(){var t,a,n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(t=this).props.match.params.currency,e.next=4,Pa.getCurrent();case 4:return n=e.sent,e.next=7,Pa.Detail(n.address);case 7:return r=e.sent,e.next=10,te.balanceOf(r.tk);case 10:(o=e.sent)&&"object"===typeof o&&o.forEach((function(e,n){n===a&&(e=xe.a.convert(e,a),t.setState({amount:e}))})),t.setState({currency:a,current:n,detail:r});case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.state,t=e.currency,a=e.detail,n=e.amount;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight}},s.a.createElement(x.a,{mode:"light",icon:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()},rightContent:s.a.createElement(T.a,{type:"iconscan",onClick:function(){U.e.goPage(U.e.scan("transfer",t),U.e.transfer(t))}})},U.c.e().button.transfer),s.a.createElement(Ba,{amount:n,tk:a.tk,cy:t,address:this.props.match.params.address}))}}]),t}(o.Component),Aa=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={prk:"",tips:"",name:"",act:{}},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.match.params.address,a=this.props.match.params.type;new oe(t).Detail(t).then((function(t){var n=t.currentPKr,r=U.c.e().modal.pkr;"mainPKr"===a&&(n=t.mainPKr,r=U.c.e().modal.mainPKr);var o=document.getElementById("qrImg");de.a.toCanvas(o,n,(function(e){e&&console.error(e)})),e.setState({pkr:n,tips:r,act:t})}))}},{key:"render",value:function(){var e=this;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight,background:"#353c4b"}},s.a.createElement(x.a,{mode:"light",icon:s.a.createElement(T.a,{type:"left",style:{color:"#f7f7f7"}}),onLeftClick:function(){U.e.goBack()},style:{backgroundColor:"unset"}},s.a.createElement("span",{style:{color:"#f7f7f7"}},"pkr"===this.props.match.params.type?U.c.e().page.wallet.PKr:U.c.e().page.wallet.mainPKr)),s.a.createElement("div",{className:"transfer-receive-border"},s.a.createElement("div",{className:"transfer-receive-icon"},s.a.createElement(T.a,{type:this.state.act.avatar,style:{width:"40px",height:"40px"}})),s.a.createElement("div",{className:"transfer-receive-header"},s.a.createElement("strong",null,this.state.act.name),s.a.createElement("br",null),s.a.createElement("div",{className:"transfer-receive-header-hash",onClick:function(){me()(e.state.pkr),_.a.success(U.c.e().toast.success.copy,1)}},this.state.pkr,s.a.createElement(T.a,{type:"iconcopy",style:{width:"14px",height:"14px"}}))),s.a.createElement("div",{className:"transfer-receive-body",style:{height:.6*document.documentElement.clientHeight}},s.a.createElement("canvas",{id:"qrImg"}),s.a.createElement("br",null),s.a.createElement("p",{style:{color:"#dfab14"}},this.state.tips))))}}]),t}(o.Component),Ta=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).clearData=function(){try{_.a.loading("Clearing..."),te.clearData("").then((function(e){_.a.success(U.c.e().toast.success.clear,2),setTimeout((function(){M.a.alert(U.c.e().modal.clearData,U.c.e().modal.clearTip,[{text:U.c.e().button.confirm,onPress:function(){window.location.href="./index.html#/"}}])}),2e3)})).catch((function(e){_.a.success(U.c.e().toast.error.clearData,3),console.log(e)}))}catch(e){_.a.success(U.c.e().toast.error.clearData,3),console.log("clear Data:",e.message)}},a.state={network:[],showNetwork:!1},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){U.a.init(),this.setState({network:[{id:"2",network:"main",name:U.c.e().page.setting.enNode,rpc:"https://f-sero-light-node.ririniannian.com"},{id:"1",network:"main",name:U.c.e().page.setting.cnNode,rpc:"https://sero-light-node.ririniannian.com"}]})}},{key:"setRpc",value:function(e,t){e&&(U.a.setRpc(e,t),te.init()),this.setState({showNetwork:!1})}},{key:"actionSheet",value:function(e){var t=[];e.forEach((function(e){t.push({text:e.url,onPress:function(){window.location.href=e.url+"#/"}})})),M.a.operation(t)}},{key:"render",value:function(){var e=this,t=this.state.network;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight-45}},s.a.createElement("div",{className:"layout-top"},s.a.createElement(x.a,{mode:"light",leftContent:s.a.createElement(T.a,{type:"left"}),onLeftClick:function(){U.e.goBack()}},U.c.e().page.my.settings)),s.a.createElement("div",{style:{marginTop:"45px"}},s.a.createElement(v.a,{size:"lg"}),s.a.createElement(z.a,null,s.a.createElement(Ge.a,{size:"lg"},s.a.createElement(z.a.Item,{extra:s.a.createElement("span",{style:{fontSize:"14px"}},U.c.e().value),arrow:"horizontal",onClick:function(){M.a.operation([{text:U.c.en_US.value,onPress:function(){U.a.setLanguage(U.c.en_US.key),U.e.goPage(U.e.Settings+"?"+new Date)}},{text:U.c.zh_CN.value,onPress:function(){U.a.setLanguage(U.c.zh_CN.key),U.e.goPage(U.e.Settings+"?"+new Date)}},{text:U.c.ja_JP.value,onPress:function(){U.a.setLanguage(U.c.ja_JP.key),U.e.goPage(U.e.Settings+"?"+new Date)}},{text:U.c.be_BY.value,onPress:function(){U.a.setLanguage(U.c.be_BY.key),U.e.goPage(U.e.Settings+"?"+new Date)}},{text:U.c.ko_KR.value,onPress:function(){U.a.setLanguage(U.c.ko_KR.key),U.e.goPage(U.e.Settings+"?"+new Date)}}])}},s.a.createElement("span",null,U.c.e().page.setting.language)),s.a.createElement(z.a.Item,{extra:s.a.createElement("span",{style:{fontSize:"14px"}},U.a.seroRpcName()),arrow:"horizontal",onClick:function(){e.setState({showNetwork:!0})}},s.a.createElement("span",null,U.c.e().page.setting.node)),s.a.createElement(z.a.Item,{arrow:"horizontal",onClick:function(){U.e.goPage(U.e.HistoryPKr,U.e.Settings)}},s.a.createElement("span",null,U.c.e().page.setting.pkr)))),s.a.createElement(M.a,{popup:!0,visible:this.state.showNetwork,onClose:function(){e.setState({showNetwork:!1})},animationType:"slide-up"},s.a.createElement(z.a,{renderHeader:function(){return s.a.createElement("div",null,U.c.e().page.setting.node)},className:"popup-list"},t.map((function(t,a){return s.a.createElement(Ge.a,null,s.a.createElement(z.a.Item,{key:a,onClick:function(){e.setRpc(t.rpc,t.name)}},t.name))})),s.a.createElement(z.a.Item,null,s.a.createElement(Ye.a,{placeholder:"http://",id:"customer"}),s.a.createElement("div",{style:{marginTop:"15px"}},s.a.createElement(K.a,{type:"primary",onClick:function(){var t=document.getElementById("customer").value;e.setRpc(t)}},s.a.createElement("span",{style:{color:"#fff"}},U.c.e().button.confirm))))))))}}]),t}(o.Component),Na=(a(806),a(388)),Ka=a.n(Na),Da=a(182),Ma=a.n(Da),Ia=a(103),ja=a(27),Ra=a.n(ja),_a=new Ma.a,Fa=new xa,La=new oe;new RegExp("\\biPhone\\b|\\biPod\\b","i").test(window.navigator.userAgent);var Ha,za={method:{init:"init",accountDetail:"accountDetail",accountList:"accountList",executeContract:"executeContract",call:"call",estimateGas:"estimateGas",getInfo:"getInfo",pkrCrypto:"pkrCrypto",pkrEncrypt:"pkrEncrypt",pkrDecrypt:"pkrDecrypt",goPage:"goPage"}},Va={barColor:"#f7f7f7",barMode:"light",navColor:"#F7F7F7",navMode:"dark",navTitle:"Browser"},Wa=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).setPassword=function(e){a.setState({password:e})},a.initTile=function(){var e=Object(L.a)(a);window.addEventListener("message",a.receiveMessage,{passive:!0}),-1===a.props.match.params.url.indexOf("http")?setTimeout((function(){var e=document.getElementById("ifrModel");e&&(Va.navTitle=e.contentWindow.document.title)}),200):e.setState({navTitle:"Browser"})},a.initDApp=function(e){return e&&"success"!==e&&(Va.navTitle=e.name,e.name&&e.contractAddress&&e.github&&e.author&&e.url&&e.logo&&(e.url&&-1===e.url.indexOf("http")&&(e.url="http://"+e.url,e.logo="http://"+e.logo),a.storageDapp(e)),e.navMode&&e.navColor&&e.barMode&&e.barColor&&(Va.barColor=e.barColor,Va.barMode=e.barMode,Va.navMode=e.navMode,Va.navColor=e.navColor)),console.log("browserData>>",e,Va),"success"},a.getInfo=function(){return new Promise((function(e,t){var a={};a.language=U.c.e().key,a.rpc=U.a.seroRpc();try{plus&&plus.device?(a.uuid=plus.device.uuid,e(a)):e(a)}catch(n){console.log("getInfo fail:",n.message),e(a)}}))},a.call=function(e,t){try{var a=_a.sero.call(e,"latest");return t.data=a,t}catch(n){return t.data="0x",t.error=n.message,t}},a.estimateGas=function(e,t){try{var a=_a.sero.estimateGas(e);return t.data=a,t}catch(n){return t.data="0x0",t.error=n.message,console.error(n),t}},a.executeContract=function(e,t){try{if(!e)return;e&&!e.cy&&(e.cy="SERO"),e&&!e.gas&&(e.gas="0x"+new ge.a("4700000").toString(16)),e&&!e.gasPrice&&(e.gasPrice="0x"+new ge.a("1000000000").toString(16)),e&&!e.value&&(e.value="0x0"),a.setState({txInfo:s.a.createElement(z.a,null,s.a.createElement(z.a.Item,{extra:s.a.createElement("span",null,e.from)},U.c.e().page.txDetail.from),s.a.createElement(z.a.Item,{extra:s.a.createElement("span",null,xe.a.convert(e.value,e.cy).toString(10)," ",e.cy)},U.c.e().page.txDetail.amount),s.a.createElement(z.a.Item,{extra:s.a.createElement("span",null,e.data)},"Data"),s.a.createElement(z.a.Item,{extra:s.a.createElement("div",null,xe.a.convert(new ge.a(e.gas).multipliedBy(new ge.a(e.gasPrice)),"SERO").toString(10),s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"12px",color:"#ddd"}},new ge.a(e.gas).toString(10),"(Gas) * ",new ge.a(e.gasPrice).dividedBy(new ge.a(10).pow(9)).toString(10),"(Gta)"),s.a.createElement("br",null))},U.c.e().page.txDetail.fee),s.a.createElement(z.a.Item,null,s.a.createElement("div",{style:{width:"100%",float:"left",display:"flex"}},s.a.createElement("div",{style:{width:"25%",marginRight:"15px"}},s.a.createElement(K.a,{onClick:function(){a.setState({showTxInfo:!1}),t("")}},U.c.e().button.cancel)),s.a.createElement("div",{style:{width:"70%"}},s.a.createElement(K.a,{type:"primary",onClick:function(){a.submit(e,t)}},U.c.e().button.confirm)))))}),a.setState({showTxInfo:!0})}catch(n){_.a.fail(n.message,3),t("")}},a.submit=function(e,t){try{M.a.prompt(U.c.e().button.transfer,s.a.createElement("div",null),[{text:U.c.e().button.cancel,onPress:function(){console.log("cancel"),t("")}},{text:U.c.e().button.confirm,onPress:function(a){if(a)try{_.a.loading(U.c.e().toast.loading.sending,60),Fa.transfer(e,a).then((function(e){_.a.success(U.c.e().toast.success.send,2),t(e)})).catch((function(e){var a="string"===typeof e?e:e.message;a?a.indexOf("wrong passphrase")>-1?(_.a.fail(U.c.e().toast.error.passwordError,2),t("")):(_.a.fail(a,3),t("")):_.a.fail(JSON.stringify(e),3)}))}catch(n){_.a.fail(n.message),t("")}else _.a.fail(U.c.e().page.txTransfer.inputPassword)}}],"secure-text",null,[U.c.e().page.txTransfer.inputPassword]),a.setState({showTxInfo:!1})}catch(n){_.a.fail(n.message,3)}},a.storageDapp=function(e){try{var t=U.d.get(U.b.dapp.list);if(t&&0!==t.length){var a=[],n=!1,r=!0,o=!1,s=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done);r=!0){if(i.value===e.contractAddress){n=!0;break}}}catch(l){o=!0,s=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw s}}n||a.push(e.contractAddress),U.d.set(U.b.dapp.list,a.concat(t))}else t=[e.contractAddress],U.d.set(U.b.dapp.list,t);U.d.set(U.b.dappsInfoKey(e.contractAddress),e)}catch(u){_.a.fail(u.message,3)}},a.receiveMessage=function(e){var t=Object(L.a)(a);if(void 0!==e&&e.data){var n=e.data;console.log("popup receive msg: ",n),n.method?n.method===za.method.init?(n.data=t.initDApp(n.data),t.sendMessage(n)):n.method===za.method.accountDetail?t.getAccountDetail(n.data,n).then((function(e){t.sendMessage(e)})):n.method===za.method.accountList?t.getAccountList(n).then((function(e){t.sendMessage(e)})):n.method===za.method.executeContract?t.executeContract(n.data.tx,(function(e){if(e)n.data=e;else{var a=document.getElementsByClassName("h5-iframe");a&&a.length>0&&a[0].focus(),n.data="",n.error="Operation cancel"}t.sendMessage(n)})):n.method===za.method.call?t.sendMessage(t.call(n.data,n)):n.method===za.method.estimateGas?t.sendMessage(t.estimateGas(n.data,n)):n.method===za.method.getInfo?t.getInfo().then((function(e){n.data=e,t.sendMessage(n)})).catch((function(e){n.error=e,t.sendMessage(n)})):n.method===za.method.pkrCrypto?t.pkrCrypto(n.data).then((function(e){n.data=e,t.sendMessage(n)})).catch((function(e){n.error="string"===typeof e?e:e.message,t.sendMessage(n)})):n.method===za.method.pkrEncrypt?t.pkrEncrypt(n.data).then((function(e){n.data=e,t.sendMessage(n)})).catch((function(e){n.error="string"===typeof e?e:e.message,t.sendMessage(n)})):n.method===za.method.pkrDecrypt?t.pkrDecrypt(n.data).then((function(e){n.data=e,t.sendMessage(n)})).catch((function(e){n.error="string"===typeof e?e:e.message,t.sendMessage(n)})):n.method===za.method.goPage?t.goPage(n.data):t.sendMessage("operation method is invalid !"):t.sendMessage("operation method is required !")}},a.sendMessage=function(e){var t=document.getElementById("ifrModel");t&&t.contentWindow.postMessage(e,"*")},a.dataList=[{method:"share",icon:s.a.createElement(T.a,{type:"iconshare"}),title:U.c.e().button.share},{method:"copy",icon:s.a.createElement(T.a,{type:"iconcopy"}),title:U.c.e().button.copyLink},{method:"fresh",icon:s.a.createElement(T.a,{type:"iconrefresh"}),title:U.c.e().button.refresh}],a.share=function(e){plus&&plus.share&&plus.share.sendWithSystem({type:"text",content:a.state.navTitle,href:e},(function(){console.log("\u5206\u4eab\u6210\u529f")}),(function(e){console.log("\u5206\u4eab\u5931\u8d25\uff1a"+JSON.stringify(e))}))},a.copyLink=function(e){me()(e),_.a.success(U.c.e().toast.success.copy,1)},a.refresh=function(e){document.getElementById("ifrModel").src=e},a.showActionSheet=function(){var e=Object(L.a)(a),t=a.dataList;plus&&plus.share||(t=a.dataList.slice(1)),Ka.a.showShareActionSheetWithOptions({options:t},(function(a){if(t&&t[a])switch(t[a].method){case"share":e.share(e.state.url);break;case"copy":e.copyLink(e.state.url);break;case"fresh":e.refresh(e.state.url)}}))},a.state={url:"",hasListener:!1,navTitle:"Browser",password:"",showTxInfo:!1,txInfo:"",barColor:"#f7f7f7",barMode:"light"},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentWillMount",value:function(){var e=this.props.match.params.url;e=decodeURIComponent(e),this.setState({url:e})}},{key:"componentDidMount",value:function(){var e=this;Va={barColor:"#f7f7f7",barMode:"light",navColor:"#F7F7F7",navMode:"dark",navTitle:"Browser"},this.initTile(),_a.setProvider(new _a.providers.HttpProvider(U.a.seroRpc()));var t=window.sessionStorage.getItem("browserData");t&&clearInterval(t),t=setInterval((function(){plus&&plus.navigator&&(plus.navigator.setStatusBarBackground(Va.navColor),plus.navigator.setStatusBarStyle(Va.navMode)),e.setState({barColor:Va.barColor,barMode:Va.barMode,navTitle:Va.navTitle})}),200),window.sessionStorage.setItem("browserData",t)}},{key:"getAccountList",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o,s,i,c,l,u,p,d,f;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a=U.d.get(U.b.account.addresses),n=[],!a){e.next=41;break}return e.next=6,La.getCurrent();case 6:r=e.sent,o=!0,s=!1,i=void 0,e.prev=10,c=a[Symbol.iterator]();case 12:if(o=(l=c.next()).done){e.next=27;break}return u=l.value,e.next=16,La.Detail(u);case 16:return p=e.sent,e.next=19,te.balanceOf(p.tk);case 19:return d=e.sent,e.next=22,te.ticketsOf(p.tk);case 22:f=e.sent,n.push({Name:p.name,PK:p.address,MainPKr:p.mainPKr,Balance:d,Tickets:f,IsCurrent:u===r.address});case 24:o=!0,e.next=12;break;case 27:e.next=33;break;case 29:e.prev=29,e.t0=e.catch(10),s=!0,i=e.t0;case 33:e.prev=33,e.prev=34,o||null==c.return||c.return();case 36:if(e.prev=36,!s){e.next=39;break}throw i;case 39:return e.finish(36);case 40:return e.finish(33);case 41:return t.data=n,e.abrupt("return",t);case 45:return e.prev=45,e.t1=e.catch(0),t.data=null,t.error=e.t1.message,e.abrupt("return",t);case 50:case"end":return e.stop()}}),e,null,[[0,45],[10,29,33,41],[34,,36,40]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getAccountDetail",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t){e.next=13;break}return e.next=4,La.Detail(t);case 4:return n=e.sent,e.next=7,te.balanceOf(n.tk);case 7:return r=e.sent,e.next=10,te.ticketsOf(n.tk);case 10:return o=e.sent,a.data={Name:n.name,PK:n.address,MainPKr:n.mainPKr,Balance:r,Tickets:o},e.abrupt("return",a);case 13:e.next=20;break;case 15:return e.prev=15,e.t0=e.catch(0),a.data=null,a.error=e.t0.message,e.abrupt("return",a);case 20:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t,a){return e.apply(this,arguments)}}()},{key:"pkrCrypto",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,La.Detail(t.pk);case 2:if(a=e.sent,Object(ja.isNewVersion)(Ra.a.toBuffer(a.tk))){e.next=8;break}return e.abrupt("return",new Promise((function(e,t){t("Only support v2 account")})));case 8:return n=Object(Ia.pkrCrypte)(t.data,a.mainPKr,a.tk,t.pkr),e.abrupt("return",Object(ja.toString)(n));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"pkrEncrypt",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Object(Ia.pkrEncrypt)(t.data,t.pkr),e.abrupt("return",Object(ja.toString)(a));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"pkrDecrypt",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,La.Detail(t.pk);case 2:if(a=e.sent,Object(ja.isNewVersion)(Ra.a.toBuffer(a.tk))){e.next=8;break}return e.abrupt("return",new Promise((function(e,t){t("Only support v2 account")})));case 8:return n=Object(Ia.pkrDecrypt)(t.data,a.mainPKr,a.tk),e.abrupt("return",Object(ja.toString)(n));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"goPage",value:function(e){e&&e.indexOf("scan/")?plus&&plus.barcode&&U.e.goPage(e):U.e.goPage(e)}},{key:"render",value:function(){var e=this,t=this.state,a=t.barMode,n=t.barColor;return s.a.createElement("div",null,s.a.createElement(x.a,{mode:a,style:{background:"light"===a?"":n},leftContent:s.a.createElement(T.a,{type:"left",style:{color:"light"===a?"":"#fff"}}),rightContent:s.a.createElement("div",{className:"browser-right",style:{background:"light"===a?"#fff":"none"}},s.a.createElement("div",null,s.a.createElement(T.a,{type:"ellipsis",size:"md",onClick:this.showActionSheet})),s.a.createElement("div",{className:"ant-divider ant-divider-vertical ant-divider-dashed"}),s.a.createElement("div",null,s.a.createElement(T.a,{type:"cross",size:"md",onClick:function(){window.removeEventListener("message",e.receiveMessage,!1),U.e.goBack(),plus&&plus.navigator&&(plus.navigator.setStatusBarBackground("#F7F7F7"),plus.navigator.setStatusBarStyle("dark")),Va={barColor:"#f7f7f7",barMode:"light",navColor:"#F7F7F7",navMode:"dark",navTitle:"Browser"}}}))),className:"layout-top",onLeftClick:function(){history.back()}},this.state.navTitle),s.a.createElement("iframe",{className:"h5-iframe",style:{width:"100%",height:this.state.iFrameHeight,overflow:"visible",marginTop:"45px"},onLoad:function(){e.setState({iFrameHeight:document.documentElement.clientHeight-45})},id:"ifrModel",ref:"iframe",src:this.state.url,width:"100%",height:this.state.iFrameHeight,frameBorder:"no",border:"0"}),s.a.createElement(M.a,{popup:!0,maskClosable:!0,visible:this.state.showTxInfo,animationType:"slide-up"},this.state.txInfo))}}]),t}(o.Component),qa=new q,Za=new xa,Ua=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).state={txInfo:{}},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this.props.match.params.hash,t=Za.pendingTxInfo(e);this.setState({txInfo:t})}},{key:"render",value:function(){var e=this,t=this.state.txInfo;return s.a.createElement("div",{style:{height:document.documentElement.clientHeight},className:"transfer-detail-bg"},s.a.createElement(x.a,{icon:s.a.createElement(T.a,{type:"left",style:{color:"#f7f7f7"}}),onLeftClick:function(){U.e.goBack(U.e.transferList(t.currency))},style:{backgroundColor:"unset"}},"SERO"),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(Ge.a,null,s.a.createElement("div",{className:"transfer-detail",style:{height:.8*document.documentElement.clientHeight}},s.a.createElement("div",{className:"transfer-detail-indiv0"},s.a.createElement(T.a,{type:"icondengdaichuli",style:{width:"50px",height:"50px",marginTop:"5px"}}),s.a.createElement("h3",null,U.c.e().page.txDetail.pending),s.a.createElement("span",{className:"transfer-detail-indiv0-span"},new Date(1e3*t.time).toLocaleString())),s.a.createElement("div",{className:"transfer-detail-indiv1"},s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.amount,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",null,t.value," ",t.currency))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.fee,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",null,s.a.createElement("span",null,t.fee," SERO"),s.a.createElement("br",null),s.a.createElement("span",{style:{fontSize:"10px",color:"#888"}},"=Gas(",t.gas,") * GasPrice(",new ge.a(t.gasPrice).dividedBy(new ge.a(10).pow(9)).toString(10)," Gta)")))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.from,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",{style:{overflowWrap:"break-word",fontSize:"12px"},onClick:function(){me()(t.from),_.a.success("Copy Successfully",1)}},t.from,s.a.createElement(T.a,{type:"iconcopy",className:"transfer-detail-copy-icon"})))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.to,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",null,s.a.createElement("div",{style:{overflowWrap:"break-word",fontSize:"12px"},onClick:function(){me()(t.to),_.a.success("Copy Successfully",1)}},t.to,s.a.createElement(T.a,{type:"iconcopy",className:"transfer-detail-copy-icon"})))))),s.a.createElement("div",null,s.a.createElement(Ge.a,null,s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.hash,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",{onClick:function(){me()(e.props.match.params.hash),_.a.success("Copy Successfully",1)}},qa.ellipsisHash(this.props.match.params.hash),s.a.createElement(T.a,{type:"iconcopy",className:"transfer-detail-copy-icon"})))),s.a.createElement(v.a,{size:"lg"}),s.a.createElement(ma.a,null,s.a.createElement(ma.a.Item,null,s.a.createElement("div",{style:{color:"#888"}},U.c.e().page.txDetail.block,":")),s.a.createElement(ma.a.Item,{style:{flexBasis:"50%"}},s.a.createElement("div",null,t.block))))))),s.a.createElement("p",{className:"transfer-detail-p"},s.a.createElement("a",{onClick:function(){U.e.goPage(U.e.browser("https://explorer.sero.cash/txsInfo.html?hash=".concat(t.hash)),U.e.Home)},style:{color:"#108ee9"}},U.c.e().page.txDetail.goto)))}}]),t}(o.Component),Ga=new oe,Qa=function(e){function t(e){var a;return Object(l.a)(this,t),(a=Object(p.a)(this,Object(d.a)(t).call(this,e))).checkConfirming=function(){a.props.form.validateFields((function(e,t){t.name&&t.word&&t.password&&t.repassword?a.setState({checkConfirming:!1}):a.setState({checkConfirming:!0})}))},a.state={checkConfirming:!0,tipsShow:"none"},a.nameDecorator=a.props.form.getFieldDecorator("name",{rules:[{required:!0}]}),a.wordDecorator=a.props.form.getFieldDecorator("word",{rules:[{required:!0}]}),a.passwordDecorator=a.props.form.getFieldDecorator("password",{rules:[{required:!0}]}),a.repasswordDecorator=a.props.form.getFieldDecorator("repassword",{rules:[{required:!0}]}),a.hindDecorator=a.props.form.getFieldDecorator("hint",{rules:[{required:!1}]}),a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"import",value:function(){var e=this;e.setState({checkConfirming:!0}),this.props.form.validateFields((function(t,a){if(null==t){if(a.password.length<8||a.repassword.length<8)return _.a.fail(U.c.e().toast.error.passwordVerify,1.5),void e.setState({checkConfirming:!1});if(a.password!==a.repassword)_.a.fail(U.c.e().toast.error.passwordNotMatch,1.5),e.setState({checkConfirming:!1});else{for(var n=a.word,r=(n=n.trim()).split(" "),o=[],s=0;s10&&(c=n-10);for(var l=n;l>c;l--){var u=ln.a.createPkrHash(t.tk,l,o);i.push(s.a.createElement(pn,{extra:l},s.a.createElement("span",{style:{fontSize:"14px"}},Z.ellipsisAddress(u))))}e.setState({pkrs:i,currentBlock:r})}))}))}))},a.state={current:{},pkrs:[],currentBlock:0},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this;_.a.loading("loading..."),setTimeout((function(){e.loadData()}),300);var t=document.getElementById("log");console.log=function(e){if(e.indexOf("span")>-1){t.innerHTML="
".concat((new Date).toLocaleTimeString(),"").concat(e,"
")+t.innerHTML;var a=t.childNodes;if(a.length>100)for(var n=100;n-1?_.a.fail(U.c.e().toast.error.passwordError,2):_.a.fail(e,3)}))}catch(i){_.a.fail(i.message)}else _.a.fail(U.c.e().page.txTransfer.inputPassword)},a}return Object(f.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this.init()}},{key:"init",value:function(){this.initPayInfo();var e=sessionStorage.getItem("thirdPayInterId");e&&clearInterval(e),e=setInterval((function(){try{plus&&plus.nativeUI&&plus.nativeUI.closeWaiting()}catch(e){}}),1e3),sessionStorage.setItem("thirdPayInterId",e)}},{key:"componentDidUpdate",value:function(e,t,a){this.initPayInfo()}},{key:"initPayInfo",value:function(){var e=this,t=U.d.get("seropay:info");t&&"thirdpay"===t.type&&(e.getAccount(t).then((function(){})).catch((function(t){e.setState({valid:"string"===typeof t?t:t.message})})),e.setState({cachePayInfo:t}),U.d.delete("seropay:info"))}},{key:"getAccount",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o,s,i,c,l,u,p,d;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this,e.next=3,fn.Details();case 3:return n=e.sent,e.next=6,fn.getCurrent();case 6:return r=e.sent,e.next=9,fn.Detail(r.address);case 9:if(o=e.sent,!t){e.next=47;break}if(!t.from){e.next=46;break}s=!1,i=!0,c=!1,l=void 0,e.prev=16,u=n[Symbol.iterator]();case 18:if(i=(p=u.next()).done){e.next=29;break}if((d=p.value).mainPKr!==t.from){e.next=26;break}return e.next=23,fn.Detail(d.address);case 23:o=e.sent,n=[o],s=!0;case 26:i=!0,e.next=18;break;case 29:e.next=35;break;case 31:e.prev=31,e.t0=e.catch(16),c=!0,l=e.t0;case 35:e.prev=35,e.prev=36,i||null==u.return||u.return();case 38:if(e.prev=38,!c){e.next=41;break}throw l;case 41:return e.finish(38);case 42:return e.finish(35);case 43:s?a.setState({accountDetail:o,accountList:n}):a.setState({valid:"Account[".concat(t.from,"] not Exist! "),accountDetail:{},accountList:[]}),e.next=47;break;case 46:a.setState({accountDetail:o,accountList:n});case 47:case"end":return e.stop()}}),e,this,[[16,31,35,43],[36,,38,42]])})));return function(t){return e.apply(this,arguments)}}()},{key:"switchAccount",value:function(e){this.setState({showAccount:e})}},{key:"selectAccount",value:function(e){this.setState({accountDetail:e,showAccount:!1})}},{key:"callbackApp",value:function(e,t){if(e){var a={hash:t};setTimeout((function(){U.e.goPage(U.e.payResult(t))}),1500),setTimeout((function(){if(plus&&plus.os)if("Android"===plus.os.name)plus.runtime.launchApplication({pname:e.pname,newTask:!1,extra:a},(function(e){_.a.fail("Can not open launcher",3)}));else if("iOS"===plus.os.name){var t=function(e){for(var t=Object.keys(e),a=[],n=0;n-1?t(U.c.e().toast.error.passwordError):t(e)}))}},this.receiveMessage=function(e){var a=t;if(void 0!==e&&e.data){var n=e.data;console.log("popup receive msg: ",n),n.method?n.method===On.method.init?(n.data="SUCCESS",a.sendMessage(n)):n.method===On.method.accountDetail?a.getAccountDetail(n.data,n).then((function(e){a.sendMessage(e)})):n.method===On.method.accountList?a.getAccountList(n).then((function(e){a.sendMessage(e)})):n.method===On.method.executeContract?a.executeContract(n.data.tx,(function(e){if(e)n.data=e;else{var t=document.getElementsByClassName("h5-iframe");t&&t.length>0&&t[0].focus(),n.data="",n.error="Operation cancel"}a.sendMessage(n)})):n.method===On.method.call?a.sendMessage(a.call(n.data,n)):n.method===On.method.estimateGas?a.sendMessage(a.estimateGas(n.data,n)):n.method===On.method.getInfo?(n.data=a.getInfo(),a.sendMessage(n)):a.sendMessage("operation method is invalid !"):a.sendMessage("operation method is required !")}},this.sendMessage=function(e){!function(e){console.log("embed send msg >>>> ",e),parent.postMessage(e,"*")}(e)},xn.setProvider(new xn.providers.HttpProvider(U.a.seroRpc()))}return Object(u.a)(e,[{key:"getAccountList",value:function(){var e=Object(F.a)(j.a.mark((function e(t){var a,n,r,o,s,i,c,l,u,p;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a=U.d.get(U.b.account.addresses),n=[],!a){e.next=35;break}r=!0,o=!1,s=void 0,e.prev=7,i=a[Symbol.iterator]();case 9:if(r=(c=i.next()).done){e.next=21;break}return l=c.value,e.next=13,Pn.Detail(l);case 13:return u=e.sent,e.next=16,te.balanceOf(u.tk);case 16:p=e.sent,n.push({Name:u.name,PK:u.address,MainPKr:u.mainPKr,Balance:p});case 18:r=!0,e.next=9;break;case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(7),o=!0,s=e.t0;case 27:e.prev=27,e.prev=28,r||null==i.return||i.return();case 30:if(e.prev=30,!o){e.next=33;break}throw s;case 33:return e.finish(30);case 34:return e.finish(27);case 35:return t.data=n,e.abrupt("return",t);case 39:return e.prev=39,e.t1=e.catch(0),t.data=null,t.error=e.t1.message,e.abrupt("return",t);case 44:case"end":return e.stop()}}),e,null,[[0,39],[7,23,27,35],[28,,30,34]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getAccountDetail",value:function(){var e=Object(F.a)(j.a.mark((function e(t,a){var n,r;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t){e.next=10;break}return e.next=4,Pn.Detail(t);case 4:return n=e.sent,e.next=7,te.balanceOf(n.tk);case 7:return r=e.sent,a.data={Name:n.name,PK:n.address,MainPKr:n.mainPKr,Balance:r},e.abrupt("return",a);case 10:e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(0),a.data=null,a.error=e.t0.message,e.abrupt("return",a);case 17:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(t,a){return e.apply(this,arguments)}}()}]),e}();function Cn(){window.hasSet||(window.hasSet=new Map);var e=new oe;e.List().then((function(t){var a=!0,n=!1,r=void 0;try{for(var o,s=t[Symbol.iterator]();!(a=(o=s.next()).done);a=!0){var i=o.value;window.hasSet.get(i.address)||(e=new oe(i.address),te.initAccount(i.tk),window.hasSet.set(i.address,!0),console.log("init account success, address: ",i.address,e.Keystore().version))}}catch(c){n=!0,r=c}finally{try{a||null==s.return||s.return()}finally{if(n)throw r}}}))}window.hasSet=new Map,document.onvisibilitychange=function(){"visible"===document.visibilityState&&te.init()};var An=a(392),Tn=a.n(An);a(878);c.a.render(s.a.createElement(r.a,{locale:Tn.a},s.a.createElement(wn,null)),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})),te.init(),console.log("init worker success"),Cn(),setInterval((function(){Cn()}),1e4),function(){if(window.frames.length!==parent.frames.length){var e=new Bn;window.addEventListener("message",e.receiveMessage,{passive:!0})}}(),console.log=function(e){},console.debug=function(e){},console.info=function(e){},console.warn=function(e){},console.trace=function(e){},Y.init(),setTimeout((function(){U.a.init()}),1e3),sessionStorage.clear()},89:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(567);t.blake2b=function(t,a){var r=e.alloc(16,0);r.fill(t,0,t.length);var o=n(32,null,null,r).update(a).digest("binary");return e.from(o)}}).call(this,a(23).Buffer)},90:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=a(310),r=a(570),o=a(27),s=a(39);t.accountBase=new n.Group("$SROKEYSGEN",1,256,4),t.crBase=new n.Group("SZK$ASSET$CR",1,256,4),t.rootBase=new n.Group("SZK$ROOTCM",10,128,4),t.genTknBase=function(t){t=o.toBuffer(t),s(32==t.length);var a=e.alloc(64,0);a.set(t,0);var n=r.findPoint("SZK$TKN",a);if(!n)throw new Error("find point error");return n},t.genTktBase=function(t,a){t=o.toBuffer(t),a=o.toBuffer(a),s(32==t.length),s(32==a.length);var n=e.concat([t,a]),i=r.findPoint("SZK$TKT",n);if(!i)throw new Error("find point error");return i}}).call(this,a(23).Buffer)}},[[394,1,2]]]); \ No newline at end of file diff --git a/docs/unpackage/release/cash.sero.popup.community.wgt b/docs/unpackage/release/cash.sero.popup.community.wgt new file mode 100644 index 0000000..03f182a Binary files /dev/null and b/docs/unpackage/release/cash.sero.popup.community.wgt differ diff --git a/docs/version.json b/docs/version.json index fb904c7..94b3385 100755 --- a/docs/version.json +++ b/docs/version.json @@ -1,8 +1,8 @@ { "zh": { "docs": { - "version": "1.5.0", - "url": "https://sero-1259797294.file.myqcloud.com/popup/wgt/1.5.0/cash.sero.popup.community.wgt", + "version": "1.5.1", + "url": "https://sero-1259797294.file.myqcloud.com/popup/wgt/1.5.1/cash.sero.popup.community.wgt", "show": false, "description": [ ] @@ -13,8 +13,8 @@ "en": { "docs": { - "version": "1.5.0", - "url": "https://sero-popup.s3-ap-southeast-1.amazonaws.com/wgt/1.5.0/cash.sero.popup.community.wgt", + "version": "1.5.1", + "url": "https://sero-popup.s3-ap-southeast-1.amazonaws.com/wgt/1.5.1/cash.sero.popup.community.wgt", "show": false, "description": [ ] diff --git a/public/android.json b/public/android.json index fb904c7..94b3385 100755 --- a/public/android.json +++ b/public/android.json @@ -1,8 +1,8 @@ { "zh": { "docs": { - "version": "1.5.0", - "url": "https://sero-1259797294.file.myqcloud.com/popup/wgt/1.5.0/cash.sero.popup.community.wgt", + "version": "1.5.1", + "url": "https://sero-1259797294.file.myqcloud.com/popup/wgt/1.5.1/cash.sero.popup.community.wgt", "show": false, "description": [ ] @@ -13,8 +13,8 @@ "en": { "docs": { - "version": "1.5.0", - "url": "https://sero-popup.s3-ap-southeast-1.amazonaws.com/wgt/1.5.0/cash.sero.popup.community.wgt", + "version": "1.5.1", + "url": "https://sero-popup.s3-ap-southeast-1.amazonaws.com/wgt/1.5.1/cash.sero.popup.community.wgt", "show": false, "description": [ ] diff --git a/public/manifest.json b/public/manifest.json index 8bd89fb..cf54503 100755 --- a/public/manifest.json +++ b/public/manifest.json @@ -3,8 +3,8 @@ "id" : "cash.sero.popup.community", /*应用的标识*/ "name" : "SERO Popup Community", /*应用名称,程序桌面图标名称*/ "version" : { - "name" : "1.5.0", /*应用版本名称*/ - "code" : 187 + "name" : "1.5.1", /*应用版本名称*/ + "code" : 188 }, "description" : "", /*应用描述信息*/ diff --git a/public/version.json b/public/version.json index fb904c7..94b3385 100755 --- a/public/version.json +++ b/public/version.json @@ -1,8 +1,8 @@ { "zh": { "docs": { - "version": "1.5.0", - "url": "https://sero-1259797294.file.myqcloud.com/popup/wgt/1.5.0/cash.sero.popup.community.wgt", + "version": "1.5.1", + "url": "https://sero-1259797294.file.myqcloud.com/popup/wgt/1.5.1/cash.sero.popup.community.wgt", "show": false, "description": [ ] @@ -13,8 +13,8 @@ "en": { "docs": { - "version": "1.5.0", - "url": "https://sero-popup.s3-ap-southeast-1.amazonaws.com/wgt/1.5.0/cash.sero.popup.community.wgt", + "version": "1.5.1", + "url": "https://sero-popup.s3-ap-southeast-1.amazonaws.com/wgt/1.5.1/cash.sero.popup.community.wgt", "show": false, "description": [ ] diff --git a/src/views/home/home.jsx b/src/views/home/home.jsx index bd3757b..97dfd04 100755 --- a/src/views/home/home.jsx +++ b/src/views/home/home.jsx @@ -282,13 +282,14 @@ class Home extends Component { let syncState = "check-circle" let stateColor="green" - const percent = healthData.currentBlock && healthData.startBlock ?(healthData.currentBlock-healthData.startBlock)/(latestBlock-healthData.startBlock):healthData.latestBlock/latestBlock; - let percentSync = percent < 1 ? percent * 0.9 : percent + const percent = healthData.currentBlock && healthData.startBlock&&healthData.startBlock0){ percentSync += healthData.checkNilPercent*0.09; } let stateDesc = `${lang.e().toast.loading.synchronizing}${lang.e().page.wallet.PKr} [${healthData && healthData.pkrIndex}]`; - if(percent<1 && healthData.startBlock - {percent<1 && healthy === "syncing" && healthData.startBlock} + {healthy === "syncing" && healthData.startBlock}