@alex-sudo/cosmos-keys
Version:
js version of cosmos wallet signer and address generation
8 lines • 581 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("cosmos-keys",[],t):"object"==typeof exports?exports["cosmos-keys"]=t():e["cosmos-keys"]=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=99)}([function(e,t,r){var i=r(3),n=i.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(a(i,t),t.Buffer=o),o.prototype=Object.create(n.prototype),a(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){var i;e.exports=(i=i||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},n=i.lib={},a=n.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=n.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,r=e.words,i=this.sigBytes,n=e.sigBytes;if(this.clamp(),i%4)for(var a=0;a<n;a++){var o=r[a>>>2]>>>24-a%4*8&255;t[i+a>>>2]|=o<<24-(i+a)%4*8}else for(a=0;a<n;a+=4)t[i+a>>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,i=[],n=function(t){t=t;var r=987654321,i=4294967295;return function(){var n=((r=36969*(65535&r)+(r>>16)&i)<<16)+(t=18e3*(65535&t)+(t>>16)&i)&i;return n/=4294967296,(n+=.5)*(e.random()>.5?1:-1)}},a=0;a<t;a+=4){var s=n(4294967296*(r||e.random()));r=987654071*s(),i.push(4294967296*s()|0)}return new o.init(i,t)}}),s=i.enc={},c=s.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n++){var a=t[n>>>2]>>>24-n%4*8&255;i.push((a>>>4).toString(16)),i.push((15&a).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i+=2)r[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new o.init(r,t/2)}},f=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n++){var a=t[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(a))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i++)r[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new o.init(r,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},d=n.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,i=r.words,n=r.sigBytes,a=this.blockSize,s=n/(4*a),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,f=e.min(4*c,n);if(c){for(var u=0;u<c;u+=a)this._doProcessBlock(i,u);var d=i.splice(0,c);r.sigBytes-=f}return new o.init(d,f)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),l=(n.Hasher=d.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new l.HMAC.init(e,r).finalize(t)}}}),i.algo={});return i}(Math),i)},function(e,t,r){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var i=r(100),n=r(101),a=r(57);function o(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return f(this,e,t,r)}function f(e,t,r,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,i){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,r):new Uint8Array(t,r,i);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=l(e,t);return e}(e,t,r,i):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|p(t,r),n=(e=s(e,i)).write(t,r);n!==i&&(e=e.slice(0,n));return e}(e,t,r):function(e,t){if(c.isBuffer(t)){var r=0|h(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?s(e,0):l(e,t);if("Buffer"===t.type&&a(t.data))return l(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=s(e,t<0?0:0|h(t)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function l(e,t){var r=t.length<0?0:0|h(t.length);e=s(e,r);for(var i=0;i<r;i+=1)e[i]=255&t[i];return e}function h(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(i)return q(e).length;t=(""+t).toLowerCase(),i=!0}}function b(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function m(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function g(e,t,r,i,n){if(0===e.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:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=c.from(t,i)),c.isBuffer(t))return 0===t.length?-1:v(e,t,r,i,n);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,i,n){var a,o=1,s=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function f(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var u=-1;for(a=r;a<s;a++)if(f(e,a)===f(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===c)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(r+c>s&&(r=s-c),a=r;a>=0;a--){for(var d=!0,l=0;l<c;l++)if(f(e,a+l)!==f(t,l)){d=!1;break}if(d)return a}return-1}function y(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");i>a/2&&(i=a/2);for(var o=0;o<i;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function _(e,t,r,i){return K(q(t,e.length-r),e,r,i)}function w(e,t,r,i){return K(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function E(e,t,r,i){return w(e,t,r,i)}function S(e,t,r,i){return K(U(t),e,r,i)}function A(e,t,r,i){return K(function(e,t){for(var r,i,n,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),i=r>>8,n=r%256,a.push(n),a.push(i);return a}(t,e.length-r),e,r,i)}function k(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n<r;){var a,o,s,c,f=e[n],u=null,d=f>239?4:f>223?3:f>191?2:1;if(n+d<=r)switch(d){case 1:f<128&&(u=f);break;case 2:128==(192&(a=e[n+1]))&&(c=(31&f)<<6|63&a)>127&&(u=c);break;case 3:a=e[n+1],o=e[n+2],128==(192&a)&&128==(192&o)&&(c=(15&f)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:a=e[n+1],o=e[n+2],s=e[n+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&f)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(u=c)}null===u?(u=65533,d=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),n+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=4096));return r}(i)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,r){return f(null,e,t,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,r){return function(e,t,r,i){return u(t),t<=0?s(e,t):void 0!==r?"string"==typeof i?s(e,t).fill(r,i):s(e,t).fill(r):s(e,t)}(null,e,t,r)},c.allocUnsafe=function(e){return d(null,e)},c.allocUnsafeSlow=function(e){return d(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);n<a;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var i=c.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var o=e[r];if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n),n+=o.length}return i},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):b.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,r,i,n){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(n>>>=0)-(i>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),f=this.slice(i,n),u=e.slice(t,r),d=0;d<s;++d)if(f[d]!==u[d]){a=f[d],o=u[d];break}return a<o?-1:o<a?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},c.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function M(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function B(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var n="",a=t;a<r;++a)n+=O(e[a]);return n}function T(e,t,r){for(var i=e.slice(t,r),n="",a=0;a<i.length;a+=2)n+=String.fromCharCode(i[a]+256*i[a+1]);return n}function z(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,i,n,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<a)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function P(e,t,r,i){t<0&&(t=65535+t+1);for(var n=0,a=Math.min(e.length-r,2);n<a;++n)e[r+n]=(t&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function C(e,t,r,i){t<0&&(t=4294967295+t+1);for(var n=0,a=Math.min(e.length-r,4);n<a;++n)e[r+n]=t>>>8*(i?n:3-n)&255}function j(e,t,r,i,n,a){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,i,a){return a||j(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function N(e,t,r,i,a){return a||j(e,0,r,8),n.write(e,t,r,i,52,8),r+8}c.prototype.slice=function(e,t){var r,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=c.prototype;else{var n=t-e;r=new c(n,void 0);for(var a=0;a<n;++a)r[a]=this[a+e]}return r},c.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||z(e,t,this.length);for(var i=this[e],n=1,a=0;++a<t&&(n*=256);)i+=this[e+a]*n;return i},c.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||z(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},c.prototype.readUInt8=function(e,t){return t||z(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||z(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||z(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||z(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||z(e,t,this.length);for(var i=this[e],n=1,a=0;++a<t&&(n*=256);)i+=this[e+a]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||z(e,t,this.length);for(var i=t,n=1,a=this[e+--i];i>0&&(n*=256);)a+=this[e+--i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return t||z(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||z(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||z(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||z(e,4,this.length),n.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||z(e,4,this.length),n.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||z(e,8,this.length),n.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||z(e,8,this.length),n.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,i){(e=+e,t|=0,r|=0,i)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,a=0;for(this[t]=255&e;++a<r&&(n*=256);)this[t+a]=e/n&255;return t+r},c.prototype.writeUIntBE=function(e,t,r,i){(e=+e,t|=0,r|=0,i)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):C(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):C(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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),e.length-t<i-r&&(i=e.length-t+r);var n,a=i-r;if(this===e&&r<t&&t<i)for(n=a-1;n>=0;--n)e[n+t]=this[n+r];else if(a<1e3||!c.TYPED_ARRAY_SUPPORT)for(n=0;n<a;++n)e[n+t]=this[n+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},c.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!c.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=c.isBuffer(e)?e:q(new c(e,i).toString()),s=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%s]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function O(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var r;t=t||1/0;for(var i=e.length,n=null,a=[],o=0;o<i;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function U(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}}).call(this,r(9))},function(e,t,r){(function(e){!function(e,t){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(134).Buffer}catch(e){}function s(e,t,r){for(var i=0,n=Math.min(e.length,r),a=t;a<n;a++){var o=e.charCodeAt(a)-48;i<<=4,i|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return i}function c(e,t,r,i){for(var n=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;n*=i,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a,o,s=0;if("be"===r)for(n=e.length-1,a=0;n>=0;n-=3)o=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(n=0,a=0;n<e.length;n+=3)o=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,n,a=0;for(r=e.length-6,i=0;r>=t;r-=6)n=s(e,r,r+6),this.words[i]|=n<<a&67108863,this.words[i+1]|=n>>>26-a&4194303,(a+=24)>=26&&(a-=26,i++);r+6!==t&&(n=s(e,t,r+6),this.words[i]|=n<<a&67108863,this.words[i+1]|=n>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var a=e.length-r,o=a%i,s=Math.min(a,a-o)+r,f=0,u=r;u<s;u+=i)f=c(e,u,u+i,t),this.imuln(n),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==o){var d=1;for(f=c(e,u,e.length,t),u=0;u<o;u++)d*=t;this.imuln(d),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","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"],u=[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];function l(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],a=0|t.words[0],o=n*a,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var f=1;f<i;f++){for(var u=c>>>26,d=67108863&c,l=Math.min(f,t.length-1),h=Math.max(0,f-e.length+1);h<=l;h++){var p=f-h|0;u+=(o=(n=0|e.words[p])*(a=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[f]=0|d,c=0|u}return 0!==c?r.words[f]=0|c:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,a=0,o=0;o<this.length;o++){var s=this.words[o],c=(16777215&(s<<n|a)).toString(16);r=0!==(a=s>>>24-n&16777215)||o!==this.length-1?f[6-c.length]+c+r:c+r,(n+=2)>=26&&(n-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=u[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:f[l-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return i(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var o,s,c="le"===t,f=new e(a),u=this.clone();if(c){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),f[s]=o;for(;s<a;s++)f[s]=0}else{for(s=0;s<a-n;s++)f[s]=0;for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),f[a-s-1]=o}return f},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return i(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return i(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return i(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,a=0;a<i.length;a++)t=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&t,n=t>>>26;for(;0!==n&&a<r.length;a++)t=(0|r.words[a])+n,this.words[a]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var a=0,o=0;o<i.length;o++)a=(t=(0|r.words[o])-(0|i.words[o])+a)>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)a=(t=(0|r.words[o])+a)>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var h=function(e,t,r){var i,n,a,o=e.words,s=t.words,c=r.words,f=0,u=0|o[0],d=8191&u,l=u>>>13,h=0|o[1],p=8191&h,b=h>>>13,m=0|o[2],g=8191&m,v=m>>>13,y=0|o[3],_=8191&y,w=y>>>13,E=0|o[4],S=8191&E,A=E>>>13,k=0|o[5],x=8191&k,I=k>>>13,M=0|o[6],B=8191&M,T=M>>>13,z=0|o[7],R=8191&z,P=z>>>13,C=0|o[8],j=8191&C,L=C>>>13,N=0|o[9],D=8191&N,O=N>>>13,q=0|s[0],U=8191&q,K=q>>>13,H=0|s[1],F=8191&H,V=H>>>13,Y=0|s[2],W=8191&Y,G=Y>>>13,J=0|s[3],X=8191&J,Z=J>>>13,$=0|s[4],Q=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ie=te>>>13,ne=0|s[6],ae=8191&ne,oe=ne>>>13,se=0|s[7],ce=8191&se,fe=se>>>13,ue=0|s[8],de=8191&ue,le=ue>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(f+(i=Math.imul(d,U))|0)+((8191&(n=(n=Math.imul(d,K))+Math.imul(l,U)|0))<<13)|0;f=((a=Math.imul(l,K))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,i=Math.imul(p,U),n=(n=Math.imul(p,K))+Math.imul(b,U)|0,a=Math.imul(b,K);var ge=(f+(i=i+Math.imul(d,F)|0)|0)+((8191&(n=(n=n+Math.imul(d,V)|0)+Math.imul(l,F)|0))<<13)|0;f=((a=a+Math.imul(l,V)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(g,U),n=(n=Math.imul(g,K))+Math.imul(v,U)|0,a=Math.imul(v,K),i=i+Math.imul(p,F)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(b,F)|0,a=a+Math.imul(b,V)|0;var ve=(f+(i=i+Math.imul(d,W)|0)|0)+((8191&(n=(n=n+Math.imul(d,G)|0)+Math.imul(l,W)|0))<<13)|0;f=((a=a+Math.imul(l,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(_,U),n=(n=Math.imul(_,K))+Math.imul(w,U)|0,a=Math.imul(w,K),i=i+Math.imul(g,F)|0,n=(n=n+Math.imul(g,V)|0)+Math.imul(v,F)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,G)|0;var ye=(f+(i=i+Math.imul(d,X)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(l,X)|0))<<13)|0;f=((a=a+Math.imul(l,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(S,U),n=(n=Math.imul(S,K))+Math.imul(A,U)|0,a=Math.imul(A,K),i=i+Math.imul(_,F)|0,n=(n=n+Math.imul(_,V)|0)+Math.imul(w,F)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(g,W)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(v,W)|0,a=a+Math.imul(v,G)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(b,X)|0,a=a+Math.imul(b,Z)|0;var _e=(f+(i=i+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;f=((a=a+Math.imul(l,ee)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(x,U),n=(n=Math.imul(x,K))+Math.imul(I,U)|0,a=Math.imul(I,K),i=i+Math.imul(S,F)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(A,F)|0,a=a+Math.imul(A,V)|0,i=i+Math.imul(_,W)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,G)|0,i=i+Math.imul(g,X)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,Z)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,a=a+Math.imul(b,ee)|0;var we=(f+(i=i+Math.imul(d,re)|0)|0)+((8191&(n=(n=n+Math.imul(d,ie)|0)+Math.imul(l,re)|0))<<13)|0;f=((a=a+Math.imul(l,ie)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(B,U),n=(n=Math.imul(B,K))+Math.imul(T,U)|0,a=Math.imul(T,K),i=i+Math.imul(x,F)|0,n=(n=n+Math.imul(x,V)|0)+Math.imul(I,F)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,G)|0,i=i+Math.imul(_,X)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,Z)|0,i=i+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ie)|0;var Ee=(f+(i=i+Math.imul(d,ae)|0)|0)+((8191&(n=(n=n+Math.imul(d,oe)|0)+Math.imul(l,ae)|0))<<13)|0;f=((a=a+Math.imul(l,oe)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(R,U),n=(n=Math.imul(R,K))+Math.imul(P,U)|0,a=Math.imul(P,K),i=i+Math.imul(B,F)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(T,F)|0,a=a+Math.imul(T,V)|0,i=i+Math.imul(x,W)|0,n=(n=n+Math.imul(x,G)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,G)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(A,X)|0,a=a+Math.imul(A,Z)|0,i=i+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,ee)|0,i=i+Math.imul(g,re)|0,n=(n=n+Math.imul(g,ie)|0)+Math.imul(v,re)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(p,ae)|0,n=(n=n+Math.imul(p,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0;var Se=(f+(i=i+Math.imul(d,ce)|0)|0)+((8191&(n=(n=n+Math.imul(d,fe)|0)+Math.imul(l,ce)|0))<<13)|0;f=((a=a+Math.imul(l,fe)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(j,U),n=(n=Math.imul(j,K))+Math.imul(L,U)|0,a=Math.imul(L,K),i=i+Math.imul(R,F)|0,n=(n=n+Math.imul(R,V)|0)+Math.imul(P,F)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,G)|0,i=i+Math.imul(x,X)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(I,X)|0,a=a+Math.imul(I,Z)|0,i=i+Math.imul(S,Q)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,ee)|0,i=i+Math.imul(_,re)|0,n=(n=n+Math.imul(_,ie)|0)+Math.imul(w,re)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,oe)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,oe)|0,i=i+Math.imul(p,ce)|0,n=(n=n+Math.imul(p,fe)|0)+Math.imul(b,ce)|0,a=a+Math.imul(b,fe)|0;var Ae=(f+(i=i+Math.imul(d,de)|0)|0)+((8191&(n=(n=n+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;f=((a=a+Math.imul(l,le)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(D,U),n=(n=Math.imul(D,K))+Math.imul(O,U)|0,a=Math.imul(O,K),i=i+Math.imul(j,F)|0,n=(n=n+Math.imul(j,V)|0)+Math.imul(L,F)|0,a=a+Math.imul(L,V)|0,i=i+Math.imul(R,W)|0,n=(n=n+Math.imul(R,G)|0)+Math.imul(P,W)|0,a=a+Math.imul(P,G)|0,i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(T,X)|0,a=a+Math.imul(T,Z)|0,i=i+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,ee)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(A,re)|0,a=a+Math.imul(A,ie)|0,i=i+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,oe)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,oe)|0,i=i+Math.imul(g,ce)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(v,ce)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(p,de)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(b,de)|0,a=a+Math.imul(b,le)|0;var ke=(f+(i=i+Math.imul(d,pe)|0)|0)+((8191&(n=(n=n+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;f=((a=a+Math.imul(l,be)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(D,F),n=(n=Math.imul(D,V))+Math.imul(O,F)|0,a=Math.imul(O,V),i=i+Math.imul(j,W)|0,n=(n=n+Math.imul(j,G)|0)+Math.imul(L,W)|0,a=a+Math.imul(L,G)|0,i=i+Math.imul(R,X)|0,n=(n=n+Math.imul(R,Z)|0)+Math.imul(P,X)|0,a=a+Math.imul(P,Z)|0,i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,ee)|0)+Math.imul(T,Q)|0,a=a+Math.imul(T,ee)|0,i=i+Math.imul(x,re)|0,n=(n=n+Math.imul(x,ie)|0)+Math.imul(I,re)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(S,ae)|0,n=(n=n+Math.imul(S,oe)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,i=i+Math.imul(_,ce)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(g,de)|0,n=(n=n+Math.imul(g,le)|0)+Math.imul(v,de)|0,a=a+Math.imul(v,le)|0;var xe=(f+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;f=((a=a+Math.imul(b,be)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(D,W),n=(n=Math.imul(D,G))+Math.imul(O,W)|0,a=Math.imul(O,G),i=i+Math.imul(j,X)|0,n=(n=n+Math.imul(j,Z)|0)+Math.imul(L,X)|0,a=a+Math.imul(L,Z)|0,i=i+Math.imul(R,Q)|0,n=(n=n+Math.imul(R,ee)|0)+Math.imul(P,Q)|0,a=a+Math.imul(P,ee)|0,i=i+Math.imul(B,re)|0,n=(n=n+Math.imul(B,ie)|0)+Math.imul(T,re)|0,a=a+Math.imul(T,ie)|0,i=i+Math.imul(x,ae)|0,n=(n=n+Math.imul(x,oe)|0)+Math.imul(I,ae)|0,a=a+Math.imul(I,oe)|0,i=i+Math.imul(S,ce)|0,n=(n=n+Math.imul(S,fe)|0)+Math.imul(A,ce)|0,a=a+Math.imul(A,fe)|0,i=i+Math.imul(_,de)|0,n=(n=n+Math.imul(_,le)|0)+Math.imul(w,de)|0,a=a+Math.imul(w,le)|0;var Ie=(f+(i=i+Math.imul(g,pe)|0)|0)+((8191&(n=(n=n+Math.imul(g,be)|0)+Math.imul(v,pe)|0))<<13)|0;f=((a=a+Math.imul(v,be)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(D,X),n=(n=Math.imul(D,Z))+Math.imul(O,X)|0,a=Math.imul(O,Z),i=i+Math.imul(j,Q)|0,n=(n=n+Math.imul(j,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,i=i+Math.imul(R,re)|0,n=(n=n+Math.imul(R,ie)|0)+Math.imul(P,re)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(B,ae)|0,n=(n=n+Math.imul(B,oe)|0)+Math.imul(T,ae)|0,a=a+Math.imul(T,oe)|0,i=i+Math.imul(x,ce)|0,n=(n=n+Math.imul(x,fe)|0)+Math.imul(I,ce)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(S,de)|0,n=(n=n+Math.imul(S,le)|0)+Math.imul(A,de)|0,a=a+Math.imul(A,le)|0;var Me=(f+(i=i+Math.imul(_,pe)|0)|0)+((8191&(n=(n=n+Math.imul(_,be)|0)+Math.imul(w,pe)|0))<<13)|0;f=((a=a+Math.imul(w,be)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(D,Q),n=(n=Math.imul(D,ee))+Math.imul(O,Q)|0,a=Math.imul(O,ee),i=i+Math.imul(j,re)|0,n=(n=n+Math.imul(j,ie)|0)+Math.imul(L,re)|0,a=a+Math.imul(L,ie)|0,i=i+Math.imul(R,ae)|0,n=(n=n+Math.imul(R,oe)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,oe)|0,i=i+Math.imul(B,ce)|0,n=(n=n+Math.imul(B,fe)|0)+Math.imul(T,ce)|0,a=a+Math.imul(T,fe)|0,i=i+Math.imul(x,de)|0,n=(n=n+Math.imul(x,le)|0)+Math.imul(I,de)|0,a=a+Math.imul(I,le)|0;var Be=(f+(i=i+Math.imul(S,pe)|0)|0)+((8191&(n=(n=n+Math.imul(S,be)|0)+Math.imul(A,pe)|0))<<13)|0;f=((a=a+Math.imul(A,be)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul(D,re),n=(n=Math.imul(D,ie))+Math.imul(O,re)|0,a=Math.imul(O,ie),i=i+Math.imul(j,ae)|0,n=(n=n+Math.imul(j,oe)|0)+Math.imul(L,ae)|0,a=a+Math.imul(L,oe)|0,i=i+Math.imul(R,ce)|0,n=(n=n+Math.imul(R,fe)|0)+Math.imul(P,ce)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(B,de)|0,n=(n=n+Math.imul(B,le)|0)+Math.imul(T,de)|0,a=a+Math.imul(T,le)|0;var Te=(f+(i=i+Math.imul(x,pe)|0)|0)+((8191&(n=(n=n+Math.imul(x,be)|0)+Math.imul(I,pe)|0))<<13)|0;f=((a=a+Math.imul(I,be)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(D,ae),n=(n=Math.imul(D,oe))+Math.imul(O,ae)|0,a=Math.imul(O,oe),i=i+Math.imul(j,ce)|0,n=(n=n+Math.imul(j,fe)|0)+Math.imul(L,ce)|0,a=a+Math.imul(L,fe)|0,i=i+Math.imul(R,de)|0,n=(n=n+Math.imul(R,le)|0)+Math.imul(P,de)|0,a=a+Math.imul(P,le)|0;var ze=(f+(i=i+Math.imul(B,pe)|0)|0)+((8191&(n=(n=n+Math.imul(B,be)|0)+Math.imul(T,pe)|0))<<13)|0;f=((a=a+Math.imul(T,be)|0)+(n>>>13)|0)+(ze>>>26)|0,ze&=67108863,i=Math.imul(D,ce),n=(n=Math.imul(D,fe))+Math.imul(O,ce)|0,a=Math.imul(O,fe),i=i+Math.imul(j,de)|0,n=(n=n+Math.imul(j,le)|0)+Math.imul(L,de)|0,a=a+Math.imul(L,le)|0;var Re=(f+(i=i+Math.imul(R,pe)|0)|0)+((8191&(n=(n=n+Math.imul(R,be)|0)+Math.imul(P,pe)|0))<<13)|0;f=((a=a+Math.imul(P,be)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul(D,de),n=(n=Math.imul(D,le))+Math.imul(O,de)|0,a=Math.imul(O,le);var Pe=(f+(i=i+Math.imul(j,pe)|0)|0)+((8191&(n=(n=n+Math.imul(j,be)|0)+Math.imul(L,pe)|0))<<13)|0;f=((a=a+Math.imul(L,be)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ce=(f+(i=Math.imul(D,pe))|0)+((8191&(n=(n=Math.imul(D,be))+Math.imul(O,pe)|0))<<13)|0;return f=((a=Math.imul(O,be))+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c[0]=me,c[1]=ge,c[2]=ve,c[3]=ye,c[4]=_e,c[5]=we,c[6]=Ee,c[7]=Se,c[8]=Ae,c[9]=ke,c[10]=xe,c[11]=Ie,c[12]=Me,c[13]=Be,c[14]=Te,c[15]=ze,c[16]=Re,c[17]=Pe,c[18]=Ce,0!==f&&(c[19]=f,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(h=l),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):r<63?l(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var o=n;n=0;for(var s=67108863&i,c=Math.min(a,t.length-1),f=Math.max(0,a-e.length+1);f<=c;f++){var u=a-f,d=(0|e.words[u])*(0|t.words[f]),l=67108863&d;s=67108863&(l=l+s|0),n+=(o=(o=o+(d/67108864|0)|0)+(l>>>26)|0)>>>26,o&=67108863}r.words[a]=s,i=o,o=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},b.prototype.permute=function(e,t,r,i,n,a){for(var o=0;o<a;o++)i[o]=t[e[o]],n[o]=r[e[o]]},b.prototype.transform=function(e,t,r,i,n,a){this.permute(a,e,t,r,i,n);for(var o=1;o<n;o<<=1)for(var s=o<<1,c=Math.cos(2*Math.PI/s),f=Math.sin(2*Math.PI/s),u=0;u<n;u+=s)for(var d=c,l=f,h=0;h<o;h++){var p=r[u+h],b=i[u+h],m=r[u+h+o],g=i[u+h+o],v=d*m-l*g;g=d*g+l*m,m=v,r[u+h]=p+m,i[u+h]=b+g,r[u+h+o]=p-m,i[u+h+o]=b-g,h!==s&&(v=c*d-f*l,l=c*l+f*d,d=v)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},b.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},b.prototype.convert13b=function(e,t,r,n){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<n;++o)r[o]=0;i(0===a),i(0==(-8192&a))},b.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),a=this.stub(i),o=new Array(i),s=new Array(i),c=new Array(i),f=new Array(i),u=new Array(i),d=new Array(i),l=r.words;l.length=i,this.convert13b(e.words,e.length,o,i),this.convert13b(t.words,t.length,f,i),this.transform(o,a,s,c,i,n),this.transform(f,a,u,d,i,n);for(var h=0;h<i;h++){var p=s[h]*u[h]-c[h]*d[h];c[h]=s[h]*d[h]+c[h]*u[h],s[h]=p}return this.conjugate(s,c,i),this.transfor