@dedis/kyber
Version:
A typescript implementation of Kyber interfaces
8 lines • 809 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.kyber=e():t.kyber=e()}(this,(function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=102)}([function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}},function(t,e,i){var r=i(2),n=r.Buffer;function o(t,e){for(var i in t)e[i]=t[i]}function h(t,e,i){return n(t,e,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=h),o(n,h),h.from=function(t,e,i){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,i)},h.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=n(t);return void 0!==e?"string"==typeof i?r.fill(e,i):r.fill(e):r.fill(0),r},h.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},h.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,i){"use strict";(function(t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var r=i(105),n=i(106),o=i(53);function h(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(h()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,i){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,i);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return a(this,t,e,i)}function a(t,e,i,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,i,r){if(e.byteLength,i<0||e.byteLength<i)throw new RangeError("'offset' is out of bounds");if(e.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===i&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,i):new Uint8Array(e,i,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=d(t,e);return t}(t,e,i,r):"string"==typeof e?function(t,e,i){"string"==typeof i&&""!==i||(i="utf8");if(!u.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,i),n=(t=s(t,r)).write(e,i);n!==r&&(t=t.slice(0,n));return t}(t,e,i):function(t,e){if(u.isBuffer(e)){var i=0|c(e.length);return 0===(t=s(t,i)).length||e.copy(t,0,0,i),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?s(t,0):d(t,e);if("Buffer"===e.type&&o(e.data))return d(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=s(t,e<0?0:0|c(e)),!u.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function d(t,e){var i=e.length<0?0:0|c(e.length);t=s(t,i);for(var r=0;r<i;r+=1)t[r]=255&e[r];return t}function c(t){if(t>=h())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h().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 i=t.length;if(0===i)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return U(t).length;default:if(r)return D(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,i){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,i);case"utf8":case"utf-8":return E(this,e,i);case"ascii":return x(this,e,i);case"latin1":case"binary":return B(this,e,i);case"base64":return A(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,i);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function g(t,e,i,r,n){if(0===t.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(n)return-1;i=t.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:y(t,e,i,r,n);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):y(t,[e],i,r,n);throw new TypeError("val must be string, number or Buffer")}function y(t,e,i,r,n){var o,h=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;h=2,s/=2,u/=2,i/=2}function a(t,e){return 1===h?t[e]:t.readUInt16BE(e*h)}if(n){var f=-1;for(o=i;o<s;o++)if(a(t,o)===a(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*h}else-1!==f&&(o-=o-f),f=-1}else for(i+u>s&&(i=s-u),o=i;o>=0;o--){for(var l=!0,d=0;d<u;d++)if(a(t,o+d)!==a(e,d)){l=!1;break}if(l)return o}return-1}function b(t,e,i,r){i=Number(i)||0;var n=t.length-i;r?(r=Number(r))>n&&(r=n):r=n;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var h=0;h<r;++h){var s=parseInt(e.substr(2*h,2),16);if(isNaN(s))return h;t[i+h]=s}return h}function w(t,e,i,r){return Z(D(e,t.length-i),t,i,r)}function M(t,e,i,r){return Z(function(t){for(var e=[],i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(e),t,i,r)}function _(t,e,i,r){return M(t,e,i,r)}function k(t,e,i,r){return Z(U(e),t,i,r)}function S(t,e,i,r){return Z(function(t,e){for(var i,r,n,o=[],h=0;h<t.length&&!((e-=2)<0);++h)i=t.charCodeAt(h),r=i>>8,n=i%256,o.push(n),o.push(r);return o}(e,t.length-i),t,i,r)}function A(t,e,i){return 0===e&&i===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,i))}function E(t,e,i){i=Math.min(t.length,i);for(var r=[],n=e;n<i;){var o,h,s,u,a=t[n],f=null,l=a>239?4:a>223?3:a>191?2:1;if(n+l<=i)switch(l){case 1:a<128&&(f=a);break;case 2:128==(192&(o=t[n+1]))&&(u=(31&a)<<6|63&o)>127&&(f=u);break;case 3:o=t[n+1],h=t[n+2],128==(192&o)&&128==(192&h)&&(u=(15&a)<<12|(63&o)<<6|63&h)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[n+1],h=t[n+2],s=t[n+3],128==(192&o)&&128==(192&h)&&128==(192&s)&&(u=(15&a)<<18|(63&o)<<12|(63&h)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),n+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var i="",r=0;for(;r<e;)i+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return i}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=h(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,i){return a(null,t,e,i)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,i){return function(t,e,i,r){return f(e),e<=0?s(t,e):void 0!==i?"string"==typeof r?s(t,e).fill(i,r):s(t,e).fill(i):s(t,e)}(null,t,e,i)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var i=t.length,r=e.length,n=0,o=Math.min(i,r);n<o;++n)if(t[n]!==e[n]){i=t[n],r=e[n];break}return i<r?-1:r<i?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var r=u.allocUnsafe(e),n=0;for(i=0;i<t.length;++i){var h=t[i];if(!u.isBuffer(h))throw new TypeError('"list" argument must be an Array of Buffers');h.copy(r,n),n+=h.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):m.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",i=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,i,r,n){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),e<0||i>t.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&e>=i)return 0;if(r>=n)return-1;if(e>=i)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(r>>>=0),h=(i>>>=0)-(e>>>=0),s=Math.min(o,h),a=this.slice(r,n),f=t.slice(e,i),l=0;l<s;++l)if(a[l]!==f[l]){o=a[l],h=f[l];break}return o<h?-1:h<o?1:0},u.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},u.prototype.indexOf=function(t,e,i){return g(this,t,e,i,!0)},u.prototype.lastIndexOf=function(t,e,i){return g(this,t,e,i,!1)},u.prototype.write=function(t,e,i,r){if(void 0===e)r="utf8",i=this.length,e=0;else if(void 0===i&&"string"==typeof e)r=e,i=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-e;if((void 0===i||i>n)&&(i=n),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,i);case"utf8":case"utf-8":return w(this,t,e,i);case"ascii":return M(this,t,e,i);case"latin1":case"binary":return _(this,t,e,i);case"base64":return k(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,i);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(t,e,i){var r="";i=Math.min(t.length,i);for(var n=e;n<i;++n)r+=String.fromCharCode(127&t[n]);return r}function B(t,e,i){var r="";i=Math.min(t.length,i);for(var n=e;n<i;++n)r+=String.fromCharCode(t[n]);return r}function I(t,e,i){var r=t.length;(!e||e<0)&&(e=0),(!i||i<0||i>r)&&(i=r);for(var n="",o=e;o<i;++o)n+=C(t[o]);return n}function R(t,e,i){for(var r=t.slice(e,i),n="",o=0;o<r.length;o+=2)n+=String.fromCharCode(r[o]+256*r[o+1]);return n}function L(t,e,i){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>i)throw new RangeError("Trying to access beyond buffer length")}function q(t,e,i,r,n,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<o)throw new RangeError('"value" argument is out of bounds');if(i+r>t.length)throw new RangeError("Index out of range")}function T(t,e,i,r){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(t.length-i,2);n<o;++n)t[i+n]=(e&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function O(t,e,i,r){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(t.length-i,4);n<o;++n)t[i+n]=e>>>8*(r?n:3-n)&255}function P(t,e,i,r,n,o){if(i+r>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function j(t,e,i,r,o){return o||P(t,0,i,4),n.write(t,e,i,r,23,4),i+4}function z(t,e,i,r,o){return o||P(t,0,i,8),n.write(t,e,i,r,52,8),i+8}u.prototype.slice=function(t,e){var i,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(i=this.subarray(t,e)).__proto__=u.prototype;else{var n=e-t;i=new u(n,void 0);for(var o=0;o<n;++o)i[o]=this[o+t]}return i},u.prototype.readUIntLE=function(t,e,i){t|=0,e|=0,i||L(t,e,this.length);for(var r=this[t],n=1,o=0;++o<e&&(n*=256);)r+=this[t+o]*n;return r},u.prototype.readUIntBE=function(t,e,i){t|=0,e|=0,i||L(t,e,this.length);for(var r=this[t+--e],n=1;e>0&&(n*=256);)r+=this[t+--e]*n;return r},u.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||L(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||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,i){t|=0,e|=0,i||L(t,e,this.length);for(var r=this[t],n=1,o=0;++o<e&&(n*=256);)r+=this[t+o]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||L(t,e,this.length);for(var r=e,n=1,o=this[t+--r];r>0&&(n*=256);)o+=this[t+--r]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},u.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},u.prototype.readInt32LE=function(t,e){return e||L(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||L(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||L(t,4,this.length),n.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),n.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),n.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),n.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,i,r){(t=+t,e|=0,i|=0,r)||q(this,t,e,i,Math.pow(2,8*i)-1,0);var n=1,o=0;for(this[e]=255&t;++o<i&&(n*=256);)this[e+o]=t/n&255;return e+i},u.prototype.writeUIntBE=function(t,e,i,r){(t=+t,e|=0,i|=0,r)||q(this,t,e,i,Math.pow(2,8*i)-1,0);var n=i-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+i},u.prototype.writeUInt8=function(t,e,i){return t=+t,e|=0,i||q(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,i){return t=+t,e|=0,i||q(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||q(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||q(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):O(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||q(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):O(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);q(this,t,e,i,n-1,-n)}var o=0,h=1,s=0;for(this[e]=255&t;++o<i&&(h*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/h>>0)-s&255;return e+i},u.prototype.writeIntBE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);q(this,t,e,i,n-1,-n)}var o=i-1,h=1,s=0;for(this[e+o]=255&t;--o>=0&&(h*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/h>>0)-s&255;return e+i},u.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||q(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,i){return t=+t,e|=0,i||q(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||q(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||q(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):O(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||q(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):O(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,i){return j(this,t,e,!0,i)},u.prototype.writeFloatBE=function(t,e,i){return j(this,t,e,!1,i)},u.prototype.writeDoubleLE=function(t,e,i){return z(this,t,e,!0,i)},u.prototype.writeDoubleBE=function(t,e,i){return z(this,t,e,!1,i)},u.prototype.copy=function(t,e,i,r){if(i||(i=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-i&&(r=t.length-e+i);var n,o=r-i;if(this===t&&i<e&&e<r)for(n=o-1;n>=0;--n)t[n+e]=this[n+i];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)t[n+e]=this[n+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+o),e);return o},u.prototype.fill=function(t,e,i,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;var o;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(o=e;o<i;++o)this[o]=t;else{var h=u.isBuffer(t)?t:D(new u(t,r).toString()),s=h.length;for(o=0;o<i-e;++o)this[o+e]=h[o%s]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function C(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){var i;e=e||1/0;for(var r=t.length,n=null,o=[],h=0;h<r;++h){if((i=t.charCodeAt(h))>55295&&i<57344){if(!n){if(i>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(h+1===r){(e-=3)>-1&&o.push(239,191,189);continue}n=i;continue}if(i<56320){(e-=3)>-1&&o.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,i<128){if((e-=1)<0)break;o.push(i)}else if(i<2048){if((e-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,i,r){for(var n=0;n<r&&!(n+i>=e.length||n>=t.length);++n)e[n+i]=t[n];return n}}).call(this,i(6))},function(t,e,i){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var h;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{h=i(107).Buffer}catch(t){}function s(t,e,i){for(var n=0,o=Math.min(t.length,i),h=0,s=e;s<o;s++){var u,a=t.charCodeAt(s)-48;n<<=4,n|=u=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:a,h|=u}return r(!(240&h),"Invalid character in "+t),n}function u(t,e,i,n){for(var o=0,h=0,s=Math.min(t.length,i),u=e;u<s;u++){var a=t.charCodeAt(u)-48;o*=n,h=a>=49?a-49+10:a>=17?a-17+10:a,r(a>=0&&h<n,"Invalid character"),o+=h}return o}function a(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}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,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(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"===i&&this._initArray(this.toArray(),e,i)},o.prototype._initNumber=function(t,e,i){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),e,i)},o.prototype._initArray=function(t,e,i){if(r("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<this.length;n++)this.words[n]=0;var o,h,s=0;if("be"===i)for(n=t.length-1,o=0;n>=0;n-=3)h=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=h<<s&67108863,this.words[o+1]=h>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===i)for(n=0,o=0;n<t.length;n+=3)h=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=h<<s&67108863,this.words[o+1]=h>>>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 i=0;i<this.length;i++)this.words[i]=0;var r,n,o=0;for(i=t.length-6,r=0;i>=e;i-=6)n=s(t,i,i+6),this.words[r]|=n<<o&67108863,this.words[r+1]|=n>>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);i+6!==e&&(n=s(t,e,i+6),this.words[r]|=n<<o&67108863,this.words[r+1]|=n>>>26-o&4194303),this._strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,h=o%r,s=Math.min(o,o-h)+i,a=0,f=i;f<s;f+=r)a=u(t,f,f+r,e),this.imuln(n),this.words[0]+a<67108864?this.words[0]+=a:this._iaddn(a);if(0!==h){var l=1;for(a=u(t,f,t.length,e),f=0;f<h;f++)l*=e;this.imuln(l),this.words[0]+a<67108864?this.words[0]+=a:this._iaddn(a)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){a(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&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 l=["","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"],d=[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];o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,h=0;h<this.length;h++){var s=this.words[h],u=(16777215&(s<<n|o)).toString(16);i=0!==(o=s>>>24-n&16777215)||h!==this.length-1?l[6-u.length]+u+i:u+i,(n+=2)>=26&&(n-=26,h--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var a=d[t],f=c[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(f).toString(t);i=(p=p.idivn(f)).isZero()?m+i:l[a-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},h&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(h,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function p(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],h=n*o,s=67108863&h,u=h/67108864|0;i.words[0]=s;for(var a=1;a<r;a++){for(var f=u>>>26,l=67108863&u,d=Math.min(a,e.length-1),c=Math.max(0,a-t.length+1);c<=d;c++){var p=a-c|0;f+=(h=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&h}i.words[a]=0|l,u=0|f}return 0!==u?i.words[a]=0|u:i.length--,i._strip()}o.prototype.toArrayLike=function(t,e,i){this._strip();var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var h=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](h,n),h},o.prototype._toArrayLikeLE=function(t,e){for(var i=0,r=0,n=0,o=0;n<this.length;n++){var h=this.words[n]<<o|r;t[i++]=255&h,i<t.length&&(t[i++]=h>>8&255),i<t.length&&(t[i++]=h>>16&255),6===o?(i<t.length&&(t[i++]=h>>24&255),r=0,o=0):(r=h>>>24,o+=2)}if(i<t.length)for(t[i++]=r;i<t.length;)t[i++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var i=t.length-1,r=0,n=0,o=0;n<this.length;n++){var h=this.words[n]<<o|r;t[i--]=255&h,i>=0&&(t[i--]=h>>8&255),i>=0&&(t[i--]=h>>16&255),6===o?(i>=0&&(t[i--]=h>>24&255),r=0,o=0):(r=h>>>24,o+=2)}if(i>=0)for(t[i--]=r;i>=0;)t[i--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},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;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.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 i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.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,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<<n:this.words[i]&~(1<<n),this._strip()},o.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.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 i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,h=0;h<r.length;h++)o=(e=(0|i.words[h])-(0|r.words[h])+o)>>26,this.words[h]=67108863&e;for(;0!==o&&h<i.length;h++)o=(e=(0|i.words[h])+o)>>26,this.words[h]=67108863&e;if(0===o&&h<i.length&&i!==this)for(;h<i.length;h++)this.words[h]=i.words[h];return this.length=Math.max(this.length,h),i!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var m=function(t,e,i){var r,n,o,h=t.words,s=e.words,u=i.words,a=0,f=0|h[0],l=8191&f,d=f>>>13,c=0|h[1],p=8191&c,m=c>>>13,v=0|h[2],g=8191&v,y=v>>>13,b=0|h[3],w=8191&b,M=b>>>13,_=0|h[4],k=8191&_,S=_>>>13,A=0|h[5],E=8191&A,x=A>>>13,B=0|h[6],I=8191&B,R=B>>>13,L=0|h[7],q=8191&L,T=L>>>13,O=0|h[8],P=8191&O,j=O>>>13,z=0|h[9],N=8191&z,C=z>>>13,D=0|s[0],U=8191&D,Z=D>>>13,K=0|s[1],F=8191&K,H=K>>>13,X=0|s[2],Y=8191&X,G=X>>>13,W=0|s[3],V=8191&W,J=W>>>13,$=0|s[4],Q=8191&$,tt=$>>>13,et=0|s[5],it=8191&et,rt=et>>>13,nt=0|s[6],ot=8191&nt,ht=nt>>>13,st=0|s[7],ut=8191&st,at=st>>>13,ft=0|s[8],lt=8191&ft,dt=ft>>>13,ct=0|s[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var vt=(a+(r=Math.imul(l,U))|0)+((8191&(n=(n=Math.imul(l,Z))+Math.imul(d,U)|0))<<13)|0;a=((o=Math.imul(d,Z))+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(p,U),n=(n=Math.imul(p,Z))+Math.imul(m,U)|0,o=Math.imul(m,Z);var gt=(a+(r=r+Math.imul(l,F)|0)|0)+((8191&(n=(n=n+Math.imul(l,H)|0)+Math.imul(d,F)|0))<<13)|0;a=((o=o+Math.imul(d,H)|0)+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,U),n=(n=Math.imul(g,Z))+Math.imul(y,U)|0,o=Math.imul(y,Z),r=r+Math.imul(p,F)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,F)|0,o=o+Math.imul(m,H)|0;var yt=(a+(r=r+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,Y)|0))<<13)|0;a=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,U),n=(n=Math.imul(w,Z))+Math.imul(M,U)|0,o=Math.imul(M,Z),r=r+Math.imul(g,F)|0,n=(n=n+Math.imul(g,H)|0)+Math.imul(y,F)|0,o=o+Math.imul(y,H)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,G)|0;var bt=(a+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,J)|0)+Math.imul(d,V)|0))<<13)|0;a=((o=o+Math.imul(d,J)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(k,U),n=(n=Math.imul(k,Z))+Math.imul(S,U)|0,o=Math.imul(S,Z),r=r+Math.imul(w,F)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(M,F)|0,o=o+Math.imul(M,H)|0,r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,J)|0;var wt=(a+(r=r+Math.imul(l,Q)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;a=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(E,U),n=(n=Math.imul(E,Z))+Math.imul(x,U)|0,o=Math.imul(x,Z),r=r+Math.imul(k,F)|0,n=(n=n+Math.imul(k,H)|0)+Math.imul(S,F)|0,o=o+Math.imul(S,H)|0,r=r+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(g,V)|0,n=(n=n+Math.imul(g,J)|0)+Math.imul(y,V)|0,o=o+Math.imul(y,J)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var Mt=(a+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;a=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(I,U),n=(n=Math.imul(I,Z))+Math.imul(R,U)|0,o=Math.imul(R,Z),r=r+Math.imul(E,F)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(x,F)|0,o=o+Math.imul(x,H)|0,r=r+Math.imul(k,Y)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,J)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(a+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,ht)|0)+Math.imul(d,ot)|0))<<13)|0;a=((o=o+Math.imul(d,ht)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(q,U),n=(n=Math.imul(q,Z))+Math.imul(T,U)|0,o=Math.imul(T,Z),r=r+Math.imul(I,F)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(R,F)|0,o=o+Math.imul(R,H)|0,r=r+Math.imul(E,Y)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,J)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,J)|0,r=r+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(g,it)|0,n=(n=n+Math.imul(g,rt)|0)+Math.imul(y,it)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,ht)|0;var kt=(a+(r=r+Math.imul(l,ut)|0)|0)+((8191&(n=(n=n+Math.imul(l,at)|0)+Math.imul(d,ut)|0))<<13)|0;a=((o=o+Math.imul(d,at)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(P,U),n=(n=Math.imul(P,Z))+Math.imul(j,U)|0,o=Math.imul(j,Z),r=r+Math.imul(q,F)|0,n=(n=n+Math.imul(q,H)|0)+Math.imul(T,F)|0,o=o+Math.imul(T,H)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(E,V)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,J)|0,r=r+Math.imul(k,Q)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(g,ot)|0,n=(n=n+Math.imul(g,ht)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,ht)|0,r=r+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,at)|0;var St=(a+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;a=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(N,U),n=(n=Math.imul(N,Z))+Math.imul(C,U)|0,o=Math.imul(C,Z),r=r+Math.imul(P,F)|0,n=(n=n+Math.imul(P,H)|0)+Math.imul(j,F)|0,o=o+Math.imul(j,H)|0,r=r+Math.imul(q,Y)|0,n=(n=n+Math.imul(q,G)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(I,V)|0,n=(n=n+Math.imul(I,J)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,J)|0,r=r+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(S,it)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,ht)|0,r=r+Math.imul(g,ut)|0,n=(n=n+Math.imul(g,at)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(a+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;a=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(N,F),n=(n=Math.imul(N,H))+Math.imul(C,F)|0,o=Math.imul(C,H),r=r+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,G)|0,r=r+Math.imul(q,V)|0,n=(n=n+Math.imul(q,J)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(E,it)|0,n=(n=n+Math.imul(E,rt)|0)+Math.imul(x,it)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,ht)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,ht)|0,r=r+Math.imul(w,ut)|0,n=(n=n+Math.imul(w,at)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,at)|0,r=r+Math.imul(g,lt)|0,n=(n=n+Math.imul(g,dt)|0)+Math.imul(y,lt)|0,o=o+Math.imul(y,dt)|0;var Et=(a+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;a=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(N,Y),n=(n=Math.imul(N,G))+Math.imul(C,Y)|0,o=Math.imul(C,G),r=r+Math.imul(P,V)|0,n=(n=n+Math.imul(P,J)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,J)|0,r=r+Math.imul(q,Q)|0,n=(n=n+Math.imul(q,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,ht)|0,r=r+Math.imul(k,ut)|0,n=(n=n+Math.imul(k,at)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,dt)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,dt)|0;var xt=(a+(r=r+Math.imul(g,pt)|0)|0)+((8191&(n=(n=n+Math.imul(g,mt)|0)+Math.imul(y,pt)|0))<<13)|0;a=((o=o+Math.imul(y,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(N,V),n=(n=Math.imul(N,J))+Math.imul(C,V)|0,o=Math.imul(C,J),r=r+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(q,it)|0,n=(n=n+Math.imul(q,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,ht)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,ht)|0,r=r+Math.imul(E,ut)|0,n=(n=n+Math.imul(E,at)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,at)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,dt)|0;var Bt=(a+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;a=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(N,Q),n=(n=Math.imul(N,tt))+Math.imul(C,Q)|0,o=Math.imul(C,tt),r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(j,it)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(q,ot)|0,n=(n=n+Math.imul(q,ht)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,ht)|0,r=r+Math.imul(I,ut)|0,n=(n=n+Math.imul(I,at)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(E,lt)|0,n=(n=n+Math.imul(E,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var It=(a+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(S,pt)|0))<<13)|0;a=((o=o+Math.imul(S,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(N,it),n=(n=Math.imul(N,rt))+Math.imul(C,it)|0,o=Math.imul(C,rt),r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,ht)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,ht)|0,r=r+Math.imul(q,ut)|0,n=(n=n+Math.imul(q,at)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Rt=(a+(r=r+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,mt)|0)+Math.imul(x,pt)|0))<<13)|0;a=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(N,ot),n=(n=Math.imul(N,ht))+Math.imul(C,ot)|0,o=Math.imul(C,ht),r=r+Math.imul(P,ut)|0,n=(n=n+Math.imul(P,at)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,at)|0,r=r+Math.imul(q,lt)|0,n=(n=n+Math.imul(q,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Lt=(a+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;a=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(N,ut),n=(n=Math.imul(N,at))+Math.imul(C,ut)|0,o=Math.imul(C,at),r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var qt=(a+(r=r+Math.imul(q,pt)|0)|0)+((8191&(n=(n=n+Math.imul(q,mt)|0)+Math.imul(T,pt)|0))<<13)|0;a=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(qt>>>26)|0,qt&=67108863,r=Math.imul(N,lt),n=(n=Math.imul(N,dt))+Math.imul(C,lt)|0,o=Math.imul(C,dt);var Tt=(a+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(j,pt)|0))<<13)|0;a=((o=o+Math.imul(j,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ot=(a+(r=Math.imul(N,pt))|0)+((8191&(n=(n=Math.imul(N,mt))+Math.imul(C,pt)|0))<<13)|0;return a=((o=Math.imul(C,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=vt,u[1]=gt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=Mt,u[6]=_t,u[7]=kt,u[8]=St,u[9]=At,u[10]=Et,u[11]=xt,u[12]=Bt,u[13]=It,u[14]=Rt,u[15]=Lt,u[16]=qt,u[17]=Tt,u[18]=Ot,0!==a&&(u[19]=a,i.length++),i};function v(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var h=n;n=0;for(var s=67108863&r,u=Math.min(o,e.length-1),a=Math.max(0,o-t.length+1);a<=u;a++){var f=o-a,l=(0|t.words[f])*(0|e.words[a]),d=67108863&l;s=67108863&(d=d+s|0),n+=(h=(h=h+(l/67108864|0)|0)+(d>>>26)|0)>>>26,h&=67108863}i.words[o]=s,r=h,h=n}return 0!==r?i.words[o]=r:i.length--,i._strip()}function g(t,e,i){return v(t,e,i)}function y(t,e){this.x=t,this.y=e}Math.imul||(m=p),o.prototype.mulTo=function(t,e){var i=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):i<63?p(this,t,e):i<1024?v(this,t,e):g(this,t,e)},y.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},y.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},y.prototype.permute=function(t,e,i,r,n,o){for(var h=0;h<o;h++)r[h]=e[t[h]],n[h]=i[t[h]]},y.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var h=1;h<n;h<<=1)for(var s=h<<1,u=Math.cos(2*Math.PI/s),a=Math.sin(2*Math.PI/s),f=0;f<n;f+=s)for(var l=u,d=a,c=0;c<h;c++){var p=i[f+c],m=r[f+c],v=i[f+c+h],g=r[f+c+h],y=l*v-d*g;g=l*g+d*v,v=y,i[f+c]=p+v,r[f+c]=m+g,i[f+c+h]=p-v,r[f+c+h]=m-g,c!==s&&(y=u*l-a*d,d=u*d+a*l,l=y)}},y.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},y.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},y.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},y.prototype.convert13b=function(t,e,i,n){for(var o=0,h=0;h<e;h++)o+=0|t[h],i[2*h]=8191&o,o>>>=13,i[2*h+1]=8191&o,o>>>=13;for(h=2*e;h<n;++h)i[h]=0;r(0===o),r(0==(-8192&o))},y.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},y.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),h=new Array(r),s=new Array(r),u=new Array(r),a=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,h,r),this.convert13b(e.words,e.length,a,r),this.transform(h,o,s,u,r,n),this.transform(a,o,f,l,r,n);for(var c=0;c<r;c++){var p=s[c]*f[c]-u[c]*l[c];u[c]=s[c]*l[c]+u[c]*f[c],s[c]=p}return this.conjugate(s,u,r),this.transform(s,u,d,o,r,n),this.conjugate(d,o,r),this.normalize13b(d,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),g(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var i=0,n=0;n<this.length;n++){var o=(0|this.words[n])*t,h=(67108863&o)+(67108863&i);i>>=26,i+=o/67108864|0,i+=h>>>26,this.words[n]=67108863&h}return 0!==i&&(this.words[n]=i,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()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=t.words[r]>>>n&1}return e}(t);if(0===e.length)return new o(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var n=i.sqr();r<e.length;r++,n=n.sqr())0!==e[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var h=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<i;this.words[e]=u|h,h=s>>>26-i}h&&(this.words[e]=h,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this._strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,i){var n;r("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,h=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=i;if(n-=h,n=Math.max(0,n),u){for(var a=0;a<h;a++)u.words[a]=this.words[a];u.length=h}if(0===h);else if(this.length>h)for(this.length-=h,a=0;a<this.length;a++)this.words[a]=this.words[a+h];else this.words[0]=0,this.length=1;var f=0;for(a=this.length-1;a>=0&&(0!==f||a>=n);a--){var l=0|this.words[a];this.words[a]=f<<26-o|l>>>o,f=l&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,i){return r(0===this.negative),this.iushrn(t,e,i)},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){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<<e;return!(this.length<=i)&&!!(this.words[i]&n)},o.prototype.imaskn=functio