@soonspacejs/plugin-cps-soonmanager 2.9.4 → 2.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +8 -0
- package/dist/index.d.ts +26 -23
- package/dist/index.esm.js +2 -2
- package/dist/types.d.ts +62 -6
- package/dist/utils.d.ts +11 -4
- package/package.json +7 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import t from"soonspacejs";import{Vector4 as e,TextureLoader as i,Object3D as r,Vector2 as n,OrthographicCamera as o,MeshBasicMaterial as s,Mesh as h,PlaneGeometry as a,RepeatWrapping as u,Matrix4 as f,Box3 as l,Vector3 as d}from"three";function c(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)}function p(t,e,i,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(t,i):n?n.value=i:e.set(t,i),i}"function"==typeof SuppressedError&&SuppressedError;var m="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g=[],v=[],b="undefined"!=typeof Uint8Array?Uint8Array:Array,y=!1;function w(){y=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)g[e]=t[e],v[t.charCodeAt(e)]=e;v["-".charCodeAt(0)]=62,v["_".charCodeAt(0)]=63}function M(t,e,i){for(var r,n,o=[],s=e;s<i;s+=3)r=(t[s]<<16)+(t[s+1]<<8)+t[s+2],o.push(g[(n=r)>>18&63]+g[n>>12&63]+g[n>>6&63]+g[63&n]);return o.join("")}function _(t){var e;y||w();for(var i=t.length,r=i%3,n="",o=[],s=16383,h=0,a=i-r;h<a;h+=s)o.push(M(t,h,h+s>a?a:h+s));return 1===r?(e=t[i-1],n+=g[e>>2],n+=g[e<<4&63],n+="=="):2===r&&(e=(t[i-2]<<8)+t[i-1],n+=g[e>>10],n+=g[e>>4&63],n+=g[e<<2&63],n+="="),o.push(n),o.join("")}function S(t,e,i,r,n){var o,s,h=8*n-r-1,a=(1<<h)-1,u=a>>1,f=-7,l=i?n-1:0,d=i?-1:1,c=t[e+l];for(l+=d,o=c&(1<<-f)-1,c>>=-f,f+=h;f>0;o=256*o+t[e+l],l+=d,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[e+l],l+=d,f-=8);if(0===o)o=1-u;else{if(o===a)return s?NaN:1/0*(c?-1:1);s+=Math.pow(2,r),o-=u}return(c?-1:1)*s*Math.pow(2,o-r)}function E(t,e,i,r,n,o){var s,h,a,u=8*o-n-1,f=(1<<u)-1,l=f>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(h=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+l>=1?d/a:d*Math.pow(2,1-l))*a>=2&&(s++,a/=2),s+l>=f?(h=0,s=f):s+l>=1?(h=(e*a-1)*Math.pow(2,n),s+=l):(h=e*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;t[i+c]=255&h,c+=p,h/=256,n-=8);for(s=s<<n|h,u+=n;u>0;t[i+c]=255&s,c+=p,s/=256,u-=8);t[i+c-p]|=128*m}var A={}.toString,k=Array.isArray||function(t){return"[object Array]"==A.call(t)};T.TYPED_ARRAY_SUPPORT=void 0===m.TYPED_ARRAY_SUPPORT||m.TYPED_ARRAY_SUPPORT;var R=I();function I(){return T.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function O(t,e){if(I()<e)throw new RangeError("Invalid typed array length");return T.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=T.prototype:(null===t&&(t=new T(e)),t.length=e),t}function T(t,e,i){if(!(T.TYPED_ARRAY_SUPPORT||this instanceof T))return new T(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 P(this,t)}return B(this,t,e,i)}function B(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);T.TYPED_ARRAY_SUPPORT?(t=e).__proto__=T.prototype:t=x(t,e);return t}(t,e,i,r):"string"==typeof e?function(t,e,i){"string"==typeof i&&""!==i||(i="utf8");if(!T.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|C(e,i);t=O(t,r);var n=t.write(e,i);n!==r&&(t=t.slice(0,n));return t}(t,e,i):function(t,e){if(D(e)){var i=0|L(e.length);return 0===(t=O(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?O(t,0):x(t,e);if("Buffer"===e.type&&k(e.data))return x(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function N(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 P(t,e){if(N(e),t=O(t,e<0?0:0|L(e)),!T.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function x(t,e){var i=e.length<0?0:0|L(e.length);t=O(t,i);for(var r=0;r<i;r+=1)t[r]=255&e[r];return t}function L(t){if(t>=I())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+I().toString(16)+" bytes");return 0|t}function D(t){return!(null==t||!t._isBuffer)}function C(t,e){if(D(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 ft(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return lt(t).length;default:if(r)return ft(t).length;e=(""+e).toLowerCase(),r=!0}}function q(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 $(this,e,i);case"utf8":case"utf-8":return W(this,e,i);case"ascii":return Q(this,e,i);case"latin1":case"binary":return J(this,e,i);case"base64":return Z(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt(this,e,i);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function U(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function j(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=T.from(e,r)),D(e))return 0===e.length?-1:z(t,e,i,r,n);if("number"==typeof e)return e&=255,T.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):z(t,[e],i,r,n);throw new TypeError("val must be string, number or Buffer")}function z(t,e,i,r,n){var o,s=1,h=t.length,a=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;s=2,h/=2,a/=2,i/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var f=-1;for(o=i;o<h;o++)if(u(t,o)===u(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===a)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(i+a>h&&(i=h-a),o=i;o>=0;o--){for(var l=!0,d=0;d<a;d++)if(u(t,o+d)!==u(e,d)){l=!1;break}if(l)return o}return-1}function F(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 s=0;s<r;++s){var h=parseInt(e.substr(2*s,2),16);if(isNaN(h))return s;t[i+s]=h}return s}function H(t,e,i,r){return dt(ft(e,t.length-i),t,i,r)}function K(t,e,i,r){return dt(function(t){for(var e=[],i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(e),t,i,r)}function G(t,e,i,r){return K(t,e,i,r)}function Y(t,e,i,r){return dt(lt(e),t,i,r)}function V(t,e,i,r){return dt(function(t,e){for(var i,r,n,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(i=t.charCodeAt(s))>>8,n=i%256,o.push(n),o.push(r);return o}(e,t.length-i),t,i,r)}function Z(t,e,i){return 0===e&&i===t.length?_(t):_(t.slice(e,i))}function W(t,e,i){i=Math.min(t.length,i);for(var r=[],n=e;n<i;){var o,s,h,a,u=t[n],f=null,l=u>239?4:u>223?3:u>191?2:1;if(n+l<=i)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[n+1]))&&(a=(31&u)<<6|63&o)>127&&(f=a);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&(a=(15&u)<<12|(63&o)<<6|63&s)>2047&&(a<55296||a>57343)&&(f=a);break;case 4:o=t[n+1],s=t[n+2],h=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&h)&&(a=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&h)>65535&&a<1114112&&(f=a)}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<=X)return String.fromCharCode.apply(String,t);var i="",r=0;for(;r<e;)i+=String.fromCharCode.apply(String,t.slice(r,r+=X));return i}(r)}T.poolSize=8192,T._augment=function(t){return t.__proto__=T.prototype,t},T.from=function(t,e,i){return B(null,t,e,i)},T.TYPED_ARRAY_SUPPORT&&(T.prototype.__proto__=Uint8Array.prototype,T.__proto__=Uint8Array),T.alloc=function(t,e,i){return function(t,e,i,r){return N(e),e<=0?O(t,e):void 0!==i?"string"==typeof r?O(t,e).fill(i,r):O(t,e).fill(i):O(t,e)}(null,t,e,i)},T.allocUnsafe=function(t){return P(null,t)},T.allocUnsafeSlow=function(t){return P(null,t)},T.isBuffer=ct,T.compare=function(t,e){if(!D(t)||!D(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},T.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}},T.concat=function(t,e){if(!k(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return T.alloc(0);var i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var r=T.allocUnsafe(e),n=0;for(i=0;i<t.length;++i){var o=t[i];if(!D(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,n),n+=o.length}return r},T.byteLength=C,T.prototype._isBuffer=!0,T.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)U(this,e,e+1);return this},T.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)U(this,e,e+3),U(this,e+1,e+2);return this},T.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)U(this,e,e+7),U(this,e+1,e+6),U(this,e+2,e+5),U(this,e+3,e+4);return this},T.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?W(this,0,t):q.apply(this,arguments)},T.prototype.equals=function(t){if(!D(t))throw new TypeError("Argument must be a Buffer");return this===t||0===T.compare(this,t)},T.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},T.prototype.compare=function(t,e,i,r,n){if(!D(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),s=(i>>>=0)-(e>>>=0),h=Math.min(o,s),a=this.slice(r,n),u=t.slice(e,i),f=0;f<h;++f)if(a[f]!==u[f]){o=a[f],s=u[f];break}return o<s?-1:s<o?1:0},T.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},T.prototype.indexOf=function(t,e,i){return j(this,t,e,i,!0)},T.prototype.lastIndexOf=function(t,e,i){return j(this,t,e,i,!1)},T.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 F(this,t,e,i);case"utf8":case"utf-8":return H(this,t,e,i);case"ascii":return K(this,t,e,i);case"latin1":case"binary":return G(this,t,e,i);case"base64":return Y(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,t,e,i);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var X=4096;function Q(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 J(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 $(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+=ut(t[o]);return n}function tt(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 et(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 it(t,e,i,r,n,o){if(!D(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 rt(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 nt(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 ot(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 st(t,e,i,r,n){return n||ot(t,0,i,4),E(t,e,i,r,23,4),i+4}function ht(t,e,i,r,n){return n||ot(t,0,i,8),E(t,e,i,r,52,8),i+8}T.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),T.TYPED_ARRAY_SUPPORT)(i=this.subarray(t,e)).__proto__=T.prototype;else{var n=e-t;i=new T(n,void 0);for(var o=0;o<n;++o)i[o]=this[o+t]}return i},T.prototype.readUIntLE=function(t,e,i){t|=0,e|=0,i||et(t,e,this.length);for(var r=this[t],n=1,o=0;++o<e&&(n*=256);)r+=this[t+o]*n;return r},T.prototype.readUIntBE=function(t,e,i){t|=0,e|=0,i||et(t,e,this.length);for(var r=this[t+--e],n=1;e>0&&(n*=256);)r+=this[t+--e]*n;return r},T.prototype.readUInt8=function(t,e){return e||et(t,1,this.length),this[t]},T.prototype.readUInt16LE=function(t,e){return e||et(t,2,this.length),this[t]|this[t+1]<<8},T.prototype.readUInt16BE=function(t,e){return e||et(t,2,this.length),this[t]<<8|this[t+1]},T.prototype.readUInt32LE=function(t,e){return e||et(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},T.prototype.readUInt32BE=function(t,e){return e||et(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},T.prototype.readIntLE=function(t,e,i){t|=0,e|=0,i||et(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},T.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||et(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},T.prototype.readInt8=function(t,e){return e||et(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},T.prototype.readInt16LE=function(t,e){e||et(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},T.prototype.readInt16BE=function(t,e){e||et(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},T.prototype.readInt32LE=function(t,e){return e||et(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},T.prototype.readInt32BE=function(t,e){return e||et(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},T.prototype.readFloatLE=function(t,e){return e||et(t,4,this.length),S(this,t,!0,23,4)},T.prototype.readFloatBE=function(t,e){return e||et(t,4,this.length),S(this,t,!1,23,4)},T.prototype.readDoubleLE=function(t,e){return e||et(t,8,this.length),S(this,t,!0,52,8)},T.prototype.readDoubleBE=function(t,e){return e||et(t,8,this.length),S(this,t,!1,52,8)},T.prototype.writeUIntLE=function(t,e,i,r){(t=+t,e|=0,i|=0,r)||it(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},T.prototype.writeUIntBE=function(t,e,i,r){(t=+t,e|=0,i|=0,r)||it(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},T.prototype.writeUInt8=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,1,255,0),T.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},T.prototype.writeUInt16LE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):rt(this,t,e,!0),e+2},T.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):rt(this,t,e,!1),e+2},T.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):nt(this,t,e,!0),e+4},T.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nt(this,t,e,!1),e+4},T.prototype.writeIntLE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);it(this,t,e,i,n-1,-n)}var o=0,s=1,h=0;for(this[e]=255&t;++o<i&&(s*=256);)t<0&&0===h&&0!==this[e+o-1]&&(h=1),this[e+o]=(t/s>>0)-h&255;return e+i},T.prototype.writeIntBE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);it(this,t,e,i,n-1,-n)}var o=i-1,s=1,h=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===h&&0!==this[e+o+1]&&(h=1),this[e+o]=(t/s>>0)-h&255;return e+i},T.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,1,127,-128),T.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},T.prototype.writeInt16LE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):rt(this,t,e,!0),e+2},T.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):rt(this,t,e,!1),e+2},T.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,4,2147483647,-2147483648),T.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):nt(this,t,e,!0),e+4},T.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),T.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nt(this,t,e,!1),e+4},T.prototype.writeFloatLE=function(t,e,i){return st(this,t,e,!0,i)},T.prototype.writeFloatBE=function(t,e,i){return st(this,t,e,!1,i)},T.prototype.writeDoubleLE=function(t,e,i){return ht(this,t,e,!0,i)},T.prototype.writeDoubleBE=function(t,e,i){return ht(this,t,e,!1,i)},T.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||!T.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},T.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&&!T.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 s=D(t)?t:ft(new T(t,r).toString()),h=s.length;for(o=0;o<i-e;++o)this[o+e]=s[o%h]}return this};var at=/[^+\/0-9A-Za-z-_]/g;function ut(t){return t<16?"0"+t.toString(16):t.toString(16)}function ft(t,e){var i;e=e||1/0;for(var r=t.length,n=null,o=[],s=0;s<r;++s){if((i=t.charCodeAt(s))>55295&&i<57344){if(!n){if(i>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+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 lt(t){return function(t){var e,i,r,n,o,s;y||w();var h=t.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[h-2]?2:"="===t[h-1]?1:0,s=new b(3*h/4-o),r=o>0?h-4:h;var a=0;for(e=0,i=0;e<r;e+=4,i+=3)n=v[t.charCodeAt(e)]<<18|v[t.charCodeAt(e+1)]<<12|v[t.charCodeAt(e+2)]<<6|v[t.charCodeAt(e+3)],s[a++]=n>>16&255,s[a++]=n>>8&255,s[a++]=255&n;return 2===o?(n=v[t.charCodeAt(e)]<<2|v[t.charCodeAt(e+1)]>>4,s[a++]=255&n):1===o&&(n=v[t.charCodeAt(e)]<<10|v[t.charCodeAt(e+1)]<<4|v[t.charCodeAt(e+2)]>>2,s[a++]=n>>8&255,s[a++]=255&n),s}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(at,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function dt(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}function ct(t){return null!=t&&(!!t._isBuffer||pt(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&pt(t.slice(0,0))}(t))}function pt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var mt=Object.freeze({__proto__:null,Buffer:T,INSPECT_MAX_BYTES:50,SlowBuffer:function(t){return+t!=t&&(t=0),T.alloc(+t)},isBuffer:ct,kMaxLength:R}),gt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function vt(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){if(this instanceof t){var i=[null];return i.push.apply(i,arguments),new(Function.bind.apply(e,i))}return e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})})),i}var bt=131072,yt=1048576,wt=4194304,Mt=2097152,_t=269488175,St=2147485780,Et=262144,At=4194304,kt=2147483648,Rt=131072,It=33554432,Ot=67108864,Tt=268435456,Bt=134217728,Nt=8388608,Pt="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA",xt="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA",Lt={RTLD_LAZY:1,RTLD_NOW:2,RTLD_GLOBAL:8,RTLD_LOCAL:4,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,PRIORITY_LOW:19,PRIORITY_BELOW_NORMAL:10,PRIORITY_NORMAL:0,PRIORITY_ABOVE_NORMAL:-7,PRIORITY_HIGH:-14,PRIORITY_HIGHEST:-20,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGINFO:29,SIGSYS:12,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,O_RDONLY:0,O_WRONLY:1,O_RDWR:2,UV_DIRENT_UNKNOWN:0,UV_DIRENT_FILE:1,UV_DIRENT_DIR:2,UV_DIRENT_LINK:3,UV_DIRENT_FIFO:4,UV_DIRENT_SOCKET:5,UV_DIRENT_CHAR:6,UV_DIRENT_BLOCK:7,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:bt,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:yt,O_NOFOLLOW:256,O_SYNC:128,O_DSYNC:wt,O_SYMLINK:Mt,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_COPYFILE_EXCL:1,COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,COPYFILE_FICLONE_FORCE:4,OPENSSL_VERSION_NUMBER:_t,SSL_OP_ALL:St,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:Et,SSL_OP_CIPHER_SERVER_PREFERENCE:At,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:kt,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:0,SSL_OP_MICROSOFT_SESS_ID_BUG:0,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:0,SSL_OP_NETSCAPE_CHALLENGE_BUG:0,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:0,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:0,SSL_OP_NO_COMPRESSION:Rt,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:0,SSL_OP_NO_SSLv3:It,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:Ot,SSL_OP_NO_TLSv1_1:Tt,SSL_OP_NO_TLSv1_2:Bt,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:0,SSL_OP_SINGLE_ECDH_USE:0,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:0,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:0,SSL_OP_TLS_D5_BUG:0,SSL_OP_TLS_ROLLBACK_BUG:Nt,ENGINE_METHOD_RSA:1,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_EC:2048,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,RSA_PSS_SALTLEN_DIGEST:-1,RSA_PSS_SALTLEN_MAX_SIGN:-2,RSA_PSS_SALTLEN_AUTO:-2,defaultCoreCipherList:Pt,TLS1_VERSION:769,TLS1_1_VERSION:770,TLS1_2_VERSION:771,TLS1_3_VERSION:772,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,defaultCipherList:xt},Dt=vt(Object.freeze({__proto__:null,ALPN_ENABLED:1,COPYFILE_EXCL:1,COPYFILE_FICLONE:2,COPYFILE_FICLONE_FORCE:4,DH_CHECK_P_NOT_PRIME:1,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_NOT_SUITABLE_GENERATOR:8,DH_UNABLE_TO_CHECK_GENERATOR:4,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DH:4,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_DSA:2,ENGINE_METHOD_EC:2048,ENGINE_METHOD_NONE:0,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_RAND:8,ENGINE_METHOD_RSA:1,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,F_OK:0,OPENSSL_VERSION_NUMBER:_t,O_APPEND:8,O_CREAT:512,O_DIRECTORY:yt,O_DSYNC:wt,O_EXCL:2048,O_NOCTTY:bt,O_NOFOLLOW:256,O_NONBLOCK:4,O_RDONLY:0,O_RDWR:2,O_SYMLINK:Mt,O_SYNC:128,O_TRUNC:1024,O_WRONLY:1,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_HYBRID:6,POINT_CONVERSION_UNCOMPRESSED:4,PRIORITY_ABOVE_NORMAL:-7,PRIORITY_BELOW_NORMAL:10,PRIORITY_HIGH:-14,PRIORITY_HIGHEST:-20,PRIORITY_LOW:19,PRIORITY_NORMAL:0,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_PKCS1_PADDING:1,RSA_PKCS1_PSS_PADDING:6,RSA_PSS_SALTLEN_AUTO:-2,RSA_PSS_SALTLEN_DIGEST:-1,RSA_PSS_SALTLEN_MAX_SIGN:-2,RSA_SSLV23_PADDING:2,RSA_X931_PADDING:5,RTLD_GLOBAL:8,RTLD_LAZY:1,RTLD_LOCAL:4,RTLD_NOW:2,R_OK:4,SIGABRT:6,SIGALRM:14,SIGBUS:10,SIGCHLD:20,SIGCONT:19,SIGFPE:8,SIGHUP:1,SIGILL:4,SIGINFO:29,SIGINT:2,SIGIO:23,SIGIOT:6,SIGKILL:9,SIGPIPE:13,SIGPROF:27,SIGQUIT:3,SIGSEGV:11,SIGSTOP:17,SIGSYS:12,SIGTERM:15,SIGTRAP:5,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGUSR1:30,SIGUSR2:31,SIGVTALRM:26,SIGWINCH:28,SIGXCPU:24,SIGXFSZ:25,SSL_OP_ALL:St,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:Et,SSL_OP_CIPHER_SERVER_PREFERENCE:At,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:kt,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:0,SSL_OP_MICROSOFT_SESS_ID_BUG:0,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:0,SSL_OP_NETSCAPE_CHALLENGE_BUG:0,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:0,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:0,SSL_OP_NO_COMPRESSION:Rt,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:0,SSL_OP_NO_SSLv3:It,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:Ot,SSL_OP_NO_TLSv1_1:Tt,SSL_OP_NO_TLSv1_2:Bt,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:0,SSL_OP_SINGLE_ECDH_USE:0,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:0,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:0,SSL_OP_TLS_D5_BUG:0,SSL_OP_TLS_ROLLBACK_BUG:Nt,S_IFBLK:24576,S_IFCHR:8192,S_IFDIR:16384,S_IFIFO:4096,S_IFLNK:40960,S_IFMT:61440,S_IFREG:32768,S_IFSOCK:49152,S_IRGRP:32,S_IROTH:4,S_IRUSR:256,S_IRWXG:56,S_IRWXO:7,S_IRWXU:448,S_IWGRP:16,S_IWOTH:2,S_IWUSR:128,S_IXGRP:8,S_IXOTH:1,S_IXUSR:64,TLS1_1_VERSION:770,TLS1_2_VERSION:771,TLS1_3_VERSION:772,TLS1_VERSION:769,UV_DIRENT_BLOCK:7,UV_DIRENT_CHAR:6,UV_DIRENT_DIR:2,UV_DIRENT_FIFO:4,UV_DIRENT_FILE:1,UV_DIRENT_LINK:3,UV_DIRENT_SOCKET:5,UV_DIRENT_UNKNOWN:0,UV_FS_COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,W_OK:2,X_OK:1,default:Lt,defaultCipherList:xt,defaultCoreCipherList:Pt})),Ct={};function qt(){throw new Error("setTimeout has not been defined")}function Ut(){throw new Error("clearTimeout has not been defined")}var jt=qt,zt=Ut;function Ft(t){if(jt===setTimeout)return setTimeout(t,0);if((jt===qt||!jt)&&setTimeout)return jt=setTimeout,setTimeout(t,0);try{return jt(t,0)}catch(e){try{return jt.call(null,t,0)}catch(e){return jt.call(this,t,0)}}}"function"==typeof m.setTimeout&&(jt=setTimeout),"function"==typeof m.clearTimeout&&(zt=clearTimeout);var Ht,Kt=[],Gt=!1,Yt=-1;function Vt(){Gt&&Ht&&(Gt=!1,Ht.length?Kt=Ht.concat(Kt):Yt=-1,Kt.length&&Zt())}function Zt(){if(!Gt){var t=Ft(Vt);Gt=!0;for(var e=Kt.length;e;){for(Ht=Kt,Kt=[];++Yt<e;)Ht&&Ht[Yt].run();Yt=-1,e=Kt.length}Ht=null,Gt=!1,function(t){if(zt===clearTimeout)return clearTimeout(t);if((zt===Ut||!zt)&&clearTimeout)return zt=clearTimeout,clearTimeout(t);try{return zt(t)}catch(e){try{return zt.call(null,t)}catch(e){return zt.call(this,t)}}}(t)}}function Wt(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];Kt.push(new Xt(t,e)),1!==Kt.length||Gt||Ft(Zt)}function Xt(t,e){this.fun=t,this.array=e}Xt.prototype.run=function(){this.fun.apply(null,this.array)};function Qt(){}var Jt=Qt,$t=Qt,te=Qt,ee=Qt,ie=Qt,re=Qt,ne=Qt;var oe=m.performance||{},se=oe.now||oe.mozNow||oe.msNow||oe.oNow||oe.webkitNow||function(){return(new Date).getTime()};var he=new Date;var ae={nextTick:Wt,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Jt,addListener:$t,once:te,off:ee,removeListener:ie,removeAllListeners:re,emit:ne,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*se.call(oe),i=Math.floor(e),r=Math.floor(e%1*1e9);return t&&(i-=t[0],(r-=t[1])<0&&(i--,r+=1e9)),[i,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-he)/1e3}},ue={},fe={},le={},de={get exports(){return le},set exports(t){le=t}},ce={},pe={get exports(){return ce},set exports(t){ce=t}},me=vt(mt);
|
|
1
|
+
import t from"soonspacejs";import{Vector4 as e,TextureLoader as i,Object3D as r,Vector2 as n,OrthographicCamera as o,MeshBasicMaterial as s,Mesh as h,PlaneGeometry as a,RepeatWrapping as u,Box3 as f,Vector3 as l,Matrix4 as c}from"three";function d(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)}function p(t,e,i,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(t,i):n?n.value=i:e.set(t,i),i}"function"==typeof SuppressedError&&SuppressedError;var m="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g=[],v=[],b="undefined"!=typeof Uint8Array?Uint8Array:Array,y=!1;function w(){y=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)g[e]=t[e],v[t.charCodeAt(e)]=e;v["-".charCodeAt(0)]=62,v["_".charCodeAt(0)]=63}function M(t,e,i){for(var r,n,o=[],s=e;s<i;s+=3)r=(t[s]<<16)+(t[s+1]<<8)+t[s+2],o.push(g[(n=r)>>18&63]+g[n>>12&63]+g[n>>6&63]+g[63&n]);return o.join("")}function _(t){var e;y||w();for(var i=t.length,r=i%3,n="",o=[],s=16383,h=0,a=i-r;h<a;h+=s)o.push(M(t,h,h+s>a?a:h+s));return 1===r?(e=t[i-1],n+=g[e>>2],n+=g[e<<4&63],n+="=="):2===r&&(e=(t[i-2]<<8)+t[i-1],n+=g[e>>10],n+=g[e>>4&63],n+=g[e<<2&63],n+="="),o.push(n),o.join("")}function S(t,e,i,r,n){var o,s,h=8*n-r-1,a=(1<<h)-1,u=a>>1,f=-7,l=i?n-1:0,c=i?-1:1,d=t[e+l];for(l+=c,o=d&(1<<-f)-1,d>>=-f,f+=h;f>0;o=256*o+t[e+l],l+=c,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[e+l],l+=c,f-=8);if(0===o)o=1-u;else{if(o===a)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=u}return(d?-1:1)*s*Math.pow(2,o-r)}function E(t,e,i,r,n,o){var s,h,a,u=8*o-n-1,f=(1<<u)-1,l=f>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(h=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+l>=1?c/a:c*Math.pow(2,1-l))*a>=2&&(s++,a/=2),s+l>=f?(h=0,s=f):s+l>=1?(h=(e*a-1)*Math.pow(2,n),s+=l):(h=e*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;t[i+d]=255&h,d+=p,h/=256,n-=8);for(s=s<<n|h,u+=n;u>0;t[i+d]=255&s,d+=p,s/=256,u-=8);t[i+d-p]|=128*m}var A={}.toString,k=Array.isArray||function(t){return"[object Array]"==A.call(t)};T.TYPED_ARRAY_SUPPORT=void 0===m.TYPED_ARRAY_SUPPORT||m.TYPED_ARRAY_SUPPORT;var R=O();function O(){return T.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function I(t,e){if(O()<e)throw new RangeError("Invalid typed array length");return T.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=T.prototype:(null===t&&(t=new T(e)),t.length=e),t}function T(t,e,i){if(!(T.TYPED_ARRAY_SUPPORT||this instanceof T))return new T(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 N(this,t)}return B(this,t,e,i)}function B(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);T.TYPED_ARRAY_SUPPORT?(t=e).__proto__=T.prototype:t=x(t,e);return t}(t,e,i,r):"string"==typeof e?function(t,e,i){"string"==typeof i&&""!==i||(i="utf8");if(!T.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|C(e,i);t=I(t,r);var n=t.write(e,i);n!==r&&(t=t.slice(0,n));return t}(t,e,i):function(t,e){if(D(e)){var i=0|L(e.length);return 0===(t=I(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?I(t,0):x(t,e);if("Buffer"===e.type&&k(e.data))return x(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function P(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 N(t,e){if(P(e),t=I(t,e<0?0:0|L(e)),!T.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function x(t,e){var i=e.length<0?0:0|L(e.length);t=I(t,i);for(var r=0;r<i;r+=1)t[r]=255&e[r];return t}function L(t){if(t>=O())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O().toString(16)+" bytes");return 0|t}function D(t){return!(null==t||!t._isBuffer)}function C(t,e){if(D(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 ft(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return lt(t).length;default:if(r)return ft(t).length;e=(""+e).toLowerCase(),r=!0}}function j(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 $(this,e,i);case"utf8":case"utf-8":return W(this,e,i);case"ascii":return Q(this,e,i);case"latin1":case"binary":return J(this,e,i);case"base64":return Z(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt(this,e,i);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function U(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function q(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=T.from(e,r)),D(e))return 0===e.length?-1:z(t,e,i,r,n);if("number"==typeof e)return e&=255,T.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):z(t,[e],i,r,n);throw new TypeError("val must be string, number or Buffer")}function z(t,e,i,r,n){var o,s=1,h=t.length,a=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;s=2,h/=2,a/=2,i/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var f=-1;for(o=i;o<h;o++)if(u(t,o)===u(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===a)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(i+a>h&&(i=h-a),o=i;o>=0;o--){for(var l=!0,c=0;c<a;c++)if(u(t,o+c)!==u(e,c)){l=!1;break}if(l)return o}return-1}function F(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 s=0;s<r;++s){var h=parseInt(e.substr(2*s,2),16);if(isNaN(h))return s;t[i+s]=h}return s}function H(t,e,i,r){return ct(ft(e,t.length-i),t,i,r)}function K(t,e,i,r){return ct(function(t){for(var e=[],i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(e),t,i,r)}function G(t,e,i,r){return K(t,e,i,r)}function V(t,e,i,r){return ct(lt(e),t,i,r)}function Y(t,e,i,r){return ct(function(t,e){for(var i,r,n,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(i=t.charCodeAt(s))>>8,n=i%256,o.push(n),o.push(r);return o}(e,t.length-i),t,i,r)}function Z(t,e,i){return 0===e&&i===t.length?_(t):_(t.slice(e,i))}function W(t,e,i){i=Math.min(t.length,i);for(var r=[],n=e;n<i;){var o,s,h,a,u=t[n],f=null,l=u>239?4:u>223?3:u>191?2:1;if(n+l<=i)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[n+1]))&&(a=(31&u)<<6|63&o)>127&&(f=a);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&(a=(15&u)<<12|(63&o)<<6|63&s)>2047&&(a<55296||a>57343)&&(f=a);break;case 4:o=t[n+1],s=t[n+2],h=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&h)&&(a=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&h)>65535&&a<1114112&&(f=a)}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<=X)return String.fromCharCode.apply(String,t);var i="",r=0;for(;r<e;)i+=String.fromCharCode.apply(String,t.slice(r,r+=X));return i}(r)}T.poolSize=8192,T._augment=function(t){return t.__proto__=T.prototype,t},T.from=function(t,e,i){return B(null,t,e,i)},T.TYPED_ARRAY_SUPPORT&&(T.prototype.__proto__=Uint8Array.prototype,T.__proto__=Uint8Array),T.alloc=function(t,e,i){return function(t,e,i,r){return P(e),e<=0?I(t,e):void 0!==i?"string"==typeof r?I(t,e).fill(i,r):I(t,e).fill(i):I(t,e)}(null,t,e,i)},T.allocUnsafe=function(t){return N(null,t)},T.allocUnsafeSlow=function(t){return N(null,t)},T.isBuffer=dt,T.compare=function(t,e){if(!D(t)||!D(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},T.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}},T.concat=function(t,e){if(!k(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return T.alloc(0);var i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var r=T.allocUnsafe(e),n=0;for(i=0;i<t.length;++i){var o=t[i];if(!D(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,n),n+=o.length}return r},T.byteLength=C,T.prototype._isBuffer=!0,T.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)U(this,e,e+1);return this},T.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)U(this,e,e+3),U(this,e+1,e+2);return this},T.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)U(this,e,e+7),U(this,e+1,e+6),U(this,e+2,e+5),U(this,e+3,e+4);return this},T.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?W(this,0,t):j.apply(this,arguments)},T.prototype.equals=function(t){if(!D(t))throw new TypeError("Argument must be a Buffer");return this===t||0===T.compare(this,t)},T.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},T.prototype.compare=function(t,e,i,r,n){if(!D(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),s=(i>>>=0)-(e>>>=0),h=Math.min(o,s),a=this.slice(r,n),u=t.slice(e,i),f=0;f<h;++f)if(a[f]!==u[f]){o=a[f],s=u[f];break}return o<s?-1:s<o?1:0},T.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},T.prototype.indexOf=function(t,e,i){return q(this,t,e,i,!0)},T.prototype.lastIndexOf=function(t,e,i){return q(this,t,e,i,!1)},T.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 F(this,t,e,i);case"utf8":case"utf-8":return H(this,t,e,i);case"ascii":return K(this,t,e,i);case"latin1":case"binary":return G(this,t,e,i);case"base64":return V(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,t,e,i);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var X=4096;function Q(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 J(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 $(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+=ut(t[o]);return n}function tt(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 et(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 it(t,e,i,r,n,o){if(!D(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 rt(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 nt(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 ot(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 st(t,e,i,r,n){return n||ot(t,0,i,4),E(t,e,i,r,23,4),i+4}function ht(t,e,i,r,n){return n||ot(t,0,i,8),E(t,e,i,r,52,8),i+8}T.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),T.TYPED_ARRAY_SUPPORT)(i=this.subarray(t,e)).__proto__=T.prototype;else{var n=e-t;i=new T(n,void 0);for(var o=0;o<n;++o)i[o]=this[o+t]}return i},T.prototype.readUIntLE=function(t,e,i){t|=0,e|=0,i||et(t,e,this.length);for(var r=this[t],n=1,o=0;++o<e&&(n*=256);)r+=this[t+o]*n;return r},T.prototype.readUIntBE=function(t,e,i){t|=0,e|=0,i||et(t,e,this.length);for(var r=this[t+--e],n=1;e>0&&(n*=256);)r+=this[t+--e]*n;return r},T.prototype.readUInt8=function(t,e){return e||et(t,1,this.length),this[t]},T.prototype.readUInt16LE=function(t,e){return e||et(t,2,this.length),this[t]|this[t+1]<<8},T.prototype.readUInt16BE=function(t,e){return e||et(t,2,this.length),this[t]<<8|this[t+1]},T.prototype.readUInt32LE=function(t,e){return e||et(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},T.prototype.readUInt32BE=function(t,e){return e||et(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},T.prototype.readIntLE=function(t,e,i){t|=0,e|=0,i||et(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},T.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||et(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},T.prototype.readInt8=function(t,e){return e||et(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},T.prototype.readInt16LE=function(t,e){e||et(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},T.prototype.readInt16BE=function(t,e){e||et(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},T.prototype.readInt32LE=function(t,e){return e||et(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},T.prototype.readInt32BE=function(t,e){return e||et(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},T.prototype.readFloatLE=function(t,e){return e||et(t,4,this.length),S(this,t,!0,23,4)},T.prototype.readFloatBE=function(t,e){return e||et(t,4,this.length),S(this,t,!1,23,4)},T.prototype.readDoubleLE=function(t,e){return e||et(t,8,this.length),S(this,t,!0,52,8)},T.prototype.readDoubleBE=function(t,e){return e||et(t,8,this.length),S(this,t,!1,52,8)},T.prototype.writeUIntLE=function(t,e,i,r){(t=+t,e|=0,i|=0,r)||it(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},T.prototype.writeUIntBE=function(t,e,i,r){(t=+t,e|=0,i|=0,r)||it(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},T.prototype.writeUInt8=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,1,255,0),T.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},T.prototype.writeUInt16LE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):rt(this,t,e,!0),e+2},T.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):rt(this,t,e,!1),e+2},T.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):nt(this,t,e,!0),e+4},T.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nt(this,t,e,!1),e+4},T.prototype.writeIntLE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);it(this,t,e,i,n-1,-n)}var o=0,s=1,h=0;for(this[e]=255&t;++o<i&&(s*=256);)t<0&&0===h&&0!==this[e+o-1]&&(h=1),this[e+o]=(t/s>>0)-h&255;return e+i},T.prototype.writeIntBE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);it(this,t,e,i,n-1,-n)}var o=i-1,s=1,h=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===h&&0!==this[e+o+1]&&(h=1),this[e+o]=(t/s>>0)-h&255;return e+i},T.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,1,127,-128),T.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},T.prototype.writeInt16LE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):rt(this,t,e,!0),e+2},T.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):rt(this,t,e,!1),e+2},T.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,4,2147483647,-2147483648),T.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):nt(this,t,e,!0),e+4},T.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||it(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),T.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nt(this,t,e,!1),e+4},T.prototype.writeFloatLE=function(t,e,i){return st(this,t,e,!0,i)},T.prototype.writeFloatBE=function(t,e,i){return st(this,t,e,!1,i)},T.prototype.writeDoubleLE=function(t,e,i){return ht(this,t,e,!0,i)},T.prototype.writeDoubleBE=function(t,e,i){return ht(this,t,e,!1,i)},T.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||!T.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},T.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&&!T.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 s=D(t)?t:ft(new T(t,r).toString()),h=s.length;for(o=0;o<i-e;++o)this[o+e]=s[o%h]}return this};var at=/[^+\/0-9A-Za-z-_]/g;function ut(t){return t<16?"0"+t.toString(16):t.toString(16)}function ft(t,e){var i;e=e||1/0;for(var r=t.length,n=null,o=[],s=0;s<r;++s){if((i=t.charCodeAt(s))>55295&&i<57344){if(!n){if(i>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+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 lt(t){return function(t){var e,i,r,n,o,s;y||w();var h=t.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[h-2]?2:"="===t[h-1]?1:0,s=new b(3*h/4-o),r=o>0?h-4:h;var a=0;for(e=0,i=0;e<r;e+=4,i+=3)n=v[t.charCodeAt(e)]<<18|v[t.charCodeAt(e+1)]<<12|v[t.charCodeAt(e+2)]<<6|v[t.charCodeAt(e+3)],s[a++]=n>>16&255,s[a++]=n>>8&255,s[a++]=255&n;return 2===o?(n=v[t.charCodeAt(e)]<<2|v[t.charCodeAt(e+1)]>>4,s[a++]=255&n):1===o&&(n=v[t.charCodeAt(e)]<<10|v[t.charCodeAt(e+1)]<<4|v[t.charCodeAt(e+2)]>>2,s[a++]=n>>8&255,s[a++]=255&n),s}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(at,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function ct(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}function dt(t){return null!=t&&(!!t._isBuffer||pt(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&pt(t.slice(0,0))}(t))}function pt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var mt=Object.freeze({__proto__:null,Buffer:T,INSPECT_MAX_BYTES:50,SlowBuffer:function(t){return+t!=t&&(t=0),T.alloc(+t)},isBuffer:dt,kMaxLength:R}),gt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function vt(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){if(this instanceof t){var i=[null];return i.push.apply(i,arguments),new(Function.bind.apply(e,i))}return e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})})),i}var bt=131072,yt=1048576,wt=4194304,Mt=2097152,_t=269488175,St=2147485780,Et=262144,At=4194304,kt=2147483648,Rt=131072,Ot=33554432,It=67108864,Tt=268435456,Bt=134217728,Pt=8388608,Nt="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA",xt="TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA",Lt={RTLD_LAZY:1,RTLD_NOW:2,RTLD_GLOBAL:8,RTLD_LOCAL:4,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,PRIORITY_LOW:19,PRIORITY_BELOW_NORMAL:10,PRIORITY_NORMAL:0,PRIORITY_ABOVE_NORMAL:-7,PRIORITY_HIGH:-14,PRIORITY_HIGHEST:-20,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGINFO:29,SIGSYS:12,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,O_RDONLY:0,O_WRONLY:1,O_RDWR:2,UV_DIRENT_UNKNOWN:0,UV_DIRENT_FILE:1,UV_DIRENT_DIR:2,UV_DIRENT_LINK:3,UV_DIRENT_FIFO:4,UV_DIRENT_SOCKET:5,UV_DIRENT_CHAR:6,UV_DIRENT_BLOCK:7,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:bt,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:yt,O_NOFOLLOW:256,O_SYNC:128,O_DSYNC:wt,O_SYMLINK:Mt,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_COPYFILE_EXCL:1,COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,COPYFILE_FICLONE_FORCE:4,OPENSSL_VERSION_NUMBER:_t,SSL_OP_ALL:St,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:Et,SSL_OP_CIPHER_SERVER_PREFERENCE:At,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:kt,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:0,SSL_OP_MICROSOFT_SESS_ID_BUG:0,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:0,SSL_OP_NETSCAPE_CHALLENGE_BUG:0,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:0,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:0,SSL_OP_NO_COMPRESSION:Rt,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:0,SSL_OP_NO_SSLv3:Ot,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:It,SSL_OP_NO_TLSv1_1:Tt,SSL_OP_NO_TLSv1_2:Bt,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:0,SSL_OP_SINGLE_ECDH_USE:0,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:0,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:0,SSL_OP_TLS_D5_BUG:0,SSL_OP_TLS_ROLLBACK_BUG:Pt,ENGINE_METHOD_RSA:1,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_EC:2048,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,RSA_PSS_SALTLEN_DIGEST:-1,RSA_PSS_SALTLEN_MAX_SIGN:-2,RSA_PSS_SALTLEN_AUTO:-2,defaultCoreCipherList:Nt,TLS1_VERSION:769,TLS1_1_VERSION:770,TLS1_2_VERSION:771,TLS1_3_VERSION:772,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,defaultCipherList:xt},Dt=vt(Object.freeze({__proto__:null,ALPN_ENABLED:1,COPYFILE_EXCL:1,COPYFILE_FICLONE:2,COPYFILE_FICLONE_FORCE:4,DH_CHECK_P_NOT_PRIME:1,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_NOT_SUITABLE_GENERATOR:8,DH_UNABLE_TO_CHECK_GENERATOR:4,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DH:4,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_DSA:2,ENGINE_METHOD_EC:2048,ENGINE_METHOD_NONE:0,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_RAND:8,ENGINE_METHOD_RSA:1,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,F_OK:0,OPENSSL_VERSION_NUMBER:_t,O_APPEND:8,O_CREAT:512,O_DIRECTORY:yt,O_DSYNC:wt,O_EXCL:2048,O_NOCTTY:bt,O_NOFOLLOW:256,O_NONBLOCK:4,O_RDONLY:0,O_RDWR:2,O_SYMLINK:Mt,O_SYNC:128,O_TRUNC:1024,O_WRONLY:1,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_HYBRID:6,POINT_CONVERSION_UNCOMPRESSED:4,PRIORITY_ABOVE_NORMAL:-7,PRIORITY_BELOW_NORMAL:10,PRIORITY_HIGH:-14,PRIORITY_HIGHEST:-20,PRIORITY_LOW:19,PRIORITY_NORMAL:0,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_PKCS1_PADDING:1,RSA_PKCS1_PSS_PADDING:6,RSA_PSS_SALTLEN_AUTO:-2,RSA_PSS_SALTLEN_DIGEST:-1,RSA_PSS_SALTLEN_MAX_SIGN:-2,RSA_SSLV23_PADDING:2,RSA_X931_PADDING:5,RTLD_GLOBAL:8,RTLD_LAZY:1,RTLD_LOCAL:4,RTLD_NOW:2,R_OK:4,SIGABRT:6,SIGALRM:14,SIGBUS:10,SIGCHLD:20,SIGCONT:19,SIGFPE:8,SIGHUP:1,SIGILL:4,SIGINFO:29,SIGINT:2,SIGIO:23,SIGIOT:6,SIGKILL:9,SIGPIPE:13,SIGPROF:27,SIGQUIT:3,SIGSEGV:11,SIGSTOP:17,SIGSYS:12,SIGTERM:15,SIGTRAP:5,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGUSR1:30,SIGUSR2:31,SIGVTALRM:26,SIGWINCH:28,SIGXCPU:24,SIGXFSZ:25,SSL_OP_ALL:St,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:Et,SSL_OP_CIPHER_SERVER_PREFERENCE:At,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:kt,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:0,SSL_OP_MICROSOFT_SESS_ID_BUG:0,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:0,SSL_OP_NETSCAPE_CHALLENGE_BUG:0,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:0,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:0,SSL_OP_NO_COMPRESSION:Rt,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:0,SSL_OP_NO_SSLv3:Ot,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:It,SSL_OP_NO_TLSv1_1:Tt,SSL_OP_NO_TLSv1_2:Bt,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:0,SSL_OP_SINGLE_ECDH_USE:0,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:0,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:0,SSL_OP_TLS_D5_BUG:0,SSL_OP_TLS_ROLLBACK_BUG:Pt,S_IFBLK:24576,S_IFCHR:8192,S_IFDIR:16384,S_IFIFO:4096,S_IFLNK:40960,S_IFMT:61440,S_IFREG:32768,S_IFSOCK:49152,S_IRGRP:32,S_IROTH:4,S_IRUSR:256,S_IRWXG:56,S_IRWXO:7,S_IRWXU:448,S_IWGRP:16,S_IWOTH:2,S_IWUSR:128,S_IXGRP:8,S_IXOTH:1,S_IXUSR:64,TLS1_1_VERSION:770,TLS1_2_VERSION:771,TLS1_3_VERSION:772,TLS1_VERSION:769,UV_DIRENT_BLOCK:7,UV_DIRENT_CHAR:6,UV_DIRENT_DIR:2,UV_DIRENT_FIFO:4,UV_DIRENT_FILE:1,UV_DIRENT_LINK:3,UV_DIRENT_SOCKET:5,UV_DIRENT_UNKNOWN:0,UV_FS_COPYFILE_EXCL:1,UV_FS_COPYFILE_FICLONE:2,UV_FS_COPYFILE_FICLONE_FORCE:4,UV_FS_SYMLINK_DIR:1,UV_FS_SYMLINK_JUNCTION:2,W_OK:2,X_OK:1,default:Lt,defaultCipherList:xt,defaultCoreCipherList:Nt})),Ct={};function jt(){throw new Error("setTimeout has not been defined")}function Ut(){throw new Error("clearTimeout has not been defined")}var qt=jt,zt=Ut;function Ft(t){if(qt===setTimeout)return setTimeout(t,0);if((qt===jt||!qt)&&setTimeout)return qt=setTimeout,setTimeout(t,0);try{return qt(t,0)}catch(e){try{return qt.call(null,t,0)}catch(e){return qt.call(this,t,0)}}}"function"==typeof m.setTimeout&&(qt=setTimeout),"function"==typeof m.clearTimeout&&(zt=clearTimeout);var Ht,Kt=[],Gt=!1,Vt=-1;function Yt(){Gt&&Ht&&(Gt=!1,Ht.length?Kt=Ht.concat(Kt):Vt=-1,Kt.length&&Zt())}function Zt(){if(!Gt){var t=Ft(Yt);Gt=!0;for(var e=Kt.length;e;){for(Ht=Kt,Kt=[];++Vt<e;)Ht&&Ht[Vt].run();Vt=-1,e=Kt.length}Ht=null,Gt=!1,function(t){if(zt===clearTimeout)return clearTimeout(t);if((zt===Ut||!zt)&&clearTimeout)return zt=clearTimeout,clearTimeout(t);try{return zt(t)}catch(e){try{return zt.call(null,t)}catch(e){return zt.call(this,t)}}}(t)}}function Wt(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];Kt.push(new Xt(t,e)),1!==Kt.length||Gt||Ft(Zt)}function Xt(t,e){this.fun=t,this.array=e}Xt.prototype.run=function(){this.fun.apply(null,this.array)};function Qt(){}var Jt=Qt,$t=Qt,te=Qt,ee=Qt,ie=Qt,re=Qt,ne=Qt;var oe=m.performance||{},se=oe.now||oe.mozNow||oe.msNow||oe.oNow||oe.webkitNow||function(){return(new Date).getTime()};var he=new Date;var ae={nextTick:Wt,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Jt,addListener:$t,once:te,off:ee,removeListener:ie,removeAllListeners:re,emit:ne,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*se.call(oe),i=Math.floor(e),r=Math.floor(e%1*1e9);return t&&(i-=t[0],(r-=t[1])<0&&(i--,r+=1e9)),[i,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-he)/1e3}},ue={},fe={},le={},ce={get exports(){return le},set exports(t){le=t}},de={},pe={get exports(){return de},set exports(t){de=t}},me=vt(mt);
|
|
2
2
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
3
|
-
!function(t,e){var i=me,r=i.Buffer;function n(t,e){for(var i in t)e[i]=t[i]}function o(t,e,i){return r(t,e,i)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=i:(n(i,e),e.Buffer=o),o.prototype=Object.create(r.prototype),n(r,o),o.from=function(t,e,i){if("number"==typeof t)throw new TypeError("Argument must not be a number");return r(t,e,i)},o.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=r(t);return void 0!==e?"string"==typeof i?n.fill(e,i):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}}(pe,ce);var ge=65536,ve=4294967295;var be=ce.Buffer,ye=gt.crypto||gt.msCrypto;ye&&ye.getRandomValues?de.exports=function(t,e){if(t>ve)throw new RangeError("requested too many random bytes");var i=be.allocUnsafe(t);if(t>0)if(t>ge)for(var r=0;r<t;r+=ge)ye.getRandomValues(i.slice(r,r+ge));else ye.getRandomValues(i);if("function"==typeof e)return ae.nextTick((function(){e(null,i)}));return i}:de.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")};var we={},Me={get exports(){return we},set exports(t){we=t}};"function"==typeof Object.create?Me.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Me.exports=function(t,e){if(e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}};var _e={},Se={get exports(){return _e},set exports(t){_e=t}};function Ee(){}function Ae(){Ae.init.call(this)}function ke(t){return void 0===t._maxListeners?Ae.defaultMaxListeners:t._maxListeners}function Re(t,e,i,r){var n,o,s,h;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((o=t._events)?(o.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),o=t._events),s=o[e]):(o=t._events=new Ee,t._eventsCount=0),s){if("function"==typeof s?s=o[e]=r?[i,s]:[s,i]:r?s.unshift(i):s.push(i),!s.warned&&(n=ke(t))&&n>0&&s.length>n){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,h=a,"function"==typeof console.warn?console.warn(h):console.log(h)}}else s=o[e]=i,++t._eventsCount;return t}function Ie(t,e,i){var r=!1;function n(){t.removeListener(e,n),r||(r=!0,i.apply(t,arguments))}return n.listener=i,n}function Oe(t){var e=this._events;if(e){var i=e[t];if("function"==typeof i)return 1;if(i)return i.length}return 0}function Te(t,e){for(var i=new Array(e);e--;)i[e]=t[e];return i}Ee.prototype=Object.create(null),Ae.EventEmitter=Ae,Ae.usingDomains=!1,Ae.prototype.domain=void 0,Ae.prototype._events=void 0,Ae.prototype._maxListeners=void 0,Ae.defaultMaxListeners=10,Ae.init=function(){this.domain=null,Ae.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Ee,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ae.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},Ae.prototype.getMaxListeners=function(){return ke(this)},Ae.prototype.emit=function(t){var e,i,r,n,o,s,h,a="error"===t;if(s=this._events)a=a&&null==s.error;else if(!a)return!1;if(h=this.domain,a){if(e=arguments[1],!h){if(e instanceof Error)throw e;var u=new Error('Uncaught, unspecified "error" event. ('+e+")");throw u.context=e,u}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=h,e.domainThrown=!1,h.emit("error",e),!1}if(!(i=s[t]))return!1;var f="function"==typeof i;switch(r=arguments.length){case 1:!function(t,e,i){if(e)t.call(i);else for(var r=t.length,n=Te(t,r),o=0;o<r;++o)n[o].call(i)}(i,f,this);break;case 2:!function(t,e,i,r){if(e)t.call(i,r);else for(var n=t.length,o=Te(t,n),s=0;s<n;++s)o[s].call(i,r)}(i,f,this,arguments[1]);break;case 3:!function(t,e,i,r,n){if(e)t.call(i,r,n);else for(var o=t.length,s=Te(t,o),h=0;h<o;++h)s[h].call(i,r,n)}(i,f,this,arguments[1],arguments[2]);break;case 4:!function(t,e,i,r,n,o){if(e)t.call(i,r,n,o);else for(var s=t.length,h=Te(t,s),a=0;a<s;++a)h[a].call(i,r,n,o)}(i,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),o=1;o<r;o++)n[o-1]=arguments[o];!function(t,e,i,r){if(e)t.apply(i,r);else for(var n=t.length,o=Te(t,n),s=0;s<n;++s)o[s].apply(i,r)}(i,f,this,n)}return!0},Ae.prototype.addListener=function(t,e){return Re(this,t,e,!1)},Ae.prototype.on=Ae.prototype.addListener,Ae.prototype.prependListener=function(t,e){return Re(this,t,e,!0)},Ae.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Ie(this,t,e)),this},Ae.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Ie(this,t,e)),this},Ae.prototype.removeListener=function(t,e){var i,r,n,o,s;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(i=r[t]))return this;if(i===e||i.listener&&i.listener===e)0==--this._eventsCount?this._events=new Ee:(delete r[t],r.removeListener&&this.emit("removeListener",t,i.listener||e));else if("function"!=typeof i){for(n=-1,o=i.length;o-- >0;)if(i[o]===e||i[o].listener&&i[o].listener===e){s=i[o].listener,n=o;break}if(n<0)return this;if(1===i.length){if(i[0]=void 0,0==--this._eventsCount)return this._events=new Ee,this;delete r[t]}else!function(t,e){for(var i=e,r=i+1,n=t.length;r<n;i+=1,r+=1)t[i]=t[r];t.pop()}(i,n);r.removeListener&&this.emit("removeListener",t,s||e)}return this},Ae.prototype.removeAllListeners=function(t){var e,i;if(!(i=this._events))return this;if(!i.removeListener)return 0===arguments.length?(this._events=new Ee,this._eventsCount=0):i[t]&&(0==--this._eventsCount?this._events=new Ee:delete i[t]),this;if(0===arguments.length){for(var r,n=Object.keys(i),o=0;o<n.length;++o)"removeListener"!==(r=n[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Ee,this._eventsCount=0,this}if("function"==typeof(e=i[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},Ae.prototype.listeners=function(t){var e,i=this._events;return i&&(e=i[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),i=0;i<e.length;++i)e[i]=t[i].listener||t[i];return e}(e):[]},Ae.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):Oe.call(t,e)},Ae.prototype.listenerCount=Oe,Ae.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Be=vt(Object.freeze({__proto__:null,EventEmitter:Ae,default:Ae})),Ne=Be.EventEmitter,Pe="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t},xe=/%[sdj%]/g;function Le(t){if(!Qe(t)){for(var e=[],i=0;i<arguments.length;i++)e.push(je(arguments[i]));return e.join(" ")}i=1;for(var r=arguments,n=r.length,o=String(t).replace(xe,(function(t){if("%%"===t)return"%";if(i>=n)return t;switch(t){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch(t){return"[Circular]"}default:return t}})),s=r[i];i<n;s=r[++i])Ze(s)||!ei(s)?o+=" "+s:o+=" "+je(s);return o}function De(t,e){if($e(m.process))return function(){return De(t,e).apply(this,arguments)};if(!0===ae.noDeprecation)return t;var i=!1;return function(){if(!i){if(ae.throwDeprecation)throw new Error(e);ae.traceDeprecation?console.trace(e):console.error(e),i=!0}return t.apply(this,arguments)}}var Ce,qe={};function Ue(t){if($e(Ce)&&(Ce=ae.env.NODE_DEBUG||""),t=t.toUpperCase(),!qe[t])if(new RegExp("\\b"+t+"\\b","i").test(Ce)){qe[t]=function(){var e=Le.apply(null,arguments);console.error("%s %d: %s",t,0,e)}}else qe[t]=function(){};return qe[t]}function je(t,e){var i={seen:[],stylize:Fe};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),Ve(e)?i.showHidden=e:e&&li(i,e),$e(i.showHidden)&&(i.showHidden=!1),$e(i.depth)&&(i.depth=2),$e(i.colors)&&(i.colors=!1),$e(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=ze),He(i,t,i.depth)}function ze(t,e){var i=je.styles[e];return i?"["+je.colors[i][0]+"m"+t+"["+je.colors[i][1]+"m":t}function Fe(t,e){return t}function He(t,e,i){if(t.customInspect&&e&&ni(e.inspect)&&e.inspect!==je&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(i,t);return Qe(r)||(r=He(t,r,i)),r}var n=function(t,e){if($e(e))return t.stylize("undefined","undefined");if(Qe(e)){var i="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(i,"string")}if(Xe(e))return t.stylize(""+e,"number");if(Ve(e))return t.stylize(""+e,"boolean");if(Ze(e))return t.stylize("null","null")}(t,e);if(n)return n;var o=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,i){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),ri(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Ke(e);if(0===o.length){if(ni(e)){var h=e.name?": "+e.name:"";return t.stylize("[Function"+h+"]","special")}if(ti(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(ii(e))return t.stylize(Date.prototype.toString.call(e),"date");if(ri(e))return Ke(e)}var a,u="",f=!1,l=["{","}"];(Ye(e)&&(f=!0,l=["[","]"]),ni(e))&&(u=" [Function"+(e.name?": "+e.name:"")+"]");return ti(e)&&(u=" "+RegExp.prototype.toString.call(e)),ii(e)&&(u=" "+Date.prototype.toUTCString.call(e)),ri(e)&&(u=" "+Ke(e)),0!==o.length||f&&0!=e.length?i<0?ti(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),a=f?function(t,e,i,r,n){for(var o=[],s=0,h=e.length;s<h;++s)di(e,String(s))?o.push(Ge(t,e,i,r,String(s),!0)):o.push("");return n.forEach((function(n){n.match(/^\d+$/)||o.push(Ge(t,e,i,r,n,!0))})),o}(t,e,i,s,o):o.map((function(r){return Ge(t,e,i,s,r,f)})),t.seen.pop(),function(t,e,i){var r=t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return i[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+i[1];return i[0]+e+" "+t.join(", ")+" "+i[1]}(a,u,l)):l[0]+u+l[1]}function Ke(t){return"["+Error.prototype.toString.call(t)+"]"}function Ge(t,e,i,r,n,o){var s,h,a;if((a=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?h=a.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):a.set&&(h=t.stylize("[Setter]","special")),di(r,n)||(s="["+n+"]"),h||(t.seen.indexOf(a.value)<0?(h=Ze(i)?He(t,a.value,null):He(t,a.value,i-1)).indexOf("\n")>-1&&(h=o?h.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+h.split("\n").map((function(t){return" "+t})).join("\n")):h=t.stylize("[Circular]","special")),$e(s)){if(o&&n.match(/^\d+$/))return h;(s=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+h}function Ye(t){return Array.isArray(t)}function Ve(t){return"boolean"==typeof t}function Ze(t){return null===t}function We(t){return null==t}function Xe(t){return"number"==typeof t}function Qe(t){return"string"==typeof t}function Je(t){return"symbol"==typeof t}function $e(t){return void 0===t}function ti(t){return ei(t)&&"[object RegExp]"===hi(t)}function ei(t){return"object"==typeof t&&null!==t}function ii(t){return ei(t)&&"[object Date]"===hi(t)}function ri(t){return ei(t)&&("[object Error]"===hi(t)||t instanceof Error)}function ni(t){return"function"==typeof t}function oi(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function si(t){return T.isBuffer(t)}function hi(t){return Object.prototype.toString.call(t)}function ai(t){return t<10?"0"+t.toString(10):t.toString(10)}je.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},je.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var ui=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function fi(){var t,e;console.log("%s - %s",(t=new Date,e=[ai(t.getHours()),ai(t.getMinutes()),ai(t.getSeconds())].join(":"),[t.getDate(),ui[t.getMonth()],e].join(" ")),Le.apply(null,arguments))}function li(t,e){if(!e||!ei(e))return t;for(var i=Object.keys(e),r=i.length;r--;)t[i[r]]=e[i[r]];return t}function di(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var ci,pi,mi={inherits:Pe,_extend:li,log:fi,isBuffer:si,isPrimitive:oi,isFunction:ni,isError:ri,isDate:ii,isObject:ei,isRegExp:ti,isUndefined:$e,isSymbol:Je,isString:Qe,isNumber:Xe,isNullOrUndefined:We,isNull:Ze,isBoolean:Ve,isArray:Ye,inspect:je,deprecate:De,format:Le,debuglog:Ue},gi=vt(Object.freeze({__proto__:null,_extend:li,debuglog:Ue,default:mi,deprecate:De,format:Le,inherits:Pe,inspect:je,isArray:Ye,isBoolean:Ve,isBuffer:si,isDate:ii,isError:ri,isFunction:ni,isNull:Ze,isNullOrUndefined:We,isNumber:Xe,isObject:ei,isPrimitive:oi,isRegExp:ti,isString:Qe,isSymbol:Je,isUndefined:$e,log:fi}));function vi(){if(pi)return ci;function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,n(r.key),r)}}function n(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}pi=1;var o=me.Buffer,s=gi.inspect,h=s&&s.custom||"inspect";return ci=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var i,n,a;return i=t,n=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,i,r,n=o.allocUnsafe(t>>>0),s=this.head,h=0;s;)e=s.data,i=n,r=h,o.prototype.copy.call(e,i,r),h+=s.data.length,s=s.next;return n}},{key:"consume",value:function(t,e){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):i=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,i=1,r=e.data;for(t-=r.length;e=e.next;){var n=e.data,o=t>n.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),0==(t-=o)){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),i=this.head,r=1;for(i.data.copy(e),t-=i.data.length;i=i.next;){var n=i.data,s=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,s),0==(t-=s)){s===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(s));break}++r}return this.length-=r,e}},{key:h,value:function(t,i){return s(this,e(e({},i),{},{depth:0,customInspect:!1}))}}],n&&r(i.prototype,n),a&&r(i,a),Object.defineProperty(i,"prototype",{writable:!1}),t}(),ci}function bi(t,e){wi(t,e),yi(t)}function yi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function wi(t,e){t.emit("error",e)}var Mi={destroy:function(t,e){var i=this,r=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return r||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ae.nextTick(wi,this,t)):ae.nextTick(wi,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?i._writableState?i._writableState.errorEmitted?ae.nextTick(yi,i):(i._writableState.errorEmitted=!0,ae.nextTick(bi,i,t)):ae.nextTick(bi,i,t):e?(ae.nextTick(yi,i),e(t)):ae.nextTick(yi,i)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var i=t._readableState,r=t._writableState;i&&i.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}},_i={};var Si={};function Ei(t,e,i){i||(i=Error);var r=function(t){var i,r;function n(i,r,n){return t.call(this,function(t,i,r){return"string"==typeof e?e:e(t,i,r)}(i,r,n))||this}return r=t,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r,n}(i);r.prototype.name=i.name,r.prototype.code=t,Si[t]=r}function Ai(t,e){if(Array.isArray(t)){var i=t.length;return t=t.map((function(t){return String(t)})),i>2?"one of ".concat(e," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}Ei("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),Ei("ERR_INVALID_ARG_TYPE",(function(t,e,i){var r,n,o,s;if("string"==typeof e&&(n="not ",e.substr(!o||o<0?0:+o,n.length)===n)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-e.length,i)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(Ai(e,"type"));else{var h=function(t,e,i){return"number"!=typeof i&&(i=0),!(i+e.length>t.length)&&-1!==t.indexOf(e,i)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(h," ").concat(r," ").concat(Ai(e,"type"))}return s+=". Received type ".concat(typeof i)}),TypeError),Ei("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Ei("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),Ei("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Ei("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),Ei("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Ei("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Ei("ERR_STREAM_WRITE_AFTER_END","write after end"),Ei("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Ei("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),Ei("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),_i.codes=Si;var ki=_i.codes.ERR_INVALID_OPT_VALUE;var Ri,Ii,Oi,Ti,Bi,Ni,Pi={getHighWaterMark:function(t,e,i,r){var n=function(t,e,i){return null!=t.highWaterMark?t.highWaterMark:e?t[i]:null}(e,r,i);if(null!=n){if(!isFinite(n)||Math.floor(n)!==n||n<0)throw new ki(r?i:"highWaterMark",n);return Math.floor(n)}return t.objectMode?16:16384}};function xi(){if(Ii)return Ri;function t(t){try{if(!gt.localStorage)return!1}catch(t){return!1}var e=gt.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}return Ii=1,Ri=function(e,i){if(t("noDeprecation"))return e;var r=!1;return function(){if(!r){if(t("throwDeprecation"))throw new Error(i);t("traceDeprecation")?console.trace(i):console.warn(i),r=!0}return e.apply(this,arguments)}},Ri}function Li(){if(Ti)return Oi;function t(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,i){var r=t.entry;t.entry=null;for(;r;){var n=r.callback;e.pendingcb--,n(i),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var e;Ti=1,Oi=M,M.WritableState=w;var i={deprecate:xi()},r=Ne,n=me.Buffer,o=(void 0!==gt?gt:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,h=Mi,a=Pi.getHighWaterMark,u=_i.codes,f=u.ERR_INVALID_ARG_TYPE,l=u.ERR_METHOD_NOT_IMPLEMENTED,d=u.ERR_MULTIPLE_CALLBACK,c=u.ERR_STREAM_CANNOT_PIPE,p=u.ERR_STREAM_DESTROYED,m=u.ERR_STREAM_NULL_VALUES,g=u.ERR_STREAM_WRITE_AFTER_END,v=u.ERR_UNKNOWN_ENCODING,b=h.errorOrDestroy;function y(){}function w(i,r,n){e=e||Di(),i=i||{},"boolean"!=typeof n&&(n=r instanceof e),this.objectMode=!!i.objectMode,n&&(this.objectMode=this.objectMode||!!i.writableObjectMode),this.highWaterMark=a(this,i,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===i.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,r=i.sync,n=i.writecb;if("function"!=typeof n)throw new d;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,r,n){--e.pendingcb,i?(ae.nextTick(n,r),ae.nextTick(R,t,e),t._writableState.errorEmitted=!0,b(t,r)):(n(r),t._writableState.errorEmitted=!0,b(t,r),R(t,e))}(t,i,r,e,n);else{var o=A(i)||t.destroyed;o||i.corked||i.bufferProcessing||!i.bufferedRequest||E(t,i),r?ae.nextTick(S,t,i,o,n):S(t,i,o,n)}}(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==i.emitClose,this.autoDestroy=!!i.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function M(t){var i=this instanceof(e=e||Di());if(!i&&!s.call(M,this))return new M(t);this._writableState=new w(t,this,i),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),r.call(this)}function _(t,e,i,r,n,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new p("write")):i?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function S(t,e,i,r){i||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),R(t,e)}function E(e,i){i.bufferProcessing=!0;var r=i.bufferedRequest;if(e._writev&&r&&r.next){var n=i.bufferedRequestCount,o=new Array(n),s=i.corkedRequestsFree;s.entry=r;for(var h=0,a=!0;r;)o[h]=r,r.isBuf||(a=!1),r=r.next,h+=1;o.allBuffers=a,_(e,i,!0,i.length,o,"",s.finish),i.pendingcb++,i.lastBufferedRequest=null,s.next?(i.corkedRequestsFree=s.next,s.next=null):i.corkedRequestsFree=new t(i),i.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(_(e,i,!1,i.objectMode?1:u.length,u,f,l),r=r.next,i.bufferedRequestCount--,i.writing)break}null===r&&(i.lastBufferedRequest=null)}i.bufferedRequest=r,i.bufferProcessing=!1}function A(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final((function(i){e.pendingcb--,i&&b(t,i),e.prefinished=!0,t.emit("prefinish"),R(t,e)}))}function R(t,e){var i=A(e);if(i&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,ae.nextTick(k,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var r=t._readableState;(!r||r.autoDestroy&&r.endEmitted)&&t.destroy()}return i}return we(M,r),w.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(w.prototype,"buffer",{get:i.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===M&&(t&&t._writableState instanceof w)}})):s=function(t){return t instanceof this},M.prototype.pipe=function(){b(this,new c)},M.prototype.write=function(t,e,i){var r,s=this._writableState,h=!1,a=!s.objectMode&&(r=t,n.isBuffer(r)||r instanceof o);return a&&!n.isBuffer(t)&&(t=function(t){return n.from(t)}(t)),"function"==typeof e&&(i=e,e=null),a?e="buffer":e||(e=s.defaultEncoding),"function"!=typeof i&&(i=y),s.ending?function(t,e){var i=new g;b(t,i),ae.nextTick(e,i)}(this,i):(a||function(t,e,i,r){var n;return null===i?n=new m:"string"==typeof i||e.objectMode||(n=new f("chunk",["string","Buffer"],i)),!n||(b(t,n),ae.nextTick(r,n),!1)}(this,s,t,i))&&(s.pendingcb++,h=function(t,e,i,r,o,s){if(!i){var h=function(t,e,i){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=n.from(e,i));return e}(e,r,o);r!==h&&(i=!0,o="buffer",r=h)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:o,isBuf:i,callback:s,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else _(t,e,!1,a,r,o,s);return u}(this,s,a,t,e,i)),h},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||E(this,t))},M.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(t,e,i){i(new l("_write()"))},M.prototype._writev=null,M.prototype.end=function(t,e,i){var r=this._writableState;return"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,i){e.ending=!0,R(t,e),i&&(e.finished?ae.nextTick(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,r,i),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),M.prototype.destroy=h.destroy,M.prototype._undestroy=h.undestroy,M.prototype._destroy=function(t,e){e(t)},Oi}function Di(){if(Ni)return Bi;Ni=1;var t=Object.keys||function(t){var e=[];for(var i in t)e.push(i);return e};Bi=s;var e=Xi(),i=Li();we(s,e);for(var r=t(i.prototype),n=0;n<r.length;n++){var o=r[n];s.prototype[o]||(s.prototype[o]=i.prototype[o])}function s(t){if(!(this instanceof s))return new s(t);e.call(this,t),i.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||ae.nextTick(a,this)}function a(t){t.end()}return Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),Bi}var Ci,qi={};function Ui(){if(Ci)return qi;Ci=1;var t=ce.Buffer,e=t.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(i){var r;switch(this.encoding=function(i){var r=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(i);if("string"!=typeof r&&(t.isEncoding===e||!e(i)))throw new Error("Unknown encoding: "+i);return r||i}(i),this.encoding){case"utf16le":this.text=o,this.end=s,r=4;break;case"utf8":this.fillLast=n,r=4;break;case"base64":this.text=h,this.end=a,r=3;break;default:return this.write=u,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(r)}function r(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function n(t){var e=this.lastTotal-this.lastNeed,i=function(t,e,i){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==i?i:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function o(t,e){if((t.length-e)%2==0){var i=t.toString("utf16le",e);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function s(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,i)}return e}function h(t,e){var i=(t.length-e)%3;return 0===i?t.toString("base64",e):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-i))}function a(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}return qi.StringDecoder=i,i.prototype.write=function(t){if(0===t.length)return"";var e,i;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<t.length?e?e+this.text(t,i):this.text(t,i):e||""},i.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},i.prototype.text=function(t,e){var i=function(t,e,i){var n=e.length-1;if(n<i)return 0;var o=r(e[n]);if(o>=0)return o>0&&(t.lastNeed=o-1),o;if(--n<i||-2===o)return 0;if(o=r(e[n]),o>=0)return o>0&&(t.lastNeed=o-2),o;if(--n<i||-2===o)return 0;if(o=r(e[n]),o>=0)return o>0&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=i;var n=t.length-(i-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},i.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},qi}var ji=_i.codes.ERR_STREAM_PREMATURE_CLOSE;function zi(){}var Fi,Hi,Ki,Gi,Yi,Vi,Zi=function t(e,i,r){if("function"==typeof i)return t(e,null,i);i||(i={}),r=function(t){var e=!1;return function(){if(!e){e=!0;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];t.apply(this,r)}}}(r||zi);var n=i.readable||!1!==i.readable&&e.readable,o=i.writable||!1!==i.writable&&e.writable,s=function(){e.writable||a()},h=e._writableState&&e._writableState.finished,a=function(){o=!1,h=!0,n||r.call(e)},u=e._readableState&&e._readableState.endEmitted,f=function(){n=!1,u=!0,o||r.call(e)},l=function(t){r.call(e,t)},d=function(){var t;return n&&!u?(e._readableState&&e._readableState.ended||(t=new ji),r.call(e,t)):o&&!h?(e._writableState&&e._writableState.ended||(t=new ji),r.call(e,t)):void 0},c=function(){e.req.on("finish",a)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?o&&!e._writableState&&(e.on("end",s),e.on("close",s)):(e.on("complete",a),e.on("abort",d),e.req?c():e.on("request",c)),e.on("end",f),e.on("finish",a),!1!==i.error&&e.on("error",l),e.on("close",d),function(){e.removeListener("complete",a),e.removeListener("abort",d),e.removeListener("request",c),e.req&&e.req.removeListener("finish",a),e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",a),e.removeListener("end",f),e.removeListener("error",l),e.removeListener("close",d)}};function Wi(){if(Hi)return Fi;var t;function e(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}Hi=1;var i=Zi,r=Symbol("lastResolve"),n=Symbol("lastReject"),o=Symbol("error"),s=Symbol("ended"),h=Symbol("lastPromise"),a=Symbol("handlePromise"),u=Symbol("stream");function f(t,e){return{value:t,done:e}}function l(t){var e=t[r];if(null!==e){var i=t[u].read();null!==i&&(t[h]=null,t[r]=null,t[n]=null,e(f(i,!1)))}}function d(t){ae.nextTick(l,t)}var c=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((e(t={get stream(){return this[u]},next:function(){var t=this,e=this[o];if(null!==e)return Promise.reject(e);if(this[s])return Promise.resolve(f(void 0,!0));if(this[u].destroyed)return new Promise((function(e,i){ae.nextTick((function(){t[o]?i(t[o]):e(f(void 0,!0))}))}));var i,r=this[h];if(r)i=new Promise(function(t,e){return function(i,r){t.then((function(){e[s]?i(f(void 0,!0)):e[a](i,r)}),r)}}(r,this));else{var n=this[u].read();if(null!==n)return Promise.resolve(f(n,!1));i=new Promise(this[a])}return this[h]=i,i}},Symbol.asyncIterator,(function(){return this})),e(t,"return",(function(){var t=this;return new Promise((function(e,i){t[u].destroy(null,(function(t){t?i(t):e(f(void 0,!0))}))}))})),t),c);return Fi=function(t){var l,c=Object.create(p,(e(l={},u,{value:t,writable:!0}),e(l,r,{value:null,writable:!0}),e(l,n,{value:null,writable:!0}),e(l,o,{value:null,writable:!0}),e(l,s,{value:t._readableState.endEmitted,writable:!0}),e(l,a,{value:function(t,e){var i=c[u].read();i?(c[h]=null,c[r]=null,c[n]=null,t(f(i,!1))):(c[r]=t,c[n]=e)},writable:!0}),l));return c[h]=null,i(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=c[n];return null!==e&&(c[h]=null,c[r]=null,c[n]=null,e(t)),void(c[o]=t)}var i=c[r];null!==i&&(c[h]=null,c[r]=null,c[n]=null,i(f(void 0,!0))),c[s]=!0})),t.on("readable",d.bind(null,c)),c},Fi}function Xi(){if(Vi)return Yi;var t;Vi=1,Yi=M,M.ReadableState=w,Be.EventEmitter;var e=function(t,e){return t.listeners(e).length},i=Ne,r=me.Buffer,n=(void 0!==gt?gt:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var o,s=gi;o=s&&s.debuglog?s.debuglog("stream"):function(){};var h,a,u,f=vi(),l=Mi,d=Pi.getHighWaterMark,c=_i.codes,p=c.ERR_INVALID_ARG_TYPE,m=c.ERR_STREAM_PUSH_AFTER_EOF,g=c.ERR_METHOD_NOT_IMPLEMENTED,v=c.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;we(M,i);var b=l.errorOrDestroy,y=["error","close","destroy","pause","resume"];function w(e,i,r){t=t||Di(),e=e||{},"boolean"!=typeof r&&(r=i instanceof t),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=d(this,e,"readableHighWaterMark",r),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=Ui().StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function M(e){if(t=t||Di(),!(this instanceof M))return new M(e);var r=this instanceof t;this._readableState=new w(e,this,r),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function _(t,e,i,s,h){o("readableAddChunk",e);var a,u=t._readableState;if(null===e)u.reading=!1,function(t,e){if(o("onEofChunk"),e.ended)return;if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}(t,u);else if(h||(a=function(t,e){var i;o=e,r.isBuffer(o)||o instanceof n||"string"==typeof e||void 0===e||t.objectMode||(i=new p("chunk",["string","Buffer","Uint8Array"],e));var o;return i}(u,e)),a)b(t,a);else if(u.objectMode||e&&e.length>0)if("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===r.prototype||(e=function(t){return r.from(t)}(e)),s)u.endEmitted?b(t,new v):S(t,u,e,!0);else if(u.ended)b(t,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!i?(e=u.decoder.write(e),u.objectMode||0!==e.length?S(t,u,e,!1):I(t,u)):S(t,u,e,!1)}else s||(u.reading=!1,I(t,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function S(t,e,i,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",i)):(e.length+=e.objectMode?1:i.length,r?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&k(t)),I(t,e)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),M.prototype.destroy=l.destroy,M.prototype._undestroy=l.undestroy,M.prototype._destroy=function(t,e){e(t)},M.prototype.push=function(t,e){var i,n=this._readableState;return n.objectMode?i=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=r.from(t,e),e=""),i=!0),_(this,t,e,!1,i)},M.prototype.unshift=function(t){return _(this,t,null,!0,!1)},M.prototype.isPaused=function(){return!1===this._readableState.flowing},M.prototype.setEncoding=function(t){h||(h=Ui().StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,r="";null!==i;)r+=e.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var E=1073741824;function A(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,ae.nextTick(R,t))}function R(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,P(t)}function I(t,e){e.readingMore||(e.readingMore=!0,ae.nextTick(O,t,e))}function O(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var i=e.length;if(o("maybeReadMore read 0"),t.read(0),i===e.length)break}e.readingMore=!1}function T(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function B(t){o("readable nexttick read 0"),t.read(0)}function N(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),P(t),e.flowing&&!e.reading&&t.read(0)}function P(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function x(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function L(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,ae.nextTick(D,e,t))}function D(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var i=e._writableState;(!i||i.autoDestroy&&i.finished)&&e.destroy()}}function C(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}return M.prototype.read=function(t){o("read",t),t=parseInt(t,10);var e=this._readableState,i=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):k(this),null;if(0===(t=A(t,e))&&e.ended)return 0===e.length&&L(this),null;var r,n=e.needReadable;return o("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&o("length less than watermark",n=!0),e.ended||e.reading?o("reading or ended",n=!1):n&&(o("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=A(i,e))),null===(r=t>0?x(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&L(this)),null!==r&&this.emit("data",r),r},M.prototype._read=function(t){b(this,new g("_read()"))},M.prototype.pipe=function(t,i){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,i);var s=(!i||!1!==i.end)&&t!==ae.stdout&&t!==ae.stderr?a:m;function h(e,i){o("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,o("cleanup"),t.removeListener("close",c),t.removeListener("finish",p),t.removeListener("drain",u),t.removeListener("error",d),t.removeListener("unpipe",h),r.removeListener("end",a),r.removeListener("end",m),r.removeListener("data",l),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function a(){o("onend"),t.end()}n.endEmitted?ae.nextTick(s):r.once("end",s),t.on("unpipe",h);var u=function(t){return function(){var i=t._readableState;o("pipeOnDrain",i.awaitDrain),i.awaitDrain&&i.awaitDrain--,0===i.awaitDrain&&e(t,"data")&&(i.flowing=!0,P(t))}}(r);t.on("drain",u);var f=!1;function l(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==C(n.pipes,t))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(i){o("onerror",i),m(),t.removeListener("error",d),0===e(t,"error")&&b(t,i)}function c(){t.removeListener("finish",p),m()}function p(){o("onfinish"),t.removeListener("close",c),m()}function m(){o("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",d),t.once("close",c),t.once("finish",p),t.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),t},M.prototype.unpipe=function(t){var e=this._readableState,i={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<n;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=C(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,i)),this},M.prototype.on=function(t,e){var r=i.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?k(this):n.reading||ae.nextTick(B,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(t,e){var r=i.prototype.removeListener.call(this,t,e);return"readable"===t&&ae.nextTick(T,this),r},M.prototype.removeAllListeners=function(t){var e=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||ae.nextTick(T,this),e},M.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,ae.nextTick(N,t,e))}(this,t)),t.paused=!1,this},M.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(t){var e=this,i=this._readableState,r=!1;for(var n in t.on("end",(function(){if(o("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(o("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(e.push(n)||(r=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<y.length;s++)t.on(y[s],this.emit.bind(this,y[s]));return this._read=function(e){o("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(M.prototype[Symbol.asyncIterator]=function(){return void 0===a&&(a=Wi()),a(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),M._fromList=x,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(M.from=function(t,e){return void 0===u&&(u=Gi?Ki:(Gi=1,Ki=function(){throw new Error("Readable.from is not available in the browser")})),u(M,t,e)}),Yi}var Qi=or,Ji=_i.codes,$i=Ji.ERR_METHOD_NOT_IMPLEMENTED,tr=Ji.ERR_MULTIPLE_CALLBACK,er=Ji.ERR_TRANSFORM_ALREADY_TRANSFORMING,ir=Ji.ERR_TRANSFORM_WITH_LENGTH_0,rr=Di();function nr(t,e){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new tr);i.writechunk=null,i.writecb=null,null!=e&&this.push(e),r(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function or(t){if(!(this instanceof or))return new or(t);rr.call(this,t),this._transformState={afterTransform:nr.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",sr)}function sr(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?hr(this,null,null):this._flush((function(e,i){hr(t,e,i)}))}function hr(t,e,i){if(e)return t.emit("error",e);if(null!=i&&t.push(i),t._writableState.length)throw new ir;if(t._transformState.transforming)throw new er;return t.push(null)}we(or,rr),or.prototype.push=function(t,e){return this._transformState.needTransform=!1,rr.prototype.push.call(this,t,e)},or.prototype._transform=function(t,e,i){i(new $i("_transform()"))},or.prototype._write=function(t,e,i){var r=this._transformState;if(r.writecb=i,r.writechunk=t,r.writeencoding=e,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},or.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},or.prototype._destroy=function(t,e){rr.prototype._destroy.call(this,t,(function(t){e(t)}))};var ar,ur=lr,fr=Qi;function lr(t){if(!(this instanceof lr))return new lr(t);fr.call(this,t)}we(lr,fr),lr.prototype._transform=function(t,e,i){i(null,t)};var dr=_i.codes,cr=dr.ERR_MISSING_ARGS,pr=dr.ERR_STREAM_DESTROYED;function mr(t){if(t)throw t}function gr(t){t()}function vr(t,e){return t.pipe(e)}var br=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var r,n=function(t){return t.length?"function"!=typeof t[t.length-1]?mr:t.pop():mr}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new cr("streams");var o=e.map((function(t,i){var s=i<e.length-1;return function(t,e,i,r){r=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(r);var n=!1;t.on("close",(function(){n=!0})),void 0===ar&&(ar=Zi),ar(t,{readable:e,writable:i},(function(t){if(t)return r(t);n=!0,r()}));var o=!1;return function(e){if(!n&&!o)return o=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void r(e||new pr("pipe"))}}(t,s,i>0,(function(t){r||(r=t),t&&o.forEach(gr),s||(o.forEach(gr),n(r))}))}));return e.reduce(vr)};!function(t,e){(e=Se.exports=Xi()).Stream=e,e.Readable=e,e.Writable=Li(),e.Duplex=Di(),e.Transform=Qi,e.PassThrough=ur,e.finished=Zi,e.pipeline=br}(0,_e);var yr=ce.Buffer,wr=_e.Transform;function Mr(t){wr.call(this),this._block=yr.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}we(Mr,wr),Mr.prototype._transform=function(t,e,i){var r=null;try{this.update(t,e)}catch(t){r=t}i(r)},Mr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},Mr.prototype.update=function(t,e){if(function(t,e){if(!yr.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");yr.isBuffer(t)||(t=yr.from(t,e));for(var i=this._block,r=0;this._blockOffset+t.length-r>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)i[n++]=t[r++];this._update(),this._blockOffset=0}for(;r<t.length;)i[this._blockOffset++]=t[r++];for(var o=0,s=8*t.length;s>0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},Mr.prototype._update=function(){throw new Error("_update is not implemented")},Mr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return e},Mr.prototype._digest=function(){throw new Error("_digest is not implemented")};var _r=Mr,Sr=we,Er=_r,Ar=ce.Buffer,kr=new Array(16);function Rr(){Er.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function Ir(t,e){return t<<e|t>>>32-e}function Or(t,e,i,r,n,o,s){return Ir(t+(e&i|~e&r)+n+o|0,s)+e|0}function Tr(t,e,i,r,n,o,s){return Ir(t+(e&r|i&~r)+n+o|0,s)+e|0}function Br(t,e,i,r,n,o,s){return Ir(t+(e^i^r)+n+o|0,s)+e|0}function Nr(t,e,i,r,n,o,s){return Ir(t+(i^(e|~r))+n+o|0,s)+e|0}Sr(Rr,Er),Rr.prototype._update=function(){for(var t=kr,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var i=this._a,r=this._b,n=this._c,o=this._d;i=Or(i,r,n,o,t[0],3614090360,7),o=Or(o,i,r,n,t[1],3905402710,12),n=Or(n,o,i,r,t[2],606105819,17),r=Or(r,n,o,i,t[3],3250441966,22),i=Or(i,r,n,o,t[4],4118548399,7),o=Or(o,i,r,n,t[5],1200080426,12),n=Or(n,o,i,r,t[6],2821735955,17),r=Or(r,n,o,i,t[7],4249261313,22),i=Or(i,r,n,o,t[8],1770035416,7),o=Or(o,i,r,n,t[9],2336552879,12),n=Or(n,o,i,r,t[10],4294925233,17),r=Or(r,n,o,i,t[11],2304563134,22),i=Or(i,r,n,o,t[12],1804603682,7),o=Or(o,i,r,n,t[13],4254626195,12),n=Or(n,o,i,r,t[14],2792965006,17),i=Tr(i,r=Or(r,n,o,i,t[15],1236535329,22),n,o,t[1],4129170786,5),o=Tr(o,i,r,n,t[6],3225465664,9),n=Tr(n,o,i,r,t[11],643717713,14),r=Tr(r,n,o,i,t[0],3921069994,20),i=Tr(i,r,n,o,t[5],3593408605,5),o=Tr(o,i,r,n,t[10],38016083,9),n=Tr(n,o,i,r,t[15],3634488961,14),r=Tr(r,n,o,i,t[4],3889429448,20),i=Tr(i,r,n,o,t[9],568446438,5),o=Tr(o,i,r,n,t[14],3275163606,9),n=Tr(n,o,i,r,t[3],4107603335,14),r=Tr(r,n,o,i,t[8],1163531501,20),i=Tr(i,r,n,o,t[13],2850285829,5),o=Tr(o,i,r,n,t[2],4243563512,9),n=Tr(n,o,i,r,t[7],1735328473,14),i=Br(i,r=Tr(r,n,o,i,t[12],2368359562,20),n,o,t[5],4294588738,4),o=Br(o,i,r,n,t[8],2272392833,11),n=Br(n,o,i,r,t[11],1839030562,16),r=Br(r,n,o,i,t[14],4259657740,23),i=Br(i,r,n,o,t[1],2763975236,4),o=Br(o,i,r,n,t[4],1272893353,11),n=Br(n,o,i,r,t[7],4139469664,16),r=Br(r,n,o,i,t[10],3200236656,23),i=Br(i,r,n,o,t[13],681279174,4),o=Br(o,i,r,n,t[0],3936430074,11),n=Br(n,o,i,r,t[3],3572445317,16),r=Br(r,n,o,i,t[6],76029189,23),i=Br(i,r,n,o,t[9],3654602809,4),o=Br(o,i,r,n,t[12],3873151461,11),n=Br(n,o,i,r,t[15],530742520,16),i=Nr(i,r=Br(r,n,o,i,t[2],3299628645,23),n,o,t[0],4096336452,6),o=Nr(o,i,r,n,t[7],1126891415,10),n=Nr(n,o,i,r,t[14],2878612391,15),r=Nr(r,n,o,i,t[5],4237533241,21),i=Nr(i,r,n,o,t[12],1700485571,6),o=Nr(o,i,r,n,t[3],2399980690,10),n=Nr(n,o,i,r,t[10],4293915773,15),r=Nr(r,n,o,i,t[1],2240044497,21),i=Nr(i,r,n,o,t[8],1873313359,6),o=Nr(o,i,r,n,t[15],4264355552,10),n=Nr(n,o,i,r,t[6],2734768916,15),r=Nr(r,n,o,i,t[13],1309151649,21),i=Nr(i,r,n,o,t[4],4149444226,6),o=Nr(o,i,r,n,t[11],3174756917,10),n=Nr(n,o,i,r,t[2],718787259,15),r=Nr(r,n,o,i,t[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+o|0},Rr.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Ar.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};var Pr=Rr,xr=me.Buffer,Lr=we,Dr=_r,Cr=new Array(16),qr=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Ur=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],jr=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],zr=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Fr=[0,1518500249,1859775393,2400959708,2840853838],Hr=[1352829926,1548603684,1836072691,2053994217,0];function Kr(){Dr.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function Gr(t,e){return t<<e|t>>>32-e}function Yr(t,e,i,r,n,o,s,h){return Gr(t+(e^i^r)+o+s|0,h)+n|0}function Vr(t,e,i,r,n,o,s,h){return Gr(t+(e&i|~e&r)+o+s|0,h)+n|0}function Zr(t,e,i,r,n,o,s,h){return Gr(t+((e|~i)^r)+o+s|0,h)+n|0}function Wr(t,e,i,r,n,o,s,h){return Gr(t+(e&r|i&~r)+o+s|0,h)+n|0}function Xr(t,e,i,r,n,o,s,h){return Gr(t+(e^(i|~r))+o+s|0,h)+n|0}Lr(Kr,Dr),Kr.prototype._update=function(){for(var t=Cr,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,s=0|this._e,h=0|this._a,a=0|this._b,u=0|this._c,f=0|this._d,l=0|this._e,d=0;d<80;d+=1){var c,p;d<16?(c=Yr(i,r,n,o,s,t[qr[d]],Fr[0],jr[d]),p=Xr(h,a,u,f,l,t[Ur[d]],Hr[0],zr[d])):d<32?(c=Vr(i,r,n,o,s,t[qr[d]],Fr[1],jr[d]),p=Wr(h,a,u,f,l,t[Ur[d]],Hr[1],zr[d])):d<48?(c=Zr(i,r,n,o,s,t[qr[d]],Fr[2],jr[d]),p=Zr(h,a,u,f,l,t[Ur[d]],Hr[2],zr[d])):d<64?(c=Wr(i,r,n,o,s,t[qr[d]],Fr[3],jr[d]),p=Vr(h,a,u,f,l,t[Ur[d]],Hr[3],zr[d])):(c=Xr(i,r,n,o,s,t[qr[d]],Fr[4],jr[d]),p=Yr(h,a,u,f,l,t[Ur[d]],Hr[4],zr[d])),i=s,s=o,o=Gr(n,10),n=r,r=c,h=l,l=f,f=Gr(u,10),u=a,a=p}var m=this._b+n+f|0;this._b=this._c+o+l|0,this._c=this._d+s+h|0,this._d=this._e+i+a|0,this._e=this._a+r+u|0,this._a=m},Kr.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=xr.alloc?xr.alloc(20):new xr(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};var Qr=Kr,Jr={},$r={get exports(){return Jr},set exports(t){Jr=t}},tn=ce.Buffer;function en(t,e){this._block=tn.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}en.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=tn.from(t,e));for(var i=this._block,r=this._blockSize,n=t.length,o=this._len,s=0;s<n;){for(var h=o%r,a=Math.min(n-s,r-h),u=0;u<a;u++)i[h+u]=t[s+u];s+=a,(o+=a)%r==0&&this._update(i)}return this._len+=n,this},en.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},en.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var rn=en,nn=we,on=rn,sn=ce.Buffer,hn=[1518500249,1859775393,-1894007588,-899497514],an=new Array(80);function un(){this.init(),this._w=an,on.call(this,64,56)}function fn(t){return t<<30|t>>>2}function ln(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}nn(un,on),un.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},un.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0;a<16;++a)i[a]=t.readInt32BE(4*a);for(;a<80;++a)i[a]=i[a-3]^i[a-8]^i[a-14]^i[a-16];for(var u=0;u<80;++u){var f=~~(u/20),l=0|((e=r)<<5|e>>>27)+ln(f,n,o,s)+h+i[u]+hn[f];h=s,s=o,o=fn(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0},un.prototype._hash=function(){var t=sn.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var dn=un,cn=we,pn=rn,mn=ce.Buffer,gn=[1518500249,1859775393,-1894007588,-899497514],vn=new Array(80);function bn(){this.init(),this._w=vn,pn.call(this,64,56)}function yn(t){return t<<5|t>>>27}function wn(t){return t<<30|t>>>2}function Mn(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}cn(bn,pn),bn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},bn.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0;a<16;++a)i[a]=t.readInt32BE(4*a);for(;a<80;++a)i[a]=(e=i[a-3]^i[a-8]^i[a-14]^i[a-16])<<1|e>>>31;for(var u=0;u<80;++u){var f=~~(u/20),l=yn(r)+Mn(f,n,o,s)+h+i[u]+gn[f]|0;h=s,s=o,o=wn(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0},bn.prototype._hash=function(){var t=mn.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var _n=bn,Sn=we,En=rn,An=ce.Buffer,kn=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Rn=new Array(64);function In(){this.init(),this._w=Rn,En.call(this,64,56)}function On(t,e,i){return i^t&(e^i)}function Tn(t,e,i){return t&e|i&(t|e)}function Bn(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function Nn(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Pn(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}Sn(In,En),In.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},In.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0|this._f,u=0|this._g,f=0|this._h,l=0;l<16;++l)i[l]=t.readInt32BE(4*l);for(;l<64;++l)i[l]=0|(((e=i[l-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+i[l-7]+Pn(i[l-15])+i[l-16];for(var d=0;d<64;++d){var c=f+Nn(h)+On(h,a,u)+kn[d]+i[d]|0,p=Bn(r)+Tn(r,n,o)|0;f=u,u=a,a=h,h=s+c|0,s=o,o=n,n=r,r=c+p|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0,this._f=a+this._f|0,this._g=u+this._g|0,this._h=f+this._h|0},In.prototype._hash=function(){var t=An.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var xn=In,Ln=we,Dn=xn,Cn=rn,qn=ce.Buffer,Un=new Array(64);function jn(){this.init(),this._w=Un,Cn.call(this,64,56)}Ln(jn,Dn),jn.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},jn.prototype._hash=function(){var t=qn.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var zn=jn,Fn=we,Hn=rn,Kn=ce.Buffer,Gn=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],Yn=new Array(160);function Vn(){this.init(),this._w=Yn,Hn.call(this,128,112)}function Zn(t,e,i){return i^t&(e^i)}function Wn(t,e,i){return t&e|i&(t|e)}function Xn(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Qn(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function Jn(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function $n(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function to(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function eo(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function io(t,e){return t>>>0<e>>>0?1:0}Fn(Vn,Hn),Vn.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Vn.prototype._update=function(t){for(var e=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,h=0|this._fh,a=0|this._gh,u=0|this._hh,f=0|this._al,l=0|this._bl,d=0|this._cl,c=0|this._dl,p=0|this._el,m=0|this._fl,g=0|this._gl,v=0|this._hl,b=0;b<32;b+=2)e[b]=t.readInt32BE(4*b),e[b+1]=t.readInt32BE(4*b+4);for(;b<160;b+=2){var y=e[b-30],w=e[b-30+1],M=Jn(y,w),_=$n(w,y),S=to(y=e[b-4],w=e[b-4+1]),E=eo(w,y),A=e[b-14],k=e[b-14+1],R=e[b-32],I=e[b-32+1],O=_+k|0,T=M+A+io(O,_)|0;T=(T=T+S+io(O=O+E|0,E)|0)+R+io(O=O+I|0,I)|0,e[b]=T,e[b+1]=O}for(var B=0;B<160;B+=2){T=e[B],O=e[B+1];var N=Wn(i,r,n),P=Wn(f,l,d),x=Xn(i,f),L=Xn(f,i),D=Qn(s,p),C=Qn(p,s),q=Gn[B],U=Gn[B+1],j=Zn(s,h,a),z=Zn(p,m,g),F=v+C|0,H=u+D+io(F,v)|0;H=(H=(H=H+j+io(F=F+z|0,z)|0)+q+io(F=F+U|0,U)|0)+T+io(F=F+O|0,O)|0;var K=L+P|0,G=x+N+io(K,L)|0;u=a,v=g,a=h,g=m,h=s,m=p,s=o+H+io(p=c+F|0,c)|0,o=n,c=d,n=r,d=l,r=i,l=f,i=H+G+io(f=F+K|0,F)|0}this._al=this._al+f|0,this._bl=this._bl+l|0,this._cl=this._cl+d|0,this._dl=this._dl+c|0,this._el=this._el+p|0,this._fl=this._fl+m|0,this._gl=this._gl+g|0,this._hl=this._hl+v|0,this._ah=this._ah+i+io(this._al,f)|0,this._bh=this._bh+r+io(this._bl,l)|0,this._ch=this._ch+n+io(this._cl,d)|0,this._dh=this._dh+o+io(this._dl,c)|0,this._eh=this._eh+s+io(this._el,p)|0,this._fh=this._fh+h+io(this._fl,m)|0,this._gh=this._gh+a+io(this._gl,g)|0,this._hh=this._hh+u+io(this._hl,v)|0},Vn.prototype._hash=function(){var t=Kn.allocUnsafe(64);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var ro=Vn,no=we,oo=ro,so=rn,ho=ce.Buffer,ao=new Array(160);function uo(){this.init(),this._w=ao,so.call(this,128,112)}no(uo,oo),uo.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},uo.prototype._hash=function(){var t=ho.allocUnsafe(48);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var fo=uo,lo=$r.exports=function(t){t=t.toLowerCase();var e=lo[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};function co(){this.head=null,this.tail=null,this.length=0}lo.sha=dn,lo.sha1=_n,lo.sha224=zn,lo.sha256=xn,lo.sha384=fo,lo.sha512=ro,co.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},co.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},co.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},co.prototype.clear=function(){this.head=this.tail=null,this.length=0},co.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i},co.prototype.concat=function(t){if(0===this.length)return T.alloc(0);if(1===this.length)return this.head.data;for(var e=T.allocUnsafe(t>>>0),i=this.head,r=0;i;)i.data.copy(e,r),r+=i.data.length,i=i.next;return e};var po=T.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function mo(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!po(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=vo;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=bo;break;default:return void(this.write=go)}this.charBuffer=new T(6),this.charReceived=0,this.charLength=0}function go(t){return t.toString(this.encoding)}function vo(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function bo(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}mo.prototype.write=function(t){for(var e="";this.charLength;){var i=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";if(t=t.slice(i,t.length),!((n=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var r=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived);var n;r=(e+=t.toString(this.encoding,0,r)).length-1;if((n=e.charCodeAt(r))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,r)}return e},mo.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var i=t[t.length-e];if(1==e&&i>>5==6){this.charLength=2;break}if(e<=2&&i>>4==14){this.charLength=3;break}if(e<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=e},mo.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var i=this.charReceived,r=this.charBuffer,n=this.encoding;e+=r.slice(0,i).toString(n)}return e};var yo=Object.freeze({__proto__:null,StringDecoder:mo});_o.ReadableState=Mo;var wo=Ue("stream");function Mo(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof Xo&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new co,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new mo(t.encoding),this.encoding=t.encoding)}function _o(t){if(!(this instanceof _o))return new _o(t);this._readableState=new Mo(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),Ae.call(this)}function So(t,e,i,r,n){var o=function(t,e){var i=null;T.isBuffer(e)||"string"==typeof e||null==e||t.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));return i}(e,i);if(o)t.emit("error",o);else if(null===i)e.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,ko(t)}(t,e);else if(e.objectMode||i&&i.length>0)if(e.ended&&!n){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&n){var h=new Error("stream.unshift() after end event");t.emit("error",h)}else{var a;!e.decoder||n||r||(i=e.decoder.write(i),a=!e.objectMode&&0===i.length),n||(e.reading=!1),a||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",i),t.read(0)):(e.length+=e.objectMode?1:i.length,n?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&ko(t))),function(t,e){e.readingMore||(e.readingMore=!0,Wt(Io,t,e))}(t,e)}else n||(e.reading=!1);return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(e)}Pe(_o,Ae),_o.prototype.push=function(t,e){var i=this._readableState;return i.objectMode||"string"!=typeof t||(e=e||i.defaultEncoding)!==i.encoding&&(t=T.from(t,e),e=""),So(this,i,t,e,!1)},_o.prototype.unshift=function(t){return So(this,this._readableState,t,"",!0)},_o.prototype.isPaused=function(){return!1===this._readableState.flowing},_o.prototype.setEncoding=function(t){return this._readableState.decoder=new mo(t),this._readableState.encoding=t,this};var Eo=8388608;function Ao(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=Eo?t=Eo:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function ko(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(wo("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Wt(Ro,t):Ro(t))}function Ro(t){wo("emit readable"),t.emit("readable"),Bo(t)}function Io(t,e){for(var i=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(wo("maybeReadMore read 0"),t.read(0),i!==e.length);)i=e.length;e.readingMore=!1}function Oo(t){wo("readable nexttick read 0"),t.read(0)}function To(t,e){e.reading||(wo("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Bo(t),e.flowing&&!e.reading&&t.read(0)}function Bo(t){var e=t._readableState;for(wo("flow",e.flowing);e.flowing&&null!==t.read(););}function No(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):i=function(t,e,i){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():i?function(t,e){var i=e.head,r=1,n=i.data;t-=n.length;for(;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(s===o.length?n+=o:n+=o.slice(0,t),0===(t-=s)){s===o.length?(++r,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(s));break}++r}return e.length-=r,n}(t,e):function(t,e){var i=T.allocUnsafe(t),r=e.head,n=1;r.data.copy(i),t-=r.data.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(i,i.length-t,0,s),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e);return r}(t,e.buffer,e.decoder),i);var i}function Po(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Wt(xo,e,t))}function xo(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Lo(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}function Do(){}function Co(t,e,i){this.chunk=t,this.encoding=e,this.callback=i,this.next=null}function qo(t,e){Object.defineProperty(this,"buffer",{get:De((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof Xo&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=!1===t.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,r=i.sync,n=i.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,r,n){--e.pendingcb,i?Wt(n,r):n(r);t._writableState.errorEmitted=!0,t.emit("error",r)}(t,i,r,e,n);else{var o=Ho(i);o||i.corked||i.bufferProcessing||!i.bufferedRequest||Fo(t,i),r?Wt(zo,t,i,o,n):zo(t,i,o,n)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Yo(this)}function Uo(t){if(!(this instanceof Uo||this instanceof Xo))return new Uo(t);this._writableState=new qo(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),Ae.call(this)}function jo(t,e,i,r,n,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,i?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function zo(t,e,i,r){i||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),Go(t,e)}function Fo(t,e){e.bufferProcessing=!0;var i=e.bufferedRequest;if(t._writev&&i&&i.next){var r=e.bufferedRequestCount,n=new Array(r),o=e.corkedRequestsFree;o.entry=i;for(var s=0;i;)n[s]=i,i=i.next,s+=1;jo(t,e,!0,e.length,n,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new Yo(e)}else{for(;i;){var h=i.chunk,a=i.encoding,u=i.callback;if(jo(t,e,!1,e.objectMode?1:h.length,h,a,u),i=i.next,e.writing)break}null===i&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=i,e.bufferProcessing=!1}function Ho(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function Ko(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function Go(t,e){var i=Ho(e);return i&&(0===e.pendingcb?(Ko(t,e),e.finished=!0,t.emit("finish")):Ko(t,e)),i}function Yo(t){var e=this;this.next=null,this.entry=null,this.finish=function(i){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(i),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}_o.prototype.read=function(t){wo("read",t),t=parseInt(t,10);var e=this._readableState,i=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return wo("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?Po(this):ko(this),null;if(0===(t=Ao(t,e))&&e.ended)return 0===e.length&&Po(this),null;var r,n=e.needReadable;return wo("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&wo("length less than watermark",n=!0),e.ended||e.reading?wo("reading or ended",n=!1):n&&(wo("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Ao(i,e))),null===(r=t>0?No(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&Po(this)),null!==r&&this.emit("data",r),r},_o.prototype._read=function(t){this.emit("error",new Error("not implemented"))},_o.prototype.pipe=function(t,e){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,wo("pipe count=%d opts=%j",r.pipesCount,e);var n=!e||!1!==e.end?s:u;function o(t){wo("onunpipe"),t===i&&u()}function s(){wo("onend"),t.end()}r.endEmitted?Wt(n):i.once("end",n),t.on("unpipe",o);var h=function(t){return function(){var e=t._readableState;wo("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,Bo(t))}}(i);t.on("drain",h);var a=!1;function u(){wo("cleanup"),t.removeListener("close",c),t.removeListener("finish",p),t.removeListener("drain",h),t.removeListener("error",d),t.removeListener("unpipe",o),i.removeListener("end",s),i.removeListener("end",u),i.removeListener("data",l),a=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||h()}var f=!1;function l(e){wo("ondata"),f=!1,!1!==t.write(e)||f||((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==Lo(r.pipes,t))&&!a&&(wo("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,f=!0),i.pause())}function d(e){var i;wo("onerror",e),m(),t.removeListener("error",d),0===(i="error",t.listeners(i).length)&&t.emit("error",e)}function c(){t.removeListener("finish",p),m()}function p(){wo("onfinish"),t.removeListener("close",c),m()}function m(){wo("unpipe"),i.unpipe(t)}return i.on("data",l),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",d),t.once("close",c),t.once("finish",p),t.emit("pipe",i),r.flowing||(wo("pipe resume"),i.resume()),t},_o.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this)),this;if(!t){var i=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n<r;n++)i[n].emit("unpipe",this);return this}var o=Lo(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this)),this},_o.prototype.on=function(t,e){var i=Ae.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&ko(this):Wt(Oo,this))}return i},_o.prototype.addListener=_o.prototype.on,_o.prototype.resume=function(){var t=this._readableState;return t.flowing||(wo("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Wt(To,t,e))}(this,t)),this},_o.prototype.pause=function(){return wo("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(wo("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_o.prototype.wrap=function(t){var e=this._readableState,i=!1,r=this;for(var n in t.on("end",(function(){if(wo("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)})),t.on("data",(function(n){(wo("wrapped data"),e.decoder&&(n=e.decoder.write(n)),e.objectMode&&null==n)||(e.objectMode||n&&n.length)&&(r.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));return function(t,e){for(var i=0,r=t.length;i<r;i++)e(t[i],i)}(["error","close","destroy","pause","resume"],(function(e){t.on(e,r.emit.bind(r,e))})),r._read=function(e){wo("wrapped _read",e),i&&(i=!1,t.resume())},r},_o._fromList=No,Uo.WritableState=qo,Pe(Uo,Ae),qo.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},Uo.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Uo.prototype.write=function(t,e,i){var r=this._writableState,n=!1;return"function"==typeof e&&(i=e,e=null),T.isBuffer(t)?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof i&&(i=Do),r.ended?function(t,e){var i=new Error("write after end");t.emit("error",i),Wt(e,i)}(this,i):function(t,e,i,r){var n=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):T.isBuffer(i)||"string"==typeof i||void 0===i||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),Wt(r,o),n=!1),n}(this,r,t,i)&&(r.pendingcb++,n=function(t,e,i,r,n){i=function(t,e,i){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=T.from(e,i));return e}(e,i,r),T.isBuffer(i)&&(r="buffer");var o=e.objectMode?1:i.length;e.length+=o;var s=e.length<e.highWaterMark;s||(e.needDrain=!0);if(e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest=new Co(i,r,n),h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else jo(t,e,!1,o,i,r,n);return s}(this,r,t,e,i)),n},Uo.prototype.cork=function(){this._writableState.corked++},Uo.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||Fo(this,t))},Uo.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Uo.prototype._write=function(t,e,i){i(new Error("not implemented"))},Uo.prototype._writev=null,Uo.prototype.end=function(t,e,i){var r=this._writableState;"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,i){e.ending=!0,Go(t,e),i&&(e.finished?Wt(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,r,i)},Pe(Xo,_o);for(var Vo=Object.keys(Uo.prototype),Zo=0;Zo<Vo.length;Zo++){var Wo=Vo[Zo];Xo.prototype[Wo]||(Xo.prototype[Wo]=Uo.prototype[Wo])}function Xo(t){if(!(this instanceof Xo))return new Xo(t);_o.call(this,t),Uo.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Qo)}function Qo(){this.allowHalfOpen||this._writableState.ended||Wt(Jo,this)}function Jo(t){t.end()}function $o(t){this.afterTransform=function(e,i){return function(t,e,i){var r=t._transformState;r.transforming=!1;var n=r.writecb;if(!n)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=i&&t.push(i);n(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}(t,e,i)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function ts(t){if(!(this instanceof ts))return new ts(t);Xo.call(this,t),this._transformState=new $o(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(t){es(e,t)})):es(e)}))}function es(t,e){if(e)return t.emit("error",e);var i=t._writableState,r=t._transformState;if(i.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}function is(t){if(!(this instanceof is))return new is(t);ts.call(this,t)}function rs(){Ae.call(this)}Pe(ts,Xo),ts.prototype.push=function(t,e){return this._transformState.needTransform=!1,Xo.prototype.push.call(this,t,e)},ts.prototype._transform=function(t,e,i){throw new Error("Not implemented")},ts.prototype._write=function(t,e,i){var r=this._transformState;if(r.writecb=i,r.writechunk=t,r.writeencoding=e,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},ts.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},Pe(is,ts),is.prototype._transform=function(t,e,i){i(null,t)},Pe(rs,Ae),rs.Readable=_o,rs.Writable=Uo,rs.Duplex=Xo,rs.Transform=ts,rs.PassThrough=is,rs.Stream=rs,rs.prototype.pipe=function(t,e){var i=this;function r(e){t.writable&&!1===t.write(e)&&i.pause&&i.pause()}function n(){i.readable&&i.resume&&i.resume()}i.on("data",r),t.on("drain",n),t._isStdio||e&&!1===e.end||(i.on("end",s),i.on("close",h));var o=!1;function s(){o||(o=!0,t.end())}function h(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===Ae.listenerCount(this,"error"))throw t}function u(){i.removeListener("data",r),t.removeListener("drain",n),i.removeListener("end",s),i.removeListener("close",h),i.removeListener("error",a),t.removeListener("error",a),i.removeListener("end",u),i.removeListener("close",u),t.removeListener("close",u)}return i.on("error",a),t.on("error",a),i.on("end",u),i.on("close",u),t.on("close",u),t.emit("pipe",i),t};var ns=vt(Object.freeze({__proto__:null,Duplex:Xo,PassThrough:is,Readable:_o,Stream:rs,Transform:ts,Writable:Uo,default:rs})),os=vt(yo),ss=ce.Buffer,hs=ns.Transform,as=os.StringDecoder;function us(t){hs.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}we(us,hs),us.prototype.update=function(t,e,i){"string"==typeof t&&(t=ss.from(t,e));var r=this._update(t);return this.hashMode?this:(i&&(r=this._toString(r,i)),r)},us.prototype.setAutoPadding=function(){},us.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},us.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},us.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},us.prototype._transform=function(t,e,i){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{i(r)}},us.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},us.prototype._finalOrDigest=function(t){var e=this.__final()||ss.alloc(0);return t&&(e=this._toString(e,t,!0)),e},us.prototype._toString=function(t,e,i){if(this._decoder||(this._decoder=new as(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return i&&(r+=this._decoder.end()),r};var fs=us,ls=Pr,ds=Qr,cs=Jr,ps=fs;function ms(t){ps.call(this,"digest"),this._hash=t}we(ms,ps),ms.prototype._update=function(t){this._hash.update(t)},ms.prototype._final=function(){return this._hash.digest()};var gs=function(t){return"md5"===(t=t.toLowerCase())?new ls:"rmd160"===t||"ripemd160"===t?new ds:new ms(cs(t))},vs=we,bs=ce.Buffer,ys=fs,ws=bs.alloc(128),Ms=64;function _s(t,e){ys.call(this,"digest"),"string"==typeof e&&(e=bs.from(e)),this._alg=t,this._key=e,e.length>Ms?e=t(e):e.length<Ms&&(e=bs.concat([e,ws],Ms));for(var i=this._ipad=bs.allocUnsafe(Ms),r=this._opad=bs.allocUnsafe(Ms),n=0;n<Ms;n++)i[n]=54^e[n],r[n]=92^e[n];this._hash=[i]}vs(_s,ys),_s.prototype._update=function(t){this._hash.push(t)},_s.prototype._final=function(){var t=this._alg(bs.concat(this._hash));return this._alg(bs.concat([this._opad,t]))};var Ss=Pr,Es=function(t){return(new Ss).update(t).digest()},As=we,ks=_s,Rs=fs,Is=ce.Buffer,Os=Es,Ts=Qr,Bs=Jr,Ns=Is.alloc(128);function Ps(t,e){Rs.call(this,"digest"),"string"==typeof e&&(e=Is.from(e));var i="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>i)?e=("rmd160"===t?new Ts:Bs(t)).update(e).digest():e.length<i&&(e=Is.concat([e,Ns],i));for(var r=this._ipad=Is.allocUnsafe(i),n=this._opad=Is.allocUnsafe(i),o=0;o<i;o++)r[o]=54^e[o],n[o]=92^e[o];this._hash="rmd160"===t?new Ts:Bs(t),this._hash.update(r)}As(Ps,Rs),Ps.prototype._update=function(t){this._hash.update(t)},Ps.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new Ts:Bs(this._alg)).update(this._opad).update(t).digest()};var xs=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new Ps("rmd160",e):"md5"===t?new ks(Os,e):new Ps(t,e)},Ls={},Ds={get exports(){return Ls},set exports(t){Ls=t}};var Cs={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};Ds.exports=Cs;var qs,Us={},js=Math.pow(2,30)-1,zs=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>js||e!=e)throw new TypeError("Bad key length")};if(gt.process&>.process.browser)qs="utf-8";else if(gt.process&>.process.version){qs=parseInt(ae.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else qs="utf-8";var Fs=qs,Hs=ce.Buffer,Ks=function(t,e,i){if(Hs.isBuffer(t))return t;if("string"==typeof t)return Hs.from(t,e);if(ArrayBuffer.isView(t))return Hs.from(t.buffer);throw new TypeError(i+" must be a string, a Buffer, a typed array or a DataView")},Gs=Es,Ys=Qr,Vs=Jr,Zs=ce.Buffer,Ws=zs,Xs=Fs,Qs=Ks,Js=Zs.alloc(128),$s={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function th(t,e,i){var r=function(t){function e(e){return Vs(t).update(e).digest()}function i(t){return(new Ys).update(t).digest()}return"rmd160"===t||"ripemd160"===t?i:"md5"===t?Gs:e}(t),n="sha512"===t||"sha384"===t?128:64;e.length>n?e=r(e):e.length<n&&(e=Zs.concat([e,Js],n));for(var o=Zs.allocUnsafe(n+$s[t]),s=Zs.allocUnsafe(n+$s[t]),h=0;h<n;h++)o[h]=54^e[h],s[h]=92^e[h];var a=Zs.allocUnsafe(n+i+4);o.copy(a,0,0,n),this.ipad1=a,this.ipad2=o,this.opad=s,this.alg=t,this.blocksize=n,this.hash=r,this.size=$s[t]}th.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)};var eh,ih,rh=function(t,e,i,r,n){Ws(i,r);var o=new th(n=n||"sha1",t=Qs(t,Xs,"Password"),(e=Qs(e,Xs,"Salt")).length),s=Zs.allocUnsafe(r),h=Zs.allocUnsafe(e.length+4);e.copy(h,0,0,e.length);for(var a=0,u=$s[n],f=Math.ceil(r/u),l=1;l<=f;l++){h.writeUInt32BE(l,e.length);for(var d=o.run(h,o.ipad1),c=d,p=1;p<i;p++){c=o.run(c,o.ipad2);for(var m=0;m<u;m++)d[m]^=c[m]}d.copy(s,a),a+=u}return s},nh=ce.Buffer,oh=zs,sh=Fs,hh=rh,ah=Ks,uh=gt.crypto&>.crypto.subtle,fh={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},lh=[];function dh(){return ih||(ih=gt.process&>.process.nextTick?gt.process.nextTick:gt.queueMicrotask?gt.queueMicrotask:gt.setImmediate?gt.setImmediate:gt.setTimeout)}function ch(t,e,i,r,n){return uh.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return uh.deriveBits({name:"PBKDF2",salt:e,iterations:i,hash:{name:n}},t,r<<3)})).then((function(t){return nh.from(t)}))}Us.pbkdf2=function(t,e,i,r,n,o){"function"==typeof n&&(o=n,n=void 0);var s=fh[(n=n||"sha1").toLowerCase()];if(s&&"function"==typeof gt.Promise){if(oh(i,r),t=ah(t,sh,"Password"),e=ah(e,sh,"Salt"),"function"!=typeof o)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){dh()((function(){e(null,t)}))}),(function(t){dh()((function(){e(t)}))}))}(function(t){if(gt.process&&!gt.process.browser)return Promise.resolve(!1);if(!uh||!uh.importKey||!uh.deriveBits)return Promise.resolve(!1);if(void 0!==lh[t])return lh[t];var e=ch(eh=eh||nh.alloc(8),eh,10,128,t).then((function(){return!0})).catch((function(){return!1}));return lh[t]=e,e}(s).then((function(o){return o?ch(t,e,i,r,s):hh(t,e,i,r,n)})),o)}else dh()((function(){var s;try{s=hh(t,e,i,r,n)}catch(t){return o(t)}o(null,s)}))},Us.pbkdf2Sync=rh;var ph={},mh={},gh={readUInt32BE:function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},writeUInt32BE:function(t,e,i){t[0+i]=e>>>24,t[1+i]=e>>>16&255,t[2+i]=e>>>8&255,t[3+i]=255&e},ip:function(t,e,i,r){for(var n=0,o=0,s=6;s>=0;s-=2){for(var h=0;h<=24;h+=8)n<<=1,n|=e>>>h+s&1;for(h=0;h<=24;h+=8)n<<=1,n|=t>>>h+s&1}for(s=6;s>=0;s-=2){for(h=1;h<=25;h+=8)o<<=1,o|=e>>>h+s&1;for(h=1;h<=25;h+=8)o<<=1,o|=t>>>h+s&1}i[r+0]=n>>>0,i[r+1]=o>>>0},rip:function(t,e,i,r){for(var n=0,o=0,s=0;s<4;s++)for(var h=24;h>=0;h-=8)n<<=1,n|=e>>>h+s&1,n<<=1,n|=t>>>h+s&1;for(s=4;s<8;s++)for(h=24;h>=0;h-=8)o<<=1,o|=e>>>h+s&1,o<<=1,o|=t>>>h+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},pc1:function(t,e,i,r){for(var n=0,o=0,s=7;s>=5;s--){for(var h=0;h<=24;h+=8)n<<=1,n|=e>>h+s&1;for(h=0;h<=24;h+=8)n<<=1,n|=t>>h+s&1}for(h=0;h<=24;h+=8)n<<=1,n|=e>>h+s&1;for(s=1;s<=3;s++){for(h=0;h<=24;h+=8)o<<=1,o|=e>>h+s&1;for(h=0;h<=24;h+=8)o<<=1,o|=t>>h+s&1}for(h=0;h<=24;h+=8)o<<=1,o|=t>>h+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},r28shl:function(t,e){return t<<e&268435455|t>>>28-e}},vh=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];gh.pc2=function(t,e,i,r){for(var n=0,o=0,s=vh.length>>>1,h=0;h<s;h++)n<<=1,n|=t>>>vh[h]&1;for(h=s;h<vh.length;h++)o<<=1,o|=e>>>vh[h]&1;i[r+0]=n>>>0,i[r+1]=o>>>0},gh.expand=function(t,e,i){var r=0,n=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[i+0]=r>>>0,e[i+1]=n>>>0};var bh=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];gh.substitute=function(t,e){for(var i=0,r=0;r<4;r++){i<<=4,i|=bh[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){i<<=4,i|=bh[256+64*r+(e>>>18-6*r&63)]}return i>>>0};var yh=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];gh.permute=function(t){for(var e=0,i=0;i<yh.length;i++)e<<=1,e|=t>>>yh[i]&1;return e>>>0},gh.padSplit=function(t,e,i){for(var r=t.toString(2);r.length<e;)r="0"+r;for(var n=[],o=0;o<e;o+=i)n.push(r.slice(o,o+i));return n.join(" ")};var wh=Mh;function Mh(t,e){if(!t)throw new Error(e||"Assertion failed")}Mh.equal=function(t,e,i){if(t!=e)throw new Error(i||"Assertion failed: "+t+" != "+e)};var _h=wh;function Sh(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}var Eh=Sh;Sh.prototype._init=function(){},Sh.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},Sh.prototype._buffer=function(t,e){for(var i=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r<i;r++)this.buffer[this.bufferOff+r]=t[e+r];return this.bufferOff+=i,i},Sh.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},Sh.prototype._updateEncrypt=function(t){var e=0,i=0,r=(this.bufferOff+t.length)/this.blockSize|0,n=new Array(r*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(n,i)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,n,i),i+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return n},Sh.prototype._updateDecrypt=function(t){for(var e=0,i=0,r=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,n=new Array(r*this.blockSize);r>0;r--)e+=this._buffer(t,e),i+=this._flushBuffer(n,i);return e+=this._buffer(t,e),n},Sh.prototype.final=function(t){var e,i;return t&&(e=this.update(t)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(i):i},Sh.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},Sh.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},Sh.prototype._unpad=function(t){return t},Sh.prototype._finalDecrypt=function(){_h.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)};var Ah=wh,kh=gh,Rh=Eh;function Ih(){this.tmp=new Array(2),this.keys=null}function Oh(t){Rh.call(this,t);var e=new Ih;this._desState=e,this.deriveKeys(e,t.key)}we(Oh,Rh);var Th=Oh;Oh.create=function(t){return new Oh(t)};var Bh=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Oh.prototype.deriveKeys=function(t,e){t.keys=new Array(32),Ah.equal(e.length,this.blockSize,"Invalid key length");var i=kh.readUInt32BE(e,0),r=kh.readUInt32BE(e,4);kh.pc1(i,r,t.tmp,0),i=t.tmp[0],r=t.tmp[1];for(var n=0;n<t.keys.length;n+=2){var o=Bh[n>>>1];i=kh.r28shl(i,o),r=kh.r28shl(r,o),kh.pc2(i,r,t.keys,n)}},Oh.prototype._update=function(t,e,i,r){var n=this._desState,o=kh.readUInt32BE(t,e),s=kh.readUInt32BE(t,e+4);kh.ip(o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,s,n.tmp,0):this._decrypt(n,o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],kh.writeUInt32BE(i,o,r),kh.writeUInt32BE(i,s,r+4)},Oh.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var i=t.length-e,r=e;r<t.length;r++)t[r]=i;return!0},Oh.prototype._unpad=function(t){if(!1===this.padding)return t;for(var e=t[t.length-1],i=t.length-e;i<t.length;i++)Ah.equal(t[i],e);return t.slice(0,t.length-e)},Oh.prototype._encrypt=function(t,e,i,r,n){for(var o=e,s=i,h=0;h<t.keys.length;h+=2){var a=t.keys[h],u=t.keys[h+1];kh.expand(s,t.tmp,0),a^=t.tmp[0],u^=t.tmp[1];var f=kh.substitute(a,u),l=s;s=(o^kh.permute(f))>>>0,o=l}kh.rip(s,o,r,n)},Oh.prototype._decrypt=function(t,e,i,r,n){for(var o=i,s=e,h=t.keys.length-2;h>=0;h-=2){var a=t.keys[h],u=t.keys[h+1];kh.expand(o,t.tmp,0),a^=t.tmp[0],u^=t.tmp[1];var f=kh.substitute(a,u),l=o;o=(s^kh.permute(f))>>>0,s=l}kh.rip(o,s,r,n)};var Nh={},Ph=wh,xh=we,Lh={};function Dh(t){Ph.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}Nh.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}xh(e,t);for(var i=Object.keys(Lh),r=0;r<i.length;r++){var n=i[r];e.prototype[n]=Lh[n]}return e.create=function(t){return new e(t)},e},Lh._cbcInit=function(){var t=new Dh(this.options.iv);this._cbcState=t},Lh._update=function(t,e,i,r){var n=this._cbcState,o=this.constructor.super_.prototype,s=n.iv;if("encrypt"===this.type){for(var h=0;h<this.blockSize;h++)s[h]^=t[e+h];o._update.call(this,s,0,i,r);for(h=0;h<this.blockSize;h++)s[h]=i[r+h]}else{o._update.call(this,t,e,i,r);for(h=0;h<this.blockSize;h++)i[r+h]^=s[h];for(h=0;h<this.blockSize;h++)s[h]=t[e+h]}};var Ch=wh,qh=Eh,Uh=Th;function jh(t,e){Ch.equal(e.length,24,"Invalid key length");var i=e.slice(0,8),r=e.slice(8,16),n=e.slice(16,24);this.ciphers="encrypt"===t?[Uh.create({type:"encrypt",key:i}),Uh.create({type:"decrypt",key:r}),Uh.create({type:"encrypt",key:n})]:[Uh.create({type:"decrypt",key:n}),Uh.create({type:"encrypt",key:r}),Uh.create({type:"decrypt",key:i})]}function zh(t){qh.call(this,t);var e=new jh(this.type,this.options.key);this._edeState=e}we(zh,qh);var Fh=zh;zh.create=function(t){return new zh(t)},zh.prototype._update=function(t,e,i,r){var n=this._edeState;n.ciphers[0]._update(t,e,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r)},zh.prototype._pad=Uh.prototype._pad,zh.prototype._unpad=Uh.prototype._unpad,mh.utils=gh,mh.Cipher=Eh,mh.DES=Th,mh.CBC=Nh,mh.EDE=Fh;var Hh=fs,Kh=mh,Gh=we,Yh=ce.Buffer,Vh={"des-ede3-cbc":Kh.CBC.instantiate(Kh.EDE),"des-ede3":Kh.EDE,"des-ede-cbc":Kh.CBC.instantiate(Kh.EDE),"des-ede":Kh.EDE,"des-cbc":Kh.CBC.instantiate(Kh.DES),"des-ecb":Kh.DES};Vh.des=Vh["des-cbc"],Vh.des3=Vh["des-ede3-cbc"];var Zh=Wh;function Wh(t){Hh.call(this);var e,i=t.mode.toLowerCase(),r=Vh[i];e=t.decrypt?"decrypt":"encrypt";var n=t.key;Yh.isBuffer(n)||(n=Yh.from(n)),"des-ede"!==i&&"des-ede-cbc"!==i||(n=Yh.concat([n,n.slice(0,8)]));var o=t.iv;Yh.isBuffer(o)||(o=Yh.from(o)),this._des=r.create({key:n,iv:o,type:e})}Gh(Wh,Hh),Wh.prototype._update=function(t){return Yh.from(this._des.update(t))},Wh.prototype._final=function(){return Yh.from(this._des.final())};var Xh={},Qh={},Jh={encrypt:function(t,e){return t._cipher.encryptBlock(e)},decrypt:function(t,e){return t._cipher.decryptBlock(e)}},$h={},ta=function(t,e){for(var i=Math.min(t.length,e.length),r=new T(i),n=0;n<i;++n)r[n]=t[n]^e[n];return r},ea=ta;$h.encrypt=function(t,e){var i=ea(e,t._prev);return t._prev=t._cipher.encryptBlock(i),t._prev},$h.decrypt=function(t,e){var i=t._prev;t._prev=e;var r=t._cipher.decryptBlock(e);return ea(r,i)};var ia={},ra=ce.Buffer,na=ta;function oa(t,e,i){var r=e.length,n=na(e,t._cache);return t._cache=t._cache.slice(r),t._prev=ra.concat([t._prev,i?e:n]),n}ia.encrypt=function(t,e,i){for(var r,n=ra.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=ra.allocUnsafe(0)),!(t._cache.length<=e.length)){n=ra.concat([n,oa(t,e,i)]);break}r=t._cache.length,n=ra.concat([n,oa(t,e.slice(0,r),i)]),e=e.slice(r)}return n};var sa={},ha=ce.Buffer;function aa(t,e,i){var r=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=ha.concat([t._prev.slice(1),ha.from([i?e:r])]),r}sa.encrypt=function(t,e,i){for(var r=e.length,n=ha.allocUnsafe(r),o=-1;++o<r;)n[o]=aa(t,e[o],i);return n};var ua={},fa=ce.Buffer;function la(t,e,i){for(var r,n,o=-1,s=0;++o<8;)r=e&1<<7-o?128:0,s+=(128&(n=t._cipher.encryptBlock(t._prev)[0]^r))>>o%8,t._prev=da(t._prev,i?r:n);return s}function da(t,e){var i=t.length,r=-1,n=fa.allocUnsafe(t.length);for(t=fa.concat([t,fa.from([e])]);++r<i;)n[r]=t[r]<<1|t[r+1]>>7;return n}ua.encrypt=function(t,e,i){for(var r=e.length,n=fa.allocUnsafe(r),o=-1;++o<r;)n[o]=la(t,e[o],i);return n};var ca={},pa=ta;function ma(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}ca.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=T.concat([t._cache,ma(t)]);var i=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),pa(e,i)};var ga={};var va=function(t){for(var e,i=t.length;i--;){if(255!==(e=t.readUInt8(i))){e++,t.writeUInt8(e,i);break}t.writeUInt8(0,i)}},ba=ta,ya=ce.Buffer,wa=va;function Ma(t){var e=t._cipher.encryptBlockRaw(t._prev);return wa(t._prev),e}ga.encrypt=function(t,e){var i=Math.ceil(e.length/16),r=t._cache.length;t._cache=ya.concat([t._cache,ya.allocUnsafe(16*i)]);for(var n=0;n<i;n++){var o=Ma(t),s=r+16*n;t._cache.writeUInt32BE(o[0],s+0),t._cache.writeUInt32BE(o[1],s+4),t._cache.writeUInt32BE(o[2],s+8),t._cache.writeUInt32BE(o[3],s+12)}var h=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),ba(e,h)};var _a={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},Sa={ECB:Jh,CBC:$h,CFB:ia,CFB8:sa,CFB1:ua,OFB:ca,CTR:ga,GCM:ga},Ea=_a;for(var Aa in Ea)Ea[Aa].module=Sa[Ea[Aa].mode];var ka=Ea,Ra={},Ia=ce.Buffer;function Oa(t){Ia.isBuffer(t)||(t=Ia.from(t));for(var e=t.length/4|0,i=new Array(e),r=0;r<e;r++)i[r]=t.readUInt32BE(4*r);return i}function Ta(t){for(;0<t.length;t++)t[0]=0}function Ba(t,e,i,r,n){for(var o,s,h,a,u=i[0],f=i[1],l=i[2],d=i[3],c=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],g=t[3]^e[3],v=4,b=1;b<n;b++)o=u[c>>>24]^f[p>>>16&255]^l[m>>>8&255]^d[255&g]^e[v++],s=u[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^d[255&c]^e[v++],h=u[m>>>24]^f[g>>>16&255]^l[c>>>8&255]^d[255&p]^e[v++],a=u[g>>>24]^f[c>>>16&255]^l[p>>>8&255]^d[255&m]^e[v++],c=o,p=s,m=h,g=a;return o=(r[c>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^e[v++],s=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&c])^e[v++],h=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[c>>>8&255]<<8|r[255&p])^e[v++],a=(r[g>>>24]<<24|r[c>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[v++],[o>>>=0,s>>>=0,h>>>=0,a>>>=0]}var Na=[0,1,2,4,8,16,32,64,128,27,54],Pa=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var i=[],r=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,h=0,a=0;a<256;++a){var u=h^h<<1^h<<2^h<<3^h<<4;u=u>>>8^255&u^99,i[s]=u,r[u]=s;var f=t[s],l=t[f],d=t[l],c=257*t[u]^16843008*u;n[0][s]=c<<24|c>>>8,n[1][s]=c<<16|c>>>16,n[2][s]=c<<8|c>>>24,n[3][s]=c,c=16843009*d^65537*l^257*f^16843008*s,o[0][u]=c<<24|c>>>8,o[1][u]=c<<16|c>>>16,o[2][u]=c<<8|c>>>24,o[3][u]=c,0===s?s=h=1:(s=f^t[t[t[d^f]]],h^=t[t[h]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:o}}();function xa(t){this._key=Oa(t),this._reset()}xa.blockSize=16,xa.keySize=32,xa.prototype.blockSize=xa.blockSize,xa.prototype.keySize=xa.keySize,xa.prototype._reset=function(){for(var t=this._key,e=t.length,i=e+6,r=4*(i+1),n=[],o=0;o<e;o++)n[o]=t[o];for(o=e;o<r;o++){var s=n[o-1];o%e==0?(s=s<<8|s>>>24,s=Pa.SBOX[s>>>24]<<24|Pa.SBOX[s>>>16&255]<<16|Pa.SBOX[s>>>8&255]<<8|Pa.SBOX[255&s],s^=Na[o/e|0]<<24):e>6&&o%e==4&&(s=Pa.SBOX[s>>>24]<<24|Pa.SBOX[s>>>16&255]<<16|Pa.SBOX[s>>>8&255]<<8|Pa.SBOX[255&s]),n[o]=n[o-e]^s}for(var h=[],a=0;a<r;a++){var u=r-a,f=n[u-(a%4?0:4)];h[a]=a<4||u<=4?f:Pa.INV_SUB_MIX[0][Pa.SBOX[f>>>24]]^Pa.INV_SUB_MIX[1][Pa.SBOX[f>>>16&255]]^Pa.INV_SUB_MIX[2][Pa.SBOX[f>>>8&255]]^Pa.INV_SUB_MIX[3][Pa.SBOX[255&f]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=h},xa.prototype.encryptBlockRaw=function(t){return Ba(t=Oa(t),this._keySchedule,Pa.SUB_MIX,Pa.SBOX,this._nRounds)},xa.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),i=Ia.allocUnsafe(16);return i.writeUInt32BE(e[0],0),i.writeUInt32BE(e[1],4),i.writeUInt32BE(e[2],8),i.writeUInt32BE(e[3],12),i},xa.prototype.decryptBlock=function(t){var e=(t=Oa(t))[1];t[1]=t[3],t[3]=e;var i=Ba(t,this._invKeySchedule,Pa.INV_SUB_MIX,Pa.INV_SBOX,this._nRounds),r=Ia.allocUnsafe(16);return r.writeUInt32BE(i[0],0),r.writeUInt32BE(i[3],4),r.writeUInt32BE(i[2],8),r.writeUInt32BE(i[1],12),r},xa.prototype.scrub=function(){Ta(this._keySchedule),Ta(this._invKeySchedule),Ta(this._key)},Ra.AES=xa;var La=ce.Buffer,Da=La.alloc(16,0);function Ca(t){var e=La.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function qa(t){this.h=t,this.state=La.alloc(16,0),this.cache=La.allocUnsafe(0)}qa.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},qa.prototype._multiply=function(){for(var t,e,i,r=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],n=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),i=0!=(1&r[3]),e=3;e>0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=Ca(n)},qa.prototype.update=function(t){var e;for(this.cache=La.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},qa.prototype.final=function(t,e){return this.cache.length&&this.ghash(La.concat([this.cache,Da],16)),this.ghash(Ca([0,t,0,e])),this.state};var Ua=qa,ja=Ra,za=ce.Buffer,Fa=fs,Ha=Ua,Ka=ta,Ga=va;function Ya(t,e,i,r){Fa.call(this);var n=za.alloc(4,0);this._cipher=new ja.AES(e);var o=this._cipher.encryptBlock(n);this._ghash=new Ha(o),i=function(t,e,i){if(12===e.length)return t._finID=za.concat([e,za.from([0,0,0,1])]),za.concat([e,za.from([0,0,0,2])]);var r=new Ha(i),n=e.length,o=n%16;r.update(e),o&&(o=16-o,r.update(za.alloc(o,0))),r.update(za.alloc(8,0));var s=8*n,h=za.alloc(8);h.writeUIntBE(s,0,8),r.update(h),t._finID=r.state;var a=za.from(t._finID);return Ga(a),a}(this,i,o),this._prev=za.from(i),this._cache=za.allocUnsafe(0),this._secCache=za.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}we(Ya,Fa),Ya.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=za.alloc(e,0),this._ghash.update(e))}this._called=!0;var i=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(i),this._len+=t.length,i},Ya.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=Ka(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var i=0;t.length!==e.length&&i++;for(var r=Math.min(t.length,e.length),n=0;n<r;++n)i+=t[n]^e[n];return i}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},Ya.prototype.getAuthTag=function(){if(this._decrypt||!za.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},Ya.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},Ya.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length};var Va=Ya,Za=Ra,Wa=ce.Buffer,Xa=fs;function Qa(t,e,i,r){Xa.call(this),this._cipher=new Za.AES(e),this._prev=Wa.from(i),this._cache=Wa.allocUnsafe(0),this._secCache=Wa.allocUnsafe(0),this._decrypt=r,this._mode=t}we(Qa,Xa),Qa.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},Qa.prototype._final=function(){this._cipher.scrub()};var Ja=Qa,$a=ce.Buffer,tu=Pr;var eu=function(t,e,i,r){if($a.isBuffer(t)||(t=$a.from(t,"binary")),e&&($a.isBuffer(e)||(e=$a.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=i/8,o=$a.alloc(n),s=$a.alloc(r||0),h=$a.alloc(0);n>0||r>0;){var a=new tu;a.update(h),a.update(t),e&&a.update(e),h=a.digest();var u=0;if(n>0){var f=o.length-n;u=Math.min(n,h.length),h.copy(o,f,0,u),n-=u}if(u<h.length&&r>0){var l=s.length-r,d=Math.min(r,h.length-u);h.copy(s,l,u,u+d),r-=d}}return h.fill(0),{key:o,iv:s}},iu=ka,ru=Va,nu=ce.Buffer,ou=Ja,su=fs,hu=Ra,au=eu;function uu(t,e,i){su.call(this),this._cache=new lu,this._cipher=new hu.AES(e),this._prev=nu.from(i),this._mode=t,this._autopadding=!0}we(uu,su),uu.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get();)i=this._mode.encrypt(this,e),r.push(i);return nu.concat(r)};var fu=nu.alloc(16,16);function lu(){this.cache=nu.allocUnsafe(0)}function du(t,e,i){var r=iu[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=nu.from(e)),e.length!==r.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof i&&(i=nu.from(i)),"GCM"!==r.mode&&i.length!==r.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===r.type?new ou(r.module,e,i):"auth"===r.type?new ru(r.module,e,i):new uu(r.module,e,i)}uu.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(fu))throw this._cipher.scrub(),new Error("data not multiple of block length")},uu.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},lu.prototype.add=function(t){this.cache=nu.concat([this.cache,t])},lu.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},lu.prototype.flush=function(){for(var t=16-this.cache.length,e=nu.allocUnsafe(t),i=-1;++i<t;)e.writeUInt8(t,i);return nu.concat([this.cache,e])},Qh.createCipheriv=du,Qh.createCipher=function(t,e){var i=iu[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=au(e,!1,i.key,i.iv);return du(t,r.key,r.iv)};var cu={},pu=Va,mu=ce.Buffer,gu=ka,vu=Ja,bu=fs,yu=Ra,wu=eu;function Mu(t,e,i){bu.call(this),this._cache=new _u,this._last=void 0,this._cipher=new yu.AES(e),this._prev=mu.from(i),this._mode=t,this._autopadding=!0}function _u(){this.cache=mu.allocUnsafe(0)}function Su(t,e,i){var r=gu[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=mu.from(i)),"GCM"!==r.mode&&i.length!==r.iv)throw new TypeError("invalid iv length "+i.length);if("string"==typeof e&&(e=mu.from(e)),e.length!==r.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===r.type?new vu(r.module,e,i,!0):"auth"===r.type?new pu(r.module,e,i,!0):new Mu(r.module,e,i)}we(Mu,bu),Mu.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,e),r.push(i);return mu.concat(r)},Mu.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var i=-1;for(;++i<e;)if(t[i+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},Mu.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},_u.prototype.add=function(t){this.cache=mu.concat([this.cache,t])},_u.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},_u.prototype.flush=function(){if(this.cache.length)return this.cache},cu.createDecipher=function(t,e){var i=gu[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=wu(e,!1,i.key,i.iv);return Su(t,r.key,r.iv)},cu.createDecipheriv=Su;var Eu=Qh,Au=cu,ku=_a;Xh.createCipher=Xh.Cipher=Eu.createCipher,Xh.createCipheriv=Xh.Cipheriv=Eu.createCipheriv,Xh.createDecipher=Xh.Decipher=Au.createDecipher,Xh.createDecipheriv=Xh.Decipheriv=Au.createDecipheriv,Xh.listCiphers=Xh.getCiphers=function(){return Object.keys(ku)};var Ru={};!function(t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}}(Ru);var Iu=Zh,Ou=Xh,Tu=ka,Bu=Ru,Nu=eu;function Pu(t,e,i){if(t=t.toLowerCase(),Tu[t])return Ou.createCipheriv(t,e,i);if(Bu[t])return new Iu({key:e,iv:i,mode:t});throw new TypeError("invalid suite type")}function xu(t,e,i){if(t=t.toLowerCase(),Tu[t])return Ou.createDecipheriv(t,e,i);if(Bu[t])return new Iu({key:e,iv:i,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}ph.createCipher=ph.Cipher=function(t,e){var i,r;if(t=t.toLowerCase(),Tu[t])i=Tu[t].key,r=Tu[t].iv;else{if(!Bu[t])throw new TypeError("invalid suite type");i=8*Bu[t].key,r=Bu[t].iv}var n=Nu(e,!1,i,r);return Pu(t,n.key,n.iv)},ph.createCipheriv=ph.Cipheriv=Pu,ph.createDecipher=ph.Decipher=function(t,e){var i,r;if(t=t.toLowerCase(),Tu[t])i=Tu[t].key,r=Tu[t].iv;else{if(!Bu[t])throw new TypeError("invalid suite type");i=8*Bu[t].key,r=Bu[t].iv}var n=Nu(e,!1,i,r);return xu(t,n.key,n.iv)},ph.createDecipheriv=ph.Decipheriv=xu,ph.listCiphers=ph.getCiphers=function(){return Object.keys(Bu).concat(Ou.getCiphers())};var Lu={},Du={},Cu={get exports(){return Du},set exports(t){Du=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 d(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],N=8191&B,P=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,F))+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(N,K)|0,n=(n=n+Math.imul(N,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(N,V)|0,n=(n=n+Math.imul(N,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|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=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(N,X)|0,n=(n=n+Math.imul(N,Q)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|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 Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(N,it)|0,n=(n=n+Math.imul(N,rt)|0)+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(N,ot)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(N,at)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(P,at)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,dt)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Nt=(u+(r=r+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((o=o+Math.imul(P,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Pt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Nt,a[17]=Pt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,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()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Cu,gt);var qu={},Uu={get exports(){return qu},set exports(t){qu=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 d(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],N=8191&B,P=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,F))+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(N,K)|0,n=(n=n+Math.imul(N,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(N,V)|0,n=(n=n+Math.imul(N,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|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=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(N,X)|0,n=(n=n+Math.imul(N,Q)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|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 Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(N,it)|0,n=(n=n+Math.imul(N,rt)|0)+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(N,ot)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(N,at)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(P,at)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,dt)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Nt=(u+(r=r+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((o=o+Math.imul(P,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Pt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Nt,a[17]=Pt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,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()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Uu,gt);var ju,zu,Fu,Hu,Ku,Gu={},Yu={get exports(){return Gu},set exports(t){Gu=t}};function Vu(){if(ju)return Gu;var t;function e(t){this.rand=t}if(ju=1,Yu.exports=function(i){return t||(t=new e(null)),t.generate(i)},Gu.Rand=e,e.prototype.generate=function(t){return this._rand(t)},e.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),i=0;i<e.length;i++)e[i]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(e.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var i=kg();if("function"!=typeof i.randomBytes)throw new Error("Not supported");e.prototype._rand=function(t){return i.randomBytes(t)}}catch(t){}return Gu}function Zu(){if(Fu)return zu;Fu=1;var t=qu,e=Vu();function i(t){this.rand=t||new e.Rand}return zu=i,i.create=function(t){return new i(t)},i.prototype._randbelow=function(e){var i=e.bitLength(),r=Math.ceil(i/8);do{var n=new t(this.rand.generate(r))}while(n.cmp(e)>=0);return n},i.prototype._randrange=function(t,e){var i=e.sub(t);return t.add(this._randbelow(i))},i.prototype.test=function(e,i,r){var n=e.bitLength(),o=t.mont(e),s=new t(1).toRed(o);i||(i=Math.max(1,n/48|0));for(var h=e.subn(1),a=0;!h.testn(a);a++);for(var u=e.shrn(a),f=h.toRed(o);i>0;i--){var l=this._randrange(new t(2),h);r&&r(l);var d=l.toRed(o).redPow(u);if(0!==d.cmp(s)&&0!==d.cmp(f)){for(var c=1;c<a;c++){if(0===(d=d.redSqr()).cmp(s))return!1;if(0===d.cmp(f))break}if(c===a)return!1}}return!0},i.prototype.getDivisor=function(e,i){var r=e.bitLength(),n=t.mont(e),o=new t(1).toRed(n);i||(i=Math.max(1,r/48|0));for(var s=e.subn(1),h=0;!s.testn(h);h++);for(var a=e.shrn(h),u=s.toRed(n);i>0;i--){var f=this._randrange(new t(2),s),l=e.gcd(f);if(0!==l.cmpn(1))return l;var d=f.toRed(n).redPow(a);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var c=1;c<h;c++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(e);if(0===d.cmp(u))break}if(c===h)return(d=d.redSqr()).fromRed().subn(1).gcd(e)}}return!1},zu}function Wu(){if(Ku)return Hu;Ku=1;var t=le;Hu=m,m.simpleSieve=c,m.fermatTest=p;var e=Du,i=new e(24),r=new(Zu()),n=new e(1),o=new e(2),s=new e(5);new e(16),new e(8);var h=new e(10),a=new e(3);new e(7);var u=new e(11),f=new e(4);new e(12);var l=null;function d(){if(null!==l)return l;var t=[];t[0]=2;for(var e=1,i=3;i<1048576;i+=2){for(var r=Math.ceil(Math.sqrt(i)),n=0;n<e&&t[n]<=r&&i%t[n]!=0;n++);e!==n&&t[n]<=r||(t[e++]=i)}return l=t,t}function c(t){for(var e=d(),i=0;i<e.length;i++)if(0===t.modn(e[i]))return 0===t.cmpn(e[i]);return!0}function p(t){var i=e.mont(t);return 0===o.toRed(i).redPow(t.subn(1)).fromRed().cmpn(1)}function m(l,d){if(l<16)return new e(2===d||5===d?[140,123]:[140,39]);var m,g;for(d=new e(d);;){for(m=new e(t(Math.ceil(l/8)));m.bitLength()>l;)m.ishrn(1);if(m.isEven()&&m.iadd(n),m.testn(1)||m.iadd(o),d.cmp(o)){if(!d.cmp(s))for(;m.mod(h).cmp(a);)m.iadd(f)}else for(;m.mod(i).cmp(u);)m.iadd(f);if(c(g=m.shrn(1))&&c(m)&&p(g)&&p(m)&&r.test(g)&&r.test(m))return m}}return Hu}var Xu,Qu,Ju,$u={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};function tf(){if(Qu)return Xu;Qu=1;var t=Du,e=new(Zu()),i=new t(24),r=new t(11),n=new t(10),o=new t(3),s=new t(7),h=Wu(),a=le;function u(e,i){return i=i||"utf8",T.isBuffer(e)||(e=new T(e,i)),this._pub=new t(e),this}function f(e,i){return i=i||"utf8",T.isBuffer(e)||(e=new T(e,i)),this._priv=new t(e),this}Xu=d;var l={};function d(e,i,r){this.setGenerator(i),this.__prime=new t(e),this._prime=t.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=u,this.setPrivateKey=f):this._primeCode=8}function c(t,e){var i=new T(t.toArray());return e?i.toString(e):i}return Object.defineProperty(d.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,a){var u=a.toString("hex"),f=[u,t.toString(16)].join("_");if(f in l)return l[f];var d,c=0;if(t.isEven()||!h.simpleSieve||!h.fermatTest(t)||!e.test(t))return c+=1,c+="02"===u||"05"===u?8:4,l[f]=c,c;switch(e.test(t.shrn(1))||(c+=2),u){case"02":t.mod(i).cmp(r)&&(c+=8);break;case"05":(d=t.mod(n)).cmp(o)&&d.cmp(s)&&(c+=8);break;default:c+=4}return l[f]=c,c}(this.__prime,this.__gen)),this._primeCode}}),d.prototype.generateKeys=function(){return this._priv||(this._priv=new t(a(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},d.prototype.computeSecret=function(e){var i=new T((e=(e=new t(e)).toRed(this._prime)).redPow(this._priv).fromRed().toArray()),r=this.getPrime();if(i.length<r.length){var n=new T(r.length-i.length);n.fill(0),i=T.concat([n,i])}return i},d.prototype.getPublicKey=function(t){return c(this._pub,t)},d.prototype.getPrivateKey=function(t){return c(this._priv,t)},d.prototype.getPrime=function(t){return c(this.__prime,t)},d.prototype.getGenerator=function(t){return c(this._gen,t)},d.prototype.setGenerator=function(e,i){return i=i||"utf8",T.isBuffer(e)||(e=new T(e,i)),this.__gen=e,this._gen=new t(e),this},Xu}var ef={},rf={get exports(){return ef},set exports(t){ef=t}},nf={},of={get exports(){return nf},set exports(t){nf=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+t)}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,r,n){for(var o=0,s=0,h=Math.min(t.length,r),a=e;a<h;a++){var u=t.charCodeAt(a)-48;o*=n,s=u>=49?u-49+10:u>=17?u-17+10:u,i(u>=0&&s<n,"Invalid character"),o+=s}return o}function u(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this._strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},n.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},n.prototype._move=function(t){u(t,this)},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(t){n.prototype.inspect=f}else n.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}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];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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i._strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);o=h>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==o||s!==this.length-1?l[6-a.length]+a+r:a+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],f=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(f).toString(t);r=(p=p.idivn(f)).isZero()?m+r:l[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,n),s},n.prototype._toArrayLikeLE=function(t,e){for(var i=0,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;t[i++]=255&s,i<t.length&&(t[i++]=s>>8&255),i<t.length&&(t[i++]=s>>16&255),6===o?(i<t.length&&(t[i++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i<t.length)for(t[i++]=r;i<t.length;)t[i++]=0},n.prototype._toArrayLikeBE=function(t,e){for(var i=t.length-1,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;t[i--]=255&s,i>=0&&(t[i--]=s>>8&255),i>=0&&(t[i--]=s>>16&255),6===o?(i>=0&&(t[i--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i>=0)for(t[i--]=r;i>=0;)t[i--]=0},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var m=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],N=8191&B,P=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,F))+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(N,K)|0,n=(n=n+Math.imul(N,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(N,V)|0,n=(n=n+Math.imul(N,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|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=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(N,X)|0,n=(n=n+Math.imul(N,Q)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|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 Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(N,it)|0,n=(n=n+Math.imul(N,rt)|0)+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(N,ot)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(N,at)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(P,at)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,dt)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Nt=(u+(r=r+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((o=o+Math.imul(P,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Pt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Nt,a[17]=Pt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function g(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i._strip()}function v(t,e,i){return g(t,e,i)}Math.imul||(m=p),n.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?g(this,t,e):v(this,t,e)},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),v(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i("number"==typeof t),i(t<67108864);for(var r=0,n=0;n<this.length;n++){var o=(0|this.words[n])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[n]=67108863&s}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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 n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this._strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this._strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h._strip(),r._strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modrn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%t;return e?-n:n},n.prototype.modn=function(t){return this.modrn(t)},n.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new E(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},r(w,y),w.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},w.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(M,y),r(_,y),r(S,y),S.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new M;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return b[t]=e,e},E.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new A(t)},r(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(of,gt);var sf=nf,hf=le;function af(t){var e,i=t.modulus.byteLength();do{e=new sf(hf(i))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function uf(t,e){var i=function(t){var e=af(t);return{blinder:e.toRed(sf.mont(t.modulus)).redPow(new sf(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),r=e.modulus.byteLength(),n=new sf(t).mul(i.blinder).umod(e.modulus),o=n.toRed(sf.mont(e.prime1)),s=n.toRed(sf.mont(e.prime2)),h=e.coefficient,a=e.prime1,u=e.prime2,f=o.redPow(e.exponent1).fromRed(),l=s.redPow(e.exponent2).fromRed(),d=f.isub(l).imul(h).umod(a).imul(u);return l.iadd(d).imul(i.unblinder).umod(e.modulus).toArrayLike(T,"be",r)}uf.getr=af;var ff=uf,lf={};var df={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}},cf={},pf={},mf={get exports(){return pf},set exports(t){pf=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 d(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],N=8191&B,P=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,F))+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(N,K)|0,n=(n=n+Math.imul(N,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(N,V)|0,n=(n=n+Math.imul(N,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|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=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(N,X)|0,n=(n=n+Math.imul(N,Q)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|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 Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(N,it)|0,n=(n=n+Math.imul(N,rt)|0)+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(N,ot)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(N,at)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(P,at)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,dt)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Nt=(u+(r=r+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((o=o+Math.imul(P,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Pt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Nt,a[17]=Pt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,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()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(mf,gt);var gf={};!function(t){var e=gf;function i(t){return 1===t.length?"0"+t:t}function r(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"!=typeof t){for(var r=0;r<t.length;r++)i[r]=0|t[r];return i}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(r=0;r<t.length;r+=2)i.push(parseInt(t[r]+t[r+1],16))}else for(r=0;r<t.length;r++){var n=t.charCodeAt(r),o=n>>8,s=255&n;o?i.push(o,s):i.push(s)}return i},e.zero2=i,e.toHex=r,e.encode=function(t,e){return"hex"===e?r(t):t}}(),function(t){var e=cf,i=pf,r=wh,n=gf;e.assert=r,e.toArray=n.toArray,e.zero2=n.zero2,e.toHex=n.toHex,e.encode=n.encode,e.getNAF=function(t,e,i){var r=new Array(Math.max(t.bitLength(),i)+1);r.fill(0);for(var n=1<<e+1,o=t.clone(),s=0;s<r.length;s++){var h,a=o.andln(n-1);o.isOdd()?(h=a>(n>>1)-1?(n>>1)-a:a,o.isubn(h)):h=0,r[s]=h,o.iushrn(1)}return r},e.getJSF=function(t,e){var i=[[],[]];t=t.clone(),e=e.clone();for(var r,n=0,o=0;t.cmpn(-n)>0||e.cmpn(-o)>0;){var s,h,a=t.andln(3)+n&3,u=e.andln(3)+o&3;3===a&&(a=-1),3===u&&(u=-1),s=0==(1&a)?0:3!==(r=t.andln(7)+n&7)&&5!==r||2!==u?a:-a,i[0].push(s),h=0==(1&u)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==a?u:-u,i[1].push(h),2*n===s+1&&(n=1-n),2*o===h+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return i},e.cachedProperty=function(t,e,i){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(t){return new i(t,"hex","le")}}();var vf={},bf=pf,yf=cf,wf=yf.getNAF,Mf=yf.getJSF,_f=yf.assert;function Sf(t,e){this.type=t,this.p=new bf(e.p,16),this.red=e.prime?bf.red(e.prime):bf.mont(this.p),this.zero=new bf(0).toRed(this.red),this.one=new bf(1).toRed(this.red),this.two=new bf(2).toRed(this.red),this.n=e.n&&new bf(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Ef=Sf;function Af(t,e){this.curve=t,this.type=e,this.precomputed=null}Sf.prototype.point=function(){throw new Error("Not implemented")},Sf.prototype.validate=function(){throw new Error("Not implemented")},Sf.prototype._fixedNafMul=function(t,e){_f(t.precomputed);var i=t._getDoubles(),r=wf(e,1,this._bitLength),n=(1<<i.step+1)-(i.step%2==0?2:1);n/=3;var o,s,h=[];for(o=0;o<r.length;o+=i.step){s=0;for(var a=o+i.step-1;a>=o;a--)s=(s<<1)+r[a];h.push(s)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=n;l>0;l--){for(o=0;o<h.length;o++)(s=h[o])===l?f=f.mixedAdd(i.points[o]):s===-l&&(f=f.mixedAdd(i.points[o].neg()));u=u.add(f)}return u.toP()},Sf.prototype._wnafMul=function(t,e){var i=4,r=t._getNAFPoints(i);i=r.wnd;for(var n=r.points,o=wf(e,i,this._bitLength),s=this.jpoint(null,null,null),h=o.length-1;h>=0;h--){for(var a=0;h>=0&&0===o[h];h--)a++;if(h>=0&&a++,s=s.dblp(a),h<0)break;var u=o[h];_f(0!==u),s="affine"===t.type?u>0?s.mixedAdd(n[u-1>>1]):s.mixedAdd(n[-u-1>>1].neg()):u>0?s.add(n[u-1>>1]):s.add(n[-u-1>>1].neg())}return"affine"===t.type?s.toP():s},Sf.prototype._wnafMulAdd=function(t,e,i,r,n){var o,s,h,a=this._wnafT1,u=this._wnafT2,f=this._wnafT3,l=0;for(o=0;o<r;o++){var d=(h=e[o])._getNAFPoints(t);a[o]=d.wnd,u[o]=d.points}for(o=r-1;o>=1;o-=2){var c=o-1,p=o;if(1===a[c]&&1===a[p]){var m=[e[c],null,null,e[p]];0===e[c].y.cmp(e[p].y)?(m[1]=e[c].add(e[p]),m[2]=e[c].toJ().mixedAdd(e[p].neg())):0===e[c].y.cmp(e[p].y.redNeg())?(m[1]=e[c].toJ().mixedAdd(e[p]),m[2]=e[c].add(e[p].neg())):(m[1]=e[c].toJ().mixedAdd(e[p]),m[2]=e[c].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=Mf(i[c],i[p]);for(l=Math.max(v[0].length,l),f[c]=new Array(l),f[p]=new Array(l),s=0;s<l;s++){var b=0|v[0][s],y=0|v[1][s];f[c][s]=g[3*(b+1)+(y+1)],f[p][s]=0,u[c]=m}}else f[c]=wf(i[c],a[c],this._bitLength),f[p]=wf(i[p],a[p],this._bitLength),l=Math.max(f[c].length,l),l=Math.max(f[p].length,l)}var w=this.jpoint(null,null,null),M=this._wnafT4;for(o=l;o>=0;o--){for(var _=0;o>=0;){var S=!0;for(s=0;s<r;s++)M[s]=0|f[s][o],0!==M[s]&&(S=!1);if(!S)break;_++,o--}if(o>=0&&_++,w=w.dblp(_),o<0)break;for(s=0;s<r;s++){var E=M[s];0!==E&&(E>0?h=u[s][E-1>>1]:E<0&&(h=u[s][-E-1>>1].neg()),w="affine"===h.type?w.mixedAdd(h):w.add(h))}}for(o=0;o<r;o++)u[o]=null;return n?w:w.toP()},Sf.BasePoint=Af,Af.prototype.eq=function(){throw new Error("Not implemented")},Af.prototype.validate=function(){return this.curve.validate(this)},Sf.prototype.decodePoint=function(t,e){t=yf.toArray(t,e);var i=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*i)return 6===t[0]?_f(t[t.length-1]%2==0):7===t[0]&&_f(t[t.length-1]%2==1),this.point(t.slice(1,1+i),t.slice(1+i,1+2*i));if((2===t[0]||3===t[0])&&t.length-1===i)return this.pointFromX(t.slice(1,1+i),3===t[0]);throw new Error("Unknown point format")},Af.prototype.encodeCompressed=function(t){return this.encode(t,!0)},Af.prototype._encode=function(t){var e=this.curve.p.byteLength(),i=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",e))},Af.prototype.encode=function(t,e){return yf.encode(this._encode(e),t)},Af.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},Af.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},Af.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n<e;n+=t){for(var o=0;o<t;o++)r=r.dbl();i.push(r)}return{step:t,points:i}},Af.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],i=(1<<t)-1,r=1===i?null:this.dbl(),n=1;n<i;n++)e[n]=e[n-1].add(r);return{wnd:t,points:e}},Af.prototype._getBeta=function(){return null},Af.prototype.dblp=function(t){for(var e=this,i=0;i<t;i++)e=e.dbl();return e};var kf=pf,Rf=we,If=Ef,Of=cf.assert;function Tf(t){If.call(this,"short",t),this.a=new kf(t.a,16).toRed(this.red),this.b=new kf(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Rf(Tf,If);var Bf=Tf;function Nf(t,e,i,r){If.BasePoint.call(this,t,"affine"),null===e&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new kf(e,16),this.y=new kf(i,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Pf(t,e,i,r){If.BasePoint.call(this,t,"jacobian"),null===e&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new kf(0)):(this.x=new kf(e,16),this.y=new kf(i,16),this.z=new kf(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Tf.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,i;if(t.beta)e=new kf(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=(e=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(t.lambda)i=new kf(t.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(e))?i=n[0]:(i=n[1],Of(0===this.g.mul(i).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:i,basis:t.basis?t.basis.map((function(t){return{a:new kf(t.a,16),b:new kf(t.b,16)}})):this._getEndoBasis(i)}}},Tf.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:kf.mont(t),i=new kf(2).toRed(e).redInvm(),r=i.redNeg(),n=new kf(3).toRed(e).redNeg().redSqrt().redMul(i);return[r.redAdd(n).fromRed(),r.redSub(n).fromRed()]},Tf.prototype._getEndoBasis=function(t){for(var e,i,r,n,o,s,h,a,u,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,d=this.n.clone(),c=new kf(1),p=new kf(0),m=new kf(0),g=new kf(1),v=0;0!==l.cmpn(0);){var b=d.div(l);a=d.sub(b.mul(l)),u=m.sub(b.mul(c));var y=g.sub(b.mul(p));if(!r&&a.cmp(f)<0)e=h.neg(),i=c,r=a.neg(),n=u;else if(r&&2==++v)break;h=a,d=l,l=a,m=c,c=u,g=p,p=y}o=a.neg(),s=u;var w=r.sqr().add(n.sqr());return o.sqr().add(s.sqr()).cmp(w)>=0&&(o=e,s=i),r.negative&&(r=r.neg(),n=n.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:r,b:n},{a:o,b:s}]},Tf.prototype._endoSplit=function(t){var e=this.endo.basis,i=e[0],r=e[1],n=r.b.mul(t).divRound(this.n),o=i.b.neg().mul(t).divRound(this.n),s=n.mul(i.a),h=o.mul(r.a),a=n.mul(i.b),u=o.mul(r.b);return{k1:t.sub(s).sub(h),k2:a.add(u).neg()}},Tf.prototype.pointFromX=function(t,e){(t=new kf(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var n=r.fromRed().isOdd();return(e&&!n||!e&&n)&&(r=r.redNeg()),this.point(t,r)},Tf.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,i=t.y,r=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},Tf.prototype._endoWnafMulAdd=function(t,e,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),h=t[o],a=h._getBeta();s.k1.negative&&(s.k1.ineg(),h=h.neg(!0)),s.k2.negative&&(s.k2.ineg(),a=a.neg(!0)),r[2*o]=h,r[2*o+1]=a,n[2*o]=s.k1,n[2*o+1]=s.k2}for(var u=this._wnafMulAdd(1,r,n,2*o,i),f=0;f<2*o;f++)r[f]=null,n[f]=null;return u},Rf(Nf,If.BasePoint),Tf.prototype.point=function(t,e,i){return new Nf(this,t,e,i)},Tf.prototype.pointFromJSON=function(t,e){return Nf.fromJSON(this,t,e)},Nf.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var i=this.curve,r=function(t){return i.point(t.x.redMul(i.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e}},Nf.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Nf.fromJSON=function(t,e,i){"string"==typeof e&&(e=JSON.parse(e));var r=t.point(e[0],e[1],i);if(!e[2])return r;function n(e){return t.point(e[0],e[1],i)}var o=e[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(n))}},r},Nf.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Nf.prototype.isInfinity=function(){return this.inf},Nf.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var i=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},Nf.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,i=this.x.redSqr(),r=t.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(e).redMul(r),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},Nf.prototype.getX=function(){return this.x.fromRed()},Nf.prototype.getY=function(){return this.y.fromRed()},Nf.prototype.mul=function(t){return t=new kf(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},Nf.prototype.mulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},Nf.prototype.jmulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},Nf.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},Nf.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,r=function(t){return t.neg()};e.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return e},Nf.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Rf(Pf,If.BasePoint),Tf.prototype.jpoint=function(t,e,i){return new Pf(this,t,e,i)},Pf.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),i=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(i,r)},Pf.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Pf.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(e),n=t.x.redMul(i),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(i.redMul(this.z)),h=r.redSub(n),a=o.redSub(s);if(0===h.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=h.redSqr(),f=u.redMul(h),l=r.redMul(u),d=a.redSqr().redIAdd(f).redISub(l).redISub(l),c=a.redMul(l.redISub(d)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(h);return this.curve.jpoint(d,c,p)},Pf.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),i=this.x,r=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),s=i.redSub(r),h=n.redSub(o);if(0===s.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var a=s.redSqr(),u=a.redMul(s),f=i.redMul(a),l=h.redSqr().redIAdd(u).redISub(f).redISub(f),d=h.redMul(f.redISub(l)).redISub(n.redMul(u)),c=this.z.redMul(s);return this.curve.jpoint(l,d,c)},Pf.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var i=this;for(e=0;e<t;e++)i=i.dbl();return i}var r=this.curve.a,n=this.curve.tinv,o=this.x,s=this.y,h=this.z,a=h.redSqr().redSqr(),u=s.redAdd(s);for(e=0;e<t;e++){var f=o.redSqr(),l=u.redSqr(),d=l.redSqr(),c=f.redAdd(f).redIAdd(f).redIAdd(r.redMul(a)),p=o.redMul(l),m=c.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=c.redMul(g);v=v.redIAdd(v).redISub(d);var b=u.redMul(h);e+1<t&&(a=a.redMul(d)),o=m,h=b,u=v}return this.curve.jpoint(o,u.redMul(n),h)},Pf.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Pf.prototype._zeroDbl=function(){var t,e,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var h=r.redAdd(r).redIAdd(r),a=h.redSqr().redISub(s).redISub(s),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=a,e=h.redMul(s.redISub(a)).redISub(u),i=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),d=l.redSqr(),c=this.x.redAdd(l).redSqr().redISub(f).redISub(d);c=c.redIAdd(c);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(c).redISub(c),e=p.redMul(c.redISub(t)).redISub(g),i=(i=this.y.redMul(this.z)).redIAdd(i)}return this.curve.jpoint(t,e,i)},Pf.prototype._threeDbl=function(){var t,e,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var h=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),a=h.redSqr().redISub(s).redISub(s);t=a;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=h.redMul(s.redISub(a)).redISub(u),i=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),d=this.x.redMul(l),c=this.x.redSub(f).redMul(this.x.redAdd(f));c=c.redAdd(c).redIAdd(c);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);t=c.redSqr().redISub(m),i=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=c.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,i)},Pf.prototype._dbl=function(){var t=this.curve.a,e=this.x,i=this.y,r=this.z,n=r.redSqr().redSqr(),o=e.redSqr(),s=i.redSqr(),h=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(n)),a=e.redAdd(e),u=(a=a.redIAdd(a)).redMul(s),f=h.redSqr().redISub(u.redAdd(u)),l=u.redISub(f),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var c=h.redMul(l).redISub(d),p=i.redAdd(i).redMul(r);return this.curve.jpoint(f,c,p)},Pf.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),i=this.z.redSqr(),r=e.redSqr(),n=t.redAdd(t).redIAdd(t),o=n.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(r),h=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),a=r.redIAdd(r);a=(a=(a=a.redIAdd(a)).redIAdd(a)).redIAdd(a);var u=n.redIAdd(s).redSqr().redISub(o).redISub(h).redISub(a),f=e.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(h).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.y.redMul(u.redMul(a.redISub(u)).redISub(s.redMul(h)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var c=this.z.redAdd(s).redSqr().redISub(i).redISub(h);return this.curve.jpoint(l,d,c)},Pf.prototype.mul=function(t,e){return t=new kf(t,e),this.curve._wnafMul(this,t)},Pf.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),i=t.z.redSqr();if(0!==this.x.redMul(i).redISub(t.x.redMul(e)).cmpn(0))return!1;var r=e.redMul(this.z),n=i.redMul(t.z);return 0===this.y.redMul(n).redISub(t.y.redMul(r)).cmpn(0)},Pf.prototype.eqXToP=function(t){var e=this.z.redSqr(),i=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(i))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},Pf.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Pf.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var xf=pf,Lf=we,Df=Ef,Cf=cf;function qf(t){Df.call(this,"mont",t),this.a=new xf(t.a,16).toRed(this.red),this.b=new xf(t.b,16).toRed(this.red),this.i4=new xf(4).toRed(this.red).redInvm(),this.two=new xf(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Lf(qf,Df);var Uf=qf;function jf(t,e,i){Df.BasePoint.call(this,t,"projective"),null===e&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new xf(e,16),this.z=new xf(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}qf.prototype.validate=function(t){var e=t.normalize().x,i=e.redSqr(),r=i.redMul(e).redAdd(i.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},Lf(jf,Df.BasePoint),qf.prototype.decodePoint=function(t,e){return this.point(Cf.toArray(t,e),1)},qf.prototype.point=function(t,e){return new jf(this,t,e)},qf.prototype.pointFromJSON=function(t){return jf.fromJSON(this,t)},jf.prototype.precompute=function(){},jf.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},jf.fromJSON=function(t,e){return new jf(t,e[0],e[1]||t.one)},jf.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},jf.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},jf.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),i=t.redSub(e),r=t.redMul(e),n=i.redMul(e.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},jf.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},jf.prototype.diffAdd=function(t,e){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(i),s=n.redMul(r),h=e.z.redMul(o.redAdd(s).redSqr()),a=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(h,a)},jf.prototype.mul=function(t){for(var e=t.clone(),i=this,r=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},jf.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},jf.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},jf.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},jf.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},jf.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var zf=pf,Ff=we,Hf=Ef,Kf=cf.assert;function Gf(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,Hf.call(this,"edwards",t),this.a=new zf(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new zf(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new zf(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Kf(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}Ff(Gf,Hf);var Yf=Gf;function Vf(t,e,i,r,n){Hf.BasePoint.call(this,t,"projective"),null===e&&null===i&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new zf(e,16),this.y=new zf(i,16),this.z=r?new zf(r,16):this.curve.one,this.t=n&&new zf(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}Gf.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},Gf.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},Gf.prototype.jpoint=function(t,e,i,r){return this.point(t,e,i,r)},Gf.prototype.pointFromX=function(t,e){(t=new zf(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr(),r=this.c2.redSub(this.a.redMul(i)),n=this.one.redSub(this.c2.redMul(this.d).redMul(i)),o=r.redMul(n.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var h=s.fromRed().isOdd();return(e&&!h||!e&&h)&&(s=s.redNeg()),this.point(t,s)},Gf.prototype.pointFromY=function(t,e){(t=new zf(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr(),r=i.redSub(this.c2),n=i.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(n.redInvm());if(0===o.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},Gf.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),i=t.y.redSqr(),r=e.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(i)));return 0===r.cmp(n)},Ff(Vf,Hf.BasePoint),Gf.prototype.pointFromJSON=function(t){return Vf.fromJSON(this,t)},Gf.prototype.point=function(t,e,i,r){return new Vf(this,t,e,i,r)},Vf.fromJSON=function(t,e){return new Vf(t,e[0],e[1],e[2])},Vf.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},Vf.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},Vf.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=r.redAdd(e),s=o.redSub(i),h=r.redSub(e),a=n.redMul(s),u=o.redMul(h),f=n.redMul(h),l=s.redMul(o);return this.curve.point(a,u,l,f)},Vf.prototype._projDbl=function(){var t,e,i,r,n,o,s=this.x.redAdd(this.y).redSqr(),h=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(h)).redAdd(a);this.zOne?(t=s.redSub(h).redSub(a).redMul(u.redSub(this.curve.two)),e=u.redMul(r.redSub(a)),i=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),o=u.redSub(n).redISub(n),t=s.redSub(h).redISub(a).redMul(o),e=u.redMul(r.redSub(a)),i=u.redMul(o))}else r=h.redAdd(a),n=this.curve._mulC(this.z).redSqr(),o=r.redSub(n).redSub(n),t=this.curve._mulC(s.redISub(r)).redMul(o),e=this.curve._mulC(r).redMul(h.redISub(a)),i=r.redMul(o);return this.curve.point(t,e,i)},Vf.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},Vf.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),o=i.redSub(e),s=n.redSub(r),h=n.redAdd(r),a=i.redAdd(e),u=o.redMul(s),f=h.redMul(a),l=o.redMul(a),d=s.redMul(h);return this.curve.point(u,f,d,l)},Vf.prototype._projAdd=function(t){var e,i,r=this.z.redMul(t.z),n=r.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),h=this.curve.d.redMul(o).redMul(s),a=n.redSub(h),u=n.redAdd(h),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),l=r.redMul(a).redMul(f);return this.curve.twisted?(e=r.redMul(u).redMul(s.redSub(this.curve._mulA(o))),i=a.redMul(u)):(e=r.redMul(u).redMul(s.redSub(o)),i=this.curve._mulC(a).redMul(u)),this.curve.point(l,e,i)},Vf.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},Vf.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},Vf.prototype.mulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!1)},Vf.prototype.jmulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!0)},Vf.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},Vf.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},Vf.prototype.getX=function(){return this.normalize(),this.x.fromRed()},Vf.prototype.getY=function(){return this.normalize(),this.y.fromRed()},Vf.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},Vf.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var i=t.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},Vf.prototype.toP=Vf.prototype.normalize,Vf.prototype.mixedAdd=Vf.prototype.add,function(t){var e=t;e.base=Ef,e.short=Bf,e.mont=Uf,e.edwards=Yf}(vf);var Zf={},Wf={},Xf={},Qf=wh,Jf=we;function $f(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function tl(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function el(t){return 1===t.length?"0"+t:t}function il(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}Xf.inherits=Jf,Xf.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)i.push(parseInt(t[n]+t[n+1],16))}else for(var r=0,n=0;n<t.length;n++){var o=t.charCodeAt(n);o<128?i[r++]=o:o<2048?(i[r++]=o>>6|192,i[r++]=63&o|128):$f(t,n)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++n)),i[r++]=o>>18|240,i[r++]=o>>12&63|128,i[r++]=o>>6&63|128,i[r++]=63&o|128):(i[r++]=o>>12|224,i[r++]=o>>6&63|128,i[r++]=63&o|128)}else for(n=0;n<t.length;n++)i[n]=0|t[n];return i},Xf.toHex=function(t){for(var e="",i=0;i<t.length;i++)e+=el(t[i].toString(16));return e},Xf.htonl=tl,Xf.toHex32=function(t,e){for(var i="",r=0;r<t.length;r++){var n=t[r];"little"===e&&(n=tl(n)),i+=il(n.toString(16))}return i},Xf.zero2=el,Xf.zero8=il,Xf.join32=function(t,e,i,r){var n=i-e;Qf(n%4==0);for(var o=new Array(n/4),s=0,h=e;s<o.length;s++,h+=4){var a;a="big"===r?t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3]:t[h+3]<<24|t[h+2]<<16|t[h+1]<<8|t[h],o[s]=a>>>0}return o},Xf.split32=function(t,e){for(var i=new Array(4*t.length),r=0,n=0;r<t.length;r++,n+=4){var o=t[r];"big"===e?(i[n]=o>>>24,i[n+1]=o>>>16&255,i[n+2]=o>>>8&255,i[n+3]=255&o):(i[n+3]=o>>>24,i[n+2]=o>>>16&255,i[n+1]=o>>>8&255,i[n]=255&o)}return i},Xf.rotr32=function(t,e){return t>>>e|t<<32-e},Xf.rotl32=function(t,e){return t<<e|t>>>32-e},Xf.sum32=function(t,e){return t+e>>>0},Xf.sum32_3=function(t,e,i){return t+e+i>>>0},Xf.sum32_4=function(t,e,i,r){return t+e+i+r>>>0},Xf.sum32_5=function(t,e,i,r,n){return t+e+i+r+n>>>0},Xf.sum64=function(t,e,i,r){var n=t[e],o=r+t[e+1]>>>0,s=(o<r?1:0)+i+n;t[e]=s>>>0,t[e+1]=o},Xf.sum64_hi=function(t,e,i,r){return(e+r>>>0<e?1:0)+t+i>>>0},Xf.sum64_lo=function(t,e,i,r){return e+r>>>0},Xf.sum64_4_hi=function(t,e,i,r,n,o,s,h){var a=0,u=e;return a+=(u=u+r>>>0)<e?1:0,a+=(u=u+o>>>0)<o?1:0,t+i+n+s+(a+=(u=u+h>>>0)<h?1:0)>>>0},Xf.sum64_4_lo=function(t,e,i,r,n,o,s,h){return e+r+o+h>>>0},Xf.sum64_5_hi=function(t,e,i,r,n,o,s,h,a,u){var f=0,l=e;return f+=(l=l+r>>>0)<e?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+h>>>0)<h?1:0,t+i+n+s+a+(f+=(l=l+u>>>0)<u?1:0)>>>0},Xf.sum64_5_lo=function(t,e,i,r,n,o,s,h,a,u){return e+r+o+h+u>>>0},Xf.rotr64_hi=function(t,e,i){return(e<<32-i|t>>>i)>>>0},Xf.rotr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0},Xf.shr64_hi=function(t,e,i){return t>>>i},Xf.shr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0};var rl={},nl=Xf,ol=wh;function sl(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}rl.BlockHash=sl,sl.prototype.update=function(t,e){if(t=nl.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var i=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-i,t.length),0===this.pending.length&&(this.pending=null),t=nl.join32(t,0,t.length-i,this.endian);for(var r=0;r<t.length;r+=this._delta32)this._update(t,r,r+this._delta32)}return this},sl.prototype.digest=function(t){return this.update(this._pad()),ol(null===this.pending),this._digest(t)},sl.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,i=e-(t+this.padLength)%e,r=new Array(i+this.padLength);r[0]=128;for(var n=1;n<i;n++)r[n]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[n++]=0;r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=t>>>24&255,r[n++]=t>>>16&255,r[n++]=t>>>8&255,r[n++]=255&t}else for(r[n++]=255&t,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n++]=t>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,o=8;o<this.padLength;o++)r[n++]=0;return r};var hl={},al={},ul=Xf.rotr32;function fl(t,e,i){return t&e^~t&i}function ll(t,e,i){return t&e^t&i^e&i}function dl(t,e,i){return t^e^i}al.ft_1=function(t,e,i,r){return 0===t?fl(e,i,r):1===t||3===t?dl(e,i,r):2===t?ll(e,i,r):void 0},al.ch32=fl,al.maj32=ll,al.p32=dl,al.s0_256=function(t){return ul(t,2)^ul(t,13)^ul(t,22)},al.s1_256=function(t){return ul(t,6)^ul(t,11)^ul(t,25)},al.g0_256=function(t){return ul(t,7)^ul(t,18)^t>>>3},al.g1_256=function(t){return ul(t,17)^ul(t,19)^t>>>10};var cl=Xf,pl=rl,ml=al,gl=cl.rotl32,vl=cl.sum32,bl=cl.sum32_5,yl=ml.ft_1,wl=pl.BlockHash,Ml=[1518500249,1859775393,2400959708,3395469782];function _l(){if(!(this instanceof _l))return new _l;wl.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}cl.inherits(_l,wl);var Sl=_l;_l.blockSize=512,_l.outSize=160,_l.hmacStrength=80,_l.padLength=64,_l.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;r<i.length;r++)i[r]=gl(i[r-3]^i[r-8]^i[r-14]^i[r-16],1);var n=this.h[0],o=this.h[1],s=this.h[2],h=this.h[3],a=this.h[4];for(r=0;r<i.length;r++){var u=~~(r/20),f=bl(gl(n,5),yl(u,o,s,h),a,i[r],Ml[u]);a=h,h=s,s=gl(o,30),o=n,n=f}this.h[0]=vl(this.h[0],n),this.h[1]=vl(this.h[1],o),this.h[2]=vl(this.h[2],s),this.h[3]=vl(this.h[3],h),this.h[4]=vl(this.h[4],a)},_l.prototype._digest=function(t){return"hex"===t?cl.toHex32(this.h,"big"):cl.split32(this.h,"big")};var El=Xf,Al=rl,kl=al,Rl=wh,Il=El.sum32,Ol=El.sum32_4,Tl=El.sum32_5,Bl=kl.ch32,Nl=kl.maj32,Pl=kl.s0_256,xl=kl.s1_256,Ll=kl.g0_256,Dl=kl.g1_256,Cl=Al.BlockHash,ql=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Ul(){if(!(this instanceof Ul))return new Ul;Cl.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=ql,this.W=new Array(64)}El.inherits(Ul,Cl);var jl=Ul;Ul.blockSize=512,Ul.outSize=256,Ul.hmacStrength=192,Ul.padLength=64,Ul.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;r<i.length;r++)i[r]=Ol(Dl(i[r-2]),i[r-7],Ll(i[r-15]),i[r-16]);var n=this.h[0],o=this.h[1],s=this.h[2],h=this.h[3],a=this.h[4],u=this.h[5],f=this.h[6],l=this.h[7];for(Rl(this.k.length===i.length),r=0;r<i.length;r++){var d=Tl(l,xl(a),Bl(a,u,f),this.k[r],i[r]),c=Il(Pl(n),Nl(n,o,s));l=f,f=u,u=a,a=Il(h,d),h=s,s=o,o=n,n=Il(d,c)}this.h[0]=Il(this.h[0],n),this.h[1]=Il(this.h[1],o),this.h[2]=Il(this.h[2],s),this.h[3]=Il(this.h[3],h),this.h[4]=Il(this.h[4],a),this.h[5]=Il(this.h[5],u),this.h[6]=Il(this.h[6],f),this.h[7]=Il(this.h[7],l)},Ul.prototype._digest=function(t){return"hex"===t?El.toHex32(this.h,"big"):El.split32(this.h,"big")};var zl=Xf,Fl=jl;function Hl(){if(!(this instanceof Hl))return new Hl;Fl.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}zl.inherits(Hl,Fl);var Kl=Hl;Hl.blockSize=512,Hl.outSize=224,Hl.hmacStrength=192,Hl.padLength=64,Hl.prototype._digest=function(t){return"hex"===t?zl.toHex32(this.h.slice(0,7),"big"):zl.split32(this.h.slice(0,7),"big")};var Gl=Xf,Yl=rl,Vl=wh,Zl=Gl.rotr64_hi,Wl=Gl.rotr64_lo,Xl=Gl.shr64_hi,Ql=Gl.shr64_lo,Jl=Gl.sum64,$l=Gl.sum64_hi,td=Gl.sum64_lo,ed=Gl.sum64_4_hi,id=Gl.sum64_4_lo,rd=Gl.sum64_5_hi,nd=Gl.sum64_5_lo,od=Yl.BlockHash,sd=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function hd(){if(!(this instanceof hd))return new hd;od.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=sd,this.W=new Array(160)}Gl.inherits(hd,od);var ad=hd;function ud(t,e,i,r,n){var o=t&i^~t&n;return o<0&&(o+=4294967296),o}function fd(t,e,i,r,n,o){var s=e&r^~e&o;return s<0&&(s+=4294967296),s}function ld(t,e,i,r,n){var o=t&i^t&n^i&n;return o<0&&(o+=4294967296),o}function dd(t,e,i,r,n,o){var s=e&r^e&o^r&o;return s<0&&(s+=4294967296),s}function cd(t,e){var i=Zl(t,e,28)^Zl(e,t,2)^Zl(e,t,7);return i<0&&(i+=4294967296),i}function pd(t,e){var i=Wl(t,e,28)^Wl(e,t,2)^Wl(e,t,7);return i<0&&(i+=4294967296),i}function md(t,e){var i=Zl(t,e,14)^Zl(t,e,18)^Zl(e,t,9);return i<0&&(i+=4294967296),i}function gd(t,e){var i=Wl(t,e,14)^Wl(t,e,18)^Wl(e,t,9);return i<0&&(i+=4294967296),i}function vd(t,e){var i=Zl(t,e,1)^Zl(t,e,8)^Xl(t,e,7);return i<0&&(i+=4294967296),i}function bd(t,e){var i=Wl(t,e,1)^Wl(t,e,8)^Ql(t,e,7);return i<0&&(i+=4294967296),i}function yd(t,e){var i=Zl(t,e,19)^Zl(e,t,29)^Xl(t,e,6);return i<0&&(i+=4294967296),i}function wd(t,e){var i=Wl(t,e,19)^Wl(e,t,29)^Ql(t,e,6);return i<0&&(i+=4294967296),i}hd.blockSize=1024,hd.outSize=512,hd.hmacStrength=192,hd.padLength=128,hd.prototype._prepareBlock=function(t,e){for(var i=this.W,r=0;r<32;r++)i[r]=t[e+r];for(;r<i.length;r+=2){var n=yd(i[r-4],i[r-3]),o=wd(i[r-4],i[r-3]),s=i[r-14],h=i[r-13],a=vd(i[r-30],i[r-29]),u=bd(i[r-30],i[r-29]),f=i[r-32],l=i[r-31];i[r]=ed(n,o,s,h,a,u,f,l),i[r+1]=id(n,o,s,h,a,u,f,l)}},hd.prototype._update=function(t,e){this._prepareBlock(t,e);var i=this.W,r=this.h[0],n=this.h[1],o=this.h[2],s=this.h[3],h=this.h[4],a=this.h[5],u=this.h[6],f=this.h[7],l=this.h[8],d=this.h[9],c=this.h[10],p=this.h[11],m=this.h[12],g=this.h[13],v=this.h[14],b=this.h[15];Vl(this.k.length===i.length);for(var y=0;y<i.length;y+=2){var w=v,M=b,_=md(l,d),S=gd(l,d),E=ud(l,d,c,p,m),A=fd(l,d,c,p,m,g),k=this.k[y],R=this.k[y+1],I=i[y],O=i[y+1],T=rd(w,M,_,S,E,A,k,R,I,O),B=nd(w,M,_,S,E,A,k,R,I,O);w=cd(r,n),M=pd(r,n),_=ld(r,n,o,s,h),S=dd(r,n,o,s,h,a);var N=$l(w,M,_,S),P=td(w,M,_,S);v=m,b=g,m=c,g=p,c=l,p=d,l=$l(u,f,T,B),d=td(f,f,T,B),u=h,f=a,h=o,a=s,o=r,s=n,r=$l(T,B,N,P),n=td(T,B,N,P)}Jl(this.h,0,r,n),Jl(this.h,2,o,s),Jl(this.h,4,h,a),Jl(this.h,6,u,f),Jl(this.h,8,l,d),Jl(this.h,10,c,p),Jl(this.h,12,m,g),Jl(this.h,14,v,b)},hd.prototype._digest=function(t){return"hex"===t?Gl.toHex32(this.h,"big"):Gl.split32(this.h,"big")};var Md=Xf,_d=ad;function Sd(){if(!(this instanceof Sd))return new Sd;_d.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Md.inherits(Sd,_d);var Ed=Sd;Sd.blockSize=1024,Sd.outSize=384,Sd.hmacStrength=192,Sd.padLength=128,Sd.prototype._digest=function(t){return"hex"===t?Md.toHex32(this.h.slice(0,12),"big"):Md.split32(this.h.slice(0,12),"big")},hl.sha1=Sl,hl.sha224=Kl,hl.sha256=jl,hl.sha384=Ed,hl.sha512=ad;var Ad={},kd=Xf,Rd=rl,Id=kd.rotl32,Od=kd.sum32,Td=kd.sum32_3,Bd=kd.sum32_4,Nd=Rd.BlockHash;function Pd(){if(!(this instanceof Pd))return new Pd;Nd.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function xd(t,e,i,r){return t<=15?e^i^r:t<=31?e&i|~e&r:t<=47?(e|~i)^r:t<=63?e&r|i&~r:e^(i|~r)}function Ld(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function Dd(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}kd.inherits(Pd,Nd),Ad.ripemd160=Pd,Pd.blockSize=512,Pd.outSize=160,Pd.hmacStrength=192,Pd.padLength=64,Pd.prototype._update=function(t,e){for(var i=this.h[0],r=this.h[1],n=this.h[2],o=this.h[3],s=this.h[4],h=i,a=r,u=n,f=o,l=s,d=0;d<80;d++){var c=Od(Id(Bd(i,xd(d,r,n,o),t[Cd[d]+e],Ld(d)),Ud[d]),s);i=s,s=o,o=Id(n,10),n=r,r=c,c=Od(Id(Bd(h,xd(79-d,a,u,f),t[qd[d]+e],Dd(d)),jd[d]),l),h=l,l=f,f=Id(u,10),u=a,a=c}c=Td(this.h[1],n,f),this.h[1]=Td(this.h[2],o,l),this.h[2]=Td(this.h[3],s,h),this.h[3]=Td(this.h[4],i,a),this.h[4]=Td(this.h[0],r,u),this.h[0]=c},Pd.prototype._digest=function(t){return"hex"===t?kd.toHex32(this.h,"little"):kd.split32(this.h,"little")};var Cd=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],qd=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Ud=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],jd=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],zd=Xf,Fd=wh;function Hd(t,e,i){if(!(this instanceof Hd))return new Hd(t,e,i);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(zd.toArray(e,i))}var Kd,Gd,Yd=Hd;Hd.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),Fd(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},Hd.prototype.update=function(t,e){return this.inner.update(t,e),this},Hd.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)},function(t){var e=Wf;e.utils=Xf,e.common=rl,e.sha=hl,e.ripemd=Ad,e.hmac=Yd,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}(),function(t){var e,i=Zf,r=Wf,n=vf,o=cf.assert;function s(t){"short"===t.type?this.curve=new n.short(t):"edwards"===t.type?this.curve=new n.edwards(t):this.curve=new n.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function h(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new s(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=s,h("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),h("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),h("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{e=Gd?Kd:(Gd=1,Kd={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(t){e=void 0}h("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",e]})}();var Vd=Wf,Zd=gf,Wd=wh;function Xd(t){if(!(this instanceof Xd))return new Xd(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Zd.toArray(t.entropy,t.entropyEnc||"hex"),i=Zd.toArray(t.nonce,t.nonceEnc||"hex"),r=Zd.toArray(t.pers,t.persEnc||"hex");Wd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,i,r)}var Qd=Xd;Xd.prototype._init=function(t,e,i){var r=t.concat(e).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},Xd.prototype._hmac=function(){return new Vd.hmac(this.hash,this.K)},Xd.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},Xd.prototype.reseed=function(t,e,i,r){"string"!=typeof e&&(r=i,i=e,e=null),t=Zd.toArray(t,e),i=Zd.toArray(i,r),Wd(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1},Xd.prototype.generate=function(t,e,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=i,i=e,e=null),i&&(i=Zd.toArray(i,r||"hex"),this._update(i));for(var n=[];n.length<t;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,t);return this._update(i),this._reseed++,Zd.encode(o,e)};var Jd=pf,$d=cf.assert;function tc(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var ec=tc;tc.fromPublic=function(t,e,i){return e instanceof tc?e:new tc(t,{pub:e,pubEnc:i})},tc.fromPrivate=function(t,e,i){return e instanceof tc?e:new tc(t,{priv:e,privEnc:i})},tc.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},tc.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},tc.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},tc.prototype._importPrivate=function(t,e){this.priv=new Jd(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},tc.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?$d(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||$d(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},tc.prototype.derive=function(t){return t.validate()||$d(t.validate(),"public point not validated"),t.mul(this.priv).getX()},tc.prototype.sign=function(t,e,i){return this.ec.sign(t,this,e,i)},tc.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},tc.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var ic=pf,rc=cf,nc=rc.assert;function oc(t,e){if(t instanceof oc)return t;this._importDER(t,e)||(nc(t.r&&t.s,"Signature without r or s"),this.r=new ic(t.r,16),this.s=new ic(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var sc,hc,ac=oc;function uc(){this.place=0}function fc(t,e){var i=t[e.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,o=0,s=e.place;o<r;o++,s++)n<<=8,n|=t[s],n>>>=0;return!(n<=127)&&(e.place=s,n)}function lc(t){for(var e=0,i=t.length-1;!t[e]&&!(128&t[e+1])&&e<i;)e++;return 0===e?t:t.slice(e)}function dc(t,e){if(e<128)t.push(e);else{var i=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|i);--i;)t.push(e>>>(i<<3)&255);t.push(e)}}oc.prototype._importDER=function(t,e){t=rc.toArray(t,e);var i=new uc;if(48!==t[i.place++])return!1;var r=fc(t,i);if(!1===r)return!1;if(r+i.place!==t.length)return!1;if(2!==t[i.place++])return!1;var n=fc(t,i);if(!1===n)return!1;var o=t.slice(i.place,n+i.place);if(i.place+=n,2!==t[i.place++])return!1;var s=fc(t,i);if(!1===s)return!1;if(t.length!==s+i.place)return!1;var h=t.slice(i.place,s+i.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new ic(o),this.s=new ic(h),this.recoveryParam=null,!0},oc.prototype.toDER=function(t){var e=this.r.toArray(),i=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&i[0]&&(i=[0].concat(i)),e=lc(e),i=lc(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];dc(r,e.length),(r=r.concat(e)).push(2),dc(r,i.length);var n=r.concat(i),o=[48];return dc(o,n.length),o=o.concat(n),rc.encode(o,t)};var cc=cf,pc=cc.assert,mc=cc.parseBytes,gc=cc.cachedProperty;function vc(t,e){this.eddsa=t,this._secret=mc(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=mc(e.pub)}vc.fromPublic=function(t,e){return e instanceof vc?e:new vc(t,{pub:e})},vc.fromSecret=function(t,e){return e instanceof vc?e:new vc(t,{secret:e})},vc.prototype.secret=function(){return this._secret},gc(vc,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),gc(vc,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),gc(vc,"privBytes",(function(){var t=this.eddsa,e=this.hash(),i=t.encodingLength-1,r=e.slice(0,t.encodingLength);return r[0]&=248,r[i]&=127,r[i]|=64,r})),gc(vc,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),gc(vc,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),gc(vc,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),vc.prototype.sign=function(t){return pc(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},vc.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},vc.prototype.getSecret=function(t){return pc(this._secret,"KeyPair is public only"),cc.encode(this.secret(),t)},vc.prototype.getPublic=function(t){return cc.encode(this.pubBytes(),t)};var bc=vc,yc=pf,wc=cf,Mc=wc.assert,_c=wc.cachedProperty,Sc=wc.parseBytes;function Ec(t,e){this.eddsa=t,"object"!=typeof e&&(e=Sc(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),Mc(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof yc&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}_c(Ec,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),_c(Ec,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),_c(Ec,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),_c(Ec,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Ec.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Ec.prototype.toHex=function(){return wc.encode(this.toBytes(),"hex").toUpperCase()};var Ac=Ec,kc=Wf,Rc=Zf,Ic=cf,Oc=Ic.assert,Tc=Ic.parseBytes,Bc=bc,Nc=Ac;function Pc(t){if(Oc("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof Pc))return new Pc(t);t=Rc[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=kc.sha512}var xc,Lc=Pc;function Dc(){return xc||(xc=1,function(t){var e=t;e.version=df.version,e.utils=cf,e.rand=Vu(),e.curve=vf,e.curves=Zf,e.ec=function(){if(hc)return sc;hc=1;var t=pf,e=Qd,i=cf,r=Zf,n=Vu(),o=i.assert,s=ec,h=ac;function a(t){if(!(this instanceof a))return new a(t);"string"==typeof t&&(o(Object.prototype.hasOwnProperty.call(r,t),"Unknown curve "+t),t=r[t]),t instanceof r.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}return sc=a,a.prototype.keyPair=function(t){return new s(this,t)},a.prototype.keyFromPrivate=function(t,e){return s.fromPrivate(this,t,e)},a.prototype.keyFromPublic=function(t,e){return s.fromPublic(this,t,e)},a.prototype.genKeyPair=function(i){i||(i={});for(var r=new e({hash:this.hash,pers:i.pers,persEnc:i.persEnc||"utf8",entropy:i.entropy||n(this.hash.hmacStrength),entropyEnc:i.entropy&&i.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),s=this.n.sub(new t(2));;){var h=new t(r.generate(o));if(!(h.cmp(s)>0))return h.iaddn(1),this.keyFromPrivate(h)}},a.prototype._truncateToN=function(t,e){var i=8*t.byteLength()-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},a.prototype.sign=function(i,r,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),r=this.keyFromPrivate(r,n),i=this._truncateToN(new t(i,16));for(var s=this.n.byteLength(),a=r.getPrivate().toArray("be",s),u=i.toArray("be",s),f=new e({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new t(1)),d=0;;d++){var c=o.k?o.k(d):new t(f.generate(this.n.byteLength()));if(!((c=this._truncateToN(c,!0)).cmpn(1)<=0||c.cmp(l)>=0)){var p=this.g.mul(c);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=c.invm(this.n).mul(g.mul(r.getPrivate()).iadd(i));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new h({r:g,s:v,recoveryParam:b})}}}}}},a.prototype.verify=function(e,i,r,n){e=this._truncateToN(new t(e,16)),r=this.keyFromPublic(r,n);var o=(i=new h(i,"hex")).r,s=i.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),f=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(f,r.getPublic(),l)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(f,r.getPublic(),l)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},a.prototype.recoverPubKey=function(e,i,r,n){o((3&r)===r,"The recovery param is more than two bits"),i=new h(i,n);var s=this.n,a=new t(e),u=i.r,f=i.s,l=1&r,d=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");u=d?this.curve.pointFromX(u.add(this.curve.n),l):this.curve.pointFromX(u,l);var c=i.r.invm(s),p=s.sub(a).mul(c).umod(s),m=f.mul(c).umod(s);return this.g.mulAdd(p,u,m)},a.prototype.getKeyRecoveryParam=function(t,e,i,r){if(null!==(e=new h(e,r)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(t,e,n)}catch(t){continue}if(o.eq(i))return n}throw new Error("Unable to find valid recovery factor")},sc}(),e.eddsa=Lc}(lf)),lf}Pc.prototype.sign=function(t,e){t=Tc(t);var i=this.keyFromSecret(e),r=this.hashInt(i.messagePrefix(),t),n=this.g.mul(r),o=this.encodePoint(n),s=this.hashInt(o,i.pubBytes(),t).mul(i.priv()),h=r.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:h,Rencoded:o})},Pc.prototype.verify=function(t,e,i){t=Tc(t),e=this.makeSignature(e);var r=this.keyFromPublic(i),n=this.hashInt(e.Rencoded(),r.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(r.pub().mul(n)).eq(o)},Pc.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return Ic.intFromLE(t.digest()).umod(this.curve.n)},Pc.prototype.keyFromPublic=function(t){return Bc.fromPublic(this,t)},Pc.prototype.keyFromSecret=function(t){return Bc.fromSecret(this,t)},Pc.prototype.makeSignature=function(t){return t instanceof Nc?t:new Nc(this,t)},Pc.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},Pc.prototype.decodePoint=function(t){var e=(t=Ic.parseBytes(t)).length-1,i=t.slice(0,e).concat(-129&t[e]),r=0!=(128&t[e]),n=Ic.intFromLE(i);return this.curve.pointFromY(n,r)},Pc.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},Pc.prototype.decodeInt=function(t){return Ic.intFromLE(t)},Pc.prototype.isPoint=function(t){return t instanceof this.pointClass};var Cc={},qc={},Uc={},jc={get exports(){return Uc},set exports(t){Uc=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 d(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],N=8191&B,P=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,F))+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(N,K)|0,n=(n=n+Math.imul(N,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(N,V)|0,n=(n=n+Math.imul(N,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|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=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(N,X)|0,n=(n=n+Math.imul(N,Q)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|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 Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(N,it)|0,n=(n=n+Math.imul(N,rt)|0)+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(N,ot)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(N,at)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(P,at)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,dt)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Nt=(u+(r=r+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((o=o+Math.imul(P,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Pt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Nt,a[17]=Pt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,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()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(jc,gt);var zc,Fc={},Hc={},Kc=me,Gc=Kc.Buffer,Yc={};for(zc in Kc)Kc.hasOwnProperty(zc)&&"SlowBuffer"!==zc&&"Buffer"!==zc&&(Yc[zc]=Kc[zc]);var Vc=Yc.Buffer={};for(zc in Gc)Gc.hasOwnProperty(zc)&&"allocUnsafe"!==zc&&"allocUnsafeSlow"!==zc&&(Vc[zc]=Gc[zc]);if(Yc.Buffer.prototype=Gc.prototype,Vc.from&&Vc.from!==Uint8Array.from||(Vc.from=function(t,e,i){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return Gc(t,e,i)}),Vc.alloc||(Vc.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=Gc(t);return e&&0!==e.length?"string"==typeof i?r.fill(e,i):r.fill(e):r.fill(0),r}),!Yc.kStringMaxLength)try{Yc.kStringMaxLength=ae.binding("buffer").kStringMaxLength}catch(t){}Yc.constants||(Yc.constants={MAX_LENGTH:Yc.kMaxLength},Yc.kStringMaxLength&&(Yc.constants.MAX_STRING_LENGTH=Yc.kStringMaxLength));var Zc=Yc,Wc={};const Xc=we;function Qc(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function Jc(t,e){this.path=t,this.rethrow(e)}Wc.Reporter=Qc,Qc.prototype.isError=function(t){return t instanceof Jc},Qc.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},Qc.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},Qc.prototype.enterKey=function(t){return this._reporterState.path.push(t)},Qc.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},Qc.prototype.leaveKey=function(t,e,i){const r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=i)},Qc.prototype.path=function(){return this._reporterState.path.join("/")},Qc.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},Qc.prototype.leaveObject=function(t){const e=this._reporterState,i=e.obj;return e.obj=t,i},Qc.prototype.error=function(t){let e;const i=this._reporterState,r=t instanceof Jc;if(e=r?t:new Jc(i.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!i.options.partial)throw e;return r||i.errors.push(e),e},Qc.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},Xc(Jc,Error),Jc.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Jc),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this};var $c={};const tp=we,ep=Wc.Reporter,ip=Zc.Buffer;function rp(t,e){ep.call(this,e),ip.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function np(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return np.isEncoderBuffer(t)||(t=new np(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=ip.byteLength(t);else{if(!ip.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}tp(rp,ep),$c.DecoderBuffer=rp,rp.isDecoderBuffer=function(t){if(t instanceof rp)return!0;return"object"==typeof t&&ip.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},rp.prototype.save=function(){return{offset:this.offset,reporter:ep.prototype.save.call(this)}},rp.prototype.restore=function(t){const e=new rp(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,ep.prototype.restore.call(this,t.reporter),e},rp.prototype.isEmpty=function(){return this.offset===this.length},rp.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},rp.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");const i=new rp(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+t,this.offset+=t,i},rp.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},$c.EncoderBuffer=np,np.isEncoderBuffer=function(t){if(t instanceof np)return!0;return"object"==typeof t&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},np.prototype.join=function(t,e){return t||(t=ip.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(t,e),e+=i.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):ip.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t};const op=Wc.Reporter,sp=$c.EncoderBuffer,hp=$c.DecoderBuffer,ap=wh,up=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],fp=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(up);function lp(t,e,i){const r={};this._baseState=r,r.name=i,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var dp=lp;const cp=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];lp.prototype.clone=function(){const t=this._baseState,e={};cp.forEach((function(i){e[i]=t[i]}));const i=new this.constructor(e.parent);return i._baseState=e,i},lp.prototype._wrap=function(){const t=this._baseState;fp.forEach((function(e){this[e]=function(){const i=new this.constructor(this);return t.children.push(i),i[e].apply(i,arguments)}}),this)},lp.prototype._init=function(t){const e=this._baseState;ap(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),ap.equal(e.children.length,1,"Root node can have only one child")},lp.prototype._useArgs=function(t){const e=this._baseState,i=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==i.length&&(ap(null===e.children),e.children=i,i.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(ap(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(i){i==(0|i)&&(i|=0);const r=t[i];e[r]=i})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){lp.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),up.forEach((function(t){lp.prototype[t]=function(){const e=this._baseState,i=Array.prototype.slice.call(arguments);return ap(null===e.tag),e.tag=t,this._useArgs(i),this}})),lp.prototype.use=function(t){ap(t);const e=this._baseState;return ap(null===e.use),e.use=t,this},lp.prototype.optional=function(){return this._baseState.optional=!0,this},lp.prototype.def=function(t){const e=this._baseState;return ap(null===e.default),e.default=t,e.optional=!0,this},lp.prototype.explicit=function(t){const e=this._baseState;return ap(null===e.explicit&&null===e.implicit),e.explicit=t,this},lp.prototype.implicit=function(t){const e=this._baseState;return ap(null===e.explicit&&null===e.implicit),e.implicit=t,this},lp.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},lp.prototype.key=function(t){const e=this._baseState;return ap(null===e.key),e.key=t,this},lp.prototype.any=function(){return this._baseState.any=!0,this},lp.prototype.choice=function(t){const e=this._baseState;return ap(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},lp.prototype.contains=function(t){const e=this._baseState;return ap(null===e.use),e.contains=t,this},lp.prototype._decode=function(t,e){const i=this._baseState;if(null===i.parent)return t.wrapResult(i.children[0]._decode(t,e));let r,n=i.default,o=!0,s=null;if(null!==i.key&&(s=t.enterKey(i.key)),i.optional){let r=null;if(null!==i.explicit?r=i.explicit:null!==i.implicit?r=i.implicit:null!==i.tag&&(r=i.tag),null!==r||i.any){if(o=this._peekTag(t,r,i.any),t.isError(o))return o}else{const r=t.save();try{null===i.choice?this._decodeGeneric(i.tag,t,e):this._decodeChoice(t,e),o=!0}catch(t){o=!1}t.restore(r)}}if(i.obj&&o&&(r=t.enterObject()),o){if(null!==i.explicit){const e=this._decodeTag(t,i.explicit);if(t.isError(e))return e;t=e}const r=t.offset;if(null===i.use&&null===i.choice){let e;i.any&&(e=t.save());const r=this._decodeTag(t,null!==i.implicit?i.implicit:i.tag,i.any);if(t.isError(r))return r;i.any?n=t.raw(e):t=r}if(e&&e.track&&null!==i.tag&&e.track(t.path(),r,t.length,"tagged"),e&&e.track&&null!==i.tag&&e.track(t.path(),t.offset,t.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,t,e):this._decodeChoice(t,e)),t.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(i){i._decode(t,e)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){const r=new hp(n);n=this._getUse(i.contains,t._reporterState.obj)._decode(r,e)}}return i.obj&&o&&(n=t.leaveObject(r)),null===i.key||null===n&&!0!==o?null!==s&&t.exitKey(s):t.leaveKey(s,i.key,n),n},lp.prototype._decodeGeneric=function(t,e,i){const r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],i):/str$/.test(t)?this._decodeStr(e,t,i):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],i):"objid"===t?this._decodeObjid(e,null,null,i):"gentime"===t||"utctime"===t?this._decodeTime(e,t,i):"null_"===t?this._decodeNull(e,i):"bool"===t?this._decodeBool(e,i):"objDesc"===t?this._decodeStr(e,t,i):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,i):e.error("unknown tag: "+t)},lp.prototype._getUse=function(t,e){const i=this._baseState;return i.useDecoder=this._use(t,e),ap(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},lp.prototype._decodeChoice=function(t,e){const i=this._baseState;let r=null,n=!1;return Object.keys(i.choice).some((function(o){const s=t.save(),h=i.choice[o];try{const i=h._decode(t,e);if(t.isError(i))return!1;r={type:o,value:i},n=!0}catch(e){return t.restore(s),!1}return!0}),this),n?r:t.error("Choice not matched")},lp.prototype._createEncoderBuffer=function(t){return new sp(t,this.reporter)},lp.prototype._encode=function(t,e,i){const r=this._baseState;if(null!==r.default&&r.default===t)return;const n=this._encodeValue(t,e,i);return void 0===n||this._skipDefault(n,e,i)?void 0:n},lp.prototype._encodeValue=function(t,e,i){const r=this._baseState;if(null===r.parent)return r.children[0]._encode(t,e||new op);let n=null;if(this.reporter=e,r.optional&&void 0===t){if(null===r.default)return;t=r.default}let o=null,s=!1;if(r.any)n=this._createEncoderBuffer(t);else if(r.choice)n=this._encodeChoice(t,e);else if(r.contains)o=this._getUse(r.contains,i)._encode(t,e),s=!0;else if(r.children)o=r.children.map((function(i){if("null_"===i._baseState.tag)return i._encode(null,e,t);if(null===i._baseState.key)return e.error("Child should have a key");const r=e.enterKey(i._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const n=i._encode(t[i._baseState.key],e,t);return e.leaveKey(r),n}),this).filter((function(t){return t})),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return e.error("Too many args for : "+r.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const i=this.clone();i._baseState.implicit=null,o=this._createEncoderBuffer(t.map((function(i){const r=this._baseState;return this._getUse(r.args[0],t)._encode(i,e)}),i))}else null!==r.use?n=this._getUse(r.use,i)._encode(t,e):(o=this._encodePrimitive(r.tag,t),s=!0);if(!r.any&&null===r.choice){const t=null!==r.implicit?r.implicit:r.tag,i=null===r.implicit?"universal":"context";null===t?null===r.use&&e.error("Tag could be omitted only for .use()"):null===r.use&&(n=this._encodeComposite(t,s,i,o))}return null!==r.explicit&&(n=this._encodeComposite(r.explicit,!1,"context",n)),n},lp.prototype._encodeChoice=function(t,e){const i=this._baseState,r=i.choice[t.type];return r||ap(!1,t.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(t.value,e)},lp.prototype._encodePrimitive=function(t,e){const i=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&i.args)return this._encodeObjid(e,i.reverseArgs[0],i.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,i.args&&i.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},lp.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},lp.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)};var pp={};!function(t){function e(t){const e={};return Object.keys(t).forEach((function(i){(0|i)==i&&(i|=0);const r=t[i];e[r]=i})),e}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e(t.tag)}(pp);const mp=we,gp=Zc.Buffer,vp=dp,bp=pp;function yp(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Mp,this.tree._init(t.body)}var wp=yp;function Mp(t){vp.call(this,"der",t)}function _p(t){return t<10?"0"+t:t}yp.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},mp(Mp,vp),Mp.prototype._encodeComposite=function(t,e,i,r){const n=function(t,e,i,r){let n;"seqof"===t?t="seq":"setof"===t&&(t="set");if(bp.tagByName.hasOwnProperty(t))n=bp.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);n=t}if(n>=31)return r.error("Multi-octet tag encoding unsupported");e||(n|=32);return n|=bp.tagClassByName[i||"universal"]<<6,n}(t,e,i,this.reporter);if(r.length<128){const t=gp.alloc(2);return t[0]=n,t[1]=r.length,this._createEncoderBuffer([t,r])}let o=1;for(let t=r.length;t>=256;t>>=8)o++;const s=gp.alloc(2+o);s[0]=n,s[1]=128|o;for(let t=1+o,e=r.length;e>0;t--,e>>=8)s[t]=255&e;return this._createEncoderBuffer([s,r])},Mp.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=gp.alloc(2*t.length);for(let i=0;i<t.length;i++)e.writeUInt16BE(t.charCodeAt(i),2*i);return this._createEncoderBuffer(e)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},Mp.prototype._encodeObjid=function(t,e,i){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s.]+/g);for(let e=0;e<t.length;e++)t[e]|=0}else if(Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!i){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let r=0;for(let e=0;e<t.length;e++){let i=t[e];for(r++;i>=128;i>>=7)r++}const n=gp.alloc(r);let o=n.length-1;for(let e=t.length-1;e>=0;e--){let i=t[e];for(n[o--]=127&i;(i>>=7)>0;)n[o--]=128|127&i}return this._createEncoderBuffer(n)},Mp.prototype._encodeTime=function(t,e){let i;const r=new Date(t);return"gentime"===e?i=[_p(r.getUTCFullYear()),_p(r.getUTCMonth()+1),_p(r.getUTCDate()),_p(r.getUTCHours()),_p(r.getUTCMinutes()),_p(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?i=[_p(r.getUTCFullYear()%100),_p(r.getUTCMonth()+1),_p(r.getUTCDate()),_p(r.getUTCHours()),_p(r.getUTCMinutes()),_p(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(i,"octstr")},Mp.prototype._encodeNull=function(){return this._createEncoderBuffer("")},Mp.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!gp.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=gp.from(e)}if(gp.isBuffer(t)){let e=t.length;0===t.length&&e++;const i=gp.alloc(e);return t.copy(i),0===t.length&&(i[0]=0),this._createEncoderBuffer(i)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let i=1;for(let e=t;e>=256;e>>=8)i++;const r=new Array(i);for(let e=r.length-1;e>=0;e--)r[e]=255&t,t>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(gp.from(r))},Mp.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},Mp.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},Mp.prototype._skipDefault=function(t,e,i){const r=this._baseState;let n;if(null===r.default)return!1;const o=t.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,e,i).join()),o.length!==r.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==r.defaultBuffer[n])return!1;return!0};const Sp=wp;function Ep(t){Sp.call(this,t),this.enc="pem"}we(Ep,Sp);var Ap=Ep;Ep.prototype.encode=function(t,e){const i=Sp.prototype.encode.call(this,t).toString("base64"),r=["-----BEGIN "+e.label+"-----"];for(let t=0;t<i.length;t+=64)r.push(i.slice(t,t+64));return r.push("-----END "+e.label+"-----"),r.join("\n")},function(t){const e=t;e.der=wp,e.pem=Ap}(Hc);var kp={};const Rp=we,Ip=Uc,Op=$c.DecoderBuffer,Tp=dp,Bp=pp;function Np(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new xp,this.tree._init(t.body)}var Pp=Np;function xp(t){Tp.call(this,"der",t)}function Lp(t,e){let i=t.readUInt8(e);if(t.isError(i))return i;const r=Bp.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){let r=i;for(i=0;128==(128&r);){if(r=t.readUInt8(e),t.isError(r))return r;i<<=7,i|=127&r}}else i&=31;return{cls:r,primitive:n,tag:i,tagStr:Bp.tag[i]}}function Dp(t,e,i){let r=t.readUInt8(i);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;const n=127&r;if(n>4)return t.error("length octect is too long");r=0;for(let e=0;e<n;e++){r<<=8;const e=t.readUInt8(i);if(t.isError(e))return e;r|=e}return r}Np.prototype.decode=function(t,e){return Op.isDecoderBuffer(t)||(t=new Op(t,e)),this.tree._decode(t,e)},Rp(xp,Tp),xp.prototype._peekTag=function(t,e,i){if(t.isEmpty())return!1;const r=t.save(),n=Lp(t,'Failed to peek tag: "'+e+'"');return t.isError(n)?n:(t.restore(r),n.tag===e||n.tagStr===e||n.tagStr+"of"===e||i)},xp.prototype._decodeTag=function(t,e,i){const r=Lp(t,'Failed to decode tag of "'+e+'"');if(t.isError(r))return r;let n=Dp(t,r.primitive,'Failed to get length of "'+e+'"');if(t.isError(n))return n;if(!i&&r.tag!==e&&r.tagStr!==e&&r.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(r.primitive||null!==n)return t.skip(n,'Failed to match body of: "'+e+'"');const o=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(n=t.offset-o.offset,t.restore(o),t.skip(n,'Failed to match body of: "'+e+'"'))},xp.prototype._skipUntilEnd=function(t,e){for(;;){const i=Lp(t,e);if(t.isError(i))return i;const r=Dp(t,i.primitive,e);if(t.isError(r))return r;let n;if(n=i.primitive||null!==r?t.skip(r):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===i.tagStr)break}},xp.prototype._decodeList=function(t,e,i,r){const n=[];for(;!t.isEmpty();){const e=this._peekTag(t,"end");if(t.isError(e))return e;const o=i.decode(t,"der",r);if(t.isError(o)&&e)break;n.push(o)}return n},xp.prototype._decodeStr=function(t,e){if("bitstr"===e){const e=t.readUInt8();return t.isError(e)?e:{unused:e,data:t.raw()}}if("bmpstr"===e){const e=t.raw();if(e.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");let i="";for(let t=0;t<e.length/2;t++)i+=String.fromCharCode(e.readUInt16BE(2*t));return i}if("numstr"===e){const e=t.raw().toString("ascii");return this._isNumstr(e)?e:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){const e=t.raw().toString("ascii");return this._isPrintstr(e)?e:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},xp.prototype._decodeObjid=function(t,e,i){let r;const n=[];let o=0,s=0;for(;!t.isEmpty();)s=t.readUInt8(),o<<=7,o|=127&s,0==(128&s)&&(n.push(o),o=0);128&s&&n.push(o);const h=n[0]/40|0,a=n[0]%40;if(r=i?n:[h,a].concat(n.slice(1)),e){let t=e[r.join(" ")];void 0===t&&(t=e[r.join(".")]),void 0!==t&&(r=t)}return r},xp.prototype._decodeTime=function(t,e){const i=t.raw().toString();let r,n,o,s,h,a;if("gentime"===e)r=0|i.slice(0,4),n=0|i.slice(4,6),o=0|i.slice(6,8),s=0|i.slice(8,10),h=0|i.slice(10,12),a=0|i.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");r=0|i.slice(0,2),n=0|i.slice(2,4),o=0|i.slice(4,6),s=0|i.slice(6,8),h=0|i.slice(8,10),a=0|i.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,n-1,o,s,h,a,0)},xp.prototype._decodeNull=function(){return null},xp.prototype._decodeBool=function(t){const e=t.readUInt8();return t.isError(e)?e:0!==e},xp.prototype._decodeInt=function(t,e){const i=t.raw();let r=new Ip(i);return e&&(r=e[r.toString(10)]||r),r},xp.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree};const Cp=we,qp=Zc.Buffer,Up=Pp;function jp(t){Up.call(this,t),this.enc="pem"}Cp(jp,Up);var zp=jp;jp.prototype.decode=function(t,e){const i=t.toString().split(/[\r\n]+/g),r=e.label.toUpperCase(),n=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,s=-1;for(let t=0;t<i.length;t++){const e=i[t].match(n);if(null!==e&&e[2]===r){if(-1!==o){if("END"!==e[1])break;s=t;break}if("BEGIN"!==e[1])break;o=t}}if(-1===o||-1===s)throw new Error("PEM section not found for: "+r);const h=i.slice(o+1,s).join("");h.replace(/[^a-z0-9+/=]+/gi,"");const a=qp.from(h,"base64");return Up.prototype.decode.call(this,a,e)},function(t){const e=t;e.der=Pp,e.pem=zp}(kp),function(t){const e=Hc,i=kp,r=we;function n(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}t.define=function(t,e){return new n(t,e)},n.prototype._createNamed=function(t){const e=this.name;function i(t){this._initNamed(t,e)}return r(i,t),i.prototype._initNamed=function(e,i){t.call(this,e,i)},new i(this)},n.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i[t])),this.decoders[t]},n.prototype.decode=function(t,e,i){return this._getDecoder(e).decode(t,i)},n.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(e[t])),this.encoders[t]},n.prototype.encode=function(t,e,i){return this._getEncoder(e).encode(t,i)}}(Fc);var Fp={};!function(t){const e=t;e.Reporter=Wc.Reporter,e.DecoderBuffer=$c.DecoderBuffer,e.EncoderBuffer=$c.EncoderBuffer,e.Node=dp}(Fp);var Hp={};!function(t){const e=Hp;e._reverse=function(t){const e={};return Object.keys(t).forEach((function(i){(0|i)==i&&(i|=0);const r=t[i];e[r]=i})),e},e.der=pp}(),function(t){const e=qc;e.bignum=Uc,e.define=Fc.define,e.base=Fp,e.constants=Hp,e.decoders=kp,e.encoders=Hc}();var Kp=qc,Gp=Kp.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),Yp=Kp.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),Vp=Kp.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),Zp=Kp.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Vp),this.key("subjectPublicKey").bitstr())})),Wp=Kp.define("RelativeDistinguishedName",(function(){this.setof(Yp)})),Xp=Kp.define("RDNSequence",(function(){this.seqof(Wp)})),Qp=Kp.define("Name",(function(){this.choice({rdnSequence:this.use(Xp)})})),Jp=Kp.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(Gp),this.key("notAfter").use(Gp))})),$p=Kp.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),tm=Kp.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Vp),this.key("issuer").use(Qp),this.key("validity").use(Jp),this.key("subject").use(Qp),this.key("subjectPublicKeyInfo").use(Zp),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof($p).optional())})),em=Kp.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(tm),this.key("signatureAlgorithm").use(Vp),this.key("signatureValue").bitstr())})),im=qc;Cc.certificate=em;var rm=im.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));Cc.RSAPrivateKey=rm;var nm=im.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));Cc.RSAPublicKey=nm;var om=im.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(sm),this.key("subjectPublicKey").bitstr())}));Cc.PublicKey=om;var sm=im.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),hm=im.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(sm),this.key("subjectPrivateKey").octstr())}));Cc.PrivateKey=hm;var am=im.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));Cc.EncryptedPrivateKey=am;var um=im.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));Cc.DSAPrivateKey=um,Cc.DSAparam=im.define("DSAparam",(function(){this.int()}));var fm=im.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(lm),this.key("publicKey").optional().explicit(1).bitstr())}));Cc.ECPrivateKey=fm;var lm=im.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));Cc.signature=im.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}));var dm=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,cm=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,pm=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,mm=eu,gm=Xh,vm=ce.Buffer,bm=Cc,ym={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"},wm=function(t,e){var i,r=t.toString(),n=r.match(dm);if(n){var o="aes"+n[1],s=vm.from(n[2],"hex"),h=vm.from(n[3].replace(/[\r\n]/g,""),"base64"),a=mm(e,s.slice(0,8),parseInt(n[1],10)).key,u=[],f=gm.createDecipheriv(o,a,s);u.push(f.update(h)),u.push(f.final()),i=vm.concat(u)}else{var l=r.match(pm);i=vm.from(l[2].replace(/[\r\n]/g,""),"base64")}return{tag:r.match(cm)[1],data:i}},Mm=Xh,_m=Us,Sm=ce.Buffer,Em=Am;function Am(t){var e;"object"!=typeof t||Sm.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=Sm.from(t));var i,r,n=wm(t,e),o=n.tag,s=n.data;switch(o){case"CERTIFICATE":r=bm.certificate.decode(s,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(r||(r=bm.PublicKey.decode(s,"der")),i=r.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return bm.RSAPublicKey.decode(r.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return r.subjectPrivateKey=r.subjectPublicKey,{type:"ec",data:r};case"1.2.840.10040.4.1":return r.algorithm.params.pub_key=bm.DSAparam.decode(r.subjectPublicKey.data,"der"),{type:"dsa",data:r.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":s=function(t,e){var i=t.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=ym[t.algorithm.decrypt.cipher.algo.join(".")],o=t.algorithm.decrypt.cipher.iv,s=t.subjectPrivateKey,h=parseInt(n.split("-")[1],10)/8,a=_m.pbkdf2Sync(e,i,r,h,"sha1"),u=Mm.createDecipheriv(n,a,o),f=[];return f.push(u.update(s)),f.push(u.final()),Sm.concat(f)}(s=bm.EncryptedPrivateKey.decode(s,"der"),e);case"PRIVATE KEY":switch(i=(r=bm.PrivateKey.decode(s,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return bm.RSAPrivateKey.decode(r.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:r.algorithm.curve,privateKey:bm.ECPrivateKey.decode(r.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return r.algorithm.params.priv_key=bm.DSAparam.decode(r.subjectPrivateKey,"der"),{type:"dsa",params:r.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return bm.RSAPublicKey.decode(s,"der");case"RSA PRIVATE KEY":return bm.RSAPrivateKey.decode(s,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:bm.DSAPrivateKey.decode(s,"der")};case"EC PRIVATE KEY":return{curve:(s=bm.ECPrivateKey.decode(s,"der")).parameters.value,privateKey:s.privateKey};default:throw new Error("unknown key type "+o)}}Am.signature=bm.signature;var km,Rm,Im,Om,Tm,Bm={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};function Nm(){if(km)return ef;km=1;var t=ce.Buffer,e=xs,i=ff,r=Dc().ec,n=nf,o=Em,s=Bm;function h(i,r,n,o){if((i=t.from(i.toArray())).length<r.byteLength()){var s=t.alloc(r.byteLength()-i.length);i=t.concat([s,i])}var h=n.length,u=function(e,i){e=a(e,i),e=e.mod(i);var r=t.from(e.toArray());if(r.length<i.byteLength()){var n=t.alloc(i.byteLength()-r.length);r=t.concat([n,r])}return r}(n,r),f=t.alloc(h);f.fill(1);var l=t.alloc(h);return l=e(o,l).update(f).update(t.from([0])).update(i).update(u).digest(),f=e(o,l).update(f).digest(),{k:l=e(o,l).update(f).update(t.from([1])).update(i).update(u).digest(),v:f=e(o,l).update(f).digest()}}function a(t,e){var i=new n(t),r=(t.length<<3)-e.bitLength();return r>0&&i.ishrn(r),i}function u(i,r,n){var o,s;do{for(o=t.alloc(0);8*o.length<i.bitLength();)r.v=e(n,r.k).update(r.v).digest(),o=t.concat([o,r.v]);s=a(o,i),r.k=e(n,r.k).update(r.v).update(t.from([0])).digest(),r.v=e(n,r.k).update(r.v).digest()}while(-1!==s.cmp(i));return s}function f(t,e,i,r){return t.toRed(n.mont(i)).redPow(e).fromRed().mod(r)}return rf.exports=function(e,l,d,c,p){var m=o(l);if(m.curve){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong private key type");return function(e,i){var n=s[i.curve.join(".")];if(!n)throw new Error("unknown curve "+i.curve.join("."));var o=new r(n),h=o.keyFromPrivate(i.privateKey),a=h.sign(e);return t.from(a.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==c)throw new Error("wrong private key type");return function(e,i,r){var o,s=i.params.priv_key,l=i.params.p,d=i.params.q,c=i.params.g,p=new n(0),m=a(e,d).mod(d),g=!1,v=h(s,d,e,r);for(;!1===g;)p=f(c,o=u(d,v,r),l,d),0===(g=o.invm(d).imul(m.add(s.mul(p))).mod(d)).cmpn(0)&&(g=!1,p=new n(0));return function(e,i){e=e.toArray(),i=i.toArray(),128&e[0]&&(e=[0].concat(e));128&i[0]&&(i=[0].concat(i));var r=e.length+i.length+4,n=[48,r,2,e.length];return n=n.concat(e,[2,i.length],i),t.from(n)}(p,g)}(e,m,d)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong private key type");e=t.concat([p,e]);for(var g=m.modulus.byteLength(),v=[0,1];e.length+v.length+1<g;)v.push(255);v.push(0);for(var b=-1;++b<e.length;)v.push(e[b]);return i(v,m)},ef.getKey=h,ef.makeKey=u,ef}function Pm(){if(Im)return Rm;Im=1;var t=ce.Buffer,e=nf,i=Dc().ec,r=Em,n=Bm;function o(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}return Rm=function(s,h,a,u,f){var l=r(a);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,r){var o=n[r.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var s=new i(o),h=r.data.subjectPrivateKey.data;return s.verify(e,t,h)}(s,h,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,i,n){var s=n.data.p,h=n.data.q,a=n.data.g,u=n.data.pub_key,f=r.signature.decode(t,"der"),l=f.s,d=f.r;o(l,h),o(d,h);var c=e.mont(s),p=l.invm(h),m=a.toRed(c).redPow(new e(i).mul(p).mod(h)).fromRed().mul(u.toRed(c).redPow(d.mul(p).mod(h)).fromRed()).mod(s).mod(h);return 0===m.cmp(d)}(s,h,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");h=t.concat([f,h]);for(var d=l.modulus.byteLength(),c=[1],p=0;h.length+c.length+2<d;)c.push(255),p++;c.push(0);for(var m=-1;++m<h.length;)c.push(h[m]);c=t.from(c);var g=e.mont(l.modulus);s=(s=new e(s).toRed(g)).redPow(new e(l.publicExponent)),s=t.from(s.fromRed().toArray());var v=p<8?1:0;for(d=Math.min(s.length,c.length),s.length!==c.length&&(v=1),m=-1;++m<d;)v|=s[m]^c[m];return 0===v},Rm}var xm,Lm,Dm={},Cm={get exports(){return Dm},set exports(t){Dm=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 d(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],N=8191&B,P=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,F))+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(N,K)|0,n=(n=n+Math.imul(N,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(N,V)|0,n=(n=n+Math.imul(N,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|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=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(N,X)|0,n=(n=n+Math.imul(N,Q)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|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 Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(N,it)|0,n=(n=n+Math.imul(N,rt)|0)+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(N,ot)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(N,at)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(P,at)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,dt)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Nt=(u+(r=r+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((o=o+Math.imul(P,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Pt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Nt,a[17]=Pt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,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()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Cm,gt);var qm={},Um=gs,jm=ce.Buffer,zm=function(t,e){for(var i,r=jm.alloc(0),n=0;r.length<e;)i=Fm(n++),r=jm.concat([r,Um("sha1").update(t).update(i).digest()]);return r.slice(0,e)};function Fm(t){var e=jm.allocUnsafe(4);return e.writeUInt32BE(t,0),e}var Hm=function(t,e){for(var i=t.length,r=-1;++r<i;)t[r]^=e[r];return t},Km={},Gm={get exports(){return Km},set exports(t){Km=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 d(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,d=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=d;c++){var p=u-c|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[c])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=f[t],c=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var c=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,d=f>>>13,c=0|s[1],p=8191&c,m=c>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,I=0|s[6],O=8191&I,T=I>>>13,B=0|s[7],N=8191&B,P=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],q=8191&C,U=C>>>13,j=0|h[0],z=8191&j,F=j>>>13,H=0|h[1],K=8191&H,G=H>>>13,Y=0|h[2],V=8191&Y,Z=Y>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,dt=ft>>>13,ct=0|h[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,V)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,V)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,V)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,V)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(d,it)|0))<<13)|0;u=((o=o+Math.imul(d,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=(n=Math.imul(O,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,V)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;u=((o=o+Math.imul(d,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,F))+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(O,K)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,V)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(d,at)|0))<<13)|0;u=((o=o+Math.imul(d,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(N,K)|0,n=(n=n+Math.imul(N,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(O,V)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;u=((o=o+Math.imul(d,dt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,z),n=(n=Math.imul(q,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(N,V)|0,n=(n=n+Math.imul(N,Z)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|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=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;u=((o=o+Math.imul(d,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,K),n=(n=Math.imul(q,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,V)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(N,X)|0,n=(n=n+Math.imul(N,Q)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,Q)|0,r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,V),n=(n=Math.imul(q,Z))+Math.imul(U,V)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|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 Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,X),n=(n=Math.imul(q,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(N,it)|0,n=(n=n+Math.imul(N,rt)|0)+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var It=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(N,ot)|0,n=(n=n+Math.imul(N,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,dt)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,dt)|0;var Ot=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(N,at)|0,n=(n=n+Math.imul(N,ut)|0)+Math.imul(P,at)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(N,lt)|0,n=(n=n+Math.imul(N,dt)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0;var Bt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Nt=(u+(r=r+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((o=o+Math.imul(P,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,dt))+Math.imul(U,lt)|0,o=Math.imul(U,dt);var Pt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var xt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=It,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=Nt,a[17]=Pt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(c=d),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?c(this,t,e):r<63?d(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),d=67108863&l;h=67108863&(d=d+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,d=u,c=0;c<s;c++){var p=i[f+c],m=r[f+c],g=i[f+c+s],v=r[f+c+s],b=l*g-d*v;v=l*v+d*g,g=b,i[f+c]=p+g,r[f+c]=m+v,i[f+c+s]=p-g,r[f+c+s]=m-v,c!==h&&(b=a*l-u*d,d=a*d+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=i.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var c=0;c<r;c++){var p=h[c]*f[c]-a[c]*l[c];a[c]=h[c]*l[c]+a[c]*f[c],h[c]=p}return this.conjugate(h,a,r),this.transform(h,a,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()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var d=0,c=1;0==(e.words[0]&c)&&d<26;++d,c<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),d=this.pow(t,o.addn(1).iushrn(1)),c=this.pow(t,o),p=s;0!==c.cmp(h);){for(var m=c,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),c=c.redMul(l),p=g}return d},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Gm,gt);var Ym=Km,Vm=ce.Buffer;var Zm=function(t,e){return Vm.from(t.toRed(Ym.mont(e.modulus)).redPow(new Ym(e.publicExponent)).fromRed().toArray())},Wm=Em,Xm=le,Qm=gs,Jm=zm,$m=Hm,tg=Km,eg=Zm,ig=ff,rg=ce.Buffer,ng=function(t,e,i){var r;r=t.padding?t.padding:i?1:4;var n,o=Wm(t);if(4===r)n=function(t,e){var i=t.modulus.byteLength(),r=e.length,n=Qm("sha1").update(rg.alloc(0)).digest(),o=n.length,s=2*o;if(r>i-s-2)throw new Error("message too long");var h=rg.alloc(i-r-s-2),a=i-o-1,u=Xm(o),f=$m(rg.concat([n,h,rg.alloc(1,1),e],a),Jm(u,a)),l=$m(u,Jm(f,o));return new tg(rg.concat([rg.alloc(1),l,f],i))}(o,e);else if(1===r)n=function(t,e,i){var r,n=e.length,o=t.modulus.byteLength();if(n>o-11)throw new Error("message too long");r=i?rg.alloc(o-n-3,255):function(t){var e,i=rg.allocUnsafe(t),r=0,n=Xm(2*t),o=0;for(;r<t;)o===n.length&&(n=Xm(2*t),o=0),(e=n[o++])&&(i[r++]=e);return i}(o-n-3);return new tg(rg.concat([rg.from([0,i?1:2]),r,rg.alloc(1),e],o))}(o,e,i);else{if(3!==r)throw new Error("unknown padding");if((n=new tg(e)).cmp(o.modulus)>=0)throw new Error("data too long for modulus")}return i?ig(n,o):eg(n,o)};var og=Em,sg=zm,hg=Hm,ag=Km,ug=ff,fg=gs,lg=Zm,dg=ce.Buffer,cg=function(t,e,i){var r;r=t.padding?t.padding:i?1:4;var n,o=og(t),s=o.modulus.byteLength();if(e.length>s||new ag(e).cmp(o.modulus)>=0)throw new Error("decryption error");n=i?lg(new ag(e),o):ug(e,o);var h=dg.alloc(s-n.length);if(n=dg.concat([h,n],s),4===r)return function(t,e){var i=t.modulus.byteLength(),r=fg("sha1").update(dg.alloc(0)).digest(),n=r.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,n+1),s=e.slice(n+1),h=hg(o,sg(s,n)),a=hg(s,sg(h,i-n-1));if(function(t,e){t=dg.from(t),e=dg.from(e);var i=0,r=t.length;t.length!==e.length&&(i++,r=Math.min(t.length,e.length));var n=-1;for(;++n<r;)i+=t[n]^e[n];return i}(r,a.slice(0,n)))throw new Error("decryption error");var u=n;for(;0===a[u];)u++;if(1!==a[u++])throw new Error("decryption error");return a.slice(u)}(o,n);if(1===r)return function(t,e,i){var r=e.slice(0,2),n=2,o=0;for(;0!==e[n++];)if(n>=e.length){o++;break}var s=e.slice(2,n-1);("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(n)}(0,n,i);if(3===r)return n;throw new Error("unknown padding")};!function(t){t.publicEncrypt=ng,t.privateDecrypt=cg,t.privateEncrypt=function(e,i){return t.publicEncrypt(e,i,!0)},t.publicDecrypt=function(e,i){return t.privateDecrypt(e,i,!0)}}(qm);var pg={};function mg(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var gg,vg=ce,bg=le,yg=vg.Buffer,wg=vg.kMaxLength,Mg=gt.crypto||gt.msCrypto,_g=Math.pow(2,32)-1;function Sg(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>_g||t<0)throw new TypeError("offset must be a uint32");if(t>wg||t>e)throw new RangeError("offset out of range")}function Eg(t,e,i){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>_g||t<0)throw new TypeError("size must be a uint32");if(t+e>i||t>wg)throw new RangeError("buffer too small")}function Ag(t,e,i,r){if(ae.browser){var n=t.buffer,o=new Uint8Array(n,e,i);return Mg.getRandomValues(o),r?void ae.nextTick((function(){r(null,t)})):t}if(!r)return bg(i).copy(t,e),t;bg(i,(function(i,n){if(i)return r(i);n.copy(t,e),r(null,t)}))}function kg(){if(gg)return fe;gg=1,fe.randomBytes=fe.rng=fe.pseudoRandomBytes=fe.prng=le,fe.createHash=fe.Hash=gs,fe.createHmac=fe.Hmac=xs;var t=Ls,e=Object.keys(t),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);fe.getHashes=function(){return i};var r=Us;fe.pbkdf2=r.pbkdf2,fe.pbkdf2Sync=r.pbkdf2Sync;var n=ph;fe.Cipher=n.Cipher,fe.createCipher=n.createCipher,fe.Cipheriv=n.Cipheriv,fe.createCipheriv=n.createCipheriv,fe.Decipher=n.Decipher,fe.createDecipher=n.createDecipher,fe.Decipheriv=n.Decipheriv,fe.createDecipheriv=n.createDecipheriv,fe.getCiphers=n.getCiphers,fe.listCiphers=n.listCiphers;var o=function(){if(Ju)return Lu;Ju=1;var t=Wu(),e=$u,i=tf(),r={binary:!0,hex:!0,base64:!0};return Lu.DiffieHellmanGroup=Lu.createDiffieHellmanGroup=Lu.getDiffieHellman=function(t){var r=new T(e[t].prime,"hex"),n=new T(e[t].gen,"hex");return new i(r,n)},Lu.createDiffieHellman=Lu.DiffieHellman=function e(n,o,s,h){return T.isBuffer(o)||void 0===r[o]?e(n,"binary",o,s):(o=o||"binary",h=h||"binary",s=s||new T([2]),T.isBuffer(s)||(s=new T(s,h)),"number"==typeof n?new i(t(n,s),s,!0):(T.isBuffer(n)||(n=new T(n,o)),new i(n,s,!0)))},Lu}();fe.DiffieHellmanGroup=o.DiffieHellmanGroup,fe.createDiffieHellmanGroup=o.createDiffieHellmanGroup,fe.getDiffieHellman=o.getDiffieHellman,fe.createDiffieHellman=o.createDiffieHellman,fe.DiffieHellman=o.DiffieHellman;var s=function(){if(Tm)return Om;Tm=1;var t=ce.Buffer,e=gs,i=_e,r=we,n=Nm(),o=Pm(),s=Cs;function h(t){i.Writable.call(this);var r=s[t];if(!r)throw new Error("Unknown message digest");this._hashType=r.hash,this._hash=e(r.hash),this._tag=r.id,this._signType=r.sign}function a(t){i.Writable.call(this);var r=s[t];if(!r)throw new Error("Unknown message digest");this._hash=e(r.hash),this._tag=r.id,this._signType=r.sign}function u(t){return new h(t)}function f(t){return new a(t)}return Object.keys(s).forEach((function(e){s[e].id=t.from(s[e].id,"hex"),s[e.toLowerCase()]=s[e]})),r(h,i.Writable),h.prototype._write=function(t,e,i){this._hash.update(t),i()},h.prototype.update=function(e,i){return"string"==typeof e&&(e=t.from(e,i)),this._hash.update(e),this},h.prototype.sign=function(t,e){this.end();var i=this._hash.digest(),r=n(i,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},r(a,i.Writable),a.prototype._write=function(t,e,i){this._hash.update(t),i()},a.prototype.update=function(e,i){return"string"==typeof e&&(e=t.from(e,i)),this._hash.update(e),this},a.prototype.verify=function(e,i,r){"string"==typeof i&&(i=t.from(i,r)),this.end();var n=this._hash.digest();return o(i,n,e,this._signType,this._tag)},Om={Sign:u,Verify:f,createSign:u,createVerify:f}}();fe.createSign=s.createSign,fe.Sign=s.Sign,fe.createVerify=s.createVerify,fe.Verify=s.Verify,fe.createECDH=function(){if(Lm)return xm;Lm=1;var t=Dc(),e=Dm;xm=function(t){return new r(t)};var i={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function r(e){this.curveType=i[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function n(t,e,i){Array.isArray(t)||(t=t.toArray());var r=new T(t);if(i&&r.length<i){var n=new T(i-r.length);n.fill(0),r=T.concat([n,r])}return e?r.toString(e):r}return i.p224=i.secp224r1,i.p256=i.secp256r1=i.prime256v1,i.p192=i.secp192r1=i.prime192v1,i.p384=i.secp384r1,i.p521=i.secp521r1,r.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},r.prototype.computeSecret=function(t,e,i){return e=e||"utf8",T.isBuffer(t)||(t=new T(t,e)),n(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),i,this.curveType.byteLength)},r.prototype.getPublicKey=function(t,e){var i=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(i[i.length-1]%2?i[0]=7:i[0]=6),n(i,t)},r.prototype.getPrivateKey=function(t){return n(this.keys.getPrivate(),t)},r.prototype.setPublicKey=function(t,e){return e=e||"utf8",T.isBuffer(t)||(t=new T(t,e)),this.keys._importPublic(t),this},r.prototype.setPrivateKey=function(t,i){i=i||"utf8",T.isBuffer(t)||(t=new T(t,i));var r=new e(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this},xm}();var h=qm;fe.publicEncrypt=h.publicEncrypt,fe.privateEncrypt=h.privateEncrypt,fe.publicDecrypt=h.publicDecrypt,fe.privateDecrypt=h.privateDecrypt;var a=pg;return fe.randomFill=a.randomFill,fe.randomFillSync=a.randomFillSync,fe.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},fe.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},fe}Mg&&Mg.getRandomValues||!ae.browser?(pg.randomFill=function(t,e,i,r){if(!(yg.isBuffer(t)||t instanceof gt.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)r=e,e=0,i=t.length;else if("function"==typeof i)r=i,i=t.length-e;else if("function"!=typeof r)throw new TypeError('"cb" argument must be a function');return Sg(e,t.length),Eg(i,e,t.length),Ag(t,e,i,r)},pg.randomFillSync=function(t,e,i){void 0===e&&(e=0);if(!(yg.isBuffer(t)||t instanceof gt.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');Sg(e,t.length),void 0===i&&(i=t.length-e);return Eg(i,e,t.length),Ag(t,e,i)}):(pg.randomFill=mg,pg.randomFillSync=mg),kg(),ue.linebrk=function(t,e){for(var i="",r=0;r+e<t.length;)i+=t.substring(r,r+e)+"\n",r+=e;return i+t.substring(r,t.length)},ue.detectEnvironment=function(){return"undefined"==typeof window||!window||ae&&"node"===ae.title?"node":"browser"},ue.get32IntFromBuffer=function(t,e){e=e||0;var i;if((i=t.length-e)>0){if(i>=4)return t.readUIntBE(e,i);for(var r=0,n=e+i,o=0;n>e;n--,o+=2)r+=t[n-1]*Math.pow(16,o);return r}return NaN},ue._={isObject:function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)},isString:function(t){return"string"==typeof t||t instanceof String},isNumber:function(t){return"number"==typeof t||!isNaN(parseFloat(t))&&isFinite(t)},omit:function(t,e){var i={};for(var r in t)t.hasOwnProperty(r)&&r!==e&&(i[r]=t[r]);return i}},ue.trimSurroundingText=function(t,e,i){var r=0,n=t.length,o=t.indexOf(e);o>=0&&(r=o+e.length);var s=t.indexOf(i,o);return s>=0&&(n=s),t.substring(r,n)};var Rg=kg(),Ig=ue._;function Og(t,e){null!=t&&("number"==typeof t?this.fromNumber(t,e):T.isBuffer(t)?this.fromBuffer(t):null==e&&"string"!=typeof t?this.fromByteArray(t):this.fromString(t,e))}function Tg(){return new Og(null)}Og.prototype.am=function(t,e,i,r,n,o){for(var s=16383&e,h=e>>14;--o>=0;){var a=16383&this[t],u=this[t++]>>14,f=h*a+u*s;n=((a=s*a+((16383&f)<<14)+i[r]+n)>>28)+(f>>14)+h*u,i[r++]=268435455&a}return n},Og.prototype.DB=28,Og.prototype.DM=268435455,Og.prototype.DV=1<<28;Og.prototype.FV=Math.pow(2,52),Og.prototype.F1=24,Og.prototype.F2=4;var Bg,Ng,Pg="0123456789abcdefghijklmnopqrstuvwxyz",xg=new Array;for(Bg="0".charCodeAt(0),Ng=0;Ng<=9;++Ng)xg[Bg++]=Ng;for(Bg="a".charCodeAt(0),Ng=10;Ng<36;++Ng)xg[Bg++]=Ng;for(Bg="A".charCodeAt(0),Ng=10;Ng<36;++Ng)xg[Bg++]=Ng;function Lg(t){return Pg.charAt(t)}function Dg(t,e){var i=xg[t.charCodeAt(e)];return null==i?-1:i}function Cg(t){var e=Tg();return e.fromInt(t),e}function qg(t){var e,i=1;return 0!=(e=t>>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=(e=t>>1)&&(t=e,i+=1),i}function Ug(t){this.m=t}function jg(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function zg(t,e){return t&e}function Fg(t,e){return t|e}function Hg(t,e){return t^e}function Kg(t,e){return t&~e}function Gg(t){if(0===t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function Yg(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function Vg(){}function Zg(t){return t}function Wg(t){this.r2=Tg(),this.q3=Tg(),Og.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}Ug.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},Ug.prototype.revert=function(t){return t},Ug.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},Ug.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},Ug.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},jg.prototype.convert=function(t){var e=Tg();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(Og.ZERO)>0&&this.m.subTo(e,e),e},jg.prototype.revert=function(t){var e=Tg();return t.copyTo(e),this.reduce(e),e},jg.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var i=32767&t[e],r=i*this.mpl+((i*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},jg.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},jg.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},Vg.prototype.convert=Zg,Vg.prototype.revert=Zg,Vg.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i)},Vg.prototype.sqrTo=function(t,e){t.squareTo(e)},Wg.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=Tg();return t.copyTo(e),this.reduce(e),e},Wg.prototype.revert=function(t){return t},Wg.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},Wg.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},Wg.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var Xg=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Qg=(1<<26)/Xg[Xg.length-1];Og.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},Og.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0},Og.prototype.fromString=function(t,e,i){var r;switch(e){case 2:r=1;break;case 4:r=2;break;case 8:r=3;break;case 16:r=4;break;case 32:r=5;break;case 256:r=8;break;default:return void this.fromRadix(t,e)}this.t=0,this.s=0;for(var n=t.length,o=!1,s=0;--n>=0;){var h=8==r?255&t[n]:Dg(t,n);h<0?"-"==t.charAt(n)&&(o=!0):(o=!1,0===s?this[this.t++]=h:s+r>this.DB?(this[this.t-1]|=(h&(1<<this.DB-s)-1)<<s,this[this.t++]=h>>this.DB-s):this[this.t-1]|=h<<s,(s+=r)>=this.DB&&(s-=this.DB))}i||8!=r||0==(128&t[0])||(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&Og.ZERO.subTo(this,this)},Og.prototype.fromByteArray=function(t,e){this.fromString(t,256,e)},Og.prototype.fromBuffer=function(t){this.fromString(t,256,!0)},Og.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},Og.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s},Og.prototype.drShiftTo=function(t,e){for(var i=t;i<this.t;++i)e[i-t]=this[i];e.t=Math.max(this.t-t,0),e.s=this.s},Og.prototype.lShiftTo=function(t,e){var i,r=t%this.DB,n=this.DB-r,o=(1<<n)-1,s=Math.floor(t/this.DB),h=this.s<<r&this.DM;for(i=this.t-1;i>=0;--i)e[i+s+1]=this[i]>>n|h,h=(this[i]&o)<<r;for(i=s-1;i>=0;--i)e[i]=0;e[s]=h,e.t=this.t+s+1,e.s=this.s,e.clamp()},Og.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var r=t%this.DB,n=this.DB-r,o=(1<<r)-1;e[0]=this[i]>>r;for(var s=i+1;s<this.t;++s)e[s-i-1]|=(this[s]&o)<<n,e[s-i]=this[s]>>r;r>0&&(e[this.t-i-1]|=(this.s&o)<<n),e.t=this.t-i,e.clamp()}},Og.prototype.subTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]-t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r-=t[i],e[i++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[i++]=this.DV+r:r>0&&(e[i++]=r),e.t=i,e.clamp()},Og.prototype.multiplyTo=function(t,e){var i=this.abs(),r=t.abs(),n=i.t;for(e.t=n+r.t;--n>=0;)e[n]=0;for(n=0;n<r.t;++n)e[n+i.t]=i.am(0,r[n],e,n,0,i.t);e.s=0,e.clamp(),this.s!=t.s&&Og.ZERO.subTo(e,e)},Og.prototype.squareTo=function(t){for(var e=this.abs(),i=t.t=2*e.t;--i>=0;)t[i]=0;for(i=0;i<e.t-1;++i){var r=e.am(i,e[i],t,2*i,0,1);(t[i+e.t]+=e.am(i+1,2*e[i],t,2*i+1,r,e.t-i-1))>=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},Og.prototype.divRemTo=function(t,e,i){var r=t.abs();if(!(r.t<=0)){var n=this.abs();if(n.t<r.t)return null!=e&&e.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=Tg());var o=Tg(),s=this.s,h=t.s,a=this.DB-qg(r[r.t-1]);a>0?(r.lShiftTo(a,o),n.lShiftTo(a,i)):(r.copyTo(o),n.copyTo(i));var u=o.t,f=o[u-1];if(0!==f){var l=f*(1<<this.F1)+(u>1?o[u-2]>>this.F2:0),d=this.FV/l,c=(1<<this.F1)/l,p=1<<this.F2,m=i.t,g=m-u,v=null==e?Tg():e;for(o.dlShiftTo(g,v),i.compareTo(v)>=0&&(i[i.t++]=1,i.subTo(v,i)),Og.ONE.dlShiftTo(u,v),v.subTo(o,o);o.t<u;)o[o.t++]=0;for(;--g>=0;){var b=i[--m]==f?this.DM:Math.floor(i[m]*d+(i[m-1]+p)*c);if((i[m]+=o.am(0,b,i,g,0,u))<b)for(o.dlShiftTo(g,v),i.subTo(v,i);i[m]<--b;)i.subTo(v,i)}null!=e&&(i.drShiftTo(u,e),s!=h&&Og.ZERO.subTo(e,e)),i.t=u,i.clamp(),a>0&&i.rShiftTo(a,i),s<0&&Og.ZERO.subTo(i,i)}}},Og.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},Og.prototype.isEven=function(){return 0===(this.t>0?1&this[0]:this.s)},Og.prototype.exp=function(t,e){if(t>4294967295||t<1)return Og.ONE;var i=Tg(),r=Tg(),n=e.convert(this),o=qg(t)-1;for(n.copyTo(i);--o>=0;)if(e.sqrTo(i,r),(t&1<<o)>0)e.mulTo(r,n,i);else{var s=i;i=r,r=s}return e.revert(i)},Og.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},Og.prototype.toRadix=function(t){if(null==t&&(t=10),0===this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),r=Cg(i),n=Tg(),o=Tg(),s="";for(this.divRemTo(r,n,o);n.signum()>0;)s=(i+o.intValue()).toString(t).substr(1)+s,n.divRemTo(r,n,o);return o.intValue().toString(t)+s},Og.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var i=this.chunkSize(e),r=Math.pow(e,i),n=!1,o=0,s=0,h=0;h<t.length;++h){var a=Dg(t,h);a<0?"-"==t.charAt(h)&&0===this.signum()&&(n=!0):(s=e*s+a,++o>=i&&(this.dMultiply(r),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),n&&Og.ZERO.subTo(this,this)},Og.prototype.fromNumber=function(t,e){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t),this.testBit(t-1)||this.bitwiseTo(Og.ONE.shiftLeft(t-1),Fg,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(Og.ONE.shiftLeft(t-1),this);else{var i=Rg.randomBytes(1+(t>>3)),r=7&t;r>0?i[0]&=(1<<r)-1:i[0]=0,this.fromByteArray(i)}},Og.prototype.bitwiseTo=function(t,e,i){var r,n,o=Math.min(t.t,this.t);for(r=0;r<o;++r)i[r]=e(this[r],t[r]);if(t.t<this.t){for(n=t.s&this.DM,r=o;r<this.t;++r)i[r]=e(this[r],n);i.t=this.t}else{for(n=this.s&this.DM,r=o;r<t.t;++r)i[r]=e(n,t[r]);i.t=t.t}i.s=e(this.s,t.s),i.clamp()},Og.prototype.changeBit=function(t,e){var i=Og.ONE.shiftLeft(t);return this.bitwiseTo(i,e,i),i},Og.prototype.addTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]+t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r+=t[i],e[i++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[i++]=r:r<-1&&(e[i++]=this.DV+r),e.t=i,e.clamp()},Og.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},Og.prototype.dAddOffset=function(t,e){if(0!==t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},Og.prototype.multiplyLowerTo=function(t,e,i){var r,n=Math.min(this.t+t.t,e);for(i.s=0,i.t=n;n>0;)i[--n]=0;for(r=i.t-this.t;n<r;++n)i[n+this.t]=this.am(0,t[n],i,n,0,this.t);for(r=Math.min(t.t,e);n<r;++n)this.am(0,t[n],i,n,0,e-n);i.clamp()},Og.prototype.multiplyUpperTo=function(t,e,i){--e;var r=i.t=this.t+t.t-e;for(i.s=0;--r>=0;)i[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)i[this.t+r-e]=this.am(e-r,t[r],i,0,0,this.t+r-e);i.clamp(),i.drShiftTo(1,i)},Og.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,i=this.s<0?t-1:0;if(this.t>0)if(0===e)i=this[0]%t;else for(var r=this.t-1;r>=0;--r)i=(e*i+this[r])%t;return i},Og.prototype.millerRabin=function(t){var e=this.subtract(Og.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var r=e.shiftRight(i);(t=t+1>>1)>Xg.length&&(t=Xg.length);for(var n=Tg(),o=0;o<t;++o){n.fromInt(Xg[Math.floor(Math.random()*Xg.length)]);var s=n.modPow(r,this);if(0!=s.compareTo(Og.ONE)&&0!=s.compareTo(e)){for(var h=1;h++<i&&0!=s.compareTo(e);)if(0===(s=s.modPowInt(2,this)).compareTo(Og.ONE))return!1;if(0!=s.compareTo(e))return!1}}return!0},Og.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var i,r=(1<<e)-1,n=!1,o="",s=this.t,h=this.DB-s*this.DB%e;if(s-- >0)for(h<this.DB&&(i=this[s]>>h)>0&&(n=!0,o=Lg(i));s>=0;)h<e?(i=(this[s]&(1<<h)-1)<<e-h,i|=this[--s]>>(h+=this.DB-e)):(i=this[s]>>(h-=e)&r,h<=0&&(h+=this.DB,--s)),i>0&&(n=!0),n&&(o+=Lg(i));return n?o:"0"},Og.prototype.negate=function(){var t=Tg();return Og.ZERO.subTo(this,t),t},Og.prototype.abs=function(){return this.s<0?this.negate():this},Og.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var i=this.t;if(0!=(e=i-t.t))return this.s<0?-e:e;for(;--i>=0;)if(0!=(e=this[i]-t[i]))return e;return 0},Og.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+qg(this[this.t-1]^this.s&this.DM)},Og.prototype.mod=function(t){var e=Tg();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Og.ZERO)>0&&t.subTo(e,e),e},Og.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new Ug(e):new jg(e),this.exp(t,i)},Og.prototype.clone=function(){var t=Tg();return this.copyTo(t),t},Og.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0===this.t)return-1}else{if(1==this.t)return this[0];if(0===this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},Og.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},Og.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},Og.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},Og.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var i,r=this.DB-t*this.DB%8,n=0;if(t-- >0)for(r<this.DB&&(i=this[t]>>r)!=(this.s&this.DM)>>r&&(e[n++]=i|this.s<<this.DB-r);t>=0;)r<8?(i=(this[t]&(1<<r)-1)<<8-r,i|=this[--t]>>(r+=this.DB-8)):(i=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&i)&&(i|=-256),0===n&&(128&this.s)!=(128&i)&&++n,(n>0||i!=this.s)&&(e[n++]=i);return e},Og.prototype.toBuffer=function(t){var e=T.from(this.toByteArray());if(!0===t&&0===e[0])e=e.slice(1);else if(Ig.isNumber(t)){if(e.length>t){for(var i=0;i<e.length-t;i++)if(0!==e[i])return null;return e.slice(e.length-t)}if(e.length<t){var r=T.alloc(t);return r.fill(0,0,t-e.length),e.copy(r,t-e.length),r}}return e},Og.prototype.equals=function(t){return 0==this.compareTo(t)},Og.prototype.min=function(t){return this.compareTo(t)<0?this:t},Og.prototype.max=function(t){return this.compareTo(t)>0?this:t},Og.prototype.and=function(t){var e=Tg();return this.bitwiseTo(t,zg,e),e},Og.prototype.or=function(t){var e=Tg();return this.bitwiseTo(t,Fg,e),e},Og.prototype.xor=function(t){var e=Tg();return this.bitwiseTo(t,Hg,e),e},Og.prototype.andNot=function(t){var e=Tg();return this.bitwiseTo(t,Kg,e),e},Og.prototype.not=function(){for(var t=Tg(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},Og.prototype.shiftLeft=function(t){var e=Tg();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},Og.prototype.shiftRight=function(t){var e=Tg();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},Og.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+Gg(this[t]);return this.s<0?this.t*this.DB:-1},Og.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,i=0;i<this.t;++i)t+=Yg(this[i]^e);return t},Og.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},Og.prototype.setBit=function(t){return this.changeBit(t,Fg)},Og.prototype.clearBit=function(t){return this.changeBit(t,Kg)},Og.prototype.flipBit=function(t){return this.changeBit(t,Hg)},Og.prototype.add=function(t){var e=Tg();return this.addTo(t,e),e},Og.prototype.subtract=function(t){var e=Tg();return this.subTo(t,e),e},Og.prototype.multiply=function(t){var e=Tg();return this.multiplyTo(t,e),e},Og.prototype.divide=function(t){var e=Tg();return this.divRemTo(t,e,null),e},Og.prototype.remainder=function(t){var e=Tg();return this.divRemTo(t,null,e),e},Og.prototype.divideAndRemainder=function(t){var e=Tg(),i=Tg();return this.divRemTo(t,e,i),new Array(e,i)},Og.prototype.modPow=function(t,e){var i,r,n=t.bitLength(),o=Cg(1);if(n<=0)return o;i=n<18?1:n<48?3:n<144?4:n<768?5:6,r=n<8?new Ug(e):e.isEven()?new Wg(e):new jg(e);var s=new Array,h=3,a=i-1,u=(1<<i)-1;if(s[1]=r.convert(this),i>1){var f=Tg();for(r.sqrTo(s[1],f);h<=u;)s[h]=Tg(),r.mulTo(f,s[h-2],s[h]),h+=2}var l,d,c=t.t-1,p=!0,m=Tg();for(n=qg(t[c])-1;c>=0;){for(n>=a?l=t[c]>>n-a&u:(l=(t[c]&(1<<n+1)-1)<<a-n,c>0&&(l|=t[c-1]>>this.DB+n-a)),h=i;0==(1&l);)l>>=1,--h;if((n-=h)<0&&(n+=this.DB,--c),p)s[l].copyTo(o),p=!1;else{for(;h>1;)r.sqrTo(o,m),r.sqrTo(m,o),h-=2;h>0?r.sqrTo(o,m):(d=o,o=m,m=d),r.mulTo(m,s[l],o)}for(;c>=0&&0==(t[c]&1<<n);)r.sqrTo(o,m),d=o,o=m,m=d,--n<0&&(n=this.DB-1,--c)}return r.revert(o)},Og.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0===t.signum())return Og.ZERO;for(var i=t.clone(),r=this.clone(),n=Cg(1),o=Cg(0),s=Cg(0),h=Cg(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),e?(n.isEven()&&o.isEven()||(n.addTo(this,n),o.subTo(t,o)),n.rShiftTo(1,n)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),e?(s.isEven()&&h.isEven()||(s.addTo(this,s),h.subTo(t,h)),s.rShiftTo(1,s)):h.isEven()||h.subTo(t,h),h.rShiftTo(1,h);i.compareTo(r)>=0?(i.subTo(r,i),e&&n.subTo(s,n),o.subTo(h,o)):(r.subTo(i,r),e&&s.subTo(n,s),h.subTo(o,h))}return 0!=r.compareTo(Og.ONE)?Og.ZERO:h.compareTo(t)>=0?h.subtract(t):h.signum()<0?(h.addTo(t,h),h.signum()<0?h.add(t):h):h},Og.prototype.pow=function(t){return this.exp(t,new Vg)},Og.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var r=e;e=i,i=r}var n=e.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)return e;for(n<o&&(o=n),o>0&&(e.rShiftTo(o,e),i.rShiftTo(o,i));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=i.getLowestSetBit())>0&&i.rShiftTo(n,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return o>0&&i.lShiftTo(o,i),i},Og.prototype.isProbablePrime=function(t){var e,i=this.abs();if(1==i.t&&i[0]<=Xg[Xg.length-1]){for(e=0;e<Xg.length;++e)if(i[0]==Xg[e])return!0;return!1}if(i.isEven())return!1;for(e=1;e<Xg.length;){for(var r=Xg[e],n=e+1;n<Xg.length&&r<Qg;)r*=Xg[n++];for(r=i.modInt(r);e<n;)if(r%Xg[e++]==0)return!1}return i.millerRabin(t)},Og.int2char=Lg,Og.ZERO=Cg(0),Og.ONE=Cg(1),Og.prototype.square=function(){var t=Tg();return this.squareTo(t),t};var Jg=Og,$g={},tv={get exports(){return $g},set exports(t){$g=t}},ev={},iv={get exports(){return ev},set exports(t){ev=t}},rv=Jg,nv=kg(),ov=Dt,sv={md2:T.from("3020300c06082a864886f70d020205000410","hex"),md5:T.from("3020300c06082a864886f70d020505000410","hex"),sha1:T.from("3021300906052b0e03021a05000414","hex"),sha224:T.from("302d300d06096086480165030402040500041c","hex"),sha256:T.from("3031300d060960864801650304020105000420","hex"),sha384:T.from("3041300d060960864801650304020205000430","hex"),sha512:T.from("3051300d060960864801650304020305000440","hex"),ripemd160:T.from("3021300906052b2403020105000414","hex"),rmd160:T.from("3021300906052b2403020105000414","hex")},hv={ripemd160:"rmd160"},av="sha256";iv.exports={isEncryption:!0,isSignature:!0},ev.makeScheme=function(t,e){function i(t,e){this.key=t,this.options=e}return i.prototype.maxMessageLength=function(){return this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==ov.RSA_NO_PADDING?this.key.encryptedDataLength:this.key.encryptedDataLength-11},i.prototype.encPad=function(t,e){var i;if(e=e||{},t.length>this.key.maxMessageLength)throw new Error("Message too long for RSA (n="+this.key.encryptedDataLength+", l="+t.length+")");if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==ov.RSA_NO_PADDING)return(i=T.alloc(this.key.maxMessageLength-t.length)).fill(0),T.concat([i,t]);if(1===e.type)return(i=T.alloc(this.key.encryptedDataLength-t.length-1)).fill(255,0,i.length-1),i[0]=1,i[i.length-1]=0,T.concat([i,t]);(i=T.alloc(this.key.encryptedDataLength-t.length))[0]=0,i[1]=2;for(var r=nv.randomBytes(i.length-3),n=0;n<r.length;n++){for(var o=r[n];0===o;)o=nv.randomBytes(1)[0];i[n+2]=o}return i[i.length-1]=0,T.concat([i,t])},i.prototype.encUnPad=function(t,e){e=e||{};var i=0;if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==ov.RSA_NO_PADDING)return"function"==typeof t.lastIndexOf?t.slice(t.lastIndexOf("\0")+1,t.length):t.slice(String.prototype.lastIndexOf.call(t,"\0")+1,t.length);if(t.length<4)return null;if(1===e.type){if(0!==t[0]||1!==t[1])return null;for(i=3;0!==t[i];)if(255!=t[i]||++i>=t.length)return null}else{if(0!==t[0]||2!==t[1])return null;for(i=3;0!==t[i];)if(++i>=t.length)return null}return t.slice(i+1,t.length)},i.prototype.sign=function(t){var e=this.options.signingSchemeOptions.hash||av;if("browser"===this.options.environment){e=hv[e]||e;var i=nv.createHash(e);i.update(t);var r=this.pkcs1pad(i.digest(),e);return this.key.$doPrivate(new rv(r)).toBuffer(this.key.encryptedDataLength)}var n=nv.createSign("RSA-"+e.toUpperCase());return n.update(t),n.sign(this.options.rsaUtils.exportKey("private"))},i.prototype.verify=function(t,e,i){if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==ov.RSA_NO_PADDING)return!1;var r=this.options.signingSchemeOptions.hash||av;if("browser"===this.options.environment){r=hv[r]||r,i&&(e=T.from(e,i));var n=nv.createHash(r);n.update(t);var o=this.pkcs1pad(n.digest(),r);return this.key.$doPublic(new rv(e)).toBuffer().toString("hex")==o.toString("hex")}var s=nv.createVerify("RSA-"+r.toUpperCase());return s.update(t),s.verify(this.options.rsaUtils.exportKey("public"),e,i)},i.prototype.pkcs0pad=function(t){var e=T.alloc(this.key.maxMessageLength-t.length);return e.fill(0),T.concat([e,t])},i.prototype.pkcs0unpad=function(t){return"function"==typeof t.lastIndexOf?t.slice(t.lastIndexOf("\0")+1,t.length):t.slice(String.prototype.lastIndexOf.call(t,"\0")+1,t.length)},i.prototype.pkcs1pad=function(t,e){var i=sv[e];if(!i)throw Error("Unsupported hash algorithm");var r=T.concat([i,t]);if(r.length+10>this.key.encryptedDataLength)throw Error("Key is too short for signing algorithm ("+e+")");var n=T.alloc(this.key.encryptedDataLength-r.length-1);return n.fill(255,0,n.length-1),n[0]=1,n[n.length-1]=0,T.concat([n,r])},new i(t,e)};var uv={},fv={get exports(){return uv},set exports(t){uv=t}};!function(t){var e=kg();t.exports={isEncryption:!0,isSignature:!1},t.exports.digestLength={md4:16,md5:16,ripemd160:20,rmd160:20,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64};var i="sha1";t.exports.eme_oaep_mgf1=function(r,n,o){o=o||i;for(var s=t.exports.digestLength[o],h=Math.ceil(n/s),a=T.alloc(s*h),u=T.alloc(4),f=0;f<h;++f){var l=e.createHash(o);l.update(r),u.writeUInt32BE(f,0),l.update(u),l.digest().copy(a,f*s)}return a.slice(0,n)},t.exports.makeScheme=function(r,n){function o(t,e){this.key=t,this.options=e}return o.prototype.maxMessageLength=function(){return this.key.encryptedDataLength-2*t.exports.digestLength[this.options.encryptionSchemeOptions.hash||i]-2},o.prototype.encPad=function(r){var n=this.options.encryptionSchemeOptions.hash||i,o=this.options.encryptionSchemeOptions.mgf||t.exports.eme_oaep_mgf1,s=this.options.encryptionSchemeOptions.label||T.alloc(0),h=this.key.encryptedDataLength,a=t.exports.digestLength[n];if(r.length>h-2*a-2)throw new Error("Message is too long to encode into an encoded message with a length of "+h+" bytes, increaseemLen to fix this error (minimum value for given parameters and options: "+(h-2*a-2)+")");var u=e.createHash(n);u.update(s),u=u.digest();var f=T.alloc(h-r.length-2*a-1);f.fill(0),f[f.length-1]=1;for(var l=T.concat([u,f,r]),d=e.randomBytes(a),c=o(d,l.length,n),p=0;p<l.length;p++)l[p]^=c[p];for(c=o(l,a,n),p=0;p<d.length;p++)d[p]^=c[p];var m=T.alloc(1+d.length+l.length);return m[0]=0,d.copy(m,1),l.copy(m,1+d.length),m},o.prototype.encUnPad=function(r){var n=this.options.encryptionSchemeOptions.hash||i,o=this.options.encryptionSchemeOptions.mgf||t.exports.eme_oaep_mgf1,s=this.options.encryptionSchemeOptions.label||T.alloc(0),h=t.exports.digestLength[n];if(r.length<2*h+2)throw new Error("Error decoding message, the supplied message is not long enough to be a valid OAEP encoded message");for(var a=r.slice(1,h+1),u=r.slice(1+h),f=o(u,h,n),l=0;l<a.length;l++)a[l]^=f[l];for(f=o(a,u.length,n),l=0;l<u.length;l++)u[l]^=f[l];var d=e.createHash(n);if(d.update(s),d=d.digest(),u.slice(0,h).toString("hex")!=d.toString("hex"))throw new Error("Error decoding message, the lHash calculated from the label provided and the lHash in the encrypted data do not match.");for(l=h;0===u[l++]&&l<u.length;);if(1!=u[l-1])throw new Error("Error decoding message, there is no padding message separator byte");return u.slice(l)},new o(r,n)}}(fv);var lv,dv,cv,pv,mv,gv,vv,bv,yv={},wv={get exports(){return yv},set exports(t){yv=t}};function Mv(){if(lv)return yv;lv=1;var t=Jg,e=kg();wv.exports={isEncryption:!1,isSignature:!0};var i="sha1";return yv.makeScheme=function(r,n){var o=_v().pkcs1_oaep;function s(t,e){this.key=t,this.options=e}return s.prototype.sign=function(r){var n=e.createHash(this.options.signingSchemeOptions.hash||i);n.update(r);var o=this.emsa_pss_encode(n.digest(),this.key.keySize-1);return this.key.$doPrivate(new t(o)).toBuffer(this.key.encryptedDataLength)},s.prototype.verify=function(r,n,o){o&&(n=T.from(n,o)),n=new t(n);var s=Math.ceil((this.key.keySize-1)/8),h=this.key.$doPublic(n).toBuffer(s),a=e.createHash(this.options.signingSchemeOptions.hash||i);return a.update(r),this.emsa_pss_verify(a.digest(),h,this.key.keySize-1)},s.prototype.emsa_pss_encode=function(t,r){var n=this.options.signingSchemeOptions.hash||i,s=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,h=this.options.signingSchemeOptions.saltLength||20,a=o.digestLength[n],u=Math.ceil(r/8);if(u<a+h+2)throw new Error("Output length passed to emBits("+r+") is too small for the options specified("+n+", "+h+"). To fix this issue increase the value of emBits. (minimum size: "+(8*a+8*h+9)+")");var f=e.randomBytes(h),l=T.alloc(8+a+h);l.fill(0,0,8),t.copy(l,8),f.copy(l,8+t.length);var d=e.createHash(n);d.update(l),d=d.digest();var c=T.alloc(u-f.length-a-2);c.fill(0);var p=T.alloc(c.length+1+f.length);c.copy(p),p[c.length]=1,f.copy(p,c.length+1);for(var m=s(d,p.length,n),g=T.alloc(p.length),v=0;v<m.length;v++)g[v]=p[v]^m[v];var b=8*u-r,y=255^255>>8-b<<8-b;g[0]=g[0]&y;var w=T.alloc(g.length+d.length+1);return g.copy(w,0),d.copy(w,g.length),w[w.length-1]=188,w},s.prototype.emsa_pss_verify=function(t,r,n){var s=this.options.signingSchemeOptions.hash||i,h=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,a=this.options.signingSchemeOptions.saltLength||20,u=o.digestLength[s],f=Math.ceil(n/8);if(f<u+a+2||188!=r[r.length-1])return!1;var l=T.alloc(f-u-1);r.copy(l,0,0,f-u-1);for(var d=0,c=0,p=8*f-n;c<p;c++)d|=1<<7-c;if(0!=(l[0]&d))return!1;var m=r.slice(f-u-1,f-1),g=h(m,l.length,s);for(c=0;c<l.length;c++)l[c]^=g[c];for(d=255^255>>8-(p=8*f-n)<<8-p,l[0]=l[0]&d,c=0;0===l[c]&&c<l.length;c++);if(1!=l[c])return!1;var v=l.slice(l.length-a),b=T.alloc(8+u+a);b.fill(0,0,8),t.copy(b,8),v.copy(b,8+t.length);var y=e.createHash(s);return y.update(b),y=y.digest(),m.toString("hex")===y.toString("hex")},new s(r,n)},yv}function _v(){return dv||(dv=1,(t=tv).exports={pkcs1:ev,pkcs1_oaep:uv,pss:Mv(),isEncryption:function(e){return t.exports[e]&&t.exports[e].isEncryption},isSignature:function(e){return t.exports[e]&&t.exports[e].isSignature}}),$g;var t}function Sv(){if(pv)return cv;pv=1;var t=Jg,e=_v();return cv=function(i,r){var n=e.pkcs1.makeScheme(i,r);return{encrypt:function(e,r){var o,s;return r?(o=new t(n.encPad(e,{type:1})),s=i.$doPrivate(o)):(o=new t(i.encryptionScheme.encPad(e)),s=i.$doPublic(o)),s.toBuffer(i.encryptedDataLength)},decrypt:function(e,r){var o,s=new t(e);return r?(o=i.$doPublic(s),n.encUnPad(o.toBuffer(i.encryptedDataLength),{type:1})):(o=i.$doPrivate(s),i.encryptionScheme.encUnPad(o.toBuffer(i.encryptedDataLength)))}}},cv}var Ev=kg(),Av={getEngine:function(t,e){var i=Sv();return"node"===e.environment&&"function"==typeof Ev.publicEncrypt&&"function"==typeof Ev.privateDecrypt&&(i="function"==typeof Ev.privateEncrypt&&"function"==typeof Ev.publicDecrypt?function(){if(gv)return mv;gv=1;var t=kg(),e=Dt,i=_v();return mv=function(r,n){var o=i.pkcs1.makeScheme(r,n);return{encrypt:function(i,r){var s;if(r)return s=e.RSA_PKCS1_PADDING,n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding),t.privateEncrypt({key:n.rsaUtils.exportKey("private"),padding:s},i);s=e.RSA_PKCS1_OAEP_PADDING,"pkcs1"===n.encryptionScheme&&(s=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding);var h=i;return s===e.RSA_NO_PADDING&&(h=o.pkcs0pad(i)),t.publicEncrypt({key:n.rsaUtils.exportKey("public"),padding:s},h)},decrypt:function(i,r){var s;if(r)return s=e.RSA_PKCS1_PADDING,n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding),t.publicDecrypt({key:n.rsaUtils.exportKey("public"),padding:s},i);s=e.RSA_PKCS1_OAEP_PADDING,"pkcs1"===n.encryptionScheme&&(s=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding);var h=t.privateDecrypt({key:n.rsaUtils.exportKey("private"),padding:s},i);return s===e.RSA_NO_PADDING?o.pkcs0unpad(h):h}}},mv}():function(){if(bv)return vv;bv=1;var t=kg(),e=Dt,i=_v();return vv=function(r,n){var o=Sv()(r,n),s=i.pkcs1.makeScheme(r,n);return{encrypt:function(i,r){if(r)return o.encrypt(i,r);var h=e.RSA_PKCS1_OAEP_PADDING;"pkcs1"===n.encryptionScheme&&(h=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(h=n.encryptionSchemeOptions.padding);var a=i;return h===e.RSA_NO_PADDING&&(a=s.pkcs0pad(i)),t.publicEncrypt({key:n.rsaUtils.exportKey("public"),padding:h},a)},decrypt:function(i,r){if(r)return o.decrypt(i,r);var h=e.RSA_PKCS1_OAEP_PADDING;"pkcs1"===n.encryptionScheme&&(h=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(h=n.encryptionSchemeOptions.padding);var a=t.privateDecrypt({key:n.rsaUtils.exportKey("private"),padding:h},i);return h===e.RSA_NO_PADDING?s.pkcs0unpad(a):a}}},vv}()),i(t,e)}},kv=ue._;kg();var Rv=Jg,Iv=ue,Ov=_v(),Tv=Av;Ct.BigInteger=Rv,Ct.Key=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.setOptions=function(t){var e=Ov[t.signingScheme],i=Ov[t.encryptionScheme];e===i?this.signingScheme=this.encryptionScheme=i.makeScheme(this,t):(this.encryptionScheme=i.makeScheme(this,t),this.signingScheme=e.makeScheme(this,t)),this.encryptEngine=Tv.getEngine(this,t)},t.prototype.generate=function(t,e){var i=t>>1;this.e=parseInt(e,16);for(var r=new Rv(e,16);;){for(;this.p=new Rv(t-i,1),0!==this.p.subtract(Rv.ONE).gcd(r).compareTo(Rv.ONE)||!this.p.isProbablePrime(10););for(;this.q=new Rv(i,1),0!==this.q.subtract(Rv.ONE).gcd(r).compareTo(Rv.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var n=this.p;this.p=this.q,this.q=n}var o=this.p.subtract(Rv.ONE),s=this.q.subtract(Rv.ONE),h=o.multiply(s);if(0===h.gcd(r).compareTo(Rv.ONE)){if(this.n=this.p.multiply(this.q),this.n.bitLength()<t)continue;this.d=r.modInverse(h),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}this.$$recalculateCache()},t.prototype.setPrivate=function(t,e,i,r,n,o,s,h){if(!(t&&e&&i&&t.length>0&&(kv.isNumber(e)||e.length>0)&&i.length>0))throw Error("Invalid RSA private key");this.n=new Rv(t),this.e=kv.isNumber(e)?e:Iv.get32IntFromBuffer(e,0),this.d=new Rv(i),r&&n&&o&&s&&h&&(this.p=new Rv(r),this.q=new Rv(n),this.dmp1=new Rv(o),this.dmq1=new Rv(s),this.coeff=new Rv(h)),this.$$recalculateCache()},t.prototype.setPublic=function(t,e){if(!(t&&e&&t.length>0&&(kv.isNumber(e)||e.length>0)))throw Error("Invalid RSA public key");this.n=new Rv(t),this.e=kv.isNumber(e)?e:Iv.get32IntFromBuffer(e,0),this.$$recalculateCache()},t.prototype.$doPrivate=function(t){if(this.p||this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),i=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(i)<0;)e=e.add(this.p);return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i)},t.prototype.$doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.encrypt=function(t,e){var i=[],r=[],n=t.length,o=Math.ceil(n/this.maxMessageLength)||1,s=Math.ceil(n/o||1);if(1==o)i.push(t);else for(var h=0;h<o;h++)i.push(t.slice(h*s,(h+1)*s));for(var a=0;a<i.length;a++)r.push(this.encryptEngine.encrypt(i[a],e));return T.concat(r)},t.prototype.decrypt=function(t,e){if(t.length%this.encryptedDataLength>0)throw Error("Incorrect data or key");for(var i=[],r=0,n=0,o=t.length/this.encryptedDataLength,s=0;s<o;s++)n=(r=s*this.encryptedDataLength)+this.encryptedDataLength,i.push(this.encryptEngine.decrypt(t.slice(r,Math.min(n,t.length)),e));return T.concat(i)},t.prototype.sign=function(t){return this.signingScheme.sign.apply(this.signingScheme,arguments)},t.prototype.verify=function(t,e,i){return this.signingScheme.verify.apply(this.signingScheme,arguments)},t.prototype.isPrivate=function(){return!!(this.n&&this.e&&this.d)},t.prototype.isPublic=function(t){return this.n&&this.e&&!(t&&this.d)||!1},Object.defineProperty(t.prototype,"keySize",{get:function(){return this.cache.keyBitLength}}),Object.defineProperty(t.prototype,"encryptedDataLength",{get:function(){return this.cache.keyByteLength}}),Object.defineProperty(t.prototype,"maxMessageLength",{get:function(){return this.encryptionScheme.maxMessageLength()}}),t.prototype.$$recalculateCache=function(){this.cache=this.cache||{},this.cache.keyBitLength=this.n.bitLength(),this.cache.keyByteLength=this.cache.keyBitLength+6>>3},t}();var Bv={},Nv={get exports(){return Bv},set exports(t){Bv=t}},Pv={newInvalidAsn1Error:function(t){var e=new Error;return e.name="InvalidAsn1Error",e.message=t||"",e}},xv={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128};function Lv(t,e){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}var Dv,Cv=Object.prototype.hasOwnProperty,qv=Object.keys||function(t){var e=[];for(var i in t)Cv.call(t,i)&&e.push(i);return e},Uv=Array.prototype.slice;function jv(){return void 0!==Dv?Dv:Dv="foo"===function(){}.name}function zv(t){return Object.prototype.toString.call(t)}function Fv(t){return!ct(t)&&("function"==typeof m.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function Hv(t,e){t||Wv(t,!0,e,"==",Xv)}var Kv=/\s*function\s+([^\(\s]*)\s*/;function Gv(t){if(ni(t)){if(jv())return t.name;var e=t.toString().match(Kv);return e&&e[1]}}function Yv(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return Vv(Zv(t.actual),128)+" "+t.operator+" "+Vv(Zv(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||Wv;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var i=new Error;if(i.stack){var r=i.stack,n=Gv(e),o=r.indexOf("\n"+n);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}}function Vv(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function Zv(t){if(jv()||!ni(t))return je(t);var e=Gv(t);return"[Function"+(e?": "+e:"")+"]"}function Wv(t,e,i,r,n){throw new Yv({message:i,actual:t,expected:e,operator:r,stackStartFunction:n})}function Xv(t,e){t||Wv(t,!0,e,"==",Xv)}function Qv(t,e,i){t!=e&&Wv(t,e,i,"==",Qv)}function Jv(t,e,i){t==e&&Wv(t,e,i,"!=",Jv)}function $v(t,e,i){eb(t,e,!1)||Wv(t,e,i,"deepEqual",$v)}function tb(t,e,i){eb(t,e,!0)||Wv(t,e,i,"deepStrictEqual",tb)}function eb(t,e,i,r){if(t===e)return!0;if(ct(t)&&ct(e))return 0===Lv(t,e);if(ii(t)&&ii(e))return t.getTime()===e.getTime();if(ti(t)&&ti(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(Fv(t)&&Fv(e)&&zv(t)===zv(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===Lv(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(ct(t)!==ct(e))return!1;var n=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==n&&n===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,i,r){if(null==t||null==e)return!1;if(oi(t)||oi(e))return t===e;if(i&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var n=ib(t),o=ib(e);if(n&&!o||!n&&o)return!1;if(n)return eb(t=Uv.call(t),e=Uv.call(e),i);var s,h,a=qv(t),u=qv(e);if(a.length!==u.length)return!1;for(a.sort(),u.sort(),h=a.length-1;h>=0;h--)if(a[h]!==u[h])return!1;for(h=a.length-1;h>=0;h--)if(!eb(t[s=a[h]],e[s],i,r))return!1;return!0}(t,e,i,r))}return i?t===e:t==e}function ib(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function rb(t,e,i){eb(t,e,!1)&&Wv(t,e,i,"notDeepEqual",rb)}function nb(t,e,i){eb(t,e,!0)&&Wv(t,e,i,"notDeepStrictEqual",nb)}function ob(t,e,i){t!==e&&Wv(t,e,i,"===",ob)}function sb(t,e,i){t===e&&Wv(t,e,i,"!==",sb)}function hb(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function ab(t,e,i,r){var n;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof i&&(r=i,i=null),n=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(i&&i.name?" ("+i.name+").":".")+(r?" "+r:"."),t&&!n&&Wv(n,i,"Missing expected exception"+r);var o="string"==typeof r,s=!t&&n&&!i;if((!t&&ri(n)&&o&&hb(n,i)||s)&&Wv(n,i,"Got unwanted exception"+r),t&&n&&i&&!hb(n,i)||!t&&n)throw n}function ub(t,e,i){ab(!0,t,e,i)}function fb(t,e,i){ab(!1,t,e,i)}function lb(t){if(t)throw t}Hv.AssertionError=Yv,Pe(Yv,Error),Hv.fail=Wv,Hv.ok=Xv,Hv.equal=Qv,Hv.notEqual=Jv,Hv.deepEqual=$v,Hv.deepStrictEqual=tb,Hv.notDeepEqual=rb,Hv.notDeepStrictEqual=nb,Hv.strictEqual=ob,Hv.notStrictEqual=sb,Hv.throws=ub,Hv.doesNotThrow=fb,Hv.ifError=lb;var db=vt(Object.freeze({__proto__:null,AssertionError:Yv,assert:Xv,deepEqual:$v,deepStrictEqual:tb,default:Hv,doesNotThrow:fb,equal:Qv,fail:Wv,ifError:lb,notDeepEqual:rb,notDeepStrictEqual:nb,notEqual:Jv,notStrictEqual:sb,ok:Xv,strictEqual:ob,throws:ub})),cb=db,pb=Zc.Buffer,mb=xv,gb=Pv.newInvalidAsn1Error;function vb(t){if(!t||!pb.isBuffer(t))throw new TypeError("data must be a node Buffer");this._buf=t,this._size=t.length,this._len=0,this._offset=0}Object.defineProperty(vb.prototype,"length",{enumerable:!0,get:function(){return this._len}}),Object.defineProperty(vb.prototype,"offset",{enumerable:!0,get:function(){return this._offset}}),Object.defineProperty(vb.prototype,"remain",{get:function(){return this._size-this._offset}}),Object.defineProperty(vb.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}}),vb.prototype.readByte=function(t){if(this._size-this._offset<1)return null;var e=255&this._buf[this._offset];return t||(this._offset+=1),e},vb.prototype.peek=function(){return this.readByte(!0)},vb.prototype.readLength=function(t){if(void 0===t&&(t=this._offset),t>=this._size)return null;var e=255&this._buf[t++];if(null===e)return null;if(128==(128&e)){if(0===(e&=127))throw gb("Indefinite length not supported");if(e>4)throw gb("encoding too long");if(this._size-t<e)return null;this._len=0;for(var i=0;i<e;i++)this._len=(this._len<<8)+(255&this._buf[t++])}else this._len=e;return t},vb.prototype.readSequence=function(t){var e=this.peek();if(null===e)return null;if(void 0!==t&&t!==e)throw gb("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var i=this.readLength(this._offset+1);return null===i?null:(this._offset=i,e)},vb.prototype.readInt=function(){return this._readTag(mb.Integer)},vb.prototype.readBoolean=function(){return 0!==this._readTag(mb.Boolean)},vb.prototype.readEnumeration=function(){return this._readTag(mb.Enumeration)},vb.prototype.readString=function(t,e){t||(t=mb.OctetString);var i=this.peek();if(null===i)return null;if(i!==t)throw gb("Expected 0x"+t.toString(16)+": got 0x"+i.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>this._size-r)return null;if(this._offset=r,0===this.length)return e?pb.alloc(0):"";var n=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,e?n:n.toString("utf8")},vb.prototype.readOID=function(t){t||(t=mb.OID);var e=this.readString(t,!0);if(null===e)return null;for(var i=[],r=0,n=0;n<e.length;n++){var o=255&e[n];r<<=7,r+=127&o,0==(128&o)&&(i.push(r),r=0)}return r=i.shift(),i.unshift(r%40),i.unshift(r/40>>0),i.join(".")},vb.prototype._readTag=function(t){cb.ok(void 0!==t);var e=this.peek();if(null===e)return null;if(e!==t)throw gb("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var i=this.readLength(this._offset+1);if(null===i)return null;if(this.length>4)throw gb("Integer too long: "+this.length);if(this.length>this._size-i)return null;this._offset=i;for(var r=this._buf[this._offset],n=0,o=0;o<this.length;o++)n<<=8,n|=255&this._buf[this._offset++];return 128==(128&r)&&4!==o&&(n-=1<<8*o),n>>0};var bb=vb,yb=db,wb=Zc.Buffer,Mb=xv,_b=Pv.newInvalidAsn1Error,Sb={size:1024,growthFactor:8};function Eb(t){t=function(t,e){return yb.ok(t),yb.equal(typeof t,"object"),yb.ok(e),yb.equal(typeof e,"object"),Object.getOwnPropertyNames(t).forEach((function(i){if(!e[i]){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r)}})),e}(Sb,t||{}),this._buf=wb.alloc(t.size||1024),this._size=this._buf.length,this._offset=0,this._options=t,this._seq=[]}Object.defineProperty(Eb.prototype,"buffer",{get:function(){if(this._seq.length)throw _b(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),Eb.prototype.writeByte=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=t},Eb.prototype.writeInt=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");"number"!=typeof e&&(e=Mb.Integer);for(var i=4;(0==(4286578688&t)||-8388608==(4286578688&t))&&i>1;)i--,t<<=8;if(i>4)throw _b("BER ints cannot be > 0xffffffff");for(this._ensure(2+i),this._buf[this._offset++]=e,this._buf[this._offset++]=i;i-- >0;)this._buf[this._offset++]=(4278190080&t)>>>24,t<<=8},Eb.prototype.writeNull=function(){this.writeByte(Mb.Null),this.writeByte(0)},Eb.prototype.writeEnumeration=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");return"number"!=typeof e&&(e=Mb.Enumeration),this.writeInt(t,e)},Eb.prototype.writeBoolean=function(t,e){if("boolean"!=typeof t)throw new TypeError("argument must be a Boolean");"number"!=typeof e&&(e=Mb.Boolean),this._ensure(3),this._buf[this._offset++]=e,this._buf[this._offset++]=1,this._buf[this._offset++]=t?255:0},Eb.prototype.writeString=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string (was: "+typeof t+")");"number"!=typeof e&&(e=Mb.OctetString);var i=wb.byteLength(t);this.writeByte(e),this.writeLength(i),i&&(this._ensure(i),this._buf.write(t,this._offset),this._offset+=i)},Eb.prototype.writeBuffer=function(t,e){if("number"!=typeof e)throw new TypeError("tag must be a number");if(!wb.isBuffer(t))throw new TypeError("argument must be a buffer");this.writeByte(e),this.writeLength(t.length),this._ensure(t.length),t.copy(this._buf,this._offset,0,t.length),this._offset+=t.length},Eb.prototype.writeStringArray=function(t){if(!t instanceof Array)throw new TypeError("argument must be an Array[String]");var e=this;t.forEach((function(t){e.writeString(t)}))},Eb.prototype.writeOID=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string");if("number"!=typeof e&&(e=Mb.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(t))throw new Error("argument is not a valid OID string");var i=t.split("."),r=[];r.push(40*parseInt(i[0],10)+parseInt(i[1],10)),i.slice(2).forEach((function(t){!function(t,e){e<128?t.push(e):e<16384?(t.push(e>>>7|128),t.push(127&e)):e<2097152?(t.push(e>>>14|128),t.push(255&(e>>>7|128)),t.push(127&e)):e<268435456?(t.push(e>>>21|128),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e)):(t.push(255&(e>>>28|128)),t.push(255&(e>>>21|128)),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e))}(r,parseInt(t,10))}));var n=this;this._ensure(2+r.length),this.writeByte(e),this.writeLength(r.length),r.forEach((function(t){n.writeByte(t)}))},Eb.prototype.writeLength=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");if(this._ensure(4),t<=127)this._buf[this._offset++]=t;else if(t<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=t;else if(t<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t;else{if(!(t<=16777215))throw _b("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=t>>16,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t}},Eb.prototype.startSequence=function(t){"number"!=typeof t&&(t=Mb.Sequence|Mb.Constructor),this.writeByte(t),this._seq.push(this._offset),this._ensure(3),this._offset+=3},Eb.prototype.endSequence=function(){var t=this._seq.pop(),e=t+3,i=this._offset-e;if(i<=127)this._shift(e,i,-2),this._buf[t]=i;else if(i<=255)this._shift(e,i,-1),this._buf[t]=129,this._buf[t+1]=i;else if(i<=65535)this._buf[t]=130,this._buf[t+1]=i>>8,this._buf[t+2]=i;else{if(!(i<=16777215))throw _b("Sequence too long");this._shift(e,i,1),this._buf[t]=131,this._buf[t+1]=i>>16,this._buf[t+2]=i>>8,this._buf[t+3]=i}},Eb.prototype._shift=function(t,e,i){yb.ok(void 0!==t),yb.ok(void 0!==e),yb.ok(i),this._buf.copy(this._buf,t+i,t,t+e),this._offset+=i},Eb.prototype._ensure=function(t){if(yb.ok(t),this._size-this._offset<t){var e=this._size*this._options.growthFactor;e-this._offset<t&&(e+=t);var i=wb.alloc(e);this._buf.copy(i,0,0,this._offset),this._buf=i,this._size=e}};var Ab=Eb;!function(t){var e=Pv,i=xv,r=bb,n=Ab;for(var o in t.exports={Reader:r,Writer:n},i)i.hasOwnProperty(o)&&(t.exports[o]=i[o]);for(var s in e)e.hasOwnProperty(s)&&(t.exports[s]=e[s])}(Nv);var kb=Bv,Rb={Ber:kb,BerReader:kb.Reader,BerWriter:kb.Writer},Ib={},Ob={get exports(){return Ib},set exports(t){Ib=t}},Tb={},Bb={get exports(){return Tb},set exports(t){Tb=t}};!function(t){var e=Rb.Ber,i=ue._,r=ue;const n="-----BEGIN RSA PRIVATE KEY-----",o="-----END RSA PRIVATE KEY-----",s="-----BEGIN RSA PUBLIC KEY-----",h="-----END RSA PUBLIC KEY-----";t.exports={privateExport:function(t,i){i=i||{};var s=t.n.toBuffer(),h=t.d.toBuffer(),a=t.p.toBuffer(),u=t.q.toBuffer(),f=t.dmp1.toBuffer(),l=t.dmq1.toBuffer(),d=t.coeff.toBuffer(),c=s.length+h.length+a.length+u.length+f.length+l.length+d.length+512,p=new e.Writer({size:c});return p.startSequence(),p.writeInt(0),p.writeBuffer(s,2),p.writeInt(t.e),p.writeBuffer(h,2),p.writeBuffer(a,2),p.writeBuffer(u,2),p.writeBuffer(f,2),p.writeBuffer(l,2),p.writeBuffer(d,2),p.endSequence(),"der"===i.type?p.buffer:n+"\n"+r.linebrk(p.buffer.toString("base64"),64)+"\n"+o},privateImport:function(t,s,h){var a;if("der"!==(h=h||{}).type){if(T.isBuffer(s)&&(s=s.toString("utf8")),!i.isString(s))throw Error("Unsupported key format");var u=r.trimSurroundingText(s,n,o).replace(/\s+|\n\r|\n|\r$/gm,"");a=T.from(u,"base64")}else{if(!T.isBuffer(s))throw Error("Unsupported key format");a=s}var f=new e.Reader(a);f.readSequence(),f.readString(2,!0),t.setPrivate(f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0))},publicExport:function(t,i){i=i||{};var n=t.n.toBuffer(),o=n.length+512,a=new e.Writer({size:o});return a.startSequence(),a.writeBuffer(n,2),a.writeInt(t.e),a.endSequence(),"der"===i.type?a.buffer:s+"\n"+r.linebrk(a.buffer.toString("base64"),64)+"\n"+h},publicImport:function(t,n,o){var a;if("der"!==(o=o||{}).type){if(T.isBuffer(n)&&(n=n.toString("utf8")),i.isString(n)){var u=r.trimSurroundingText(n,s,h).replace(/\s+|\n\r|\n|\r$/gm,"");a=T.from(u,"base64")}}else{if(!T.isBuffer(n))throw Error("Unsupported key format");a=n}var f=new e.Reader(a);f.readSequence(),t.setPublic(f.readString(2,!0),f.readString(2,!0))},autoImport:function(e,i){return/^[\S\s]*-----BEGIN RSA PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*-----BEGIN RSA PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PUBLIC KEY-----[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(Bb);var Nb={},Pb={get exports(){return Nb},set exports(t){Nb=t}};!function(t){var e=Rb.Ber,i=ue._,r="1.2.840.113549.1.1.1",n=ue;const o="-----BEGIN PRIVATE KEY-----",s="-----END PRIVATE KEY-----",h="-----BEGIN PUBLIC KEY-----",a="-----END PUBLIC KEY-----";t.exports={privateExport:function(t,i){i=i||{};var h=t.n.toBuffer(),a=t.d.toBuffer(),u=t.p.toBuffer(),f=t.q.toBuffer(),l=t.dmp1.toBuffer(),d=t.dmq1.toBuffer(),c=t.coeff.toBuffer(),p=h.length+a.length+u.length+f.length+l.length+d.length+c.length+512,m=new e.Writer({size:p});m.startSequence(),m.writeInt(0),m.writeBuffer(h,2),m.writeInt(t.e),m.writeBuffer(a,2),m.writeBuffer(u,2),m.writeBuffer(f,2),m.writeBuffer(l,2),m.writeBuffer(d,2),m.writeBuffer(c,2),m.endSequence();var g=new e.Writer({size:p});return g.startSequence(),g.writeInt(0),g.startSequence(),g.writeOID(r),g.writeNull(),g.endSequence(),g.writeBuffer(m.buffer,4),g.endSequence(),"der"===i.type?g.buffer:o+"\n"+n.linebrk(g.buffer.toString("base64"),64)+"\n"+s},privateImport:function(t,h,a){var u;if("der"!==(a=a||{}).type){if(T.isBuffer(h)&&(h=h.toString("utf8")),!i.isString(h))throw Error("Unsupported key format");var f=n.trimSurroundingText(h,o,s).replace("-----END PRIVATE KEY-----","").replace(/\s+|\n\r|\n|\r$/gm,"");u=T.from(f,"base64")}else{if(!T.isBuffer(h))throw Error("Unsupported key format");u=h}var l=new e.Reader(u);if(l.readSequence(),l.readInt(0),new e.Reader(l.readString(48,!0)).readOID(6,!0)!==r)throw Error("Invalid Public key format");var d=new e.Reader(l.readString(4,!0));d.readSequence(),d.readString(2,!0),t.setPrivate(d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0),d.readString(2,!0))},publicExport:function(t,i){i=i||{};var o=t.n.toBuffer(),s=o.length+512,u=new e.Writer({size:s});u.writeByte(0),u.startSequence(),u.writeBuffer(o,2),u.writeInt(t.e),u.endSequence();var f=new e.Writer({size:s});return f.startSequence(),f.startSequence(),f.writeOID(r),f.writeNull(),f.endSequence(),f.writeBuffer(u.buffer,3),f.endSequence(),"der"===i.type?f.buffer:h+"\n"+n.linebrk(f.buffer.toString("base64"),64)+"\n"+a},publicImport:function(t,o,s){var u;if("der"!==(s=s||{}).type){if(T.isBuffer(o)&&(o=o.toString("utf8")),i.isString(o)){var f=n.trimSurroundingText(o,h,a).replace(/\s+|\n\r|\n|\r$/gm,"");u=T.from(f,"base64")}}else{if(!T.isBuffer(o))throw Error("Unsupported key format");u=o}var l=new e.Reader(u);if(l.readSequence(),new e.Reader(l.readString(48,!0)).readOID(6,!0)!==r)throw Error("Invalid Public key format");var d=new e.Reader(l.readString(3,!0));d.readByte(),d.readSequence(),t.setPublic(d.readString(2,!0),d.readString(2,!0))},autoImport:function(e,i){return/^[\S\s]*-----BEGIN PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*-----BEGIN PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PUBLIC KEY-----[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(Pb);var xb,Lb={},Db={get exports(){return Lb},set exports(t){Lb=t}};xb=Db,ue._,xb.exports={privateExport:function(t,e){return{n:t.n.toBuffer(),e:t.e,d:t.d.toBuffer(),p:t.p.toBuffer(),q:t.q.toBuffer(),dmp1:t.dmp1.toBuffer(),dmq1:t.dmq1.toBuffer(),coeff:t.coeff.toBuffer()}},privateImport:function(t,e,i){if(!(e.n&&e.e&&e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff))throw Error("Invalid key data");t.setPrivate(e.n,e.e,e.d,e.p,e.q,e.dmp1,e.dmq1,e.coeff)},publicExport:function(t,e){return{n:t.n.toBuffer(),e:t.e}},publicImport:function(t,e,i){if(!e.n||!e.e)throw Error("Invalid key data");t.setPublic(e.n,e.e)},autoImport:function(t,e){return!(!e.n||!e.e||(e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff?(xb.exports.privateImport(t,e),0):(xb.exports.publicImport(t,e),0)))}};var Cb={},qb={get exports(){return Cb},set exports(t){Cb=t}};!function(t){var e=ue._,i=ue,r=Jg;const n="-----BEGIN OPENSSH PRIVATE KEY-----",o="-----END OPENSSH PRIVATE KEY-----";function s(t){const e=t.buf.readInt32BE(t.off);t.off+=4;const i=t.buf.slice(t.off,t.off+e);return t.off+=e,i}function h(t,e){t.buf.writeInt32BE(e.byteLength,t.off),t.off+=4,t.off+=e.copy(t.buf,t.off)}t.exports={privateExport:function(t,e){const r=t.n.toBuffer();let s=T.alloc(4);for(s.writeUInt32BE(t.e,0);0===s[0];)s=s.slice(1);const a=t.d.toBuffer(),u=t.coeff.toBuffer(),f=t.p.toBuffer(),l=t.q.toBuffer();let d;d=void 0!==t.sshcomment?T.from(t.sshcomment):T.from([]);const c=15+s.byteLength+4+r.byteLength,p=23+r.byteLength+4+s.byteLength+4+a.byteLength+4+u.byteLength+4+f.byteLength+4+l.byteLength+4+d.byteLength;let m=43+c+4+p;m+=8*Math.ceil(p/8)-p;const g=T.alloc(m),v={buf:g,off:0};g.write("openssh-key-v1","utf8"),g.writeUInt8(0,14),v.off+=15,h(v,T.from("none")),h(v,T.from("none")),h(v,T.from("")),v.off=v.buf.writeUInt32BE(1,v.off),v.off=v.buf.writeUInt32BE(c,v.off),h(v,T.from("ssh-rsa")),h(v,s),h(v,r),v.off=v.buf.writeUInt32BE(m-47-c,v.off),v.off+=8,h(v,T.from("ssh-rsa")),h(v,r),h(v,s),h(v,a),h(v,u),h(v,f),h(v,l),h(v,d);let b=1;for(;v.off<m;)v.off=v.buf.writeUInt8(b++,v.off);return"der"===e.type?v.buf:n+"\n"+i.linebrk(g.toString("base64"),70)+"\n"+o+"\n"},privateImport:function(t,h,a){var u;if("der"!==(a=a||{}).type){if(T.isBuffer(h)&&(h=h.toString("utf8")),!e.isString(h))throw Error("Unsupported key format");var f=i.trimSurroundingText(h,n,o).replace(/\s+|\n\r|\n|\r$/gm,"");u=T.from(f,"base64")}else{if(!T.isBuffer(h))throw Error("Unsupported key format");u=h}const l={buf:u,off:0};if("openssh-key-v1"!==u.slice(0,14).toString("ascii"))throw"Invalid file format.";if(l.off+=15,"none"!==s(l).toString("ascii"))throw Error("Unsupported key type");if("none"!==s(l).toString("ascii"))throw Error("Unsupported key type");if(""!==s(l).toString("ascii"))throw Error("Unsupported key type");if(l.off+=4,l.off+=4,"ssh-rsa"!==s(l).toString("ascii"))throw Error("Unsupported key type");if(s(l),s(l),l.off+=12,"ssh-rsa"!==s(l).toString("ascii"))throw Error("Unsupported key type");const d=s(l),c=s(l),p=s(l),m=s(l),g=s(l),v=s(l),b=new r(p),y=new r(v),w=new r(g),M=b.mod(w.subtract(r.ONE)),_=b.mod(y.subtract(r.ONE));t.setPrivate(d,c,p,g,v,M.toBuffer(),_.toBuffer(),m),t.sshcomment=s(l).toString("ascii")},publicExport:function(t,e){let i=T.alloc(4);for(i.writeUInt32BE(t.e,0);0===i[0];)i=i.slice(1);const r=t.n.toBuffer(),n=T.alloc(i.byteLength+4+r.byteLength+4+7+4),o={buf:n,off:0};h(o,T.from("ssh-rsa")),h(o,i),h(o,r);let s=t.sshcomment||"";return"der"===e.type?o.buf:"ssh-rsa "+n.toString("base64")+" "+s+"\n"},publicImport:function(t,i,r){var n;if("der"!==(r=r||{}).type){if(T.isBuffer(i)&&(i=i.toString("utf8")),!e.isString(i))throw Error("Unsupported key format");{if("ssh-rsa "!==i.substring(0,8))throw Error("Unsupported key format");let e=i.indexOf(" ",8);-1===e?e=i.length:t.sshcomment=i.substring(e+1).replace(/\s+|\n\r|\n|\r$/gm,"");const r=i.substring(8,e).replace(/\s+|\n\r|\n|\r$/gm,"");n=T.from(r,"base64")}}else{if(!T.isBuffer(i))throw Error("Unsupported key format");n=i}const o={buf:n,off:0},h=s(o).toString("ascii");if("ssh-rsa"!==h)throw Error("Invalid key type: "+h);const a=s(o),u=s(o);t.setPublic(u,a)},autoImport:function(e,i){return/^[\S\s]*-----BEGIN OPENSSH PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END OPENSSH PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*ssh-rsa \s*(?=(([A-Za-z0-9+/=]+\s*)+))\1[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(qb),function(t){function e(t){t=t.split("-");for(var e="private",i={type:"default"},r=1;r<t.length;r++)if(t[r])switch(t[r]){case"public":case"private":e=t[r];break;case"pem":case"der":i.type=t[r]}return{scheme:t[0],keyType:e,keyOpt:i}}ue._,t.exports={pkcs1:Tb,pkcs8:Nb,components:Lb,openssh:Cb,isPrivateExport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].privateExport},isPrivateImport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].privateImport},isPublicExport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].publicExport},isPublicImport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].publicImport},detectAndImport:function(i,r,n){if(void 0===n){for(var o in t.exports)if("function"==typeof t.exports[o].autoImport&&t.exports[o].autoImport(i,r))return!0}else if(n){var s=e(n);if(!t.exports[s.scheme])throw Error("Unsupported key format");"private"===s.keyType?t.exports[s.scheme].privateImport(i,r,s.keyOpt):t.exports[s.scheme].publicImport(i,r,s.keyOpt)}return!1},detectAndExport:function(i,r){if(r){var n=e(r);if(t.exports[n.scheme]){if("private"===n.keyType){if(!i.isPrivate())throw Error("This is not private key");return t.exports[n.scheme].privateExport(i,n.keyOpt)}if(!i.isPublic())throw Error("This is not public key");return t.exports[n.scheme].publicExport(i,n.keyOpt)}throw Error("Unsupported key format")}}}}(Ob);var Ub=Dt,jb=Ct;kg();var zb=ue._,Fb=ue,Hb=_v(),Kb=Ib;void 0===Ub.RSA_NO_PADDING&&(Ub.RSA_NO_PADDING=3);var Gb=function(){var t={node10:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],node:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],iojs:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],browser:["md5","ripemd160","sha1","sha256","sha512"]},e="pkcs1_oaep",i="pkcs1",r={private:"pkcs1-private-pem","private-der":"pkcs1-private-der",public:"pkcs8-public-pem","public-der":"pkcs8-public-der"};function n(t,r,o){if(!(this instanceof n))return new n(t,r,o);zb.isObject(r)&&(o=r,r=void 0),this.$options={signingScheme:i,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:e,encryptionSchemeOptions:{hash:"sha1",label:null},environment:Fb.detectEnvironment(),rsaUtils:this},this.keyPair=new jb.Key,this.$cache={},T.isBuffer(t)||zb.isString(t)?this.importKey(t,r):zb.isObject(t)&&this.generateKeyPair(t.b,t.e),this.setOptions(o)}return n.prototype.setOptions=function(r){if((r=r||{}).environment&&(this.$options.environment=r.environment),r.signingScheme){if(zb.isString(r.signingScheme)){var n=r.signingScheme.toLowerCase().split("-");1==n.length?t.node.indexOf(n[0])>-1?(this.$options.signingSchemeOptions={hash:n[0]},this.$options.signingScheme=i):(this.$options.signingScheme=n[0],this.$options.signingSchemeOptions={hash:null}):(this.$options.signingSchemeOptions={hash:n[1]},this.$options.signingScheme=n[0])}else zb.isObject(r.signingScheme)&&(this.$options.signingScheme=r.signingScheme.scheme||i,this.$options.signingSchemeOptions=zb.omit(r.signingScheme,"scheme"));if(!Hb.isSignature(this.$options.signingScheme))throw Error("Unsupported signing scheme");if(this.$options.signingSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.signingSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}if(r.encryptionScheme){if(zb.isString(r.encryptionScheme)?(this.$options.encryptionScheme=r.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={}):zb.isObject(r.encryptionScheme)&&(this.$options.encryptionScheme=r.encryptionScheme.scheme||e,this.$options.encryptionSchemeOptions=zb.omit(r.encryptionScheme,"scheme")),!Hb.isEncryption(this.$options.encryptionScheme))throw Error("Unsupported encryption scheme");if(this.$options.encryptionSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.encryptionSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}this.keyPair.setOptions(this.$options)},n.prototype.generateKeyPair=function(t,e){if(e=e||65537,(t=t||2048)%8!=0)throw Error("Key size must be a multiple of 8.");return this.keyPair.generate(t,e.toString(16)),this.$cache={},this},n.prototype.importKey=function(t,e){if(!t)throw Error("Empty key given");if(e&&(e=r[e]||e),!Kb.detectAndImport(this.keyPair,t,e)&&void 0===e)throw Error("Key format must be specified");return this.$cache={},this},n.prototype.exportKey=function(t){return t=r[t=t||"private"]||t,this.$cache[t]||(this.$cache[t]=Kb.detectAndExport(this.keyPair,t)),this.$cache[t]},n.prototype.isPrivate=function(){return this.keyPair.isPrivate()},n.prototype.isPublic=function(t){return this.keyPair.isPublic(t)},n.prototype.isEmpty=function(t){return!(this.keyPair.n||this.keyPair.e||this.keyPair.d)},n.prototype.encrypt=function(t,e,i){return this.$$encryptKey(!1,t,e,i)},n.prototype.decrypt=function(t,e){return this.$$decryptKey(!1,t,e)},n.prototype.encryptPrivate=function(t,e,i){return this.$$encryptKey(!0,t,e,i)},n.prototype.decryptPublic=function(t,e){return this.$$decryptKey(!0,t,e)},n.prototype.$$encryptKey=function(t,e,i,r){try{var n=this.keyPair.encrypt(this.$getDataForEncrypt(e,r),t);return"buffer"!=i&&i?n.toString(i):n}catch(t){throw Error("Error during encryption. Original error: "+t)}},n.prototype.$$decryptKey=function(t,e,i){try{e=zb.isString(e)?T.from(e,"base64"):e;var r=this.keyPair.decrypt(e,t);if(null===r)throw Error("Key decrypt method returns null.");return this.$getDecryptedData(r,i)}catch(t){throw Error("Error during decryption (probably incorrect key). Original error: "+t)}},n.prototype.sign=function(t,e,i){if(!this.isPrivate())throw Error("This is not private key");var r=this.keyPair.sign(this.$getDataForEncrypt(t,i));return e&&"buffer"!=e&&(r=r.toString(e)),r},n.prototype.verify=function(t,e,i,r){if(!this.isPublic())throw Error("This is not public key");return r=r&&"buffer"!=r?r:null,this.keyPair.verify(this.$getDataForEncrypt(t,i),e,r)},n.prototype.getKeySize=function(){return this.keyPair.keySize},n.prototype.getMaxMessageSize=function(){return this.keyPair.maxMessageLength},n.prototype.$getDataForEncrypt=function(t,e){if(zb.isString(t)||zb.isNumber(t))return T.from(""+t,e||"utf8");if(T.isBuffer(t))return t;if(zb.isObject(t))return T.from(JSON.stringify(t));throw Error("Unexpected data type")},n.prototype.$getDecryptedData=function(t,e){return"buffer"==(e=e||"buffer")?t:"json"==e?JSON.parse(t.toString()):t.toString(e)},n}();const Yb="/SceneMetadata.json",Vb="/db/sign",Zb="/db/tree_models.json",Wb="/db/topology_paths.json",Xb="/db/properties.json",Qb="/db/animations.json",Jb="/db/model_visions.json",$b="properties";var ty,ey;!function(t){t[t.BIDIRECTION=0]="BIDIRECTION",t[t.POSITIVE=1]="POSITIVE",t[t.OPPOSITE=2]="OPPOSITE",t[t.FORBID=3]="FORBID"}(ty||(ty={})),function(t){t.BFS="BFS",t.DFS="DFS"}(ey||(ey={}));var iy={verifyKey:"",debugKey:"NJHgNB1HDTrHTJc4ERFCBRVBB5HOBEDCjRLChRDIdn8K7EUJD,Vm4C6vC8BpZ6n6G,hxOjYZ{,wYhnJize2rlm9m,6bUcRVbP6sjNbKU8juOWUpukkcV6Cw,Bk2io7{YWJcPnG{1o3GUTpnO:z{kCYHL14HjO8noH1sp[J78k3Y3IcbOSSk97evccx0MdW2uR0f5qhZFQV8e2JCRxxJEBRBC",key:""};const ry="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO0AAAC9CAYAAABfw/p4AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAA7aADAAQAAAABAAAAvQAAAABwZIxcAAAzEUlEQVR4Ae2dd5tUVdb27abJGZogNthNThIkCIZRHwOvDoKogHr5PtfM+898jfkm/jOiCIKigzAYUBGQICBRcpbYhKbJ0O/vPlOnPFV1UuXq7nWuq+qEnda+z773WjueRx6xwxAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAqMQFWB47PoDIE2gcD3339fc/78+Ulk5sG77767q5IyVVNJwpgshkAlIPDZZ58Nv3z58lM1NTU9WlpabvLbXVVV9bASZJMMRtpKeRMmR9kRWLJkSW2HDh1mQ9LBrjCQtduXX375OPfH3Gfu+dNPPx2waNGii+59qc5G2lIhbelULAKQryvknP7w4cOxkDZDztu3b4/nYZK0+O/B/czq6uoRaOWv3n777T8yAhXxgZG2iOBa1JWPwMcff1yPlC9A2o5+hFUOIOeQlStX9uG40djYOOn+/ftT8OuwG6KL0CUlbbWEssMQaK8IdOrU6Q6k7BiV/3v37j1z8eLFRZjO01zCJsI0YD53iwpfSHcjbSHRtLhaHQIJ07YxSnBpW37d0/2hoavu3r07Nv15Me+NtMVE1+KuKARoi/b2Ewhzd5/f87jPMJHHoYFLxqWSJRQXAPNnCBQDAQg7BU05xy/ukSNHHub5XT+3qGeQtQXSHl+/fn3JuGSTK6Leirm3egRWrFgxEWLNVkY4r2aY5kx6pvAzG7eJ6c8j7s8QZjPxRZrXEfFk5Wy9x1nBZZ5bGwLLly8f6xI2Ibt6e1NI+9VXX/W9detWf5qnsbJHfNfpjNpMe/hErAAF9hRPygInatEZAqVAAMKOevDgwQuJ0RknSZmzXbp0WfLGG2/cXL16defm5uZpOIxXh1IcmRS+trb2Xy+++OLtOP6L4SeWoMVI2OI0BIqJAG3YBnj4UgAZd6Atb+I2nV/nbOUg7M+YxBmdV6TZdfjw4fenT59+L9s4s/FfssZzNkKZX0MgLgK0RQcyK0nTDJMH5BkWQlj5m0qn1DO5EFaB0dwysZMHyrf6888/f4IHi48ePToq6VCkC2vTFglYi7a4CGhCA9MLZ6L1RvHb7KYGYR+DkC9zXzQrEpL2/eKLL4bMnz//LGQdSqWhTq7epPsIFYEInaGFXfkKcS5axgohnMVhCKQjACk7dOzY8QnGVqdCEEfpcL2B5XP7cRvMs9fc5+lh49zTBn6QNuPJNxgVxVkcHkDUoekeSL+o85HNPE5H3O4rFgFI2QAhFsKrGV5isoTuPutfuyD4//E+zzYjaNCjhP+U8+mosJBVM6QyCKtwEDrFfI6KK1t3I222iJn/kiMAWfstW7ZsLiR5GVL1TBcAktxXby5uzeluce4h6WXi+HLhwoXf0sF0g/u9ccKF+CnqfGRr04Ygb07lRUDak0n66uEdyy+wKcek//uSFA28H63rTKKIKzmm9abFixfvJfoWNwzkPcVwURPPMioI10/E+SImdtG4ZZo2An1zLg8CdPT0hLDz0a7jwggr6SCrQ1r8HuT6QTYSy7T2ElZhdc8v684kNPRNgq9/5513Vr3++uvXs5EjG79G2mzQMr8lQ4Ce2SY03jLIk1x8HpS4S1pM27uQUPOIYx+YxePSPW/btq0jFUDGip50f557VRQ7GhoaPoWwh9IrAY+/glwaaQsCo0VSDAQo/A8hZOREhW7dujmaVjJgKjsaUgqX360ouSBnLW3mAfKHpqzSLKpjx44tgsyx5yHjdzVk3VbsSRVuXoy0LhJ2rkgEaBtGLlB3Na0ywPTES5DvAuHWc94eJ1P4HadJGhB2Hv61i0W3OOFcPxC/zr32nqkMuvLT1jQFPYy0BYXTIis0AhAyskPnzp07SU2r9Lt3775GZqqW3EHASE2NphzNbz5+B+Yo/1gqiCSXdE0FoO1XF1MhTM4xzsBgyYQCfZiDIVBGBCBSJGk139crIp1Ad3QvcxXSH/a6+V2TRmDPtJ9/n2ddmRnVoOeaUsnw1EIun0IDy0oYhbbtJLdCHUbaQiFp8RQFgTiknTZtWgpp0wTJuhc4LbzaxumPMu4ZOpoMWV9Dy74KWXu5HrjvSDt7pHtfiLORthAoWhxFQwCzNVTT4v4QYifHWCWIen9pozq9wlqgDnEu5CjgNXqj1/D7PSo8Mmg9bp2fP0hf0BlSRlo/lO1ZwRFQOy+XSKM0LfEmtSzXVZB19JEjRxZDlORQDnFkq201dKRF7svffPPNU26PdC7yKwxy9cVsfjTX8OnhQmuxdM92bwhki4Dac3TGPEnHTF/Cfp1t+CjSYoo6pGUyxiDM06e511cCRJQmN63+/fsfu3Tp0mziilw7i5/D/fr12+Rd5K4eaeK+gFtOHVUYA1eQJVm5uHLles6p9ss1MQvXfhCQ1vvkk0+k7RZz/QQFvg4C++6GGIYK4UIVi6xjtNiL7Es8T4T1xJVsiELA+7gd9LgFXorsXsK6HpEjW22tikMdYhv37du3AjO9YJ8PCQXEFdjOhkA2CMgU5Pc0JmY/bziNh3KfXPvqdQu6hpQ1ECbIWQvSu0KOkT4ekqSVG6Q9gMmsheqhB340fPMraSY/uKU28okTJ/rzPDSs64g/edzH0NN2tyfbdSvE2UhbCBQtDgcBzRemF/Upyqwz/JEOCwQczSKAbdJ86W5+92jmDpAnmLF+gRLPkCEljQULFlwlvrOQd0hIMKcSoF1cj5+jxFG1dOnSUbSRZ6pyCAvndcPvj2+99VYsze4NF/faSBsXKfMXiIA00fHjxydjompCQeYXrBIh4V9nvvk6nNtYBbpHjx41N2/eDEw3wiFF08ovG7rt42sAoaSVPyqeCVRAzVgLs7EWnCmOeh73QFsPxW9GHlUJ8bwHpvK1uHH5+bM2rR8q9iwWAtJE7lxdAkzlF0hYN8KEiezehp7xm49SySAtHUonIFTkfGTSHaw2MsJlTVhlCFzqIWiKZua+gUprIb/nQjMdw9FIGwMk85KJQK5zdSm0AwnbPzPGzCfXrl3LmbQQL8U8Vuyk/ZDnBzJTKuwTTPBqNQUUK2Ttx++vPHIW8CPDo3qWT4o5g5JPoha29SLg3VCNAphTRtB2mmzwU4zAN/AjzZiitWKEk5cMTauHkOkAmnAq5NVt0Q7iHwc5e4KR3wJ+5X9Drombps0VuXYWjgLYgW+0TmEHxMUUxHy3CR1JfJHzcWn7PSCtyNlIfq8C89aXtMR5A0Kd9AsT9QzCNxP2O9q8O6P8IndPtKvvAn7iiJX/oDSMtEHI2PMkAhCsgUKYsaFa0kOWF8RVE3c+Llp5P5ox3lhLqhy+pJUXyLc/1Wv4HTJoh8ZfBwwY8Cm90EcgY64yOQmRnbzmIxtpw99Xu3aFrKEbqqWDAxlO8dua/tzvnl7cWPNxpRkVrxsH1zqOu/dBZ3p9M9q0rl/tAcW1TO/Ig7ROUcmIrNvdoSrJBPFORAYO8KBKCG2dc9PUSBsAbHt+rA3VIOyzFNa3+MWZM+tMrKcwr4EQv6GYInto0VZ9SWNwHJw7d+7szkaSWbscrbcnRrgMTUu+akizB3mS5o7VIYXfZpE0Pb2uXbu6MqU7hd6rEqBCWc56399CPYY4GmlDwGlvTiiAanp2J164cGFxUHssDZO7FMLkxHq5Uciz6aGNpW3ZL+o0G5T/m4K+FgJpjDOyPYyfFNIy5jr88uXLCyH8LMlJRfC7NJ6uI46M9ifBqlh4n+1OjcmKTRM9ItIMdc5ZRYfGao6tDgF93oIx11mQrg8FO5b8EGkNhDqf7hkiHyCeKfyiupcbpNX95vp64yQakeus+wxNro3X3Nugs0PaJUuW1NJ+ng3RHK2ObN3VA66v5rEI4BiBhwdFoOekXQMeGr5xtLusA3B6muexhq1I7x7pbwcnbdOanBoZlmaUm5E2CqE27k4h1DdoZtHG0kerssot2kYFPoO0MichxEncHg+LkHSrr1y5MgY/u8L8pbtBhEjSyg8yPMd5rDc8eZSWVJo7INN+eplDSauwxDGeGVInaIfPJHikf4WhYnHmO3O5jeV9kc0FhYl7GGnjItUG/UFYEfVVspYdWxNYoL00l3ir20HjhQg+7sM9lLTyT+Eeh7/fkEPaNNZBmzByszfSf0aRBVgNWhSwkzTPojVlbketPuoNYTXUFQsnSH6eHSI3aklfVIZ4B87SRaI+ynzlC1H+5V4dx5P5aZsI0JkSWajCcg4hOrGh+Ag/PxTAMxTeyA27Kaw90WJ1fnGEPIvTpg0J/kgPN01kjDX8E4ewxOWM42JprIoiLJVGytJF7lMsgjDhjbRh6LRxN7Xr0EjH88ymb2cShbyFuGMRAnPVN44guSBHpKYNCqvn3t5tFiVoYn9Kp1VYWD834lP4He44rp8f7zMtXUTDL8BiUL43aLIGHWO70bqxZn4Zab1ottFrCkM/CskczhkT4ClvfsS6CDGOx4EDYiY3+073j0mZ7DxKd/PeE8dQZIu9PzAaPifSkid1BMkU/1TbyEgGrXdFyx31ypPNtcIqPm1W7tdM8MYl7ap7zs8RRntKbYPopyDsw+bm5gU4xaq8rE3rRbWNXX/44YddaFtNo3CMI2sqMAMhx6rEsImTW67PuO06CtNNSLyVD1Idoje5N9f1jqeIP0ik+JM7M2g8FLN5MvFNjgjqOCOfDpmH2+L4l6bFfxyvST/k5WTPnj03+X1jJ9EhNSrpOcYFebtMZbMJsv4R5V14MNw0hY6xvvhdh/z7CTsLmZ4Ep2e4bgJDrR0e889//nMHv9BeZtO0UYi3QndeujbLnoDpt4iyMF6MUDYoHF24fE1DHt5sUYj28HxnA9+i4ePMB7lu0Vgiz2NpSsy7katXr3b2X2KLmREUxEWk9aQKojedsGsKcMqG32F+cbsb4Z50Ji9X0GSrqYjW+hFWHjVsJRImA4Vc4O8OedsAWVey8VskYakkRzY2Ni4i3BTC1YNTL5nk5FcfpJbFsIF4vgLr6/jpPnXq1AxrKF2c7Kqr9NB2X3EIQMjHMEs1Lqla3ffA7TK/r9CyoYWfAtdAwXrZN5K0h5BjH+WwP/4HpTnFviWObynAkaaqlgVSyOeHRUz+7hDf9j179uz301zkrROyTiA99SK3EOc44nw2KE7iU+927C1kiH8A8Wo8tzNt101UbEMIP4n73aS5GffHmD32B+kOIt3ZuPXGbSfy7vKT1yuXaVovGq34WoUQ8+tVOnVep3wFElZZpHBoYsArhAnVhBSqE8QVa+sI/I3Ph7CSC9LLzI48NDRCer6akectxLPvxo0bamfuTScAzsleWxKaDmmGKcFhw4YFfkKEMKfpaf8MPDZG7fkkU1hpEKUmlwyErMfUfubaaT5A0O5Kj7bsZayhl/Grj2Vf6dWrl+SNNI0V1jStUGgjByR8lgIQq+AryxSgH9G2v4dln+V40yDBk2F+CumGRb0szjQ/P81IfmTObyJPjX4ySbuBj6YxJhehi5CQ8Wv5J85niSOJH9fXkUfTNE/4xed9lqgAtXGcfkshay/ayguIX+b0Kc4jeX6O7VzXuTPAqGSfxs8Rv1ll3rjTr4206Yi04nsKRhUF4WUKSX1YNiiMl2jnbYxTWNauXdv9+vXr76Epci4rIgY/DQENDZNLbvjZgybd5Pr7+OOP62lnnyD5lMkX2peKT1J+wHNptiZIsvm999477obzniGUTM+n+PlO9qCzbqnau5C2P9hokcQ9fjuIcw8VQORwkGTEBJ5F2Gamdm5EfscKIF1t6zpI8vHrwnVHzjoOId+GOHF78+Fe5/wi3AjsXFkIqManULyOhnDm2nqlQ2PeolBtQZOlfPiYMNpsLGMlixsW91cocPXufRbnaxTkzcR9EkJEtkMVLzLeHThw4EdUFP1pm2su9EAIscYdovGmjXmpj1zdDiIXcjuzjYhzAv4Cm4Kk4bQzFTdhpmAKH9QYtjctv2t1+D3xxBP/A94N/PbKfGbSxhCmRg7F1P1FixR4/hLxX2ED9M/poFOl1ZsPhu3N51u2Rlq/t9HKn6mwUkbfIBuOGQhxNISwm8Kyw1tYMH37UODVCdKPQvYxhUv+Mg5pEsj+SoZDwAOSu0f6v2JWqlc6GSdWgLRY5ER7Cvplrz9Id1K9vwHJZTwWmcaPH68hpGnI0SXDQ9oD0rtTW1u7JGqc1Q2moTSGj0TMQ/SWT6RSEYaN5FszwAaT5lbctK2NVk29y7k7FdDK999/P68ZaG76Nk7rItGGzmi2u/Qif02n1HwK0iWGGH7xDndoeIZtY56EsBMgh1NxQyiZjse8MKjwT5kyZSyaY7r3edg16T3s3bv3sjlz5jSn+yMprUF9Lv15+r2XsHKDBM7kizBrwI1Dvee3bt2aTZjQzjjXP+JKzi1xCCsSoj01V3oav06kdQaL5lBTU5P2RVYFKVIuhbB30bjqRb+Iv62kcbNQhCVO64gSCG31UE+mtzCKhJMmTRqD5poBMZxxVTfvFKyzkOLf7j3a+jGuYxd+N5zOxO07dJOYdPEBhMp6RhMVzE7atoG7YshqIF9PkfwwryxB15BJnwrZhdn6mxejIP+QtQ6M9D2ge5yvE3YE19uxJn4Fq+e5H839bmTQEj6tBqpDA6+K06kWlGbQ80A7PyiAPW89CHgLo9paEydOXECB044UKYRVjih0Q1TwdU0B/Qv3r/OLpa0UxnuQhu90PMlD2prrm/UBAcZAtIzyCmE68JsNqd8h0riEPaQhFhHOi5GfUEqT+NVufQ33M4T5gvMWyKned2ndaiwZZxcL3eP2Dnm8zSdBlhaDsJIxAwQ9tKPtIPCvf/2rF4XuFUzcv5Kr5FCHXw4pgM5wB2S97ece9xmF9lG3AkgPQyfP/vRnMe+78omOhnS/dP7o+7SP84vsn4FUWjL3OWHW+5nv6XHrnmjVJneGkMCnL/ctMtPB6DTX3TCRH6fpobnal7hX/F+oQypqPNcvrbjPjLRxkWpl/jQkgsacwacw3qGA1ccRH2JrfWwNw0EH4vgP84Pm89W2c+fOvULhj5z+5xP3RbTXtfTnIhFaOEreG8jzHWRbJYKlx+G9R7Yq/bzPmAih+DXtcAgVoLP2ljSdyocOptEJv2toy65W/rxhi3FtpC0GqhUQJ195G0rhm4IoobOevKLSmdKJoZYR6rRCc2TMO05ok1iFkrSdCsAbv3tN4XfMSfc+7Ew8GnpZL7OUDqbOGktN9w+BDuIvZRxXfnikHRm3MaFhGe3hI+nh0u8h5GA65N7kp6GZ5IEJfZu8O+GRfSz+ulLBPc6ze3g6Ko9UCLeSAYp8YaQtMsDlip4B/uOknXVBcte2QuCkGUv77RYF9EfMvs/RbL/FyROFuyMrWzQLKOOQbIozwyH1gTYqdxYxYHKeh0iaNPI6ZNFHvlIOv3XByHsQK0M9uTui2q0ioSJkWGsYadTyc5oJ3kSoGNTB5LRjcddCDFUSil8TJUp6GGlLCndqYmgNfTpiHsvgNPWtoAcFXm290CmKfgmq0DIkNEDEouA389tFPJ+iSX7n3NK3b199AvKOX9j0Z/jzNZElG4U+0KQlzeMQaBnE3nXq1KmpzCNeiFz1ip9wzmZw6Wnh161kzhH+c+T9IWqCBNirE0vDN+999dVXffv06aMKiageDKPjrqc3DczrJu7P8Wuk+fBvNL+mgEZVPN4oCnZtpC0YlNlFRGEZQ+HSXOFBFIhZ3Mfq+cwmFbX1KIDZBHH8QhIt53uonRgomFv4JVcDSWsRZ6weYOLonxivzJCBvGvyQbpJ2whZ/41G/4YAQ6TRSGsyZ2857YAGd9uRyXgJc5Y416L5vkTe0HarAomk+NOXA7rz64DpPU5mMDIf5lafu9TkDMcfM680w+wZyPotYSK3klG4Yh5eMIqZjsXtQYAOoke5TVkGRrmcRRku6PtgbnEThVC7/t8mvVhmrcREjhGagBFkViKrq9XkPfSgoybD1FQACv8NTid1TXrOGlW01wrI0gJJFmAG/wUnx2yVH+9BfjTUktJZRD7Vq+vE5/Wbfk3l2JX434Ckb6jTjUrBNXtH6Z549ioM8Y/BJH+a7+Nqgsp5xnN/itLc6WkV676ghaRYQraleLUImkKgubzp2PeGzBMLnVc012biVNvrFwqiM5E9Kg1pHk+vaIZ3yHGNuE5nOPg8gATDIYPvVELanHuBYY/GNEnyNM2Fl4h3LmEyOpu8UROmF341+SP2IULKM7Krfa6mQ2e2bx3OvaYfniX9TmjwhsRkf5nBXZFFci/HT/KTIIqj3Ed6wSm3PG06fWr5TuwFNEcFJiCjU6UJAtxyeqwBfgqdY96iVWJrSDRehjbzCgBx4vYAd+Dr72O8Yd1rNNcZ1rFuo8d6Epp1ISTJGId1/aadpaVj2f3EqV08Jl26dOl9xlSdHTsgqdOeJo8TFC+4ONqVy7G6p6Jbjx+1izVMpLQq6jDSluh1aAohhz4s7Mw6Cki2E+7TA9zyfjxy5MjDFEYNU8Q5etPuGxLkcffu3TK7m4Pcvc/RYhkVAGRKfkWetnesoSnCwLP72zWEgykdOdarCR7giZgPNSmiMz3jTuXBe1An223OTqeblv4h7w3I21sVq5oVkDWyXezNYymvjbQlQpslXFoJEmnSUZjGYvqFmoe5iqwVPhTeWJ1ISoN2n2/vr9yohB5S6GNpbtLsSfuwVuF0qHOKpoC2i3kBN0f7OQ4hfxDqsKYeQrDIqYfqZFLnESb+W2qbE61rFWgfqioIqYkSDg5YPlo00YJ2/Y6zOt4cqyRElLI72SqfErwCCtAECksgAbwioJUewVR8mmdfep8X6lrTCFnh45iFUXFSiB/XIvigKX/0pv5OXNrtMaVTyBsv+dZ+VBuludBiPcjfDPLnO37rDee5vgjBNtImv+B55nspgkLCaXQejSbMTdLqwPUY0v6NtC/xrJYKcRjynGSY7Q4VgeJxJp/E2RDAN9EyPDRNW2TQ9WErCom0bOyDsjYYTTQ8doAsPGqaHYVVHS2Rh8hIoXfaeX6eE72pKcv5PP40hvkTZFvJ0NElSKPxUO1KGIuw+LuJKfyDZkLRORRKWPxWgfN4CLuY616kuxzRf5EsnPvLnUtH23I9Fa3/JhbNSNy+ZqjoW/lrTYeRtohvS2YaJpp2LgjUREHJU7iecns8g/zk+py4XXMxMgqIE7q1KdorJS7I8JAwuzlpo7IDECSrLVUVnmNXg2c71yghgbcFnLWlTGcqPE38GMzvGX4PyOtIzPE6Ko4jXGtj8l7IfJCKYAUVwumouCvR3UhbpLeiYQ7ahHMoIFmvHU2I1INe14wpe4UQl10gpB2lCSMPiOCsZAnyqA4h/LjzkU/ibzntzs0sV+sNYeeT/xf5dQ8K730OWY9DvmWYs1u8O2x4/YRc74aQOkaS3pNYE/rcxib5J86xGnOmw2uVu0sjMmv1Tqs8jLRFeG2Ygh3YD+hVCkbKVLhsk0JrTFabMttwUf5VYCnQv0f5c91pt4a2xyHIduL8Gs26ll0r7kPWFzCr3+TZQDeOiLMzEwqyrvvggw+uh/nV6iXwnZk+04qwNyCseoF1HOBeFYjTaIWsTgWl4a+///3vmmjSqg8jbRFeH4X1OWr7QflGTTw1aIaZ+cbjFx759ic6YvycU57hN7lAPsUhcQNBjjFj6BwdblMZc12E3KP8/KU/g2R30K4/s0H3SjqCMlYVpfvX/dGjR7WZ22QqnYyKhEpuj/wQ50TW3r7B/ZN0eq3DFN6g523lyLqtVeyMU4t2pVdyGGD35LyvUqaOxc038uvzDzPi+o/jj+GIVcXo3YRkc0g/1pxn8pSytalXbnWaQcCneNbD+zzoGr+acxx7t35pVUjaHVP8KPj2oFLQZmkttFM/0nxhbzrk6W3ce1Ih7eT5biqUWJMwvHFU+nVNuQQE8+qvv/56CGbUYwA8kELRi2faG7YawjpiMRg+iW78j4q5C0Ah80+B0mc0CkpYyQce+szHFxTG9An2eYmP2bgPMsQiLdor4wPSzDCq5R1JNnX8xDrwe5p0N8XZikVNA1ka5H8k6T8kvetU4uqJPgHO9e5X5ImzGmJPUGcUFdwG3JpaW2UfC7yEp5Jo2o8++qgvWlNDH4MpeH04d+cd1GC+RMrKCziFebMm0mOZPagAUwHNI0+hmSLvLWBwlorqmrAgf0PiiI6/H8DBmRAQx38cPxIFzaQvnMdqe0OIH9H4v2s6IASZDuHHRGTXK0ZyD2Tvw6BriCkctetGR8rKz8j4Evdqt64gTQ3jzOXXxG8jfrTYQj3DznhwUJxt5XlBSbt3795Ohw8f1uD1o7zU2kRh0NS8vNLhpaygwMaa7F6OF5PYhV8dL93C0qfw3aby+o/X1MW0rAOvVwkXSnZIfmvEiBFLc+hVDRNJn8KYjFyx2s3IeRk5jvA+popMoREnHInbdw/koLAiq2vS0qH1KuHruP8QnDTVcTr3x7lfJzOY+35g3oxMWj54OCjOtvY8J/OYl1fFy5ZJVAdg6iHsza8rHQrVbs3LS42NFXFolwING2gDrUbCaurZVDcCnF/h+hP3vpLOGktVTzEyhxIWmR9gFq6FsBcocBrc11RF7e63hntNBNAsqMADXLvSCSNMtgR6ysGBRe2/I/905I98Ybyj/uQh1hRL3pl2eDyASNvoVY4cXlqyZEkteZyNNleH1HZlhfSu8exxJk48TpmTMtDUyXrw0tfnNpLGINq1e4KWECqOtnhEasANGzb0PHfunAATSftx7s6vo0vObEEhbBNhGgHd+fESGvnkg0zFlPYaNW76pyjW8/IPZZteMf2Tl1jfzpEMkPR7aQPytYA8O/NwVbBZnvbLjh079rAj/ls87xsmL3E8xIJZFjUsEhaHnxta7EXyMtLPLcdn55BzUzYbdKMEnM+GgMktcFpCeXgIVmPAROtq75L1XzlrfHkBZe80ltf69DKTo6ytLlhS0/LSqjFH6sjBMMBQm6EX584Q1iE2107m3HNUTgmvmSmO5iSMtGcjy7CuxDXveOm/UKCHEodjNhLfs7zEo7zQiukNpKBJQ9VHYUEh+5UK5zDDENpPODlxXhUf+ZzJ5HvNjdVEgNfD4iJsNV9ZUy/tujB/2bpBFH2ZvBCk1a6HW+Jsoqbylug80neENkFCWSAXwWRAYqvUIzQlrqpTEsJuxc8+5QuclmKd3M02j23Jv7NdJGDNg1gyc7M+VPvzwq/y4ht5EY0QrZFJ6Y1Bk8yzSYDvpMzAHFNbxjmIfy9zRTe69+U8g5nGIl+IkgGZj0LY7yiIY8lLym4VnrAn8bOWApluXXi8/HmJCflvzOxY45p/hgq/Ij9OGzHcl78r716m/864u/WTT1XEGh56B3xa+C6OM0KADJrn/By/c+DxpRYA0Ln3vxSxXZC2oM0C0mi1Rw2FaTiAxyXsDXKqlf5XKDiXqQWvQKKrEL4oU8JY/7mTzxmOJn6nvUi6E3jhO3iBkW2kYr4RZBiMLNKaUclc5MNOPzC0pU65IMJqEfawjRs3dr169eovDHEMI97QiBlmeRrtvELL46IEiOtOfqRtNV83q4NwR8jbFrSfykboofWtaGJ9auQ8/n/FsjvO9XDyPJqAu+vr64+w9at6ggeDcT+G+hox3dW+3RMacTtzrBGAFBrtcpeSdYBzv7btmLg4NkKWkpolMqWpfVXDviDhEjK+zOWXui/HgUnXE9L4bReTIg6FuRmL4z908lRTqOen4+v1LLczZ87MpwL8hMK6G7fJXvf0a95Z38RX4RyTMd09l3tkPU6+YpOW/MX+xq00JsTUB7/GgsVuaWTJSD72Uc6Gcx7H7e5p06bdp5I+jx810x7j1yhyc7bDg4DTUKWgpJtljnni8Ve2S15qFbXtfAQY4AqBli/KDCE3/qAzOOl7p/OQKbTDCPf7+FulYSrC/I1CGWt4BItnTV1d3bkjR44sJnzotjOkcUd7KxVq4glydkDO/xeUd/c5FfwtSLWVCuYg55TOQ9ePe9a7Q7uOhazTudbEmRaaT0u8Ex94tzKRhaf2sGogzs7gsMnve7RuvO397JphPwBY8gXwYvpplUolgKOCwctOaccygV1DQCU9MEWlMbXxWChhZbUg73ciLFbCIq5jEVaZobnxsqwLKqXI9psKtxZ8FwoErCgtY0uWgfR40azaq3gX6Wp3B2cP5HQ/3ntNPaRZ0IlgIwn3DeFkRlehzcd4/ZHk/sT9VPwdQbMuN8J6Ecq8dkgrsxc8nbExeQG8Thq7y/RenifqWeTlHnJTRz5tgxlr9wU3TL7nCRMm6KvkMttCD2T7hYJ3Ag0iM17j17EP4q8h3Aym+B2S+Rkj4Hit2Y3hL64X3+YP2J9gqd0y5ErZA9kvUjUflHcqoHksTRygDiXw+ANcHHKSr3GqAN2w7Pf0OxXbJs5Lec8pH6F2/dg5FYEkeAC7k5ejYRrnoADpmyX93Ptyn9kfaCvy3Xfl4OXPKtYicTcN9wwO2rw7spJApoMU0t/o9Z6MrA1u+GzOxOG0ZxnuSLEu/OJApiqIMcvPLcdnKaRFliv8VmMK/0ff9wmLU0vm1NuPJn2bMI6VhlmcxEzEVXwQtDv7ZWkozzk0MUJkTZ/477rbOROBJGl5/9rc6nvXiwoE17Pd+3KfNYSESFq54Ry8/GqsgdgdJ264bM/Ms32MdJ+OCgdJ/6Bw/4SmGUKbbGaU/yB34Y4V8VdNdeTycJA/9zl+6iSje5/PmbjuKXyi8t64b9++FVhhZ6LiRLPW0YGkpsAoytDn9JivoZmgCmCY5im74XF3tC1kHu4+s3P2CCRJq6BqS/DCknN8AVmf9stJY2QvSnQITCjtTtDk+uR6tMwx977QZw1RoDm07anTYRcUPxrkOr2j32CqdmGyxOtB/uI+J7lH9V1ZTNIt5DFpXQSFR8ZHg9yyeU5amnS/Vx1cWAx7o4aUNIuJ8tEVgmrzti7I3Q2z+D6V6Qily/1x8pDU3uAks38rz3/MRi7zm4pACmnlxIybdepMcQ8AfooXkzoe5DqW+CxTisLhbNilpGkn6ZsrajsW5aCATSXiThGR30W7rP3b3/52hw4yrZgJJXhEXElnhmDmyrrgXexKPvS5AA911B3zccr6EWRdh7UQ64PIlImZ4DOfvGu3Q/UoOx1NiPM28vwFa6OK3w0IXMszBxP1nfDbye/PApa1lBYgg7SYZU28iIMuNLwMabIn3Ptyn3nhxygEf7hycF1bKPPQjdM9UyhDtRxpt+DnG60NxUR8F6xq3LD5nom6O23EEYMGDdKYZuDEBdLcoJ7qfNNT+KjhI1Xe/JzeXyp35x1QaTp7CTOU40yAgLDqLd+G/FfBZiL3s5hEUcjOskJktVXHkUFa5YaVHz8DeHK2DQVjqrdtUu4co2E3iTCuHGg4DcUURMO5ceqMppA5nkzH66ZrnLR+8wyzymQSx9q1IT2OsHtwf17WBeekdeH1z/PdmLFaSVOSg/T0nR2nfU/lfppEtdCjJ2byY1qcDh4XuNd7uIVcn1OEPqYD6gsw0gQdOwqEgC9pVVCoITe7afAeaiBGzp0rbjyFOkuzQNxkYUW+zizfCp1FlEva0qDg4DuFjgK6l8K4Dw07A1kK0hGULiPxSrM9S8E/itu5NPeT4OBL5jR/ed16N5YTITlqkElrpFWZ7U1EPlZnTHlhpXnITrkCnxsJfwlvdioEAr6kVcTqiOCUnOML+KOYjpaclVSIxPOJA2tgG+GTnRyYadNVmPKJ0y8sBfFXNMZtrxuEPc2C/82k18B1ckGD10+hrolfH57WV+w2efoaGuvr6/UZi0ArIN/0SVdrpmezUdt7mOmjFR/PburMl9mdHSLBRR1L9/jVyxLT1qw0rZbRoVmw6ZVKz45UBAJJK2+8jG+83pmB87RepvdZua41rod8yXmpFOAqFNNfCi0P2kJrOVVBOAfXV8DgW+b+9uRctE4wNz3ypMt5WpuK1pd1oU81ro27xNGNJ9uzKgR+GlutIt3nsCjUQ+1U4uTbGcYRNvjRdMYrjBd35PxQfSLZpmX+s0MglLS8FJlkSbOMlzKQlzcyuySK55ueTlkD19wU0LYNGqZx7wt1RoMcoKBepgBru5i1pKsOqncShCpUMoHxQJraNWvWaAOCbVz/R2ZnoOcCOtA8OE4efyHNavL+Cuk7UzIZ1nE0rZKSTNoCFZmS76GAIlhUPgiEklb+KaTfeswyjb3NKNVMJB95Ux6pZqf9tMl9KBJB3Ffc+0KdSYey2bIRLLS/UxMV1/sqyIWKP048mKl/hRi3aMdeiOO/UH5oJv1G3g+AQWey7I6/OppWaSDT3ajx3ELJYvH8F4HIgpdYkZFso/ACu/PF7KK247J5OZoQghY45YahcPVRW9O9L9SZwnkOwp5n+EIrjkJX4BQqTW88EKYL7cZh3meluoa4P5PWGaXH+z+Npj1WqrQtnUwEIkmrIBBhM9rWOyA+qZgzkTLFDH9C58dmCpO3U+Z5bmPlLTzmVFc6ZiaDxcDUp6W7owf/hdKl9mdK5Jl68eE3WDVraBp8babwn9iU4yp2pxIFdjQv7nlXSF7kMYYiUjqqXLdynNGuz6KNxrlpI99O5Nvq3ud7pue8rqmp6bVStWND5N2B5kt2jIX4M6c2ikBsbURbSrOkkh0gaLKGRI9i2aHRzgiQtLNXECqYyR9++GEX77Ncr7Ujpb6AVwGEldUzuVL6FHLF08Llh0BW0+7oiFnHRlvawtJJFWLokxArKUhe0zQ/iUJCy+SlTaneYS0ZTP6QqTsypITkvoq5tNN5uCHFIcsbEYStYN4iz7EruCyTyMq7MKBP4SUCrc0qoHluMwiklvQY2YI0r8GHOtcrvbUb2DLTWXLlPivEGXO3B/Nb+1IxaKjD+XGtz2jEJg9e92Mh5EVa8ruQ/BZ8GCkfjNS9QIW0XF91zyceC9s6EchK0yqLLEH7nuVWH0iT6R5iaCbSEXX96z7bQ4un0WT9MD/1iYd+aLR+FMp+xNuJCiElujh8heCaxH+bTpPDjDPmNc2POcVzKo2wAkSWDp1SGtr6NAUgu2kXCGStaYUKbdkZcCM57EPB3k2nz+YwxLTFyOTJk3t5NSf+RdSc18MSVlPomvlpltI5lrOdKNSMHBaiy7SeGpancrtB3nWaAFFuOSz90iKQE2khiNqW/4vm6yhxuW9Bsy3XBHvdax4qc2Vdk7Yv5OrPTybmfxvD8hTzkClIWG0qdotrfdtFkwv0WYhzPC9KW5pKaTha/iXSiillebyBxzFma1VMD355UGh/qeZEWsGkCQyQ9mUXMgrQLe6vwt++nHPqtRX5ie8uJ33C8DJrNM+yYflJNlXLyfR2ZYt7Jk9acDAT+ZNDR3HDlsMfHYOrmfziTHooR/qWZnkQyJm0EjfXThppT4ihXShuoqH1xYLzaLWTrqYuBRSao4ymHopFMBhZ+iKLeqCzbuOXQla/NMBsP/0IeXWy+cVrzyofgbwKKYRbR6FfGGZGQgZpT61Muc7lRXZVPP3aa6+dlclbCnikPUl7KDIOIf3kN3OpOJwKC8I6YiBPKcQpVBrnjLCFgrL1xZN3SYUU0yDDk8o6xJAZe4P7y9qOhA3HTlK4kmtyiwkPaVatWrVqIPNitT2nPpuoNnRXnie/mVvM9EsVN5VLM+35jzkXpT1fqnxYOrkjkDdpc08695BMeOjBhmH6JOejMm2JqQfkdDrFco+18kOSx/uMzy6J2sup8nNiEuaDQEWTVrOR+JJcHeQcggYdwFkLz7VVZ0XLnc8LCQpLvluwZFaiZQuyiVtQOva88hGomMKPmT0ArVmHWTsITqqTqBvtTsppZQ+7lOoVg8N3dNQdKVV6lk7lIpBXR1Q+2YKkmjv8PAqkF+dOboeQe1bcRlih4OCwywj7Xyzsn11CywUCmlTbcaaszCmXLJWcLpbHKZbibalkGU220iIQe/J9EcQyuzcCVAh7nd73NRHezLmdIVA20lIgtT7XjmAE7l65cmVFsLO5tFcEytoRRbs29lfS29MLUk8xxzK0rO1w2J5efMy8lk3TSj5mVG2MKWe78aYpnsy51japRth289azy2hZScuY40G127ITuW37pnNuK4sATrbtXFru8kGgrKRNCL4unwy0pbCYxEfRsDvbUp4sL4VHoOykpZA2UlhPFz5rrS7GRrYn/bbVSW0ClxyBspNWOYa03/JrtxPgyfoddv5YWfK3bwm2SgQqgrRo27vMhNrVKhHMU2ja9A9ZrvgZbdmSLFXMU1wLXgEIVARphYM2FpfGqQBMSiaCeoqZqrl6zpw5zSVL1BJq9QhUDGmFJENAP6ogt4dD+US7/kxl9Ud7yK/lsXAIVBRpmRR/nILcLvbypTlwgGZB8sNmhXulFlNbR6CiSJsAe11b17Y0Ay7QU/xTWy9clr/iIFBxpEX7XMNMPlac7JY/Vgh7k1U7q8oviUnQWhGoONIKSDTt9+pVba2gBslNvh7U1taqp7jdDm8FYWPP4yNQkaRF2z7gm7Pb42ej8n2iYVsg65cvvvji7cqX1iSsZAQqkrQCjE6pnSimkuzkWIoXBGF/oDK6WIq0LI22jUDFklawU9C/h7ht4Q38Rjv2UFvIiOWh/AhUNGnRTGeYfNDatdMZCJvX1/vKX0xMgkpCoKJJK6B69uy5Tu3BSgItriyI3QRhV8f1b/4MgTgIVDxpNcWPwt/qTEtkvsPPtouJUwrNT1YIlHW7mbiSUvirtTUNpnJFbwan9jdjzPpm7lmGdr6jpzj1q9hxM2z+DIEQBFoFaSU/pB3P1L9nQvJSMieRk06y5DdzSfgin508PW/evD943ipN+ZKBZwnljUCrIa1yytfZ3+PUI+9cZxGBCEplodVHzofFuD7brVu3k/Y9nSxANK8FRaBsm5XnkgsI8y3f9JlfLCsZgj5AU6oNfZXzech5Yu7cue1iAUMu78PClAeBVqVpBREfstaXCR7NBy5I2UK78zbkv0ZcFzmfmT9//hmu29zUyXxwsrCViUCr0rSCkE89rmtubv6/ECyywpFpCyGdb+Zy3cj1H5cvXz75j3/842Zlvg6TyhCIRiCy4EdHUXofn3zyyQx6aae4KSfI+QDz+eb9+/evokUvcH3Kpg26CNm5LSHQKkmrF0BvcgOnASwsuNCnT5/TNrzSloql5cUQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBNorAv8ffdoYPNOFmuYAAAAASUVORK5CYII=",ny=237,oy=189,sy=new e,hy=new i;class ay extends r{get size(){var t;return null!==(t=this._size)&&void 0!==t?t:this.size=new n(100,100)}set size(t){this._size=t;const{x:e,y:i}=t,{camera:r,currViewport:n}=this;n.set(e*Math.random(),i*Math.random(),e,i),r.left=r.right=e/2,r.left=-r.left,r.top=r.bottom=i/2,r.bottom=-r.bottom,r.updateProjectionMatrix()}get velocity(){var t;return null!==(t=this._velocity)&&void 0!==t?t:this._velocity=this.direction.clone().multiplyScalar(this.speed)}set velocity(t){this._velocity=t}constructor(t){super(),this.viewport=t,this.fontSize=50,this.imageWidth=200,this.camera=new o(-1.6,1.6,.8,-.8,0,4),this.direction=(new n).random().normalize(),this.speed=2,this.currViewport=new e,this.lastRenderTime=0,this.autoRender=t=>{t-this.lastRenderTime>30&&this.render(),requestAnimationFrame(this.autoRender)},this.camera.position.z=2,this._generateMarkForImage()}_generateMark(t=[28145,22323,36805,32500,25968,23383,23402,29983,25216,26415,26377,38480,20844,21496]){}_generateMarkForString(t=[28145,22323,36805,32500,25968,23383,23402,29983,25216,26415,26377,38480,20844,21496]){const e=Array.isArray(t)?String.fromCodePoint(...t):t,i=e.length,{fontSize:r}=this,o=r/4,u=2*o,{x:f,y:l}=this.size=new n(r*i+u,r+u),d=document.createElement("canvas");d.width=f,d.height=l;const c=d.getContext("2d");if(!c)return;const p=c.createLinearGradient(0,0,f,l);p.addColorStop(0,"#ff3653"),p.addColorStop(.5,"#8adb00"),p.addColorStop(1,"#2c8fff"),c.fillStyle=p,c.font=`bold ${r}px/1 serif`,c.fillText(e,o,l-1.5*o);const m=hy.load(d.toDataURL()),g=new s({map:m,toneMapped:!1,transparent:!0}),v=new h(new a(f,l),g);this.add(v)}_generateMarkForImage(t=ry,e=ny,i=oy){const{renderer:r}=this.viewport,{width:o,height:f}=r.domElement,{renderWidth:l,renderHeight:d}=this._calculateImageSize(o,f,e,i);this.size=new n(r.domElement.width,r.domElement.height);const c=hy.load(t);c.wrapS=u,c.wrapT=u,c.repeat.set(l/e,d/i);const p=new s({map:c,toneMapped:!1,transparent:!0}),m=new h(new a(l,d),p);this.add(m)}_calculateImageSize(t,e,i,r){let n=0,o=0;return n=t,o=n*(r/i),o<e/2&&(o=e,n=o*(i/r)),{renderWidth:n,renderHeight:o}}render(){const{renderer:t}=this.viewport;t.getViewport(sy),t.clearDepth(),t.render(this,this.camera)}addToViewport(){this.viewport.postRender.set("cps-water-mark",(()=>this.render()))}removeFromViewport(){this.viewport.postRender.delete("cps-water-mark")}}function uy(t){let e="";for(let i=0;i<t.length;i++){const r=t.charCodeAt(i)-1;e+=String.fromCharCode(r)}return e}const fy=(t,e)=>{const{content:i,sign:r}=t;if(!e.verify(i,r,"utf8","base64"))throw new Error("v2 error");const n=function(t,e){const i=t.charCodeAt(0),r=t.substring(1,i),n=t.substring(i),o=function(t){const e=function(t){const e=[];let i,r,n,o,s,h,a,u=0;t=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;u<t.length;)o=ly.indexOf(t.charAt(u++)),s=ly.indexOf(t.charAt(u++)),h=ly.indexOf(t.charAt(u++)),a=ly.indexOf(t.charAt(u++)),i=o<<2|s>>4,r=(15&s)<<4|h>>2,n=(3&h)<<6|a,e.push(i),64!==h&&e.push(r),64!==a&&e.push(n);return new Int8Array(e)}(t),i=new DataView(e.buffer).getInt16(0);if(1===i)return function(t){const e=new DataView(t);let i=2;const r=e.getInt16(i);i+=2;const n=[];for(let t=0;t<r;t++){const t=e.getInt16(i);i+=2;const r=e.getInt16(i);i+=2;const o=e.getInt32(i);i+=4;const s=e.getInt32(i);i+=4;const h={index:t,encrypt:r>0,start:o,end:s};n.push(h)}return n.sort(((t,e)=>t.index<=e.index?-1:1)),n}(e.buffer);throw new Error(`解析信息头失败,版本错误: version=${i}`)}(r);let s="";for(const t of o){const i=n.substring(t.start,t.end);let r;r=t.encrypt?e.decryptPublic(i,"utf8"):uy(i),s+=r}return s}(i,e);return JSON.parse(n)};const ly="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var dy,cy,py,my,gy,vy,by,yy,wy,My,_y,Sy,Ey;class Ay{get path(){return this._path}set path(t){this._path!==t&&p(this,cy,!0,"f"),this._path=t}constructor(t,e){this.ssp=t,dy.add(this),this._path="",cy.set(this,!0),this.metaData=null,this.treeData=null,this.topologyData=null,this.propertiesData=null,this.animationsData=null,this.modelVisionsData=null,py.set(this,iy),my.set(this,new ay(this.ssp.viewport)),gy.set(this,!1),vy.set(this,!1),by.set(this,!1),(null==e?void 0:e.key)&&this.setKey(e.key)}setKey(t){t!==uy(c(this,py,"f").debugKey)&&(c(this,py,"f").key=t)}_resolvePath(t){return`${this._path}${t}`}async _fetchData(t){const{utils:e}=this.ssp;return e.fetchFile(this._resolvePath(t),"json")}async fetchMetaData(){const t=await this._fetchData(Yb);return this.metaData=t,t}async fetchTreeData(){const t=await this._fetchData(Zb);return this.treeData=t,t}async fetchTopologyData(){const t=await this._fetchData(Wb).then((t=>{const e={linkWidth:.1,linkColor:["#00ff00"],nodeRadius:.05,nodeColor:"#0000ff"};return t.map((t=>{const i=Object.assign(Object.assign({},e),t);return i.imgUrl&&(i.imgUrl=`${this.path}${i.imgUrl}`),i}))}));return this.topologyData=t,t}async fetchPropertiesData(){const t=await this._fetchData(Xb).then((t=>ky(t,"modelId")));return this.propertiesData=t,t}async fetchAnimationsData(){const t=await this._fetchData(Qb).then((t=>ky(t,"modelId")));return this.animationsData=t,t}async fetchModelVisionsData(){const t=await this._fetchData(Jb).then((t=>new Map(Object.entries(t))));return this.modelVisionsData=t,t}async loadNode(t,e){const i=this.ssp.getObjectById(t.id);if(i)return i;const{syncProperties:r}=e,{id:n,name:o,renderType:s,path:h,matrix:a}=t,{ssp:u}=this,l=(new f).fromArray(a);let d=null;if("3D"===s)if(h)try{const t=h.replaceAll(/#/g,"%23");d=await u.loadModel({id:n,name:o,url:this._resolvePath(t)})}catch(t){console.error(t)}else u.utils.warn(`id: ${n} path 为空`);else"GROUP"!==s&&"STUB"!==s||(d=u.createGroup({id:n,name:o}));if(d){l.decompose(d.position,d.quaternion,d.scale);const e=Object.assign({},t);if(Reflect.deleteProperty(e,"children"),d.userData=e,r&&this.propertiesData){const t=this.propertiesData.get(n);t&&(d.userData[$b]=t)}}return d}getTreeNodeById(t,e=this.treeData){if(!e)return;const i=e.find((e=>e.id===t));if(i)return i;for(let i=0;i<e.length;i++){const r=this.getTreeNodeById(t,e[i].children);if(r)return r}}async loadObjects(e){const{loadLevel:i,loadTargetId:r}=e;let n=null;if(r){const e=this.getTreeNodeById(r);e?n=[e]:t.utils.error("根据 loadTargetId 未找到对应树节点")}else n=this.treeData;if(!n)return t.utils.error("treeData is null");const o=async(t,r,n=0)=>{if(n++,i&&n>i)return;const{ssp:s}=this,h=await this.loadNode(t,e);h&&r&&s.addObject(h,r),await Promise.allSettled(t.children.map((t=>o(t,h,n))))};await Promise.allSettled(n.map((t=>o(t,t.pid?this.ssp.getObjectById(t.pid):null,0))))}async loadObjectsBFS(e){if(!this.treeData)return void t.utils.error("treeData is null");const i=[],r=Object.create(null),n=[],{ssp:o}=this;for(i.push(...this.treeData);i.length>0;){i.splice(0,i.length).forEach((t=>{n.push(t),i.push(...t.children.map((e=>(r[e.id]=t.id,e))))}))}await Promise.allSettled(n.map((t=>this.loadNode(t,e)))),Object.entries(r).forEach((([t,e])=>{const i=o.getObjectById(t),r=o.getObjectById(e);i&&r&&o.addObject(i,r)}))}setPath(t){this.path=t}async loadScene(t={}){const{key:e,path:i}=t;e&&this.setKey(e),i&&this.setPath(i);const{version:r}=await this.fetchMetaData();if(r>=1.2&&c(this,cy,"f")){if(await c(this,dy,"m",yy).call(this),!c(this,gy,"f")&&!c(this,vy,"f")){const{utils:t}=this.ssp;return void t.error(`未授权的场景包:${this.path}`)}!c(this,gy,"f")&&c(this,vy,"f")&&(c(this,by,"f")||c(this,my,"f").addToViewport()),p(this,cy,!1,"f")}else r<1.2&&(this.treeData=await this.fetchTreeData());const n=[];(t=Object.assign({syncProperties:!0,syncModelVisions:!0,needsModelsBoundsTree:!0,applyPresetEffects:!1,loadSceneAlgorithm:ey.DFS,loadLevel:1/0},t)).syncProperties&&n.push(this.fetchPropertiesData()),t.syncModelVisions&&n.push(this.fetchModelVisionsData()),await Promise.allSettled(n),t.loadSceneAlgorithm===ey.BFS?await this.loadObjectsBFS(t):t.loadSceneAlgorithm===ey.DFS&&await this.loadObjects(t),t.needsModelsBoundsTree&&this.ssp.computeModelsBoundsTree(),t.applyPresetEffects&&this.presetEffects()}async presetEffects(t={}){const{hdr:e=!0,ssao:i=!0,directionalLightShadow:r=!0}=t;if(await this.ssp.render(),e){const{environment:t}=await this.fetchMetaData();t&&this.ssp.setEnvironment({file:`${this.path}${t}`})}if(i&&this.ssp.setSSAO(),r){const t=this.ssp.getAllModel().reduce(((t,e)=>t.union(this.ssp.utils.getBoundingBox(e.children[0]))),new l),{min:e,max:i}=t,n=new d;t.getSize(n);let o=45;this.ssp.utils.isObject(r)&&"number"==typeof r.angle&&(o=r.angle);const s=Math.tan(Math.PI/180*o)*n.x;this.ssp.createDirectionalLight({id:"directionalLight",name:"directionalLight",position:{x:i.x,y:s,z:i.z},target:{x:e.x,y:e.y,z:e.z},openShadow:!0,shadowAutoUpdate:!1,intensity:2,mapSize:this.ssp.viewport.renderer.capabilities.maxTextureSize/2})}}async getTopologies(){return this.fetchTopologyData()}sortTopologyNodes(t,e){var i;const r=t.nodes.reduce(((t,e)=>(t.set(e.id,e),t)),new Map);if(e&&!r.has(e))return void this.ssp.utils.error(`startNodeId ${e} 未找到对应 node`);let n=e?r.get(e):t.nodes[0];if(!n)return;const o=new Set;o.add(n);for(let e=0;e<t.nodes.length-1;e++){let t;for(const e of null!==(i=n.graphs)&&void 0!==i?i:[]){const i=r.get(e.targetNodeId);if(i&&!o.has(i)){t=i;break}}if(!t)break;n=t,o.add(n)}return Object.assign(Object.assign({},t),{nodes:[...new Set([...o,...t.nodes])]})}async playAnimationById(t,e=0,i={}){const{utils:{error:r}}=this.ssp,n=this.ssp.getObjectById(t);if(n)return this.playObjectAnimation(n,e,i);r(`playAnimationById: id 为 ${t} 场景对象未找到`)}async playObjectAnimation(t,e=0,i={}){const{utils:{error:n},animation:o}=this.ssp,{onStart:s,onUpdate:h}=i,a=await this.fetchAnimationsData(),u=t.sid,l=a.get(u);if(l){const i=l[e];if(i)for(let e=0,n=i.keyframes.length;e<n;e++){let n;if(i.keyframes[e-1]){const t=i.keyframes[e-1];n={x:t.x,y:t.y,z:t.z,rotationX:t.rotationX,rotationY:t.rotationY,rotationZ:t.rotationZ,scaleX:t.scaleX,scaleY:t.scaleY,scaleZ:t.scaleZ}}else{const e=new r,i=(new f).fromArray(t.userData.matrix);e.applyMatrix4(i),n={x:e.position.x,y:e.position.y,z:e.position.z,rotationX:e.rotation.x,rotationY:e.rotation.y,rotationZ:e.rotation.z,scaleX:e.scale.x,scaleY:e.scale.y,scaleZ:e.scale.z}}const a=i.keyframes[e],{delay:u,duration:l,easing:d,repeat:c,yoyo:p}=a,m={x:a.x,y:a.y,z:a.z,rotationX:a.rotationX,rotationY:a.rotationY,rotationZ:a.rotationZ,scaleX:a.scaleX,scaleY:a.scaleY,scaleZ:a.scaleZ};await o(n,m,{delay:u,duration:l,mode:d,repeat:-1===c?1/0:c,yoyo:p},((e,i)=>{t.position.set(e.x,e.y,e.z),t.rotation.set(e.rotationX,e.rotationY,e.rotationZ),t.scale.set(e.scaleX,e.scaleY,e.scaleZ),null==h||h(e,i)}),(t=>{null==s||s(t)}))}else n(`id: ${u} 未找到索引为 ${e} 的动画`)}else n(`id: ${u} 未找到动画`)}async flyToSceneFromVisionsData(t=0,e={}){const{utils:{error:i}}=this.ssp;if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const r=this.modelVisionsData.get(""),n=null==r?void 0:r[t];if(n)return this.ssp.flyTo(n.position,n.rotation,e);i("场景视角数据未找到")}}async flyToObjectFromVisionsData(t,e=0,i={}){const{utils:{error:r}}=this.ssp;if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const n=this.modelVisionsData.get(t.sid),o=null==n?void 0:n[e];if(o)return this.ssp.flyTo(o.position,o.rotation,i);r("对象视角数据未找到")}}}function ky(t,e){const i=new Map;return t.reduce(((t,i)=>{const r=t.get(i[e]);return r?r.push(i):t.set(i[e],[i]),t}),i),i}cy=new WeakMap,py=new WeakMap,my=new WeakMap,gy=new WeakMap,vy=new WeakMap,by=new WeakMap,dy=new WeakSet,yy=async function(){let e;const{resource:i}=await this.fetchMetaData();if(c(this,py,"f").verifyKey){if(e=await c(this,dy,"m",wy).call(this,i),"forbid"===e)return void p(this,gy,!1,"f");if("noServerEnc"===e)await c(this,dy,"m",Sy).call(this,i);else{const t=c(this,py,"f").verifyKey,{verifiedRes:i,dec:r}=c(this,dy,"m",_y).call(this,e,t);p(this,gy,i,"f"),c(this,gy,"f")&&(this.treeData=r)}}else if(c(this,py,"f").key){const{verifiedRes:t}=await c(this,dy,"m",Ey).call(this,i);t||await c(this,dy,"m",Sy).call(this,i)}else c(this,py,"f").debugKey?await c(this,dy,"m",Sy).call(this,i):t.utils.error("许可证密钥不存在")},wy=async function(t){const e=Math.random().toString(36).substring(2),{verifyKey:i}=c(this,py,"f"),r=new Gb(i,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"}),n=r.encrypt(e,"base64"),o=await c(this,dy,"m",My).call(this,this._resolvePath(t),n),{license:s,serverEnc:h}=o;if(!h)return"noServerEnc";return r.decryptPublic(h,"utf8")!==e?"forbid":s},My=async function(t,e=""){try{const i=await fetch(t,{headers:{token:e}}),r=i.headers,n=await i.json();return{license:n,serverEnc:r.get("token")}}catch(t){return{license:{content:"",sign:""},serverEnc:""}}},_y=function(t,e){let i=null,r=!0;try{const r=new Gb(e,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"});if(2===t.version)i=fy(t,r);else i=((t,e)=>{const{content:i,sign:r}=t;if(!e.verify(i,r,"base64","base64"))throw new Error("v1 error");return e.decryptPublic(i,"json")})(t,r)}catch(t){r=!1,this.ssp.utils.error("秘钥 key 验证失败")}return{verifiedRes:r,dec:i}},Sy=async function(t){const e=await this._fetchData(t),i=uy(c(this,py,"f").debugKey),{verifiedRes:r,dec:n}=c(this,dy,"m",_y).call(this,e,i);p(this,vy,r,"f"),c(this,vy,"f")&&(this.treeData=n)},Ey=async function(t){const e=await this._fetchData(t),i=c(this,py,"f").key,{verifiedRes:r,dec:n}=c(this,dy,"m",_y).call(this,e,i);return p(this,by,r,"f"),p(this,vy,r,"f"),c(this,by,"f")&&(this.treeData=n),{verifiedRes:r,dec:n}};export{Qb as ANIMATIONS_DATA_FILE_PATH,ey as LoadSceneAlgorithm,Yb as META_DATA_FILE_PATH,Jb as MODEL_VISIONS_DATA_FILE_PATH,Xb as PROPERTIES_DATA_FLEE_PATH,$b as PROPERTIES_KEY,Vb as SIGN_PATH,Wb as TOPOLOGY_DATA_FILE_PATH,Zb as TREE_DATA_FILE_PATH,Ay as default};
|
|
3
|
+
!function(t,e){var i=me,r=i.Buffer;function n(t,e){for(var i in t)e[i]=t[i]}function o(t,e,i){return r(t,e,i)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=i:(n(i,e),e.Buffer=o),o.prototype=Object.create(r.prototype),n(r,o),o.from=function(t,e,i){if("number"==typeof t)throw new TypeError("Argument must not be a number");return r(t,e,i)},o.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=r(t);return void 0!==e?"string"==typeof i?n.fill(e,i):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}}(pe,de);var ge=65536,ve=4294967295;var be=de.Buffer,ye=gt.crypto||gt.msCrypto;ye&&ye.getRandomValues?ce.exports=function(t,e){if(t>ve)throw new RangeError("requested too many random bytes");var i=be.allocUnsafe(t);if(t>0)if(t>ge)for(var r=0;r<t;r+=ge)ye.getRandomValues(i.slice(r,r+ge));else ye.getRandomValues(i);if("function"==typeof e)return ae.nextTick((function(){e(null,i)}));return i}:ce.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")};var we={},Me={get exports(){return we},set exports(t){we=t}};"function"==typeof Object.create?Me.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Me.exports=function(t,e){if(e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}};var _e={},Se={get exports(){return _e},set exports(t){_e=t}};function Ee(){}function Ae(){Ae.init.call(this)}function ke(t){return void 0===t._maxListeners?Ae.defaultMaxListeners:t._maxListeners}function Re(t,e,i,r){var n,o,s,h;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((o=t._events)?(o.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),o=t._events),s=o[e]):(o=t._events=new Ee,t._eventsCount=0),s){if("function"==typeof s?s=o[e]=r?[i,s]:[s,i]:r?s.unshift(i):s.push(i),!s.warned&&(n=ke(t))&&n>0&&s.length>n){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,h=a,"function"==typeof console.warn?console.warn(h):console.log(h)}}else s=o[e]=i,++t._eventsCount;return t}function Oe(t,e,i){var r=!1;function n(){t.removeListener(e,n),r||(r=!0,i.apply(t,arguments))}return n.listener=i,n}function Ie(t){var e=this._events;if(e){var i=e[t];if("function"==typeof i)return 1;if(i)return i.length}return 0}function Te(t,e){for(var i=new Array(e);e--;)i[e]=t[e];return i}Ee.prototype=Object.create(null),Ae.EventEmitter=Ae,Ae.usingDomains=!1,Ae.prototype.domain=void 0,Ae.prototype._events=void 0,Ae.prototype._maxListeners=void 0,Ae.defaultMaxListeners=10,Ae.init=function(){this.domain=null,Ae.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Ee,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ae.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},Ae.prototype.getMaxListeners=function(){return ke(this)},Ae.prototype.emit=function(t){var e,i,r,n,o,s,h,a="error"===t;if(s=this._events)a=a&&null==s.error;else if(!a)return!1;if(h=this.domain,a){if(e=arguments[1],!h){if(e instanceof Error)throw e;var u=new Error('Uncaught, unspecified "error" event. ('+e+")");throw u.context=e,u}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=h,e.domainThrown=!1,h.emit("error",e),!1}if(!(i=s[t]))return!1;var f="function"==typeof i;switch(r=arguments.length){case 1:!function(t,e,i){if(e)t.call(i);else for(var r=t.length,n=Te(t,r),o=0;o<r;++o)n[o].call(i)}(i,f,this);break;case 2:!function(t,e,i,r){if(e)t.call(i,r);else for(var n=t.length,o=Te(t,n),s=0;s<n;++s)o[s].call(i,r)}(i,f,this,arguments[1]);break;case 3:!function(t,e,i,r,n){if(e)t.call(i,r,n);else for(var o=t.length,s=Te(t,o),h=0;h<o;++h)s[h].call(i,r,n)}(i,f,this,arguments[1],arguments[2]);break;case 4:!function(t,e,i,r,n,o){if(e)t.call(i,r,n,o);else for(var s=t.length,h=Te(t,s),a=0;a<s;++a)h[a].call(i,r,n,o)}(i,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),o=1;o<r;o++)n[o-1]=arguments[o];!function(t,e,i,r){if(e)t.apply(i,r);else for(var n=t.length,o=Te(t,n),s=0;s<n;++s)o[s].apply(i,r)}(i,f,this,n)}return!0},Ae.prototype.addListener=function(t,e){return Re(this,t,e,!1)},Ae.prototype.on=Ae.prototype.addListener,Ae.prototype.prependListener=function(t,e){return Re(this,t,e,!0)},Ae.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Oe(this,t,e)),this},Ae.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Oe(this,t,e)),this},Ae.prototype.removeListener=function(t,e){var i,r,n,o,s;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(i=r[t]))return this;if(i===e||i.listener&&i.listener===e)0==--this._eventsCount?this._events=new Ee:(delete r[t],r.removeListener&&this.emit("removeListener",t,i.listener||e));else if("function"!=typeof i){for(n=-1,o=i.length;o-- >0;)if(i[o]===e||i[o].listener&&i[o].listener===e){s=i[o].listener,n=o;break}if(n<0)return this;if(1===i.length){if(i[0]=void 0,0==--this._eventsCount)return this._events=new Ee,this;delete r[t]}else!function(t,e){for(var i=e,r=i+1,n=t.length;r<n;i+=1,r+=1)t[i]=t[r];t.pop()}(i,n);r.removeListener&&this.emit("removeListener",t,s||e)}return this},Ae.prototype.removeAllListeners=function(t){var e,i;if(!(i=this._events))return this;if(!i.removeListener)return 0===arguments.length?(this._events=new Ee,this._eventsCount=0):i[t]&&(0==--this._eventsCount?this._events=new Ee:delete i[t]),this;if(0===arguments.length){for(var r,n=Object.keys(i),o=0;o<n.length;++o)"removeListener"!==(r=n[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Ee,this._eventsCount=0,this}if("function"==typeof(e=i[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},Ae.prototype.listeners=function(t){var e,i=this._events;return i&&(e=i[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),i=0;i<e.length;++i)e[i]=t[i].listener||t[i];return e}(e):[]},Ae.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):Ie.call(t,e)},Ae.prototype.listenerCount=Ie,Ae.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Be=vt(Object.freeze({__proto__:null,EventEmitter:Ae,default:Ae})),Pe=Be.EventEmitter,Ne="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t},xe=/%[sdj%]/g;function Le(t){if(!Qe(t)){for(var e=[],i=0;i<arguments.length;i++)e.push(qe(arguments[i]));return e.join(" ")}i=1;for(var r=arguments,n=r.length,o=String(t).replace(xe,(function(t){if("%%"===t)return"%";if(i>=n)return t;switch(t){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch(t){return"[Circular]"}default:return t}})),s=r[i];i<n;s=r[++i])Ze(s)||!ei(s)?o+=" "+s:o+=" "+qe(s);return o}function De(t,e){if($e(m.process))return function(){return De(t,e).apply(this,arguments)};if(!0===ae.noDeprecation)return t;var i=!1;return function(){if(!i){if(ae.throwDeprecation)throw new Error(e);ae.traceDeprecation?console.trace(e):console.error(e),i=!0}return t.apply(this,arguments)}}var Ce,je={};function Ue(t){if($e(Ce)&&(Ce=ae.env.NODE_DEBUG||""),t=t.toUpperCase(),!je[t])if(new RegExp("\\b"+t+"\\b","i").test(Ce)){je[t]=function(){var e=Le.apply(null,arguments);console.error("%s %d: %s",t,0,e)}}else je[t]=function(){};return je[t]}function qe(t,e){var i={seen:[],stylize:Fe};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),Ye(e)?i.showHidden=e:e&&li(i,e),$e(i.showHidden)&&(i.showHidden=!1),$e(i.depth)&&(i.depth=2),$e(i.colors)&&(i.colors=!1),$e(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=ze),He(i,t,i.depth)}function ze(t,e){var i=qe.styles[e];return i?"["+qe.colors[i][0]+"m"+t+"["+qe.colors[i][1]+"m":t}function Fe(t,e){return t}function He(t,e,i){if(t.customInspect&&e&&ni(e.inspect)&&e.inspect!==qe&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(i,t);return Qe(r)||(r=He(t,r,i)),r}var n=function(t,e){if($e(e))return t.stylize("undefined","undefined");if(Qe(e)){var i="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(i,"string")}if(Xe(e))return t.stylize(""+e,"number");if(Ye(e))return t.stylize(""+e,"boolean");if(Ze(e))return t.stylize("null","null")}(t,e);if(n)return n;var o=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,i){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),ri(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Ke(e);if(0===o.length){if(ni(e)){var h=e.name?": "+e.name:"";return t.stylize("[Function"+h+"]","special")}if(ti(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(ii(e))return t.stylize(Date.prototype.toString.call(e),"date");if(ri(e))return Ke(e)}var a,u="",f=!1,l=["{","}"];(Ve(e)&&(f=!0,l=["[","]"]),ni(e))&&(u=" [Function"+(e.name?": "+e.name:"")+"]");return ti(e)&&(u=" "+RegExp.prototype.toString.call(e)),ii(e)&&(u=" "+Date.prototype.toUTCString.call(e)),ri(e)&&(u=" "+Ke(e)),0!==o.length||f&&0!=e.length?i<0?ti(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),a=f?function(t,e,i,r,n){for(var o=[],s=0,h=e.length;s<h;++s)ci(e,String(s))?o.push(Ge(t,e,i,r,String(s),!0)):o.push("");return n.forEach((function(n){n.match(/^\d+$/)||o.push(Ge(t,e,i,r,n,!0))})),o}(t,e,i,s,o):o.map((function(r){return Ge(t,e,i,s,r,f)})),t.seen.pop(),function(t,e,i){var r=t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return i[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+i[1];return i[0]+e+" "+t.join(", ")+" "+i[1]}(a,u,l)):l[0]+u+l[1]}function Ke(t){return"["+Error.prototype.toString.call(t)+"]"}function Ge(t,e,i,r,n,o){var s,h,a;if((a=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?h=a.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):a.set&&(h=t.stylize("[Setter]","special")),ci(r,n)||(s="["+n+"]"),h||(t.seen.indexOf(a.value)<0?(h=Ze(i)?He(t,a.value,null):He(t,a.value,i-1)).indexOf("\n")>-1&&(h=o?h.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+h.split("\n").map((function(t){return" "+t})).join("\n")):h=t.stylize("[Circular]","special")),$e(s)){if(o&&n.match(/^\d+$/))return h;(s=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+h}function Ve(t){return Array.isArray(t)}function Ye(t){return"boolean"==typeof t}function Ze(t){return null===t}function We(t){return null==t}function Xe(t){return"number"==typeof t}function Qe(t){return"string"==typeof t}function Je(t){return"symbol"==typeof t}function $e(t){return void 0===t}function ti(t){return ei(t)&&"[object RegExp]"===hi(t)}function ei(t){return"object"==typeof t&&null!==t}function ii(t){return ei(t)&&"[object Date]"===hi(t)}function ri(t){return ei(t)&&("[object Error]"===hi(t)||t instanceof Error)}function ni(t){return"function"==typeof t}function oi(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function si(t){return T.isBuffer(t)}function hi(t){return Object.prototype.toString.call(t)}function ai(t){return t<10?"0"+t.toString(10):t.toString(10)}qe.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},qe.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var ui=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function fi(){var t,e;console.log("%s - %s",(t=new Date,e=[ai(t.getHours()),ai(t.getMinutes()),ai(t.getSeconds())].join(":"),[t.getDate(),ui[t.getMonth()],e].join(" ")),Le.apply(null,arguments))}function li(t,e){if(!e||!ei(e))return t;for(var i=Object.keys(e),r=i.length;r--;)t[i[r]]=e[i[r]];return t}function ci(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var di,pi,mi={inherits:Ne,_extend:li,log:fi,isBuffer:si,isPrimitive:oi,isFunction:ni,isError:ri,isDate:ii,isObject:ei,isRegExp:ti,isUndefined:$e,isSymbol:Je,isString:Qe,isNumber:Xe,isNullOrUndefined:We,isNull:Ze,isBoolean:Ye,isArray:Ve,inspect:qe,deprecate:De,format:Le,debuglog:Ue},gi=vt(Object.freeze({__proto__:null,_extend:li,debuglog:Ue,default:mi,deprecate:De,format:Le,inherits:Ne,inspect:qe,isArray:Ve,isBoolean:Ye,isBuffer:si,isDate:ii,isError:ri,isFunction:ni,isNull:Ze,isNullOrUndefined:We,isNumber:Xe,isObject:ei,isPrimitive:oi,isRegExp:ti,isString:Qe,isSymbol:Je,isUndefined:$e,log:fi}));function vi(){if(pi)return di;function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,n(r.key),r)}}function n(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}pi=1;var o=me.Buffer,s=gi.inspect,h=s&&s.custom||"inspect";return di=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var i,n,a;return i=t,n=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,i,r,n=o.allocUnsafe(t>>>0),s=this.head,h=0;s;)e=s.data,i=n,r=h,o.prototype.copy.call(e,i,r),h+=s.data.length,s=s.next;return n}},{key:"consume",value:function(t,e){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):i=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,i=1,r=e.data;for(t-=r.length;e=e.next;){var n=e.data,o=t>n.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),0==(t-=o)){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),i=this.head,r=1;for(i.data.copy(e),t-=i.data.length;i=i.next;){var n=i.data,s=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,s),0==(t-=s)){s===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(s));break}++r}return this.length-=r,e}},{key:h,value:function(t,i){return s(this,e(e({},i),{},{depth:0,customInspect:!1}))}}],n&&r(i.prototype,n),a&&r(i,a),Object.defineProperty(i,"prototype",{writable:!1}),t}(),di}function bi(t,e){wi(t,e),yi(t)}function yi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function wi(t,e){t.emit("error",e)}var Mi={destroy:function(t,e){var i=this,r=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return r||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ae.nextTick(wi,this,t)):ae.nextTick(wi,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?i._writableState?i._writableState.errorEmitted?ae.nextTick(yi,i):(i._writableState.errorEmitted=!0,ae.nextTick(bi,i,t)):ae.nextTick(bi,i,t):e?(ae.nextTick(yi,i),e(t)):ae.nextTick(yi,i)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var i=t._readableState,r=t._writableState;i&&i.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}},_i={};var Si={};function Ei(t,e,i){i||(i=Error);var r=function(t){var i,r;function n(i,r,n){return t.call(this,function(t,i,r){return"string"==typeof e?e:e(t,i,r)}(i,r,n))||this}return r=t,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r,n}(i);r.prototype.name=i.name,r.prototype.code=t,Si[t]=r}function Ai(t,e){if(Array.isArray(t)){var i=t.length;return t=t.map((function(t){return String(t)})),i>2?"one of ".concat(e," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}Ei("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),Ei("ERR_INVALID_ARG_TYPE",(function(t,e,i){var r,n,o,s;if("string"==typeof e&&(n="not ",e.substr(!o||o<0?0:+o,n.length)===n)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-e.length,i)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(Ai(e,"type"));else{var h=function(t,e,i){return"number"!=typeof i&&(i=0),!(i+e.length>t.length)&&-1!==t.indexOf(e,i)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(h," ").concat(r," ").concat(Ai(e,"type"))}return s+=". Received type ".concat(typeof i)}),TypeError),Ei("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Ei("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),Ei("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Ei("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),Ei("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Ei("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Ei("ERR_STREAM_WRITE_AFTER_END","write after end"),Ei("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Ei("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),Ei("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),_i.codes=Si;var ki=_i.codes.ERR_INVALID_OPT_VALUE;var Ri,Oi,Ii,Ti,Bi={getHighWaterMark:function(t,e,i,r){var n=function(t,e,i){return null!=t.highWaterMark?t.highWaterMark:e?t[i]:null}(e,r,i);if(null!=n){if(!isFinite(n)||Math.floor(n)!==n||n<0)throw new ki(r?i:"highWaterMark",n);return Math.floor(n)}return t.objectMode?16:16384}},Pi=function(t,e){if(Ni("noDeprecation"))return t;var i=!1;return function(){if(!i){if(Ni("throwDeprecation"))throw new Error(e);Ni("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}};function Ni(t){try{if(!gt.localStorage)return!1}catch(t){return!1}var e=gt.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}function xi(){if(Oi)return Ri;function t(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,i){var r=t.entry;t.entry=null;for(;r;){var n=r.callback;e.pendingcb--,n(i),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var e;Oi=1,Ri=M,M.WritableState=w;var i={deprecate:Pi},r=Pe,n=me.Buffer,o=(void 0!==gt?gt:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,h=Mi,a=Bi.getHighWaterMark,u=_i.codes,f=u.ERR_INVALID_ARG_TYPE,l=u.ERR_METHOD_NOT_IMPLEMENTED,c=u.ERR_MULTIPLE_CALLBACK,d=u.ERR_STREAM_CANNOT_PIPE,p=u.ERR_STREAM_DESTROYED,m=u.ERR_STREAM_NULL_VALUES,g=u.ERR_STREAM_WRITE_AFTER_END,v=u.ERR_UNKNOWN_ENCODING,b=h.errorOrDestroy;function y(){}function w(i,r,n){e=e||Li(),i=i||{},"boolean"!=typeof n&&(n=r instanceof e),this.objectMode=!!i.objectMode,n&&(this.objectMode=this.objectMode||!!i.writableObjectMode),this.highWaterMark=a(this,i,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===i.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,r=i.sync,n=i.writecb;if("function"!=typeof n)throw new c;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,r,n){--e.pendingcb,i?(ae.nextTick(n,r),ae.nextTick(R,t,e),t._writableState.errorEmitted=!0,b(t,r)):(n(r),t._writableState.errorEmitted=!0,b(t,r),R(t,e))}(t,i,r,e,n);else{var o=A(i)||t.destroyed;o||i.corked||i.bufferProcessing||!i.bufferedRequest||E(t,i),r?ae.nextTick(S,t,i,o,n):S(t,i,o,n)}}(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==i.emitClose,this.autoDestroy=!!i.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function M(t){var i=this instanceof(e=e||Li());if(!i&&!s.call(M,this))return new M(t);this._writableState=new w(t,this,i),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),r.call(this)}function _(t,e,i,r,n,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new p("write")):i?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function S(t,e,i,r){i||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),R(t,e)}function E(e,i){i.bufferProcessing=!0;var r=i.bufferedRequest;if(e._writev&&r&&r.next){var n=i.bufferedRequestCount,o=new Array(n),s=i.corkedRequestsFree;s.entry=r;for(var h=0,a=!0;r;)o[h]=r,r.isBuf||(a=!1),r=r.next,h+=1;o.allBuffers=a,_(e,i,!0,i.length,o,"",s.finish),i.pendingcb++,i.lastBufferedRequest=null,s.next?(i.corkedRequestsFree=s.next,s.next=null):i.corkedRequestsFree=new t(i),i.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(_(e,i,!1,i.objectMode?1:u.length,u,f,l),r=r.next,i.bufferedRequestCount--,i.writing)break}null===r&&(i.lastBufferedRequest=null)}i.bufferedRequest=r,i.bufferProcessing=!1}function A(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final((function(i){e.pendingcb--,i&&b(t,i),e.prefinished=!0,t.emit("prefinish"),R(t,e)}))}function R(t,e){var i=A(e);if(i&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,ae.nextTick(k,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var r=t._readableState;(!r||r.autoDestroy&&r.endEmitted)&&t.destroy()}return i}return we(M,r),w.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(w.prototype,"buffer",{get:i.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===M&&(t&&t._writableState instanceof w)}})):s=function(t){return t instanceof this},M.prototype.pipe=function(){b(this,new d)},M.prototype.write=function(t,e,i){var r,s=this._writableState,h=!1,a=!s.objectMode&&(r=t,n.isBuffer(r)||r instanceof o);return a&&!n.isBuffer(t)&&(t=function(t){return n.from(t)}(t)),"function"==typeof e&&(i=e,e=null),a?e="buffer":e||(e=s.defaultEncoding),"function"!=typeof i&&(i=y),s.ending?function(t,e){var i=new g;b(t,i),ae.nextTick(e,i)}(this,i):(a||function(t,e,i,r){var n;return null===i?n=new m:"string"==typeof i||e.objectMode||(n=new f("chunk",["string","Buffer"],i)),!n||(b(t,n),ae.nextTick(r,n),!1)}(this,s,t,i))&&(s.pendingcb++,h=function(t,e,i,r,o,s){if(!i){var h=function(t,e,i){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=n.from(e,i));return e}(e,r,o);r!==h&&(i=!0,o="buffer",r=h)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:o,isBuf:i,callback:s,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else _(t,e,!1,a,r,o,s);return u}(this,s,a,t,e,i)),h},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||E(this,t))},M.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(t,e,i){i(new l("_write()"))},M.prototype._writev=null,M.prototype.end=function(t,e,i){var r=this._writableState;return"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,i){e.ending=!0,R(t,e),i&&(e.finished?ae.nextTick(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,r,i),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),M.prototype.destroy=h.destroy,M.prototype._undestroy=h.undestroy,M.prototype._destroy=function(t,e){e(t)},Ri}function Li(){if(Ti)return Ii;Ti=1;var t=Object.keys||function(t){var e=[];for(var i in t)e.push(i);return e};Ii=s;var e=Wi(),i=xi();we(s,e);for(var r=t(i.prototype),n=0;n<r.length;n++){var o=r[n];s.prototype[o]||(s.prototype[o]=i.prototype[o])}function s(t){if(!(this instanceof s))return new s(t);e.call(this,t),i.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||ae.nextTick(a,this)}function a(t){t.end()}return Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),Ii}var Di,Ci={};function ji(){if(Di)return Ci;Di=1;var t=de.Buffer,e=t.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(i){var r;switch(this.encoding=function(i){var r=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(i);if("string"!=typeof r&&(t.isEncoding===e||!e(i)))throw new Error("Unknown encoding: "+i);return r||i}(i),this.encoding){case"utf16le":this.text=o,this.end=s,r=4;break;case"utf8":this.fillLast=n,r=4;break;case"base64":this.text=h,this.end=a,r=3;break;default:return this.write=u,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(r)}function r(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function n(t){var e=this.lastTotal-this.lastNeed,i=function(t,e,i){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==i?i:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function o(t,e){if((t.length-e)%2==0){var i=t.toString("utf16le",e);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function s(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,i)}return e}function h(t,e){var i=(t.length-e)%3;return 0===i?t.toString("base64",e):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-i))}function a(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}return Ci.StringDecoder=i,i.prototype.write=function(t){if(0===t.length)return"";var e,i;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<t.length?e?e+this.text(t,i):this.text(t,i):e||""},i.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},i.prototype.text=function(t,e){var i=function(t,e,i){var n=e.length-1;if(n<i)return 0;var o=r(e[n]);if(o>=0)return o>0&&(t.lastNeed=o-1),o;if(--n<i||-2===o)return 0;if(o=r(e[n]),o>=0)return o>0&&(t.lastNeed=o-2),o;if(--n<i||-2===o)return 0;if(o=r(e[n]),o>=0)return o>0&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=i;var n=t.length-(i-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},i.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},Ci}var Ui=_i.codes.ERR_STREAM_PREMATURE_CLOSE;function qi(){}var zi,Fi,Hi,Ki,Gi,Vi,Yi=function t(e,i,r){if("function"==typeof i)return t(e,null,i);i||(i={}),r=function(t){var e=!1;return function(){if(!e){e=!0;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];t.apply(this,r)}}}(r||qi);var n=i.readable||!1!==i.readable&&e.readable,o=i.writable||!1!==i.writable&&e.writable,s=function(){e.writable||a()},h=e._writableState&&e._writableState.finished,a=function(){o=!1,h=!0,n||r.call(e)},u=e._readableState&&e._readableState.endEmitted,f=function(){n=!1,u=!0,o||r.call(e)},l=function(t){r.call(e,t)},c=function(){var t;return n&&!u?(e._readableState&&e._readableState.ended||(t=new Ui),r.call(e,t)):o&&!h?(e._writableState&&e._writableState.ended||(t=new Ui),r.call(e,t)):void 0},d=function(){e.req.on("finish",a)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?o&&!e._writableState&&(e.on("end",s),e.on("close",s)):(e.on("complete",a),e.on("abort",c),e.req?d():e.on("request",d)),e.on("end",f),e.on("finish",a),!1!==i.error&&e.on("error",l),e.on("close",c),function(){e.removeListener("complete",a),e.removeListener("abort",c),e.removeListener("request",d),e.req&&e.req.removeListener("finish",a),e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",a),e.removeListener("end",f),e.removeListener("error",l),e.removeListener("close",c)}};function Zi(){if(Fi)return zi;var t;function e(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}Fi=1;var i=Yi,r=Symbol("lastResolve"),n=Symbol("lastReject"),o=Symbol("error"),s=Symbol("ended"),h=Symbol("lastPromise"),a=Symbol("handlePromise"),u=Symbol("stream");function f(t,e){return{value:t,done:e}}function l(t){var e=t[r];if(null!==e){var i=t[u].read();null!==i&&(t[h]=null,t[r]=null,t[n]=null,e(f(i,!1)))}}function c(t){ae.nextTick(l,t)}var d=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((e(t={get stream(){return this[u]},next:function(){var t=this,e=this[o];if(null!==e)return Promise.reject(e);if(this[s])return Promise.resolve(f(void 0,!0));if(this[u].destroyed)return new Promise((function(e,i){ae.nextTick((function(){t[o]?i(t[o]):e(f(void 0,!0))}))}));var i,r=this[h];if(r)i=new Promise(function(t,e){return function(i,r){t.then((function(){e[s]?i(f(void 0,!0)):e[a](i,r)}),r)}}(r,this));else{var n=this[u].read();if(null!==n)return Promise.resolve(f(n,!1));i=new Promise(this[a])}return this[h]=i,i}},Symbol.asyncIterator,(function(){return this})),e(t,"return",(function(){var t=this;return new Promise((function(e,i){t[u].destroy(null,(function(t){t?i(t):e(f(void 0,!0))}))}))})),t),d);return zi=function(t){var l,d=Object.create(p,(e(l={},u,{value:t,writable:!0}),e(l,r,{value:null,writable:!0}),e(l,n,{value:null,writable:!0}),e(l,o,{value:null,writable:!0}),e(l,s,{value:t._readableState.endEmitted,writable:!0}),e(l,a,{value:function(t,e){var i=d[u].read();i?(d[h]=null,d[r]=null,d[n]=null,t(f(i,!1))):(d[r]=t,d[n]=e)},writable:!0}),l));return d[h]=null,i(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=d[n];return null!==e&&(d[h]=null,d[r]=null,d[n]=null,e(t)),void(d[o]=t)}var i=d[r];null!==i&&(d[h]=null,d[r]=null,d[n]=null,i(f(void 0,!0))),d[s]=!0})),t.on("readable",c.bind(null,d)),d},zi}function Wi(){if(Vi)return Gi;var t;Vi=1,Gi=M,M.ReadableState=w,Be.EventEmitter;var e=function(t,e){return t.listeners(e).length},i=Pe,r=me.Buffer,n=(void 0!==gt?gt:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var o,s=gi;o=s&&s.debuglog?s.debuglog("stream"):function(){};var h,a,u,f=vi(),l=Mi,c=Bi.getHighWaterMark,d=_i.codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_STREAM_PUSH_AFTER_EOF,g=d.ERR_METHOD_NOT_IMPLEMENTED,v=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;we(M,i);var b=l.errorOrDestroy,y=["error","close","destroy","pause","resume"];function w(e,i,r){t=t||Li(),e=e||{},"boolean"!=typeof r&&(r=i instanceof t),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=c(this,e,"readableHighWaterMark",r),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=ji().StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function M(e){if(t=t||Li(),!(this instanceof M))return new M(e);var r=this instanceof t;this._readableState=new w(e,this,r),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function _(t,e,i,s,h){o("readableAddChunk",e);var a,u=t._readableState;if(null===e)u.reading=!1,function(t,e){if(o("onEofChunk"),e.ended)return;if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}(t,u);else if(h||(a=function(t,e){var i;o=e,r.isBuffer(o)||o instanceof n||"string"==typeof e||void 0===e||t.objectMode||(i=new p("chunk",["string","Buffer","Uint8Array"],e));var o;return i}(u,e)),a)b(t,a);else if(u.objectMode||e&&e.length>0)if("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===r.prototype||(e=function(t){return r.from(t)}(e)),s)u.endEmitted?b(t,new v):S(t,u,e,!0);else if(u.ended)b(t,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!i?(e=u.decoder.write(e),u.objectMode||0!==e.length?S(t,u,e,!1):O(t,u)):S(t,u,e,!1)}else s||(u.reading=!1,O(t,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function S(t,e,i,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",i)):(e.length+=e.objectMode?1:i.length,r?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&k(t)),O(t,e)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),M.prototype.destroy=l.destroy,M.prototype._undestroy=l.undestroy,M.prototype._destroy=function(t,e){e(t)},M.prototype.push=function(t,e){var i,n=this._readableState;return n.objectMode?i=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=r.from(t,e),e=""),i=!0),_(this,t,e,!1,i)},M.prototype.unshift=function(t){return _(this,t,null,!0,!1)},M.prototype.isPaused=function(){return!1===this._readableState.flowing},M.prototype.setEncoding=function(t){h||(h=ji().StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,r="";null!==i;)r+=e.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var E=1073741824;function A(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,ae.nextTick(R,t))}function R(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,N(t)}function O(t,e){e.readingMore||(e.readingMore=!0,ae.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var i=e.length;if(o("maybeReadMore read 0"),t.read(0),i===e.length)break}e.readingMore=!1}function T(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function B(t){o("readable nexttick read 0"),t.read(0)}function P(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),N(t),e.flowing&&!e.reading&&t.read(0)}function N(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function x(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function L(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,ae.nextTick(D,e,t))}function D(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var i=e._writableState;(!i||i.autoDestroy&&i.finished)&&e.destroy()}}function C(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}return M.prototype.read=function(t){o("read",t),t=parseInt(t,10);var e=this._readableState,i=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):k(this),null;if(0===(t=A(t,e))&&e.ended)return 0===e.length&&L(this),null;var r,n=e.needReadable;return o("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&o("length less than watermark",n=!0),e.ended||e.reading?o("reading or ended",n=!1):n&&(o("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=A(i,e))),null===(r=t>0?x(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&L(this)),null!==r&&this.emit("data",r),r},M.prototype._read=function(t){b(this,new g("_read()"))},M.prototype.pipe=function(t,i){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,i);var s=(!i||!1!==i.end)&&t!==ae.stdout&&t!==ae.stderr?a:m;function h(e,i){o("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,o("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",u),t.removeListener("error",c),t.removeListener("unpipe",h),r.removeListener("end",a),r.removeListener("end",m),r.removeListener("data",l),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function a(){o("onend"),t.end()}n.endEmitted?ae.nextTick(s):r.once("end",s),t.on("unpipe",h);var u=function(t){return function(){var i=t._readableState;o("pipeOnDrain",i.awaitDrain),i.awaitDrain&&i.awaitDrain--,0===i.awaitDrain&&e(t,"data")&&(i.flowing=!0,N(t))}}(r);t.on("drain",u);var f=!1;function l(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==C(n.pipes,t))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function c(i){o("onerror",i),m(),t.removeListener("error",c),0===e(t,"error")&&b(t,i)}function d(){t.removeListener("finish",p),m()}function p(){o("onfinish"),t.removeListener("close",d),m()}function m(){o("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",c),t.once("close",d),t.once("finish",p),t.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),t},M.prototype.unpipe=function(t){var e=this._readableState,i={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<n;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=C(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,i)),this},M.prototype.on=function(t,e){var r=i.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?k(this):n.reading||ae.nextTick(B,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(t,e){var r=i.prototype.removeListener.call(this,t,e);return"readable"===t&&ae.nextTick(T,this),r},M.prototype.removeAllListeners=function(t){var e=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||ae.nextTick(T,this),e},M.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,ae.nextTick(P,t,e))}(this,t)),t.paused=!1,this},M.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(t){var e=this,i=this._readableState,r=!1;for(var n in t.on("end",(function(){if(o("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(o("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(e.push(n)||(r=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s<y.length;s++)t.on(y[s],this.emit.bind(this,y[s]));return this._read=function(e){o("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(M.prototype[Symbol.asyncIterator]=function(){return void 0===a&&(a=Zi()),a(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),M._fromList=x,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(M.from=function(t,e){return void 0===u&&(u=Ki?Hi:(Ki=1,Hi=function(){throw new Error("Readable.from is not available in the browser")})),u(M,t,e)}),Gi}var Xi=nr,Qi=_i.codes,Ji=Qi.ERR_METHOD_NOT_IMPLEMENTED,$i=Qi.ERR_MULTIPLE_CALLBACK,tr=Qi.ERR_TRANSFORM_ALREADY_TRANSFORMING,er=Qi.ERR_TRANSFORM_WITH_LENGTH_0,ir=Li();function rr(t,e){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new $i);i.writechunk=null,i.writecb=null,null!=e&&this.push(e),r(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function nr(t){if(!(this instanceof nr))return new nr(t);ir.call(this,t),this._transformState={afterTransform:rr.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",or)}function or(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?sr(this,null,null):this._flush((function(e,i){sr(t,e,i)}))}function sr(t,e,i){if(e)return t.emit("error",e);if(null!=i&&t.push(i),t._writableState.length)throw new er;if(t._transformState.transforming)throw new tr;return t.push(null)}we(nr,ir),nr.prototype.push=function(t,e){return this._transformState.needTransform=!1,ir.prototype.push.call(this,t,e)},nr.prototype._transform=function(t,e,i){i(new Ji("_transform()"))},nr.prototype._write=function(t,e,i){var r=this._transformState;if(r.writecb=i,r.writechunk=t,r.writeencoding=e,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},nr.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},nr.prototype._destroy=function(t,e){ir.prototype._destroy.call(this,t,(function(t){e(t)}))};var hr,ar=fr,ur=Xi;function fr(t){if(!(this instanceof fr))return new fr(t);ur.call(this,t)}we(fr,ur),fr.prototype._transform=function(t,e,i){i(null,t)};var lr=_i.codes,cr=lr.ERR_MISSING_ARGS,dr=lr.ERR_STREAM_DESTROYED;function pr(t){if(t)throw t}function mr(t){t()}function gr(t,e){return t.pipe(e)}var vr=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var r,n=function(t){return t.length?"function"!=typeof t[t.length-1]?pr:t.pop():pr}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new cr("streams");var o=e.map((function(t,i){var s=i<e.length-1;return function(t,e,i,r){r=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(r);var n=!1;t.on("close",(function(){n=!0})),void 0===hr&&(hr=Yi),hr(t,{readable:e,writable:i},(function(t){if(t)return r(t);n=!0,r()}));var o=!1;return function(e){if(!n&&!o)return o=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void r(e||new dr("pipe"))}}(t,s,i>0,(function(t){r||(r=t),t&&o.forEach(mr),s||(o.forEach(mr),n(r))}))}));return e.reduce(gr)};!function(t,e){(e=Se.exports=Wi()).Stream=e,e.Readable=e,e.Writable=xi(),e.Duplex=Li(),e.Transform=Xi,e.PassThrough=ar,e.finished=Yi,e.pipeline=vr}(0,_e);var br=de.Buffer,yr=_e.Transform;function wr(t){yr.call(this),this._block=br.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}we(wr,yr),wr.prototype._transform=function(t,e,i){var r=null;try{this.update(t,e)}catch(t){r=t}i(r)},wr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},wr.prototype.update=function(t,e){if(function(t,e){if(!br.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");br.isBuffer(t)||(t=br.from(t,e));for(var i=this._block,r=0;this._blockOffset+t.length-r>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)i[n++]=t[r++];this._update(),this._blockOffset=0}for(;r<t.length;)i[this._blockOffset++]=t[r++];for(var o=0,s=8*t.length;s>0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},wr.prototype._update=function(){throw new Error("_update is not implemented")},wr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return e},wr.prototype._digest=function(){throw new Error("_digest is not implemented")};var Mr=wr,_r=we,Sr=Mr,Er=de.Buffer,Ar=new Array(16);function kr(){Sr.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function Rr(t,e){return t<<e|t>>>32-e}function Or(t,e,i,r,n,o,s){return Rr(t+(e&i|~e&r)+n+o|0,s)+e|0}function Ir(t,e,i,r,n,o,s){return Rr(t+(e&r|i&~r)+n+o|0,s)+e|0}function Tr(t,e,i,r,n,o,s){return Rr(t+(e^i^r)+n+o|0,s)+e|0}function Br(t,e,i,r,n,o,s){return Rr(t+(i^(e|~r))+n+o|0,s)+e|0}_r(kr,Sr),kr.prototype._update=function(){for(var t=Ar,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var i=this._a,r=this._b,n=this._c,o=this._d;i=Or(i,r,n,o,t[0],3614090360,7),o=Or(o,i,r,n,t[1],3905402710,12),n=Or(n,o,i,r,t[2],606105819,17),r=Or(r,n,o,i,t[3],3250441966,22),i=Or(i,r,n,o,t[4],4118548399,7),o=Or(o,i,r,n,t[5],1200080426,12),n=Or(n,o,i,r,t[6],2821735955,17),r=Or(r,n,o,i,t[7],4249261313,22),i=Or(i,r,n,o,t[8],1770035416,7),o=Or(o,i,r,n,t[9],2336552879,12),n=Or(n,o,i,r,t[10],4294925233,17),r=Or(r,n,o,i,t[11],2304563134,22),i=Or(i,r,n,o,t[12],1804603682,7),o=Or(o,i,r,n,t[13],4254626195,12),n=Or(n,o,i,r,t[14],2792965006,17),i=Ir(i,r=Or(r,n,o,i,t[15],1236535329,22),n,o,t[1],4129170786,5),o=Ir(o,i,r,n,t[6],3225465664,9),n=Ir(n,o,i,r,t[11],643717713,14),r=Ir(r,n,o,i,t[0],3921069994,20),i=Ir(i,r,n,o,t[5],3593408605,5),o=Ir(o,i,r,n,t[10],38016083,9),n=Ir(n,o,i,r,t[15],3634488961,14),r=Ir(r,n,o,i,t[4],3889429448,20),i=Ir(i,r,n,o,t[9],568446438,5),o=Ir(o,i,r,n,t[14],3275163606,9),n=Ir(n,o,i,r,t[3],4107603335,14),r=Ir(r,n,o,i,t[8],1163531501,20),i=Ir(i,r,n,o,t[13],2850285829,5),o=Ir(o,i,r,n,t[2],4243563512,9),n=Ir(n,o,i,r,t[7],1735328473,14),i=Tr(i,r=Ir(r,n,o,i,t[12],2368359562,20),n,o,t[5],4294588738,4),o=Tr(o,i,r,n,t[8],2272392833,11),n=Tr(n,o,i,r,t[11],1839030562,16),r=Tr(r,n,o,i,t[14],4259657740,23),i=Tr(i,r,n,o,t[1],2763975236,4),o=Tr(o,i,r,n,t[4],1272893353,11),n=Tr(n,o,i,r,t[7],4139469664,16),r=Tr(r,n,o,i,t[10],3200236656,23),i=Tr(i,r,n,o,t[13],681279174,4),o=Tr(o,i,r,n,t[0],3936430074,11),n=Tr(n,o,i,r,t[3],3572445317,16),r=Tr(r,n,o,i,t[6],76029189,23),i=Tr(i,r,n,o,t[9],3654602809,4),o=Tr(o,i,r,n,t[12],3873151461,11),n=Tr(n,o,i,r,t[15],530742520,16),i=Br(i,r=Tr(r,n,o,i,t[2],3299628645,23),n,o,t[0],4096336452,6),o=Br(o,i,r,n,t[7],1126891415,10),n=Br(n,o,i,r,t[14],2878612391,15),r=Br(r,n,o,i,t[5],4237533241,21),i=Br(i,r,n,o,t[12],1700485571,6),o=Br(o,i,r,n,t[3],2399980690,10),n=Br(n,o,i,r,t[10],4293915773,15),r=Br(r,n,o,i,t[1],2240044497,21),i=Br(i,r,n,o,t[8],1873313359,6),o=Br(o,i,r,n,t[15],4264355552,10),n=Br(n,o,i,r,t[6],2734768916,15),r=Br(r,n,o,i,t[13],1309151649,21),i=Br(i,r,n,o,t[4],4149444226,6),o=Br(o,i,r,n,t[11],3174756917,10),n=Br(n,o,i,r,t[2],718787259,15),r=Br(r,n,o,i,t[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+o|0},kr.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Er.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};var Pr=kr,Nr=me.Buffer,xr=we,Lr=Mr,Dr=new Array(16),Cr=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],jr=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Ur=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],qr=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],zr=[0,1518500249,1859775393,2400959708,2840853838],Fr=[1352829926,1548603684,1836072691,2053994217,0];function Hr(){Lr.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function Kr(t,e){return t<<e|t>>>32-e}function Gr(t,e,i,r,n,o,s,h){return Kr(t+(e^i^r)+o+s|0,h)+n|0}function Vr(t,e,i,r,n,o,s,h){return Kr(t+(e&i|~e&r)+o+s|0,h)+n|0}function Yr(t,e,i,r,n,o,s,h){return Kr(t+((e|~i)^r)+o+s|0,h)+n|0}function Zr(t,e,i,r,n,o,s,h){return Kr(t+(e&r|i&~r)+o+s|0,h)+n|0}function Wr(t,e,i,r,n,o,s,h){return Kr(t+(e^(i|~r))+o+s|0,h)+n|0}xr(Hr,Lr),Hr.prototype._update=function(){for(var t=Dr,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,s=0|this._e,h=0|this._a,a=0|this._b,u=0|this._c,f=0|this._d,l=0|this._e,c=0;c<80;c+=1){var d,p;c<16?(d=Gr(i,r,n,o,s,t[Cr[c]],zr[0],Ur[c]),p=Wr(h,a,u,f,l,t[jr[c]],Fr[0],qr[c])):c<32?(d=Vr(i,r,n,o,s,t[Cr[c]],zr[1],Ur[c]),p=Zr(h,a,u,f,l,t[jr[c]],Fr[1],qr[c])):c<48?(d=Yr(i,r,n,o,s,t[Cr[c]],zr[2],Ur[c]),p=Yr(h,a,u,f,l,t[jr[c]],Fr[2],qr[c])):c<64?(d=Zr(i,r,n,o,s,t[Cr[c]],zr[3],Ur[c]),p=Vr(h,a,u,f,l,t[jr[c]],Fr[3],qr[c])):(d=Wr(i,r,n,o,s,t[Cr[c]],zr[4],Ur[c]),p=Gr(h,a,u,f,l,t[jr[c]],Fr[4],qr[c])),i=s,s=o,o=Kr(n,10),n=r,r=d,h=l,l=f,f=Kr(u,10),u=a,a=p}var m=this._b+n+f|0;this._b=this._c+o+l|0,this._c=this._d+s+h|0,this._d=this._e+i+a|0,this._e=this._a+r+u|0,this._a=m},Hr.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Nr.alloc?Nr.alloc(20):new Nr(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};var Xr=Hr,Qr={},Jr={get exports(){return Qr},set exports(t){Qr=t}},$r=de.Buffer;function tn(t,e){this._block=$r.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}tn.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=$r.from(t,e));for(var i=this._block,r=this._blockSize,n=t.length,o=this._len,s=0;s<n;){for(var h=o%r,a=Math.min(n-s,r-h),u=0;u<a;u++)i[h+u]=t[s+u];s+=a,(o+=a)%r==0&&this._update(i)}return this._len+=n,this},tn.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},tn.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var en=tn,rn=we,nn=en,on=de.Buffer,sn=[1518500249,1859775393,-1894007588,-899497514],hn=new Array(80);function an(){this.init(),this._w=hn,nn.call(this,64,56)}function un(t){return t<<30|t>>>2}function fn(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}rn(an,nn),an.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},an.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0;a<16;++a)i[a]=t.readInt32BE(4*a);for(;a<80;++a)i[a]=i[a-3]^i[a-8]^i[a-14]^i[a-16];for(var u=0;u<80;++u){var f=~~(u/20),l=0|((e=r)<<5|e>>>27)+fn(f,n,o,s)+h+i[u]+sn[f];h=s,s=o,o=un(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0},an.prototype._hash=function(){var t=on.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var ln=an,cn=we,dn=en,pn=de.Buffer,mn=[1518500249,1859775393,-1894007588,-899497514],gn=new Array(80);function vn(){this.init(),this._w=gn,dn.call(this,64,56)}function bn(t){return t<<5|t>>>27}function yn(t){return t<<30|t>>>2}function wn(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}cn(vn,dn),vn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},vn.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0;a<16;++a)i[a]=t.readInt32BE(4*a);for(;a<80;++a)i[a]=(e=i[a-3]^i[a-8]^i[a-14]^i[a-16])<<1|e>>>31;for(var u=0;u<80;++u){var f=~~(u/20),l=bn(r)+wn(f,n,o,s)+h+i[u]+mn[f]|0;h=s,s=o,o=yn(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0},vn.prototype._hash=function(){var t=pn.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var Mn=vn,_n=we,Sn=en,En=de.Buffer,An=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],kn=new Array(64);function Rn(){this.init(),this._w=kn,Sn.call(this,64,56)}function On(t,e,i){return i^t&(e^i)}function In(t,e,i){return t&e|i&(t|e)}function Tn(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function Bn(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Pn(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}_n(Rn,Sn),Rn.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Rn.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,a=0|this._f,u=0|this._g,f=0|this._h,l=0;l<16;++l)i[l]=t.readInt32BE(4*l);for(;l<64;++l)i[l]=0|(((e=i[l-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+i[l-7]+Pn(i[l-15])+i[l-16];for(var c=0;c<64;++c){var d=f+Bn(h)+On(h,a,u)+An[c]+i[c]|0,p=Tn(r)+In(r,n,o)|0;f=u,u=a,a=h,h=s+d|0,s=o,o=n,n=r,r=d+p|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0,this._f=a+this._f|0,this._g=u+this._g|0,this._h=f+this._h|0},Rn.prototype._hash=function(){var t=En.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var Nn=Rn,xn=we,Ln=Nn,Dn=en,Cn=de.Buffer,jn=new Array(64);function Un(){this.init(),this._w=jn,Dn.call(this,64,56)}xn(Un,Ln),Un.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Un.prototype._hash=function(){var t=Cn.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var qn=Un,zn=we,Fn=en,Hn=de.Buffer,Kn=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],Gn=new Array(160);function Vn(){this.init(),this._w=Gn,Fn.call(this,128,112)}function Yn(t,e,i){return i^t&(e^i)}function Zn(t,e,i){return t&e|i&(t|e)}function Wn(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Xn(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function Qn(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function Jn(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function $n(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function to(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function eo(t,e){return t>>>0<e>>>0?1:0}zn(Vn,Fn),Vn.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Vn.prototype._update=function(t){for(var e=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,h=0|this._fh,a=0|this._gh,u=0|this._hh,f=0|this._al,l=0|this._bl,c=0|this._cl,d=0|this._dl,p=0|this._el,m=0|this._fl,g=0|this._gl,v=0|this._hl,b=0;b<32;b+=2)e[b]=t.readInt32BE(4*b),e[b+1]=t.readInt32BE(4*b+4);for(;b<160;b+=2){var y=e[b-30],w=e[b-30+1],M=Qn(y,w),_=Jn(w,y),S=$n(y=e[b-4],w=e[b-4+1]),E=to(w,y),A=e[b-14],k=e[b-14+1],R=e[b-32],O=e[b-32+1],I=_+k|0,T=M+A+eo(I,_)|0;T=(T=T+S+eo(I=I+E|0,E)|0)+R+eo(I=I+O|0,O)|0,e[b]=T,e[b+1]=I}for(var B=0;B<160;B+=2){T=e[B],I=e[B+1];var P=Zn(i,r,n),N=Zn(f,l,c),x=Wn(i,f),L=Wn(f,i),D=Xn(s,p),C=Xn(p,s),j=Kn[B],U=Kn[B+1],q=Yn(s,h,a),z=Yn(p,m,g),F=v+C|0,H=u+D+eo(F,v)|0;H=(H=(H=H+q+eo(F=F+z|0,z)|0)+j+eo(F=F+U|0,U)|0)+T+eo(F=F+I|0,I)|0;var K=L+N|0,G=x+P+eo(K,L)|0;u=a,v=g,a=h,g=m,h=s,m=p,s=o+H+eo(p=d+F|0,d)|0,o=n,d=c,n=r,c=l,r=i,l=f,i=H+G+eo(f=F+K|0,F)|0}this._al=this._al+f|0,this._bl=this._bl+l|0,this._cl=this._cl+c|0,this._dl=this._dl+d|0,this._el=this._el+p|0,this._fl=this._fl+m|0,this._gl=this._gl+g|0,this._hl=this._hl+v|0,this._ah=this._ah+i+eo(this._al,f)|0,this._bh=this._bh+r+eo(this._bl,l)|0,this._ch=this._ch+n+eo(this._cl,c)|0,this._dh=this._dh+o+eo(this._dl,d)|0,this._eh=this._eh+s+eo(this._el,p)|0,this._fh=this._fh+h+eo(this._fl,m)|0,this._gh=this._gh+a+eo(this._gl,g)|0,this._hh=this._hh+u+eo(this._hl,v)|0},Vn.prototype._hash=function(){var t=Hn.allocUnsafe(64);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var io=Vn,ro=we,no=io,oo=en,so=de.Buffer,ho=new Array(160);function ao(){this.init(),this._w=ho,oo.call(this,128,112)}ro(ao,no),ao.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},ao.prototype._hash=function(){var t=so.allocUnsafe(48);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var uo=ao,fo=Jr.exports=function(t){t=t.toLowerCase();var e=fo[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};function lo(){this.head=null,this.tail=null,this.length=0}fo.sha=ln,fo.sha1=Mn,fo.sha224=qn,fo.sha256=Nn,fo.sha384=uo,fo.sha512=io,lo.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},lo.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},lo.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},lo.prototype.clear=function(){this.head=this.tail=null,this.length=0},lo.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i},lo.prototype.concat=function(t){if(0===this.length)return T.alloc(0);if(1===this.length)return this.head.data;for(var e=T.allocUnsafe(t>>>0),i=this.head,r=0;i;)i.data.copy(e,r),r+=i.data.length,i=i.next;return e};var co=T.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function po(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!co(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=go;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=vo;break;default:return void(this.write=mo)}this.charBuffer=new T(6),this.charReceived=0,this.charLength=0}function mo(t){return t.toString(this.encoding)}function go(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function vo(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}po.prototype.write=function(t){for(var e="";this.charLength;){var i=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";if(t=t.slice(i,t.length),!((n=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var r=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived);var n;r=(e+=t.toString(this.encoding,0,r)).length-1;if((n=e.charCodeAt(r))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,r)}return e},po.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var i=t[t.length-e];if(1==e&&i>>5==6){this.charLength=2;break}if(e<=2&&i>>4==14){this.charLength=3;break}if(e<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=e},po.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var i=this.charReceived,r=this.charBuffer,n=this.encoding;e+=r.slice(0,i).toString(n)}return e};var bo=Object.freeze({__proto__:null,StringDecoder:po});Mo.ReadableState=wo;var yo=Ue("stream");function wo(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof Wo&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new lo,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new po(t.encoding),this.encoding=t.encoding)}function Mo(t){if(!(this instanceof Mo))return new Mo(t);this._readableState=new wo(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),Ae.call(this)}function _o(t,e,i,r,n){var o=function(t,e){var i=null;T.isBuffer(e)||"string"==typeof e||null==e||t.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));return i}(e,i);if(o)t.emit("error",o);else if(null===i)e.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,Ao(t)}(t,e);else if(e.objectMode||i&&i.length>0)if(e.ended&&!n){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&n){var h=new Error("stream.unshift() after end event");t.emit("error",h)}else{var a;!e.decoder||n||r||(i=e.decoder.write(i),a=!e.objectMode&&0===i.length),n||(e.reading=!1),a||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",i),t.read(0)):(e.length+=e.objectMode?1:i.length,n?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&Ao(t))),function(t,e){e.readingMore||(e.readingMore=!0,Wt(Ro,t,e))}(t,e)}else n||(e.reading=!1);return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(e)}Ne(Mo,Ae),Mo.prototype.push=function(t,e){var i=this._readableState;return i.objectMode||"string"!=typeof t||(e=e||i.defaultEncoding)!==i.encoding&&(t=T.from(t,e),e=""),_o(this,i,t,e,!1)},Mo.prototype.unshift=function(t){return _o(this,this._readableState,t,"",!0)},Mo.prototype.isPaused=function(){return!1===this._readableState.flowing},Mo.prototype.setEncoding=function(t){return this._readableState.decoder=new po(t),this._readableState.encoding=t,this};var So=8388608;function Eo(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=So?t=So:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function Ao(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(yo("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Wt(ko,t):ko(t))}function ko(t){yo("emit readable"),t.emit("readable"),To(t)}function Ro(t,e){for(var i=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(yo("maybeReadMore read 0"),t.read(0),i!==e.length);)i=e.length;e.readingMore=!1}function Oo(t){yo("readable nexttick read 0"),t.read(0)}function Io(t,e){e.reading||(yo("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),To(t),e.flowing&&!e.reading&&t.read(0)}function To(t){var e=t._readableState;for(yo("flow",e.flowing);e.flowing&&null!==t.read(););}function Bo(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):i=function(t,e,i){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():i?function(t,e){var i=e.head,r=1,n=i.data;t-=n.length;for(;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(s===o.length?n+=o:n+=o.slice(0,t),0===(t-=s)){s===o.length?(++r,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(s));break}++r}return e.length-=r,n}(t,e):function(t,e){var i=T.allocUnsafe(t),r=e.head,n=1;r.data.copy(i),t-=r.data.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(i,i.length-t,0,s),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e);return r}(t,e.buffer,e.decoder),i);var i}function Po(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Wt(No,e,t))}function No(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function xo(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}function Lo(){}function Do(t,e,i){this.chunk=t,this.encoding=e,this.callback=i,this.next=null}function Co(t,e){Object.defineProperty(this,"buffer",{get:De((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof Wo&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=!1===t.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,r=i.sync,n=i.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,r,n){--e.pendingcb,i?Wt(n,r):n(r);t._writableState.errorEmitted=!0,t.emit("error",r)}(t,i,r,e,n);else{var o=Fo(i);o||i.corked||i.bufferProcessing||!i.bufferedRequest||zo(t,i),r?Wt(qo,t,i,o,n):qo(t,i,o,n)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Go(this)}function jo(t){if(!(this instanceof jo||this instanceof Wo))return new jo(t);this._writableState=new Co(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),Ae.call(this)}function Uo(t,e,i,r,n,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,i?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function qo(t,e,i,r){i||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),Ko(t,e)}function zo(t,e){e.bufferProcessing=!0;var i=e.bufferedRequest;if(t._writev&&i&&i.next){var r=e.bufferedRequestCount,n=new Array(r),o=e.corkedRequestsFree;o.entry=i;for(var s=0;i;)n[s]=i,i=i.next,s+=1;Uo(t,e,!0,e.length,n,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new Go(e)}else{for(;i;){var h=i.chunk,a=i.encoding,u=i.callback;if(Uo(t,e,!1,e.objectMode?1:h.length,h,a,u),i=i.next,e.writing)break}null===i&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=i,e.bufferProcessing=!1}function Fo(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function Ho(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function Ko(t,e){var i=Fo(e);return i&&(0===e.pendingcb?(Ho(t,e),e.finished=!0,t.emit("finish")):Ho(t,e)),i}function Go(t){var e=this;this.next=null,this.entry=null,this.finish=function(i){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(i),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}Mo.prototype.read=function(t){yo("read",t),t=parseInt(t,10);var e=this._readableState,i=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return yo("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?Po(this):Ao(this),null;if(0===(t=Eo(t,e))&&e.ended)return 0===e.length&&Po(this),null;var r,n=e.needReadable;return yo("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&yo("length less than watermark",n=!0),e.ended||e.reading?yo("reading or ended",n=!1):n&&(yo("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Eo(i,e))),null===(r=t>0?Bo(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&Po(this)),null!==r&&this.emit("data",r),r},Mo.prototype._read=function(t){this.emit("error",new Error("not implemented"))},Mo.prototype.pipe=function(t,e){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,yo("pipe count=%d opts=%j",r.pipesCount,e);var n=!e||!1!==e.end?s:u;function o(t){yo("onunpipe"),t===i&&u()}function s(){yo("onend"),t.end()}r.endEmitted?Wt(n):i.once("end",n),t.on("unpipe",o);var h=function(t){return function(){var e=t._readableState;yo("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,To(t))}}(i);t.on("drain",h);var a=!1;function u(){yo("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",h),t.removeListener("error",c),t.removeListener("unpipe",o),i.removeListener("end",s),i.removeListener("end",u),i.removeListener("data",l),a=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||h()}var f=!1;function l(e){yo("ondata"),f=!1,!1!==t.write(e)||f||((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==xo(r.pipes,t))&&!a&&(yo("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,f=!0),i.pause())}function c(e){var i;yo("onerror",e),m(),t.removeListener("error",c),0===(i="error",t.listeners(i).length)&&t.emit("error",e)}function d(){t.removeListener("finish",p),m()}function p(){yo("onfinish"),t.removeListener("close",d),m()}function m(){yo("unpipe"),i.unpipe(t)}return i.on("data",l),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",c),t.once("close",d),t.once("finish",p),t.emit("pipe",i),r.flowing||(yo("pipe resume"),i.resume()),t},Mo.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this)),this;if(!t){var i=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n<r;n++)i[n].emit("unpipe",this);return this}var o=xo(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this)),this},Mo.prototype.on=function(t,e){var i=Ae.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&Ao(this):Wt(Oo,this))}return i},Mo.prototype.addListener=Mo.prototype.on,Mo.prototype.resume=function(){var t=this._readableState;return t.flowing||(yo("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Wt(Io,t,e))}(this,t)),this},Mo.prototype.pause=function(){return yo("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(yo("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Mo.prototype.wrap=function(t){var e=this._readableState,i=!1,r=this;for(var n in t.on("end",(function(){if(yo("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)})),t.on("data",(function(n){(yo("wrapped data"),e.decoder&&(n=e.decoder.write(n)),e.objectMode&&null==n)||(e.objectMode||n&&n.length)&&(r.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));return function(t,e){for(var i=0,r=t.length;i<r;i++)e(t[i],i)}(["error","close","destroy","pause","resume"],(function(e){t.on(e,r.emit.bind(r,e))})),r._read=function(e){yo("wrapped _read",e),i&&(i=!1,t.resume())},r},Mo._fromList=Bo,jo.WritableState=Co,Ne(jo,Ae),Co.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},jo.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},jo.prototype.write=function(t,e,i){var r=this._writableState,n=!1;return"function"==typeof e&&(i=e,e=null),T.isBuffer(t)?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof i&&(i=Lo),r.ended?function(t,e){var i=new Error("write after end");t.emit("error",i),Wt(e,i)}(this,i):function(t,e,i,r){var n=!0,o=!1;return null===i?o=new TypeError("May not write null values to stream"):T.isBuffer(i)||"string"==typeof i||void 0===i||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),Wt(r,o),n=!1),n}(this,r,t,i)&&(r.pendingcb++,n=function(t,e,i,r,n){i=function(t,e,i){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=T.from(e,i));return e}(e,i,r),T.isBuffer(i)&&(r="buffer");var o=e.objectMode?1:i.length;e.length+=o;var s=e.length<e.highWaterMark;s||(e.needDrain=!0);if(e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest=new Do(i,r,n),h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Uo(t,e,!1,o,i,r,n);return s}(this,r,t,e,i)),n},jo.prototype.cork=function(){this._writableState.corked++},jo.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||zo(this,t))},jo.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},jo.prototype._write=function(t,e,i){i(new Error("not implemented"))},jo.prototype._writev=null,jo.prototype.end=function(t,e,i){var r=this._writableState;"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,i){e.ending=!0,Ko(t,e),i&&(e.finished?Wt(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,r,i)},Ne(Wo,Mo);for(var Vo=Object.keys(jo.prototype),Yo=0;Yo<Vo.length;Yo++){var Zo=Vo[Yo];Wo.prototype[Zo]||(Wo.prototype[Zo]=jo.prototype[Zo])}function Wo(t){if(!(this instanceof Wo))return new Wo(t);Mo.call(this,t),jo.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Xo)}function Xo(){this.allowHalfOpen||this._writableState.ended||Wt(Qo,this)}function Qo(t){t.end()}function Jo(t){this.afterTransform=function(e,i){return function(t,e,i){var r=t._transformState;r.transforming=!1;var n=r.writecb;if(!n)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=i&&t.push(i);n(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}(t,e,i)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function $o(t){if(!(this instanceof $o))return new $o(t);Wo.call(this,t),this._transformState=new Jo(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(t){ts(e,t)})):ts(e)}))}function ts(t,e){if(e)return t.emit("error",e);var i=t._writableState,r=t._transformState;if(i.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}function es(t){if(!(this instanceof es))return new es(t);$o.call(this,t)}function is(){Ae.call(this)}Ne($o,Wo),$o.prototype.push=function(t,e){return this._transformState.needTransform=!1,Wo.prototype.push.call(this,t,e)},$o.prototype._transform=function(t,e,i){throw new Error("Not implemented")},$o.prototype._write=function(t,e,i){var r=this._transformState;if(r.writecb=i,r.writechunk=t,r.writeencoding=e,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},$o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},Ne(es,$o),es.prototype._transform=function(t,e,i){i(null,t)},Ne(is,Ae),is.Readable=Mo,is.Writable=jo,is.Duplex=Wo,is.Transform=$o,is.PassThrough=es,is.Stream=is,is.prototype.pipe=function(t,e){var i=this;function r(e){t.writable&&!1===t.write(e)&&i.pause&&i.pause()}function n(){i.readable&&i.resume&&i.resume()}i.on("data",r),t.on("drain",n),t._isStdio||e&&!1===e.end||(i.on("end",s),i.on("close",h));var o=!1;function s(){o||(o=!0,t.end())}function h(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===Ae.listenerCount(this,"error"))throw t}function u(){i.removeListener("data",r),t.removeListener("drain",n),i.removeListener("end",s),i.removeListener("close",h),i.removeListener("error",a),t.removeListener("error",a),i.removeListener("end",u),i.removeListener("close",u),t.removeListener("close",u)}return i.on("error",a),t.on("error",a),i.on("end",u),i.on("close",u),t.on("close",u),t.emit("pipe",i),t};var rs=vt(Object.freeze({__proto__:null,Duplex:Wo,PassThrough:es,Readable:Mo,Stream:is,Transform:$o,Writable:jo,default:is})),ns=vt(bo),os=de.Buffer,ss=rs.Transform,hs=ns.StringDecoder;function as(t){ss.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}we(as,ss),as.prototype.update=function(t,e,i){"string"==typeof t&&(t=os.from(t,e));var r=this._update(t);return this.hashMode?this:(i&&(r=this._toString(r,i)),r)},as.prototype.setAutoPadding=function(){},as.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},as.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},as.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},as.prototype._transform=function(t,e,i){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{i(r)}},as.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},as.prototype._finalOrDigest=function(t){var e=this.__final()||os.alloc(0);return t&&(e=this._toString(e,t,!0)),e},as.prototype._toString=function(t,e,i){if(this._decoder||(this._decoder=new hs(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return i&&(r+=this._decoder.end()),r};var us=as,fs=Pr,ls=Xr,cs=Qr,ds=us;function ps(t){ds.call(this,"digest"),this._hash=t}we(ps,ds),ps.prototype._update=function(t){this._hash.update(t)},ps.prototype._final=function(){return this._hash.digest()};var ms=function(t){return"md5"===(t=t.toLowerCase())?new fs:"rmd160"===t||"ripemd160"===t?new ls:new ps(cs(t))},gs=we,vs=de.Buffer,bs=us,ys=vs.alloc(128),ws=64;function Ms(t,e){bs.call(this,"digest"),"string"==typeof e&&(e=vs.from(e)),this._alg=t,this._key=e,e.length>ws?e=t(e):e.length<ws&&(e=vs.concat([e,ys],ws));for(var i=this._ipad=vs.allocUnsafe(ws),r=this._opad=vs.allocUnsafe(ws),n=0;n<ws;n++)i[n]=54^e[n],r[n]=92^e[n];this._hash=[i]}gs(Ms,bs),Ms.prototype._update=function(t){this._hash.push(t)},Ms.prototype._final=function(){var t=this._alg(vs.concat(this._hash));return this._alg(vs.concat([this._opad,t]))};var _s=Pr,Ss=function(t){return(new _s).update(t).digest()},Es=we,As=Ms,ks=us,Rs=de.Buffer,Os=Ss,Is=Xr,Ts=Qr,Bs=Rs.alloc(128);function Ps(t,e){ks.call(this,"digest"),"string"==typeof e&&(e=Rs.from(e));var i="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>i)?e=("rmd160"===t?new Is:Ts(t)).update(e).digest():e.length<i&&(e=Rs.concat([e,Bs],i));for(var r=this._ipad=Rs.allocUnsafe(i),n=this._opad=Rs.allocUnsafe(i),o=0;o<i;o++)r[o]=54^e[o],n[o]=92^e[o];this._hash="rmd160"===t?new Is:Ts(t),this._hash.update(r)}Es(Ps,ks),Ps.prototype._update=function(t){this._hash.update(t)},Ps.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new Is:Ts(this._alg)).update(this._opad).update(t).digest()};var Ns=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new Ps("rmd160",e):"md5"===t?new As(Os,e):new Ps(t,e)},xs={},Ls={get exports(){return xs},set exports(t){xs=t}};var Ds={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};Ls.exports=Ds;var Cs,js={},Us=Math.pow(2,30)-1,qs=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>Us||e!=e)throw new TypeError("Bad key length")};if(gt.process&>.process.browser)Cs="utf-8";else if(gt.process&>.process.version){Cs=parseInt(ae.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else Cs="utf-8";var zs=Cs,Fs=de.Buffer,Hs=function(t,e,i){if(Fs.isBuffer(t))return t;if("string"==typeof t)return Fs.from(t,e);if(ArrayBuffer.isView(t))return Fs.from(t.buffer);throw new TypeError(i+" must be a string, a Buffer, a typed array or a DataView")},Ks=Ss,Gs=Xr,Vs=Qr,Ys=de.Buffer,Zs=qs,Ws=zs,Xs=Hs,Qs=Ys.alloc(128),Js={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function $s(t,e,i){var r=function(t){function e(e){return Vs(t).update(e).digest()}function i(t){return(new Gs).update(t).digest()}return"rmd160"===t||"ripemd160"===t?i:"md5"===t?Ks:e}(t),n="sha512"===t||"sha384"===t?128:64;e.length>n?e=r(e):e.length<n&&(e=Ys.concat([e,Qs],n));for(var o=Ys.allocUnsafe(n+Js[t]),s=Ys.allocUnsafe(n+Js[t]),h=0;h<n;h++)o[h]=54^e[h],s[h]=92^e[h];var a=Ys.allocUnsafe(n+i+4);o.copy(a,0,0,n),this.ipad1=a,this.ipad2=o,this.opad=s,this.alg=t,this.blocksize=n,this.hash=r,this.size=Js[t]}$s.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)};var th,eh,ih=function(t,e,i,r,n){Zs(i,r);var o=new $s(n=n||"sha1",t=Xs(t,Ws,"Password"),(e=Xs(e,Ws,"Salt")).length),s=Ys.allocUnsafe(r),h=Ys.allocUnsafe(e.length+4);e.copy(h,0,0,e.length);for(var a=0,u=Js[n],f=Math.ceil(r/u),l=1;l<=f;l++){h.writeUInt32BE(l,e.length);for(var c=o.run(h,o.ipad1),d=c,p=1;p<i;p++){d=o.run(d,o.ipad2);for(var m=0;m<u;m++)c[m]^=d[m]}c.copy(s,a),a+=u}return s},rh=de.Buffer,nh=qs,oh=zs,sh=ih,hh=Hs,ah=gt.crypto&>.crypto.subtle,uh={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},fh=[];function lh(){return eh||(eh=gt.process&>.process.nextTick?gt.process.nextTick:gt.queueMicrotask?gt.queueMicrotask:gt.setImmediate?gt.setImmediate:gt.setTimeout)}function ch(t,e,i,r,n){return ah.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return ah.deriveBits({name:"PBKDF2",salt:e,iterations:i,hash:{name:n}},t,r<<3)})).then((function(t){return rh.from(t)}))}js.pbkdf2=function(t,e,i,r,n,o){"function"==typeof n&&(o=n,n=void 0);var s=uh[(n=n||"sha1").toLowerCase()];if(s&&"function"==typeof gt.Promise){if(nh(i,r),t=hh(t,oh,"Password"),e=hh(e,oh,"Salt"),"function"!=typeof o)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){lh()((function(){e(null,t)}))}),(function(t){lh()((function(){e(t)}))}))}(function(t){if(gt.process&&!gt.process.browser)return Promise.resolve(!1);if(!ah||!ah.importKey||!ah.deriveBits)return Promise.resolve(!1);if(void 0!==fh[t])return fh[t];var e=ch(th=th||rh.alloc(8),th,10,128,t).then((function(){return!0})).catch((function(){return!1}));return fh[t]=e,e}(s).then((function(o){return o?ch(t,e,i,r,s):sh(t,e,i,r,n)})),o)}else lh()((function(){var s;try{s=sh(t,e,i,r,n)}catch(t){return o(t)}o(null,s)}))},js.pbkdf2Sync=ih;var dh={},ph={},mh={readUInt32BE:function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},writeUInt32BE:function(t,e,i){t[0+i]=e>>>24,t[1+i]=e>>>16&255,t[2+i]=e>>>8&255,t[3+i]=255&e},ip:function(t,e,i,r){for(var n=0,o=0,s=6;s>=0;s-=2){for(var h=0;h<=24;h+=8)n<<=1,n|=e>>>h+s&1;for(h=0;h<=24;h+=8)n<<=1,n|=t>>>h+s&1}for(s=6;s>=0;s-=2){for(h=1;h<=25;h+=8)o<<=1,o|=e>>>h+s&1;for(h=1;h<=25;h+=8)o<<=1,o|=t>>>h+s&1}i[r+0]=n>>>0,i[r+1]=o>>>0},rip:function(t,e,i,r){for(var n=0,o=0,s=0;s<4;s++)for(var h=24;h>=0;h-=8)n<<=1,n|=e>>>h+s&1,n<<=1,n|=t>>>h+s&1;for(s=4;s<8;s++)for(h=24;h>=0;h-=8)o<<=1,o|=e>>>h+s&1,o<<=1,o|=t>>>h+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},pc1:function(t,e,i,r){for(var n=0,o=0,s=7;s>=5;s--){for(var h=0;h<=24;h+=8)n<<=1,n|=e>>h+s&1;for(h=0;h<=24;h+=8)n<<=1,n|=t>>h+s&1}for(h=0;h<=24;h+=8)n<<=1,n|=e>>h+s&1;for(s=1;s<=3;s++){for(h=0;h<=24;h+=8)o<<=1,o|=e>>h+s&1;for(h=0;h<=24;h+=8)o<<=1,o|=t>>h+s&1}for(h=0;h<=24;h+=8)o<<=1,o|=t>>h+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},r28shl:function(t,e){return t<<e&268435455|t>>>28-e}},gh=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];mh.pc2=function(t,e,i,r){for(var n=0,o=0,s=gh.length>>>1,h=0;h<s;h++)n<<=1,n|=t>>>gh[h]&1;for(h=s;h<gh.length;h++)o<<=1,o|=e>>>gh[h]&1;i[r+0]=n>>>0,i[r+1]=o>>>0},mh.expand=function(t,e,i){var r=0,n=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[i+0]=r>>>0,e[i+1]=n>>>0};var vh=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];mh.substitute=function(t,e){for(var i=0,r=0;r<4;r++){i<<=4,i|=vh[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){i<<=4,i|=vh[256+64*r+(e>>>18-6*r&63)]}return i>>>0};var bh=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];mh.permute=function(t){for(var e=0,i=0;i<bh.length;i++)e<<=1,e|=t>>>bh[i]&1;return e>>>0},mh.padSplit=function(t,e,i){for(var r=t.toString(2);r.length<e;)r="0"+r;for(var n=[],o=0;o<e;o+=i)n.push(r.slice(o,o+i));return n.join(" ")};var yh=wh;function wh(t,e){if(!t)throw new Error(e||"Assertion failed")}wh.equal=function(t,e,i){if(t!=e)throw new Error(i||"Assertion failed: "+t+" != "+e)};var Mh=yh;function _h(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}var Sh=_h;_h.prototype._init=function(){},_h.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},_h.prototype._buffer=function(t,e){for(var i=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r<i;r++)this.buffer[this.bufferOff+r]=t[e+r];return this.bufferOff+=i,i},_h.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},_h.prototype._updateEncrypt=function(t){var e=0,i=0,r=(this.bufferOff+t.length)/this.blockSize|0,n=new Array(r*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(n,i)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,n,i),i+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return n},_h.prototype._updateDecrypt=function(t){for(var e=0,i=0,r=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,n=new Array(r*this.blockSize);r>0;r--)e+=this._buffer(t,e),i+=this._flushBuffer(n,i);return e+=this._buffer(t,e),n},_h.prototype.final=function(t){var e,i;return t&&(e=this.update(t)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(i):i},_h.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},_h.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},_h.prototype._unpad=function(t){return t},_h.prototype._finalDecrypt=function(){Mh.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)};var Eh=yh,Ah=mh,kh=Sh;function Rh(){this.tmp=new Array(2),this.keys=null}function Oh(t){kh.call(this,t);var e=new Rh;this._desState=e,this.deriveKeys(e,t.key)}we(Oh,kh);var Ih=Oh;Oh.create=function(t){return new Oh(t)};var Th=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Oh.prototype.deriveKeys=function(t,e){t.keys=new Array(32),Eh.equal(e.length,this.blockSize,"Invalid key length");var i=Ah.readUInt32BE(e,0),r=Ah.readUInt32BE(e,4);Ah.pc1(i,r,t.tmp,0),i=t.tmp[0],r=t.tmp[1];for(var n=0;n<t.keys.length;n+=2){var o=Th[n>>>1];i=Ah.r28shl(i,o),r=Ah.r28shl(r,o),Ah.pc2(i,r,t.keys,n)}},Oh.prototype._update=function(t,e,i,r){var n=this._desState,o=Ah.readUInt32BE(t,e),s=Ah.readUInt32BE(t,e+4);Ah.ip(o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,s,n.tmp,0):this._decrypt(n,o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],Ah.writeUInt32BE(i,o,r),Ah.writeUInt32BE(i,s,r+4)},Oh.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var i=t.length-e,r=e;r<t.length;r++)t[r]=i;return!0},Oh.prototype._unpad=function(t){if(!1===this.padding)return t;for(var e=t[t.length-1],i=t.length-e;i<t.length;i++)Eh.equal(t[i],e);return t.slice(0,t.length-e)},Oh.prototype._encrypt=function(t,e,i,r,n){for(var o=e,s=i,h=0;h<t.keys.length;h+=2){var a=t.keys[h],u=t.keys[h+1];Ah.expand(s,t.tmp,0),a^=t.tmp[0],u^=t.tmp[1];var f=Ah.substitute(a,u),l=s;s=(o^Ah.permute(f))>>>0,o=l}Ah.rip(s,o,r,n)},Oh.prototype._decrypt=function(t,e,i,r,n){for(var o=i,s=e,h=t.keys.length-2;h>=0;h-=2){var a=t.keys[h],u=t.keys[h+1];Ah.expand(o,t.tmp,0),a^=t.tmp[0],u^=t.tmp[1];var f=Ah.substitute(a,u),l=o;o=(s^Ah.permute(f))>>>0,s=l}Ah.rip(o,s,r,n)};var Bh={},Ph=yh,Nh=we,xh={};function Lh(t){Ph.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}Bh.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}Nh(e,t);for(var i=Object.keys(xh),r=0;r<i.length;r++){var n=i[r];e.prototype[n]=xh[n]}return e.create=function(t){return new e(t)},e},xh._cbcInit=function(){var t=new Lh(this.options.iv);this._cbcState=t},xh._update=function(t,e,i,r){var n=this._cbcState,o=this.constructor.super_.prototype,s=n.iv;if("encrypt"===this.type){for(var h=0;h<this.blockSize;h++)s[h]^=t[e+h];o._update.call(this,s,0,i,r);for(h=0;h<this.blockSize;h++)s[h]=i[r+h]}else{o._update.call(this,t,e,i,r);for(h=0;h<this.blockSize;h++)i[r+h]^=s[h];for(h=0;h<this.blockSize;h++)s[h]=t[e+h]}};var Dh=yh,Ch=Sh,jh=Ih;function Uh(t,e){Dh.equal(e.length,24,"Invalid key length");var i=e.slice(0,8),r=e.slice(8,16),n=e.slice(16,24);this.ciphers="encrypt"===t?[jh.create({type:"encrypt",key:i}),jh.create({type:"decrypt",key:r}),jh.create({type:"encrypt",key:n})]:[jh.create({type:"decrypt",key:n}),jh.create({type:"encrypt",key:r}),jh.create({type:"decrypt",key:i})]}function qh(t){Ch.call(this,t);var e=new Uh(this.type,this.options.key);this._edeState=e}we(qh,Ch);var zh=qh;qh.create=function(t){return new qh(t)},qh.prototype._update=function(t,e,i,r){var n=this._edeState;n.ciphers[0]._update(t,e,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r)},qh.prototype._pad=jh.prototype._pad,qh.prototype._unpad=jh.prototype._unpad,ph.utils=mh,ph.Cipher=Sh,ph.DES=Ih,ph.CBC=Bh,ph.EDE=zh;var Fh=us,Hh=ph,Kh=we,Gh=de.Buffer,Vh={"des-ede3-cbc":Hh.CBC.instantiate(Hh.EDE),"des-ede3":Hh.EDE,"des-ede-cbc":Hh.CBC.instantiate(Hh.EDE),"des-ede":Hh.EDE,"des-cbc":Hh.CBC.instantiate(Hh.DES),"des-ecb":Hh.DES};Vh.des=Vh["des-cbc"],Vh.des3=Vh["des-ede3-cbc"];var Yh=Zh;function Zh(t){Fh.call(this);var e,i=t.mode.toLowerCase(),r=Vh[i];e=t.decrypt?"decrypt":"encrypt";var n=t.key;Gh.isBuffer(n)||(n=Gh.from(n)),"des-ede"!==i&&"des-ede-cbc"!==i||(n=Gh.concat([n,n.slice(0,8)]));var o=t.iv;Gh.isBuffer(o)||(o=Gh.from(o)),this._des=r.create({key:n,iv:o,type:e})}Kh(Zh,Fh),Zh.prototype._update=function(t){return Gh.from(this._des.update(t))},Zh.prototype._final=function(){return Gh.from(this._des.final())};var Wh={},Xh={},Qh={encrypt:function(t,e){return t._cipher.encryptBlock(e)},decrypt:function(t,e){return t._cipher.decryptBlock(e)}},Jh={},$h=function(t,e){for(var i=Math.min(t.length,e.length),r=new T(i),n=0;n<i;++n)r[n]=t[n]^e[n];return r},ta=$h;Jh.encrypt=function(t,e){var i=ta(e,t._prev);return t._prev=t._cipher.encryptBlock(i),t._prev},Jh.decrypt=function(t,e){var i=t._prev;t._prev=e;var r=t._cipher.decryptBlock(e);return ta(r,i)};var ea={},ia=de.Buffer,ra=$h;function na(t,e,i){var r=e.length,n=ra(e,t._cache);return t._cache=t._cache.slice(r),t._prev=ia.concat([t._prev,i?e:n]),n}ea.encrypt=function(t,e,i){for(var r,n=ia.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=ia.allocUnsafe(0)),!(t._cache.length<=e.length)){n=ia.concat([n,na(t,e,i)]);break}r=t._cache.length,n=ia.concat([n,na(t,e.slice(0,r),i)]),e=e.slice(r)}return n};var oa={},sa=de.Buffer;function ha(t,e,i){var r=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=sa.concat([t._prev.slice(1),sa.from([i?e:r])]),r}oa.encrypt=function(t,e,i){for(var r=e.length,n=sa.allocUnsafe(r),o=-1;++o<r;)n[o]=ha(t,e[o],i);return n};var aa={},ua=de.Buffer;function fa(t,e,i){for(var r,n,o=-1,s=0;++o<8;)r=e&1<<7-o?128:0,s+=(128&(n=t._cipher.encryptBlock(t._prev)[0]^r))>>o%8,t._prev=la(t._prev,i?r:n);return s}function la(t,e){var i=t.length,r=-1,n=ua.allocUnsafe(t.length);for(t=ua.concat([t,ua.from([e])]);++r<i;)n[r]=t[r]<<1|t[r+1]>>7;return n}aa.encrypt=function(t,e,i){for(var r=e.length,n=ua.allocUnsafe(r),o=-1;++o<r;)n[o]=fa(t,e[o],i);return n};var ca={},da=$h;function pa(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}ca.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=T.concat([t._cache,pa(t)]);var i=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),da(e,i)};var ma={};var ga=function(t){for(var e,i=t.length;i--;){if(255!==(e=t.readUInt8(i))){e++,t.writeUInt8(e,i);break}t.writeUInt8(0,i)}},va=$h,ba=de.Buffer,ya=ga;function wa(t){var e=t._cipher.encryptBlockRaw(t._prev);return ya(t._prev),e}ma.encrypt=function(t,e){var i=Math.ceil(e.length/16),r=t._cache.length;t._cache=ba.concat([t._cache,ba.allocUnsafe(16*i)]);for(var n=0;n<i;n++){var o=wa(t),s=r+16*n;t._cache.writeUInt32BE(o[0],s+0),t._cache.writeUInt32BE(o[1],s+4),t._cache.writeUInt32BE(o[2],s+8),t._cache.writeUInt32BE(o[3],s+12)}var h=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),va(e,h)};var Ma={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},_a={ECB:Qh,CBC:Jh,CFB:ea,CFB8:oa,CFB1:aa,OFB:ca,CTR:ma,GCM:ma},Sa=Ma;for(var Ea in Sa)Sa[Ea].module=_a[Sa[Ea].mode];var Aa=Sa,ka={},Ra=de.Buffer;function Oa(t){Ra.isBuffer(t)||(t=Ra.from(t));for(var e=t.length/4|0,i=new Array(e),r=0;r<e;r++)i[r]=t.readUInt32BE(4*r);return i}function Ia(t){for(;0<t.length;t++)t[0]=0}function Ta(t,e,i,r,n){for(var o,s,h,a,u=i[0],f=i[1],l=i[2],c=i[3],d=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],g=t[3]^e[3],v=4,b=1;b<n;b++)o=u[d>>>24]^f[p>>>16&255]^l[m>>>8&255]^c[255&g]^e[v++],s=u[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^c[255&d]^e[v++],h=u[m>>>24]^f[g>>>16&255]^l[d>>>8&255]^c[255&p]^e[v++],a=u[g>>>24]^f[d>>>16&255]^l[p>>>8&255]^c[255&m]^e[v++],d=o,p=s,m=h,g=a;return o=(r[d>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^e[v++],s=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&d])^e[v++],h=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[d>>>8&255]<<8|r[255&p])^e[v++],a=(r[g>>>24]<<24|r[d>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[v++],[o>>>=0,s>>>=0,h>>>=0,a>>>=0]}var Ba=[0,1,2,4,8,16,32,64,128,27,54],Pa=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var i=[],r=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,h=0,a=0;a<256;++a){var u=h^h<<1^h<<2^h<<3^h<<4;u=u>>>8^255&u^99,i[s]=u,r[u]=s;var f=t[s],l=t[f],c=t[l],d=257*t[u]^16843008*u;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*c^65537*l^257*f^16843008*s,o[0][u]=d<<24|d>>>8,o[1][u]=d<<16|d>>>16,o[2][u]=d<<8|d>>>24,o[3][u]=d,0===s?s=h=1:(s=f^t[t[t[c^f]]],h^=t[t[h]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:o}}();function Na(t){this._key=Oa(t),this._reset()}Na.blockSize=16,Na.keySize=32,Na.prototype.blockSize=Na.blockSize,Na.prototype.keySize=Na.keySize,Na.prototype._reset=function(){for(var t=this._key,e=t.length,i=e+6,r=4*(i+1),n=[],o=0;o<e;o++)n[o]=t[o];for(o=e;o<r;o++){var s=n[o-1];o%e==0?(s=s<<8|s>>>24,s=Pa.SBOX[s>>>24]<<24|Pa.SBOX[s>>>16&255]<<16|Pa.SBOX[s>>>8&255]<<8|Pa.SBOX[255&s],s^=Ba[o/e|0]<<24):e>6&&o%e==4&&(s=Pa.SBOX[s>>>24]<<24|Pa.SBOX[s>>>16&255]<<16|Pa.SBOX[s>>>8&255]<<8|Pa.SBOX[255&s]),n[o]=n[o-e]^s}for(var h=[],a=0;a<r;a++){var u=r-a,f=n[u-(a%4?0:4)];h[a]=a<4||u<=4?f:Pa.INV_SUB_MIX[0][Pa.SBOX[f>>>24]]^Pa.INV_SUB_MIX[1][Pa.SBOX[f>>>16&255]]^Pa.INV_SUB_MIX[2][Pa.SBOX[f>>>8&255]]^Pa.INV_SUB_MIX[3][Pa.SBOX[255&f]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=h},Na.prototype.encryptBlockRaw=function(t){return Ta(t=Oa(t),this._keySchedule,Pa.SUB_MIX,Pa.SBOX,this._nRounds)},Na.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),i=Ra.allocUnsafe(16);return i.writeUInt32BE(e[0],0),i.writeUInt32BE(e[1],4),i.writeUInt32BE(e[2],8),i.writeUInt32BE(e[3],12),i},Na.prototype.decryptBlock=function(t){var e=(t=Oa(t))[1];t[1]=t[3],t[3]=e;var i=Ta(t,this._invKeySchedule,Pa.INV_SUB_MIX,Pa.INV_SBOX,this._nRounds),r=Ra.allocUnsafe(16);return r.writeUInt32BE(i[0],0),r.writeUInt32BE(i[3],4),r.writeUInt32BE(i[2],8),r.writeUInt32BE(i[1],12),r},Na.prototype.scrub=function(){Ia(this._keySchedule),Ia(this._invKeySchedule),Ia(this._key)},ka.AES=Na;var xa=de.Buffer,La=xa.alloc(16,0);function Da(t){var e=xa.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function Ca(t){this.h=t,this.state=xa.alloc(16,0),this.cache=xa.allocUnsafe(0)}Ca.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},Ca.prototype._multiply=function(){for(var t,e,i,r=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],n=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),i=0!=(1&r[3]),e=3;e>0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=Da(n)},Ca.prototype.update=function(t){var e;for(this.cache=xa.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},Ca.prototype.final=function(t,e){return this.cache.length&&this.ghash(xa.concat([this.cache,La],16)),this.ghash(Da([0,t,0,e])),this.state};var ja=Ca,Ua=ka,qa=de.Buffer,za=us,Fa=ja,Ha=$h,Ka=ga;function Ga(t,e,i,r){za.call(this);var n=qa.alloc(4,0);this._cipher=new Ua.AES(e);var o=this._cipher.encryptBlock(n);this._ghash=new Fa(o),i=function(t,e,i){if(12===e.length)return t._finID=qa.concat([e,qa.from([0,0,0,1])]),qa.concat([e,qa.from([0,0,0,2])]);var r=new Fa(i),n=e.length,o=n%16;r.update(e),o&&(o=16-o,r.update(qa.alloc(o,0))),r.update(qa.alloc(8,0));var s=8*n,h=qa.alloc(8);h.writeUIntBE(s,0,8),r.update(h),t._finID=r.state;var a=qa.from(t._finID);return Ka(a),a}(this,i,o),this._prev=qa.from(i),this._cache=qa.allocUnsafe(0),this._secCache=qa.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}we(Ga,za),Ga.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=qa.alloc(e,0),this._ghash.update(e))}this._called=!0;var i=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(i),this._len+=t.length,i},Ga.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=Ha(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var i=0;t.length!==e.length&&i++;for(var r=Math.min(t.length,e.length),n=0;n<r;++n)i+=t[n]^e[n];return i}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},Ga.prototype.getAuthTag=function(){if(this._decrypt||!qa.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},Ga.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},Ga.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length};var Va=Ga,Ya=ka,Za=de.Buffer,Wa=us;function Xa(t,e,i,r){Wa.call(this),this._cipher=new Ya.AES(e),this._prev=Za.from(i),this._cache=Za.allocUnsafe(0),this._secCache=Za.allocUnsafe(0),this._decrypt=r,this._mode=t}we(Xa,Wa),Xa.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},Xa.prototype._final=function(){this._cipher.scrub()};var Qa=Xa,Ja=de.Buffer,$a=Pr;var tu=function(t,e,i,r){if(Ja.isBuffer(t)||(t=Ja.from(t,"binary")),e&&(Ja.isBuffer(e)||(e=Ja.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=i/8,o=Ja.alloc(n),s=Ja.alloc(r||0),h=Ja.alloc(0);n>0||r>0;){var a=new $a;a.update(h),a.update(t),e&&a.update(e),h=a.digest();var u=0;if(n>0){var f=o.length-n;u=Math.min(n,h.length),h.copy(o,f,0,u),n-=u}if(u<h.length&&r>0){var l=s.length-r,c=Math.min(r,h.length-u);h.copy(s,l,u,u+c),r-=c}}return h.fill(0),{key:o,iv:s}},eu=Aa,iu=Va,ru=de.Buffer,nu=Qa,ou=us,su=ka,hu=tu;function au(t,e,i){ou.call(this),this._cache=new fu,this._cipher=new su.AES(e),this._prev=ru.from(i),this._mode=t,this._autopadding=!0}we(au,ou),au.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get();)i=this._mode.encrypt(this,e),r.push(i);return ru.concat(r)};var uu=ru.alloc(16,16);function fu(){this.cache=ru.allocUnsafe(0)}function lu(t,e,i){var r=eu[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=ru.from(e)),e.length!==r.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof i&&(i=ru.from(i)),"GCM"!==r.mode&&i.length!==r.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===r.type?new nu(r.module,e,i):"auth"===r.type?new iu(r.module,e,i):new au(r.module,e,i)}au.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(uu))throw this._cipher.scrub(),new Error("data not multiple of block length")},au.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},fu.prototype.add=function(t){this.cache=ru.concat([this.cache,t])},fu.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},fu.prototype.flush=function(){for(var t=16-this.cache.length,e=ru.allocUnsafe(t),i=-1;++i<t;)e.writeUInt8(t,i);return ru.concat([this.cache,e])},Xh.createCipheriv=lu,Xh.createCipher=function(t,e){var i=eu[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=hu(e,!1,i.key,i.iv);return lu(t,r.key,r.iv)};var cu={},du=Va,pu=de.Buffer,mu=Aa,gu=Qa,vu=us,bu=ka,yu=tu;function wu(t,e,i){vu.call(this),this._cache=new Mu,this._last=void 0,this._cipher=new bu.AES(e),this._prev=pu.from(i),this._mode=t,this._autopadding=!0}function Mu(){this.cache=pu.allocUnsafe(0)}function _u(t,e,i){var r=mu[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=pu.from(i)),"GCM"!==r.mode&&i.length!==r.iv)throw new TypeError("invalid iv length "+i.length);if("string"==typeof e&&(e=pu.from(e)),e.length!==r.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===r.type?new gu(r.module,e,i,!0):"auth"===r.type?new du(r.module,e,i,!0):new wu(r.module,e,i)}we(wu,vu),wu.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,e),r.push(i);return pu.concat(r)},wu.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var i=-1;for(;++i<e;)if(t[i+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},wu.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},Mu.prototype.add=function(t){this.cache=pu.concat([this.cache,t])},Mu.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},Mu.prototype.flush=function(){if(this.cache.length)return this.cache},cu.createDecipher=function(t,e){var i=mu[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=yu(e,!1,i.key,i.iv);return _u(t,r.key,r.iv)},cu.createDecipheriv=_u;var Su=Xh,Eu=cu,Au=Ma;Wh.createCipher=Wh.Cipher=Su.createCipher,Wh.createCipheriv=Wh.Cipheriv=Su.createCipheriv,Wh.createDecipher=Wh.Decipher=Eu.createDecipher,Wh.createDecipheriv=Wh.Decipheriv=Eu.createDecipheriv,Wh.listCiphers=Wh.getCiphers=function(){return Object.keys(Au)};var ku={};!function(t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}}(ku);var Ru=Yh,Ou=Wh,Iu=Aa,Tu=ku,Bu=tu;function Pu(t,e,i){if(t=t.toLowerCase(),Iu[t])return Ou.createCipheriv(t,e,i);if(Tu[t])return new Ru({key:e,iv:i,mode:t});throw new TypeError("invalid suite type")}function Nu(t,e,i){if(t=t.toLowerCase(),Iu[t])return Ou.createDecipheriv(t,e,i);if(Tu[t])return new Ru({key:e,iv:i,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}dh.createCipher=dh.Cipher=function(t,e){var i,r;if(t=t.toLowerCase(),Iu[t])i=Iu[t].key,r=Iu[t].iv;else{if(!Tu[t])throw new TypeError("invalid suite type");i=8*Tu[t].key,r=Tu[t].iv}var n=Bu(e,!1,i,r);return Pu(t,n.key,n.iv)},dh.createCipheriv=dh.Cipheriv=Pu,dh.createDecipher=dh.Decipher=function(t,e){var i,r;if(t=t.toLowerCase(),Iu[t])i=Iu[t].key,r=Iu[t].iv;else{if(!Tu[t])throw new TypeError("invalid suite type");i=8*Tu[t].key,r=Tu[t].iv}var n=Bu(e,!1,i,r);return Nu(t,n.key,n.iv)},dh.createDecipheriv=dh.Decipheriv=Nu,dh.listCiphers=dh.getCiphers=function(){return Object.keys(Tu).concat(Ou.getCiphers())};var xu={},Lu={},Du={get exports(){return Lu},set exports(t){Lu=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 c(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,O=0|s[6],I=8191&O,T=O>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],j=8191&C,U=C>>>13,q=0|h[0],z=8191&q,F=q>>>13,H=0|h[1],K=8191&H,G=H>>>13,V=0|h[2],Y=8191&V,Z=V>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,ct=ft>>>13,dt=0|h[9],pt=8191&dt,mt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,z)|0))<<13)|0;u=((o=Math.imul(c,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Y)|0))<<13)|0;u=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,Y)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(c,it)|0))<<13)|0;u=((o=o+Math.imul(c,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(I,K)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,Y)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,at)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(j,z),n=(n=Math.imul(j,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(j,K),n=(n=Math.imul(j,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,Y)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(j,Y),n=(n=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,ct)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Ot=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(I,at)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var It=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(j,it),n=(n=Math.imul(j,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ct)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ct)|0;var Bt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(j,at),n=(n=Math.imul(j,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,ct)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=Ot,a[13]=It,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?d(this,t,e):r<63?c(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;h=67108863&(c=c+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,c=u,d=0;d<s;d++){var p=i[f+d],m=r[f+d],g=i[f+d+s],v=r[f+d+s],b=l*g-c*v;v=l*v+c*g,g=b,i[f+d]=p+g,r[f+d]=m+v,i[f+d+s]=p-g,r[f+d+s]=m-v,d!==h&&(b=a*l-u*c,c=a*c+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),c=i.words;c.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var d=0;d<r;d++){var p=h[d]*f[d]-a[d]*l[d];a[d]=h[d]*l[d]+a[d]*f[d],h[d]=p}return this.conjugate(h,a,r),this.transform(h,a,c,o,r,n),this.conjugate(c,o,r),this.normalize13b(c,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var c=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(o,c,l);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,c=1;0==(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(h);){for(var m=d,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(v),l=v.redSqr(),d=d.redMul(l),p=g}return c},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Du,gt);var Cu={},ju={get exports(){return Cu},set exports(t){Cu=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 c(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,O=0|s[6],I=8191&O,T=O>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],j=8191&C,U=C>>>13,q=0|h[0],z=8191&q,F=q>>>13,H=0|h[1],K=8191&H,G=H>>>13,V=0|h[2],Y=8191&V,Z=V>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,ct=ft>>>13,dt=0|h[9],pt=8191&dt,mt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,z)|0))<<13)|0;u=((o=Math.imul(c,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Y)|0))<<13)|0;u=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,Y)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(c,it)|0))<<13)|0;u=((o=o+Math.imul(c,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(I,K)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,Y)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,at)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(j,z),n=(n=Math.imul(j,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(j,K),n=(n=Math.imul(j,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,Y)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(j,Y),n=(n=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,ct)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Ot=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(I,at)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var It=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(j,it),n=(n=Math.imul(j,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ct)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ct)|0;var Bt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(j,at),n=(n=Math.imul(j,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,ct)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=Ot,a[13]=It,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?d(this,t,e):r<63?c(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;h=67108863&(c=c+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,c=u,d=0;d<s;d++){var p=i[f+d],m=r[f+d],g=i[f+d+s],v=r[f+d+s],b=l*g-c*v;v=l*v+c*g,g=b,i[f+d]=p+g,r[f+d]=m+v,i[f+d+s]=p-g,r[f+d+s]=m-v,d!==h&&(b=a*l-u*c,c=a*c+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),c=i.words;c.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var d=0;d<r;d++){var p=h[d]*f[d]-a[d]*l[d];a[d]=h[d]*l[d]+a[d]*f[d],h[d]=p}return this.conjugate(h,a,r),this.transform(h,a,c,o,r,n),this.conjugate(c,o,r),this.normalize13b(c,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var c=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(o,c,l);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,c=1;0==(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(h);){for(var m=d,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(v),l=v.redSqr(),d=d.redMul(l),p=g}return c},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(ju,gt);var Uu,qu,zu,Fu,Hu,Ku={},Gu={get exports(){return Ku},set exports(t){Ku=t}};function Vu(){if(Uu)return Ku;var t;function e(t){this.rand=t}if(Uu=1,Gu.exports=function(i){return t||(t=new e(null)),t.generate(i)},Ku.Rand=e,e.prototype.generate=function(t){return this._rand(t)},e.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),i=0;i<e.length;i++)e[i]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(e.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var i=Ag();if("function"!=typeof i.randomBytes)throw new Error("Not supported");e.prototype._rand=function(t){return i.randomBytes(t)}}catch(t){}return Ku}function Yu(){if(zu)return qu;zu=1;var t=Cu,e=Vu();function i(t){this.rand=t||new e.Rand}return qu=i,i.create=function(t){return new i(t)},i.prototype._randbelow=function(e){var i=e.bitLength(),r=Math.ceil(i/8);do{var n=new t(this.rand.generate(r))}while(n.cmp(e)>=0);return n},i.prototype._randrange=function(t,e){var i=e.sub(t);return t.add(this._randbelow(i))},i.prototype.test=function(e,i,r){var n=e.bitLength(),o=t.mont(e),s=new t(1).toRed(o);i||(i=Math.max(1,n/48|0));for(var h=e.subn(1),a=0;!h.testn(a);a++);for(var u=e.shrn(a),f=h.toRed(o);i>0;i--){var l=this._randrange(new t(2),h);r&&r(l);var c=l.toRed(o).redPow(u);if(0!==c.cmp(s)&&0!==c.cmp(f)){for(var d=1;d<a;d++){if(0===(c=c.redSqr()).cmp(s))return!1;if(0===c.cmp(f))break}if(d===a)return!1}}return!0},i.prototype.getDivisor=function(e,i){var r=e.bitLength(),n=t.mont(e),o=new t(1).toRed(n);i||(i=Math.max(1,r/48|0));for(var s=e.subn(1),h=0;!s.testn(h);h++);for(var a=e.shrn(h),u=s.toRed(n);i>0;i--){var f=this._randrange(new t(2),s),l=e.gcd(f);if(0!==l.cmpn(1))return l;var c=f.toRed(n).redPow(a);if(0!==c.cmp(o)&&0!==c.cmp(u)){for(var d=1;d<h;d++){if(0===(c=c.redSqr()).cmp(o))return c.fromRed().subn(1).gcd(e);if(0===c.cmp(u))break}if(d===h)return(c=c.redSqr()).fromRed().subn(1).gcd(e)}}return!1},qu}function Zu(){if(Hu)return Fu;Hu=1;var t=le;Fu=m,m.simpleSieve=d,m.fermatTest=p;var e=Lu,i=new e(24),r=new(Yu()),n=new e(1),o=new e(2),s=new e(5);new e(16),new e(8);var h=new e(10),a=new e(3);new e(7);var u=new e(11),f=new e(4);new e(12);var l=null;function c(){if(null!==l)return l;var t=[];t[0]=2;for(var e=1,i=3;i<1048576;i+=2){for(var r=Math.ceil(Math.sqrt(i)),n=0;n<e&&t[n]<=r&&i%t[n]!=0;n++);e!==n&&t[n]<=r||(t[e++]=i)}return l=t,t}function d(t){for(var e=c(),i=0;i<e.length;i++)if(0===t.modn(e[i]))return 0===t.cmpn(e[i]);return!0}function p(t){var i=e.mont(t);return 0===o.toRed(i).redPow(t.subn(1)).fromRed().cmpn(1)}function m(l,c){if(l<16)return new e(2===c||5===c?[140,123]:[140,39]);var m,g;for(c=new e(c);;){for(m=new e(t(Math.ceil(l/8)));m.bitLength()>l;)m.ishrn(1);if(m.isEven()&&m.iadd(n),m.testn(1)||m.iadd(o),c.cmp(o)){if(!c.cmp(s))for(;m.mod(h).cmp(a);)m.iadd(f)}else for(;m.mod(i).cmp(u);)m.iadd(f);if(d(g=m.shrn(1))&&d(m)&&p(g)&&p(m)&&r.test(g)&&r.test(m))return m}}return Fu}var Wu,Xu,Qu,Ju={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};function $u(){if(Xu)return Wu;Xu=1;var t=Lu,e=new(Yu()),i=new t(24),r=new t(11),n=new t(10),o=new t(3),s=new t(7),h=Zu(),a=le;function u(e,i){return i=i||"utf8",T.isBuffer(e)||(e=new T(e,i)),this._pub=new t(e),this}function f(e,i){return i=i||"utf8",T.isBuffer(e)||(e=new T(e,i)),this._priv=new t(e),this}Wu=c;var l={};function c(e,i,r){this.setGenerator(i),this.__prime=new t(e),this._prime=t.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=u,this.setPrivateKey=f):this._primeCode=8}function d(t,e){var i=new T(t.toArray());return e?i.toString(e):i}return Object.defineProperty(c.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,a){var u=a.toString("hex"),f=[u,t.toString(16)].join("_");if(f in l)return l[f];var c,d=0;if(t.isEven()||!h.simpleSieve||!h.fermatTest(t)||!e.test(t))return d+=1,d+="02"===u||"05"===u?8:4,l[f]=d,d;switch(e.test(t.shrn(1))||(d+=2),u){case"02":t.mod(i).cmp(r)&&(d+=8);break;case"05":(c=t.mod(n)).cmp(o)&&c.cmp(s)&&(d+=8);break;default:d+=4}return l[f]=d,d}(this.__prime,this.__gen)),this._primeCode}}),c.prototype.generateKeys=function(){return this._priv||(this._priv=new t(a(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},c.prototype.computeSecret=function(e){var i=new T((e=(e=new t(e)).toRed(this._prime)).redPow(this._priv).fromRed().toArray()),r=this.getPrime();if(i.length<r.length){var n=new T(r.length-i.length);n.fill(0),i=T.concat([n,i])}return i},c.prototype.getPublicKey=function(t){return d(this._pub,t)},c.prototype.getPrivateKey=function(t){return d(this._priv,t)},c.prototype.getPrime=function(t){return d(this.__prime,t)},c.prototype.getGenerator=function(t){return d(this._gen,t)},c.prototype.setGenerator=function(e,i){return i=i||"utf8",T.isBuffer(e)||(e=new T(e,i)),this.__gen=e,this._gen=new t(e),this},Wu}var tf={},ef={get exports(){return tf},set exports(t){tf=t}},rf={},nf={get exports(){return rf},set exports(t){rf=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+t)}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,r,n){for(var o=0,s=0,h=Math.min(t.length,r),a=e;a<h;a++){var u=t.charCodeAt(a)-48;o*=n,s=u>=49?u-49+10:u>=17?u-17+10:u,i(u>=0&&s<n,"Invalid character"),o+=s}return o}function u(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this._strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},n.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},n.prototype._move=function(t){u(t,this)},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(t){n.prototype.inspect=f}else n.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}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"],c=[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 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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i._strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);o=h>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==o||s!==this.length-1?l[6-a.length]+a+r:a+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=c[t],f=d[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(f).toString(t);r=(p=p.idivn(f)).isZero()?m+r:l[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,n),s},n.prototype._toArrayLikeLE=function(t,e){for(var i=0,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;t[i++]=255&s,i<t.length&&(t[i++]=s>>8&255),i<t.length&&(t[i++]=s>>16&255),6===o?(i<t.length&&(t[i++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i<t.length)for(t[i++]=r;i<t.length;)t[i++]=0},n.prototype._toArrayLikeBE=function(t,e){for(var i=t.length-1,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;t[i--]=255&s,i>=0&&(t[i--]=s>>8&255),i>=0&&(t[i--]=s>>16&255),6===o?(i>=0&&(t[i--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i>=0)for(t[i--]=r;i>=0;)t[i--]=0},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var m=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,O=0|s[6],I=8191&O,T=O>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],j=8191&C,U=C>>>13,q=0|h[0],z=8191&q,F=q>>>13,H=0|h[1],K=8191&H,G=H>>>13,V=0|h[2],Y=8191&V,Z=V>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,ct=ft>>>13,dt=0|h[9],pt=8191&dt,mt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,z)|0))<<13)|0;u=((o=Math.imul(c,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Y)|0))<<13)|0;u=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,Y)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(c,it)|0))<<13)|0;u=((o=o+Math.imul(c,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(I,K)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,Y)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,at)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(j,z),n=(n=Math.imul(j,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(j,K),n=(n=Math.imul(j,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,Y)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(j,Y),n=(n=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,ct)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Ot=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(I,at)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var It=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(j,it),n=(n=Math.imul(j,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ct)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ct)|0;var Bt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(j,at),n=(n=Math.imul(j,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,ct)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=Ot,a[13]=It,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function g(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;h=67108863&(c=c+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i._strip()}function v(t,e,i){return g(t,e,i)}Math.imul||(m=p),n.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?g(this,t,e):v(this,t,e)},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),v(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i("number"==typeof t),i(t<67108864);for(var r=0,n=0;n<this.length;n++){var o=(0|this.words[n])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[n]=67108863&s}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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 n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this._strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this._strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var c=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(o,c,l);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=c)}return h&&h._strip(),r._strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modrn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%t;return e?-n:n},n.prototype.modn=function(t){return this.modrn(t)},n.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,c=1;0==(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new E(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},r(w,y),w.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},w.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(M,y),r(_,y),r(S,y),S.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new M;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return b[t]=e,e},E.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(h);){for(var m=d,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(v),l=v.redSqr(),d=d.redMul(l),p=g}return c},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new A(t)},r(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(nf,gt);var of=rf,sf=le;function hf(t){var e,i=t.modulus.byteLength();do{e=new of(sf(i))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function af(t,e){var i=function(t){var e=hf(t);return{blinder:e.toRed(of.mont(t.modulus)).redPow(new of(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),r=e.modulus.byteLength(),n=new of(t).mul(i.blinder).umod(e.modulus),o=n.toRed(of.mont(e.prime1)),s=n.toRed(of.mont(e.prime2)),h=e.coefficient,a=e.prime1,u=e.prime2,f=o.redPow(e.exponent1).fromRed(),l=s.redPow(e.exponent2).fromRed(),c=f.isub(l).imul(h).umod(a).imul(u);return l.iadd(c).imul(i.unblinder).umod(e.modulus).toArrayLike(T,"be",r)}af.getr=hf;var uf=af,ff={};var lf={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}},cf={},df={},pf={get exports(){return df},set exports(t){df=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 c(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,O=0|s[6],I=8191&O,T=O>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],j=8191&C,U=C>>>13,q=0|h[0],z=8191&q,F=q>>>13,H=0|h[1],K=8191&H,G=H>>>13,V=0|h[2],Y=8191&V,Z=V>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,ct=ft>>>13,dt=0|h[9],pt=8191&dt,mt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,z)|0))<<13)|0;u=((o=Math.imul(c,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Y)|0))<<13)|0;u=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,Y)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(c,it)|0))<<13)|0;u=((o=o+Math.imul(c,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(I,K)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,Y)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,at)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(j,z),n=(n=Math.imul(j,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(j,K),n=(n=Math.imul(j,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,Y)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(j,Y),n=(n=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,ct)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Ot=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(I,at)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var It=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(j,it),n=(n=Math.imul(j,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ct)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ct)|0;var Bt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(j,at),n=(n=Math.imul(j,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,ct)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=Ot,a[13]=It,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?d(this,t,e):r<63?c(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;h=67108863&(c=c+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,c=u,d=0;d<s;d++){var p=i[f+d],m=r[f+d],g=i[f+d+s],v=r[f+d+s],b=l*g-c*v;v=l*v+c*g,g=b,i[f+d]=p+g,r[f+d]=m+v,i[f+d+s]=p-g,r[f+d+s]=m-v,d!==h&&(b=a*l-u*c,c=a*c+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),c=i.words;c.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var d=0;d<r;d++){var p=h[d]*f[d]-a[d]*l[d];a[d]=h[d]*l[d]+a[d]*f[d],h[d]=p}return this.conjugate(h,a,r),this.transform(h,a,c,o,r,n),this.conjugate(c,o,r),this.normalize13b(c,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var c=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(o,c,l);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,c=1;0==(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(h);){for(var m=d,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(v),l=v.redSqr(),d=d.redMul(l),p=g}return c},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(pf,gt);var mf={};!function(t){var e=mf;function i(t){return 1===t.length?"0"+t:t}function r(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"!=typeof t){for(var r=0;r<t.length;r++)i[r]=0|t[r];return i}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(r=0;r<t.length;r+=2)i.push(parseInt(t[r]+t[r+1],16))}else for(r=0;r<t.length;r++){var n=t.charCodeAt(r),o=n>>8,s=255&n;o?i.push(o,s):i.push(s)}return i},e.zero2=i,e.toHex=r,e.encode=function(t,e){return"hex"===e?r(t):t}}(),function(t){var e=cf,i=df,r=yh,n=mf;e.assert=r,e.toArray=n.toArray,e.zero2=n.zero2,e.toHex=n.toHex,e.encode=n.encode,e.getNAF=function(t,e,i){var r=new Array(Math.max(t.bitLength(),i)+1);r.fill(0);for(var n=1<<e+1,o=t.clone(),s=0;s<r.length;s++){var h,a=o.andln(n-1);o.isOdd()?(h=a>(n>>1)-1?(n>>1)-a:a,o.isubn(h)):h=0,r[s]=h,o.iushrn(1)}return r},e.getJSF=function(t,e){var i=[[],[]];t=t.clone(),e=e.clone();for(var r,n=0,o=0;t.cmpn(-n)>0||e.cmpn(-o)>0;){var s,h,a=t.andln(3)+n&3,u=e.andln(3)+o&3;3===a&&(a=-1),3===u&&(u=-1),s=0==(1&a)?0:3!==(r=t.andln(7)+n&7)&&5!==r||2!==u?a:-a,i[0].push(s),h=0==(1&u)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==a?u:-u,i[1].push(h),2*n===s+1&&(n=1-n),2*o===h+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return i},e.cachedProperty=function(t,e,i){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(t){return new i(t,"hex","le")}}();var gf={},vf=df,bf=cf,yf=bf.getNAF,wf=bf.getJSF,Mf=bf.assert;function _f(t,e){this.type=t,this.p=new vf(e.p,16),this.red=e.prime?vf.red(e.prime):vf.mont(this.p),this.zero=new vf(0).toRed(this.red),this.one=new vf(1).toRed(this.red),this.two=new vf(2).toRed(this.red),this.n=e.n&&new vf(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Sf=_f;function Ef(t,e){this.curve=t,this.type=e,this.precomputed=null}_f.prototype.point=function(){throw new Error("Not implemented")},_f.prototype.validate=function(){throw new Error("Not implemented")},_f.prototype._fixedNafMul=function(t,e){Mf(t.precomputed);var i=t._getDoubles(),r=yf(e,1,this._bitLength),n=(1<<i.step+1)-(i.step%2==0?2:1);n/=3;var o,s,h=[];for(o=0;o<r.length;o+=i.step){s=0;for(var a=o+i.step-1;a>=o;a--)s=(s<<1)+r[a];h.push(s)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=n;l>0;l--){for(o=0;o<h.length;o++)(s=h[o])===l?f=f.mixedAdd(i.points[o]):s===-l&&(f=f.mixedAdd(i.points[o].neg()));u=u.add(f)}return u.toP()},_f.prototype._wnafMul=function(t,e){var i=4,r=t._getNAFPoints(i);i=r.wnd;for(var n=r.points,o=yf(e,i,this._bitLength),s=this.jpoint(null,null,null),h=o.length-1;h>=0;h--){for(var a=0;h>=0&&0===o[h];h--)a++;if(h>=0&&a++,s=s.dblp(a),h<0)break;var u=o[h];Mf(0!==u),s="affine"===t.type?u>0?s.mixedAdd(n[u-1>>1]):s.mixedAdd(n[-u-1>>1].neg()):u>0?s.add(n[u-1>>1]):s.add(n[-u-1>>1].neg())}return"affine"===t.type?s.toP():s},_f.prototype._wnafMulAdd=function(t,e,i,r,n){var o,s,h,a=this._wnafT1,u=this._wnafT2,f=this._wnafT3,l=0;for(o=0;o<r;o++){var c=(h=e[o])._getNAFPoints(t);a[o]=c.wnd,u[o]=c.points}for(o=r-1;o>=1;o-=2){var d=o-1,p=o;if(1===a[d]&&1===a[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=wf(i[d],i[p]);for(l=Math.max(v[0].length,l),f[d]=new Array(l),f[p]=new Array(l),s=0;s<l;s++){var b=0|v[0][s],y=0|v[1][s];f[d][s]=g[3*(b+1)+(y+1)],f[p][s]=0,u[d]=m}}else f[d]=yf(i[d],a[d],this._bitLength),f[p]=yf(i[p],a[p],this._bitLength),l=Math.max(f[d].length,l),l=Math.max(f[p].length,l)}var w=this.jpoint(null,null,null),M=this._wnafT4;for(o=l;o>=0;o--){for(var _=0;o>=0;){var S=!0;for(s=0;s<r;s++)M[s]=0|f[s][o],0!==M[s]&&(S=!1);if(!S)break;_++,o--}if(o>=0&&_++,w=w.dblp(_),o<0)break;for(s=0;s<r;s++){var E=M[s];0!==E&&(E>0?h=u[s][E-1>>1]:E<0&&(h=u[s][-E-1>>1].neg()),w="affine"===h.type?w.mixedAdd(h):w.add(h))}}for(o=0;o<r;o++)u[o]=null;return n?w:w.toP()},_f.BasePoint=Ef,Ef.prototype.eq=function(){throw new Error("Not implemented")},Ef.prototype.validate=function(){return this.curve.validate(this)},_f.prototype.decodePoint=function(t,e){t=bf.toArray(t,e);var i=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*i)return 6===t[0]?Mf(t[t.length-1]%2==0):7===t[0]&&Mf(t[t.length-1]%2==1),this.point(t.slice(1,1+i),t.slice(1+i,1+2*i));if((2===t[0]||3===t[0])&&t.length-1===i)return this.pointFromX(t.slice(1,1+i),3===t[0]);throw new Error("Unknown point format")},Ef.prototype.encodeCompressed=function(t){return this.encode(t,!0)},Ef.prototype._encode=function(t){var e=this.curve.p.byteLength(),i=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",e))},Ef.prototype.encode=function(t,e){return bf.encode(this._encode(e),t)},Ef.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},Ef.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},Ef.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n<e;n+=t){for(var o=0;o<t;o++)r=r.dbl();i.push(r)}return{step:t,points:i}},Ef.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],i=(1<<t)-1,r=1===i?null:this.dbl(),n=1;n<i;n++)e[n]=e[n-1].add(r);return{wnd:t,points:e}},Ef.prototype._getBeta=function(){return null},Ef.prototype.dblp=function(t){for(var e=this,i=0;i<t;i++)e=e.dbl();return e};var Af=df,kf=we,Rf=Sf,Of=cf.assert;function If(t){Rf.call(this,"short",t),this.a=new Af(t.a,16).toRed(this.red),this.b=new Af(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}kf(If,Rf);var Tf=If;function Bf(t,e,i,r){Rf.BasePoint.call(this,t,"affine"),null===e&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new Af(e,16),this.y=new Af(i,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Pf(t,e,i,r){Rf.BasePoint.call(this,t,"jacobian"),null===e&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Af(0)):(this.x=new Af(e,16),this.y=new Af(i,16),this.z=new Af(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}If.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,i;if(t.beta)e=new Af(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=(e=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(t.lambda)i=new Af(t.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(e))?i=n[0]:(i=n[1],Of(0===this.g.mul(i).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:i,basis:t.basis?t.basis.map((function(t){return{a:new Af(t.a,16),b:new Af(t.b,16)}})):this._getEndoBasis(i)}}},If.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:Af.mont(t),i=new Af(2).toRed(e).redInvm(),r=i.redNeg(),n=new Af(3).toRed(e).redNeg().redSqrt().redMul(i);return[r.redAdd(n).fromRed(),r.redSub(n).fromRed()]},If.prototype._getEndoBasis=function(t){for(var e,i,r,n,o,s,h,a,u,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,c=this.n.clone(),d=new Af(1),p=new Af(0),m=new Af(0),g=new Af(1),v=0;0!==l.cmpn(0);){var b=c.div(l);a=c.sub(b.mul(l)),u=m.sub(b.mul(d));var y=g.sub(b.mul(p));if(!r&&a.cmp(f)<0)e=h.neg(),i=d,r=a.neg(),n=u;else if(r&&2==++v)break;h=a,c=l,l=a,m=d,d=u,g=p,p=y}o=a.neg(),s=u;var w=r.sqr().add(n.sqr());return o.sqr().add(s.sqr()).cmp(w)>=0&&(o=e,s=i),r.negative&&(r=r.neg(),n=n.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:r,b:n},{a:o,b:s}]},If.prototype._endoSplit=function(t){var e=this.endo.basis,i=e[0],r=e[1],n=r.b.mul(t).divRound(this.n),o=i.b.neg().mul(t).divRound(this.n),s=n.mul(i.a),h=o.mul(r.a),a=n.mul(i.b),u=o.mul(r.b);return{k1:t.sub(s).sub(h),k2:a.add(u).neg()}},If.prototype.pointFromX=function(t,e){(t=new Af(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var n=r.fromRed().isOdd();return(e&&!n||!e&&n)&&(r=r.redNeg()),this.point(t,r)},If.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,i=t.y,r=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},If.prototype._endoWnafMulAdd=function(t,e,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),h=t[o],a=h._getBeta();s.k1.negative&&(s.k1.ineg(),h=h.neg(!0)),s.k2.negative&&(s.k2.ineg(),a=a.neg(!0)),r[2*o]=h,r[2*o+1]=a,n[2*o]=s.k1,n[2*o+1]=s.k2}for(var u=this._wnafMulAdd(1,r,n,2*o,i),f=0;f<2*o;f++)r[f]=null,n[f]=null;return u},kf(Bf,Rf.BasePoint),If.prototype.point=function(t,e,i){return new Bf(this,t,e,i)},If.prototype.pointFromJSON=function(t,e){return Bf.fromJSON(this,t,e)},Bf.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var i=this.curve,r=function(t){return i.point(t.x.redMul(i.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e}},Bf.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Bf.fromJSON=function(t,e,i){"string"==typeof e&&(e=JSON.parse(e));var r=t.point(e[0],e[1],i);if(!e[2])return r;function n(e){return t.point(e[0],e[1],i)}var o=e[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(n))}},r},Bf.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Bf.prototype.isInfinity=function(){return this.inf},Bf.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var i=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},Bf.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,i=this.x.redSqr(),r=t.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(e).redMul(r),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},Bf.prototype.getX=function(){return this.x.fromRed()},Bf.prototype.getY=function(){return this.y.fromRed()},Bf.prototype.mul=function(t){return t=new Af(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},Bf.prototype.mulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},Bf.prototype.jmulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},Bf.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},Bf.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,r=function(t){return t.neg()};e.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return e},Bf.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},kf(Pf,Rf.BasePoint),If.prototype.jpoint=function(t,e,i){return new Pf(this,t,e,i)},Pf.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),i=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(i,r)},Pf.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Pf.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(e),n=t.x.redMul(i),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(i.redMul(this.z)),h=r.redSub(n),a=o.redSub(s);if(0===h.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=h.redSqr(),f=u.redMul(h),l=r.redMul(u),c=a.redSqr().redIAdd(f).redISub(l).redISub(l),d=a.redMul(l.redISub(c)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(h);return this.curve.jpoint(c,d,p)},Pf.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),i=this.x,r=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),s=i.redSub(r),h=n.redSub(o);if(0===s.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var a=s.redSqr(),u=a.redMul(s),f=i.redMul(a),l=h.redSqr().redIAdd(u).redISub(f).redISub(f),c=h.redMul(f.redISub(l)).redISub(n.redMul(u)),d=this.z.redMul(s);return this.curve.jpoint(l,c,d)},Pf.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var i=this;for(e=0;e<t;e++)i=i.dbl();return i}var r=this.curve.a,n=this.curve.tinv,o=this.x,s=this.y,h=this.z,a=h.redSqr().redSqr(),u=s.redAdd(s);for(e=0;e<t;e++){var f=o.redSqr(),l=u.redSqr(),c=l.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(r.redMul(a)),p=o.redMul(l),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=d.redMul(g);v=v.redIAdd(v).redISub(c);var b=u.redMul(h);e+1<t&&(a=a.redMul(c)),o=m,h=b,u=v}return this.curve.jpoint(o,u.redMul(n),h)},Pf.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Pf.prototype._zeroDbl=function(){var t,e,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var h=r.redAdd(r).redIAdd(r),a=h.redSqr().redISub(s).redISub(s),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=a,e=h.redMul(s.redISub(a)).redISub(u),i=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),c=l.redSqr(),d=this.x.redAdd(l).redSqr().redISub(f).redISub(c);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=c.redIAdd(c);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(g),i=(i=this.y.redMul(this.z)).redIAdd(i)}return this.curve.jpoint(t,e,i)},Pf.prototype._threeDbl=function(){var t,e,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var h=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),a=h.redSqr().redISub(s).redISub(s);t=a;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=h.redMul(s.redISub(a)).redISub(u),i=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),c=this.x.redMul(l),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=c.redIAdd(c),m=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(m),i=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=d.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,i)},Pf.prototype._dbl=function(){var t=this.curve.a,e=this.x,i=this.y,r=this.z,n=r.redSqr().redSqr(),o=e.redSqr(),s=i.redSqr(),h=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(n)),a=e.redAdd(e),u=(a=a.redIAdd(a)).redMul(s),f=h.redSqr().redISub(u.redAdd(u)),l=u.redISub(f),c=s.redSqr();c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=h.redMul(l).redISub(c),p=i.redAdd(i).redMul(r);return this.curve.jpoint(f,d,p)},Pf.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),i=this.z.redSqr(),r=e.redSqr(),n=t.redAdd(t).redIAdd(t),o=n.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(r),h=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),a=r.redIAdd(r);a=(a=(a=a.redIAdd(a)).redIAdd(a)).redIAdd(a);var u=n.redIAdd(s).redSqr().redISub(o).redISub(h).redISub(a),f=e.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(h).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var c=this.y.redMul(u.redMul(a.redISub(u)).redISub(s.redMul(h)));c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=this.z.redAdd(s).redSqr().redISub(i).redISub(h);return this.curve.jpoint(l,c,d)},Pf.prototype.mul=function(t,e){return t=new Af(t,e),this.curve._wnafMul(this,t)},Pf.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),i=t.z.redSqr();if(0!==this.x.redMul(i).redISub(t.x.redMul(e)).cmpn(0))return!1;var r=e.redMul(this.z),n=i.redMul(t.z);return 0===this.y.redMul(n).redISub(t.y.redMul(r)).cmpn(0)},Pf.prototype.eqXToP=function(t){var e=this.z.redSqr(),i=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(i))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},Pf.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Pf.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Nf=df,xf=we,Lf=Sf,Df=cf;function Cf(t){Lf.call(this,"mont",t),this.a=new Nf(t.a,16).toRed(this.red),this.b=new Nf(t.b,16).toRed(this.red),this.i4=new Nf(4).toRed(this.red).redInvm(),this.two=new Nf(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}xf(Cf,Lf);var jf=Cf;function Uf(t,e,i){Lf.BasePoint.call(this,t,"projective"),null===e&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Nf(e,16),this.z=new Nf(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Cf.prototype.validate=function(t){var e=t.normalize().x,i=e.redSqr(),r=i.redMul(e).redAdd(i.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},xf(Uf,Lf.BasePoint),Cf.prototype.decodePoint=function(t,e){return this.point(Df.toArray(t,e),1)},Cf.prototype.point=function(t,e){return new Uf(this,t,e)},Cf.prototype.pointFromJSON=function(t){return Uf.fromJSON(this,t)},Uf.prototype.precompute=function(){},Uf.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},Uf.fromJSON=function(t,e){return new Uf(t,e[0],e[1]||t.one)},Uf.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},Uf.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Uf.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),i=t.redSub(e),r=t.redMul(e),n=i.redMul(e.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},Uf.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},Uf.prototype.diffAdd=function(t,e){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(i),s=n.redMul(r),h=e.z.redMul(o.redAdd(s).redSqr()),a=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(h,a)},Uf.prototype.mul=function(t){for(var e=t.clone(),i=this,r=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},Uf.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},Uf.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},Uf.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},Uf.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},Uf.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var qf=df,zf=we,Ff=Sf,Hf=cf.assert;function Kf(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,Ff.call(this,"edwards",t),this.a=new qf(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new qf(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new qf(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Hf(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}zf(Kf,Ff);var Gf=Kf;function Vf(t,e,i,r,n){Ff.BasePoint.call(this,t,"projective"),null===e&&null===i&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new qf(e,16),this.y=new qf(i,16),this.z=r?new qf(r,16):this.curve.one,this.t=n&&new qf(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}Kf.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},Kf.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},Kf.prototype.jpoint=function(t,e,i,r){return this.point(t,e,i,r)},Kf.prototype.pointFromX=function(t,e){(t=new qf(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr(),r=this.c2.redSub(this.a.redMul(i)),n=this.one.redSub(this.c2.redMul(this.d).redMul(i)),o=r.redMul(n.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var h=s.fromRed().isOdd();return(e&&!h||!e&&h)&&(s=s.redNeg()),this.point(t,s)},Kf.prototype.pointFromY=function(t,e){(t=new qf(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr(),r=i.redSub(this.c2),n=i.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(n.redInvm());if(0===o.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},Kf.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),i=t.y.redSqr(),r=e.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(i)));return 0===r.cmp(n)},zf(Vf,Ff.BasePoint),Kf.prototype.pointFromJSON=function(t){return Vf.fromJSON(this,t)},Kf.prototype.point=function(t,e,i,r){return new Vf(this,t,e,i,r)},Vf.fromJSON=function(t,e){return new Vf(t,e[0],e[1],e[2])},Vf.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},Vf.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},Vf.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=r.redAdd(e),s=o.redSub(i),h=r.redSub(e),a=n.redMul(s),u=o.redMul(h),f=n.redMul(h),l=s.redMul(o);return this.curve.point(a,u,l,f)},Vf.prototype._projDbl=function(){var t,e,i,r,n,o,s=this.x.redAdd(this.y).redSqr(),h=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(h)).redAdd(a);this.zOne?(t=s.redSub(h).redSub(a).redMul(u.redSub(this.curve.two)),e=u.redMul(r.redSub(a)),i=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),o=u.redSub(n).redISub(n),t=s.redSub(h).redISub(a).redMul(o),e=u.redMul(r.redSub(a)),i=u.redMul(o))}else r=h.redAdd(a),n=this.curve._mulC(this.z).redSqr(),o=r.redSub(n).redSub(n),t=this.curve._mulC(s.redISub(r)).redMul(o),e=this.curve._mulC(r).redMul(h.redISub(a)),i=r.redMul(o);return this.curve.point(t,e,i)},Vf.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},Vf.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),o=i.redSub(e),s=n.redSub(r),h=n.redAdd(r),a=i.redAdd(e),u=o.redMul(s),f=h.redMul(a),l=o.redMul(a),c=s.redMul(h);return this.curve.point(u,f,c,l)},Vf.prototype._projAdd=function(t){var e,i,r=this.z.redMul(t.z),n=r.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),h=this.curve.d.redMul(o).redMul(s),a=n.redSub(h),u=n.redAdd(h),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),l=r.redMul(a).redMul(f);return this.curve.twisted?(e=r.redMul(u).redMul(s.redSub(this.curve._mulA(o))),i=a.redMul(u)):(e=r.redMul(u).redMul(s.redSub(o)),i=this.curve._mulC(a).redMul(u)),this.curve.point(l,e,i)},Vf.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},Vf.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},Vf.prototype.mulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!1)},Vf.prototype.jmulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!0)},Vf.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},Vf.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},Vf.prototype.getX=function(){return this.normalize(),this.x.fromRed()},Vf.prototype.getY=function(){return this.normalize(),this.y.fromRed()},Vf.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},Vf.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var i=t.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},Vf.prototype.toP=Vf.prototype.normalize,Vf.prototype.mixedAdd=Vf.prototype.add,function(t){var e=t;e.base=Sf,e.short=Tf,e.mont=jf,e.edwards=Gf}(gf);var Yf={},Zf={},Wf={},Xf=yh,Qf=we;function Jf(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function $f(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function tl(t){return 1===t.length?"0"+t:t}function el(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}Wf.inherits=Qf,Wf.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)i.push(parseInt(t[n]+t[n+1],16))}else for(var r=0,n=0;n<t.length;n++){var o=t.charCodeAt(n);o<128?i[r++]=o:o<2048?(i[r++]=o>>6|192,i[r++]=63&o|128):Jf(t,n)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++n)),i[r++]=o>>18|240,i[r++]=o>>12&63|128,i[r++]=o>>6&63|128,i[r++]=63&o|128):(i[r++]=o>>12|224,i[r++]=o>>6&63|128,i[r++]=63&o|128)}else for(n=0;n<t.length;n++)i[n]=0|t[n];return i},Wf.toHex=function(t){for(var e="",i=0;i<t.length;i++)e+=tl(t[i].toString(16));return e},Wf.htonl=$f,Wf.toHex32=function(t,e){for(var i="",r=0;r<t.length;r++){var n=t[r];"little"===e&&(n=$f(n)),i+=el(n.toString(16))}return i},Wf.zero2=tl,Wf.zero8=el,Wf.join32=function(t,e,i,r){var n=i-e;Xf(n%4==0);for(var o=new Array(n/4),s=0,h=e;s<o.length;s++,h+=4){var a;a="big"===r?t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3]:t[h+3]<<24|t[h+2]<<16|t[h+1]<<8|t[h],o[s]=a>>>0}return o},Wf.split32=function(t,e){for(var i=new Array(4*t.length),r=0,n=0;r<t.length;r++,n+=4){var o=t[r];"big"===e?(i[n]=o>>>24,i[n+1]=o>>>16&255,i[n+2]=o>>>8&255,i[n+3]=255&o):(i[n+3]=o>>>24,i[n+2]=o>>>16&255,i[n+1]=o>>>8&255,i[n]=255&o)}return i},Wf.rotr32=function(t,e){return t>>>e|t<<32-e},Wf.rotl32=function(t,e){return t<<e|t>>>32-e},Wf.sum32=function(t,e){return t+e>>>0},Wf.sum32_3=function(t,e,i){return t+e+i>>>0},Wf.sum32_4=function(t,e,i,r){return t+e+i+r>>>0},Wf.sum32_5=function(t,e,i,r,n){return t+e+i+r+n>>>0},Wf.sum64=function(t,e,i,r){var n=t[e],o=r+t[e+1]>>>0,s=(o<r?1:0)+i+n;t[e]=s>>>0,t[e+1]=o},Wf.sum64_hi=function(t,e,i,r){return(e+r>>>0<e?1:0)+t+i>>>0},Wf.sum64_lo=function(t,e,i,r){return e+r>>>0},Wf.sum64_4_hi=function(t,e,i,r,n,o,s,h){var a=0,u=e;return a+=(u=u+r>>>0)<e?1:0,a+=(u=u+o>>>0)<o?1:0,t+i+n+s+(a+=(u=u+h>>>0)<h?1:0)>>>0},Wf.sum64_4_lo=function(t,e,i,r,n,o,s,h){return e+r+o+h>>>0},Wf.sum64_5_hi=function(t,e,i,r,n,o,s,h,a,u){var f=0,l=e;return f+=(l=l+r>>>0)<e?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+h>>>0)<h?1:0,t+i+n+s+a+(f+=(l=l+u>>>0)<u?1:0)>>>0},Wf.sum64_5_lo=function(t,e,i,r,n,o,s,h,a,u){return e+r+o+h+u>>>0},Wf.rotr64_hi=function(t,e,i){return(e<<32-i|t>>>i)>>>0},Wf.rotr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0},Wf.shr64_hi=function(t,e,i){return t>>>i},Wf.shr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0};var il={},rl=Wf,nl=yh;function ol(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}il.BlockHash=ol,ol.prototype.update=function(t,e){if(t=rl.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var i=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-i,t.length),0===this.pending.length&&(this.pending=null),t=rl.join32(t,0,t.length-i,this.endian);for(var r=0;r<t.length;r+=this._delta32)this._update(t,r,r+this._delta32)}return this},ol.prototype.digest=function(t){return this.update(this._pad()),nl(null===this.pending),this._digest(t)},ol.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,i=e-(t+this.padLength)%e,r=new Array(i+this.padLength);r[0]=128;for(var n=1;n<i;n++)r[n]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[n++]=0;r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=t>>>24&255,r[n++]=t>>>16&255,r[n++]=t>>>8&255,r[n++]=255&t}else for(r[n++]=255&t,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n++]=t>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,o=8;o<this.padLength;o++)r[n++]=0;return r};var sl={},hl={},al=Wf.rotr32;function ul(t,e,i){return t&e^~t&i}function fl(t,e,i){return t&e^t&i^e&i}function ll(t,e,i){return t^e^i}hl.ft_1=function(t,e,i,r){return 0===t?ul(e,i,r):1===t||3===t?ll(e,i,r):2===t?fl(e,i,r):void 0},hl.ch32=ul,hl.maj32=fl,hl.p32=ll,hl.s0_256=function(t){return al(t,2)^al(t,13)^al(t,22)},hl.s1_256=function(t){return al(t,6)^al(t,11)^al(t,25)},hl.g0_256=function(t){return al(t,7)^al(t,18)^t>>>3},hl.g1_256=function(t){return al(t,17)^al(t,19)^t>>>10};var cl=Wf,dl=il,pl=hl,ml=cl.rotl32,gl=cl.sum32,vl=cl.sum32_5,bl=pl.ft_1,yl=dl.BlockHash,wl=[1518500249,1859775393,2400959708,3395469782];function Ml(){if(!(this instanceof Ml))return new Ml;yl.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}cl.inherits(Ml,yl);var _l=Ml;Ml.blockSize=512,Ml.outSize=160,Ml.hmacStrength=80,Ml.padLength=64,Ml.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;r<i.length;r++)i[r]=ml(i[r-3]^i[r-8]^i[r-14]^i[r-16],1);var n=this.h[0],o=this.h[1],s=this.h[2],h=this.h[3],a=this.h[4];for(r=0;r<i.length;r++){var u=~~(r/20),f=vl(ml(n,5),bl(u,o,s,h),a,i[r],wl[u]);a=h,h=s,s=ml(o,30),o=n,n=f}this.h[0]=gl(this.h[0],n),this.h[1]=gl(this.h[1],o),this.h[2]=gl(this.h[2],s),this.h[3]=gl(this.h[3],h),this.h[4]=gl(this.h[4],a)},Ml.prototype._digest=function(t){return"hex"===t?cl.toHex32(this.h,"big"):cl.split32(this.h,"big")};var Sl=Wf,El=il,Al=hl,kl=yh,Rl=Sl.sum32,Ol=Sl.sum32_4,Il=Sl.sum32_5,Tl=Al.ch32,Bl=Al.maj32,Pl=Al.s0_256,Nl=Al.s1_256,xl=Al.g0_256,Ll=Al.g1_256,Dl=El.BlockHash,Cl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function jl(){if(!(this instanceof jl))return new jl;Dl.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Cl,this.W=new Array(64)}Sl.inherits(jl,Dl);var Ul=jl;jl.blockSize=512,jl.outSize=256,jl.hmacStrength=192,jl.padLength=64,jl.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;r<i.length;r++)i[r]=Ol(Ll(i[r-2]),i[r-7],xl(i[r-15]),i[r-16]);var n=this.h[0],o=this.h[1],s=this.h[2],h=this.h[3],a=this.h[4],u=this.h[5],f=this.h[6],l=this.h[7];for(kl(this.k.length===i.length),r=0;r<i.length;r++){var c=Il(l,Nl(a),Tl(a,u,f),this.k[r],i[r]),d=Rl(Pl(n),Bl(n,o,s));l=f,f=u,u=a,a=Rl(h,c),h=s,s=o,o=n,n=Rl(c,d)}this.h[0]=Rl(this.h[0],n),this.h[1]=Rl(this.h[1],o),this.h[2]=Rl(this.h[2],s),this.h[3]=Rl(this.h[3],h),this.h[4]=Rl(this.h[4],a),this.h[5]=Rl(this.h[5],u),this.h[6]=Rl(this.h[6],f),this.h[7]=Rl(this.h[7],l)},jl.prototype._digest=function(t){return"hex"===t?Sl.toHex32(this.h,"big"):Sl.split32(this.h,"big")};var ql=Wf,zl=Ul;function Fl(){if(!(this instanceof Fl))return new Fl;zl.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}ql.inherits(Fl,zl);var Hl=Fl;Fl.blockSize=512,Fl.outSize=224,Fl.hmacStrength=192,Fl.padLength=64,Fl.prototype._digest=function(t){return"hex"===t?ql.toHex32(this.h.slice(0,7),"big"):ql.split32(this.h.slice(0,7),"big")};var Kl=Wf,Gl=il,Vl=yh,Yl=Kl.rotr64_hi,Zl=Kl.rotr64_lo,Wl=Kl.shr64_hi,Xl=Kl.shr64_lo,Ql=Kl.sum64,Jl=Kl.sum64_hi,$l=Kl.sum64_lo,tc=Kl.sum64_4_hi,ec=Kl.sum64_4_lo,ic=Kl.sum64_5_hi,rc=Kl.sum64_5_lo,nc=Gl.BlockHash,oc=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function sc(){if(!(this instanceof sc))return new sc;nc.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=oc,this.W=new Array(160)}Kl.inherits(sc,nc);var hc=sc;function ac(t,e,i,r,n){var o=t&i^~t&n;return o<0&&(o+=4294967296),o}function uc(t,e,i,r,n,o){var s=e&r^~e&o;return s<0&&(s+=4294967296),s}function fc(t,e,i,r,n){var o=t&i^t&n^i&n;return o<0&&(o+=4294967296),o}function lc(t,e,i,r,n,o){var s=e&r^e&o^r&o;return s<0&&(s+=4294967296),s}function cc(t,e){var i=Yl(t,e,28)^Yl(e,t,2)^Yl(e,t,7);return i<0&&(i+=4294967296),i}function dc(t,e){var i=Zl(t,e,28)^Zl(e,t,2)^Zl(e,t,7);return i<0&&(i+=4294967296),i}function pc(t,e){var i=Yl(t,e,14)^Yl(t,e,18)^Yl(e,t,9);return i<0&&(i+=4294967296),i}function mc(t,e){var i=Zl(t,e,14)^Zl(t,e,18)^Zl(e,t,9);return i<0&&(i+=4294967296),i}function gc(t,e){var i=Yl(t,e,1)^Yl(t,e,8)^Wl(t,e,7);return i<0&&(i+=4294967296),i}function vc(t,e){var i=Zl(t,e,1)^Zl(t,e,8)^Xl(t,e,7);return i<0&&(i+=4294967296),i}function bc(t,e){var i=Yl(t,e,19)^Yl(e,t,29)^Wl(t,e,6);return i<0&&(i+=4294967296),i}function yc(t,e){var i=Zl(t,e,19)^Zl(e,t,29)^Xl(t,e,6);return i<0&&(i+=4294967296),i}sc.blockSize=1024,sc.outSize=512,sc.hmacStrength=192,sc.padLength=128,sc.prototype._prepareBlock=function(t,e){for(var i=this.W,r=0;r<32;r++)i[r]=t[e+r];for(;r<i.length;r+=2){var n=bc(i[r-4],i[r-3]),o=yc(i[r-4],i[r-3]),s=i[r-14],h=i[r-13],a=gc(i[r-30],i[r-29]),u=vc(i[r-30],i[r-29]),f=i[r-32],l=i[r-31];i[r]=tc(n,o,s,h,a,u,f,l),i[r+1]=ec(n,o,s,h,a,u,f,l)}},sc.prototype._update=function(t,e){this._prepareBlock(t,e);var i=this.W,r=this.h[0],n=this.h[1],o=this.h[2],s=this.h[3],h=this.h[4],a=this.h[5],u=this.h[6],f=this.h[7],l=this.h[8],c=this.h[9],d=this.h[10],p=this.h[11],m=this.h[12],g=this.h[13],v=this.h[14],b=this.h[15];Vl(this.k.length===i.length);for(var y=0;y<i.length;y+=2){var w=v,M=b,_=pc(l,c),S=mc(l,c),E=ac(l,c,d,p,m),A=uc(l,c,d,p,m,g),k=this.k[y],R=this.k[y+1],O=i[y],I=i[y+1],T=ic(w,M,_,S,E,A,k,R,O,I),B=rc(w,M,_,S,E,A,k,R,O,I);w=cc(r,n),M=dc(r,n),_=fc(r,n,o,s,h),S=lc(r,n,o,s,h,a);var P=Jl(w,M,_,S),N=$l(w,M,_,S);v=m,b=g,m=d,g=p,d=l,p=c,l=Jl(u,f,T,B),c=$l(f,f,T,B),u=h,f=a,h=o,a=s,o=r,s=n,r=Jl(T,B,P,N),n=$l(T,B,P,N)}Ql(this.h,0,r,n),Ql(this.h,2,o,s),Ql(this.h,4,h,a),Ql(this.h,6,u,f),Ql(this.h,8,l,c),Ql(this.h,10,d,p),Ql(this.h,12,m,g),Ql(this.h,14,v,b)},sc.prototype._digest=function(t){return"hex"===t?Kl.toHex32(this.h,"big"):Kl.split32(this.h,"big")};var wc=Wf,Mc=hc;function _c(){if(!(this instanceof _c))return new _c;Mc.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}wc.inherits(_c,Mc);var Sc=_c;_c.blockSize=1024,_c.outSize=384,_c.hmacStrength=192,_c.padLength=128,_c.prototype._digest=function(t){return"hex"===t?wc.toHex32(this.h.slice(0,12),"big"):wc.split32(this.h.slice(0,12),"big")},sl.sha1=_l,sl.sha224=Hl,sl.sha256=Ul,sl.sha384=Sc,sl.sha512=hc;var Ec={},Ac=Wf,kc=il,Rc=Ac.rotl32,Oc=Ac.sum32,Ic=Ac.sum32_3,Tc=Ac.sum32_4,Bc=kc.BlockHash;function Pc(){if(!(this instanceof Pc))return new Pc;Bc.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Nc(t,e,i,r){return t<=15?e^i^r:t<=31?e&i|~e&r:t<=47?(e|~i)^r:t<=63?e&r|i&~r:e^(i|~r)}function xc(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function Lc(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}Ac.inherits(Pc,Bc),Ec.ripemd160=Pc,Pc.blockSize=512,Pc.outSize=160,Pc.hmacStrength=192,Pc.padLength=64,Pc.prototype._update=function(t,e){for(var i=this.h[0],r=this.h[1],n=this.h[2],o=this.h[3],s=this.h[4],h=i,a=r,u=n,f=o,l=s,c=0;c<80;c++){var d=Oc(Rc(Tc(i,Nc(c,r,n,o),t[Dc[c]+e],xc(c)),jc[c]),s);i=s,s=o,o=Rc(n,10),n=r,r=d,d=Oc(Rc(Tc(h,Nc(79-c,a,u,f),t[Cc[c]+e],Lc(c)),Uc[c]),l),h=l,l=f,f=Rc(u,10),u=a,a=d}d=Ic(this.h[1],n,f),this.h[1]=Ic(this.h[2],o,l),this.h[2]=Ic(this.h[3],s,h),this.h[3]=Ic(this.h[4],i,a),this.h[4]=Ic(this.h[0],r,u),this.h[0]=d},Pc.prototype._digest=function(t){return"hex"===t?Ac.toHex32(this.h,"little"):Ac.split32(this.h,"little")};var Dc=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Cc=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],jc=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Uc=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],qc=Wf,zc=yh;function Fc(t,e,i){if(!(this instanceof Fc))return new Fc(t,e,i);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(qc.toArray(e,i))}var Hc,Kc,Gc=Fc;Fc.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),zc(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},Fc.prototype.update=function(t,e){return this.inner.update(t,e),this},Fc.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)},function(t){var e=Zf;e.utils=Wf,e.common=il,e.sha=sl,e.ripemd=Ec,e.hmac=Gc,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}(),function(t){var e,i=Yf,r=Zf,n=gf,o=cf.assert;function s(t){"short"===t.type?this.curve=new n.short(t):"edwards"===t.type?this.curve=new n.edwards(t):this.curve=new n.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function h(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new s(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=s,h("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),h("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),h("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{e=Kc?Hc:(Kc=1,Hc={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(t){e=void 0}h("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",e]})}();var Vc=Zf,Yc=mf,Zc=yh;function Wc(t){if(!(this instanceof Wc))return new Wc(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Yc.toArray(t.entropy,t.entropyEnc||"hex"),i=Yc.toArray(t.nonce,t.nonceEnc||"hex"),r=Yc.toArray(t.pers,t.persEnc||"hex");Zc(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,i,r)}var Xc=Wc;Wc.prototype._init=function(t,e,i){var r=t.concat(e).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},Wc.prototype._hmac=function(){return new Vc.hmac(this.hash,this.K)},Wc.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},Wc.prototype.reseed=function(t,e,i,r){"string"!=typeof e&&(r=i,i=e,e=null),t=Yc.toArray(t,e),i=Yc.toArray(i,r),Zc(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1},Wc.prototype.generate=function(t,e,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=i,i=e,e=null),i&&(i=Yc.toArray(i,r||"hex"),this._update(i));for(var n=[];n.length<t;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,t);return this._update(i),this._reseed++,Yc.encode(o,e)};var Qc=df,Jc=cf.assert;function $c(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var td=$c;$c.fromPublic=function(t,e,i){return e instanceof $c?e:new $c(t,{pub:e,pubEnc:i})},$c.fromPrivate=function(t,e,i){return e instanceof $c?e:new $c(t,{priv:e,privEnc:i})},$c.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},$c.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},$c.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},$c.prototype._importPrivate=function(t,e){this.priv=new Qc(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},$c.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?Jc(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||Jc(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},$c.prototype.derive=function(t){return t.validate()||Jc(t.validate(),"public point not validated"),t.mul(this.priv).getX()},$c.prototype.sign=function(t,e,i){return this.ec.sign(t,this,e,i)},$c.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},$c.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var ed=df,id=cf,rd=id.assert;function nd(t,e){if(t instanceof nd)return t;this._importDER(t,e)||(rd(t.r&&t.s,"Signature without r or s"),this.r=new ed(t.r,16),this.s=new ed(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var od,sd,hd=nd;function ad(){this.place=0}function ud(t,e){var i=t[e.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,o=0,s=e.place;o<r;o++,s++)n<<=8,n|=t[s],n>>>=0;return!(n<=127)&&(e.place=s,n)}function fd(t){for(var e=0,i=t.length-1;!t[e]&&!(128&t[e+1])&&e<i;)e++;return 0===e?t:t.slice(e)}function ld(t,e){if(e<128)t.push(e);else{var i=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|i);--i;)t.push(e>>>(i<<3)&255);t.push(e)}}nd.prototype._importDER=function(t,e){t=id.toArray(t,e);var i=new ad;if(48!==t[i.place++])return!1;var r=ud(t,i);if(!1===r)return!1;if(r+i.place!==t.length)return!1;if(2!==t[i.place++])return!1;var n=ud(t,i);if(!1===n)return!1;var o=t.slice(i.place,n+i.place);if(i.place+=n,2!==t[i.place++])return!1;var s=ud(t,i);if(!1===s)return!1;if(t.length!==s+i.place)return!1;var h=t.slice(i.place,s+i.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new ed(o),this.s=new ed(h),this.recoveryParam=null,!0},nd.prototype.toDER=function(t){var e=this.r.toArray(),i=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&i[0]&&(i=[0].concat(i)),e=fd(e),i=fd(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];ld(r,e.length),(r=r.concat(e)).push(2),ld(r,i.length);var n=r.concat(i),o=[48];return ld(o,n.length),o=o.concat(n),id.encode(o,t)};var cd=cf,dd=cd.assert,pd=cd.parseBytes,md=cd.cachedProperty;function gd(t,e){this.eddsa=t,this._secret=pd(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=pd(e.pub)}gd.fromPublic=function(t,e){return e instanceof gd?e:new gd(t,{pub:e})},gd.fromSecret=function(t,e){return e instanceof gd?e:new gd(t,{secret:e})},gd.prototype.secret=function(){return this._secret},md(gd,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),md(gd,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),md(gd,"privBytes",(function(){var t=this.eddsa,e=this.hash(),i=t.encodingLength-1,r=e.slice(0,t.encodingLength);return r[0]&=248,r[i]&=127,r[i]|=64,r})),md(gd,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),md(gd,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),md(gd,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),gd.prototype.sign=function(t){return dd(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},gd.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},gd.prototype.getSecret=function(t){return dd(this._secret,"KeyPair is public only"),cd.encode(this.secret(),t)},gd.prototype.getPublic=function(t){return cd.encode(this.pubBytes(),t)};var vd=gd,bd=df,yd=cf,wd=yd.assert,Md=yd.cachedProperty,_d=yd.parseBytes;function Sd(t,e){this.eddsa=t,"object"!=typeof e&&(e=_d(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),wd(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof bd&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Md(Sd,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Md(Sd,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Md(Sd,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Md(Sd,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Sd.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Sd.prototype.toHex=function(){return yd.encode(this.toBytes(),"hex").toUpperCase()};var Ed=Sd,Ad=Zf,kd=Yf,Rd=cf,Od=Rd.assert,Id=Rd.parseBytes,Td=vd,Bd=Ed;function Pd(t){if(Od("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof Pd))return new Pd(t);t=kd[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=Ad.sha512}var Nd,xd=Pd;function Ld(){return Nd||(Nd=1,function(t){var e=t;e.version=lf.version,e.utils=cf,e.rand=Vu(),e.curve=gf,e.curves=Yf,e.ec=function(){if(sd)return od;sd=1;var t=df,e=Xc,i=cf,r=Yf,n=Vu(),o=i.assert,s=td,h=hd;function a(t){if(!(this instanceof a))return new a(t);"string"==typeof t&&(o(Object.prototype.hasOwnProperty.call(r,t),"Unknown curve "+t),t=r[t]),t instanceof r.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}return od=a,a.prototype.keyPair=function(t){return new s(this,t)},a.prototype.keyFromPrivate=function(t,e){return s.fromPrivate(this,t,e)},a.prototype.keyFromPublic=function(t,e){return s.fromPublic(this,t,e)},a.prototype.genKeyPair=function(i){i||(i={});for(var r=new e({hash:this.hash,pers:i.pers,persEnc:i.persEnc||"utf8",entropy:i.entropy||n(this.hash.hmacStrength),entropyEnc:i.entropy&&i.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),s=this.n.sub(new t(2));;){var h=new t(r.generate(o));if(!(h.cmp(s)>0))return h.iaddn(1),this.keyFromPrivate(h)}},a.prototype._truncateToN=function(t,e){var i=8*t.byteLength()-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},a.prototype.sign=function(i,r,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),r=this.keyFromPrivate(r,n),i=this._truncateToN(new t(i,16));for(var s=this.n.byteLength(),a=r.getPrivate().toArray("be",s),u=i.toArray("be",s),f=new e({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new t(1)),c=0;;c++){var d=o.k?o.k(c):new t(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=d.invm(this.n).mul(g.mul(r.getPrivate()).iadd(i));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new h({r:g,s:v,recoveryParam:b})}}}}}},a.prototype.verify=function(e,i,r,n){e=this._truncateToN(new t(e,16)),r=this.keyFromPublic(r,n);var o=(i=new h(i,"hex")).r,s=i.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),f=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(f,r.getPublic(),l)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(f,r.getPublic(),l)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},a.prototype.recoverPubKey=function(e,i,r,n){o((3&r)===r,"The recovery param is more than two bits"),i=new h(i,n);var s=this.n,a=new t(e),u=i.r,f=i.s,l=1&r,c=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");u=c?this.curve.pointFromX(u.add(this.curve.n),l):this.curve.pointFromX(u,l);var d=i.r.invm(s),p=s.sub(a).mul(d).umod(s),m=f.mul(d).umod(s);return this.g.mulAdd(p,u,m)},a.prototype.getKeyRecoveryParam=function(t,e,i,r){if(null!==(e=new h(e,r)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(t,e,n)}catch(t){continue}if(o.eq(i))return n}throw new Error("Unable to find valid recovery factor")},od}(),e.eddsa=xd}(ff)),ff}Pd.prototype.sign=function(t,e){t=Id(t);var i=this.keyFromSecret(e),r=this.hashInt(i.messagePrefix(),t),n=this.g.mul(r),o=this.encodePoint(n),s=this.hashInt(o,i.pubBytes(),t).mul(i.priv()),h=r.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:h,Rencoded:o})},Pd.prototype.verify=function(t,e,i){t=Id(t),e=this.makeSignature(e);var r=this.keyFromPublic(i),n=this.hashInt(e.Rencoded(),r.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(r.pub().mul(n)).eq(o)},Pd.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return Rd.intFromLE(t.digest()).umod(this.curve.n)},Pd.prototype.keyFromPublic=function(t){return Td.fromPublic(this,t)},Pd.prototype.keyFromSecret=function(t){return Td.fromSecret(this,t)},Pd.prototype.makeSignature=function(t){return t instanceof Bd?t:new Bd(this,t)},Pd.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},Pd.prototype.decodePoint=function(t){var e=(t=Rd.parseBytes(t)).length-1,i=t.slice(0,e).concat(-129&t[e]),r=0!=(128&t[e]),n=Rd.intFromLE(i);return this.curve.pointFromY(n,r)},Pd.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},Pd.prototype.decodeInt=function(t){return Rd.intFromLE(t)},Pd.prototype.isPoint=function(t){return t instanceof this.pointClass};var Dd={},Cd={},jd={},Ud={get exports(){return jd},set exports(t){jd=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 c(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,O=0|s[6],I=8191&O,T=O>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],j=8191&C,U=C>>>13,q=0|h[0],z=8191&q,F=q>>>13,H=0|h[1],K=8191&H,G=H>>>13,V=0|h[2],Y=8191&V,Z=V>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,ct=ft>>>13,dt=0|h[9],pt=8191&dt,mt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,z)|0))<<13)|0;u=((o=Math.imul(c,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Y)|0))<<13)|0;u=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,Y)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(c,it)|0))<<13)|0;u=((o=o+Math.imul(c,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(I,K)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,Y)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,at)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(j,z),n=(n=Math.imul(j,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(j,K),n=(n=Math.imul(j,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,Y)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(j,Y),n=(n=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,ct)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Ot=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(I,at)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var It=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(j,it),n=(n=Math.imul(j,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ct)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ct)|0;var Bt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(j,at),n=(n=Math.imul(j,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,ct)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=Ot,a[13]=It,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?d(this,t,e):r<63?c(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;h=67108863&(c=c+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,c=u,d=0;d<s;d++){var p=i[f+d],m=r[f+d],g=i[f+d+s],v=r[f+d+s],b=l*g-c*v;v=l*v+c*g,g=b,i[f+d]=p+g,r[f+d]=m+v,i[f+d+s]=p-g,r[f+d+s]=m-v,d!==h&&(b=a*l-u*c,c=a*c+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),c=i.words;c.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var d=0;d<r;d++){var p=h[d]*f[d]-a[d]*l[d];a[d]=h[d]*l[d]+a[d]*f[d],h[d]=p}return this.conjugate(h,a,r),this.transform(h,a,c,o,r,n),this.conjugate(c,o,r),this.normalize13b(c,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var c=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(o,c,l);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,c=1;0==(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(h);){for(var m=d,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(v),l=v.redSqr(),d=d.redMul(l),p=g}return c},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Ud,gt);var qd,zd={},Fd={},Hd=me,Kd=Hd.Buffer,Gd={};for(qd in Hd)Hd.hasOwnProperty(qd)&&"SlowBuffer"!==qd&&"Buffer"!==qd&&(Gd[qd]=Hd[qd]);var Vd=Gd.Buffer={};for(qd in Kd)Kd.hasOwnProperty(qd)&&"allocUnsafe"!==qd&&"allocUnsafeSlow"!==qd&&(Vd[qd]=Kd[qd]);if(Gd.Buffer.prototype=Kd.prototype,Vd.from&&Vd.from!==Uint8Array.from||(Vd.from=function(t,e,i){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return Kd(t,e,i)}),Vd.alloc||(Vd.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=Kd(t);return e&&0!==e.length?"string"==typeof i?r.fill(e,i):r.fill(e):r.fill(0),r}),!Gd.kStringMaxLength)try{Gd.kStringMaxLength=ae.binding("buffer").kStringMaxLength}catch(t){}Gd.constants||(Gd.constants={MAX_LENGTH:Gd.kMaxLength},Gd.kStringMaxLength&&(Gd.constants.MAX_STRING_LENGTH=Gd.kStringMaxLength));var Yd=Gd,Zd={};const Wd=we;function Xd(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function Qd(t,e){this.path=t,this.rethrow(e)}Zd.Reporter=Xd,Xd.prototype.isError=function(t){return t instanceof Qd},Xd.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},Xd.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},Xd.prototype.enterKey=function(t){return this._reporterState.path.push(t)},Xd.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},Xd.prototype.leaveKey=function(t,e,i){const r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=i)},Xd.prototype.path=function(){return this._reporterState.path.join("/")},Xd.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},Xd.prototype.leaveObject=function(t){const e=this._reporterState,i=e.obj;return e.obj=t,i},Xd.prototype.error=function(t){let e;const i=this._reporterState,r=t instanceof Qd;if(e=r?t:new Qd(i.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!i.options.partial)throw e;return r||i.errors.push(e),e},Xd.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},Wd(Qd,Error),Qd.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Qd),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this};var Jd={};const $d=we,tp=Zd.Reporter,ep=Yd.Buffer;function ip(t,e){tp.call(this,e),ep.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function rp(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return rp.isEncoderBuffer(t)||(t=new rp(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=ep.byteLength(t);else{if(!ep.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}$d(ip,tp),Jd.DecoderBuffer=ip,ip.isDecoderBuffer=function(t){if(t instanceof ip)return!0;return"object"==typeof t&&ep.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},ip.prototype.save=function(){return{offset:this.offset,reporter:tp.prototype.save.call(this)}},ip.prototype.restore=function(t){const e=new ip(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,tp.prototype.restore.call(this,t.reporter),e},ip.prototype.isEmpty=function(){return this.offset===this.length},ip.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},ip.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");const i=new ip(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+t,this.offset+=t,i},ip.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},Jd.EncoderBuffer=rp,rp.isEncoderBuffer=function(t){if(t instanceof rp)return!0;return"object"==typeof t&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},rp.prototype.join=function(t,e){return t||(t=ep.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(t,e),e+=i.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):ep.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t};const np=Zd.Reporter,op=Jd.EncoderBuffer,sp=Jd.DecoderBuffer,hp=yh,ap=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],up=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(ap);function fp(t,e,i){const r={};this._baseState=r,r.name=i,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var lp=fp;const cp=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];fp.prototype.clone=function(){const t=this._baseState,e={};cp.forEach((function(i){e[i]=t[i]}));const i=new this.constructor(e.parent);return i._baseState=e,i},fp.prototype._wrap=function(){const t=this._baseState;up.forEach((function(e){this[e]=function(){const i=new this.constructor(this);return t.children.push(i),i[e].apply(i,arguments)}}),this)},fp.prototype._init=function(t){const e=this._baseState;hp(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),hp.equal(e.children.length,1,"Root node can have only one child")},fp.prototype._useArgs=function(t){const e=this._baseState,i=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==i.length&&(hp(null===e.children),e.children=i,i.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(hp(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(i){i==(0|i)&&(i|=0);const r=t[i];e[r]=i})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){fp.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),ap.forEach((function(t){fp.prototype[t]=function(){const e=this._baseState,i=Array.prototype.slice.call(arguments);return hp(null===e.tag),e.tag=t,this._useArgs(i),this}})),fp.prototype.use=function(t){hp(t);const e=this._baseState;return hp(null===e.use),e.use=t,this},fp.prototype.optional=function(){return this._baseState.optional=!0,this},fp.prototype.def=function(t){const e=this._baseState;return hp(null===e.default),e.default=t,e.optional=!0,this},fp.prototype.explicit=function(t){const e=this._baseState;return hp(null===e.explicit&&null===e.implicit),e.explicit=t,this},fp.prototype.implicit=function(t){const e=this._baseState;return hp(null===e.explicit&&null===e.implicit),e.implicit=t,this},fp.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},fp.prototype.key=function(t){const e=this._baseState;return hp(null===e.key),e.key=t,this},fp.prototype.any=function(){return this._baseState.any=!0,this},fp.prototype.choice=function(t){const e=this._baseState;return hp(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},fp.prototype.contains=function(t){const e=this._baseState;return hp(null===e.use),e.contains=t,this},fp.prototype._decode=function(t,e){const i=this._baseState;if(null===i.parent)return t.wrapResult(i.children[0]._decode(t,e));let r,n=i.default,o=!0,s=null;if(null!==i.key&&(s=t.enterKey(i.key)),i.optional){let r=null;if(null!==i.explicit?r=i.explicit:null!==i.implicit?r=i.implicit:null!==i.tag&&(r=i.tag),null!==r||i.any){if(o=this._peekTag(t,r,i.any),t.isError(o))return o}else{const r=t.save();try{null===i.choice?this._decodeGeneric(i.tag,t,e):this._decodeChoice(t,e),o=!0}catch(t){o=!1}t.restore(r)}}if(i.obj&&o&&(r=t.enterObject()),o){if(null!==i.explicit){const e=this._decodeTag(t,i.explicit);if(t.isError(e))return e;t=e}const r=t.offset;if(null===i.use&&null===i.choice){let e;i.any&&(e=t.save());const r=this._decodeTag(t,null!==i.implicit?i.implicit:i.tag,i.any);if(t.isError(r))return r;i.any?n=t.raw(e):t=r}if(e&&e.track&&null!==i.tag&&e.track(t.path(),r,t.length,"tagged"),e&&e.track&&null!==i.tag&&e.track(t.path(),t.offset,t.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,t,e):this._decodeChoice(t,e)),t.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(i){i._decode(t,e)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){const r=new sp(n);n=this._getUse(i.contains,t._reporterState.obj)._decode(r,e)}}return i.obj&&o&&(n=t.leaveObject(r)),null===i.key||null===n&&!0!==o?null!==s&&t.exitKey(s):t.leaveKey(s,i.key,n),n},fp.prototype._decodeGeneric=function(t,e,i){const r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],i):/str$/.test(t)?this._decodeStr(e,t,i):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],i):"objid"===t?this._decodeObjid(e,null,null,i):"gentime"===t||"utctime"===t?this._decodeTime(e,t,i):"null_"===t?this._decodeNull(e,i):"bool"===t?this._decodeBool(e,i):"objDesc"===t?this._decodeStr(e,t,i):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,i):e.error("unknown tag: "+t)},fp.prototype._getUse=function(t,e){const i=this._baseState;return i.useDecoder=this._use(t,e),hp(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},fp.prototype._decodeChoice=function(t,e){const i=this._baseState;let r=null,n=!1;return Object.keys(i.choice).some((function(o){const s=t.save(),h=i.choice[o];try{const i=h._decode(t,e);if(t.isError(i))return!1;r={type:o,value:i},n=!0}catch(e){return t.restore(s),!1}return!0}),this),n?r:t.error("Choice not matched")},fp.prototype._createEncoderBuffer=function(t){return new op(t,this.reporter)},fp.prototype._encode=function(t,e,i){const r=this._baseState;if(null!==r.default&&r.default===t)return;const n=this._encodeValue(t,e,i);return void 0===n||this._skipDefault(n,e,i)?void 0:n},fp.prototype._encodeValue=function(t,e,i){const r=this._baseState;if(null===r.parent)return r.children[0]._encode(t,e||new np);let n=null;if(this.reporter=e,r.optional&&void 0===t){if(null===r.default)return;t=r.default}let o=null,s=!1;if(r.any)n=this._createEncoderBuffer(t);else if(r.choice)n=this._encodeChoice(t,e);else if(r.contains)o=this._getUse(r.contains,i)._encode(t,e),s=!0;else if(r.children)o=r.children.map((function(i){if("null_"===i._baseState.tag)return i._encode(null,e,t);if(null===i._baseState.key)return e.error("Child should have a key");const r=e.enterKey(i._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const n=i._encode(t[i._baseState.key],e,t);return e.leaveKey(r),n}),this).filter((function(t){return t})),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return e.error("Too many args for : "+r.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const i=this.clone();i._baseState.implicit=null,o=this._createEncoderBuffer(t.map((function(i){const r=this._baseState;return this._getUse(r.args[0],t)._encode(i,e)}),i))}else null!==r.use?n=this._getUse(r.use,i)._encode(t,e):(o=this._encodePrimitive(r.tag,t),s=!0);if(!r.any&&null===r.choice){const t=null!==r.implicit?r.implicit:r.tag,i=null===r.implicit?"universal":"context";null===t?null===r.use&&e.error("Tag could be omitted only for .use()"):null===r.use&&(n=this._encodeComposite(t,s,i,o))}return null!==r.explicit&&(n=this._encodeComposite(r.explicit,!1,"context",n)),n},fp.prototype._encodeChoice=function(t,e){const i=this._baseState,r=i.choice[t.type];return r||hp(!1,t.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(t.value,e)},fp.prototype._encodePrimitive=function(t,e){const i=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&i.args)return this._encodeObjid(e,i.reverseArgs[0],i.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,i.args&&i.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},fp.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},fp.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)};var dp={};!function(t){function e(t){const e={};return Object.keys(t).forEach((function(i){(0|i)==i&&(i|=0);const r=t[i];e[r]=i})),e}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e(t.tag)}(dp);const pp=we,mp=Yd.Buffer,gp=lp,vp=dp;function bp(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new wp,this.tree._init(t.body)}var yp=bp;function wp(t){gp.call(this,"der",t)}function Mp(t){return t<10?"0"+t:t}bp.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},pp(wp,gp),wp.prototype._encodeComposite=function(t,e,i,r){const n=function(t,e,i,r){let n;"seqof"===t?t="seq":"setof"===t&&(t="set");if(vp.tagByName.hasOwnProperty(t))n=vp.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);n=t}if(n>=31)return r.error("Multi-octet tag encoding unsupported");e||(n|=32);return n|=vp.tagClassByName[i||"universal"]<<6,n}(t,e,i,this.reporter);if(r.length<128){const t=mp.alloc(2);return t[0]=n,t[1]=r.length,this._createEncoderBuffer([t,r])}let o=1;for(let t=r.length;t>=256;t>>=8)o++;const s=mp.alloc(2+o);s[0]=n,s[1]=128|o;for(let t=1+o,e=r.length;e>0;t--,e>>=8)s[t]=255&e;return this._createEncoderBuffer([s,r])},wp.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=mp.alloc(2*t.length);for(let i=0;i<t.length;i++)e.writeUInt16BE(t.charCodeAt(i),2*i);return this._createEncoderBuffer(e)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},wp.prototype._encodeObjid=function(t,e,i){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s.]+/g);for(let e=0;e<t.length;e++)t[e]|=0}else if(Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!i){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let r=0;for(let e=0;e<t.length;e++){let i=t[e];for(r++;i>=128;i>>=7)r++}const n=mp.alloc(r);let o=n.length-1;for(let e=t.length-1;e>=0;e--){let i=t[e];for(n[o--]=127&i;(i>>=7)>0;)n[o--]=128|127&i}return this._createEncoderBuffer(n)},wp.prototype._encodeTime=function(t,e){let i;const r=new Date(t);return"gentime"===e?i=[Mp(r.getUTCFullYear()),Mp(r.getUTCMonth()+1),Mp(r.getUTCDate()),Mp(r.getUTCHours()),Mp(r.getUTCMinutes()),Mp(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?i=[Mp(r.getUTCFullYear()%100),Mp(r.getUTCMonth()+1),Mp(r.getUTCDate()),Mp(r.getUTCHours()),Mp(r.getUTCMinutes()),Mp(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(i,"octstr")},wp.prototype._encodeNull=function(){return this._createEncoderBuffer("")},wp.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!mp.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=mp.from(e)}if(mp.isBuffer(t)){let e=t.length;0===t.length&&e++;const i=mp.alloc(e);return t.copy(i),0===t.length&&(i[0]=0),this._createEncoderBuffer(i)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let i=1;for(let e=t;e>=256;e>>=8)i++;const r=new Array(i);for(let e=r.length-1;e>=0;e--)r[e]=255&t,t>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(mp.from(r))},wp.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},wp.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},wp.prototype._skipDefault=function(t,e,i){const r=this._baseState;let n;if(null===r.default)return!1;const o=t.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,e,i).join()),o.length!==r.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==r.defaultBuffer[n])return!1;return!0};const _p=yp;function Sp(t){_p.call(this,t),this.enc="pem"}we(Sp,_p);var Ep=Sp;Sp.prototype.encode=function(t,e){const i=_p.prototype.encode.call(this,t).toString("base64"),r=["-----BEGIN "+e.label+"-----"];for(let t=0;t<i.length;t+=64)r.push(i.slice(t,t+64));return r.push("-----END "+e.label+"-----"),r.join("\n")},function(t){const e=t;e.der=yp,e.pem=Ep}(Fd);var Ap={};const kp=we,Rp=jd,Op=Jd.DecoderBuffer,Ip=lp,Tp=dp;function Bp(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Np,this.tree._init(t.body)}var Pp=Bp;function Np(t){Ip.call(this,"der",t)}function xp(t,e){let i=t.readUInt8(e);if(t.isError(i))return i;const r=Tp.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){let r=i;for(i=0;128==(128&r);){if(r=t.readUInt8(e),t.isError(r))return r;i<<=7,i|=127&r}}else i&=31;return{cls:r,primitive:n,tag:i,tagStr:Tp.tag[i]}}function Lp(t,e,i){let r=t.readUInt8(i);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;const n=127&r;if(n>4)return t.error("length octect is too long");r=0;for(let e=0;e<n;e++){r<<=8;const e=t.readUInt8(i);if(t.isError(e))return e;r|=e}return r}Bp.prototype.decode=function(t,e){return Op.isDecoderBuffer(t)||(t=new Op(t,e)),this.tree._decode(t,e)},kp(Np,Ip),Np.prototype._peekTag=function(t,e,i){if(t.isEmpty())return!1;const r=t.save(),n=xp(t,'Failed to peek tag: "'+e+'"');return t.isError(n)?n:(t.restore(r),n.tag===e||n.tagStr===e||n.tagStr+"of"===e||i)},Np.prototype._decodeTag=function(t,e,i){const r=xp(t,'Failed to decode tag of "'+e+'"');if(t.isError(r))return r;let n=Lp(t,r.primitive,'Failed to get length of "'+e+'"');if(t.isError(n))return n;if(!i&&r.tag!==e&&r.tagStr!==e&&r.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(r.primitive||null!==n)return t.skip(n,'Failed to match body of: "'+e+'"');const o=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(n=t.offset-o.offset,t.restore(o),t.skip(n,'Failed to match body of: "'+e+'"'))},Np.prototype._skipUntilEnd=function(t,e){for(;;){const i=xp(t,e);if(t.isError(i))return i;const r=Lp(t,i.primitive,e);if(t.isError(r))return r;let n;if(n=i.primitive||null!==r?t.skip(r):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===i.tagStr)break}},Np.prototype._decodeList=function(t,e,i,r){const n=[];for(;!t.isEmpty();){const e=this._peekTag(t,"end");if(t.isError(e))return e;const o=i.decode(t,"der",r);if(t.isError(o)&&e)break;n.push(o)}return n},Np.prototype._decodeStr=function(t,e){if("bitstr"===e){const e=t.readUInt8();return t.isError(e)?e:{unused:e,data:t.raw()}}if("bmpstr"===e){const e=t.raw();if(e.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");let i="";for(let t=0;t<e.length/2;t++)i+=String.fromCharCode(e.readUInt16BE(2*t));return i}if("numstr"===e){const e=t.raw().toString("ascii");return this._isNumstr(e)?e:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){const e=t.raw().toString("ascii");return this._isPrintstr(e)?e:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},Np.prototype._decodeObjid=function(t,e,i){let r;const n=[];let o=0,s=0;for(;!t.isEmpty();)s=t.readUInt8(),o<<=7,o|=127&s,0==(128&s)&&(n.push(o),o=0);128&s&&n.push(o);const h=n[0]/40|0,a=n[0]%40;if(r=i?n:[h,a].concat(n.slice(1)),e){let t=e[r.join(" ")];void 0===t&&(t=e[r.join(".")]),void 0!==t&&(r=t)}return r},Np.prototype._decodeTime=function(t,e){const i=t.raw().toString();let r,n,o,s,h,a;if("gentime"===e)r=0|i.slice(0,4),n=0|i.slice(4,6),o=0|i.slice(6,8),s=0|i.slice(8,10),h=0|i.slice(10,12),a=0|i.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");r=0|i.slice(0,2),n=0|i.slice(2,4),o=0|i.slice(4,6),s=0|i.slice(6,8),h=0|i.slice(8,10),a=0|i.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,n-1,o,s,h,a,0)},Np.prototype._decodeNull=function(){return null},Np.prototype._decodeBool=function(t){const e=t.readUInt8();return t.isError(e)?e:0!==e},Np.prototype._decodeInt=function(t,e){const i=t.raw();let r=new Rp(i);return e&&(r=e[r.toString(10)]||r),r},Np.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree};const Dp=we,Cp=Yd.Buffer,jp=Pp;function Up(t){jp.call(this,t),this.enc="pem"}Dp(Up,jp);var qp=Up;Up.prototype.decode=function(t,e){const i=t.toString().split(/[\r\n]+/g),r=e.label.toUpperCase(),n=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,s=-1;for(let t=0;t<i.length;t++){const e=i[t].match(n);if(null!==e&&e[2]===r){if(-1!==o){if("END"!==e[1])break;s=t;break}if("BEGIN"!==e[1])break;o=t}}if(-1===o||-1===s)throw new Error("PEM section not found for: "+r);const h=i.slice(o+1,s).join("");h.replace(/[^a-z0-9+/=]+/gi,"");const a=Cp.from(h,"base64");return jp.prototype.decode.call(this,a,e)},function(t){const e=t;e.der=Pp,e.pem=qp}(Ap),function(t){const e=Fd,i=Ap,r=we;function n(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}t.define=function(t,e){return new n(t,e)},n.prototype._createNamed=function(t){const e=this.name;function i(t){this._initNamed(t,e)}return r(i,t),i.prototype._initNamed=function(e,i){t.call(this,e,i)},new i(this)},n.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i[t])),this.decoders[t]},n.prototype.decode=function(t,e,i){return this._getDecoder(e).decode(t,i)},n.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(e[t])),this.encoders[t]},n.prototype.encode=function(t,e,i){return this._getEncoder(e).encode(t,i)}}(zd);var zp={};!function(t){const e=t;e.Reporter=Zd.Reporter,e.DecoderBuffer=Jd.DecoderBuffer,e.EncoderBuffer=Jd.EncoderBuffer,e.Node=lp}(zp);var Fp={};!function(t){const e=Fp;e._reverse=function(t){const e={};return Object.keys(t).forEach((function(i){(0|i)==i&&(i|=0);const r=t[i];e[r]=i})),e},e.der=dp}(),function(t){const e=Cd;e.bignum=jd,e.define=zd.define,e.base=zp,e.constants=Fp,e.decoders=Ap,e.encoders=Fd}();var Hp=Cd,Kp=Hp.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),Gp=Hp.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),Vp=Hp.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),Yp=Hp.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Vp),this.key("subjectPublicKey").bitstr())})),Zp=Hp.define("RelativeDistinguishedName",(function(){this.setof(Gp)})),Wp=Hp.define("RDNSequence",(function(){this.seqof(Zp)})),Xp=Hp.define("Name",(function(){this.choice({rdnSequence:this.use(Wp)})})),Qp=Hp.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(Kp),this.key("notAfter").use(Kp))})),Jp=Hp.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),$p=Hp.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Vp),this.key("issuer").use(Xp),this.key("validity").use(Qp),this.key("subject").use(Xp),this.key("subjectPublicKeyInfo").use(Yp),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(Jp).optional())})),tm=Hp.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use($p),this.key("signatureAlgorithm").use(Vp),this.key("signatureValue").bitstr())})),em=Cd;Dd.certificate=tm;var im=em.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));Dd.RSAPrivateKey=im;var rm=em.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));Dd.RSAPublicKey=rm;var nm=em.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(om),this.key("subjectPublicKey").bitstr())}));Dd.PublicKey=nm;var om=em.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),sm=em.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(om),this.key("subjectPrivateKey").octstr())}));Dd.PrivateKey=sm;var hm=em.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));Dd.EncryptedPrivateKey=hm;var am=em.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));Dd.DSAPrivateKey=am,Dd.DSAparam=em.define("DSAparam",(function(){this.int()}));var um=em.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(fm),this.key("publicKey").optional().explicit(1).bitstr())}));Dd.ECPrivateKey=um;var fm=em.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));Dd.signature=em.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}));var lm=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,cm=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,dm=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,pm=tu,mm=Wh,gm=de.Buffer,vm=Dd,bm={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"},ym=function(t,e){var i,r=t.toString(),n=r.match(lm);if(n){var o="aes"+n[1],s=gm.from(n[2],"hex"),h=gm.from(n[3].replace(/[\r\n]/g,""),"base64"),a=pm(e,s.slice(0,8),parseInt(n[1],10)).key,u=[],f=mm.createDecipheriv(o,a,s);u.push(f.update(h)),u.push(f.final()),i=gm.concat(u)}else{var l=r.match(dm);i=gm.from(l[2].replace(/[\r\n]/g,""),"base64")}return{tag:r.match(cm)[1],data:i}},wm=Wh,Mm=js,_m=de.Buffer,Sm=Em;function Em(t){var e;"object"!=typeof t||_m.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=_m.from(t));var i,r,n=ym(t,e),o=n.tag,s=n.data;switch(o){case"CERTIFICATE":r=vm.certificate.decode(s,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(r||(r=vm.PublicKey.decode(s,"der")),i=r.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return vm.RSAPublicKey.decode(r.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return r.subjectPrivateKey=r.subjectPublicKey,{type:"ec",data:r};case"1.2.840.10040.4.1":return r.algorithm.params.pub_key=vm.DSAparam.decode(r.subjectPublicKey.data,"der"),{type:"dsa",data:r.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":s=function(t,e){var i=t.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=bm[t.algorithm.decrypt.cipher.algo.join(".")],o=t.algorithm.decrypt.cipher.iv,s=t.subjectPrivateKey,h=parseInt(n.split("-")[1],10)/8,a=Mm.pbkdf2Sync(e,i,r,h,"sha1"),u=wm.createDecipheriv(n,a,o),f=[];return f.push(u.update(s)),f.push(u.final()),_m.concat(f)}(s=vm.EncryptedPrivateKey.decode(s,"der"),e);case"PRIVATE KEY":switch(i=(r=vm.PrivateKey.decode(s,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return vm.RSAPrivateKey.decode(r.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:r.algorithm.curve,privateKey:vm.ECPrivateKey.decode(r.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return r.algorithm.params.priv_key=vm.DSAparam.decode(r.subjectPrivateKey,"der"),{type:"dsa",params:r.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return vm.RSAPublicKey.decode(s,"der");case"RSA PRIVATE KEY":return vm.RSAPrivateKey.decode(s,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:vm.DSAPrivateKey.decode(s,"der")};case"EC PRIVATE KEY":return{curve:(s=vm.ECPrivateKey.decode(s,"der")).parameters.value,privateKey:s.privateKey};default:throw new Error("unknown key type "+o)}}Em.signature=vm.signature;var Am,km,Rm,Om,Im,Tm={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};function Bm(){if(Am)return tf;Am=1;var t=de.Buffer,e=Ns,i=uf,r=Ld().ec,n=rf,o=Sm,s=Tm;function h(i,r,n,o){if((i=t.from(i.toArray())).length<r.byteLength()){var s=t.alloc(r.byteLength()-i.length);i=t.concat([s,i])}var h=n.length,u=function(e,i){e=a(e,i),e=e.mod(i);var r=t.from(e.toArray());if(r.length<i.byteLength()){var n=t.alloc(i.byteLength()-r.length);r=t.concat([n,r])}return r}(n,r),f=t.alloc(h);f.fill(1);var l=t.alloc(h);return l=e(o,l).update(f).update(t.from([0])).update(i).update(u).digest(),f=e(o,l).update(f).digest(),{k:l=e(o,l).update(f).update(t.from([1])).update(i).update(u).digest(),v:f=e(o,l).update(f).digest()}}function a(t,e){var i=new n(t),r=(t.length<<3)-e.bitLength();return r>0&&i.ishrn(r),i}function u(i,r,n){var o,s;do{for(o=t.alloc(0);8*o.length<i.bitLength();)r.v=e(n,r.k).update(r.v).digest(),o=t.concat([o,r.v]);s=a(o,i),r.k=e(n,r.k).update(r.v).update(t.from([0])).digest(),r.v=e(n,r.k).update(r.v).digest()}while(-1!==s.cmp(i));return s}function f(t,e,i,r){return t.toRed(n.mont(i)).redPow(e).fromRed().mod(r)}return ef.exports=function(e,l,c,d,p){var m=o(l);if(m.curve){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");return function(e,i){var n=s[i.curve.join(".")];if(!n)throw new Error("unknown curve "+i.curve.join("."));var o=new r(n),h=o.keyFromPrivate(i.privateKey),a=h.sign(e);return t.from(a.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==d)throw new Error("wrong private key type");return function(e,i,r){var o,s=i.params.priv_key,l=i.params.p,c=i.params.q,d=i.params.g,p=new n(0),m=a(e,c).mod(c),g=!1,v=h(s,c,e,r);for(;!1===g;)p=f(d,o=u(c,v,r),l,c),0===(g=o.invm(c).imul(m.add(s.mul(p))).mod(c)).cmpn(0)&&(g=!1,p=new n(0));return function(e,i){e=e.toArray(),i=i.toArray(),128&e[0]&&(e=[0].concat(e));128&i[0]&&(i=[0].concat(i));var r=e.length+i.length+4,n=[48,r,2,e.length];return n=n.concat(e,[2,i.length],i),t.from(n)}(p,g)}(e,m,c)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");e=t.concat([p,e]);for(var g=m.modulus.byteLength(),v=[0,1];e.length+v.length+1<g;)v.push(255);v.push(0);for(var b=-1;++b<e.length;)v.push(e[b]);return i(v,m)},tf.getKey=h,tf.makeKey=u,tf}function Pm(){if(Rm)return km;Rm=1;var t=de.Buffer,e=rf,i=Ld().ec,r=Sm,n=Tm;function o(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}return km=function(s,h,a,u,f){var l=r(a);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,r){var o=n[r.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var s=new i(o),h=r.data.subjectPrivateKey.data;return s.verify(e,t,h)}(s,h,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,i,n){var s=n.data.p,h=n.data.q,a=n.data.g,u=n.data.pub_key,f=r.signature.decode(t,"der"),l=f.s,c=f.r;o(l,h),o(c,h);var d=e.mont(s),p=l.invm(h),m=a.toRed(d).redPow(new e(i).mul(p).mod(h)).fromRed().mul(u.toRed(d).redPow(c.mul(p).mod(h)).fromRed()).mod(s).mod(h);return 0===m.cmp(c)}(s,h,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");h=t.concat([f,h]);for(var c=l.modulus.byteLength(),d=[1],p=0;h.length+d.length+2<c;)d.push(255),p++;d.push(0);for(var m=-1;++m<h.length;)d.push(h[m]);d=t.from(d);var g=e.mont(l.modulus);s=(s=new e(s).toRed(g)).redPow(new e(l.publicExponent)),s=t.from(s.fromRed().toArray());var v=p<8?1:0;for(c=Math.min(s.length,d.length),s.length!==d.length&&(v=1),m=-1;++m<c;)v|=s[m]^d[m];return 0===v},km}var Nm,xm,Lm={},Dm={get exports(){return Lm},set exports(t){Lm=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 c(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,O=0|s[6],I=8191&O,T=O>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],j=8191&C,U=C>>>13,q=0|h[0],z=8191&q,F=q>>>13,H=0|h[1],K=8191&H,G=H>>>13,V=0|h[2],Y=8191&V,Z=V>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,ct=ft>>>13,dt=0|h[9],pt=8191&dt,mt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,z)|0))<<13)|0;u=((o=Math.imul(c,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Y)|0))<<13)|0;u=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,Y)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(c,it)|0))<<13)|0;u=((o=o+Math.imul(c,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(I,K)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,Y)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,at)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(j,z),n=(n=Math.imul(j,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(j,K),n=(n=Math.imul(j,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,Y)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(j,Y),n=(n=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,ct)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Ot=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(I,at)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var It=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(j,it),n=(n=Math.imul(j,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ct)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ct)|0;var Bt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(j,at),n=(n=Math.imul(j,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,ct)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=Ot,a[13]=It,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?d(this,t,e):r<63?c(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;h=67108863&(c=c+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,c=u,d=0;d<s;d++){var p=i[f+d],m=r[f+d],g=i[f+d+s],v=r[f+d+s],b=l*g-c*v;v=l*v+c*g,g=b,i[f+d]=p+g,r[f+d]=m+v,i[f+d+s]=p-g,r[f+d+s]=m-v,d!==h&&(b=a*l-u*c,c=a*c+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),c=i.words;c.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var d=0;d<r;d++){var p=h[d]*f[d]-a[d]*l[d];a[d]=h[d]*l[d]+a[d]*f[d],h[d]=p}return this.conjugate(h,a,r),this.transform(h,a,c,o,r,n),this.conjugate(c,o,r),this.normalize13b(c,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var c=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(o,c,l);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,c=1;0==(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(h);){for(var m=d,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(v),l=v.redSqr(),d=d.redMul(l),p=g}return c},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Dm,gt);var Cm={},jm=ms,Um=de.Buffer,qm=function(t,e){for(var i,r=Um.alloc(0),n=0;r.length<e;)i=zm(n++),r=Um.concat([r,jm("sha1").update(t).update(i).digest()]);return r.slice(0,e)};function zm(t){var e=Um.allocUnsafe(4);return e.writeUInt32BE(t,0),e}var Fm=function(t,e){for(var i=t.length,r=-1;++r<i;)t[r]^=e[r];return t},Hm={},Km={get exports(){return Hm},set exports(t){Hm=t}};!function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function n(t,e,i){if(n.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 o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:me.Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},n.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},n.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,h=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.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,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.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},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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 c(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],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}n.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);r=0!=(o=h>>>24-n&16777215)||s!==this.length-1?u[6-a.length]+a+r:a+r,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.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},n.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},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.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},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.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()},n.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.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()},n.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.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()},n.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},n.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},n.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)},n.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,s=0;s<r.length;s++)o=(e=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)o=(e=(0|i.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,A=0|s[5],k=8191&A,R=A>>>13,O=0|s[6],I=8191&O,T=O>>>13,B=0|s[7],P=8191&B,N=B>>>13,x=0|s[8],L=8191&x,D=x>>>13,C=0|s[9],j=8191&C,U=C>>>13,q=0|h[0],z=8191&q,F=q>>>13,H=0|h[1],K=8191&H,G=H>>>13,V=0|h[2],Y=8191&V,Z=V>>>13,W=0|h[3],X=8191&W,Q=W>>>13,J=0|h[4],$=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,ct=ft>>>13,dt=0|h[9],pt=8191&dt,mt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(l,z))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,z)|0))<<13)|0;u=((o=Math.imul(c,F))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,z),n=(n=Math.imul(p,F))+Math.imul(m,z)|0,o=Math.imul(m,F);var vt=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,z),n=(n=Math.imul(v,F))+Math.imul(b,z)|0,o=Math.imul(b,F),r=r+Math.imul(p,K)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0;var bt=(u+(r=r+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Y)|0))<<13)|0;u=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,z),n=(n=Math.imul(w,F))+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(v,K)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=(n=Math.imul(S,F))+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,K)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(v,Y)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,z),n=(n=Math.imul(k,F))+Math.imul(R,z)|0,o=Math.imul(R,F),r=r+Math.imul(S,K)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(c,it)|0))<<13)|0;u=((o=o+Math.imul(c,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,F))+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(k,K)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,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=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(P,z),n=(n=Math.imul(P,F))+Math.imul(N,z)|0,o=Math.imul(N,F),r=r+Math.imul(I,K)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(k,Y)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,at)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,F))+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(P,K)|0,n=(n=n+Math.imul(P,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,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(v,ot)|0,n=(n=n+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(j,z),n=(n=Math.imul(j,F))+Math.imul(U,z)|0,o=Math.imul(U,F),r=r+Math.imul(L,K)|0,n=(n=n+Math.imul(L,G)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(P,Y)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(v,at)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var At=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(j,K),n=(n=Math.imul(j,G))+Math.imul(U,K)|0,o=Math.imul(U,G),r=r+Math.imul(L,Y)|0,n=(n=n+Math.imul(L,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(v,lt)|0,n=(n=n+Math.imul(v,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(j,Y),n=(n=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(L,X)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Q)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,ct)|0;var Rt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),r=r+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(P,it)|0,n=(n=n+Math.imul(P,rt)|0)+Math.imul(N,it)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,at)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(R,at)|0,o=o+Math.imul(R,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Ot=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),r=r+Math.imul(L,it)|0,n=(n=n+Math.imul(L,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,st)|0,r=r+Math.imul(I,at)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(k,lt)|0,n=(n=n+Math.imul(k,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var It=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(j,it),n=(n=Math.imul(j,rt))+Math.imul(U,it)|0,o=Math.imul(U,rt),r=r+Math.imul(L,ot)|0,n=(n=n+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(P,at)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(N,at)|0,o=o+Math.imul(N,ut)|0,r=r+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ct)|0;var Tt=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(L,at)|0,n=(n=n+Math.imul(L,ut)|0)+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ct)|0;var Bt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(j,at),n=(n=Math.imul(j,ut))+Math.imul(U,at)|0,o=Math.imul(U,ut),r=r+Math.imul(L,lt)|0,n=(n=n+Math.imul(L,ct)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0;var Pt=(u+(r=r+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(N,pt)|0))<<13)|0;u=((o=o+Math.imul(N,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var Nt=(u+(r=r+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var xt=(u+(r=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,a[0]=gt,a[1]=vt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=At,a[10]=kt,a[11]=Rt,a[12]=Ot,a[13]=It,a[14]=Tt,a[15]=Bt,a[16]=Pt,a[17]=Nt,a[18]=xt,0!==u&&(a[19]=u,i.length++),i};function p(t,e,i){return(new m).mulp(t,e,i)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?d(this,t,e):r<63?c(this,t,e):r<1024?function(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 s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;h=67108863&(c=c+h|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):p(this,t,e),i},m.prototype.makeRBT=function(t){for(var e=new Array(t),i=n.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},m.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},m.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},m.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,c=u,d=0;d<s;d++){var p=i[f+d],m=r[f+d],g=i[f+d+s],v=r[f+d+s],b=l*g-c*v;v=l*v+c*g,g=b,i[f+d]=p+g,r[f+d]=m+v,i[f+d+s]=p-g,r[f+d+s]=m-v,d!==h&&(b=a*l-u*c,c=a*c+u*l,l=b)}},m.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},m.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}},m.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},m.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},m.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),c=i.words;c.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var d=0;d<r;d++){var p=h[d]*f[d]-a[d]*l[d];a[d]=h[d]*l[d]+a[d]*f[d],h[d]=p}return this.conjugate(h,a,r),this.transform(h,a,c,o,r,n),this.conjugate(c,o,r),this.normalize13b(c,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),p(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.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]&1<<n)>>>n}return e}(t);if(0===e.length)return new n(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var o=i.sqr();r<e.length;r++,o=o.sqr())0!==e[r]&&(i=i.mul(o));return i},n.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<r;this.words[e]=a|s,s=h>>>26-r}s&&(this.words[e]=s,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()},n.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=r;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},n.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+h;var a=(0|t.words[n])*e;h=((o-=67108863&a)>>26)-(a/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)h=(o=(0|this.words[n+r])+h)>>26,this.words[n+r]=67108863&o;if(0===h)return this.strip();for(i(-1===h),h=0,n=0;n<this.length;n++)h=(o=-(0|this.words[n])+h)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),o=t,s=0|o.words[o.length-1];0!=(i=26-this._countBits(s))&&(o=o.ushln(i),r.iushln(i),s=0|o.words[o.length-1]);var h,a=r.length-o.length;if("mod"!==e){(h=new n(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u<h.length;u++)h.words[u]=0}var f=r.clone()._ishlnsubmul(o,1,a);0===f.negative&&(r=f,h&&(h.words[a]=1));for(var l=a-1;l>=0;l--){var c=67108864*(0|r.words[o.length+l])+(0|r.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(o,c,l);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(o,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},n.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(o=h.div.neg()),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(o=h.div.neg()),{div:o,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,h},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},n.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),h=new n(0),a=new n(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(h),s.isub(a)):(r.isub(e),h.isub(o),a.isub(s))}return{a:h,b:a,gcd:r.iushln(u)}},n.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),h=new n(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,c=1;0==(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(h)):(r.isub(e),h.isub(s))}return(o=0===e.cmpn(1)?s:h).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var h=0|this.words[s];o=(h+=o)>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new _(t)},n.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(y,v),r(w,v),r(M,v),M.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},_.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new n(1)).iushrn(2);return this.pow(t,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);i(!o.isZero());var h=new n(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(h);){for(var m=d,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(g<p);var v=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(v),l=v.redSqr(),d=d.redMul(l),p=g}return c},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new n(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new n(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var o=i[0],s=0,h=0,a=e.bitLength()%26;for(0===a&&(a=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;o!==i[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(o=this.mul(o,i[s]),h=0,s=0)):h=0}a=26}return o},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},r(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Km,gt);var Gm=Hm,Vm=de.Buffer;var Ym=function(t,e){return Vm.from(t.toRed(Gm.mont(e.modulus)).redPow(new Gm(e.publicExponent)).fromRed().toArray())},Zm=Sm,Wm=le,Xm=ms,Qm=qm,Jm=Fm,$m=Hm,tg=Ym,eg=uf,ig=de.Buffer,rg=function(t,e,i){var r;r=t.padding?t.padding:i?1:4;var n,o=Zm(t);if(4===r)n=function(t,e){var i=t.modulus.byteLength(),r=e.length,n=Xm("sha1").update(ig.alloc(0)).digest(),o=n.length,s=2*o;if(r>i-s-2)throw new Error("message too long");var h=ig.alloc(i-r-s-2),a=i-o-1,u=Wm(o),f=Jm(ig.concat([n,h,ig.alloc(1,1),e],a),Qm(u,a)),l=Jm(u,Qm(f,o));return new $m(ig.concat([ig.alloc(1),l,f],i))}(o,e);else if(1===r)n=function(t,e,i){var r,n=e.length,o=t.modulus.byteLength();if(n>o-11)throw new Error("message too long");r=i?ig.alloc(o-n-3,255):function(t){var e,i=ig.allocUnsafe(t),r=0,n=Wm(2*t),o=0;for(;r<t;)o===n.length&&(n=Wm(2*t),o=0),(e=n[o++])&&(i[r++]=e);return i}(o-n-3);return new $m(ig.concat([ig.from([0,i?1:2]),r,ig.alloc(1),e],o))}(o,e,i);else{if(3!==r)throw new Error("unknown padding");if((n=new $m(e)).cmp(o.modulus)>=0)throw new Error("data too long for modulus")}return i?eg(n,o):tg(n,o)};var ng=Sm,og=qm,sg=Fm,hg=Hm,ag=uf,ug=ms,fg=Ym,lg=de.Buffer,cg=function(t,e,i){var r;r=t.padding?t.padding:i?1:4;var n,o=ng(t),s=o.modulus.byteLength();if(e.length>s||new hg(e).cmp(o.modulus)>=0)throw new Error("decryption error");n=i?fg(new hg(e),o):ag(e,o);var h=lg.alloc(s-n.length);if(n=lg.concat([h,n],s),4===r)return function(t,e){var i=t.modulus.byteLength(),r=ug("sha1").update(lg.alloc(0)).digest(),n=r.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,n+1),s=e.slice(n+1),h=sg(o,og(s,n)),a=sg(s,og(h,i-n-1));if(function(t,e){t=lg.from(t),e=lg.from(e);var i=0,r=t.length;t.length!==e.length&&(i++,r=Math.min(t.length,e.length));var n=-1;for(;++n<r;)i+=t[n]^e[n];return i}(r,a.slice(0,n)))throw new Error("decryption error");var u=n;for(;0===a[u];)u++;if(1!==a[u++])throw new Error("decryption error");return a.slice(u)}(o,n);if(1===r)return function(t,e,i){var r=e.slice(0,2),n=2,o=0;for(;0!==e[n++];)if(n>=e.length){o++;break}var s=e.slice(2,n-1);("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(n)}(0,n,i);if(3===r)return n;throw new Error("unknown padding")};!function(t){t.publicEncrypt=rg,t.privateDecrypt=cg,t.privateEncrypt=function(e,i){return t.publicEncrypt(e,i,!0)},t.publicDecrypt=function(e,i){return t.privateDecrypt(e,i,!0)}}(Cm);var dg={};function pg(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var mg,gg=de,vg=le,bg=gg.Buffer,yg=gg.kMaxLength,wg=gt.crypto||gt.msCrypto,Mg=Math.pow(2,32)-1;function _g(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>Mg||t<0)throw new TypeError("offset must be a uint32");if(t>yg||t>e)throw new RangeError("offset out of range")}function Sg(t,e,i){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>Mg||t<0)throw new TypeError("size must be a uint32");if(t+e>i||t>yg)throw new RangeError("buffer too small")}function Eg(t,e,i,r){if(ae.browser){var n=t.buffer,o=new Uint8Array(n,e,i);return wg.getRandomValues(o),r?void ae.nextTick((function(){r(null,t)})):t}if(!r)return vg(i).copy(t,e),t;vg(i,(function(i,n){if(i)return r(i);n.copy(t,e),r(null,t)}))}function Ag(){if(mg)return fe;mg=1,fe.randomBytes=fe.rng=fe.pseudoRandomBytes=fe.prng=le,fe.createHash=fe.Hash=ms,fe.createHmac=fe.Hmac=Ns;var t=xs,e=Object.keys(t),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);fe.getHashes=function(){return i};var r=js;fe.pbkdf2=r.pbkdf2,fe.pbkdf2Sync=r.pbkdf2Sync;var n=dh;fe.Cipher=n.Cipher,fe.createCipher=n.createCipher,fe.Cipheriv=n.Cipheriv,fe.createCipheriv=n.createCipheriv,fe.Decipher=n.Decipher,fe.createDecipher=n.createDecipher,fe.Decipheriv=n.Decipheriv,fe.createDecipheriv=n.createDecipheriv,fe.getCiphers=n.getCiphers,fe.listCiphers=n.listCiphers;var o=function(){if(Qu)return xu;Qu=1;var t=Zu(),e=Ju,i=$u(),r={binary:!0,hex:!0,base64:!0};return xu.DiffieHellmanGroup=xu.createDiffieHellmanGroup=xu.getDiffieHellman=function(t){var r=new T(e[t].prime,"hex"),n=new T(e[t].gen,"hex");return new i(r,n)},xu.createDiffieHellman=xu.DiffieHellman=function e(n,o,s,h){return T.isBuffer(o)||void 0===r[o]?e(n,"binary",o,s):(o=o||"binary",h=h||"binary",s=s||new T([2]),T.isBuffer(s)||(s=new T(s,h)),"number"==typeof n?new i(t(n,s),s,!0):(T.isBuffer(n)||(n=new T(n,o)),new i(n,s,!0)))},xu}();fe.DiffieHellmanGroup=o.DiffieHellmanGroup,fe.createDiffieHellmanGroup=o.createDiffieHellmanGroup,fe.getDiffieHellman=o.getDiffieHellman,fe.createDiffieHellman=o.createDiffieHellman,fe.DiffieHellman=o.DiffieHellman;var s=function(){if(Im)return Om;Im=1;var t=de.Buffer,e=ms,i=_e,r=we,n=Bm(),o=Pm(),s=Ds;function h(t){i.Writable.call(this);var r=s[t];if(!r)throw new Error("Unknown message digest");this._hashType=r.hash,this._hash=e(r.hash),this._tag=r.id,this._signType=r.sign}function a(t){i.Writable.call(this);var r=s[t];if(!r)throw new Error("Unknown message digest");this._hash=e(r.hash),this._tag=r.id,this._signType=r.sign}function u(t){return new h(t)}function f(t){return new a(t)}return Object.keys(s).forEach((function(e){s[e].id=t.from(s[e].id,"hex"),s[e.toLowerCase()]=s[e]})),r(h,i.Writable),h.prototype._write=function(t,e,i){this._hash.update(t),i()},h.prototype.update=function(e,i){return"string"==typeof e&&(e=t.from(e,i)),this._hash.update(e),this},h.prototype.sign=function(t,e){this.end();var i=this._hash.digest(),r=n(i,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},r(a,i.Writable),a.prototype._write=function(t,e,i){this._hash.update(t),i()},a.prototype.update=function(e,i){return"string"==typeof e&&(e=t.from(e,i)),this._hash.update(e),this},a.prototype.verify=function(e,i,r){"string"==typeof i&&(i=t.from(i,r)),this.end();var n=this._hash.digest();return o(i,n,e,this._signType,this._tag)},Om={Sign:u,Verify:f,createSign:u,createVerify:f}}();fe.createSign=s.createSign,fe.Sign=s.Sign,fe.createVerify=s.createVerify,fe.Verify=s.Verify,fe.createECDH=function(){if(xm)return Nm;xm=1;var t=Ld(),e=Lm;Nm=function(t){return new r(t)};var i={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function r(e){this.curveType=i[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function n(t,e,i){Array.isArray(t)||(t=t.toArray());var r=new T(t);if(i&&r.length<i){var n=new T(i-r.length);n.fill(0),r=T.concat([n,r])}return e?r.toString(e):r}return i.p224=i.secp224r1,i.p256=i.secp256r1=i.prime256v1,i.p192=i.secp192r1=i.prime192v1,i.p384=i.secp384r1,i.p521=i.secp521r1,r.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},r.prototype.computeSecret=function(t,e,i){return e=e||"utf8",T.isBuffer(t)||(t=new T(t,e)),n(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),i,this.curveType.byteLength)},r.prototype.getPublicKey=function(t,e){var i=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(i[i.length-1]%2?i[0]=7:i[0]=6),n(i,t)},r.prototype.getPrivateKey=function(t){return n(this.keys.getPrivate(),t)},r.prototype.setPublicKey=function(t,e){return e=e||"utf8",T.isBuffer(t)||(t=new T(t,e)),this.keys._importPublic(t),this},r.prototype.setPrivateKey=function(t,i){i=i||"utf8",T.isBuffer(t)||(t=new T(t,i));var r=new e(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this},Nm}();var h=Cm;fe.publicEncrypt=h.publicEncrypt,fe.privateEncrypt=h.privateEncrypt,fe.publicDecrypt=h.publicDecrypt,fe.privateDecrypt=h.privateDecrypt;var a=dg;return fe.randomFill=a.randomFill,fe.randomFillSync=a.randomFillSync,fe.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},fe.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},fe}wg&&wg.getRandomValues||!ae.browser?(dg.randomFill=function(t,e,i,r){if(!(bg.isBuffer(t)||t instanceof gt.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)r=e,e=0,i=t.length;else if("function"==typeof i)r=i,i=t.length-e;else if("function"!=typeof r)throw new TypeError('"cb" argument must be a function');return _g(e,t.length),Sg(i,e,t.length),Eg(t,e,i,r)},dg.randomFillSync=function(t,e,i){void 0===e&&(e=0);if(!(bg.isBuffer(t)||t instanceof gt.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');_g(e,t.length),void 0===i&&(i=t.length-e);return Sg(i,e,t.length),Eg(t,e,i)}):(dg.randomFill=pg,dg.randomFillSync=pg),Ag(),ue.linebrk=function(t,e){for(var i="",r=0;r+e<t.length;)i+=t.substring(r,r+e)+"\n",r+=e;return i+t.substring(r,t.length)},ue.detectEnvironment=function(){return"undefined"==typeof window||!window||ae&&"node"===ae.title?"node":"browser"},ue.get32IntFromBuffer=function(t,e){e=e||0;var i;if((i=t.length-e)>0){if(i>=4)return t.readUIntBE(e,i);for(var r=0,n=e+i,o=0;n>e;n--,o+=2)r+=t[n-1]*Math.pow(16,o);return r}return NaN},ue._={isObject:function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)},isString:function(t){return"string"==typeof t||t instanceof String},isNumber:function(t){return"number"==typeof t||!isNaN(parseFloat(t))&&isFinite(t)},omit:function(t,e){var i={};for(var r in t)t.hasOwnProperty(r)&&r!==e&&(i[r]=t[r]);return i}},ue.trimSurroundingText=function(t,e,i){var r=0,n=t.length,o=t.indexOf(e);o>=0&&(r=o+e.length);var s=t.indexOf(i,o);return s>=0&&(n=s),t.substring(r,n)};var kg=Ag(),Rg=ue._;function Og(t,e){null!=t&&("number"==typeof t?this.fromNumber(t,e):T.isBuffer(t)?this.fromBuffer(t):null==e&&"string"!=typeof t?this.fromByteArray(t):this.fromString(t,e))}function Ig(){return new Og(null)}Og.prototype.am=function(t,e,i,r,n,o){for(var s=16383&e,h=e>>14;--o>=0;){var a=16383&this[t],u=this[t++]>>14,f=h*a+u*s;n=((a=s*a+((16383&f)<<14)+i[r]+n)>>28)+(f>>14)+h*u,i[r++]=268435455&a}return n},Og.prototype.DB=28,Og.prototype.DM=268435455,Og.prototype.DV=1<<28;Og.prototype.FV=Math.pow(2,52),Og.prototype.F1=24,Og.prototype.F2=4;var Tg,Bg,Pg="0123456789abcdefghijklmnopqrstuvwxyz",Ng=new Array;for(Tg="0".charCodeAt(0),Bg=0;Bg<=9;++Bg)Ng[Tg++]=Bg;for(Tg="a".charCodeAt(0),Bg=10;Bg<36;++Bg)Ng[Tg++]=Bg;for(Tg="A".charCodeAt(0),Bg=10;Bg<36;++Bg)Ng[Tg++]=Bg;function xg(t){return Pg.charAt(t)}function Lg(t,e){var i=Ng[t.charCodeAt(e)];return null==i?-1:i}function Dg(t){var e=Ig();return e.fromInt(t),e}function Cg(t){var e,i=1;return 0!=(e=t>>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=(e=t>>1)&&(t=e,i+=1),i}function jg(t){this.m=t}function Ug(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function qg(t,e){return t&e}function zg(t,e){return t|e}function Fg(t,e){return t^e}function Hg(t,e){return t&~e}function Kg(t){if(0===t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function Gg(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function Vg(){}function Yg(t){return t}function Zg(t){this.r2=Ig(),this.q3=Ig(),Og.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}jg.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},jg.prototype.revert=function(t){return t},jg.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},jg.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},jg.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},Ug.prototype.convert=function(t){var e=Ig();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(Og.ZERO)>0&&this.m.subTo(e,e),e},Ug.prototype.revert=function(t){var e=Ig();return t.copyTo(e),this.reduce(e),e},Ug.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var i=32767&t[e],r=i*this.mpl+((i*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},Ug.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},Ug.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},Vg.prototype.convert=Yg,Vg.prototype.revert=Yg,Vg.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i)},Vg.prototype.sqrTo=function(t,e){t.squareTo(e)},Zg.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=Ig();return t.copyTo(e),this.reduce(e),e},Zg.prototype.revert=function(t){return t},Zg.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},Zg.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},Zg.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var Wg=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Xg=(1<<26)/Wg[Wg.length-1];Og.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},Og.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0},Og.prototype.fromString=function(t,e,i){var r;switch(e){case 2:r=1;break;case 4:r=2;break;case 8:r=3;break;case 16:r=4;break;case 32:r=5;break;case 256:r=8;break;default:return void this.fromRadix(t,e)}this.t=0,this.s=0;for(var n=t.length,o=!1,s=0;--n>=0;){var h=8==r?255&t[n]:Lg(t,n);h<0?"-"==t.charAt(n)&&(o=!0):(o=!1,0===s?this[this.t++]=h:s+r>this.DB?(this[this.t-1]|=(h&(1<<this.DB-s)-1)<<s,this[this.t++]=h>>this.DB-s):this[this.t-1]|=h<<s,(s+=r)>=this.DB&&(s-=this.DB))}i||8!=r||0==(128&t[0])||(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&Og.ZERO.subTo(this,this)},Og.prototype.fromByteArray=function(t,e){this.fromString(t,256,e)},Og.prototype.fromBuffer=function(t){this.fromString(t,256,!0)},Og.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},Og.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s},Og.prototype.drShiftTo=function(t,e){for(var i=t;i<this.t;++i)e[i-t]=this[i];e.t=Math.max(this.t-t,0),e.s=this.s},Og.prototype.lShiftTo=function(t,e){var i,r=t%this.DB,n=this.DB-r,o=(1<<n)-1,s=Math.floor(t/this.DB),h=this.s<<r&this.DM;for(i=this.t-1;i>=0;--i)e[i+s+1]=this[i]>>n|h,h=(this[i]&o)<<r;for(i=s-1;i>=0;--i)e[i]=0;e[s]=h,e.t=this.t+s+1,e.s=this.s,e.clamp()},Og.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var r=t%this.DB,n=this.DB-r,o=(1<<r)-1;e[0]=this[i]>>r;for(var s=i+1;s<this.t;++s)e[s-i-1]|=(this[s]&o)<<n,e[s-i]=this[s]>>r;r>0&&(e[this.t-i-1]|=(this.s&o)<<n),e.t=this.t-i,e.clamp()}},Og.prototype.subTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]-t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r-=t[i],e[i++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[i++]=this.DV+r:r>0&&(e[i++]=r),e.t=i,e.clamp()},Og.prototype.multiplyTo=function(t,e){var i=this.abs(),r=t.abs(),n=i.t;for(e.t=n+r.t;--n>=0;)e[n]=0;for(n=0;n<r.t;++n)e[n+i.t]=i.am(0,r[n],e,n,0,i.t);e.s=0,e.clamp(),this.s!=t.s&&Og.ZERO.subTo(e,e)},Og.prototype.squareTo=function(t){for(var e=this.abs(),i=t.t=2*e.t;--i>=0;)t[i]=0;for(i=0;i<e.t-1;++i){var r=e.am(i,e[i],t,2*i,0,1);(t[i+e.t]+=e.am(i+1,2*e[i],t,2*i+1,r,e.t-i-1))>=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},Og.prototype.divRemTo=function(t,e,i){var r=t.abs();if(!(r.t<=0)){var n=this.abs();if(n.t<r.t)return null!=e&&e.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=Ig());var o=Ig(),s=this.s,h=t.s,a=this.DB-Cg(r[r.t-1]);a>0?(r.lShiftTo(a,o),n.lShiftTo(a,i)):(r.copyTo(o),n.copyTo(i));var u=o.t,f=o[u-1];if(0!==f){var l=f*(1<<this.F1)+(u>1?o[u-2]>>this.F2:0),c=this.FV/l,d=(1<<this.F1)/l,p=1<<this.F2,m=i.t,g=m-u,v=null==e?Ig():e;for(o.dlShiftTo(g,v),i.compareTo(v)>=0&&(i[i.t++]=1,i.subTo(v,i)),Og.ONE.dlShiftTo(u,v),v.subTo(o,o);o.t<u;)o[o.t++]=0;for(;--g>=0;){var b=i[--m]==f?this.DM:Math.floor(i[m]*c+(i[m-1]+p)*d);if((i[m]+=o.am(0,b,i,g,0,u))<b)for(o.dlShiftTo(g,v),i.subTo(v,i);i[m]<--b;)i.subTo(v,i)}null!=e&&(i.drShiftTo(u,e),s!=h&&Og.ZERO.subTo(e,e)),i.t=u,i.clamp(),a>0&&i.rShiftTo(a,i),s<0&&Og.ZERO.subTo(i,i)}}},Og.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},Og.prototype.isEven=function(){return 0===(this.t>0?1&this[0]:this.s)},Og.prototype.exp=function(t,e){if(t>4294967295||t<1)return Og.ONE;var i=Ig(),r=Ig(),n=e.convert(this),o=Cg(t)-1;for(n.copyTo(i);--o>=0;)if(e.sqrTo(i,r),(t&1<<o)>0)e.mulTo(r,n,i);else{var s=i;i=r,r=s}return e.revert(i)},Og.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},Og.prototype.toRadix=function(t){if(null==t&&(t=10),0===this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),r=Dg(i),n=Ig(),o=Ig(),s="";for(this.divRemTo(r,n,o);n.signum()>0;)s=(i+o.intValue()).toString(t).substr(1)+s,n.divRemTo(r,n,o);return o.intValue().toString(t)+s},Og.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var i=this.chunkSize(e),r=Math.pow(e,i),n=!1,o=0,s=0,h=0;h<t.length;++h){var a=Lg(t,h);a<0?"-"==t.charAt(h)&&0===this.signum()&&(n=!0):(s=e*s+a,++o>=i&&(this.dMultiply(r),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),n&&Og.ZERO.subTo(this,this)},Og.prototype.fromNumber=function(t,e){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t),this.testBit(t-1)||this.bitwiseTo(Og.ONE.shiftLeft(t-1),zg,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(Og.ONE.shiftLeft(t-1),this);else{var i=kg.randomBytes(1+(t>>3)),r=7&t;r>0?i[0]&=(1<<r)-1:i[0]=0,this.fromByteArray(i)}},Og.prototype.bitwiseTo=function(t,e,i){var r,n,o=Math.min(t.t,this.t);for(r=0;r<o;++r)i[r]=e(this[r],t[r]);if(t.t<this.t){for(n=t.s&this.DM,r=o;r<this.t;++r)i[r]=e(this[r],n);i.t=this.t}else{for(n=this.s&this.DM,r=o;r<t.t;++r)i[r]=e(n,t[r]);i.t=t.t}i.s=e(this.s,t.s),i.clamp()},Og.prototype.changeBit=function(t,e){var i=Og.ONE.shiftLeft(t);return this.bitwiseTo(i,e,i),i},Og.prototype.addTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]+t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r+=t[i],e[i++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[i++]=r:r<-1&&(e[i++]=this.DV+r),e.t=i,e.clamp()},Og.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},Og.prototype.dAddOffset=function(t,e){if(0!==t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},Og.prototype.multiplyLowerTo=function(t,e,i){var r,n=Math.min(this.t+t.t,e);for(i.s=0,i.t=n;n>0;)i[--n]=0;for(r=i.t-this.t;n<r;++n)i[n+this.t]=this.am(0,t[n],i,n,0,this.t);for(r=Math.min(t.t,e);n<r;++n)this.am(0,t[n],i,n,0,e-n);i.clamp()},Og.prototype.multiplyUpperTo=function(t,e,i){--e;var r=i.t=this.t+t.t-e;for(i.s=0;--r>=0;)i[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)i[this.t+r-e]=this.am(e-r,t[r],i,0,0,this.t+r-e);i.clamp(),i.drShiftTo(1,i)},Og.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,i=this.s<0?t-1:0;if(this.t>0)if(0===e)i=this[0]%t;else for(var r=this.t-1;r>=0;--r)i=(e*i+this[r])%t;return i},Og.prototype.millerRabin=function(t){var e=this.subtract(Og.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var r=e.shiftRight(i);(t=t+1>>1)>Wg.length&&(t=Wg.length);for(var n=Ig(),o=0;o<t;++o){n.fromInt(Wg[Math.floor(Math.random()*Wg.length)]);var s=n.modPow(r,this);if(0!=s.compareTo(Og.ONE)&&0!=s.compareTo(e)){for(var h=1;h++<i&&0!=s.compareTo(e);)if(0===(s=s.modPowInt(2,this)).compareTo(Og.ONE))return!1;if(0!=s.compareTo(e))return!1}}return!0},Og.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var i,r=(1<<e)-1,n=!1,o="",s=this.t,h=this.DB-s*this.DB%e;if(s-- >0)for(h<this.DB&&(i=this[s]>>h)>0&&(n=!0,o=xg(i));s>=0;)h<e?(i=(this[s]&(1<<h)-1)<<e-h,i|=this[--s]>>(h+=this.DB-e)):(i=this[s]>>(h-=e)&r,h<=0&&(h+=this.DB,--s)),i>0&&(n=!0),n&&(o+=xg(i));return n?o:"0"},Og.prototype.negate=function(){var t=Ig();return Og.ZERO.subTo(this,t),t},Og.prototype.abs=function(){return this.s<0?this.negate():this},Og.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var i=this.t;if(0!=(e=i-t.t))return this.s<0?-e:e;for(;--i>=0;)if(0!=(e=this[i]-t[i]))return e;return 0},Og.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Cg(this[this.t-1]^this.s&this.DM)},Og.prototype.mod=function(t){var e=Ig();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Og.ZERO)>0&&t.subTo(e,e),e},Og.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new jg(e):new Ug(e),this.exp(t,i)},Og.prototype.clone=function(){var t=Ig();return this.copyTo(t),t},Og.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0===this.t)return-1}else{if(1==this.t)return this[0];if(0===this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},Og.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},Og.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},Og.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},Og.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var i,r=this.DB-t*this.DB%8,n=0;if(t-- >0)for(r<this.DB&&(i=this[t]>>r)!=(this.s&this.DM)>>r&&(e[n++]=i|this.s<<this.DB-r);t>=0;)r<8?(i=(this[t]&(1<<r)-1)<<8-r,i|=this[--t]>>(r+=this.DB-8)):(i=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&i)&&(i|=-256),0===n&&(128&this.s)!=(128&i)&&++n,(n>0||i!=this.s)&&(e[n++]=i);return e},Og.prototype.toBuffer=function(t){var e=T.from(this.toByteArray());if(!0===t&&0===e[0])e=e.slice(1);else if(Rg.isNumber(t)){if(e.length>t){for(var i=0;i<e.length-t;i++)if(0!==e[i])return null;return e.slice(e.length-t)}if(e.length<t){var r=T.alloc(t);return r.fill(0,0,t-e.length),e.copy(r,t-e.length),r}}return e},Og.prototype.equals=function(t){return 0==this.compareTo(t)},Og.prototype.min=function(t){return this.compareTo(t)<0?this:t},Og.prototype.max=function(t){return this.compareTo(t)>0?this:t},Og.prototype.and=function(t){var e=Ig();return this.bitwiseTo(t,qg,e),e},Og.prototype.or=function(t){var e=Ig();return this.bitwiseTo(t,zg,e),e},Og.prototype.xor=function(t){var e=Ig();return this.bitwiseTo(t,Fg,e),e},Og.prototype.andNot=function(t){var e=Ig();return this.bitwiseTo(t,Hg,e),e},Og.prototype.not=function(){for(var t=Ig(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},Og.prototype.shiftLeft=function(t){var e=Ig();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},Og.prototype.shiftRight=function(t){var e=Ig();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},Og.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+Kg(this[t]);return this.s<0?this.t*this.DB:-1},Og.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,i=0;i<this.t;++i)t+=Gg(this[i]^e);return t},Og.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},Og.prototype.setBit=function(t){return this.changeBit(t,zg)},Og.prototype.clearBit=function(t){return this.changeBit(t,Hg)},Og.prototype.flipBit=function(t){return this.changeBit(t,Fg)},Og.prototype.add=function(t){var e=Ig();return this.addTo(t,e),e},Og.prototype.subtract=function(t){var e=Ig();return this.subTo(t,e),e},Og.prototype.multiply=function(t){var e=Ig();return this.multiplyTo(t,e),e},Og.prototype.divide=function(t){var e=Ig();return this.divRemTo(t,e,null),e},Og.prototype.remainder=function(t){var e=Ig();return this.divRemTo(t,null,e),e},Og.prototype.divideAndRemainder=function(t){var e=Ig(),i=Ig();return this.divRemTo(t,e,i),new Array(e,i)},Og.prototype.modPow=function(t,e){var i,r,n=t.bitLength(),o=Dg(1);if(n<=0)return o;i=n<18?1:n<48?3:n<144?4:n<768?5:6,r=n<8?new jg(e):e.isEven()?new Zg(e):new Ug(e);var s=new Array,h=3,a=i-1,u=(1<<i)-1;if(s[1]=r.convert(this),i>1){var f=Ig();for(r.sqrTo(s[1],f);h<=u;)s[h]=Ig(),r.mulTo(f,s[h-2],s[h]),h+=2}var l,c,d=t.t-1,p=!0,m=Ig();for(n=Cg(t[d])-1;d>=0;){for(n>=a?l=t[d]>>n-a&u:(l=(t[d]&(1<<n+1)-1)<<a-n,d>0&&(l|=t[d-1]>>this.DB+n-a)),h=i;0==(1&l);)l>>=1,--h;if((n-=h)<0&&(n+=this.DB,--d),p)s[l].copyTo(o),p=!1;else{for(;h>1;)r.sqrTo(o,m),r.sqrTo(m,o),h-=2;h>0?r.sqrTo(o,m):(c=o,o=m,m=c),r.mulTo(m,s[l],o)}for(;d>=0&&0==(t[d]&1<<n);)r.sqrTo(o,m),c=o,o=m,m=c,--n<0&&(n=this.DB-1,--d)}return r.revert(o)},Og.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0===t.signum())return Og.ZERO;for(var i=t.clone(),r=this.clone(),n=Dg(1),o=Dg(0),s=Dg(0),h=Dg(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),e?(n.isEven()&&o.isEven()||(n.addTo(this,n),o.subTo(t,o)),n.rShiftTo(1,n)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),e?(s.isEven()&&h.isEven()||(s.addTo(this,s),h.subTo(t,h)),s.rShiftTo(1,s)):h.isEven()||h.subTo(t,h),h.rShiftTo(1,h);i.compareTo(r)>=0?(i.subTo(r,i),e&&n.subTo(s,n),o.subTo(h,o)):(r.subTo(i,r),e&&s.subTo(n,s),h.subTo(o,h))}return 0!=r.compareTo(Og.ONE)?Og.ZERO:h.compareTo(t)>=0?h.subtract(t):h.signum()<0?(h.addTo(t,h),h.signum()<0?h.add(t):h):h},Og.prototype.pow=function(t){return this.exp(t,new Vg)},Og.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var r=e;e=i,i=r}var n=e.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)return e;for(n<o&&(o=n),o>0&&(e.rShiftTo(o,e),i.rShiftTo(o,i));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=i.getLowestSetBit())>0&&i.rShiftTo(n,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return o>0&&i.lShiftTo(o,i),i},Og.prototype.isProbablePrime=function(t){var e,i=this.abs();if(1==i.t&&i[0]<=Wg[Wg.length-1]){for(e=0;e<Wg.length;++e)if(i[0]==Wg[e])return!0;return!1}if(i.isEven())return!1;for(e=1;e<Wg.length;){for(var r=Wg[e],n=e+1;n<Wg.length&&r<Xg;)r*=Wg[n++];for(r=i.modInt(r);e<n;)if(r%Wg[e++]==0)return!1}return i.millerRabin(t)},Og.int2char=xg,Og.ZERO=Dg(0),Og.ONE=Dg(1),Og.prototype.square=function(){var t=Ig();return this.squareTo(t),t};var Qg=Og,Jg={},$g={get exports(){return Jg},set exports(t){Jg=t}},tv={},ev={get exports(){return tv},set exports(t){tv=t}},iv=Qg,rv=Ag(),nv=Dt,ov={md2:T.from("3020300c06082a864886f70d020205000410","hex"),md5:T.from("3020300c06082a864886f70d020505000410","hex"),sha1:T.from("3021300906052b0e03021a05000414","hex"),sha224:T.from("302d300d06096086480165030402040500041c","hex"),sha256:T.from("3031300d060960864801650304020105000420","hex"),sha384:T.from("3041300d060960864801650304020205000430","hex"),sha512:T.from("3051300d060960864801650304020305000440","hex"),ripemd160:T.from("3021300906052b2403020105000414","hex"),rmd160:T.from("3021300906052b2403020105000414","hex")},sv={ripemd160:"rmd160"},hv="sha256";ev.exports={isEncryption:!0,isSignature:!0},tv.makeScheme=function(t,e){function i(t,e){this.key=t,this.options=e}return i.prototype.maxMessageLength=function(){return this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==nv.RSA_NO_PADDING?this.key.encryptedDataLength:this.key.encryptedDataLength-11},i.prototype.encPad=function(t,e){var i;if(e=e||{},t.length>this.key.maxMessageLength)throw new Error("Message too long for RSA (n="+this.key.encryptedDataLength+", l="+t.length+")");if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==nv.RSA_NO_PADDING)return(i=T.alloc(this.key.maxMessageLength-t.length)).fill(0),T.concat([i,t]);if(1===e.type)return(i=T.alloc(this.key.encryptedDataLength-t.length-1)).fill(255,0,i.length-1),i[0]=1,i[i.length-1]=0,T.concat([i,t]);(i=T.alloc(this.key.encryptedDataLength-t.length))[0]=0,i[1]=2;for(var r=rv.randomBytes(i.length-3),n=0;n<r.length;n++){for(var o=r[n];0===o;)o=rv.randomBytes(1)[0];i[n+2]=o}return i[i.length-1]=0,T.concat([i,t])},i.prototype.encUnPad=function(t,e){e=e||{};var i=0;if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==nv.RSA_NO_PADDING)return"function"==typeof t.lastIndexOf?t.slice(t.lastIndexOf("\0")+1,t.length):t.slice(String.prototype.lastIndexOf.call(t,"\0")+1,t.length);if(t.length<4)return null;if(1===e.type){if(0!==t[0]||1!==t[1])return null;for(i=3;0!==t[i];)if(255!=t[i]||++i>=t.length)return null}else{if(0!==t[0]||2!==t[1])return null;for(i=3;0!==t[i];)if(++i>=t.length)return null}return t.slice(i+1,t.length)},i.prototype.sign=function(t){var e=this.options.signingSchemeOptions.hash||hv;if("browser"===this.options.environment){e=sv[e]||e;var i=rv.createHash(e);i.update(t);var r=this.pkcs1pad(i.digest(),e);return this.key.$doPrivate(new iv(r)).toBuffer(this.key.encryptedDataLength)}var n=rv.createSign("RSA-"+e.toUpperCase());return n.update(t),n.sign(this.options.rsaUtils.exportKey("private"))},i.prototype.verify=function(t,e,i){if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==nv.RSA_NO_PADDING)return!1;var r=this.options.signingSchemeOptions.hash||hv;if("browser"===this.options.environment){r=sv[r]||r,i&&(e=T.from(e,i));var n=rv.createHash(r);n.update(t);var o=this.pkcs1pad(n.digest(),r);return this.key.$doPublic(new iv(e)).toBuffer().toString("hex")==o.toString("hex")}var s=rv.createVerify("RSA-"+r.toUpperCase());return s.update(t),s.verify(this.options.rsaUtils.exportKey("public"),e,i)},i.prototype.pkcs0pad=function(t){var e=T.alloc(this.key.maxMessageLength-t.length);return e.fill(0),T.concat([e,t])},i.prototype.pkcs0unpad=function(t){return"function"==typeof t.lastIndexOf?t.slice(t.lastIndexOf("\0")+1,t.length):t.slice(String.prototype.lastIndexOf.call(t,"\0")+1,t.length)},i.prototype.pkcs1pad=function(t,e){var i=ov[e];if(!i)throw Error("Unsupported hash algorithm");var r=T.concat([i,t]);if(r.length+10>this.key.encryptedDataLength)throw Error("Key is too short for signing algorithm ("+e+")");var n=T.alloc(this.key.encryptedDataLength-r.length-1);return n.fill(255,0,n.length-1),n[0]=1,n[n.length-1]=0,T.concat([n,r])},new i(t,e)};var av={},uv={get exports(){return av},set exports(t){av=t}};!function(t){var e=Ag();t.exports={isEncryption:!0,isSignature:!1},t.exports.digestLength={md4:16,md5:16,ripemd160:20,rmd160:20,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64};var i="sha1";t.exports.eme_oaep_mgf1=function(r,n,o){o=o||i;for(var s=t.exports.digestLength[o],h=Math.ceil(n/s),a=T.alloc(s*h),u=T.alloc(4),f=0;f<h;++f){var l=e.createHash(o);l.update(r),u.writeUInt32BE(f,0),l.update(u),l.digest().copy(a,f*s)}return a.slice(0,n)},t.exports.makeScheme=function(r,n){function o(t,e){this.key=t,this.options=e}return o.prototype.maxMessageLength=function(){return this.key.encryptedDataLength-2*t.exports.digestLength[this.options.encryptionSchemeOptions.hash||i]-2},o.prototype.encPad=function(r){var n=this.options.encryptionSchemeOptions.hash||i,o=this.options.encryptionSchemeOptions.mgf||t.exports.eme_oaep_mgf1,s=this.options.encryptionSchemeOptions.label||T.alloc(0),h=this.key.encryptedDataLength,a=t.exports.digestLength[n];if(r.length>h-2*a-2)throw new Error("Message is too long to encode into an encoded message with a length of "+h+" bytes, increaseemLen to fix this error (minimum value for given parameters and options: "+(h-2*a-2)+")");var u=e.createHash(n);u.update(s),u=u.digest();var f=T.alloc(h-r.length-2*a-1);f.fill(0),f[f.length-1]=1;for(var l=T.concat([u,f,r]),c=e.randomBytes(a),d=o(c,l.length,n),p=0;p<l.length;p++)l[p]^=d[p];for(d=o(l,a,n),p=0;p<c.length;p++)c[p]^=d[p];var m=T.alloc(1+c.length+l.length);return m[0]=0,c.copy(m,1),l.copy(m,1+c.length),m},o.prototype.encUnPad=function(r){var n=this.options.encryptionSchemeOptions.hash||i,o=this.options.encryptionSchemeOptions.mgf||t.exports.eme_oaep_mgf1,s=this.options.encryptionSchemeOptions.label||T.alloc(0),h=t.exports.digestLength[n];if(r.length<2*h+2)throw new Error("Error decoding message, the supplied message is not long enough to be a valid OAEP encoded message");for(var a=r.slice(1,h+1),u=r.slice(1+h),f=o(u,h,n),l=0;l<a.length;l++)a[l]^=f[l];for(f=o(a,u.length,n),l=0;l<u.length;l++)u[l]^=f[l];var c=e.createHash(n);if(c.update(s),c=c.digest(),u.slice(0,h).toString("hex")!=c.toString("hex"))throw new Error("Error decoding message, the lHash calculated from the label provided and the lHash in the encrypted data do not match.");for(l=h;0===u[l++]&&l<u.length;);if(1!=u[l-1])throw new Error("Error decoding message, there is no padding message separator byte");return u.slice(l)},new o(r,n)}}(uv);var fv,lv,cv,dv,pv,mv,gv,vv,bv={},yv={get exports(){return bv},set exports(t){bv=t}};function wv(){if(fv)return bv;fv=1;var t=Qg,e=Ag();yv.exports={isEncryption:!1,isSignature:!0};var i="sha1";return bv.makeScheme=function(r,n){var o=Mv().pkcs1_oaep;function s(t,e){this.key=t,this.options=e}return s.prototype.sign=function(r){var n=e.createHash(this.options.signingSchemeOptions.hash||i);n.update(r);var o=this.emsa_pss_encode(n.digest(),this.key.keySize-1);return this.key.$doPrivate(new t(o)).toBuffer(this.key.encryptedDataLength)},s.prototype.verify=function(r,n,o){o&&(n=T.from(n,o)),n=new t(n);var s=Math.ceil((this.key.keySize-1)/8),h=this.key.$doPublic(n).toBuffer(s),a=e.createHash(this.options.signingSchemeOptions.hash||i);return a.update(r),this.emsa_pss_verify(a.digest(),h,this.key.keySize-1)},s.prototype.emsa_pss_encode=function(t,r){var n=this.options.signingSchemeOptions.hash||i,s=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,h=this.options.signingSchemeOptions.saltLength||20,a=o.digestLength[n],u=Math.ceil(r/8);if(u<a+h+2)throw new Error("Output length passed to emBits("+r+") is too small for the options specified("+n+", "+h+"). To fix this issue increase the value of emBits. (minimum size: "+(8*a+8*h+9)+")");var f=e.randomBytes(h),l=T.alloc(8+a+h);l.fill(0,0,8),t.copy(l,8),f.copy(l,8+t.length);var c=e.createHash(n);c.update(l),c=c.digest();var d=T.alloc(u-f.length-a-2);d.fill(0);var p=T.alloc(d.length+1+f.length);d.copy(p),p[d.length]=1,f.copy(p,d.length+1);for(var m=s(c,p.length,n),g=T.alloc(p.length),v=0;v<m.length;v++)g[v]=p[v]^m[v];var b=8*u-r,y=255^255>>8-b<<8-b;g[0]=g[0]&y;var w=T.alloc(g.length+c.length+1);return g.copy(w,0),c.copy(w,g.length),w[w.length-1]=188,w},s.prototype.emsa_pss_verify=function(t,r,n){var s=this.options.signingSchemeOptions.hash||i,h=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,a=this.options.signingSchemeOptions.saltLength||20,u=o.digestLength[s],f=Math.ceil(n/8);if(f<u+a+2||188!=r[r.length-1])return!1;var l=T.alloc(f-u-1);r.copy(l,0,0,f-u-1);for(var c=0,d=0,p=8*f-n;d<p;d++)c|=1<<7-d;if(0!=(l[0]&c))return!1;var m=r.slice(f-u-1,f-1),g=h(m,l.length,s);for(d=0;d<l.length;d++)l[d]^=g[d];for(c=255^255>>8-(p=8*f-n)<<8-p,l[0]=l[0]&c,d=0;0===l[d]&&d<l.length;d++);if(1!=l[d])return!1;var v=l.slice(l.length-a),b=T.alloc(8+u+a);b.fill(0,0,8),t.copy(b,8),v.copy(b,8+t.length);var y=e.createHash(s);return y.update(b),y=y.digest(),m.toString("hex")===y.toString("hex")},new s(r,n)},bv}function Mv(){return lv||(lv=1,function(t){t.exports={pkcs1:tv,pkcs1_oaep:av,pss:wv(),isEncryption:function(e){return t.exports[e]&&t.exports[e].isEncryption},isSignature:function(e){return t.exports[e]&&t.exports[e].isSignature}}}($g)),Jg}function _v(){if(dv)return cv;dv=1;var t=Qg,e=Mv();return cv=function(i,r){var n=e.pkcs1.makeScheme(i,r);return{encrypt:function(e,r){var o,s;return r?(o=new t(n.encPad(e,{type:1})),s=i.$doPrivate(o)):(o=new t(i.encryptionScheme.encPad(e)),s=i.$doPublic(o)),s.toBuffer(i.encryptedDataLength)},decrypt:function(e,r){var o,s=new t(e);return r?(o=i.$doPublic(s),n.encUnPad(o.toBuffer(i.encryptedDataLength),{type:1})):(o=i.$doPrivate(s),i.encryptionScheme.encUnPad(o.toBuffer(i.encryptedDataLength)))}}},cv}var Sv=Ag(),Ev={getEngine:function(t,e){var i=_v();return"node"===e.environment&&"function"==typeof Sv.publicEncrypt&&"function"==typeof Sv.privateDecrypt&&(i="function"==typeof Sv.privateEncrypt&&"function"==typeof Sv.publicDecrypt?function(){if(mv)return pv;mv=1;var t=Ag(),e=Dt,i=Mv();return pv=function(r,n){var o=i.pkcs1.makeScheme(r,n);return{encrypt:function(i,r){var s;if(r)return s=e.RSA_PKCS1_PADDING,n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding),t.privateEncrypt({key:n.rsaUtils.exportKey("private"),padding:s},i);s=e.RSA_PKCS1_OAEP_PADDING,"pkcs1"===n.encryptionScheme&&(s=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding);var h=i;return s===e.RSA_NO_PADDING&&(h=o.pkcs0pad(i)),t.publicEncrypt({key:n.rsaUtils.exportKey("public"),padding:s},h)},decrypt:function(i,r){var s;if(r)return s=e.RSA_PKCS1_PADDING,n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding),t.publicDecrypt({key:n.rsaUtils.exportKey("public"),padding:s},i);s=e.RSA_PKCS1_OAEP_PADDING,"pkcs1"===n.encryptionScheme&&(s=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(s=n.encryptionSchemeOptions.padding);var h=t.privateDecrypt({key:n.rsaUtils.exportKey("private"),padding:s},i);return s===e.RSA_NO_PADDING?o.pkcs0unpad(h):h}}},pv}():function(){if(vv)return gv;vv=1;var t=Ag(),e=Dt,i=Mv();return gv=function(r,n){var o=_v()(r,n),s=i.pkcs1.makeScheme(r,n);return{encrypt:function(i,r){if(r)return o.encrypt(i,r);var h=e.RSA_PKCS1_OAEP_PADDING;"pkcs1"===n.encryptionScheme&&(h=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(h=n.encryptionSchemeOptions.padding);var a=i;return h===e.RSA_NO_PADDING&&(a=s.pkcs0pad(i)),t.publicEncrypt({key:n.rsaUtils.exportKey("public"),padding:h},a)},decrypt:function(i,r){if(r)return o.decrypt(i,r);var h=e.RSA_PKCS1_OAEP_PADDING;"pkcs1"===n.encryptionScheme&&(h=e.RSA_PKCS1_PADDING),n.encryptionSchemeOptions&&n.encryptionSchemeOptions.padding&&(h=n.encryptionSchemeOptions.padding);var a=t.privateDecrypt({key:n.rsaUtils.exportKey("private"),padding:h},i);return h===e.RSA_NO_PADDING?s.pkcs0unpad(a):a}}},gv}()),i(t,e)}},Av=ue._;Ag();var kv=Qg,Rv=ue,Ov=Mv(),Iv=Ev;Ct.BigInteger=kv,Ct.Key=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.setOptions=function(t){var e=Ov[t.signingScheme],i=Ov[t.encryptionScheme];e===i?this.signingScheme=this.encryptionScheme=i.makeScheme(this,t):(this.encryptionScheme=i.makeScheme(this,t),this.signingScheme=e.makeScheme(this,t)),this.encryptEngine=Iv.getEngine(this,t)},t.prototype.generate=function(t,e){var i=t>>1;this.e=parseInt(e,16);for(var r=new kv(e,16);;){for(;this.p=new kv(t-i,1),0!==this.p.subtract(kv.ONE).gcd(r).compareTo(kv.ONE)||!this.p.isProbablePrime(10););for(;this.q=new kv(i,1),0!==this.q.subtract(kv.ONE).gcd(r).compareTo(kv.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var n=this.p;this.p=this.q,this.q=n}var o=this.p.subtract(kv.ONE),s=this.q.subtract(kv.ONE),h=o.multiply(s);if(0===h.gcd(r).compareTo(kv.ONE)){if(this.n=this.p.multiply(this.q),this.n.bitLength()<t)continue;this.d=r.modInverse(h),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}this.$$recalculateCache()},t.prototype.setPrivate=function(t,e,i,r,n,o,s,h){if(!(t&&e&&i&&t.length>0&&(Av.isNumber(e)||e.length>0)&&i.length>0))throw Error("Invalid RSA private key");this.n=new kv(t),this.e=Av.isNumber(e)?e:Rv.get32IntFromBuffer(e,0),this.d=new kv(i),r&&n&&o&&s&&h&&(this.p=new kv(r),this.q=new kv(n),this.dmp1=new kv(o),this.dmq1=new kv(s),this.coeff=new kv(h)),this.$$recalculateCache()},t.prototype.setPublic=function(t,e){if(!(t&&e&&t.length>0&&(Av.isNumber(e)||e.length>0)))throw Error("Invalid RSA public key");this.n=new kv(t),this.e=Av.isNumber(e)?e:Rv.get32IntFromBuffer(e,0),this.$$recalculateCache()},t.prototype.$doPrivate=function(t){if(this.p||this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),i=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(i)<0;)e=e.add(this.p);return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i)},t.prototype.$doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.encrypt=function(t,e){var i=[],r=[],n=t.length,o=Math.ceil(n/this.maxMessageLength)||1,s=Math.ceil(n/o||1);if(1==o)i.push(t);else for(var h=0;h<o;h++)i.push(t.slice(h*s,(h+1)*s));for(var a=0;a<i.length;a++)r.push(this.encryptEngine.encrypt(i[a],e));return T.concat(r)},t.prototype.decrypt=function(t,e){if(t.length%this.encryptedDataLength>0)throw Error("Incorrect data or key");for(var i=[],r=0,n=0,o=t.length/this.encryptedDataLength,s=0;s<o;s++)n=(r=s*this.encryptedDataLength)+this.encryptedDataLength,i.push(this.encryptEngine.decrypt(t.slice(r,Math.min(n,t.length)),e));return T.concat(i)},t.prototype.sign=function(t){return this.signingScheme.sign.apply(this.signingScheme,arguments)},t.prototype.verify=function(t,e,i){return this.signingScheme.verify.apply(this.signingScheme,arguments)},t.prototype.isPrivate=function(){return!!(this.n&&this.e&&this.d)},t.prototype.isPublic=function(t){return this.n&&this.e&&!(t&&this.d)||!1},Object.defineProperty(t.prototype,"keySize",{get:function(){return this.cache.keyBitLength}}),Object.defineProperty(t.prototype,"encryptedDataLength",{get:function(){return this.cache.keyByteLength}}),Object.defineProperty(t.prototype,"maxMessageLength",{get:function(){return this.encryptionScheme.maxMessageLength()}}),t.prototype.$$recalculateCache=function(){this.cache=this.cache||{},this.cache.keyBitLength=this.n.bitLength(),this.cache.keyByteLength=this.cache.keyBitLength+6>>3},t}();var Tv={},Bv={get exports(){return Tv},set exports(t){Tv=t}},Pv={newInvalidAsn1Error:function(t){var e=new Error;return e.name="InvalidAsn1Error",e.message=t||"",e}},Nv={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128};function xv(t,e){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}var Lv,Dv=Object.prototype.hasOwnProperty,Cv=Object.keys||function(t){var e=[];for(var i in t)Dv.call(t,i)&&e.push(i);return e},jv=Array.prototype.slice;function Uv(){return void 0!==Lv?Lv:Lv="foo"===function(){}.name}function qv(t){return Object.prototype.toString.call(t)}function zv(t){return!dt(t)&&("function"==typeof m.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function Fv(t,e){t||Zv(t,!0,e,"==",Wv)}var Hv=/\s*function\s+([^\(\s]*)\s*/;function Kv(t){if(ni(t)){if(Uv())return t.name;var e=t.toString().match(Hv);return e&&e[1]}}function Gv(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return Vv(Yv(t.actual),128)+" "+t.operator+" "+Vv(Yv(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||Zv;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var i=new Error;if(i.stack){var r=i.stack,n=Kv(e),o=r.indexOf("\n"+n);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}}function Vv(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function Yv(t){if(Uv()||!ni(t))return qe(t);var e=Kv(t);return"[Function"+(e?": "+e:"")+"]"}function Zv(t,e,i,r,n){throw new Gv({message:i,actual:t,expected:e,operator:r,stackStartFunction:n})}function Wv(t,e){t||Zv(t,!0,e,"==",Wv)}function Xv(t,e,i){t!=e&&Zv(t,e,i,"==",Xv)}function Qv(t,e,i){t==e&&Zv(t,e,i,"!=",Qv)}function Jv(t,e,i){tb(t,e,!1)||Zv(t,e,i,"deepEqual",Jv)}function $v(t,e,i){tb(t,e,!0)||Zv(t,e,i,"deepStrictEqual",$v)}function tb(t,e,i,r){if(t===e)return!0;if(dt(t)&&dt(e))return 0===xv(t,e);if(ii(t)&&ii(e))return t.getTime()===e.getTime();if(ti(t)&&ti(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(zv(t)&&zv(e)&&qv(t)===qv(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===xv(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(dt(t)!==dt(e))return!1;var n=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==n&&n===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,i,r){if(null==t||null==e)return!1;if(oi(t)||oi(e))return t===e;if(i&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var n=eb(t),o=eb(e);if(n&&!o||!n&&o)return!1;if(n)return tb(t=jv.call(t),e=jv.call(e),i);var s,h,a=Cv(t),u=Cv(e);if(a.length!==u.length)return!1;for(a.sort(),u.sort(),h=a.length-1;h>=0;h--)if(a[h]!==u[h])return!1;for(h=a.length-1;h>=0;h--)if(!tb(t[s=a[h]],e[s],i,r))return!1;return!0}(t,e,i,r))}return i?t===e:t==e}function eb(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function ib(t,e,i){tb(t,e,!1)&&Zv(t,e,i,"notDeepEqual",ib)}function rb(t,e,i){tb(t,e,!0)&&Zv(t,e,i,"notDeepStrictEqual",rb)}function nb(t,e,i){t!==e&&Zv(t,e,i,"===",nb)}function ob(t,e,i){t===e&&Zv(t,e,i,"!==",ob)}function sb(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function hb(t,e,i,r){var n;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof i&&(r=i,i=null),n=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(i&&i.name?" ("+i.name+").":".")+(r?" "+r:"."),t&&!n&&Zv(n,i,"Missing expected exception"+r);var o="string"==typeof r,s=!t&&n&&!i;if((!t&&ri(n)&&o&&sb(n,i)||s)&&Zv(n,i,"Got unwanted exception"+r),t&&n&&i&&!sb(n,i)||!t&&n)throw n}function ab(t,e,i){hb(!0,t,e,i)}function ub(t,e,i){hb(!1,t,e,i)}function fb(t){if(t)throw t}Fv.AssertionError=Gv,Ne(Gv,Error),Fv.fail=Zv,Fv.ok=Wv,Fv.equal=Xv,Fv.notEqual=Qv,Fv.deepEqual=Jv,Fv.deepStrictEqual=$v,Fv.notDeepEqual=ib,Fv.notDeepStrictEqual=rb,Fv.strictEqual=nb,Fv.notStrictEqual=ob,Fv.throws=ab,Fv.doesNotThrow=ub,Fv.ifError=fb;var lb=vt(Object.freeze({__proto__:null,AssertionError:Gv,assert:Wv,deepEqual:Jv,deepStrictEqual:$v,default:Fv,doesNotThrow:ub,equal:Xv,fail:Zv,ifError:fb,notDeepEqual:ib,notDeepStrictEqual:rb,notEqual:Qv,notStrictEqual:ob,ok:Wv,strictEqual:nb,throws:ab})),cb=lb,db=Yd.Buffer,pb=Nv,mb=Pv.newInvalidAsn1Error;function gb(t){if(!t||!db.isBuffer(t))throw new TypeError("data must be a node Buffer");this._buf=t,this._size=t.length,this._len=0,this._offset=0}Object.defineProperty(gb.prototype,"length",{enumerable:!0,get:function(){return this._len}}),Object.defineProperty(gb.prototype,"offset",{enumerable:!0,get:function(){return this._offset}}),Object.defineProperty(gb.prototype,"remain",{get:function(){return this._size-this._offset}}),Object.defineProperty(gb.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}}),gb.prototype.readByte=function(t){if(this._size-this._offset<1)return null;var e=255&this._buf[this._offset];return t||(this._offset+=1),e},gb.prototype.peek=function(){return this.readByte(!0)},gb.prototype.readLength=function(t){if(void 0===t&&(t=this._offset),t>=this._size)return null;var e=255&this._buf[t++];if(null===e)return null;if(128==(128&e)){if(0===(e&=127))throw mb("Indefinite length not supported");if(e>4)throw mb("encoding too long");if(this._size-t<e)return null;this._len=0;for(var i=0;i<e;i++)this._len=(this._len<<8)+(255&this._buf[t++])}else this._len=e;return t},gb.prototype.readSequence=function(t){var e=this.peek();if(null===e)return null;if(void 0!==t&&t!==e)throw mb("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var i=this.readLength(this._offset+1);return null===i?null:(this._offset=i,e)},gb.prototype.readInt=function(){return this._readTag(pb.Integer)},gb.prototype.readBoolean=function(){return 0!==this._readTag(pb.Boolean)},gb.prototype.readEnumeration=function(){return this._readTag(pb.Enumeration)},gb.prototype.readString=function(t,e){t||(t=pb.OctetString);var i=this.peek();if(null===i)return null;if(i!==t)throw mb("Expected 0x"+t.toString(16)+": got 0x"+i.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>this._size-r)return null;if(this._offset=r,0===this.length)return e?db.alloc(0):"";var n=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,e?n:n.toString("utf8")},gb.prototype.readOID=function(t){t||(t=pb.OID);var e=this.readString(t,!0);if(null===e)return null;for(var i=[],r=0,n=0;n<e.length;n++){var o=255&e[n];r<<=7,r+=127&o,0==(128&o)&&(i.push(r),r=0)}return r=i.shift(),i.unshift(r%40),i.unshift(r/40>>0),i.join(".")},gb.prototype._readTag=function(t){cb.ok(void 0!==t);var e=this.peek();if(null===e)return null;if(e!==t)throw mb("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var i=this.readLength(this._offset+1);if(null===i)return null;if(this.length>4)throw mb("Integer too long: "+this.length);if(this.length>this._size-i)return null;this._offset=i;for(var r=this._buf[this._offset],n=0,o=0;o<this.length;o++)n<<=8,n|=255&this._buf[this._offset++];return 128==(128&r)&&4!==o&&(n-=1<<8*o),n>>0};var vb=gb,bb=lb,yb=Yd.Buffer,wb=Nv,Mb=Pv.newInvalidAsn1Error,_b={size:1024,growthFactor:8};function Sb(t){t=function(t,e){return bb.ok(t),bb.equal(typeof t,"object"),bb.ok(e),bb.equal(typeof e,"object"),Object.getOwnPropertyNames(t).forEach((function(i){if(!e[i]){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r)}})),e}(_b,t||{}),this._buf=yb.alloc(t.size||1024),this._size=this._buf.length,this._offset=0,this._options=t,this._seq=[]}Object.defineProperty(Sb.prototype,"buffer",{get:function(){if(this._seq.length)throw Mb(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),Sb.prototype.writeByte=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=t},Sb.prototype.writeInt=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");"number"!=typeof e&&(e=wb.Integer);for(var i=4;(0==(4286578688&t)||-8388608==(4286578688&t))&&i>1;)i--,t<<=8;if(i>4)throw Mb("BER ints cannot be > 0xffffffff");for(this._ensure(2+i),this._buf[this._offset++]=e,this._buf[this._offset++]=i;i-- >0;)this._buf[this._offset++]=(4278190080&t)>>>24,t<<=8},Sb.prototype.writeNull=function(){this.writeByte(wb.Null),this.writeByte(0)},Sb.prototype.writeEnumeration=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");return"number"!=typeof e&&(e=wb.Enumeration),this.writeInt(t,e)},Sb.prototype.writeBoolean=function(t,e){if("boolean"!=typeof t)throw new TypeError("argument must be a Boolean");"number"!=typeof e&&(e=wb.Boolean),this._ensure(3),this._buf[this._offset++]=e,this._buf[this._offset++]=1,this._buf[this._offset++]=t?255:0},Sb.prototype.writeString=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string (was: "+typeof t+")");"number"!=typeof e&&(e=wb.OctetString);var i=yb.byteLength(t);this.writeByte(e),this.writeLength(i),i&&(this._ensure(i),this._buf.write(t,this._offset),this._offset+=i)},Sb.prototype.writeBuffer=function(t,e){if("number"!=typeof e)throw new TypeError("tag must be a number");if(!yb.isBuffer(t))throw new TypeError("argument must be a buffer");this.writeByte(e),this.writeLength(t.length),this._ensure(t.length),t.copy(this._buf,this._offset,0,t.length),this._offset+=t.length},Sb.prototype.writeStringArray=function(t){if(!t instanceof Array)throw new TypeError("argument must be an Array[String]");var e=this;t.forEach((function(t){e.writeString(t)}))},Sb.prototype.writeOID=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string");if("number"!=typeof e&&(e=wb.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(t))throw new Error("argument is not a valid OID string");var i=t.split("."),r=[];r.push(40*parseInt(i[0],10)+parseInt(i[1],10)),i.slice(2).forEach((function(t){!function(t,e){e<128?t.push(e):e<16384?(t.push(e>>>7|128),t.push(127&e)):e<2097152?(t.push(e>>>14|128),t.push(255&(e>>>7|128)),t.push(127&e)):e<268435456?(t.push(e>>>21|128),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e)):(t.push(255&(e>>>28|128)),t.push(255&(e>>>21|128)),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e))}(r,parseInt(t,10))}));var n=this;this._ensure(2+r.length),this.writeByte(e),this.writeLength(r.length),r.forEach((function(t){n.writeByte(t)}))},Sb.prototype.writeLength=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");if(this._ensure(4),t<=127)this._buf[this._offset++]=t;else if(t<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=t;else if(t<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t;else{if(!(t<=16777215))throw Mb("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=t>>16,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t}},Sb.prototype.startSequence=function(t){"number"!=typeof t&&(t=wb.Sequence|wb.Constructor),this.writeByte(t),this._seq.push(this._offset),this._ensure(3),this._offset+=3},Sb.prototype.endSequence=function(){var t=this._seq.pop(),e=t+3,i=this._offset-e;if(i<=127)this._shift(e,i,-2),this._buf[t]=i;else if(i<=255)this._shift(e,i,-1),this._buf[t]=129,this._buf[t+1]=i;else if(i<=65535)this._buf[t]=130,this._buf[t+1]=i>>8,this._buf[t+2]=i;else{if(!(i<=16777215))throw Mb("Sequence too long");this._shift(e,i,1),this._buf[t]=131,this._buf[t+1]=i>>16,this._buf[t+2]=i>>8,this._buf[t+3]=i}},Sb.prototype._shift=function(t,e,i){bb.ok(void 0!==t),bb.ok(void 0!==e),bb.ok(i),this._buf.copy(this._buf,t+i,t,t+e),this._offset+=i},Sb.prototype._ensure=function(t){if(bb.ok(t),this._size-this._offset<t){var e=this._size*this._options.growthFactor;e-this._offset<t&&(e+=t);var i=yb.alloc(e);this._buf.copy(i,0,0,this._offset),this._buf=i,this._size=e}};var Eb=Sb;!function(t){var e=Pv,i=Nv,r=vb,n=Eb;for(var o in t.exports={Reader:r,Writer:n},i)i.hasOwnProperty(o)&&(t.exports[o]=i[o]);for(var s in e)e.hasOwnProperty(s)&&(t.exports[s]=e[s])}(Bv);var Ab=Tv,kb={Ber:Ab,BerReader:Ab.Reader,BerWriter:Ab.Writer},Rb={},Ob={get exports(){return Rb},set exports(t){Rb=t}},Ib={},Tb={get exports(){return Ib},set exports(t){Ib=t}};!function(t){var e=kb.Ber,i=ue._,r=ue;const n="-----BEGIN RSA PRIVATE KEY-----",o="-----END RSA PRIVATE KEY-----",s="-----BEGIN RSA PUBLIC KEY-----",h="-----END RSA PUBLIC KEY-----";t.exports={privateExport:function(t,i){i=i||{};var s=t.n.toBuffer(),h=t.d.toBuffer(),a=t.p.toBuffer(),u=t.q.toBuffer(),f=t.dmp1.toBuffer(),l=t.dmq1.toBuffer(),c=t.coeff.toBuffer(),d=s.length+h.length+a.length+u.length+f.length+l.length+c.length+512,p=new e.Writer({size:d});return p.startSequence(),p.writeInt(0),p.writeBuffer(s,2),p.writeInt(t.e),p.writeBuffer(h,2),p.writeBuffer(a,2),p.writeBuffer(u,2),p.writeBuffer(f,2),p.writeBuffer(l,2),p.writeBuffer(c,2),p.endSequence(),"der"===i.type?p.buffer:n+"\n"+r.linebrk(p.buffer.toString("base64"),64)+"\n"+o},privateImport:function(t,s,h){var a;if("der"!==(h=h||{}).type){if(T.isBuffer(s)&&(s=s.toString("utf8")),!i.isString(s))throw Error("Unsupported key format");var u=r.trimSurroundingText(s,n,o).replace(/\s+|\n\r|\n|\r$/gm,"");a=T.from(u,"base64")}else{if(!T.isBuffer(s))throw Error("Unsupported key format");a=s}var f=new e.Reader(a);f.readSequence(),f.readString(2,!0),t.setPrivate(f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0),f.readString(2,!0))},publicExport:function(t,i){i=i||{};var n=t.n.toBuffer(),o=n.length+512,a=new e.Writer({size:o});return a.startSequence(),a.writeBuffer(n,2),a.writeInt(t.e),a.endSequence(),"der"===i.type?a.buffer:s+"\n"+r.linebrk(a.buffer.toString("base64"),64)+"\n"+h},publicImport:function(t,n,o){var a;if("der"!==(o=o||{}).type){if(T.isBuffer(n)&&(n=n.toString("utf8")),i.isString(n)){var u=r.trimSurroundingText(n,s,h).replace(/\s+|\n\r|\n|\r$/gm,"");a=T.from(u,"base64")}}else{if(!T.isBuffer(n))throw Error("Unsupported key format");a=n}var f=new e.Reader(a);f.readSequence(),t.setPublic(f.readString(2,!0),f.readString(2,!0))},autoImport:function(e,i){return/^[\S\s]*-----BEGIN RSA PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*-----BEGIN RSA PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END RSA PUBLIC KEY-----[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(Tb);var Bb={},Pb={get exports(){return Bb},set exports(t){Bb=t}};!function(t){var e=kb.Ber,i=ue._,r="1.2.840.113549.1.1.1",n=ue;const o="-----BEGIN PRIVATE KEY-----",s="-----END PRIVATE KEY-----",h="-----BEGIN PUBLIC KEY-----",a="-----END PUBLIC KEY-----";t.exports={privateExport:function(t,i){i=i||{};var h=t.n.toBuffer(),a=t.d.toBuffer(),u=t.p.toBuffer(),f=t.q.toBuffer(),l=t.dmp1.toBuffer(),c=t.dmq1.toBuffer(),d=t.coeff.toBuffer(),p=h.length+a.length+u.length+f.length+l.length+c.length+d.length+512,m=new e.Writer({size:p});m.startSequence(),m.writeInt(0),m.writeBuffer(h,2),m.writeInt(t.e),m.writeBuffer(a,2),m.writeBuffer(u,2),m.writeBuffer(f,2),m.writeBuffer(l,2),m.writeBuffer(c,2),m.writeBuffer(d,2),m.endSequence();var g=new e.Writer({size:p});return g.startSequence(),g.writeInt(0),g.startSequence(),g.writeOID(r),g.writeNull(),g.endSequence(),g.writeBuffer(m.buffer,4),g.endSequence(),"der"===i.type?g.buffer:o+"\n"+n.linebrk(g.buffer.toString("base64"),64)+"\n"+s},privateImport:function(t,h,a){var u;if("der"!==(a=a||{}).type){if(T.isBuffer(h)&&(h=h.toString("utf8")),!i.isString(h))throw Error("Unsupported key format");var f=n.trimSurroundingText(h,o,s).replace("-----END PRIVATE KEY-----","").replace(/\s+|\n\r|\n|\r$/gm,"");u=T.from(f,"base64")}else{if(!T.isBuffer(h))throw Error("Unsupported key format");u=h}var l=new e.Reader(u);if(l.readSequence(),l.readInt(0),new e.Reader(l.readString(48,!0)).readOID(6,!0)!==r)throw Error("Invalid Public key format");var c=new e.Reader(l.readString(4,!0));c.readSequence(),c.readString(2,!0),t.setPrivate(c.readString(2,!0),c.readString(2,!0),c.readString(2,!0),c.readString(2,!0),c.readString(2,!0),c.readString(2,!0),c.readString(2,!0),c.readString(2,!0))},publicExport:function(t,i){i=i||{};var o=t.n.toBuffer(),s=o.length+512,u=new e.Writer({size:s});u.writeByte(0),u.startSequence(),u.writeBuffer(o,2),u.writeInt(t.e),u.endSequence();var f=new e.Writer({size:s});return f.startSequence(),f.startSequence(),f.writeOID(r),f.writeNull(),f.endSequence(),f.writeBuffer(u.buffer,3),f.endSequence(),"der"===i.type?f.buffer:h+"\n"+n.linebrk(f.buffer.toString("base64"),64)+"\n"+a},publicImport:function(t,o,s){var u;if("der"!==(s=s||{}).type){if(T.isBuffer(o)&&(o=o.toString("utf8")),i.isString(o)){var f=n.trimSurroundingText(o,h,a).replace(/\s+|\n\r|\n|\r$/gm,"");u=T.from(f,"base64")}}else{if(!T.isBuffer(o))throw Error("Unsupported key format");u=o}var l=new e.Reader(u);if(l.readSequence(),new e.Reader(l.readString(48,!0)).readOID(6,!0)!==r)throw Error("Invalid Public key format");var c=new e.Reader(l.readString(3,!0));c.readByte(),c.readSequence(),t.setPublic(c.readString(2,!0),c.readString(2,!0))},autoImport:function(e,i){return/^[\S\s]*-----BEGIN PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*-----BEGIN PUBLIC KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END PUBLIC KEY-----[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(Pb);var Nb={},xb={get exports(){return Nb},set exports(t){Nb=t}};!function(t){ue._,t.exports={privateExport:function(t,e){return{n:t.n.toBuffer(),e:t.e,d:t.d.toBuffer(),p:t.p.toBuffer(),q:t.q.toBuffer(),dmp1:t.dmp1.toBuffer(),dmq1:t.dmq1.toBuffer(),coeff:t.coeff.toBuffer()}},privateImport:function(t,e,i){if(!(e.n&&e.e&&e.d&&e.p&&e.q&&e.dmp1&&e.dmq1&&e.coeff))throw Error("Invalid key data");t.setPrivate(e.n,e.e,e.d,e.p,e.q,e.dmp1,e.dmq1,e.coeff)},publicExport:function(t,e){return{n:t.n.toBuffer(),e:t.e}},publicImport:function(t,e,i){if(!e.n||!e.e)throw Error("Invalid key data");t.setPublic(e.n,e.e)},autoImport:function(e,i){return!(!i.n||!i.e)&&(i.d&&i.p&&i.q&&i.dmp1&&i.dmq1&&i.coeff?(t.exports.privateImport(e,i),!0):(t.exports.publicImport(e,i),!0))}}}(xb);var Lb={},Db={get exports(){return Lb},set exports(t){Lb=t}};!function(t){var e=ue._,i=ue,r=Qg;const n="-----BEGIN OPENSSH PRIVATE KEY-----",o="-----END OPENSSH PRIVATE KEY-----";function s(t){const e=t.buf.readInt32BE(t.off);t.off+=4;const i=t.buf.slice(t.off,t.off+e);return t.off+=e,i}function h(t,e){t.buf.writeInt32BE(e.byteLength,t.off),t.off+=4,t.off+=e.copy(t.buf,t.off)}t.exports={privateExport:function(t,e){const r=t.n.toBuffer();let s=T.alloc(4);for(s.writeUInt32BE(t.e,0);0===s[0];)s=s.slice(1);const a=t.d.toBuffer(),u=t.coeff.toBuffer(),f=t.p.toBuffer(),l=t.q.toBuffer();let c;c=void 0!==t.sshcomment?T.from(t.sshcomment):T.from([]);const d=15+s.byteLength+4+r.byteLength,p=23+r.byteLength+4+s.byteLength+4+a.byteLength+4+u.byteLength+4+f.byteLength+4+l.byteLength+4+c.byteLength;let m=43+d+4+p;m+=8*Math.ceil(p/8)-p;const g=T.alloc(m),v={buf:g,off:0};g.write("openssh-key-v1","utf8"),g.writeUInt8(0,14),v.off+=15,h(v,T.from("none")),h(v,T.from("none")),h(v,T.from("")),v.off=v.buf.writeUInt32BE(1,v.off),v.off=v.buf.writeUInt32BE(d,v.off),h(v,T.from("ssh-rsa")),h(v,s),h(v,r),v.off=v.buf.writeUInt32BE(m-47-d,v.off),v.off+=8,h(v,T.from("ssh-rsa")),h(v,r),h(v,s),h(v,a),h(v,u),h(v,f),h(v,l),h(v,c);let b=1;for(;v.off<m;)v.off=v.buf.writeUInt8(b++,v.off);return"der"===e.type?v.buf:n+"\n"+i.linebrk(g.toString("base64"),70)+"\n"+o+"\n"},privateImport:function(t,h,a){var u;if("der"!==(a=a||{}).type){if(T.isBuffer(h)&&(h=h.toString("utf8")),!e.isString(h))throw Error("Unsupported key format");var f=i.trimSurroundingText(h,n,o).replace(/\s+|\n\r|\n|\r$/gm,"");u=T.from(f,"base64")}else{if(!T.isBuffer(h))throw Error("Unsupported key format");u=h}const l={buf:u,off:0};if("openssh-key-v1"!==u.slice(0,14).toString("ascii"))throw"Invalid file format.";if(l.off+=15,"none"!==s(l).toString("ascii"))throw Error("Unsupported key type");if("none"!==s(l).toString("ascii"))throw Error("Unsupported key type");if(""!==s(l).toString("ascii"))throw Error("Unsupported key type");if(l.off+=4,l.off+=4,"ssh-rsa"!==s(l).toString("ascii"))throw Error("Unsupported key type");if(s(l),s(l),l.off+=12,"ssh-rsa"!==s(l).toString("ascii"))throw Error("Unsupported key type");const c=s(l),d=s(l),p=s(l),m=s(l),g=s(l),v=s(l),b=new r(p),y=new r(v),w=new r(g),M=b.mod(w.subtract(r.ONE)),_=b.mod(y.subtract(r.ONE));t.setPrivate(c,d,p,g,v,M.toBuffer(),_.toBuffer(),m),t.sshcomment=s(l).toString("ascii")},publicExport:function(t,e){let i=T.alloc(4);for(i.writeUInt32BE(t.e,0);0===i[0];)i=i.slice(1);const r=t.n.toBuffer(),n=T.alloc(i.byteLength+4+r.byteLength+4+7+4),o={buf:n,off:0};h(o,T.from("ssh-rsa")),h(o,i),h(o,r);let s=t.sshcomment||"";return"der"===e.type?o.buf:"ssh-rsa "+n.toString("base64")+" "+s+"\n"},publicImport:function(t,i,r){var n;if("der"!==(r=r||{}).type){if(T.isBuffer(i)&&(i=i.toString("utf8")),!e.isString(i))throw Error("Unsupported key format");{if("ssh-rsa "!==i.substring(0,8))throw Error("Unsupported key format");let e=i.indexOf(" ",8);-1===e?e=i.length:t.sshcomment=i.substring(e+1).replace(/\s+|\n\r|\n|\r$/gm,"");const r=i.substring(8,e).replace(/\s+|\n\r|\n|\r$/gm,"");n=T.from(r,"base64")}}else{if(!T.isBuffer(i))throw Error("Unsupported key format");n=i}const o={buf:n,off:0},h=s(o).toString("ascii");if("ssh-rsa"!==h)throw Error("Invalid key type: "+h);const a=s(o),u=s(o);t.setPublic(u,a)},autoImport:function(e,i){return/^[\S\s]*-----BEGIN OPENSSH PRIVATE KEY-----\s*(?=(([A-Za-z0-9+/=]+\s*)+))\1-----END OPENSSH PRIVATE KEY-----[\S\s]*$/g.test(i)?(t.exports.privateImport(e,i),!0):!!/^[\S\s]*ssh-rsa \s*(?=(([A-Za-z0-9+/=]+\s*)+))\1[\S\s]*$/g.test(i)&&(t.exports.publicImport(e,i),!0)}}}(Db),function(t){function e(t){t=t.split("-");for(var e="private",i={type:"default"},r=1;r<t.length;r++)if(t[r])switch(t[r]){case"public":case"private":e=t[r];break;case"pem":case"der":i.type=t[r]}return{scheme:t[0],keyType:e,keyOpt:i}}ue._,t.exports={pkcs1:Ib,pkcs8:Bb,components:Nb,openssh:Lb,isPrivateExport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].privateExport},isPrivateImport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].privateImport},isPublicExport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].publicExport},isPublicImport:function(e){return t.exports[e]&&"function"==typeof t.exports[e].publicImport},detectAndImport:function(i,r,n){if(void 0===n){for(var o in t.exports)if("function"==typeof t.exports[o].autoImport&&t.exports[o].autoImport(i,r))return!0}else if(n){var s=e(n);if(!t.exports[s.scheme])throw Error("Unsupported key format");"private"===s.keyType?t.exports[s.scheme].privateImport(i,r,s.keyOpt):t.exports[s.scheme].publicImport(i,r,s.keyOpt)}return!1},detectAndExport:function(i,r){if(r){var n=e(r);if(t.exports[n.scheme]){if("private"===n.keyType){if(!i.isPrivate())throw Error("This is not private key");return t.exports[n.scheme].privateExport(i,n.keyOpt)}if(!i.isPublic())throw Error("This is not public key");return t.exports[n.scheme].publicExport(i,n.keyOpt)}throw Error("Unsupported key format")}}}}(Ob);var Cb=Dt,jb=Ct;Ag();var Ub=ue._,qb=ue,zb=Mv(),Fb=Rb;void 0===Cb.RSA_NO_PADDING&&(Cb.RSA_NO_PADDING=3);var Hb=function(){var t={node10:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],node:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],iojs:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],browser:["md5","ripemd160","sha1","sha256","sha512"]},e="pkcs1_oaep",i="pkcs1",r={private:"pkcs1-private-pem","private-der":"pkcs1-private-der",public:"pkcs8-public-pem","public-der":"pkcs8-public-der"};function n(t,r,o){if(!(this instanceof n))return new n(t,r,o);Ub.isObject(r)&&(o=r,r=void 0),this.$options={signingScheme:i,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:e,encryptionSchemeOptions:{hash:"sha1",label:null},environment:qb.detectEnvironment(),rsaUtils:this},this.keyPair=new jb.Key,this.$cache={},T.isBuffer(t)||Ub.isString(t)?this.importKey(t,r):Ub.isObject(t)&&this.generateKeyPair(t.b,t.e),this.setOptions(o)}return n.prototype.setOptions=function(r){if((r=r||{}).environment&&(this.$options.environment=r.environment),r.signingScheme){if(Ub.isString(r.signingScheme)){var n=r.signingScheme.toLowerCase().split("-");1==n.length?t.node.indexOf(n[0])>-1?(this.$options.signingSchemeOptions={hash:n[0]},this.$options.signingScheme=i):(this.$options.signingScheme=n[0],this.$options.signingSchemeOptions={hash:null}):(this.$options.signingSchemeOptions={hash:n[1]},this.$options.signingScheme=n[0])}else Ub.isObject(r.signingScheme)&&(this.$options.signingScheme=r.signingScheme.scheme||i,this.$options.signingSchemeOptions=Ub.omit(r.signingScheme,"scheme"));if(!zb.isSignature(this.$options.signingScheme))throw Error("Unsupported signing scheme");if(this.$options.signingSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.signingSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}if(r.encryptionScheme){if(Ub.isString(r.encryptionScheme)?(this.$options.encryptionScheme=r.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={}):Ub.isObject(r.encryptionScheme)&&(this.$options.encryptionScheme=r.encryptionScheme.scheme||e,this.$options.encryptionSchemeOptions=Ub.omit(r.encryptionScheme,"scheme")),!zb.isEncryption(this.$options.encryptionScheme))throw Error("Unsupported encryption scheme");if(this.$options.encryptionSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.encryptionSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}this.keyPair.setOptions(this.$options)},n.prototype.generateKeyPair=function(t,e){if(e=e||65537,(t=t||2048)%8!=0)throw Error("Key size must be a multiple of 8.");return this.keyPair.generate(t,e.toString(16)),this.$cache={},this},n.prototype.importKey=function(t,e){if(!t)throw Error("Empty key given");if(e&&(e=r[e]||e),!Fb.detectAndImport(this.keyPair,t,e)&&void 0===e)throw Error("Key format must be specified");return this.$cache={},this},n.prototype.exportKey=function(t){return t=r[t=t||"private"]||t,this.$cache[t]||(this.$cache[t]=Fb.detectAndExport(this.keyPair,t)),this.$cache[t]},n.prototype.isPrivate=function(){return this.keyPair.isPrivate()},n.prototype.isPublic=function(t){return this.keyPair.isPublic(t)},n.prototype.isEmpty=function(t){return!(this.keyPair.n||this.keyPair.e||this.keyPair.d)},n.prototype.encrypt=function(t,e,i){return this.$$encryptKey(!1,t,e,i)},n.prototype.decrypt=function(t,e){return this.$$decryptKey(!1,t,e)},n.prototype.encryptPrivate=function(t,e,i){return this.$$encryptKey(!0,t,e,i)},n.prototype.decryptPublic=function(t,e){return this.$$decryptKey(!0,t,e)},n.prototype.$$encryptKey=function(t,e,i,r){try{var n=this.keyPair.encrypt(this.$getDataForEncrypt(e,r),t);return"buffer"!=i&&i?n.toString(i):n}catch(t){throw Error("Error during encryption. Original error: "+t)}},n.prototype.$$decryptKey=function(t,e,i){try{e=Ub.isString(e)?T.from(e,"base64"):e;var r=this.keyPair.decrypt(e,t);if(null===r)throw Error("Key decrypt method returns null.");return this.$getDecryptedData(r,i)}catch(t){throw Error("Error during decryption (probably incorrect key). Original error: "+t)}},n.prototype.sign=function(t,e,i){if(!this.isPrivate())throw Error("This is not private key");var r=this.keyPair.sign(this.$getDataForEncrypt(t,i));return e&&"buffer"!=e&&(r=r.toString(e)),r},n.prototype.verify=function(t,e,i,r){if(!this.isPublic())throw Error("This is not public key");return r=r&&"buffer"!=r?r:null,this.keyPair.verify(this.$getDataForEncrypt(t,i),e,r)},n.prototype.getKeySize=function(){return this.keyPair.keySize},n.prototype.getMaxMessageSize=function(){return this.keyPair.maxMessageLength},n.prototype.$getDataForEncrypt=function(t,e){if(Ub.isString(t)||Ub.isNumber(t))return T.from(""+t,e||"utf8");if(T.isBuffer(t))return t;if(Ub.isObject(t))return T.from(JSON.stringify(t));throw Error("Unexpected data type")},n.prototype.$getDecryptedData=function(t,e){return"buffer"==(e=e||"buffer")?t:"json"==e?JSON.parse(t.toString()):t.toString(e)},n}(),Kb="object"==typeof m&&m&&m.Object===Object&&m,Gb="object"==typeof self&&self&&self.Object===Object&&self,Vb=Kb||Gb||Function("return this")(),Yb=Vb.Symbol,Zb=Object.prototype,Wb=Zb.hasOwnProperty,Xb=Zb.toString,Qb=Yb?Yb.toStringTag:void 0;var Jb=Object.prototype.toString;var $b="[object Null]",ty="[object Undefined]",ey=Yb?Yb.toStringTag:void 0;function iy(t){return null==t?void 0===t?ty:$b:ey&&ey in Object(t)?function(t){var e=Wb.call(t,Qb),i=t[Qb];try{t[Qb]=void 0;var r=!0}catch(t){}var n=Xb.call(t);return r&&(e?t[Qb]=i:delete t[Qb]),n}(t):function(t){return Jb.call(t)}(t)}function ry(t){return null!=t&&"object"==typeof t}var ny="[object Symbol]";function oy(t){return"symbol"==typeof t||ry(t)&&iy(t)==ny}function sy(t,e){for(var i=-1,r=null==t?0:t.length,n=Array(r);++i<r;)n[i]=e(t[i],i,t);return n}var hy=Array.isArray,ay=1/0,uy=Yb?Yb.prototype:void 0,fy=uy?uy.toString:void 0;function ly(t){if("string"==typeof t)return t;if(hy(t))return sy(t,ly)+"";if(oy(t))return fy?fy.call(t):"";var e=t+"";return"0"==e&&1/t==-ay?"-0":e}var cy=/\s/;var dy=/^\s+/;function py(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&cy.test(t.charAt(e)););return e}(t)+1).replace(dy,""):t}function my(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var gy=NaN,vy=/^[-+]0x[0-9a-f]+$/i,by=/^0b[01]+$/i,yy=/^0o[0-7]+$/i,wy=parseInt;var My=1/0,_y=17976931348623157e292;function Sy(t){return t?(t=function(t){if("number"==typeof t)return t;if(oy(t))return gy;if(my(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=my(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=py(t);var i=by.test(t);return i||yy.test(t)?wy(t.slice(2),i?2:8):vy.test(t)?gy:+t}(t))===My||t===-My?(t<0?-1:1)*_y:t==t?t:0:0===t?t:0}function Ey(t){return t}var Ay="[object AsyncFunction]",ky="[object Function]",Ry="[object GeneratorFunction]",Oy="[object Proxy]";function Iy(t){if(!my(t))return!1;var e=iy(t);return e==ky||e==Ry||e==Ay||e==Oy}var Ty,By=Vb["__core-js_shared__"],Py=(Ty=/[^.]+$/.exec(By&&By.keys&&By.keys.IE_PROTO||""))?"Symbol(src)_1."+Ty:"";var Ny=Function.prototype.toString;function xy(t){if(null!=t){try{return Ny.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Ly=/^\[object .+?Constructor\]$/,Dy=Function.prototype,Cy=Object.prototype,jy=Dy.toString,Uy=Cy.hasOwnProperty,qy=RegExp("^"+jy.call(Uy).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zy(t){return!(!my(t)||(e=t,Py&&Py in e))&&(Iy(t)?qy:Ly).test(xy(t));var e}function Fy(t,e){var i=function(t,e){return null==t?void 0:t[e]}(t,e);return zy(i)?i:void 0}var Hy=Fy(Vb,"WeakMap"),Ky=9007199254740991,Gy=/^(?:0|[1-9]\d*)$/;function Vy(t,e){var i=typeof t;return!!(e=null==e?Ky:e)&&("number"==i||"symbol"!=i&&Gy.test(t))&&t>-1&&t%1==0&&t<e}function Yy(t,e){return t===e||t!=t&&e!=e}var Zy=9007199254740991;function Wy(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Zy}function Xy(t){return null!=t&&Wy(t.length)&&!Iy(t)}var Qy=Object.prototype;function Jy(t){return ry(t)&&"[object Arguments]"==iy(t)}var $y=Object.prototype,tw=$y.hasOwnProperty,ew=$y.propertyIsEnumerable,iw=Jy(function(){return arguments}())?Jy:function(t){return ry(t)&&tw.call(t,"callee")&&!ew.call(t,"callee")};var rw="object"==typeof exports&&exports&&!exports.nodeType&&exports,nw=rw&&"object"==typeof module&&module&&!module.nodeType&&module,ow=nw&&nw.exports===rw?Vb.Buffer:void 0,sw=(ow?ow.isBuffer:void 0)||function(){return!1},hw={};hw["[object Float32Array]"]=hw["[object Float64Array]"]=hw["[object Int8Array]"]=hw["[object Int16Array]"]=hw["[object Int32Array]"]=hw["[object Uint8Array]"]=hw["[object Uint8ClampedArray]"]=hw["[object Uint16Array]"]=hw["[object Uint32Array]"]=!0,hw["[object Arguments]"]=hw["[object Array]"]=hw["[object ArrayBuffer]"]=hw["[object Boolean]"]=hw["[object DataView]"]=hw["[object Date]"]=hw["[object Error]"]=hw["[object Function]"]=hw["[object Map]"]=hw["[object Number]"]=hw["[object Object]"]=hw["[object RegExp]"]=hw["[object Set]"]=hw["[object String]"]=hw["[object WeakMap]"]=!1;var aw,uw="object"==typeof exports&&exports&&!exports.nodeType&&exports,fw=uw&&"object"==typeof module&&module&&!module.nodeType&&module,lw=fw&&fw.exports===uw&&Kb.process,cw=function(){try{var t=fw&&fw.require&&fw.require("util").types;return t||lw&&lw.binding&&lw.binding("util")}catch(t){}}(),dw=cw&&cw.isTypedArray,pw=dw?(aw=dw,function(t){return aw(t)}):function(t){return ry(t)&&Wy(t.length)&&!!hw[iy(t)]},mw=Object.prototype.hasOwnProperty;function gw(t,e){var i=hy(t),r=!i&&iw(t),n=!i&&!r&&sw(t),o=!i&&!r&&!n&&pw(t),s=i||r||n||o,h=s?function(t,e){for(var i=-1,r=Array(t);++i<t;)r[i]=e(i);return r}(t.length,String):[],a=h.length;for(var u in t)!e&&!mw.call(t,u)||s&&("length"==u||n&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Vy(u,a))||h.push(u);return h}var vw=function(t,e){return function(i){return t(e(i))}}(Object.keys,Object),bw=vw,yw=Object.prototype.hasOwnProperty;function ww(t){if(i=(e=t)&&e.constructor,e!==("function"==typeof i&&i.prototype||Qy))return bw(t);var e,i,r=[];for(var n in Object(t))yw.call(t,n)&&"constructor"!=n&&r.push(n);return r}function Mw(t){return Xy(t)?gw(t):ww(t)}var _w=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sw=/^\w*$/;function Ew(t,e){if(hy(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!oy(t))||(Sw.test(t)||!_w.test(t)||null!=e&&t in Object(e))}var Aw=Fy(Object,"create");var kw=Object.prototype.hasOwnProperty;var Rw=Object.prototype.hasOwnProperty;function Ow(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function Iw(t,e){for(var i=t.length;i--;)if(Yy(t[i][0],e))return i;return-1}Ow.prototype.clear=function(){this.__data__=Aw?Aw(null):{},this.size=0},Ow.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ow.prototype.get=function(t){var e=this.__data__;if(Aw){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return kw.call(e,t)?e[t]:void 0},Ow.prototype.has=function(t){var e=this.__data__;return Aw?void 0!==e[t]:Rw.call(e,t)},Ow.prototype.set=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Aw&&void 0===e?"__lodash_hash_undefined__":e,this};var Tw=Array.prototype.splice;function Bw(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}Bw.prototype.clear=function(){this.__data__=[],this.size=0},Bw.prototype.delete=function(t){var e=this.__data__,i=Iw(e,t);return!(i<0)&&(i==e.length-1?e.pop():Tw.call(e,i,1),--this.size,!0)},Bw.prototype.get=function(t){var e=this.__data__,i=Iw(e,t);return i<0?void 0:e[i][1]},Bw.prototype.has=function(t){return Iw(this.__data__,t)>-1},Bw.prototype.set=function(t,e){var i=this.__data__,r=Iw(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this};var Pw=Fy(Vb,"Map");function Nw(t,e){var i,r,n=t.__data__;return("string"==(r=typeof(i=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?n["string"==typeof e?"string":"hash"]:n.map}function xw(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}xw.prototype.clear=function(){this.size=0,this.__data__={hash:new Ow,map:new(Pw||Bw),string:new Ow}},xw.prototype.delete=function(t){var e=Nw(this,t).delete(t);return this.size-=e?1:0,e},xw.prototype.get=function(t){return Nw(this,t).get(t)},xw.prototype.has=function(t){return Nw(this,t).has(t)},xw.prototype.set=function(t,e){var i=Nw(this,t),r=i.size;return i.set(t,e),this.size+=i.size==r?0:1,this};var Lw="Expected a function";function Dw(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(Lw);var i=function(){var r=arguments,n=e?e.apply(this,r):r[0],o=i.cache;if(o.has(n))return o.get(n);var s=t.apply(this,r);return i.cache=o.set(n,s)||o,s};return i.cache=new(Dw.Cache||xw),i}Dw.Cache=xw;var Cw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jw=/\\(\\)?/g,Uw=function(t){var e=Dw(t,(function(t){return 500===i.size&&i.clear(),t})),i=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Cw,(function(t,i,r,n){e.push(r?n.replace(jw,"$1"):i||t)})),e})),qw=Uw;function zw(t,e){return hy(t)?t:Ew(t,e)?[t]:qw(function(t){return null==t?"":ly(t)}(t))}var Fw=1/0;function Hw(t){if("string"==typeof t||oy(t))return t;var e=t+"";return"0"==e&&1/t==-Fw?"-0":e}function Kw(t,e){for(var i=0,r=(e=zw(e,t)).length;null!=t&&i<r;)t=t[Hw(e[i++])];return i&&i==r?t:void 0}function Gw(t,e){for(var i=-1,r=e.length,n=t.length;++i<r;)t[n+i]=e[i];return t}var Vw=Yb?Yb.isConcatSpreadable:void 0;function Yw(t){return hy(t)||iw(t)||!!(Vw&&t&&t[Vw])}function Zw(t,e,i,r,n){var o=-1,s=t.length;for(i||(i=Yw),n||(n=[]);++o<s;){var h=t[o];e>0&&i(h)?e>1?Zw(h,e-1,i,r,n):Gw(n,h):r||(n[n.length]=h)}return n}function Ww(t){var e=this.__data__=new Bw(t);this.size=e.size}Ww.prototype.clear=function(){this.__data__=new Bw,this.size=0},Ww.prototype.delete=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i},Ww.prototype.get=function(t){return this.__data__.get(t)},Ww.prototype.has=function(t){return this.__data__.has(t)},Ww.prototype.set=function(t,e){var i=this.__data__;if(i instanceof Bw){var r=i.__data__;if(!Pw||r.length<199)return r.push([t,e]),this.size=++i.size,this;i=this.__data__=new xw(r)}return i.set(t,e),this.size=i.size,this};var Xw=Object.prototype.propertyIsEnumerable,Qw=Object.getOwnPropertySymbols,Jw=Qw?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var i=-1,r=null==t?0:t.length,n=0,o=[];++i<r;){var s=t[i];e(s,i,t)&&(o[n++]=s)}return o}(Qw(t),(function(e){return Xw.call(t,e)})))}:function(){return[]};function $w(t){return function(t,e,i){var r=e(t);return hy(t)?r:Gw(r,i(t))}(t,Mw,Jw)}var tM=Fy(Vb,"DataView"),eM=Fy(Vb,"Promise"),iM=Fy(Vb,"Set"),rM="[object Map]",nM="[object Promise]",oM="[object Set]",sM="[object WeakMap]",hM="[object DataView]",aM=xy(tM),uM=xy(Pw),fM=xy(eM),lM=xy(iM),cM=xy(Hy),dM=iy;(tM&&dM(new tM(new ArrayBuffer(1)))!=hM||Pw&&dM(new Pw)!=rM||eM&&dM(eM.resolve())!=nM||iM&&dM(new iM)!=oM||Hy&&dM(new Hy)!=sM)&&(dM=function(t){var e=iy(t),i="[object Object]"==e?t.constructor:void 0,r=i?xy(i):"";if(r)switch(r){case aM:return hM;case uM:return rM;case fM:return nM;case lM:return oM;case cM:return sM}return e});var pM=dM,mM=Vb.Uint8Array;function gM(t){var e=-1,i=null==t?0:t.length;for(this.__data__=new xw;++e<i;)this.add(t[e])}function vM(t,e){for(var i=-1,r=null==t?0:t.length;++i<r;)if(e(t[i],i,t))return!0;return!1}function bM(t,e){return t.has(e)}gM.prototype.add=gM.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},gM.prototype.has=function(t){return this.__data__.has(t)};var yM=1,wM=2;function MM(t,e,i,r,n,o){var s=i&yM,h=t.length,a=e.length;if(h!=a&&!(s&&a>h))return!1;var u=o.get(t),f=o.get(e);if(u&&f)return u==e&&f==t;var l=-1,c=!0,d=i&wM?new gM:void 0;for(o.set(t,e),o.set(e,t);++l<h;){var p=t[l],m=e[l];if(r)var g=s?r(m,p,l,e,t,o):r(p,m,l,t,e,o);if(void 0!==g){if(g)continue;c=!1;break}if(d){if(!vM(e,(function(t,e){if(!bM(d,e)&&(p===t||n(p,t,i,r,o)))return d.push(e)}))){c=!1;break}}else if(p!==m&&!n(p,m,i,r,o)){c=!1;break}}return o.delete(t),o.delete(e),c}function _M(t){var e=-1,i=Array(t.size);return t.forEach((function(t,r){i[++e]=[r,t]})),i}function SM(t){var e=-1,i=Array(t.size);return t.forEach((function(t){i[++e]=t})),i}var EM=1,AM=2,kM="[object Boolean]",RM="[object Date]",OM="[object Error]",IM="[object Map]",TM="[object Number]",BM="[object RegExp]",PM="[object Set]",NM="[object String]",xM="[object Symbol]",LM="[object ArrayBuffer]",DM="[object DataView]",CM=Yb?Yb.prototype:void 0,jM=CM?CM.valueOf:void 0;var UM=1,qM=Object.prototype.hasOwnProperty;var zM=1,FM="[object Arguments]",HM="[object Array]",KM="[object Object]",GM=Object.prototype.hasOwnProperty;function VM(t,e,i,r,n,o){var s=hy(t),h=hy(e),a=s?HM:pM(t),u=h?HM:pM(e),f=(a=a==FM?KM:a)==KM,l=(u=u==FM?KM:u)==KM,c=a==u;if(c&&sw(t)){if(!sw(e))return!1;s=!0,f=!1}if(c&&!f)return o||(o=new Ww),s||pw(t)?MM(t,e,i,r,n,o):function(t,e,i,r,n,o,s){switch(i){case DM:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case LM:return!(t.byteLength!=e.byteLength||!o(new mM(t),new mM(e)));case kM:case RM:case TM:return Yy(+t,+e);case OM:return t.name==e.name&&t.message==e.message;case BM:case NM:return t==e+"";case IM:var h=_M;case PM:var a=r&EM;if(h||(h=SM),t.size!=e.size&&!a)return!1;var u=s.get(t);if(u)return u==e;r|=AM,s.set(t,e);var f=MM(h(t),h(e),r,n,o,s);return s.delete(t),f;case xM:if(jM)return jM.call(t)==jM.call(e)}return!1}(t,e,a,i,r,n,o);if(!(i&zM)){var d=f&&GM.call(t,"__wrapped__"),p=l&&GM.call(e,"__wrapped__");if(d||p){var m=d?t.value():t,g=p?e.value():e;return o||(o=new Ww),n(m,g,i,r,o)}}return!!c&&(o||(o=new Ww),function(t,e,i,r,n,o){var s=i&UM,h=$w(t),a=h.length;if(a!=$w(e).length&&!s)return!1;for(var u=a;u--;){var f=h[u];if(!(s?f in e:qM.call(e,f)))return!1}var l=o.get(t),c=o.get(e);if(l&&c)return l==e&&c==t;var d=!0;o.set(t,e),o.set(e,t);for(var p=s;++u<a;){var m=t[f=h[u]],g=e[f];if(r)var v=s?r(g,m,f,e,t,o):r(m,g,f,t,e,o);if(!(void 0===v?m===g||n(m,g,i,r,o):v)){d=!1;break}p||(p="constructor"==f)}if(d&&!p){var b=t.constructor,y=e.constructor;b==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(d=!1)}return o.delete(t),o.delete(e),d}(t,e,i,r,n,o))}function YM(t,e,i,r,n){return t===e||(null==t||null==e||!ry(t)&&!ry(e)?t!=t&&e!=e:VM(t,e,i,r,YM,n))}var ZM=1,WM=2;function XM(t){return t==t&&!my(t)}function QM(t,e){return function(i){return null!=i&&(i[t]===e&&(void 0!==e||t in Object(i)))}}function JM(t){var e=function(t){for(var e=Mw(t),i=e.length;i--;){var r=e[i],n=t[r];e[i]=[r,n,XM(n)]}return e}(t);return 1==e.length&&e[0][2]?QM(e[0][0],e[0][1]):function(i){return i===t||function(t,e,i,r){var n=i.length,o=n,s=!r;if(null==t)return!o;for(t=Object(t);n--;){var h=i[n];if(s&&h[2]?h[1]!==t[h[0]]:!(h[0]in t))return!1}for(;++n<o;){var a=(h=i[n])[0],u=t[a],f=h[1];if(s&&h[2]){if(void 0===u&&!(a in t))return!1}else{var l=new Ww;if(r)var c=r(u,f,a,t,e,l);if(!(void 0===c?YM(f,u,ZM|WM,r,l):c))return!1}}return!0}(i,t,e)}}function $M(t,e){return null!=t&&e in Object(t)}function t_(t,e){return null!=t&&function(t,e,i){for(var r=-1,n=(e=zw(e,t)).length,o=!1;++r<n;){var s=Hw(e[r]);if(!(o=null!=t&&i(t,s)))break;t=t[s]}return o||++r!=n?o:!!(n=null==t?0:t.length)&&Wy(n)&&Vy(s,n)&&(hy(t)||iw(t))}(t,e,$M)}var e_=1,i_=2;function r_(t,e){return Ew(t)&&XM(e)?QM(Hw(t),e):function(i){var r=function(t,e,i){var r=null==t?void 0:Kw(t,e);return void 0===r?i:r}(i,t);return void 0===r&&r===e?t_(i,t):YM(e,r,e_|i_)}}function n_(t){return Ew(t)?function(t){return function(e){return null==e?void 0:e[t]}}(Hw(t)):function(t){return function(e){return Kw(e,t)}}(t)}var o_,s_=function(t,e,i){for(var r=-1,n=Object(t),o=i(t),s=o.length;s--;){var h=o[o_?s:++r];if(!1===e(n[h],h,n))break}return t},h_=s_;var a_=function(t,e){return function(i,r){if(null==i)return i;if(!Xy(i))return t(i,r);for(var n=i.length,o=e?n:-1,s=Object(i);(e?o--:++o<n)&&!1!==r(s[o],o,s););return i}}((function(t,e){return t&&h_(t,e,Mw)})),u_=a_;function f_(t,e){var i=-1,r=Xy(t)?Array(t.length):[];return u_(t,(function(t,n,o){r[++i]=e(t,n,o)})),r}function l_(t,e){var i;return(hy(t)?sy:f_)(t,"function"==typeof(i=e)?i:null==i?Ey:"object"==typeof i?hy(i)?r_(i[0],i[1]):JM(i):n_(i))}function c_(t,e,i){var r,n;return i=void 0===i?1:(r=Sy(i),n=r%1,r==r?n?r-n:r:0),Zw(l_(t,e),i)}const d_={width:"400px",height:"300px",backgroundColor:"black"};var p_;!function(t){t.PANEL="PANEL",t.VIDEO="VIDEO",t.VIDEO_STREAM="VIDEO_STREAM"}(p_||(p_={}));class m_{constructor(t){this.ssp=t}resetStyleName(t){const e=[...t];for(const t in e)e[t]!==e[t].toLowerCase()&&(e[t]=`-${e[t].toLowerCase()}`);return e.join("")}mergeElementStyle(t){let e="";for(const i in t)e+=`${this.resetStyleName(i)}: ${t[i]};`;return e}renderCustom(t){const{tagName:e,style:i=d_,innerHTML:r}=t,n=document.createElement(e);return n.style.cssText=this.mergeElementStyle(i),r&&(n.innerHTML=r),this.ssp.createPoiNode(Object.assign(Object.assign({},t),{element:n}))}renderVideo(t){const{src:e,style:i=d_}=t,r=document.createElement("video");return r.style.cssText=this.mergeElementStyle(i),r.controls=!0,e&&(r.src=e),this.ssp.createPoiNode(Object.assign(Object.assign({},t),{element:r}))}renderPanel(t){const{dataSource:e,rowStyle:i,labelStyle:r,valueStyle:n}=t,o=e.map((t=>`<div style="${this.mergeElementStyle(i||{})}">\n<span style="${this.mergeElementStyle(r||{})}">${t.label}</span>\n<span style="${this.mergeElementStyle(n||{})}">${t.value}</span>\n</div>`)).join("");return this.renderCustom(Object.assign(Object.assign({tagName:"div"},t),{innerHTML:o}))}batchRender(t){const{dataSource:e}=t,i=t=>{const{id:e,pid:i,width:r,height:n,dataSource:o,fileUrl:s,style:h}=t;let a=this.ssp.getPoiNodeById(e);if(!a){if(t.contentType===p_.VIDEO)a=this.renderVideo(Object.assign(Object.assign({},t),{src:s,style:{width:r+"px",height:n+"px"}}));else if(t.contentType===p_.PANEL){const{panel:{bodyStyle:e,rowStyle:i,labelStyle:u,valueStyle:f}}=JSON.parse(h);a=this.renderPanel(Object.assign(Object.assign({},t),{style:Object.assign(Object.assign({width:r+"px",height:n+"px",backgroundImage:`url(${s})`,overflow:"auto"},e),{padding:e.padding+"px"}),rowStyle:Object.assign(Object.assign({},i),{gap:i.gap+"px"}),labelStyle:Object.assign(Object.assign({},u),{fontSize:u.fontSize+"px"}),valueStyle:Object.assign(Object.assign({},f),{fontSize:f.fontSize+"px"}),dataSource:o}))}if(a&&i){const t=this.ssp.getObjectById(i);t&&this.ssp.addObject(a,t)}}};e.forEach((t=>{i(t)}))}}const g_="/SceneMetadata.json",v_="/db/sign",b_="/db/tree_models.json",y_="/db/pois.json",w_="/db/topology_paths.json",M_="/db/properties.json",__="/db/animations.json",S_="/db/model_visions.json",E_="properties",A_="poiRenderer";var k_,R_,O_;!function(t){t.PANEL="PANEL",t.VIDEO="VIDEO",t.VIDEO_STREAM="VIDEO_STREAM"}(k_||(k_={})),function(t){t[t.BIDIRECTION=0]="BIDIRECTION",t[t.POSITIVE=1]="POSITIVE",t[t.OPPOSITE=2]="OPPOSITE",t[t.FORBID=3]="FORBID"}(R_||(R_={})),function(t){t.BFS="BFS",t.DFS="DFS"}(O_||(O_={}));var I_={verifyKey:"",debugKey:"NJHgNB1HDTrHTJc4ERFCBRVBB5HOBEDCjRLChRDIdn8K7EUJD,Vm4C6vC8BpZ6n6G,hxOjYZ{,wYhnJize2rlm9m,6bUcRVbP6sjNbKU8juOWUpukkcV6Cw,Bk2io7{YWJcPnG{1o3GUTpnO:z{kCYHL14HjO8noH1sp[J78k3Y3IcbOSSk97evccx0MdW2uR0f5qhZFQV8e2JCRxxJEBRBC",key:""};const T_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO0AAAC9CAYAAABfw/p4AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAA7aADAAQAAAABAAAAvQAAAABwZIxcAAAzEUlEQVR4Ae2dd5tUVdb27abJGZogNthNThIkCIZRHwOvDoKogHr5PtfM+898jfkm/jOiCIKigzAYUBGQICBRcpbYhKbJ0O/vPlOnPFV1UuXq7nWuq+qEnda+z773WjueRx6xwxAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAqMQFWB47PoDIE2gcD3339fc/78+Ulk5sG77767q5IyVVNJwpgshkAlIPDZZ58Nv3z58lM1NTU9WlpabvLbXVVV9bASZJMMRtpKeRMmR9kRWLJkSW2HDh1mQ9LBrjCQtduXX375OPfH3Gfu+dNPPx2waNGii+59qc5G2lIhbelULAKQryvknP7w4cOxkDZDztu3b4/nYZK0+O/B/czq6uoRaOWv3n777T8yAhXxgZG2iOBa1JWPwMcff1yPlC9A2o5+hFUOIOeQlStX9uG40djYOOn+/ftT8OuwG6KL0CUlbbWEssMQaK8IdOrU6Q6k7BiV/3v37j1z8eLFRZjO01zCJsI0YD53iwpfSHcjbSHRtLhaHQIJ07YxSnBpW37d0/2hoavu3r07Nv15Me+NtMVE1+KuKARoi/b2Ewhzd5/f87jPMJHHoYFLxqWSJRQXAPNnCBQDAQg7BU05xy/ukSNHHub5XT+3qGeQtQXSHl+/fn3JuGSTK6Leirm3egRWrFgxEWLNVkY4r2aY5kx6pvAzG7eJ6c8j7s8QZjPxRZrXEfFk5Wy9x1nBZZ5bGwLLly8f6xI2Ibt6e1NI+9VXX/W9detWf5qnsbJHfNfpjNpMe/hErAAF9hRPygInatEZAqVAAMKOevDgwQuJ0RknSZmzXbp0WfLGG2/cXL16defm5uZpOIxXh1IcmRS+trb2Xy+++OLtOP6L4SeWoMVI2OI0BIqJAG3YBnj4UgAZd6Atb+I2nV/nbOUg7M+YxBmdV6TZdfjw4fenT59+L9s4s/FfssZzNkKZX0MgLgK0RQcyK0nTDJMH5BkWQlj5m0qn1DO5EFaB0dwysZMHyrf6888/f4IHi48ePToq6VCkC2vTFglYi7a4CGhCA9MLZ6L1RvHb7KYGYR+DkC9zXzQrEpL2/eKLL4bMnz//LGQdSqWhTq7epPsIFYEInaGFXfkKcS5axgohnMVhCKQjACk7dOzY8QnGVqdCEEfpcL2B5XP7cRvMs9fc5+lh49zTBn6QNuPJNxgVxVkcHkDUoekeSL+o85HNPE5H3O4rFgFI2QAhFsKrGV5isoTuPutfuyD4//E+zzYjaNCjhP+U8+mosJBVM6QyCKtwEDrFfI6KK1t3I222iJn/kiMAWfstW7ZsLiR5GVL1TBcAktxXby5uzeluce4h6WXi+HLhwoXf0sF0g/u9ccKF+CnqfGRr04Ygb07lRUDak0n66uEdyy+wKcek//uSFA28H63rTKKIKzmm9abFixfvJfoWNwzkPcVwURPPMioI10/E+SImdtG4ZZo2An1zLg8CdPT0hLDz0a7jwggr6SCrQ1r8HuT6QTYSy7T2ElZhdc8v684kNPRNgq9/5513Vr3++uvXs5EjG79G2mzQMr8lQ4Ce2SY03jLIk1x8HpS4S1pM27uQUPOIYx+YxePSPW/btq0jFUDGip50f557VRQ7GhoaPoWwh9IrAY+/glwaaQsCo0VSDAQo/A8hZOREhW7dujmaVjJgKjsaUgqX360ouSBnLW3mAfKHpqzSLKpjx44tgsyx5yHjdzVk3VbsSRVuXoy0LhJ2rkgEaBtGLlB3Na0ywPTES5DvAuHWc94eJ1P4HadJGhB2Hv61i0W3OOFcPxC/zr32nqkMuvLT1jQFPYy0BYXTIis0AhAyskPnzp07SU2r9Lt3775GZqqW3EHASE2NphzNbz5+B+Yo/1gqiCSXdE0FoO1XF1MhTM4xzsBgyYQCfZiDIVBGBCBSJGk139crIp1Ad3QvcxXSH/a6+V2TRmDPtJ9/n2ddmRnVoOeaUsnw1EIun0IDy0oYhbbtJLdCHUbaQiFp8RQFgTiknTZtWgpp0wTJuhc4LbzaxumPMu4ZOpoMWV9Dy74KWXu5HrjvSDt7pHtfiLORthAoWhxFQwCzNVTT4v4QYifHWCWIen9pozq9wlqgDnEu5CjgNXqj1/D7PSo8Mmg9bp2fP0hf0BlSRlo/lO1ZwRFQOy+XSKM0LfEmtSzXVZB19JEjRxZDlORQDnFkq201dKRF7svffPPNU26PdC7yKwxy9cVsfjTX8OnhQmuxdM92bwhki4Dac3TGPEnHTF/Cfp1t+CjSYoo6pGUyxiDM06e511cCRJQmN63+/fsfu3Tp0mziilw7i5/D/fr12+Rd5K4eaeK+gFtOHVUYA1eQJVm5uHLles6p9ss1MQvXfhCQ1vvkk0+k7RZz/QQFvg4C++6GGIYK4UIVi6xjtNiL7Es8T4T1xJVsiELA+7gd9LgFXorsXsK6HpEjW22tikMdYhv37du3AjO9YJ8PCQXEFdjOhkA2CMgU5Pc0JmY/bziNh3KfXPvqdQu6hpQ1ECbIWQvSu0KOkT4ekqSVG6Q9gMmsheqhB340fPMraSY/uKU28okTJ/rzPDSs64g/edzH0NN2tyfbdSvE2UhbCBQtDgcBzRemF/Upyqwz/JEOCwQczSKAbdJ86W5+92jmDpAnmLF+gRLPkCEljQULFlwlvrOQd0hIMKcSoF1cj5+jxFG1dOnSUbSRZ6pyCAvndcPvj2+99VYsze4NF/faSBsXKfMXiIA00fHjxydjompCQeYXrBIh4V9nvvk6nNtYBbpHjx41N2/eDEw3wiFF08ovG7rt42sAoaSVPyqeCVRAzVgLs7EWnCmOeh73QFsPxW9GHlUJ8bwHpvK1uHH5+bM2rR8q9iwWAtJE7lxdAkzlF0hYN8KEiezehp7xm49SySAtHUonIFTkfGTSHaw2MsJlTVhlCFzqIWiKZua+gUprIb/nQjMdw9FIGwMk85KJQK5zdSm0AwnbPzPGzCfXrl3LmbQQL8U8Vuyk/ZDnBzJTKuwTTPBqNQUUK2Ttx++vPHIW8CPDo3qWT4o5g5JPoha29SLg3VCNAphTRtB2mmzwU4zAN/AjzZiitWKEk5cMTauHkOkAmnAq5NVt0Q7iHwc5e4KR3wJ+5X9Drombps0VuXYWjgLYgW+0TmEHxMUUxHy3CR1JfJHzcWn7PSCtyNlIfq8C89aXtMR5A0Kd9AsT9QzCNxP2O9q8O6P8IndPtKvvAn7iiJX/oDSMtEHI2PMkAhCsgUKYsaFa0kOWF8RVE3c+Llp5P5ox3lhLqhy+pJUXyLc/1Wv4HTJoh8ZfBwwY8Cm90EcgY64yOQmRnbzmIxtpw99Xu3aFrKEbqqWDAxlO8dua/tzvnl7cWPNxpRkVrxsH1zqOu/dBZ3p9M9q0rl/tAcW1TO/Ig7ROUcmIrNvdoSrJBPFORAYO8KBKCG2dc9PUSBsAbHt+rA3VIOyzFNa3+MWZM+tMrKcwr4EQv6GYInto0VZ9SWNwHJw7d+7szkaSWbscrbcnRrgMTUu+akizB3mS5o7VIYXfZpE0Pb2uXbu6MqU7hd6rEqBCWc56399CPYY4GmlDwGlvTiiAanp2J164cGFxUHssDZO7FMLkxHq5Uciz6aGNpW3ZL+o0G5T/m4K+FgJpjDOyPYyfFNIy5jr88uXLCyH8LMlJRfC7NJ6uI46M9ifBqlh4n+1OjcmKTRM9ItIMdc5ZRYfGao6tDgF93oIx11mQrg8FO5b8EGkNhDqf7hkiHyCeKfyiupcbpNX95vp64yQakeus+wxNro3X3Nugs0PaJUuW1NJ+ng3RHK2ObN3VA66v5rEI4BiBhwdFoOekXQMeGr5xtLusA3B6muexhq1I7x7pbwcnbdOanBoZlmaUm5E2CqE27k4h1DdoZtHG0kerssot2kYFPoO0MichxEncHg+LkHSrr1y5MgY/u8L8pbtBhEjSyg8yPMd5rDc8eZSWVJo7INN+eplDSauwxDGeGVInaIfPJHikf4WhYnHmO3O5jeV9kc0FhYl7GGnjItUG/UFYEfVVspYdWxNYoL00l3ir20HjhQg+7sM9lLTyT+Eeh7/fkEPaNNZBmzByszfSf0aRBVgNWhSwkzTPojVlbketPuoNYTXUFQsnSH6eHSI3aklfVIZ4B87SRaI+ynzlC1H+5V4dx5P5aZsI0JkSWajCcg4hOrGh+Ag/PxTAMxTeyA27Kaw90WJ1fnGEPIvTpg0J/kgPN01kjDX8E4ewxOWM42JprIoiLJVGytJF7lMsgjDhjbRh6LRxN7Xr0EjH88ymb2cShbyFuGMRAnPVN44guSBHpKYNCqvn3t5tFiVoYn9Kp1VYWD834lP4He44rp8f7zMtXUTDL8BiUL43aLIGHWO70bqxZn4Zab1ottFrCkM/CskczhkT4ClvfsS6CDGOx4EDYiY3+073j0mZ7DxKd/PeE8dQZIu9PzAaPifSkid1BMkU/1TbyEgGrXdFyx31ypPNtcIqPm1W7tdM8MYl7ap7zs8RRntKbYPopyDsw+bm5gU4xaq8rE3rRbWNXX/44YddaFtNo3CMI2sqMAMhx6rEsImTW67PuO06CtNNSLyVD1Idoje5N9f1jqeIP0ik+JM7M2g8FLN5MvFNjgjqOCOfDpmH2+L4l6bFfxyvST/k5WTPnj03+X1jJ9EhNSrpOcYFebtMZbMJsv4R5V14MNw0hY6xvvhdh/z7CTsLmZ4Ep2e4bgJDrR0e889//nMHv9BeZtO0UYi3QndeujbLnoDpt4iyMF6MUDYoHF24fE1DHt5sUYj28HxnA9+i4ePMB7lu0Vgiz2NpSsy7katXr3b2X2KLmREUxEWk9aQKojedsGsKcMqG32F+cbsb4Z50Ji9X0GSrqYjW+hFWHjVsJRImA4Vc4O8OedsAWVey8VskYakkRzY2Ni4i3BTC1YNTL5nk5FcfpJbFsIF4vgLr6/jpPnXq1AxrKF2c7Kqr9NB2X3EIQMjHMEs1Lqla3ffA7TK/r9CyoYWfAtdAwXrZN5K0h5BjH+WwP/4HpTnFviWObynAkaaqlgVSyOeHRUz+7hDf9j179uz301zkrROyTiA99SK3EOc44nw2KE7iU+927C1kiH8A8Wo8tzNt101UbEMIP4n73aS5GffHmD32B+kOIt3ZuPXGbSfy7vKT1yuXaVovGq34WoUQ8+tVOnVep3wFElZZpHBoYsArhAnVhBSqE8QVa+sI/I3Ph7CSC9LLzI48NDRCer6akectxLPvxo0bamfuTScAzsleWxKaDmmGKcFhw4YFfkKEMKfpaf8MPDZG7fkkU1hpEKUmlwyErMfUfubaaT5A0O5Kj7bsZayhl/Grj2Vf6dWrl+SNNI0V1jStUGgjByR8lgIQq+AryxSgH9G2v4dln+V40yDBk2F+CumGRb0szjQ/P81IfmTObyJPjX4ySbuBj6YxJhehi5CQ8Wv5J85niSOJH9fXkUfTNE/4xed9lqgAtXGcfkshay/ayguIX+b0Kc4jeX6O7VzXuTPAqGSfxs8Rv1ll3rjTr4206Yi04nsKRhUF4WUKSX1YNiiMl2jnbYxTWNauXdv9+vXr76Epci4rIgY/DQENDZNLbvjZgybd5Pr7+OOP62lnnyD5lMkX2peKT1J+wHNptiZIsvm999477obzniGUTM+n+PlO9qCzbqnau5C2P9hokcQ9fjuIcw8VQORwkGTEBJ5F2Gamdm5EfscKIF1t6zpI8vHrwnVHzjoOId+GOHF78+Fe5/wi3AjsXFkIqManULyOhnDm2nqlQ2PeolBtQZOlfPiYMNpsLGMlixsW91cocPXufRbnaxTkzcR9EkJEtkMVLzLeHThw4EdUFP1pm2su9EAIscYdovGmjXmpj1zdDiIXcjuzjYhzAv4Cm4Kk4bQzFTdhpmAKH9QYtjctv2t1+D3xxBP/A94N/PbKfGbSxhCmRg7F1P1FixR4/hLxX2ED9M/poFOl1ZsPhu3N51u2Rlq/t9HKn6mwUkbfIBuOGQhxNISwm8Kyw1tYMH37UODVCdKPQvYxhUv+Mg5pEsj+SoZDwAOSu0f6v2JWqlc6GSdWgLRY5ER7Cvplrz9Id1K9vwHJZTwWmcaPH68hpGnI0SXDQ9oD0rtTW1u7JGqc1Q2moTSGj0TMQ/SWT6RSEYaN5FszwAaT5lbctK2NVk29y7k7FdDK999/P68ZaG76Nk7rItGGzmi2u/Qif02n1HwK0iWGGH7xDndoeIZtY56EsBMgh1NxQyiZjse8MKjwT5kyZSyaY7r3edg16T3s3bv3sjlz5jSn+yMprUF9Lv15+r2XsHKDBM7kizBrwI1Dvee3bt2aTZjQzjjXP+JKzi1xCCsSoj01V3oav06kdQaL5lBTU5P2RVYFKVIuhbB30bjqRb+Iv62kcbNQhCVO64gSCG31UE+mtzCKhJMmTRqD5poBMZxxVTfvFKyzkOLf7j3a+jGuYxd+N5zOxO07dJOYdPEBhMp6RhMVzE7atoG7YshqIF9PkfwwryxB15BJnwrZhdn6mxejIP+QtQ6M9D2ge5yvE3YE19uxJn4Fq+e5H839bmTQEj6tBqpDA6+K06kWlGbQ80A7PyiAPW89CHgLo9paEydOXECB044UKYRVjih0Q1TwdU0B/Qv3r/OLpa0UxnuQhu90PMlD2prrm/UBAcZAtIzyCmE68JsNqd8h0riEPaQhFhHOi5GfUEqT+NVufQ33M4T5gvMWyKned2ndaiwZZxcL3eP2Dnm8zSdBlhaDsJIxAwQ9tKPtIPCvf/2rF4XuFUzcv5Kr5FCHXw4pgM5wB2S97ece9xmF9lG3AkgPQyfP/vRnMe+78omOhnS/dP7o+7SP84vsn4FUWjL3OWHW+5nv6XHrnmjVJneGkMCnL/ctMtPB6DTX3TCRH6fpobnal7hX/F+oQypqPNcvrbjPjLRxkWpl/jQkgsacwacw3qGA1ccRH2JrfWwNw0EH4vgP84Pm89W2c+fOvULhj5z+5xP3RbTXtfTnIhFaOEreG8jzHWRbJYKlx+G9R7Yq/bzPmAih+DXtcAgVoLP2ljSdyocOptEJv2toy65W/rxhi3FtpC0GqhUQJ195G0rhm4IoobOevKLSmdKJoZYR6rRCc2TMO05ok1iFkrSdCsAbv3tN4XfMSfc+7Ew8GnpZL7OUDqbOGktN9w+BDuIvZRxXfnikHRm3MaFhGe3hI+nh0u8h5GA65N7kp6GZ5IEJfZu8O+GRfSz+ulLBPc6ze3g6Ko9UCLeSAYp8YaQtMsDlip4B/uOknXVBcte2QuCkGUv77RYF9EfMvs/RbL/FyROFuyMrWzQLKOOQbIozwyH1gTYqdxYxYHKeh0iaNPI6ZNFHvlIOv3XByHsQK0M9uTui2q0ioSJkWGsYadTyc5oJ3kSoGNTB5LRjcddCDFUSil8TJUp6GGlLCndqYmgNfTpiHsvgNPWtoAcFXm290CmKfgmq0DIkNEDEouA389tFPJ+iSX7n3NK3b199AvKOX9j0Z/jzNZElG4U+0KQlzeMQaBnE3nXq1KmpzCNeiFz1ip9wzmZw6Wnh161kzhH+c+T9IWqCBNirE0vDN+999dVXffv06aMKiageDKPjrqc3DczrJu7P8Wuk+fBvNL+mgEZVPN4oCnZtpC0YlNlFRGEZQ+HSXOFBFIhZ3Mfq+cwmFbX1KIDZBHH8QhIt53uonRgomFv4JVcDSWsRZ6weYOLonxivzJCBvGvyQbpJ2whZ/41G/4YAQ6TRSGsyZ2857YAGd9uRyXgJc5Y416L5vkTe0HarAomk+NOXA7rz64DpPU5mMDIf5lafu9TkDMcfM680w+wZyPotYSK3klG4Yh5eMIqZjsXtQYAOoke5TVkGRrmcRRku6PtgbnEThVC7/t8mvVhmrcREjhGagBFkViKrq9XkPfSgoybD1FQACv8NTid1TXrOGlW01wrI0gJJFmAG/wUnx2yVH+9BfjTUktJZRD7Vq+vE5/Wbfk3l2JX434Ckb6jTjUrBNXtH6Z549ioM8Y/BJH+a7+Nqgsp5xnN/itLc6WkV676ghaRYQraleLUImkKgubzp2PeGzBMLnVc012biVNvrFwqiM5E9Kg1pHk+vaIZ3yHGNuE5nOPg8gATDIYPvVELanHuBYY/GNEnyNM2Fl4h3LmEyOpu8UROmF341+SP2IULKM7Krfa6mQ2e2bx3OvaYfniX9TmjwhsRkf5nBXZFFci/HT/KTIIqj3Ed6wSm3PG06fWr5TuwFNEcFJiCjU6UJAtxyeqwBfgqdY96iVWJrSDRehjbzCgBx4vYAd+Dr72O8Yd1rNNcZ1rFuo8d6Epp1ISTJGId1/aadpaVj2f3EqV08Jl26dOl9xlSdHTsgqdOeJo8TFC+4ONqVy7G6p6Jbjx+1izVMpLQq6jDSluh1aAohhz4s7Mw6Cki2E+7TA9zyfjxy5MjDFEYNU8Q5etPuGxLkcffu3TK7m4Pcvc/RYhkVAGRKfkWetnesoSnCwLP72zWEgykdOdarCR7giZgPNSmiMz3jTuXBe1An223OTqeblv4h7w3I21sVq5oVkDWyXezNYymvjbQlQpslXFoJEmnSUZjGYvqFmoe5iqwVPhTeWJ1ISoN2n2/vr9yohB5S6GNpbtLsSfuwVuF0qHOKpoC2i3kBN0f7OQ4hfxDqsKYeQrDIqYfqZFLnESb+W2qbE61rFWgfqioIqYkSDg5YPlo00YJ2/Y6zOt4cqyRElLI72SqfErwCCtAECksgAbwioJUewVR8mmdfep8X6lrTCFnh45iFUXFSiB/XIvigKX/0pv5OXNrtMaVTyBsv+dZ+VBuludBiPcjfDPLnO37rDee5vgjBNtImv+B55nspgkLCaXQejSbMTdLqwPUY0v6NtC/xrJYKcRjynGSY7Q4VgeJxJp/E2RDAN9EyPDRNW2TQ9WErCom0bOyDsjYYTTQ8doAsPGqaHYVVHS2Rh8hIoXfaeX6eE72pKcv5PP40hvkTZFvJ0NElSKPxUO1KGIuw+LuJKfyDZkLRORRKWPxWgfN4CLuY616kuxzRf5EsnPvLnUtH23I9Fa3/JhbNSNy+ZqjoW/lrTYeRtohvS2YaJpp2LgjUREHJU7iecns8g/zk+py4XXMxMgqIE7q1KdorJS7I8JAwuzlpo7IDECSrLVUVnmNXg2c71yghgbcFnLWlTGcqPE38GMzvGX4PyOtIzPE6Ko4jXGtj8l7IfJCKYAUVwumouCvR3UhbpLeiYQ7ahHMoIFmvHU2I1INe14wpe4UQl10gpB2lCSMPiOCsZAnyqA4h/LjzkU/ibzntzs0sV+sNYeeT/xf5dQ8K730OWY9DvmWYs1u8O2x4/YRc74aQOkaS3pNYE/rcxib5J86xGnOmw2uVu0sjMmv1Tqs8jLRFeG2Ygh3YD+hVCkbKVLhsk0JrTFabMttwUf5VYCnQv0f5c91pt4a2xyHIduL8Gs26ll0r7kPWFzCr3+TZQDeOiLMzEwqyrvvggw+uh/nV6iXwnZk+04qwNyCseoF1HOBeFYjTaIWsTgWl4a+///3vmmjSqg8jbRFeH4X1OWr7QflGTTw1aIaZ+cbjFx759ic6YvycU57hN7lAPsUhcQNBjjFj6BwdblMZc12E3KP8/KU/g2R30K4/s0H3SjqCMlYVpfvX/dGjR7WZ22QqnYyKhEpuj/wQ50TW3r7B/ZN0eq3DFN6g523lyLqtVeyMU4t2pVdyGGD35LyvUqaOxc038uvzDzPi+o/jj+GIVcXo3YRkc0g/1pxn8pSytalXbnWaQcCneNbD+zzoGr+acxx7t35pVUjaHVP8KPj2oFLQZmkttFM/0nxhbzrk6W3ce1Ih7eT5biqUWJMwvHFU+nVNuQQE8+qvv/56CGbUYwA8kELRi2faG7YawjpiMRg+iW78j4q5C0Ah80+B0mc0CkpYyQce+szHFxTG9An2eYmP2bgPMsQiLdor4wPSzDCq5R1JNnX8xDrwe5p0N8XZikVNA1ka5H8k6T8kvetU4uqJPgHO9e5X5ImzGmJPUGcUFdwG3JpaW2UfC7yEp5Jo2o8++qgvWlNDH4MpeH04d+cd1GC+RMrKCziFebMm0mOZPagAUwHNI0+hmSLvLWBwlorqmrAgf0PiiI6/H8DBmRAQx38cPxIFzaQvnMdqe0OIH9H4v2s6IASZDuHHRGTXK0ZyD2Tvw6BriCkctetGR8rKz8j4Evdqt64gTQ3jzOXXxG8jfrTYQj3DznhwUJxt5XlBSbt3795Ohw8f1uD1o7zU2kRh0NS8vNLhpaygwMaa7F6OF5PYhV8dL93C0qfw3aby+o/X1MW0rAOvVwkXSnZIfmvEiBFLc+hVDRNJn8KYjFyx2s3IeRk5jvA+popMoREnHInbdw/koLAiq2vS0qH1KuHruP8QnDTVcTr3x7lfJzOY+35g3oxMWj54OCjOtvY8J/OYl1fFy5ZJVAdg6iHsza8rHQrVbs3LS42NFXFolwING2gDrUbCaurZVDcCnF/h+hP3vpLOGktVTzEyhxIWmR9gFq6FsBcocBrc11RF7e63hntNBNAsqMADXLvSCSNMtgR6ysGBRe2/I/905I98Ybyj/uQh1hRL3pl2eDyASNvoVY4cXlqyZEkteZyNNleH1HZlhfSu8exxJk48TpmTMtDUyXrw0tfnNpLGINq1e4KWECqOtnhEasANGzb0PHfunAATSftx7s6vo0vObEEhbBNhGgHd+fESGvnkg0zFlPYaNW76pyjW8/IPZZteMf2Tl1jfzpEMkPR7aQPytYA8O/NwVbBZnvbLjh079rAj/ls87xsmL3E8xIJZFjUsEhaHnxta7EXyMtLPLcdn55BzUzYbdKMEnM+GgMktcFpCeXgIVmPAROtq75L1XzlrfHkBZe80ltf69DKTo6ytLlhS0/LSqjFH6sjBMMBQm6EX584Q1iE2107m3HNUTgmvmSmO5iSMtGcjy7CuxDXveOm/UKCHEodjNhLfs7zEo7zQiukNpKBJQ9VHYUEh+5UK5zDDENpPODlxXhUf+ZzJ5HvNjdVEgNfD4iJsNV9ZUy/tujB/2bpBFH2ZvBCk1a6HW+Jsoqbylug80neENkFCWSAXwWRAYqvUIzQlrqpTEsJuxc8+5QuclmKd3M02j23Jv7NdJGDNg1gyc7M+VPvzwq/y4ht5EY0QrZFJ6Y1Bk8yzSYDvpMzAHFNbxjmIfy9zRTe69+U8g5nGIl+IkgGZj0LY7yiIY8lLym4VnrAn8bOWApluXXi8/HmJCflvzOxY45p/hgq/Ij9OGzHcl78r716m/864u/WTT1XEGh56B3xa+C6OM0KADJrn/By/c+DxpRYA0Ln3vxSxXZC2oM0C0mi1Rw2FaTiAxyXsDXKqlf5XKDiXqQWvQKKrEL4oU8JY/7mTzxmOJn6nvUi6E3jhO3iBkW2kYr4RZBiMLNKaUclc5MNOPzC0pU65IMJqEfawjRs3dr169eovDHEMI97QiBlmeRrtvELL46IEiOtOfqRtNV83q4NwR8jbFrSfykboofWtaGJ9auQ8/n/FsjvO9XDyPJqAu+vr64+w9at6ggeDcT+G+hox3dW+3RMacTtzrBGAFBrtcpeSdYBzv7btmLg4NkKWkpolMqWpfVXDviDhEjK+zOWXui/HgUnXE9L4bReTIg6FuRmL4z908lRTqOen4+v1LLczZ87MpwL8hMK6G7fJXvf0a95Z38RX4RyTMd09l3tkPU6+YpOW/MX+xq00JsTUB7/GgsVuaWTJSD72Uc6Gcx7H7e5p06bdp5I+jx810x7j1yhyc7bDg4DTUKWgpJtljnni8Ve2S15qFbXtfAQY4AqBli/KDCE3/qAzOOl7p/OQKbTDCPf7+FulYSrC/I1CGWt4BItnTV1d3bkjR44sJnzotjOkcUd7KxVq4glydkDO/xeUd/c5FfwtSLWVCuYg55TOQ9ePe9a7Q7uOhazTudbEmRaaT0u8Ex94tzKRhaf2sGogzs7gsMnve7RuvO397JphPwBY8gXwYvpplUolgKOCwctOaccygV1DQCU9MEWlMbXxWChhZbUg73ciLFbCIq5jEVaZobnxsqwLKqXI9psKtxZ8FwoErCgtY0uWgfR40azaq3gX6Wp3B2cP5HQ/3ntNPaRZ0IlgIwn3DeFkRlehzcd4/ZHk/sT9VPwdQbMuN8J6Ecq8dkgrsxc8nbExeQG8Thq7y/RenifqWeTlHnJTRz5tgxlr9wU3TL7nCRMm6KvkMttCD2T7hYJ3Ag0iM17j17EP4q8h3Aym+B2S+Rkj4Hit2Y3hL64X3+YP2J9gqd0y5ErZA9kvUjUflHcqoHksTRygDiXw+ANcHHKSr3GqAN2w7Pf0OxXbJs5Lec8pH6F2/dg5FYEkeAC7k5ejYRrnoADpmyX93Ptyn9kfaCvy3Xfl4OXPKtYicTcN9wwO2rw7spJApoMU0t/o9Z6MrA1u+GzOxOG0ZxnuSLEu/OJApiqIMcvPLcdnKaRFliv8VmMK/0ff9wmLU0vm1NuPJn2bMI6VhlmcxEzEVXwQtDv7ZWkozzk0MUJkTZ/477rbOROBJGl5/9rc6nvXiwoE17Pd+3KfNYSESFq54Ry8/GqsgdgdJ264bM/Ms32MdJ+OCgdJ/6Bw/4SmGUKbbGaU/yB34Y4V8VdNdeTycJA/9zl+6iSje5/PmbjuKXyi8t64b9++FVhhZ6LiRLPW0YGkpsAoytDn9JivoZmgCmCY5im74XF3tC1kHu4+s3P2CCRJq6BqS/DCknN8AVmf9stJY2QvSnQITCjtTtDk+uR6tMwx977QZw1RoDm07anTYRcUPxrkOr2j32CqdmGyxOtB/uI+J7lH9V1ZTNIt5DFpXQSFR8ZHg9yyeU5amnS/Vx1cWAx7o4aUNIuJ8tEVgmrzti7I3Q2z+D6V6Qily/1x8pDU3uAks38rz3/MRi7zm4pACmnlxIybdepMcQ8AfooXkzoe5DqW+CxTisLhbNilpGkn6ZsrajsW5aCATSXiThGR30W7rP3b3/52hw4yrZgJJXhEXElnhmDmyrrgXexKPvS5AA911B3zccr6EWRdh7UQ64PIlImZ4DOfvGu3Q/UoOx1NiPM28vwFa6OK3w0IXMszBxP1nfDbye/PApa1lBYgg7SYZU28iIMuNLwMabIn3Ptyn3nhxygEf7hycF1bKPPQjdM9UyhDtRxpt+DnG60NxUR8F6xq3LD5nom6O23EEYMGDdKYZuDEBdLcoJ7qfNNT+KjhI1Xe/JzeXyp35x1QaTp7CTOU40yAgLDqLd+G/FfBZiL3s5hEUcjOskJktVXHkUFa5YaVHz8DeHK2DQVjqrdtUu4co2E3iTCuHGg4DcUURMO5ceqMppA5nkzH66ZrnLR+8wyzymQSx9q1IT2OsHtwf17WBeekdeH1z/PdmLFaSVOSg/T0nR2nfU/lfppEtdCjJ2byY1qcDh4XuNd7uIVcn1OEPqYD6gsw0gQdOwqEgC9pVVCoITe7afAeaiBGzp0rbjyFOkuzQNxkYUW+zizfCp1FlEva0qDg4DuFjgK6l8K4Dw07A1kK0hGULiPxSrM9S8E/itu5NPeT4OBL5jR/ed16N5YTITlqkElrpFWZ7U1EPlZnTHlhpXnITrkCnxsJfwlvdioEAr6kVcTqiOCUnOML+KOYjpaclVSIxPOJA2tgG+GTnRyYadNVmPKJ0y8sBfFXNMZtrxuEPc2C/82k18B1ckGD10+hrolfH57WV+w2efoaGuvr6/UZi0ArIN/0SVdrpmezUdt7mOmjFR/PburMl9mdHSLBRR1L9/jVyxLT1qw0rZbRoVmw6ZVKz45UBAJJK2+8jG+83pmB87RepvdZua41rod8yXmpFOAqFNNfCi0P2kJrOVVBOAfXV8DgW+b+9uRctE4wNz3ypMt5WpuK1pd1oU81ro27xNGNJ9uzKgR+GlutIt3nsCjUQ+1U4uTbGcYRNvjRdMYrjBd35PxQfSLZpmX+s0MglLS8FJlkSbOMlzKQlzcyuySK55ueTlkD19wU0LYNGqZx7wt1RoMcoKBepgBru5i1pKsOqncShCpUMoHxQJraNWvWaAOCbVz/R2ZnoOcCOtA8OE4efyHNavL+Cuk7UzIZ1nE0rZKSTNoCFZmS76GAIlhUPgiEklb+KaTfeswyjb3NKNVMJB95Ux6pZqf9tMl9KBJB3Ffc+0KdSYey2bIRLLS/UxMV1/sqyIWKP048mKl/hRi3aMdeiOO/UH5oJv1G3g+AQWey7I6/OppWaSDT3ajx3ELJYvH8F4HIgpdYkZFso/ACu/PF7KK247J5OZoQghY45YahcPVRW9O9L9SZwnkOwp5n+EIrjkJX4BQqTW88EKYL7cZh3meluoa4P5PWGaXH+z+Npj1WqrQtnUwEIkmrIBBhM9rWOyA+qZgzkTLFDH9C58dmCpO3U+Z5bmPlLTzmVFc6ZiaDxcDUp6W7owf/hdKl9mdK5Jl68eE3WDVraBp8babwn9iU4yp2pxIFdjQv7nlXSF7kMYYiUjqqXLdynNGuz6KNxrlpI99O5Nvq3ud7pue8rqmp6bVStWND5N2B5kt2jIX4M6c2ikBsbURbSrOkkh0gaLKGRI9i2aHRzgiQtLNXECqYyR9++GEX77Ncr7Ujpb6AVwGEldUzuVL6FHLF08Llh0BW0+7oiFnHRlvawtJJFWLokxArKUhe0zQ/iUJCy+SlTaneYS0ZTP6QqTsypITkvoq5tNN5uCHFIcsbEYStYN4iz7EruCyTyMq7MKBP4SUCrc0qoHluMwiklvQY2YI0r8GHOtcrvbUb2DLTWXLlPivEGXO3B/Nb+1IxaKjD+XGtz2jEJg9e92Mh5EVa8ruQ/BZ8GCkfjNS9QIW0XF91zyceC9s6EchK0yqLLEH7nuVWH0iT6R5iaCbSEXX96z7bQ4un0WT9MD/1iYd+aLR+FMp+xNuJCiElujh8heCaxH+bTpPDjDPmNc2POcVzKo2wAkSWDp1SGtr6NAUgu2kXCGStaYUKbdkZcCM57EPB3k2nz+YwxLTFyOTJk3t5NSf+RdSc18MSVlPomvlpltI5lrOdKNSMHBaiy7SeGpancrtB3nWaAFFuOSz90iKQE2khiNqW/4vm6yhxuW9Bsy3XBHvdax4qc2Vdk7Yv5OrPTybmfxvD8hTzkClIWG0qdotrfdtFkwv0WYhzPC9KW5pKaTha/iXSiillebyBxzFma1VMD355UGh/qeZEWsGkCQyQ9mUXMgrQLe6vwt++nHPqtRX5ie8uJ33C8DJrNM+yYflJNlXLyfR2ZYt7Jk9acDAT+ZNDR3HDlsMfHYOrmfziTHooR/qWZnkQyJm0EjfXThppT4ihXShuoqH1xYLzaLWTrqYuBRSao4ymHopFMBhZ+iKLeqCzbuOXQla/NMBsP/0IeXWy+cVrzyofgbwKKYRbR6FfGGZGQgZpT61Muc7lRXZVPP3aa6+dlclbCnikPUl7KDIOIf3kN3OpOJwKC8I6YiBPKcQpVBrnjLCFgrL1xZN3SYUU0yDDk8o6xJAZe4P7y9qOhA3HTlK4kmtyiwkPaVatWrVqIPNitT2nPpuoNnRXnie/mVvM9EsVN5VLM+35jzkXpT1fqnxYOrkjkDdpc08695BMeOjBhmH6JOejMm2JqQfkdDrFco+18kOSx/uMzy6J2sup8nNiEuaDQEWTVrOR+JJcHeQcggYdwFkLz7VVZ0XLnc8LCQpLvluwZFaiZQuyiVtQOva88hGomMKPmT0ArVmHWTsITqqTqBvtTsppZQ+7lOoVg8N3dNQdKVV6lk7lIpBXR1Q+2YKkmjv8PAqkF+dOboeQe1bcRlih4OCwywj7Xyzsn11CywUCmlTbcaaszCmXLJWcLpbHKZbibalkGU220iIQe/J9EcQyuzcCVAh7nd73NRHezLmdIVA20lIgtT7XjmAE7l65cmVFsLO5tFcEytoRRbs29lfS29MLUk8xxzK0rO1w2J5efMy8lk3TSj5mVG2MKWe78aYpnsy51japRth289azy2hZScuY40G127ITuW37pnNuK4sATrbtXFru8kGgrKRNCL4unwy0pbCYxEfRsDvbUp4sL4VHoOykpZA2UlhPFz5rrS7GRrYn/bbVSW0ClxyBspNWOYa03/JrtxPgyfoddv5YWfK3bwm2SgQqgrRo27vMhNrVKhHMU2ja9A9ZrvgZbdmSLFXMU1wLXgEIVARphYM2FpfGqQBMSiaCeoqZqrl6zpw5zSVL1BJq9QhUDGmFJENAP6ogt4dD+US7/kxl9Ud7yK/lsXAIVBRpmRR/nILcLvbypTlwgGZB8sNmhXulFlNbR6CiSJsAe11b17Y0Ay7QU/xTWy9clr/iIFBxpEX7XMNMPlac7JY/Vgh7k1U7q8oviUnQWhGoONIKSDTt9+pVba2gBslNvh7U1taqp7jdDm8FYWPP4yNQkaRF2z7gm7Pb42ej8n2iYVsg65cvvvji7cqX1iSsZAQqkrQCjE6pnSimkuzkWIoXBGF/oDK6WIq0LI22jUDFklawU9C/h7ht4Q38Rjv2UFvIiOWh/AhUNGnRTGeYfNDatdMZCJvX1/vKX0xMgkpCoKJJK6B69uy5Tu3BSgItriyI3QRhV8f1b/4MgTgIVDxpNcWPwt/qTEtkvsPPtouJUwrNT1YIlHW7mbiSUvirtTUNpnJFbwan9jdjzPpm7lmGdr6jpzj1q9hxM2z+DIEQBFoFaSU/pB3P1L9nQvJSMieRk06y5DdzSfgin508PW/evD943ipN+ZKBZwnljUCrIa1yytfZ3+PUI+9cZxGBCEplodVHzofFuD7brVu3k/Y9nSxANK8FRaBsm5XnkgsI8y3f9JlfLCsZgj5AU6oNfZXzech5Yu7cue1iAUMu78PClAeBVqVpBREfstaXCR7NBy5I2UK78zbkv0ZcFzmfmT9//hmu29zUyXxwsrCViUCr0rSCkE89rmtubv6/ECyywpFpCyGdb+Zy3cj1H5cvXz75j3/842Zlvg6TyhCIRiCy4EdHUXofn3zyyQx6aae4KSfI+QDz+eb9+/evokUvcH3Kpg26CNm5LSHQKkmrF0BvcgOnASwsuNCnT5/TNrzSloql5cUQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBAwBQ8AQMAQMAUPAEDAEDAFDwBAwBNorAv8ffdoYPNOFmuYAAAAASUVORK5CYII=",B_=237,P_=189,N_=new e,x_=new i;class L_ extends r{get size(){var t;return null!==(t=this._size)&&void 0!==t?t:this.size=new n(100,100)}set size(t){this._size=t;const{x:e,y:i}=t,{camera:r,currViewport:n}=this;n.set(e*Math.random(),i*Math.random(),e,i),r.left=r.right=e/2,r.left=-r.left,r.top=r.bottom=i/2,r.bottom=-r.bottom,r.updateProjectionMatrix()}get velocity(){var t;return null!==(t=this._velocity)&&void 0!==t?t:this._velocity=this.direction.clone().multiplyScalar(this.speed)}set velocity(t){this._velocity=t}constructor(t){super(),this.viewport=t,this.fontSize=50,this.imageWidth=200,this.camera=new o(-1.6,1.6,.8,-.8,0,4),this.direction=(new n).random().normalize(),this.speed=2,this.currViewport=new e,this.lastRenderTime=0,this.autoRender=t=>{t-this.lastRenderTime>30&&this.render(),requestAnimationFrame(this.autoRender)},this.camera.position.z=2,this._generateMarkForImage()}_generateMark(t=[28145,22323,36805,32500,25968,23383,23402,29983,25216,26415,26377,38480,20844,21496]){}_generateMarkForString(t=[28145,22323,36805,32500,25968,23383,23402,29983,25216,26415,26377,38480,20844,21496]){const e=Array.isArray(t)?String.fromCodePoint(...t):t,i=e.length,{fontSize:r}=this,o=r/4,u=2*o,{x:f,y:l}=this.size=new n(r*i+u,r+u),c=document.createElement("canvas");c.width=f,c.height=l;const d=c.getContext("2d");if(!d)return;const p=d.createLinearGradient(0,0,f,l);p.addColorStop(0,"#ff3653"),p.addColorStop(.5,"#8adb00"),p.addColorStop(1,"#2c8fff"),d.fillStyle=p,d.font=`bold ${r}px/1 serif`,d.fillText(e,o,l-1.5*o);const m=x_.load(c.toDataURL()),g=new s({map:m,toneMapped:!1,transparent:!0}),v=new h(new a(f,l),g);this.add(v)}_generateMarkForImage(t=T_,e=B_,i=P_){const{renderer:r}=this.viewport,{width:o,height:f}=r.domElement,{renderWidth:l,renderHeight:c}=this._calculateImageSize(o,f,e,i);this.size=new n(r.domElement.width,r.domElement.height);const d=x_.load(t);d.wrapS=u,d.wrapT=u,d.repeat.set(l/e,c/i);const p=new s({map:d,toneMapped:!1,transparent:!0}),m=new h(new a(l,c),p);this.add(m)}_calculateImageSize(t,e,i,r){let n=0,o=0;return n=t,o=n*(r/i),o<e/2&&(o=e,n=o*(i/r)),{renderWidth:n,renderHeight:o}}render(){const{renderer:t}=this.viewport;t.getViewport(N_),t.clearDepth(),t.render(this,this.camera)}addToViewport(){this.viewport.postRender.set("cps-water-mark",(()=>this.render()))}removeFromViewport(){this.viewport.postRender.delete("cps-water-mark")}}function D_(t){let e="";for(let i=0;i<t.length;i++){const r=t.charCodeAt(i)-1;e+=String.fromCharCode(r)}return e}function C_(t,e){const i=new Map;return t.reduce(((t,i)=>{const r=t.get(i[e]);return r?r.push(i):t.set(i[e],[i]),t}),i),i}const j_=(t,e)=>{const{content:i,sign:r}=t;if(!e.verify(i,r,"utf8","base64"))throw new Error("v2 error");const n=function(t,e){const i=t.charCodeAt(0),r=t.substring(1,i),n=t.substring(i),o=function(t){const e=function(t){const e=[];let i,r,n,o,s,h,a,u=0;t=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;u<t.length;)o=U_.indexOf(t.charAt(u++)),s=U_.indexOf(t.charAt(u++)),h=U_.indexOf(t.charAt(u++)),a=U_.indexOf(t.charAt(u++)),i=o<<2|s>>4,r=(15&s)<<4|h>>2,n=(3&h)<<6|a,e.push(i),64!==h&&e.push(r),64!==a&&e.push(n);return new Int8Array(e)}(t),i=new DataView(e.buffer).getInt16(0);if(1===i)return function(t){const e=new DataView(t);let i=2;const r=e.getInt16(i);i+=2;const n=[];for(let t=0;t<r;t++){const t=e.getInt16(i);i+=2;const r=e.getInt16(i);i+=2;const o=e.getInt32(i);i+=4;const s=e.getInt32(i);i+=4;const h={index:t,encrypt:r>0,start:o,end:s};n.push(h)}return n.sort(((t,e)=>t.index<=e.index?-1:1)),n}(e.buffer);throw new Error(`解析信息头失败,版本错误: version=${i}`)}(r);let s="";for(const t of o){const i=n.substring(t.start,t.end);let r;r=t.encrypt?e.decryptPublic(i,"utf8"):D_(i),s+=r}return s}(i,e);return JSON.parse(n)};const U_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var q_,z_,F_,H_,K_,G_,V_,Y_,Z_,W_,X_,Q_,J_,$_,tS,eS,iS,rS,nS;class oS{get path(){return this._path}set path(t){this._path!==t&&p(this,z_,!0,"f"),this._path=t}constructor(t,e){this.ssp=t,q_.add(this),this._path="",z_.set(this,!0),this.metaData=null,this.treeData=null,this.poiData=null,this.topologyData=null,this.propertiesData=null,this.animationsData=null,this.modelVisionsData=null,this._objectsAnimations=new Map,F_.set(this,I_),H_.set(this,new L_(this.ssp.viewport)),K_.set(this,!1),G_.set(this,!1),V_.set(this,!1),this.formatPoiData=t=>{const{dimensional:e,poiId:i,media:r,display:n,scale:o,x:s,y:h,z:a,rotationX:u,rotationY:f,rotationZ:l,width:c,height:d,nodeId:p,contentType:m,content:g,style:v}=t;return{id:i,pid:p,visible:n,width:c,height:d,type:e,contentType:m,position:{x:s,y:h,z:a},rotation:{x:u,y:f,z:l},scale:{x:o/100,y:o/100,z:o/100},style:v,dataSource:(t=>{if(null==t)return[];const e=c_(t,((t,e)=>c_(t,((t,i)=>c_(t,((t,r)=>Object.assign(Object.assign({},t),{group:i,key:r,label:r,customId:[e,i,r].join("/"),dataOrigin:e})))),2)));return e})(JSON.parse(g)),fileUrl:null==r?void 0:r.url}},(null==e?void 0:e.key)&&this.setKey(e.key),(null==e?void 0:e.path)&&this.setPath(e.path)}setKey(t){t!==D_(d(this,F_,"f").debugKey)&&(d(this,F_,"f").key=t)}async fetchMetaData(){const t=await d(this,q_,"m",tS).call(this,g_);return this.metaData=t,t}async fetchTreeData(){const t=await d(this,q_,"m",tS).call(this,b_);return this.treeData=t,t}async fetchPoiData(){const t=await d(this,q_,"m",tS).call(this,y_);return this.poiData=t,t}async fetchTopologyData(){const t=await d(this,q_,"m",tS).call(this,w_).then((t=>{const e={linkWidth:.1,linkColor:["#00ff00"],nodeRadius:.05,nodeColor:"#0000ff"};return t.map((t=>{const i=Object.assign(Object.assign({},e),t);return i.imgUrl&&(i.imgUrl=`${this.path}${i.imgUrl}`),i}))}));return this.topologyData=t,t}async fetchPropertiesData(){const t=await d(this,q_,"m",tS).call(this,M_).then((t=>C_(t,"modelId")));return this.propertiesData=t,t}async fetchAnimationsData(){const t=await d(this,q_,"m",tS).call(this,__).then((t=>C_(t,"modelId")));return this.animationsData=t,t}async fetchModelVisionsData(){const t=await d(this,q_,"m",tS).call(this,S_).then((t=>new Map(Object.entries(t))));return this.modelVisionsData=t,t}setPath(t){this.path=t}async loadScene(t={}){const{key:e,path:i}=t;e&&this.setKey(e),i&&this.setPath(i);const{version:r}=await this.fetchMetaData();if(r>=1.2&&d(this,z_,"f")){if(await d(this,q_,"m",Y_).call(this),!d(this,K_,"f")&&!d(this,G_,"f")){const{utils:t}=this.ssp;return void t.error(`未授权的场景包:${this.path}`)}!d(this,K_,"f")&&d(this,G_,"f")&&(d(this,V_,"f")||d(this,H_,"f").addToViewport()),p(this,z_,!1,"f")}else r<1.2&&(this.treeData=await this.fetchTreeData());const n=[];(t=Object.assign({syncProperties:!0,syncModelVisions:!0,autoLoadPoi:!0,needsModelsBoundsTree:!0,applyPresetEffects:!1,loadSceneAlgorithm:O_.DFS,loadLevel:1/0},t)).syncProperties&&n.push(this.fetchPropertiesData()),t.syncModelVisions&&n.push(this.fetchModelVisionsData()),await Promise.allSettled(n),t.loadSceneAlgorithm===O_.BFS?await d(this,q_,"m",nS).call(this,t):t.loadSceneAlgorithm===O_.DFS&&await d(this,q_,"m",rS).call(this,t),t.autoLoadPoi&&this.loadPoi(),t.needsModelsBoundsTree&&this.ssp.computeModelsBoundsTree(),t.applyPresetEffects&&this.presetEffects()}async loadPoi(){const t=await this.fetchPoiData();(this.ssp.getPlugin(A_)||this.ssp.registerPlugin(m_,A_)).batchRender({dataSource:t.map(this.formatPoiData)})}async presetEffects(t={}){const{hdr:e=!0,ssao:i=!0,directionalLightShadow:r=!0}=t;if(await this.ssp.render(),e){const{environment:t}=await this.fetchMetaData();t&&this.ssp.setEnvironment({file:`${this.path}${t}`})}if(i&&this.ssp.setSSAO(),r){const t=this.ssp.getAllModel().reduce(((t,e)=>t.union(this.ssp.utils.getBoundingBox(e.children[0]))),new f),{min:e,max:i}=t,n=new l;t.getSize(n);let o=45;this.ssp.utils.isObject(r)&&"number"==typeof r.angle&&(o=r.angle);const s=Math.tan(Math.PI/180*o)*n.x;this.ssp.createDirectionalLight({id:"directionalLight",name:"directionalLight",position:{x:i.x,y:s,z:i.z},target:{x:e.x,y:e.y,z:e.z},openShadow:!0,shadowAutoUpdate:!1,intensity:2,mapSize:this.ssp.viewport.renderer.capabilities.maxTextureSize/2})}}async getTopologies(){return this.fetchTopologyData()}sortTopologyNodes(t,e){var i;const r=t.nodes.reduce(((t,e)=>(t.set(e.id,e),t)),new Map);if(e&&!r.has(e))return void this.ssp.utils.error(`startNodeId ${e} 未找到对应 node`);let n=e?r.get(e):t.nodes[0];if(!n)return;const o=new Set;o.add(n);for(let e=0;e<t.nodes.length-1;e++){let t;for(const e of null!==(i=n.graphs)&&void 0!==i?i:[]){const i=r.get(e.targetNodeId);if(i&&!o.has(i)){t=i;break}}if(!t)break;n=t,o.add(n)}return Object.assign(Object.assign({},t),{nodes:[...new Set([...o,...t.nodes])]})}async playAnimationById(t,e=0,i={}){const{utils:{error:r}}=this.ssp,n=this.ssp.getObjectById(t);if(n)return this.playObjectAnimation(n,e,i);r(`playAnimationById: id 为 ${t} 场景对象未找到`)}async playObjectAnimation(t,e=0,i={}){const{utils:{error:n},animation:o}=this.ssp,{autoStopPrevious:s=!0,onStart:h,onUpdate:a}=i;s&&this.stopObjectAnimation(t);const u=await this.fetchAnimationsData(),f=t.sid,l=u.get(f);if(l){const i=l[e];if(i)try{for(let e=0,n=i.keyframes.length;e<n;e++){let n;if(i.keyframes[e-1]){const t=i.keyframes[e-1];n={x:t.x,y:t.y,z:t.z,rotationX:t.rotationX,rotationY:t.rotationY,rotationZ:t.rotationZ,scaleX:t.scaleX,scaleY:t.scaleY,scaleZ:t.scaleZ}}else{const e=new r,i=(new c).fromArray(t.userData.matrix);e.applyMatrix4(i),n={x:e.position.x,y:e.position.y,z:e.position.z,rotationX:e.rotation.x,rotationY:e.rotation.y,rotationZ:e.rotation.z,scaleX:e.scale.x,scaleY:e.scale.y,scaleZ:e.scale.z}}const s=i.keyframes[e],{delay:u,duration:l,easing:d,repeat:p,yoyo:m}=s,g={x:s.x,y:s.y,z:s.z,rotationX:s.rotationX,rotationY:s.rotationY,rotationZ:s.rotationZ,scaleX:s.scaleX,scaleY:s.scaleY,scaleZ:s.scaleZ};await o(n,g,{delay:u,duration:l,mode:d,repeat:-1===p?1/0:p,yoyo:m},((e,i)=>{t.position.set(e.x,e.y,e.z),t.rotation.set(e.rotationX,e.rotationY,e.rotationZ),t.scale.set(e.scaleX,e.scaleY,e.scaleZ),null==a||a(e,i)}),(t=>{var e;this._objectsAnimations.has(f)||this._objectsAnimations.set(f,new Set),null===(e=this._objectsAnimations.get(f))||void 0===e||e.add(t),null==h||h(t)}))}}catch(t){}else n(`id: ${f} 未找到索引为 ${e} 的动画`)}else n(`id: ${f} 未找到动画`)}async stopObjectAnimation(t){var e,i;const r=t.sid;this._objectsAnimations.has(r)&&(null===(e=this._objectsAnimations.get(r))||void 0===e||e.forEach((t=>t.stop())),null===(i=this._objectsAnimations.get(r))||void 0===i||i.clear())}async flyToSceneFromVisionsData(t=0,e={}){const{utils:{error:i}}=this.ssp;if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const r=this.modelVisionsData.get(""),n=null==r?void 0:r[t];if(n)return this.ssp.flyTo(n.position,n.rotation,e);i("场景视角数据未找到")}}async flyToObjectFromVisionsData(t,e=0,i={}){const{utils:{error:r}}=this.ssp;if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const n=this.modelVisionsData.get(t.sid),o=null==n?void 0:n[e];if(o)return this.ssp.flyTo(o.position,o.rotation,i);r("对象视角数据未找到")}}}z_=new WeakMap,F_=new WeakMap,H_=new WeakMap,K_=new WeakMap,G_=new WeakMap,V_=new WeakMap,q_=new WeakSet,Y_=async function(){let e;const{resource:i}=await this.fetchMetaData();if(d(this,F_,"f").verifyKey){if(e=await d(this,q_,"m",Z_).call(this,i),"forbid"===e)return void p(this,K_,!1,"f");if("noServerEnc"===e)await d(this,q_,"m",Q_).call(this,i);else{const t=d(this,F_,"f").verifyKey,{verifiedRes:i,dec:r}=d(this,q_,"m",X_).call(this,e,t);p(this,K_,i,"f"),d(this,K_,"f")&&(this.treeData=r)}}else if(d(this,F_,"f").key){const{verifiedRes:t}=await d(this,q_,"m",J_).call(this,i);t||await d(this,q_,"m",Q_).call(this,i)}else d(this,F_,"f").debugKey?await d(this,q_,"m",Q_).call(this,i):t.utils.error("许可证密钥不存在")},Z_=async function(t){const e=Math.random().toString(36).substring(2),{verifyKey:i}=d(this,F_,"f"),r=new Hb(i,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"}),n=r.encrypt(e,"base64"),o=await d(this,q_,"m",W_).call(this,d(this,q_,"m",$_).call(this,t),n),{license:s,serverEnc:h}=o;if(!h)return"noServerEnc";return r.decryptPublic(h,"utf8")!==e?"forbid":s},W_=async function(t,e=""){try{const i=await fetch(t,{headers:{token:e}}),r=i.headers,n=await i.json();return{license:n,serverEnc:r.get("token")}}catch(t){return{license:{content:"",sign:""},serverEnc:""}}},X_=function(t,e){let i=null,r=!0;try{const r=new Hb(e,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"});if(2===t.version)i=j_(t,r);else i=((t,e)=>{const{content:i,sign:r}=t;if(!e.verify(i,r,"base64","base64"))throw new Error("v1 error");return e.decryptPublic(i,"json")})(t,r)}catch(t){r=!1,this.ssp.utils.error("秘钥 key 验证失败")}return{verifiedRes:r,dec:i}},Q_=async function(t){const e=await d(this,q_,"m",tS).call(this,t),i=D_(d(this,F_,"f").debugKey),{verifiedRes:r,dec:n}=d(this,q_,"m",X_).call(this,e,i);p(this,G_,r,"f"),d(this,G_,"f")&&(this.treeData=n)},J_=async function(t){const e=await d(this,q_,"m",tS).call(this,t),i=d(this,F_,"f").key,{verifiedRes:r,dec:n}=d(this,q_,"m",X_).call(this,e,i);return p(this,V_,r,"f"),p(this,G_,r,"f"),d(this,V_,"f")&&(this.treeData=n),{verifiedRes:r,dec:n}},$_=function(t){return`${this._path}${t}`},tS=async function(t){const{utils:e}=this.ssp;return e.fetchFile(d(this,q_,"m",$_).call(this,t),"json")},eS=async function(t,e){const i=this.ssp.getObjectById(t.id);if(i)return i;const{syncProperties:r}=e,{id:n,name:o,renderType:s,path:h,matrix:a}=t,{ssp:u}=this,f=(new c).fromArray(a);let l=null;if("3D"===s)if(h)try{const t=h.replaceAll(/#/g,"%23");l=await u.loadModel({id:n,name:o,url:d(this,q_,"m",$_).call(this,t)})}catch(t){console.error(t)}else u.utils.warn(`id: ${n} path 为空`);else"GROUP"!==s&&"STUB"!==s||(l=u.createGroup({id:n,name:o}));if(l){f.decompose(l.position,l.quaternion,l.scale);const e=Object.assign({},t);if(Reflect.deleteProperty(e,"children"),l.userData=e,r&&this.propertiesData){const t=this.propertiesData.get(n);t&&(l.userData[E_]=t)}}return l},iS=function t(e,i=this.treeData){if(!i)return;const r=i.find((t=>t.id===e));if(r)return r;for(let r=0;r<i.length;r++){const n=d(this,q_,"m",t).call(this,e,i[r].children);if(n)return n}},rS=async function(e){const{loadLevel:i,loadTargetId:r}=e;let n=null;if(r){const e=d(this,q_,"m",iS).call(this,r);e?n=[e]:t.utils.error("根据 loadTargetId 未找到对应树节点")}else n=this.treeData;if(!n)return t.utils.error("treeData is null");const o=async(t,r,n=0)=>{if(n++,i&&n>i)return;const{ssp:s}=this,h=await d(this,q_,"m",eS).call(this,t,e);h&&r&&s.addObject(h,r),await Promise.allSettled(t.children.map((t=>o(t,h,n))))};await Promise.allSettled(n.map((t=>o(t,t.pid?this.ssp.getObjectById(t.pid):null,0))))},nS=async function(e){if(!this.treeData)return void t.utils.error("treeData is null");const i=[],r=Object.create(null),n=[],{ssp:o}=this;for(i.push(...this.treeData);i.length>0;){i.splice(0,i.length).forEach((t=>{n.push(t),i.push(...t.children.map((e=>(r[e.id]=t.id,e))))}))}await Promise.allSettled(n.map((t=>d(this,q_,"m",eS).call(this,t,e)))),Object.entries(r).forEach((([t,e])=>{const i=o.getObjectById(t),r=o.getObjectById(e);i&&r&&o.addObject(i,r)}))};export{__ as ANIMATIONS_DATA_FILE_PATH,O_ as LoadSceneAlgorithm,g_ as META_DATA_FILE_PATH,S_ as MODEL_VISIONS_DATA_FILE_PATH,y_ as POI_DATA_FILE_PATH,A_ as POI_PLUGIN_NAME,M_ as PROPERTIES_DATA_FLEE_PATH,E_ as PROPERTIES_KEY,k_ as PoiContentTypeEnum,v_ as SIGN_PATH,w_ as TOPOLOGY_DATA_FILE_PATH,b_ as TREE_DATA_FILE_PATH,oS as default};
|