Protein Alphabet
/**
* Skipped minification because the original files appears to be already minified.
* Original file: /npm/molstar@4.18.0/build/viewer/molstar.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
/*! For license information please see molstar.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.molstar=t():e.molstar=t()}(self,(()=>(()=>{var e={20:(e,t,A)=>{"use strict";var n=A(8223).Buffer,r=A(7108),i=A(6737),o=A(6698),a=A(5359),s=A(4847),c=A(2951);function l(e){i.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function u(e){i.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function g(e){return new l(e)}function d(e){return new u(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),o(l,i.Writable),l.prototype._write=function(e,t,A){this._hash.update(e),A()},l.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},l.prototype.sign=function(e,t){this.end();var A=this._hash.digest(),n=a(A,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(u,i.Writable),u.prototype._write=function(e,t,A){this._hash.update(e),A()},u.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},u.prototype.verify=function(e,t,A){var r="string"==typeof t?n.from(t,A):t;this.end();var i=this._hash.digest();return s(r,i,e,this._signType,this._tag)},e.exports={Sign:g,Verify:d,createSign:g,createVerify:d}},82:(e,t,A)=>{var n=A(6698),r=A(1541).Buffer,i=A(7568),o=i.base,a=i.constants.der;function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function l(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,o.Node),c.prototype._encodeComposite=function(e,t,A,n){var i,o=function(e,t,A,n){var r;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))r=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);r=e}return r>=31?n.error("Multi-octet tag encoding unsupported"):(t||(r|=32),r|=a.tagClassByName[A||"universal"]<<6)}(e,t,A,this.reporter);if(n.length<128)return(i=new r(2))[0]=o,i[1]=n.length,this._createEncoderBuffer([i,n]);for(var s=1,c=n.length;c>=256;c>>=8)s++;(i=new r(2+s))[0]=o,i[1]=128|s,c=1+s;for(var l=n.length;l>0;c--,l>>=8)i[c]=255&l;return this._createEncoderBuffer([i,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var A=new r(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var i=0;for(n=0;n=128;o>>=7)i++}var a=new r(i),s=a.length-1;for(n=e.length-1;n>=0;n--)for(o=e[n],a[s--]=127&o;(o>>=7)>0;)a[s--]=128|127&o;return this._createEncoderBuffer(a)},c.prototype._encodeTime=function(e,t){var A,n=new Date(e);return"gentime"===t?A=[l(n.getFullYear()),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?A=[l(n.getFullYear()%100),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(A,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!r.isBuffer(e)){var A=e.toArray();!e.sign&&128&A[0]&&A.unshift(0),e=new r(A)}if(r.isBuffer(e)){var n=e.length;0===e.length&&n++;var i=new r(n);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var o=e;o>=256;o>>=8)n++;for(o=(i=new Array(n)).length-1;o>=0;o--)i[o]=255&e,e>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(new r(i))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,A){var n,r=this._baseState;if(null===r.default)return!1;var i=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,A).join()),i.length!==r.defaultBuffer.length)return!1;for(n=0;n{var n=A(4050),r=A(1241),i=A(530),o=A(2438),a=A(8078);function s(e,t,A){if(e=e.toLowerCase(),i[e])return r.createCipheriv(e,t,A);if(o[e])return new n({key:t,iv:A,mode:e});throw new TypeError("invalid suite type")}function c(e,t,A){if(e=e.toLowerCase(),i[e])return r.createDecipheriv(e,t,A);if(o[e])return new n({key:t,iv:A,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var A,n;if(e=e.toLowerCase(),i[e])A=i[e].key,n=i[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");A=8*o[e].key,n=o[e].iv}var r=a(t,!1,A,n);return s(e,r.key,r.iv)},t.createCipheriv=t.Cipheriv=s,t.createDecipher=t.Decipher=function(e,t){var A,n;if(e=e.toLowerCase(),i[e])A=i[e].key,n=i[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");A=8*o[e].key,n=o[e].iv}var r=a(t,!1,A,n);return c(e,r.key,r.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(o).concat(r.getCiphers())}},206:(e,t,A)=>{"use strict";var n=A(3225);e.exports=p;var r,i=A(2240);p.ReadableState=Q,A(7007).EventEmitter;var o=function(e,t){return e.listeners(t).length},a=A(5567),s=A(4116).Buffer,c=(void 0!==A.g?A.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=Object.create(A(5622));l.inherits=A(6698);var u=A(2668),g=void 0;g=u&&u.debuglog?u.debuglog("stream"):function(){};var d,B=A(672),h=A(6278);l.inherits(p,a);var I=["error","close","destroy","pause","resume"];function Q(e,t){e=e||{};var n=t instanceof(r=r||A(6248));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new B,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=A(6427).I),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function p(e){if(r=r||A(6248),!(this instanceof p))return new p(e);this._readableState=new Q(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function f(e,t,A,n,r){var i,o=e._readableState;return null===t?(o.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var A=t.decoder.end();A&&A.length&&(t.buffer.push(A),t.length+=t.objectMode?1:A.length)}t.ended=!0,y(e)}}(e,o)):(r||(i=function(e,t){var A,n;return n=t,s.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(A=new TypeError("Invalid non-string/buffer chunk")),A}(o,t)),i?e.emit("error",i):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!A?(t=o.decoder.write(t),o.objectMode||0!==t.length?E(e,o,t,!1):b(e,o)):E(e,o,t,!1))):n||(o.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=m?e=m:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function y(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(v,e):v(e))}function v(e){g("emit readable"),e.emit("readable"),F(e)}function b(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(w,e,t))}function w(e,t){for(var A=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(A=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):A=function(e,t,A){var n;return ei.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0===(e-=o)){o===i.length?(++n,A.next?t.head=A.next:t.head=t.tail=null):(t.head=A,A.data=i.slice(o));break}++n}return t.length-=n,r}(e,t):function(e,t){var A=s.allocUnsafe(e),n=t.head,r=1;for(n.data.copy(A),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(A,A.length-e,0,o),0===(e-=o)){o===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(o));break}++r}return t.length-=r,A}(e,t),n}(e,t.buffer,t.decoder),A);var A}function U(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function R(e,t){for(var A=0,n=e.length;A=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):y(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&U(this),null;var n,r=t.needReadable;return g("need readable",r),(0===t.length||t.length-e0?x(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),A!==e&&t.ended&&U(this)),null!==n&&this.emit("data",n),n},p.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},p.prototype.pipe=function(e,t){var A=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,g("pipe count=%d opts=%j",r.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?Q:s;function s(){g("onend"),e.end()}r.endEmitted?n.nextTick(a):A.once("end",a),e.on("unpipe",(function t(n,i){g("onunpipe"),n===A&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,g("cleanup"),e.removeListener("close",h),e.removeListener("finish",I),e.removeListener("drain",c),e.removeListener("error",B),e.removeListener("unpipe",t),A.removeListener("end",s),A.removeListener("end",Q),A.removeListener("data",d),l=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,F(e))}}(A);e.on("drain",c);var l=!1,u=!1;function d(t){g("ondata"),u=!1,!1!==e.write(t)||u||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==R(r.pipes,e))&&!l&&(g("false write response, pause",r.awaitDrain),r.awaitDrain++,u=!0),A.pause())}function B(t){g("onerror",t),Q(),e.removeListener("error",B),0===o(e,"error")&&e.emit("error",t)}function h(){e.removeListener("finish",I),Q()}function I(){g("onfinish"),e.removeListener("close",h),Q()}function Q(){g("unpipe"),A.unpipe(e)}return A.on("data",d),function(e,t,A){if("function"==typeof e.prependListener)return e.prependListener(t,A);e._events&&e._events[t]?i(e._events[t])?e._events[t].unshift(A):e._events[t]=[A,e._events[t]]:e.on(t,A)}(e,"error",B),e.once("close",h),e.once("finish",I),e.emit("pipe",A),r.flowing||(g("pipe resume"),A.resume()),e},p.prototype.unpipe=function(e){var t=this._readableState,A={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,A)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i{"use strict";var n=A(8490),r=A(7011),i=r.assert,o=r.cachedProperty,a=r.parseBytes;function s(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(i(t.length===2*e.encodingLength,"Signature has invalid size"),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),i(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(s,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),o(s,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),o(s,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),o(s,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return r.encode(this.toBytes(),"hex").toUpperCase()},e.exports=s},295:e=>{e.exports=function(e,t){for(var A=Math.min(e.length,t.length),n=new Buffer(A),r=0;r{var n=A(8276);e.exports=function(e){return(new n).update(e).digest()}},345:(e,t,A)=>{e.exports=A(7007).EventEmitter},370:(e,t,A)=>{"use strict";var n=A(8490),r=A(6698),i=A(6677),o=A(7011);function a(e){i.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function s(e,t,A){i.BasePoint.call(this,e,"projective"),null===t&&null===A?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(A,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}r(a,i),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,A=t.redSqr(),n=A.redMul(t).redAdd(A.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},r(s,i.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},a.prototype.point=function(e,t){return new s(this,e,t)},a.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(e,t){return new s(e,t[0],t[1]||e.one)},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),A=e.redSub(t),n=e.redMul(t),r=A.redMul(t.redAdd(this.curve.a24.redMul(A)));return this.curve.point(n,r)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(e,t){var A=this.x.redAdd(this.z),n=this.x.redSub(this.z),r=e.x.redAdd(e.z),i=e.x.redSub(e.z).redMul(A),o=r.redMul(n),a=t.z.redMul(i.redAdd(o).redSqr()),s=t.x.redMul(i.redISub(o).redSqr());return this.curve.point(a,s)},s.prototype.mul=function(e){for(var t=e.clone(),A=this,n=this.curve.point(null,null),r=[];0!==t.cmpn(0);t.iushrn(1))r.push(t.andln(1));for(var i=r.length-1;i>=0;i--)0===r[i]?(A=A.diffAdd(n,this),n=n.dbl()):(n=A.diffAdd(n,this),A=A.dbl());return n},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},373:()=>{},392:(e,t,A)=>{var n=A(2861).Buffer;function r(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}r.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var A=this._block,r=this._blockSize,i=e.length,o=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var A=8*this._len;if(A<=4294967295)this._block.writeUInt32BE(A,this._blockSize-4);else{var n=(4294967295&A)>>>0,r=(A-n)/4294967296;this._block.writeUInt32BE(r,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=r},445:()=>{},462:(e,t,A)=>{var n=A(2861).Buffer;function r(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,A=new Array(t),r=0;r>>24]^l[B>>>16&255]^u[h>>>8&255]^g[255&I]^t[Q++],o=c[B>>>24]^l[h>>>16&255]^u[I>>>8&255]^g[255&d]^t[Q++],a=c[h>>>24]^l[I>>>16&255]^u[d>>>8&255]^g[255&B]^t[Q++],s=c[I>>>24]^l[d>>>16&255]^u[B>>>8&255]^g[255&h]^t[Q++],d=i,B=o,h=a,I=s;return i=(n[d>>>24]<<24|n[B>>>16&255]<<16|n[h>>>8&255]<<8|n[255&I])^t[Q++],o=(n[B>>>24]<<24|n[h>>>16&255]<<16|n[I>>>8&255]<<8|n[255&d])^t[Q++],a=(n[h>>>24]<<24|n[I>>>16&255]<<16|n[d>>>8&255]<<8|n[255&B])^t[Q++],s=(n[I>>>24]<<24|n[d>>>16&255]<<16|n[B>>>8&255]<<8|n[255&h])^t[Q++],[i>>>=0,o>>>=0,a>>>=0,s>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var A=[],n=[],r=[[],[],[],[]],i=[[],[],[],[]],o=0,a=0,s=0;s<256;++s){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,A[o]=c,n[c]=o;var l=e[o],u=e[l],g=e[u],d=257*e[c]^16843008*c;r[0][o]=d<<24|d>>>8,r[1][o]=d<<16|d>>>16,r[2][o]=d<<8|d>>>24,r[3][o]=d,d=16843009*g^65537*u^257*l^16843008*o,i[0][c]=d<<24|d>>>8,i[1][c]=d<<16|d>>>16,i[2][c]=d<<8|d>>>24,i[3][c]=d,0===o?o=a=1:(o=l^e[e[e[g^l]]],a^=e[e[a]])}return{SBOX:A,INV_SBOX:n,SUB_MIX:r,INV_SUB_MIX:i}}();function c(e){this._key=r(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,A=t+6,n=4*(A+1),r=[],i=0;i>>24,o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o],o^=a[i/t|0]<<24):t>6&&i%t===4&&(o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o]),r[i]=r[i-t]^o}for(var c=[],l=0;l>>24]]^s.INV_SUB_MIX[1][s.SBOX[g>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[g>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&g]]}this._nRounds=A,this._keySchedule=r,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return o(e=r(e),this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),A=n.allocUnsafe(16);return A.writeUInt32BE(t[0],0),A.writeUInt32BE(t[1],4),A.writeUInt32BE(t[2],8),A.writeUInt32BE(t[3],12),A},c.prototype.decryptBlock=function(e){var t=(e=r(e))[1];e[1]=e[3],e[3]=t;var A=o(e,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),i=n.allocUnsafe(16);return i.writeUInt32BE(A[0],0),i.writeUInt32BE(A[3],4),i.writeUInt32BE(A[2],8),i.writeUInt32BE(A[1],12),i},c.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},e.exports.AES=c},480:(e,t,A)=>{"use strict";var n,r=t,i=A(7952),o=A(894),a=A(7011).assert;function s(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var A=new s(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:A}),A}})}r.PresetCurve=s,c("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:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("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:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("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:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("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:i.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"]}),c("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:i.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"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),c("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:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=A(4011)}catch(e){n=void 0}c("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:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},530:(e,t,A)=>{var n={ECB:A(2632),CBC:A(2884),CFB:A(6383),CFB8:A(6975),CFB1:A(5264),OFB:A(6843),CTR:A(3053),GCM:A(3053)},r=A(3219);for(var i in r)r[i].module=n[r[i].mode];e.exports=r},650:(e,t,A)=>{var n=A(462),r=A(2861).Buffer,i=A(6168);function o(e,t,A,o){i.call(this),this._cipher=new n.AES(t),this._prev=r.from(A),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=o,this._mode=e}A(6698)(o,i),o.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},e.exports=o},672:(e,t,A)=>{"use strict";var n=A(4116).Buffer,r=A(1638);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,A=""+t.data;t=t.next;)A+=e+t.data;return A},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);for(var t,A,r=n.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=r,A=o,i.data.copy(t,A),o+=i.data.length,i=i.next;return r},e}(),r&&r.inspect&&r.inspect.custom&&(e.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})},735:(e,t,A)=>{var n=A(6698),r=A(82);function i(e){r.call(this,e),this.enc="pem"}n(i,r),e.exports=i,i.prototype.encode=function(e,t){for(var A=r.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],i=0;i{"use strict";var n=t;n.base=A(6677),n.short=A(9188),n.mont=A(370),n.edwards=A(1298)},961:(e,t,A)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=A(2551)},993:(e,t,A)=>{var n=A(9673).Reporter,r=A(9673).EncoderBuffer,i=A(9673).DecoderBuffer,o=A(3349),a=["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"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(e,t){var A={};this._baseState=A,A.enc=e,A.parent=t||null,A.children=null,A.tag=null,A.args=null,A.reverseArgs=null,A.choice=null,A.optional=!1,A.any=!1,A.obj=!1,A.use=null,A.useDecoder=null,A.key=null,A.default=null,A.explicit=null,A.implicit=null,A.contains=null,A.parent||(A.children=[],this._wrap())}e.exports=c;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};l.forEach((function(A){t[A]=e[A]}));var A=new this.constructor(t.parent);return A._baseState=t,A},c.prototype._wrap=function(){var e=this._baseState;s.forEach((function(t){this[t]=function(){var A=new this.constructor(this);return e.children.push(A),A[t].apply(A,arguments)}}),this)},c.prototype._init=function(e){var t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),o.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,A=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==A.length&&(o(null===t.children),t.children=A,A.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(A){A==(0|A)&&(A|=0);var n=e[A];t[n]=A})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){c.prototype[e]=function(){var t=this._baseState,A=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(A),this}})),c.prototype.use=function(e){o(e);var t=this._baseState;return o(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return o(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return o(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){var t=this._baseState;return o(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var A=this._baseState;if(null===A.parent)return e.wrapResult(A.children[0]._decode(e,t));var n,r=A.default,o=!0,a=null;if(null!==A.key&&(a=e.enterKey(A.key)),A.optional){var s=null;if(null!==A.explicit?s=A.explicit:null!==A.implicit?s=A.implicit:null!==A.tag&&(s=A.tag),null!==s||A.any){if(o=this._peekTag(e,s,A.any),e.isError(o))return o}else{var c=e.save();try{null===A.choice?this._decodeGeneric(A.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(c)}}if(A.obj&&o&&(n=e.enterObject()),o){if(null!==A.explicit){var l=this._decodeTag(e,A.explicit);if(e.isError(l))return l;e=l}var u=e.offset;if(null===A.use&&null===A.choice){A.any&&(c=e.save());var g=this._decodeTag(e,null!==A.implicit?A.implicit:A.tag,A.any);if(e.isError(g))return g;A.any?r=e.raw(c):e=g}if(t&&t.track&&null!==A.tag&&t.track(e.path(),u,e.length,"tagged"),t&&t.track&&null!==A.tag&&t.track(e.path(),e.offset,e.length,"content"),A.any||(r=null===A.choice?this._decodeGeneric(A.tag,e,t):this._decodeChoice(e,t)),e.isError(r))return r;if(A.any||null!==A.choice||null===A.children||A.children.forEach((function(A){A._decode(e,t)})),A.contains&&("octstr"===A.tag||"bitstr"===A.tag)){var d=new i(r);r=this._getUse(A.contains,e._reporterState.obj)._decode(d,t)}}return A.obj&&o&&(r=e.leaveObject(n)),null===A.key||null===r&&!0!==o?null!==a&&e.exitKey(a):e.leaveKey(a,A.key,r),r},c.prototype._decodeGeneric=function(e,t,A){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],A):/str$/.test(e)?this._decodeStr(t,e,A):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],A):"objid"===e?this._decodeObjid(t,null,null,A):"gentime"===e||"utctime"===e?this._decodeTime(t,e,A):"null_"===e?this._decodeNull(t,A):"bool"===e?this._decodeBool(t,A):"objDesc"===e?this._decodeStr(t,e,A):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],A):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,A):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var A=this._baseState;return A.useDecoder=this._use(e,t),o(null===A.useDecoder._baseState.parent),A.useDecoder=A.useDecoder._baseState.children[0],A.implicit!==A.useDecoder._baseState.implicit&&(A.useDecoder=A.useDecoder.clone(),A.useDecoder._baseState.implicit=A.implicit),A.useDecoder},c.prototype._decodeChoice=function(e,t){var A=this._baseState,n=null,r=!1;return Object.keys(A.choice).some((function(i){var o=e.save(),a=A.choice[i];try{var s=a._decode(e,t);if(e.isError(s))return!1;n={type:i,value:s},r=!0}catch(t){return e.restore(o),!1}return!0}),this),r?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new r(e,this.reporter)},c.prototype._encode=function(e,t,A){var n=this._baseState;if(null===n.default||n.default!==e){var r=this._encodeValue(e,t,A);if(void 0!==r&&!this._skipDefault(r,t,A))return r}},c.prototype._encodeValue=function(e,t,A){var r=this._baseState;if(null===r.parent)return r.children[0]._encode(e,t||new n);var i=null;if(this.reporter=t,r.optional&&void 0===e){if(null===r.default)return;e=r.default}var o=null,a=!1;if(r.any)i=this._createEncoderBuffer(e);else if(r.choice)i=this._encodeChoice(e,t);else if(r.contains)o=this._getUse(r.contains,A)._encode(e,t),a=!0;else if(r.children)o=r.children.map((function(A){if("null_"===A._baseState.tag)return A._encode(null,t,e);if(null===A._baseState.key)return t.error("Child should have a key");var n=t.enterKey(A._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var r=A._encode(e[A._baseState.key],t,e);return t.leaveKey(n),r}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return t.error("Too many args for : "+r.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var s=this.clone();s._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(A){var n=this._baseState;return this._getUse(n.args[0],e)._encode(A,t)}),s))}else null!==r.use?i=this._getUse(r.use,A)._encode(e,t):(o=this._encodePrimitive(r.tag,e),a=!0);if(!r.any&&null===r.choice){var c=null!==r.implicit?r.implicit:r.tag,l=null===r.implicit?"universal":"context";null===c?null===r.use&&t.error("Tag could be omitted only for .use()"):null===r.use&&(i=this._encodeComposite(c,a,l,o))}return null!==r.explicit&&(i=this._encodeComposite(r.explicit,!1,"context",i)),i},c.prototype._encodeChoice=function(e,t){var A=this._baseState,n=A.choice[e.type];return n||o(!1,e.type+" not found in "+JSON.stringify(Object.keys(A.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var A=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&A.args)return this._encodeObjid(t,A.reverseArgs[0],A.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,A.args&&A.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},1020:(e,t,A)=>{"use strict";var n=A(6540),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,A){var n,i={},c=null,l=null;for(n in void 0!==A&&(c=""+A),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)o.call(t,n)&&!s.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:r,type:e,key:c,ref:l,props:i,_owner:a.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},1069:()=>{},1137:(e,t,A)=>{"use strict";var n=A(7568);t.certificate=A(6413);var r=n.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())}));t.RSAPrivateKey=r;var i=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=i;var o=n.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())})),a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=s;var c=n.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())}));t.EncryptedPrivateKey=c;var l=n.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())}));t.DSAPrivateKey=l,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var u=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),g=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(u),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=g,t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1155:()=>{},1158:function(e,t,A){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var A=function(){};A.prototype=t.prototype,e.prototype=new A,e.prototype.constructor=e}function i(e,t,A){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(A=t,t=10),this._init(e||0,t||10,A||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:A(4688).Buffer}catch(e){}function a(e,t){var A=e.charCodeAt(t);return A>=65&&A<=70?A-55:A>=97&&A<=102?A-87:A-48&15}function s(e,t,A){var n=a(e,A);return A-1>=t&&(n|=a(e,A-1)<<4),n}function c(e,t,A,n){for(var r=0,i=Math.min(e.length,A),o=t;o=49?a-49+10:a>=17?a-17+10:a}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,A){if("number"==typeof e)return this._initNumber(e,t,A);if("object"==typeof e)return this._initArray(e,t,A);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===A)for(r=0,i=0;r>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,A){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,A){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-A,o=i%n,a=Math.min(i,i-o)+A,s=0,l=A;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};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"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[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(e,t,A){A.negative=t.negative^e.negative;var n=e.length+t.length|0;A.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,a=67108863&o,s=o/67108864|0;A.words[0]=a;for(var c=1;c>>26,u=67108863&s,g=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=g;d++){var B=c-d|0;l+=(o=(r=0|e.words[B])*(i=0|t.words[d])+u)/67108864|0,u=67108863&o}A.words[c]=0|u,s=0|l}return 0!==s?A.words[c]=0|s:A.length--,A.strip()}i.prototype.toString=function(e,t){var A;if(t=0|t||1,16===(e=e||10)||"hex"===e){A="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?l[6-s.length]+s+A:s+A,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(A=i.toString(16)+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}if(e===(0|e)&&e>=2&&e<=36){var c=u[e],d=g[e];A="";var B=this.clone();for(B.negative=0;!B.isZero();){var h=B.modn(d).toString(e);A=(B=B.idivn(d)).isZero()?h+A:l[c-h.length]+h+A}for(this.isZero()&&(A="0"+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,A){var r=this.byteLength(),i=A||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===t,c=new e(i),l=this.clone();if(s){for(a=0;!l.isZero();a++)o=l.andln(255),l.iushrn(8),c[a]=o;for(;a=4096&&(A+=13,t>>>=13),t>=64&&(A+=7,t>>>=7),t>=8&&(A+=4,t>>>=4),t>=2&&(A+=2,t>>>=2),A+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,A=0;return 8191&t||(A+=13,t>>>=13),127&t||(A+=7,t>>>=7),15&t||(A+=4,t>>>=4),3&t||(A+=2,t>>>=2),1&t||A++,A},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var A=0;Ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,A;this.length>e.length?(t=this,A=e):(t=e,A=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),A=e%26;this._expand(t),A>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-A),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var A=e/26|0,r=e%26;return this._expand(A+1),this.words[A]=t?this.words[A]|1<e.length?(A=this,n=e):(A=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=A.length,0!==r)this.words[this.length]=r,this.length++;else if(A!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var A,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(A=this,n=e):(A=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,d=0|o[1],B=8191&d,h=d>>>13,I=0|o[2],Q=8191&I,p=I>>>13,f=0|o[3],E=8191&f,m=f>>>13,C=0|o[4],y=8191&C,v=C>>>13,b=0|o[5],w=8191&b,D=b>>>13,S=0|o[6],F=8191&S,x=S>>>13,U=0|o[7],N=8191&U,R=U>>>13,M=0|o[8],L=8191&M,k=M>>>13,G=0|o[9],H=8191&G,_=G>>>13,Y=0|a[0],T=8191&Y,V=Y>>>13,P=0|a[1],O=8191&P,K=P>>>13,J=0|a[2],j=8191&J,z=J>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],Ae=8191&te,ne=te>>>13,re=0|a[6],ie=8191&re,oe=re>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,le=0|a[8],ue=8191&le,ge=le>>>13,de=0|a[9],Be=8191&de,he=de>>>13;A.negative=e.negative^t.negative,A.length=19;var Ie=(c+(n=Math.imul(u,T))|0)+((8191&(r=(r=Math.imul(u,V))+Math.imul(g,T)|0))<<13)|0;c=((i=Math.imul(g,V))+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,T),r=(r=Math.imul(B,V))+Math.imul(h,T)|0,i=Math.imul(h,V);var Qe=(c+(n=n+Math.imul(u,O)|0)|0)+((8191&(r=(r=r+Math.imul(u,K)|0)+Math.imul(g,O)|0))<<13)|0;c=((i=i+Math.imul(g,K)|0)+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,n=Math.imul(Q,T),r=(r=Math.imul(Q,V))+Math.imul(p,T)|0,i=Math.imul(p,V),n=n+Math.imul(B,O)|0,r=(r=r+Math.imul(B,K)|0)+Math.imul(h,O)|0,i=i+Math.imul(h,K)|0;var pe=(c+(n=n+Math.imul(u,j)|0)|0)+((8191&(r=(r=r+Math.imul(u,z)|0)+Math.imul(g,j)|0))<<13)|0;c=((i=i+Math.imul(g,z)|0)+(r>>>13)|0)+(pe>>>26)|0,pe&=67108863,n=Math.imul(E,T),r=(r=Math.imul(E,V))+Math.imul(m,T)|0,i=Math.imul(m,V),n=n+Math.imul(Q,O)|0,r=(r=r+Math.imul(Q,K)|0)+Math.imul(p,O)|0,i=i+Math.imul(p,K)|0,n=n+Math.imul(B,j)|0,r=(r=r+Math.imul(B,z)|0)+Math.imul(h,j)|0,i=i+Math.imul(h,z)|0;var fe=(c+(n=n+Math.imul(u,Z)|0)|0)+((8191&(r=(r=r+Math.imul(u,W)|0)+Math.imul(g,Z)|0))<<13)|0;c=((i=i+Math.imul(g,W)|0)+(r>>>13)|0)+(fe>>>26)|0,fe&=67108863,n=Math.imul(y,T),r=(r=Math.imul(y,V))+Math.imul(v,T)|0,i=Math.imul(v,V),n=n+Math.imul(E,O)|0,r=(r=r+Math.imul(E,K)|0)+Math.imul(m,O)|0,i=i+Math.imul(m,K)|0,n=n+Math.imul(Q,j)|0,r=(r=r+Math.imul(Q,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,n=n+Math.imul(B,Z)|0,r=(r=r+Math.imul(B,W)|0)+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0;var Ee=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(r=(r=r+Math.imul(u,ee)|0)+Math.imul(g,$)|0))<<13)|0;c=((i=i+Math.imul(g,ee)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(w,T),r=(r=Math.imul(w,V))+Math.imul(D,T)|0,i=Math.imul(D,V),n=n+Math.imul(y,O)|0,r=(r=r+Math.imul(y,K)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,K)|0,n=n+Math.imul(E,j)|0,r=(r=r+Math.imul(E,z)|0)+Math.imul(m,j)|0,i=i+Math.imul(m,z)|0,n=n+Math.imul(Q,Z)|0,r=(r=r+Math.imul(Q,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(B,$)|0,r=(r=r+Math.imul(B,ee)|0)+Math.imul(h,$)|0,i=i+Math.imul(h,ee)|0;var me=(c+(n=n+Math.imul(u,Ae)|0)|0)+((8191&(r=(r=r+Math.imul(u,ne)|0)+Math.imul(g,Ae)|0))<<13)|0;c=((i=i+Math.imul(g,ne)|0)+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(F,T),r=(r=Math.imul(F,V))+Math.imul(x,T)|0,i=Math.imul(x,V),n=n+Math.imul(w,O)|0,r=(r=r+Math.imul(w,K)|0)+Math.imul(D,O)|0,i=i+Math.imul(D,K)|0,n=n+Math.imul(y,j)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,n=n+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,W)|0,n=n+Math.imul(Q,$)|0,r=(r=r+Math.imul(Q,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(B,Ae)|0,r=(r=r+Math.imul(B,ne)|0)+Math.imul(h,Ae)|0,i=i+Math.imul(h,ne)|0;var Ce=(c+(n=n+Math.imul(u,ie)|0)|0)+((8191&(r=(r=r+Math.imul(u,oe)|0)+Math.imul(g,ie)|0))<<13)|0;c=((i=i+Math.imul(g,oe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,T),r=(r=Math.imul(N,V))+Math.imul(R,T)|0,i=Math.imul(R,V),n=n+Math.imul(F,O)|0,r=(r=r+Math.imul(F,K)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,K)|0,n=n+Math.imul(w,j)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(D,j)|0,i=i+Math.imul(D,z)|0,n=n+Math.imul(y,Z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(E,$)|0,r=(r=r+Math.imul(E,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0,n=n+Math.imul(Q,Ae)|0,r=(r=r+Math.imul(Q,ne)|0)+Math.imul(p,Ae)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(B,ie)|0,r=(r=r+Math.imul(B,oe)|0)+Math.imul(h,ie)|0,i=i+Math.imul(h,oe)|0;var ye=(c+(n=n+Math.imul(u,se)|0)|0)+((8191&(r=(r=r+Math.imul(u,ce)|0)+Math.imul(g,se)|0))<<13)|0;c=((i=i+Math.imul(g,ce)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(L,T),r=(r=Math.imul(L,V))+Math.imul(k,T)|0,i=Math.imul(k,V),n=n+Math.imul(N,O)|0,r=(r=r+Math.imul(N,K)|0)+Math.imul(R,O)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(F,j)|0,r=(r=r+Math.imul(F,z)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,z)|0,n=n+Math.imul(w,Z)|0,r=(r=r+Math.imul(w,W)|0)+Math.imul(D,Z)|0,i=i+Math.imul(D,W)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(E,Ae)|0,r=(r=r+Math.imul(E,ne)|0)+Math.imul(m,Ae)|0,i=i+Math.imul(m,ne)|0,n=n+Math.imul(Q,ie)|0,r=(r=r+Math.imul(Q,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0,n=n+Math.imul(B,se)|0,r=(r=r+Math.imul(B,ce)|0)+Math.imul(h,se)|0,i=i+Math.imul(h,ce)|0;var ve=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(r=(r=r+Math.imul(u,ge)|0)+Math.imul(g,ue)|0))<<13)|0;c=((i=i+Math.imul(g,ge)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(H,T),r=(r=Math.imul(H,V))+Math.imul(_,T)|0,i=Math.imul(_,V),n=n+Math.imul(L,O)|0,r=(r=r+Math.imul(L,K)|0)+Math.imul(k,O)|0,i=i+Math.imul(k,K)|0,n=n+Math.imul(N,j)|0,r=(r=r+Math.imul(N,z)|0)+Math.imul(R,j)|0,i=i+Math.imul(R,z)|0,n=n+Math.imul(F,Z)|0,r=(r=r+Math.imul(F,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,n=n+Math.imul(w,$)|0,r=(r=r+Math.imul(w,ee)|0)+Math.imul(D,$)|0,i=i+Math.imul(D,ee)|0,n=n+Math.imul(y,Ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(v,Ae)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(E,ie)|0,r=(r=r+Math.imul(E,oe)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,oe)|0,n=n+Math.imul(Q,se)|0,r=(r=r+Math.imul(Q,ce)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(B,ue)|0,r=(r=r+Math.imul(B,ge)|0)+Math.imul(h,ue)|0,i=i+Math.imul(h,ge)|0;var be=(c+(n=n+Math.imul(u,Be)|0)|0)+((8191&(r=(r=r+Math.imul(u,he)|0)+Math.imul(g,Be)|0))<<13)|0;c=((i=i+Math.imul(g,he)|0)+(r>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(H,O),r=(r=Math.imul(H,K))+Math.imul(_,O)|0,i=Math.imul(_,K),n=n+Math.imul(L,j)|0,r=(r=r+Math.imul(L,z)|0)+Math.imul(k,j)|0,i=i+Math.imul(k,z)|0,n=n+Math.imul(N,Z)|0,r=(r=r+Math.imul(N,W)|0)+Math.imul(R,Z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(F,$)|0,r=(r=r+Math.imul(F,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,n=n+Math.imul(w,Ae)|0,r=(r=r+Math.imul(w,ne)|0)+Math.imul(D,Ae)|0,i=i+Math.imul(D,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(E,se)|0,r=(r=r+Math.imul(E,ce)|0)+Math.imul(m,se)|0,i=i+Math.imul(m,ce)|0,n=n+Math.imul(Q,ue)|0,r=(r=r+Math.imul(Q,ge)|0)+Math.imul(p,ue)|0,i=i+Math.imul(p,ge)|0;var we=(c+(n=n+Math.imul(B,Be)|0)|0)+((8191&(r=(r=r+Math.imul(B,he)|0)+Math.imul(h,Be)|0))<<13)|0;c=((i=i+Math.imul(h,he)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(H,j),r=(r=Math.imul(H,z))+Math.imul(_,j)|0,i=Math.imul(_,z),n=n+Math.imul(L,Z)|0,r=(r=r+Math.imul(L,W)|0)+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(N,$)|0,r=(r=r+Math.imul(N,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(F,Ae)|0,r=(r=r+Math.imul(F,ne)|0)+Math.imul(x,Ae)|0,i=i+Math.imul(x,ne)|0,n=n+Math.imul(w,ie)|0,r=(r=r+Math.imul(w,oe)|0)+Math.imul(D,ie)|0,i=i+Math.imul(D,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,ce)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(E,ue)|0,r=(r=r+Math.imul(E,ge)|0)+Math.imul(m,ue)|0,i=i+Math.imul(m,ge)|0;var De=(c+(n=n+Math.imul(Q,Be)|0)|0)+((8191&(r=(r=r+Math.imul(Q,he)|0)+Math.imul(p,Be)|0))<<13)|0;c=((i=i+Math.imul(p,he)|0)+(r>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(H,Z),r=(r=Math.imul(H,W))+Math.imul(_,Z)|0,i=Math.imul(_,W),n=n+Math.imul(L,$)|0,r=(r=r+Math.imul(L,ee)|0)+Math.imul(k,$)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(N,Ae)|0,r=(r=r+Math.imul(N,ne)|0)+Math.imul(R,Ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(F,ie)|0,r=(r=r+Math.imul(F,oe)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,oe)|0,n=n+Math.imul(w,se)|0,r=(r=r+Math.imul(w,ce)|0)+Math.imul(D,se)|0,i=i+Math.imul(D,ce)|0,n=n+Math.imul(y,ue)|0,r=(r=r+Math.imul(y,ge)|0)+Math.imul(v,ue)|0,i=i+Math.imul(v,ge)|0;var Se=(c+(n=n+Math.imul(E,Be)|0)|0)+((8191&(r=(r=r+Math.imul(E,he)|0)+Math.imul(m,Be)|0))<<13)|0;c=((i=i+Math.imul(m,he)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(H,$),r=(r=Math.imul(H,ee))+Math.imul(_,$)|0,i=Math.imul(_,ee),n=n+Math.imul(L,Ae)|0,r=(r=r+Math.imul(L,ne)|0)+Math.imul(k,Ae)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(N,ie)|0,r=(r=r+Math.imul(N,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(F,se)|0,r=(r=r+Math.imul(F,ce)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ce)|0,n=n+Math.imul(w,ue)|0,r=(r=r+Math.imul(w,ge)|0)+Math.imul(D,ue)|0,i=i+Math.imul(D,ge)|0;var Fe=(c+(n=n+Math.imul(y,Be)|0)|0)+((8191&(r=(r=r+Math.imul(y,he)|0)+Math.imul(v,Be)|0))<<13)|0;c=((i=i+Math.imul(v,he)|0)+(r>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(H,Ae),r=(r=Math.imul(H,ne))+Math.imul(_,Ae)|0,i=Math.imul(_,ne),n=n+Math.imul(L,ie)|0,r=(r=r+Math.imul(L,oe)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,oe)|0,n=n+Math.imul(N,se)|0,r=(r=r+Math.imul(N,ce)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,ce)|0,n=n+Math.imul(F,ue)|0,r=(r=r+Math.imul(F,ge)|0)+Math.imul(x,ue)|0,i=i+Math.imul(x,ge)|0;var xe=(c+(n=n+Math.imul(w,Be)|0)|0)+((8191&(r=(r=r+Math.imul(w,he)|0)+Math.imul(D,Be)|0))<<13)|0;c=((i=i+Math.imul(D,he)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(H,ie),r=(r=Math.imul(H,oe))+Math.imul(_,ie)|0,i=Math.imul(_,oe),n=n+Math.imul(L,se)|0,r=(r=r+Math.imul(L,ce)|0)+Math.imul(k,se)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(N,ue)|0,r=(r=r+Math.imul(N,ge)|0)+Math.imul(R,ue)|0,i=i+Math.imul(R,ge)|0;var Ue=(c+(n=n+Math.imul(F,Be)|0)|0)+((8191&(r=(r=r+Math.imul(F,he)|0)+Math.imul(x,Be)|0))<<13)|0;c=((i=i+Math.imul(x,he)|0)+(r>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(H,se),r=(r=Math.imul(H,ce))+Math.imul(_,se)|0,i=Math.imul(_,ce),n=n+Math.imul(L,ue)|0,r=(r=r+Math.imul(L,ge)|0)+Math.imul(k,ue)|0,i=i+Math.imul(k,ge)|0;var Ne=(c+(n=n+Math.imul(N,Be)|0)|0)+((8191&(r=(r=r+Math.imul(N,he)|0)+Math.imul(R,Be)|0))<<13)|0;c=((i=i+Math.imul(R,he)|0)+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(H,ue),r=(r=Math.imul(H,ge))+Math.imul(_,ue)|0,i=Math.imul(_,ge);var Re=(c+(n=n+Math.imul(L,Be)|0)|0)+((8191&(r=(r=r+Math.imul(L,he)|0)+Math.imul(k,Be)|0))<<13)|0;c=((i=i+Math.imul(k,he)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Me=(c+(n=Math.imul(H,Be))|0)+((8191&(r=(r=Math.imul(H,he))+Math.imul(_,Be)|0))<<13)|0;return c=((i=Math.imul(_,he))+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=Ie,s[1]=Qe,s[2]=pe,s[3]=fe,s[4]=Ee,s[5]=me,s[6]=Ce,s[7]=ye,s[8]=ve,s[9]=be,s[10]=we,s[11]=De,s[12]=Se,s[13]=Fe,s[14]=xe,s[15]=Ue,s[16]=Ne,s[17]=Re,s[18]=Me,0!==c&&(s[19]=c,A.length++),A};function h(e,t,A){return(new I).mulp(e,t,A)}function I(e,t){this.x=e,this.y=t}Math.imul||(B=d),i.prototype.mulTo=function(e,t){var A,n=this.length+e.length;return A=10===this.length&&10===e.length?B(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,A){A.negative=t.negative^e.negative,A.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}A.words[i]=a,n=o,o=r}return 0!==n?A.words[i]=n:A.length--,A.strip()}(this,e,t):h(this,e,t),A},I.prototype.makeRBT=function(e){for(var t=new Array(e),A=i.prototype._countBits(e)-1,n=0;n>=1;return n},I.prototype.permute=function(e,t,A,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,A[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[A]=67108863&i}return 0!==t&&(this.words[A]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),A=0;A>>r}return t}(e);if(0===t.length)return new i(1);for(var A=this,n=0;n=0);var t,A=e%26,r=(e-A)/26,i=67108863>>>26-A<<26-A;if(0!==A){var o=0;for(t=0;t>>26-A}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,c=0;c=0&&(0!==l||c>=r);c--){var u=0|this.words[c];this.words[c]=l<<26-i|u>>>i,l=u&a}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,A){return n(0===this.negative),this.iushrn(e,t,A)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,A=(e-t)/26,r=1<=0);var t=e%26,A=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=A)return this;if(0!==t&&A++,this.length=Math.min(A,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+A]=67108863&i}for(;r>26,this.words[r+A]=67108863&i;if(0===a)return this.strip();for(n(-1===a),a=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var A=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(A=26-this._countBits(o))&&(r=r.ushln(A),n.iushln(A),o=0|r.words[r.length-1]);var a,s=n.length-r.length;if("mod"!==t){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;u--){var g=67108864*(0|n.words[r.length+u])+(0|n.words[r.length+u-1]);for(g=Math.min(g/o|0,67108863),n._ishlnsubmul(r,g,u);0!==n.negative;)g--,n.negative=0,n._ishlnsubmul(r,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=g)}return a&&a.strip(),n.strip(),"div"!==t&&0!==A&&n.iushrn(A),{div:a||null,mod:n}},i.prototype.divmod=function(e,t,A){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(r=a.div.neg()),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(r=a.div.neg()),{div:r,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var A=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=A.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,A=0,r=this.length-1;r>=0;r--)A=(t*A+(0|this.words[r]))%e;return A},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,A=this.length-1;A>=0;A--){var r=(0|this.words[A])+67108864*t;this.words[A]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),a=new i(0),s=new i(1),c=0;t.isEven()&&A.isEven();)t.iushrn(1),A.iushrn(1),++c;for(var l=A.clone(),u=t.clone();!t.isZero();){for(var g=0,d=1;0===(t.words[0]&d)&&g<26;++g,d<<=1);if(g>0)for(t.iushrn(g);g-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(l),o.isub(u)),r.iushrn(1),o.iushrn(1);for(var B=0,h=1;0===(A.words[0]&h)&&B<26;++B,h<<=1);if(B>0)for(A.iushrn(B);B-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(u)),a.iushrn(1),s.iushrn(1);t.cmp(A)>=0?(t.isub(A),r.isub(a),o.isub(s)):(A.isub(t),a.isub(r),s.isub(o))}return{a,b:s,gcd:A.iushln(c)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),a=new i(0),s=A.clone();t.cmpn(1)>0&&A.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var u=0,g=1;0===(A.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(A)>=0?(t.isub(A),o.isub(a)):(A.isub(t),a.isub(o))}return(r=0===t.cmpn(1)?o:a).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),A=e.clone();t.negative=0,A.negative=0;for(var n=0;t.isEven()&&A.isEven();n++)t.iushrn(1),A.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;A.isEven();)A.iushrn(1);var r=t.cmp(A);if(r<0){var i=t;t=A,A=i}else if(0===r||0===A.cmpn(1))break;t.isub(A)}return A.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,A=(e-t)/26,r=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,A=e<0;if(0!==this.negative&&!A)return-1;if(0===this.negative&&A)return 1;if(this.strip(),this.length>1)t=1;else{A&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;A--){var n=0|this.words[A],r=0|e.words[A];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var Q={k256:null,p224:null,p192:null,p25519:null};function p(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function m(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}p.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},p.prototype.ireduce=function(e){var t,A=e;do{this.split(A,this.tmp),t=(A=(A=this.imulK(A)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?A.isub(this.p):void 0!==A.strip?A.strip():A._strip(),A},p.prototype.split=function(e,t){e.iushrn(this.n,0,t)},p.prototype.imulK=function(e){return e.imul(this.k)},r(f,p),f.prototype.split=function(e,t){for(var A=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},f.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,A=0;A>>=26,e.words[A]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(Q[e])return Q[e];var t;if("k256"===e)t=new f;else if("p224"===e)t=new E;else if("p192"===e)t=new m;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return Q[e]=t,t},y.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,t){this._verify2(e,t);var A=e.add(t);return A.cmp(this.m)>=0&&A.isub(this.m),A._forceRed(this)},y.prototype.iadd=function(e,t){this._verify2(e,t);var A=e.iadd(t);return A.cmp(this.m)>=0&&A.isub(this.m),A},y.prototype.sub=function(e,t){this._verify2(e,t);var A=e.sub(t);return A.cmpn(0)<0&&A.iadd(this.m),A._forceRed(this)},y.prototype.isub=function(e,t){this._verify2(e,t);var A=e.isub(t);return A.cmpn(0)<0&&A.iadd(this.m),A},y.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},y.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},y.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var A=this.m.add(new i(1)).iushrn(2);return this.pow(e,A)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var a=new i(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,c).cmp(s);)l.redIAdd(s);for(var u=this.pow(l,r),g=this.pow(e,r.addn(1).iushrn(1)),d=this.pow(e,r),B=o;0!==d.cmp(a);){for(var h=d,I=0;0!==h.cmp(a);I++)h=h.redSqr();n(I=0;n--){for(var c=t.words[n],l=s-1;l>=0;l--){var u=c>>l&1;r!==A[0]&&(r=this.sqr(r)),0!==u||0!==o?(o<<=1,o|=u,(4===++a||0===n&&0===l)&&(r=this.mul(r,A[o]),a=0,o=0)):a=0}s=26}return r},y.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},y.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new v(e)},r(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},v.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var A=e.imul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var A=e.mul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=A.nmd(e),this)},1200:(e,t,A)=>{"use strict";var n=A(8490),r=A(7011).assert;function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=i,i.fromPublic=function(e,t,A){return t instanceof i?t:new i(e,{pub:t,pubEnc:A})},i.fromPrivate=function(e,t,A){return t instanceof i?t:new i(e,{priv:t,privEnc:A})},i.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.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"}},i.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?r(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||r(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},i.prototype.derive=function(e){return e.validate()||r(e.validate(),"public point not validated"),e.mul(this.priv).getX()},i.prototype.sign=function(e,t,A){return this.ec.sign(e,this,t,A)},i.prototype.verify=function(e,t,A){return this.ec.verify(e,t,this,void 0,A)},i.prototype.inspect=function(){return""}},1241:(e,t,A)=>{var n=A(5799),r=A(6171),i=A(3219);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=r.createDecipher,t.createDecipheriv=t.Decipheriv=r.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(i)}},1298:(e,t,A)=>{"use strict";var n=A(7011),r=A(8490),i=A(6698),o=A(6677),a=n.assert;function s(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new r(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new r(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new r(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,A,n,i){o.BasePoint.call(this,e,"projective"),null===t&&null===A&&null===n?(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 r(t,16),this.y=new r(A,16),this.z=n?new r(n,16):this.curve.one,this.t=i&&new r(i,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()))))}i(s,o),e.exports=s,s.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},s.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},s.prototype.jpoint=function(e,t,A,n){return this.point(e,t,A,n)},s.prototype.pointFromX=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var A=e.redSqr(),n=this.c2.redSub(this.a.redMul(A)),i=this.one.redSub(this.c2.redMul(this.d).redMul(A)),o=n.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},s.prototype.pointFromY=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var A=e.redSqr(),n=A.redSub(this.c2),i=A.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},s.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),A=e.y.redSqr(),n=t.redMul(this.a).redAdd(A),r=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(A)));return 0===n.cmp(r)},i(c,o.BasePoint),s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},s.prototype.point=function(e,t,A,n){return new c(this,e,t,A,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),A=this.z.redSqr();A=A.redIAdd(A);var n=this.curve._mulA(e),r=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),i=n.redAdd(t),o=i.redSub(A),a=n.redSub(t),s=r.redMul(o),c=i.redMul(a),l=r.redMul(a),u=o.redMul(i);return this.curve.point(s,c,u,l)},c.prototype._projDbl=function(){var e,t,A,n,r,i,o=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(s);this.zOne?(e=o.redSub(a).redSub(s).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(s)),A=c.redSqr().redSub(c).redSub(c)):(r=this.z.redSqr(),i=c.redSub(r).redISub(r),e=o.redSub(a).redISub(s).redMul(i),t=c.redMul(n.redSub(s)),A=c.redMul(i))}else n=a.redAdd(s),r=this.curve._mulC(this.z).redSqr(),i=n.redSub(r).redSub(r),e=this.curve._mulC(o.redISub(n)).redMul(i),t=this.curve._mulC(n).redMul(a.redISub(s)),A=n.redMul(i);return this.curve.point(e,t,A)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),A=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),r=this.z.redMul(e.z.redAdd(e.z)),i=A.redSub(t),o=r.redSub(n),a=r.redAdd(n),s=A.redAdd(t),c=i.redMul(o),l=a.redMul(s),u=i.redMul(s),g=o.redMul(a);return this.curve.point(c,l,g,u)},c.prototype._projAdd=function(e){var t,A,n=this.z.redMul(e.z),r=n.redSqr(),i=this.x.redMul(e.x),o=this.y.redMul(e.y),a=this.curve.d.redMul(i).redMul(o),s=r.redSub(a),c=r.redAdd(a),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(o),u=n.redMul(s).redMul(l);return this.curve.twisted?(t=n.redMul(c).redMul(o.redSub(this.curve._mulA(i))),A=s.redMul(c)):(t=n.redMul(c).redMul(o.redSub(i)),A=this.curve._mulC(s).redMul(c)),this.curve.point(u,t,A)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,A){return this.curve._wnafMulAdd(1,[this,t],[e,A],2,!1)},c.prototype.jmulAdd=function(e,t,A){return this.curve._wnafMulAdd(1,[this,t],[e,A],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var A=e.clone(),n=this.curve.redN.redMul(this.z);;){if(A.iadd(this.curve.n),A.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},1324:(e,t,A)=>{var n=A(6729),r=A(2801);e.exports=function(e){return new o(e)};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 o(e){this.curveType=i[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function a(e,t,A){Array.isArray(e)||(e=e.toArray());var n=new Buffer(e);if(A&&n.length{var n=A(320),r=A(6011),i=A(2802),o=A(2861).Buffer,a=A(4196),s=A(2455),c=A(7353),l=o.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function g(e,t,A){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new r).update(e).digest()}:"md5"===e?n:function(t){return i(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=a(t):t.length{},1565:(e,t,A)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=A(3209),t.createHash=t.Hash=A(7108),t.createHmac=t.Hmac=A(3507);var n=A(5715),r=Object.keys(n),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(r);t.getHashes=function(){return i};var o=A(8396);t.pbkdf2=o.pbkdf2,t.pbkdf2Sync=o.pbkdf2Sync;var a=A(125);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var s=A(5380);t.DiffieHellmanGroup=s.DiffieHellmanGroup,t.createDiffieHellmanGroup=s.createDiffieHellmanGroup,t.getDiffieHellman=s.getDiffieHellman,t.createDiffieHellman=s.createDiffieHellman,t.DiffieHellman=s.DiffieHellman;var c=A(20);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=A(1324);var l=A(7168);t.publicEncrypt=l.publicEncrypt,t.privateEncrypt=l.privateEncrypt,t.publicDecrypt=l.publicDecrypt,t.privateDecrypt=l.privateDecrypt;var u=A(6983);t.randomFill=u.randomFill,t.randomFillSync=u.randomFillSync,t.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")},t.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}},1636:e=>{"use strict";e.exports={rE:"6.6.1"}},1638:()=>{},1800:(e,t,A)=>{"use strict";var n=A(6698),r=A(2861).Buffer,i=A(6168),o=r.alloc(128),a=64;function s(e,t){i.call(this,"digest"),"string"==typeof t&&(t=r.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length{"use strict";e.exports=o;var n=A(6248),r=Object.create(A(5622));function i(e,t){var A=this._transformState;A.transforming=!1;var n=A.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));A.writechunk=null,A.writecb=null,null!=t&&this.push(t),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length{"use strict";var n=A(7426),r=A(7766);function i(){if(!(this instanceof i))return new i;r.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(i,r),e.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},2008:()=>{},2010:(e,t,A)=>{var n=A(6698),r=A(7568),i=r.base,o=r.bignum,a=r.constants.der;function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){i.Node.call(this,"der",e)}function l(e,t){var A=e.readUInt8(t);if(e.isError(A))return A;var n=a.tagClass[A>>6],r=!(32&A);if(31&~A)A&=31;else{var i=A;for(A=0;!(128&~i);){if(i=e.readUInt8(t),e.isError(i))return i;A<<=7,A|=127&i}}return{cls:n,primitive:r,tag:A,tagStr:a.tag[A]}}function u(e,t,A){var n=e.readUInt8(A);if(e.isError(n))return n;if(!t&&128===n)return null;if(!(128&n))return n;var r=127&n;if(r>4)return e.error("length octect is too long");n=0;for(var i=0;i{"use strict";"undefined"!=typeof window&&function(){window.console=window.console||{};const e=window.console;let t,A;const n={},r=function(){},i="memory".split(","),o="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");for(;t=i.pop();)e[t]||(e[t]=n);for(;A=o.pop();)e[A]||(e[A]=r)}(),void 0===window.HTMLCanvasElement||window.HTMLCanvasElement.prototype.toBlob||Object.defineProperty(window.HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,A){const n=window.atob(this.toDataURL(t,A).split(",")[1]),r=n.length,i=r>>2,o=new Uint8Array(r),a=new Uint32Array(o.buffer,0,i);let s=0;for(let e=0;e0?1:-1}),Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&e>-9007199254740992&&e<9007199254740992&&Math.floor(e)===e}),Number.isNaN||(Number.isNaN=function(e){return e!=e}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");const t=Object(e);let A,n=!1;for(let e=1;e1?arguments[1]:void 0;let a=o?Number(o):0;Number.isNaN(a)&&(a=0);const s=Math.min(Math.max(a,0),n);if(i+s>n)return!1;let c=-1;for(;++cA.length)&&(t=A.length),t-=e.length;const n=A.indexOf(e,t);return-1!==n&&n===t}),String.prototype.repeat||(String.prototype.repeat=function(e){if(null===this)throw new TypeError("can't convert "+this+" to object");let t=""+this;if(e=+e,Number.isNaN(e)&&(e=0),e<0)throw new RangeError("repeat count must be non-negative");if(e===1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0===t.length||0===e)return"";if(t.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");let A="";for(;1&~e||(A+=t),0!=(e>>>=1);)t+=t;return A}),String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),Array.prototype.includes||(Array.prototype.includes=function(e){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");const t=Object(this),A=parseInt(t.length,10)||0;if(0===A)return!1;const n=parseInt(arguments[1],10)||0;let r,i;for(n>=0?r=n:(r=A+n,r<0&&(r=0));r1?arguments[1]:void 0;let i;if(void 0!==r){if(!t(r))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(i=arguments[2])}const o=function(e){const t=function(e){const t=Number(e);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t}(e);return Math.min(Math.max(t,0),A)}(n.length),a=t(this)?Object(new this(o)):new Array(o);let s,c=0;for(;c>>0;if("function"!=typeof e)throw TypeError("predicate must be a function");const n=arguments[1];let r=0;for(;r>>0,n=0|arguments[1];let r=n<0?Math.max(A+n,0):Math.min(n,A);const i=arguments[2],o=void 0===i?A:0|i,a=o<0?Math.max(A+o,0):Math.min(o,A);for(;r>>0,r=0|e;let i=r<0?Math.max(n+r,0):Math.min(r,n);const o=0|t;let a=o<0?Math.max(n+o,0):Math.min(o,n);const s=arguments[2],c=void 0===s?n:0|s,l=c<0?Math.max(n+c,0):Math.min(c,n);let u=Math.min(l-a,n-i),g=1;for(a0;)a in A?A[i]=A[a]:delete A[i],a+=g,i+=g,u--;return A},configurable:!0,writable:!0}),Int8Array.prototype.copyWithin||Object.defineProperty(Int8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int16Array.prototype.copyWithin||Object.defineProperty(Int16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int32Array.prototype.copyWithin||Object.defineProperty(Int32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint8Array.prototype.copyWithin||Object.defineProperty(Uint8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint16Array.prototype.copyWithin||Object.defineProperty(Uint16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint32Array.prototype.copyWithin||Object.defineProperty(Uint32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float32Array.prototype.copyWithin||Object.defineProperty(Float32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float64Array.prototype.copyWithin||Object.defineProperty(Float64Array.prototype,"copyWithin",{value:Array.prototype.copyWithin})},2061:e=>{e.exports=function(e,t){for(var A=e.length,n=-1;++n{var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(A){(0|A)==A&&(A|=0);var n=e[A];t[n]=A})),t},n.der=A(4598)},2211:(e,t,A)=>{"use strict";var n=A(3349),r=A(6698),i=A(7626),o=A(2808);function a(){this.tmp=new Array(2),this.keys=null}function s(e){o.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}r(s,o),e.exports=s,s.create=function(e){return new s(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];s.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var A=i.readUInt32BE(t,0),r=i.readUInt32BE(t,4);i.pc1(A,r,e.tmp,0),A=e.tmp[0],r=e.tmp[1];for(var o=0;o>>1];A=i.r28shl(A,a),r=i.r28shl(r,a),i.pc2(A,r,e.keys,o)}},s.prototype._update=function(e,t,A,n){var r=this._desState,o=i.readUInt32BE(e,t),a=i.readUInt32BE(e,t+4);i.ip(o,a,r.tmp,0),o=r.tmp[0],a=r.tmp[1],"encrypt"===this.type?this._encrypt(r,o,a,r.tmp,0):this._decrypt(r,o,a,r.tmp,0),o=r.tmp[0],a=r.tmp[1],i.writeUInt32BE(A,o,n),i.writeUInt32BE(A,a,n+4)},s.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var A=e.length-t,n=t;n>>0,o=g}i.rip(a,o,n,r)},s.prototype._decrypt=function(e,t,A,n,r){for(var o=A,a=t,s=e.keys.length-2;s>=0;s-=2){var c=e.keys[s],l=e.keys[s+1];i.expand(o,e.tmp,0),c^=e.tmp[0],l^=e.tmp[1];var u=i.substitute(c,l),g=o;o=(a^i.permute(u))>>>0,a=g}i.rip(o,a,n,r)}},2240:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},2244:(e,t,A)=>{var n=A(1158),r=A(5037);function i(e){this.rand=e||new r.Rand}e.exports=i,i.create=function(e){return new i(e)},i.prototype._randbelow=function(e){var t=e.bitLength(),A=Math.ceil(t/8);do{var r=new n(this.rand.generate(A))}while(r.cmp(e)>=0);return r},i.prototype._randrange=function(e,t){var A=t.sub(e);return e.add(this._randbelow(A))},i.prototype.test=function(e,t,A){var r=e.bitLength(),i=n.mont(e),o=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var c=e.shrn(s),l=a.toRed(i);t>0;t--){var u=this._randrange(new n(2),a);A&&A(u);var g=u.toRed(i).redPow(c);if(0!==g.cmp(o)&&0!==g.cmp(l)){for(var d=1;d0;t--){var l=this._randrange(new n(2),o),u=e.gcd(l);if(0!==u.cmpn(1))return u;var g=l.toRed(r).redPow(s);if(0!==g.cmp(i)&&0!==g.cmp(c)){for(var d=1;d{"use strict";var n=A(7426),r=A(6166),i=A(6225),o=A(3349),a=n.sum32,s=n.sum32_4,c=n.sum32_5,l=i.ch32,u=i.maj32,g=i.s0_256,d=i.s1_256,B=i.g0_256,h=i.g1_256,I=r.BlockHash,Q=[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 p(){if(!(this instanceof p))return new p;I.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Q,this.W=new Array(64)}n.inherits(p,I),e.exports=p,p.blockSize=512,p.outSize=256,p.hmacStrength=192,p.padLength=64,p.prototype._update=function(e,t){for(var A=this.W,n=0;n<16;n++)A[n]=e[t+n];for(;n=65&&A<=70?A-55:A>=97&&A<=102?A-87:A-48&15}function s(e,t,A){var n=a(e,A);return A-1>=t&&(n|=a(e,A-1)<<4),n}function c(e,t,A,n){for(var r=0,i=Math.min(e.length,A),o=t;o=49?a-49+10:a>=17?a-17+10:a}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,A){if("number"==typeof e)return this._initNumber(e,t,A);if("object"==typeof e)return this._initArray(e,t,A);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===A)for(r=0,i=0;r>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,A){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,A){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-A,o=i%n,a=Math.min(i,i-o)+A,s=0,l=A;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};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"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[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(e,t,A){A.negative=t.negative^e.negative;var n=e.length+t.length|0;A.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,a=67108863&o,s=o/67108864|0;A.words[0]=a;for(var c=1;c>>26,u=67108863&s,g=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=g;d++){var B=c-d|0;l+=(o=(r=0|e.words[B])*(i=0|t.words[d])+u)/67108864|0,u=67108863&o}A.words[c]=0|u,s=0|l}return 0!==s?A.words[c]=0|s:A.length--,A.strip()}i.prototype.toString=function(e,t){var A;if(t=0|t||1,16===(e=e||10)||"hex"===e){A="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?l[6-s.length]+s+A:s+A,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(A=i.toString(16)+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}if(e===(0|e)&&e>=2&&e<=36){var c=u[e],d=g[e];A="";var B=this.clone();for(B.negative=0;!B.isZero();){var h=B.modn(d).toString(e);A=(B=B.idivn(d)).isZero()?h+A:l[c-h.length]+h+A}for(this.isZero()&&(A="0"+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,A){var r=this.byteLength(),i=A||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===t,c=new e(i),l=this.clone();if(s){for(a=0;!l.isZero();a++)o=l.andln(255),l.iushrn(8),c[a]=o;for(;a=4096&&(A+=13,t>>>=13),t>=64&&(A+=7,t>>>=7),t>=8&&(A+=4,t>>>=4),t>=2&&(A+=2,t>>>=2),A+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,A=0;return 8191&t||(A+=13,t>>>=13),127&t||(A+=7,t>>>=7),15&t||(A+=4,t>>>=4),3&t||(A+=2,t>>>=2),1&t||A++,A},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var A=0;Ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,A;this.length>e.length?(t=this,A=e):(t=e,A=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),A=e%26;this._expand(t),A>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-A),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var A=e/26|0,r=e%26;return this._expand(A+1),this.words[A]=t?this.words[A]|1<e.length?(A=this,n=e):(A=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=A.length,0!==r)this.words[this.length]=r,this.length++;else if(A!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var A,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(A=this,n=e):(A=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,d=0|o[1],B=8191&d,h=d>>>13,I=0|o[2],Q=8191&I,p=I>>>13,f=0|o[3],E=8191&f,m=f>>>13,C=0|o[4],y=8191&C,v=C>>>13,b=0|o[5],w=8191&b,D=b>>>13,S=0|o[6],F=8191&S,x=S>>>13,U=0|o[7],N=8191&U,R=U>>>13,M=0|o[8],L=8191&M,k=M>>>13,G=0|o[9],H=8191&G,_=G>>>13,Y=0|a[0],T=8191&Y,V=Y>>>13,P=0|a[1],O=8191&P,K=P>>>13,J=0|a[2],j=8191&J,z=J>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],Ae=8191&te,ne=te>>>13,re=0|a[6],ie=8191&re,oe=re>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,le=0|a[8],ue=8191&le,ge=le>>>13,de=0|a[9],Be=8191&de,he=de>>>13;A.negative=e.negative^t.negative,A.length=19;var Ie=(c+(n=Math.imul(u,T))|0)+((8191&(r=(r=Math.imul(u,V))+Math.imul(g,T)|0))<<13)|0;c=((i=Math.imul(g,V))+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,T),r=(r=Math.imul(B,V))+Math.imul(h,T)|0,i=Math.imul(h,V);var Qe=(c+(n=n+Math.imul(u,O)|0)|0)+((8191&(r=(r=r+Math.imul(u,K)|0)+Math.imul(g,O)|0))<<13)|0;c=((i=i+Math.imul(g,K)|0)+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,n=Math.imul(Q,T),r=(r=Math.imul(Q,V))+Math.imul(p,T)|0,i=Math.imul(p,V),n=n+Math.imul(B,O)|0,r=(r=r+Math.imul(B,K)|0)+Math.imul(h,O)|0,i=i+Math.imul(h,K)|0;var pe=(c+(n=n+Math.imul(u,j)|0)|0)+((8191&(r=(r=r+Math.imul(u,z)|0)+Math.imul(g,j)|0))<<13)|0;c=((i=i+Math.imul(g,z)|0)+(r>>>13)|0)+(pe>>>26)|0,pe&=67108863,n=Math.imul(E,T),r=(r=Math.imul(E,V))+Math.imul(m,T)|0,i=Math.imul(m,V),n=n+Math.imul(Q,O)|0,r=(r=r+Math.imul(Q,K)|0)+Math.imul(p,O)|0,i=i+Math.imul(p,K)|0,n=n+Math.imul(B,j)|0,r=(r=r+Math.imul(B,z)|0)+Math.imul(h,j)|0,i=i+Math.imul(h,z)|0;var fe=(c+(n=n+Math.imul(u,Z)|0)|0)+((8191&(r=(r=r+Math.imul(u,W)|0)+Math.imul(g,Z)|0))<<13)|0;c=((i=i+Math.imul(g,W)|0)+(r>>>13)|0)+(fe>>>26)|0,fe&=67108863,n=Math.imul(y,T),r=(r=Math.imul(y,V))+Math.imul(v,T)|0,i=Math.imul(v,V),n=n+Math.imul(E,O)|0,r=(r=r+Math.imul(E,K)|0)+Math.imul(m,O)|0,i=i+Math.imul(m,K)|0,n=n+Math.imul(Q,j)|0,r=(r=r+Math.imul(Q,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,n=n+Math.imul(B,Z)|0,r=(r=r+Math.imul(B,W)|0)+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0;var Ee=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(r=(r=r+Math.imul(u,ee)|0)+Math.imul(g,$)|0))<<13)|0;c=((i=i+Math.imul(g,ee)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(w,T),r=(r=Math.imul(w,V))+Math.imul(D,T)|0,i=Math.imul(D,V),n=n+Math.imul(y,O)|0,r=(r=r+Math.imul(y,K)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,K)|0,n=n+Math.imul(E,j)|0,r=(r=r+Math.imul(E,z)|0)+Math.imul(m,j)|0,i=i+Math.imul(m,z)|0,n=n+Math.imul(Q,Z)|0,r=(r=r+Math.imul(Q,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(B,$)|0,r=(r=r+Math.imul(B,ee)|0)+Math.imul(h,$)|0,i=i+Math.imul(h,ee)|0;var me=(c+(n=n+Math.imul(u,Ae)|0)|0)+((8191&(r=(r=r+Math.imul(u,ne)|0)+Math.imul(g,Ae)|0))<<13)|0;c=((i=i+Math.imul(g,ne)|0)+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(F,T),r=(r=Math.imul(F,V))+Math.imul(x,T)|0,i=Math.imul(x,V),n=n+Math.imul(w,O)|0,r=(r=r+Math.imul(w,K)|0)+Math.imul(D,O)|0,i=i+Math.imul(D,K)|0,n=n+Math.imul(y,j)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,n=n+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,W)|0,n=n+Math.imul(Q,$)|0,r=(r=r+Math.imul(Q,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(B,Ae)|0,r=(r=r+Math.imul(B,ne)|0)+Math.imul(h,Ae)|0,i=i+Math.imul(h,ne)|0;var Ce=(c+(n=n+Math.imul(u,ie)|0)|0)+((8191&(r=(r=r+Math.imul(u,oe)|0)+Math.imul(g,ie)|0))<<13)|0;c=((i=i+Math.imul(g,oe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,T),r=(r=Math.imul(N,V))+Math.imul(R,T)|0,i=Math.imul(R,V),n=n+Math.imul(F,O)|0,r=(r=r+Math.imul(F,K)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,K)|0,n=n+Math.imul(w,j)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(D,j)|0,i=i+Math.imul(D,z)|0,n=n+Math.imul(y,Z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(E,$)|0,r=(r=r+Math.imul(E,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0,n=n+Math.imul(Q,Ae)|0,r=(r=r+Math.imul(Q,ne)|0)+Math.imul(p,Ae)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(B,ie)|0,r=(r=r+Math.imul(B,oe)|0)+Math.imul(h,ie)|0,i=i+Math.imul(h,oe)|0;var ye=(c+(n=n+Math.imul(u,se)|0)|0)+((8191&(r=(r=r+Math.imul(u,ce)|0)+Math.imul(g,se)|0))<<13)|0;c=((i=i+Math.imul(g,ce)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(L,T),r=(r=Math.imul(L,V))+Math.imul(k,T)|0,i=Math.imul(k,V),n=n+Math.imul(N,O)|0,r=(r=r+Math.imul(N,K)|0)+Math.imul(R,O)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(F,j)|0,r=(r=r+Math.imul(F,z)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,z)|0,n=n+Math.imul(w,Z)|0,r=(r=r+Math.imul(w,W)|0)+Math.imul(D,Z)|0,i=i+Math.imul(D,W)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(E,Ae)|0,r=(r=r+Math.imul(E,ne)|0)+Math.imul(m,Ae)|0,i=i+Math.imul(m,ne)|0,n=n+Math.imul(Q,ie)|0,r=(r=r+Math.imul(Q,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0,n=n+Math.imul(B,se)|0,r=(r=r+Math.imul(B,ce)|0)+Math.imul(h,se)|0,i=i+Math.imul(h,ce)|0;var ve=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(r=(r=r+Math.imul(u,ge)|0)+Math.imul(g,ue)|0))<<13)|0;c=((i=i+Math.imul(g,ge)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(H,T),r=(r=Math.imul(H,V))+Math.imul(_,T)|0,i=Math.imul(_,V),n=n+Math.imul(L,O)|0,r=(r=r+Math.imul(L,K)|0)+Math.imul(k,O)|0,i=i+Math.imul(k,K)|0,n=n+Math.imul(N,j)|0,r=(r=r+Math.imul(N,z)|0)+Math.imul(R,j)|0,i=i+Math.imul(R,z)|0,n=n+Math.imul(F,Z)|0,r=(r=r+Math.imul(F,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,n=n+Math.imul(w,$)|0,r=(r=r+Math.imul(w,ee)|0)+Math.imul(D,$)|0,i=i+Math.imul(D,ee)|0,n=n+Math.imul(y,Ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(v,Ae)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(E,ie)|0,r=(r=r+Math.imul(E,oe)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,oe)|0,n=n+Math.imul(Q,se)|0,r=(r=r+Math.imul(Q,ce)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(B,ue)|0,r=(r=r+Math.imul(B,ge)|0)+Math.imul(h,ue)|0,i=i+Math.imul(h,ge)|0;var be=(c+(n=n+Math.imul(u,Be)|0)|0)+((8191&(r=(r=r+Math.imul(u,he)|0)+Math.imul(g,Be)|0))<<13)|0;c=((i=i+Math.imul(g,he)|0)+(r>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(H,O),r=(r=Math.imul(H,K))+Math.imul(_,O)|0,i=Math.imul(_,K),n=n+Math.imul(L,j)|0,r=(r=r+Math.imul(L,z)|0)+Math.imul(k,j)|0,i=i+Math.imul(k,z)|0,n=n+Math.imul(N,Z)|0,r=(r=r+Math.imul(N,W)|0)+Math.imul(R,Z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(F,$)|0,r=(r=r+Math.imul(F,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,n=n+Math.imul(w,Ae)|0,r=(r=r+Math.imul(w,ne)|0)+Math.imul(D,Ae)|0,i=i+Math.imul(D,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(E,se)|0,r=(r=r+Math.imul(E,ce)|0)+Math.imul(m,se)|0,i=i+Math.imul(m,ce)|0,n=n+Math.imul(Q,ue)|0,r=(r=r+Math.imul(Q,ge)|0)+Math.imul(p,ue)|0,i=i+Math.imul(p,ge)|0;var we=(c+(n=n+Math.imul(B,Be)|0)|0)+((8191&(r=(r=r+Math.imul(B,he)|0)+Math.imul(h,Be)|0))<<13)|0;c=((i=i+Math.imul(h,he)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(H,j),r=(r=Math.imul(H,z))+Math.imul(_,j)|0,i=Math.imul(_,z),n=n+Math.imul(L,Z)|0,r=(r=r+Math.imul(L,W)|0)+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(N,$)|0,r=(r=r+Math.imul(N,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(F,Ae)|0,r=(r=r+Math.imul(F,ne)|0)+Math.imul(x,Ae)|0,i=i+Math.imul(x,ne)|0,n=n+Math.imul(w,ie)|0,r=(r=r+Math.imul(w,oe)|0)+Math.imul(D,ie)|0,i=i+Math.imul(D,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,ce)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(E,ue)|0,r=(r=r+Math.imul(E,ge)|0)+Math.imul(m,ue)|0,i=i+Math.imul(m,ge)|0;var De=(c+(n=n+Math.imul(Q,Be)|0)|0)+((8191&(r=(r=r+Math.imul(Q,he)|0)+Math.imul(p,Be)|0))<<13)|0;c=((i=i+Math.imul(p,he)|0)+(r>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(H,Z),r=(r=Math.imul(H,W))+Math.imul(_,Z)|0,i=Math.imul(_,W),n=n+Math.imul(L,$)|0,r=(r=r+Math.imul(L,ee)|0)+Math.imul(k,$)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(N,Ae)|0,r=(r=r+Math.imul(N,ne)|0)+Math.imul(R,Ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(F,ie)|0,r=(r=r+Math.imul(F,oe)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,oe)|0,n=n+Math.imul(w,se)|0,r=(r=r+Math.imul(w,ce)|0)+Math.imul(D,se)|0,i=i+Math.imul(D,ce)|0,n=n+Math.imul(y,ue)|0,r=(r=r+Math.imul(y,ge)|0)+Math.imul(v,ue)|0,i=i+Math.imul(v,ge)|0;var Se=(c+(n=n+Math.imul(E,Be)|0)|0)+((8191&(r=(r=r+Math.imul(E,he)|0)+Math.imul(m,Be)|0))<<13)|0;c=((i=i+Math.imul(m,he)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(H,$),r=(r=Math.imul(H,ee))+Math.imul(_,$)|0,i=Math.imul(_,ee),n=n+Math.imul(L,Ae)|0,r=(r=r+Math.imul(L,ne)|0)+Math.imul(k,Ae)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(N,ie)|0,r=(r=r+Math.imul(N,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(F,se)|0,r=(r=r+Math.imul(F,ce)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ce)|0,n=n+Math.imul(w,ue)|0,r=(r=r+Math.imul(w,ge)|0)+Math.imul(D,ue)|0,i=i+Math.imul(D,ge)|0;var Fe=(c+(n=n+Math.imul(y,Be)|0)|0)+((8191&(r=(r=r+Math.imul(y,he)|0)+Math.imul(v,Be)|0))<<13)|0;c=((i=i+Math.imul(v,he)|0)+(r>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(H,Ae),r=(r=Math.imul(H,ne))+Math.imul(_,Ae)|0,i=Math.imul(_,ne),n=n+Math.imul(L,ie)|0,r=(r=r+Math.imul(L,oe)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,oe)|0,n=n+Math.imul(N,se)|0,r=(r=r+Math.imul(N,ce)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,ce)|0,n=n+Math.imul(F,ue)|0,r=(r=r+Math.imul(F,ge)|0)+Math.imul(x,ue)|0,i=i+Math.imul(x,ge)|0;var xe=(c+(n=n+Math.imul(w,Be)|0)|0)+((8191&(r=(r=r+Math.imul(w,he)|0)+Math.imul(D,Be)|0))<<13)|0;c=((i=i+Math.imul(D,he)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(H,ie),r=(r=Math.imul(H,oe))+Math.imul(_,ie)|0,i=Math.imul(_,oe),n=n+Math.imul(L,se)|0,r=(r=r+Math.imul(L,ce)|0)+Math.imul(k,se)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(N,ue)|0,r=(r=r+Math.imul(N,ge)|0)+Math.imul(R,ue)|0,i=i+Math.imul(R,ge)|0;var Ue=(c+(n=n+Math.imul(F,Be)|0)|0)+((8191&(r=(r=r+Math.imul(F,he)|0)+Math.imul(x,Be)|0))<<13)|0;c=((i=i+Math.imul(x,he)|0)+(r>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(H,se),r=(r=Math.imul(H,ce))+Math.imul(_,se)|0,i=Math.imul(_,ce),n=n+Math.imul(L,ue)|0,r=(r=r+Math.imul(L,ge)|0)+Math.imul(k,ue)|0,i=i+Math.imul(k,ge)|0;var Ne=(c+(n=n+Math.imul(N,Be)|0)|0)+((8191&(r=(r=r+Math.imul(N,he)|0)+Math.imul(R,Be)|0))<<13)|0;c=((i=i+Math.imul(R,he)|0)+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(H,ue),r=(r=Math.imul(H,ge))+Math.imul(_,ue)|0,i=Math.imul(_,ge);var Re=(c+(n=n+Math.imul(L,Be)|0)|0)+((8191&(r=(r=r+Math.imul(L,he)|0)+Math.imul(k,Be)|0))<<13)|0;c=((i=i+Math.imul(k,he)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Me=(c+(n=Math.imul(H,Be))|0)+((8191&(r=(r=Math.imul(H,he))+Math.imul(_,Be)|0))<<13)|0;return c=((i=Math.imul(_,he))+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=Ie,s[1]=Qe,s[2]=pe,s[3]=fe,s[4]=Ee,s[5]=me,s[6]=Ce,s[7]=ye,s[8]=ve,s[9]=be,s[10]=we,s[11]=De,s[12]=Se,s[13]=Fe,s[14]=xe,s[15]=Ue,s[16]=Ne,s[17]=Re,s[18]=Me,0!==c&&(s[19]=c,A.length++),A};function h(e,t,A){return(new I).mulp(e,t,A)}function I(e,t){this.x=e,this.y=t}Math.imul||(B=d),i.prototype.mulTo=function(e,t){var A,n=this.length+e.length;return A=10===this.length&&10===e.length?B(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,A){A.negative=t.negative^e.negative,A.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}A.words[i]=a,n=o,o=r}return 0!==n?A.words[i]=n:A.length--,A.strip()}(this,e,t):h(this,e,t),A},I.prototype.makeRBT=function(e){for(var t=new Array(e),A=i.prototype._countBits(e)-1,n=0;n>=1;return n},I.prototype.permute=function(e,t,A,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,A[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[A]=67108863&i}return 0!==t&&(this.words[A]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),A=0;A>>r}return t}(e);if(0===t.length)return new i(1);for(var A=this,n=0;n=0);var t,A=e%26,r=(e-A)/26,i=67108863>>>26-A<<26-A;if(0!==A){var o=0;for(t=0;t>>26-A}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,c=0;c=0&&(0!==l||c>=r);c--){var u=0|this.words[c];this.words[c]=l<<26-i|u>>>i,l=u&a}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,A){return n(0===this.negative),this.iushrn(e,t,A)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,A=(e-t)/26,r=1<=0);var t=e%26,A=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=A)return this;if(0!==t&&A++,this.length=Math.min(A,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+A]=67108863&i}for(;r>26,this.words[r+A]=67108863&i;if(0===a)return this.strip();for(n(-1===a),a=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var A=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(A=26-this._countBits(o))&&(r=r.ushln(A),n.iushln(A),o=0|r.words[r.length-1]);var a,s=n.length-r.length;if("mod"!==t){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;u--){var g=67108864*(0|n.words[r.length+u])+(0|n.words[r.length+u-1]);for(g=Math.min(g/o|0,67108863),n._ishlnsubmul(r,g,u);0!==n.negative;)g--,n.negative=0,n._ishlnsubmul(r,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=g)}return a&&a.strip(),n.strip(),"div"!==t&&0!==A&&n.iushrn(A),{div:a||null,mod:n}},i.prototype.divmod=function(e,t,A){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(r=a.div.neg()),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(r=a.div.neg()),{div:r,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var A=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=A.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,A=0,r=this.length-1;r>=0;r--)A=(t*A+(0|this.words[r]))%e;return A},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,A=this.length-1;A>=0;A--){var r=(0|this.words[A])+67108864*t;this.words[A]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),a=new i(0),s=new i(1),c=0;t.isEven()&&A.isEven();)t.iushrn(1),A.iushrn(1),++c;for(var l=A.clone(),u=t.clone();!t.isZero();){for(var g=0,d=1;0===(t.words[0]&d)&&g<26;++g,d<<=1);if(g>0)for(t.iushrn(g);g-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(l),o.isub(u)),r.iushrn(1),o.iushrn(1);for(var B=0,h=1;0===(A.words[0]&h)&&B<26;++B,h<<=1);if(B>0)for(A.iushrn(B);B-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(u)),a.iushrn(1),s.iushrn(1);t.cmp(A)>=0?(t.isub(A),r.isub(a),o.isub(s)):(A.isub(t),a.isub(r),s.isub(o))}return{a,b:s,gcd:A.iushln(c)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),a=new i(0),s=A.clone();t.cmpn(1)>0&&A.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var u=0,g=1;0===(A.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(A)>=0?(t.isub(A),o.isub(a)):(A.isub(t),a.isub(o))}return(r=0===t.cmpn(1)?o:a).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),A=e.clone();t.negative=0,A.negative=0;for(var n=0;t.isEven()&&A.isEven();n++)t.iushrn(1),A.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;A.isEven();)A.iushrn(1);var r=t.cmp(A);if(r<0){var i=t;t=A,A=i}else if(0===r||0===A.cmpn(1))break;t.isub(A)}return A.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,A=(e-t)/26,r=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,A=e<0;if(0!==this.negative&&!A)return-1;if(0===this.negative&&A)return 1;if(this.strip(),this.length>1)t=1;else{A&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;A--){var n=0|this.words[A],r=0|e.words[A];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var Q={k256:null,p224:null,p192:null,p25519:null};function p(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function m(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}p.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},p.prototype.ireduce=function(e){var t,A=e;do{this.split(A,this.tmp),t=(A=(A=this.imulK(A)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?A.isub(this.p):void 0!==A.strip?A.strip():A._strip(),A},p.prototype.split=function(e,t){e.iushrn(this.n,0,t)},p.prototype.imulK=function(e){return e.imul(this.k)},r(f,p),f.prototype.split=function(e,t){for(var A=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},f.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,A=0;A>>=26,e.words[A]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(Q[e])return Q[e];var t;if("k256"===e)t=new f;else if("p224"===e)t=new E;else if("p192"===e)t=new m;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return Q[e]=t,t},y.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,t){this._verify2(e,t);var A=e.add(t);return A.cmp(this.m)>=0&&A.isub(this.m),A._forceRed(this)},y.prototype.iadd=function(e,t){this._verify2(e,t);var A=e.iadd(t);return A.cmp(this.m)>=0&&A.isub(this.m),A},y.prototype.sub=function(e,t){this._verify2(e,t);var A=e.sub(t);return A.cmpn(0)<0&&A.iadd(this.m),A._forceRed(this)},y.prototype.isub=function(e,t){this._verify2(e,t);var A=e.isub(t);return A.cmpn(0)<0&&A.iadd(this.m),A},y.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},y.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},y.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var A=this.m.add(new i(1)).iushrn(2);return this.pow(e,A)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var a=new i(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,c).cmp(s);)l.redIAdd(s);for(var u=this.pow(l,r),g=this.pow(e,r.addn(1).iushrn(1)),d=this.pow(e,r),B=o;0!==d.cmp(a);){for(var h=d,I=0;0!==h.cmp(a);I++)h=h.redSqr();n(I=0;n--){for(var c=t.words[n],l=s-1;l>=0;l--){var u=c>>l&1;r!==A[0]&&(r=this.sqr(r)),0!==u||0!==o?(o<<=1,o|=u,(4===++a||0===n&&0===l)&&(r=this.mul(r,A[o]),a=0,o=0)):a=0}s=26}return r},y.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},y.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new v(e)},r(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},v.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var A=e.imul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var A=e.mul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=A.nmd(e),this)},2356:(e,t,A)=>{var n=A(462),r=A(2861).Buffer,i=A(6168),o=A(6698),a=A(5892),s=A(295),c=A(5122);function l(e,t,A,o){i.call(this);var s=r.alloc(4,0);this._cipher=new n.AES(t);var l=this._cipher.encryptBlock(s);this._ghash=new a(l),A=function(e,t,A){if(12===t.length)return e._finID=r.concat([t,r.from([0,0,0,1])]),r.concat([t,r.from([0,0,0,2])]);var n=new a(A),i=t.length,o=i%16;n.update(t),o&&(o=16-o,n.update(r.alloc(o,0))),n.update(r.alloc(8,0));var s=8*i,l=r.alloc(8);l.writeUIntBE(s,0,8),n.update(l),e._finID=n.state;var u=r.from(e._finID);return c(u),u}(this,A,l),this._prev=r.from(A),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(l,i),l.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=r.alloc(t,0),this._ghash.update(t))}this._called=!0;var A=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(A),this._len+=e.length,A},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=s(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var A=0;e.length!==t.length&&A++;for(var n=Math.min(e.length,t.length),r=0;r{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}},2455:(e,t,A)=>{var n;n=A.g.process&&A.g.process.browser?"utf-8":A.g.process&&A.g.process.version?parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=n},2509:function(e,t,A){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var A=function(){};A.prototype=t.prototype,e.prototype=new A,e.prototype.constructor=e}function i(e,t,A){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(A=t,t=10),this._init(e||0,t||10,A||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:A(1069).Buffer}catch(e){}function a(e,t){var A=e.charCodeAt(t);return A>=65&&A<=70?A-55:A>=97&&A<=102?A-87:A-48&15}function s(e,t,A){var n=a(e,A);return A-1>=t&&(n|=a(e,A-1)<<4),n}function c(e,t,A,n){for(var r=0,i=Math.min(e.length,A),o=t;o=49?a-49+10:a>=17?a-17+10:a}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,A){if("number"==typeof e)return this._initNumber(e,t,A);if("object"==typeof e)return this._initArray(e,t,A);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===A)for(r=0,i=0;r>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,A){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,A){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-A,o=i%n,a=Math.min(i,i-o)+A,s=0,l=A;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};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"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[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(e,t,A){A.negative=t.negative^e.negative;var n=e.length+t.length|0;A.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,a=67108863&o,s=o/67108864|0;A.words[0]=a;for(var c=1;c>>26,u=67108863&s,g=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=g;d++){var B=c-d|0;l+=(o=(r=0|e.words[B])*(i=0|t.words[d])+u)/67108864|0,u=67108863&o}A.words[c]=0|u,s=0|l}return 0!==s?A.words[c]=0|s:A.length--,A.strip()}i.prototype.toString=function(e,t){var A;if(t=0|t||1,16===(e=e||10)||"hex"===e){A="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?l[6-s.length]+s+A:s+A,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(A=i.toString(16)+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}if(e===(0|e)&&e>=2&&e<=36){var c=u[e],d=g[e];A="";var B=this.clone();for(B.negative=0;!B.isZero();){var h=B.modn(d).toString(e);A=(B=B.idivn(d)).isZero()?h+A:l[c-h.length]+h+A}for(this.isZero()&&(A="0"+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,A){var r=this.byteLength(),i=A||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===t,c=new e(i),l=this.clone();if(s){for(a=0;!l.isZero();a++)o=l.andln(255),l.iushrn(8),c[a]=o;for(;a=4096&&(A+=13,t>>>=13),t>=64&&(A+=7,t>>>=7),t>=8&&(A+=4,t>>>=4),t>=2&&(A+=2,t>>>=2),A+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,A=0;return 8191&t||(A+=13,t>>>=13),127&t||(A+=7,t>>>=7),15&t||(A+=4,t>>>=4),3&t||(A+=2,t>>>=2),1&t||A++,A},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var A=0;Ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,A;this.length>e.length?(t=this,A=e):(t=e,A=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),A=e%26;this._expand(t),A>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-A),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var A=e/26|0,r=e%26;return this._expand(A+1),this.words[A]=t?this.words[A]|1<e.length?(A=this,n=e):(A=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=A.length,0!==r)this.words[this.length]=r,this.length++;else if(A!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var A,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(A=this,n=e):(A=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,d=0|o[1],B=8191&d,h=d>>>13,I=0|o[2],Q=8191&I,p=I>>>13,f=0|o[3],E=8191&f,m=f>>>13,C=0|o[4],y=8191&C,v=C>>>13,b=0|o[5],w=8191&b,D=b>>>13,S=0|o[6],F=8191&S,x=S>>>13,U=0|o[7],N=8191&U,R=U>>>13,M=0|o[8],L=8191&M,k=M>>>13,G=0|o[9],H=8191&G,_=G>>>13,Y=0|a[0],T=8191&Y,V=Y>>>13,P=0|a[1],O=8191&P,K=P>>>13,J=0|a[2],j=8191&J,z=J>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],Ae=8191&te,ne=te>>>13,re=0|a[6],ie=8191&re,oe=re>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,le=0|a[8],ue=8191&le,ge=le>>>13,de=0|a[9],Be=8191&de,he=de>>>13;A.negative=e.negative^t.negative,A.length=19;var Ie=(c+(n=Math.imul(u,T))|0)+((8191&(r=(r=Math.imul(u,V))+Math.imul(g,T)|0))<<13)|0;c=((i=Math.imul(g,V))+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,T),r=(r=Math.imul(B,V))+Math.imul(h,T)|0,i=Math.imul(h,V);var Qe=(c+(n=n+Math.imul(u,O)|0)|0)+((8191&(r=(r=r+Math.imul(u,K)|0)+Math.imul(g,O)|0))<<13)|0;c=((i=i+Math.imul(g,K)|0)+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,n=Math.imul(Q,T),r=(r=Math.imul(Q,V))+Math.imul(p,T)|0,i=Math.imul(p,V),n=n+Math.imul(B,O)|0,r=(r=r+Math.imul(B,K)|0)+Math.imul(h,O)|0,i=i+Math.imul(h,K)|0;var pe=(c+(n=n+Math.imul(u,j)|0)|0)+((8191&(r=(r=r+Math.imul(u,z)|0)+Math.imul(g,j)|0))<<13)|0;c=((i=i+Math.imul(g,z)|0)+(r>>>13)|0)+(pe>>>26)|0,pe&=67108863,n=Math.imul(E,T),r=(r=Math.imul(E,V))+Math.imul(m,T)|0,i=Math.imul(m,V),n=n+Math.imul(Q,O)|0,r=(r=r+Math.imul(Q,K)|0)+Math.imul(p,O)|0,i=i+Math.imul(p,K)|0,n=n+Math.imul(B,j)|0,r=(r=r+Math.imul(B,z)|0)+Math.imul(h,j)|0,i=i+Math.imul(h,z)|0;var fe=(c+(n=n+Math.imul(u,Z)|0)|0)+((8191&(r=(r=r+Math.imul(u,W)|0)+Math.imul(g,Z)|0))<<13)|0;c=((i=i+Math.imul(g,W)|0)+(r>>>13)|0)+(fe>>>26)|0,fe&=67108863,n=Math.imul(y,T),r=(r=Math.imul(y,V))+Math.imul(v,T)|0,i=Math.imul(v,V),n=n+Math.imul(E,O)|0,r=(r=r+Math.imul(E,K)|0)+Math.imul(m,O)|0,i=i+Math.imul(m,K)|0,n=n+Math.imul(Q,j)|0,r=(r=r+Math.imul(Q,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,n=n+Math.imul(B,Z)|0,r=(r=r+Math.imul(B,W)|0)+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0;var Ee=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(r=(r=r+Math.imul(u,ee)|0)+Math.imul(g,$)|0))<<13)|0;c=((i=i+Math.imul(g,ee)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(w,T),r=(r=Math.imul(w,V))+Math.imul(D,T)|0,i=Math.imul(D,V),n=n+Math.imul(y,O)|0,r=(r=r+Math.imul(y,K)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,K)|0,n=n+Math.imul(E,j)|0,r=(r=r+Math.imul(E,z)|0)+Math.imul(m,j)|0,i=i+Math.imul(m,z)|0,n=n+Math.imul(Q,Z)|0,r=(r=r+Math.imul(Q,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(B,$)|0,r=(r=r+Math.imul(B,ee)|0)+Math.imul(h,$)|0,i=i+Math.imul(h,ee)|0;var me=(c+(n=n+Math.imul(u,Ae)|0)|0)+((8191&(r=(r=r+Math.imul(u,ne)|0)+Math.imul(g,Ae)|0))<<13)|0;c=((i=i+Math.imul(g,ne)|0)+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(F,T),r=(r=Math.imul(F,V))+Math.imul(x,T)|0,i=Math.imul(x,V),n=n+Math.imul(w,O)|0,r=(r=r+Math.imul(w,K)|0)+Math.imul(D,O)|0,i=i+Math.imul(D,K)|0,n=n+Math.imul(y,j)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,n=n+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,W)|0,n=n+Math.imul(Q,$)|0,r=(r=r+Math.imul(Q,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(B,Ae)|0,r=(r=r+Math.imul(B,ne)|0)+Math.imul(h,Ae)|0,i=i+Math.imul(h,ne)|0;var Ce=(c+(n=n+Math.imul(u,ie)|0)|0)+((8191&(r=(r=r+Math.imul(u,oe)|0)+Math.imul(g,ie)|0))<<13)|0;c=((i=i+Math.imul(g,oe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,T),r=(r=Math.imul(N,V))+Math.imul(R,T)|0,i=Math.imul(R,V),n=n+Math.imul(F,O)|0,r=(r=r+Math.imul(F,K)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,K)|0,n=n+Math.imul(w,j)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(D,j)|0,i=i+Math.imul(D,z)|0,n=n+Math.imul(y,Z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(E,$)|0,r=(r=r+Math.imul(E,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0,n=n+Math.imul(Q,Ae)|0,r=(r=r+Math.imul(Q,ne)|0)+Math.imul(p,Ae)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(B,ie)|0,r=(r=r+Math.imul(B,oe)|0)+Math.imul(h,ie)|0,i=i+Math.imul(h,oe)|0;var ye=(c+(n=n+Math.imul(u,se)|0)|0)+((8191&(r=(r=r+Math.imul(u,ce)|0)+Math.imul(g,se)|0))<<13)|0;c=((i=i+Math.imul(g,ce)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(L,T),r=(r=Math.imul(L,V))+Math.imul(k,T)|0,i=Math.imul(k,V),n=n+Math.imul(N,O)|0,r=(r=r+Math.imul(N,K)|0)+Math.imul(R,O)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(F,j)|0,r=(r=r+Math.imul(F,z)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,z)|0,n=n+Math.imul(w,Z)|0,r=(r=r+Math.imul(w,W)|0)+Math.imul(D,Z)|0,i=i+Math.imul(D,W)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(E,Ae)|0,r=(r=r+Math.imul(E,ne)|0)+Math.imul(m,Ae)|0,i=i+Math.imul(m,ne)|0,n=n+Math.imul(Q,ie)|0,r=(r=r+Math.imul(Q,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0,n=n+Math.imul(B,se)|0,r=(r=r+Math.imul(B,ce)|0)+Math.imul(h,se)|0,i=i+Math.imul(h,ce)|0;var ve=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(r=(r=r+Math.imul(u,ge)|0)+Math.imul(g,ue)|0))<<13)|0;c=((i=i+Math.imul(g,ge)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(H,T),r=(r=Math.imul(H,V))+Math.imul(_,T)|0,i=Math.imul(_,V),n=n+Math.imul(L,O)|0,r=(r=r+Math.imul(L,K)|0)+Math.imul(k,O)|0,i=i+Math.imul(k,K)|0,n=n+Math.imul(N,j)|0,r=(r=r+Math.imul(N,z)|0)+Math.imul(R,j)|0,i=i+Math.imul(R,z)|0,n=n+Math.imul(F,Z)|0,r=(r=r+Math.imul(F,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,n=n+Math.imul(w,$)|0,r=(r=r+Math.imul(w,ee)|0)+Math.imul(D,$)|0,i=i+Math.imul(D,ee)|0,n=n+Math.imul(y,Ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(v,Ae)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(E,ie)|0,r=(r=r+Math.imul(E,oe)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,oe)|0,n=n+Math.imul(Q,se)|0,r=(r=r+Math.imul(Q,ce)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(B,ue)|0,r=(r=r+Math.imul(B,ge)|0)+Math.imul(h,ue)|0,i=i+Math.imul(h,ge)|0;var be=(c+(n=n+Math.imul(u,Be)|0)|0)+((8191&(r=(r=r+Math.imul(u,he)|0)+Math.imul(g,Be)|0))<<13)|0;c=((i=i+Math.imul(g,he)|0)+(r>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(H,O),r=(r=Math.imul(H,K))+Math.imul(_,O)|0,i=Math.imul(_,K),n=n+Math.imul(L,j)|0,r=(r=r+Math.imul(L,z)|0)+Math.imul(k,j)|0,i=i+Math.imul(k,z)|0,n=n+Math.imul(N,Z)|0,r=(r=r+Math.imul(N,W)|0)+Math.imul(R,Z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(F,$)|0,r=(r=r+Math.imul(F,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,n=n+Math.imul(w,Ae)|0,r=(r=r+Math.imul(w,ne)|0)+Math.imul(D,Ae)|0,i=i+Math.imul(D,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(E,se)|0,r=(r=r+Math.imul(E,ce)|0)+Math.imul(m,se)|0,i=i+Math.imul(m,ce)|0,n=n+Math.imul(Q,ue)|0,r=(r=r+Math.imul(Q,ge)|0)+Math.imul(p,ue)|0,i=i+Math.imul(p,ge)|0;var we=(c+(n=n+Math.imul(B,Be)|0)|0)+((8191&(r=(r=r+Math.imul(B,he)|0)+Math.imul(h,Be)|0))<<13)|0;c=((i=i+Math.imul(h,he)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(H,j),r=(r=Math.imul(H,z))+Math.imul(_,j)|0,i=Math.imul(_,z),n=n+Math.imul(L,Z)|0,r=(r=r+Math.imul(L,W)|0)+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(N,$)|0,r=(r=r+Math.imul(N,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(F,Ae)|0,r=(r=r+Math.imul(F,ne)|0)+Math.imul(x,Ae)|0,i=i+Math.imul(x,ne)|0,n=n+Math.imul(w,ie)|0,r=(r=r+Math.imul(w,oe)|0)+Math.imul(D,ie)|0,i=i+Math.imul(D,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,ce)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(E,ue)|0,r=(r=r+Math.imul(E,ge)|0)+Math.imul(m,ue)|0,i=i+Math.imul(m,ge)|0;var De=(c+(n=n+Math.imul(Q,Be)|0)|0)+((8191&(r=(r=r+Math.imul(Q,he)|0)+Math.imul(p,Be)|0))<<13)|0;c=((i=i+Math.imul(p,he)|0)+(r>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(H,Z),r=(r=Math.imul(H,W))+Math.imul(_,Z)|0,i=Math.imul(_,W),n=n+Math.imul(L,$)|0,r=(r=r+Math.imul(L,ee)|0)+Math.imul(k,$)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(N,Ae)|0,r=(r=r+Math.imul(N,ne)|0)+Math.imul(R,Ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(F,ie)|0,r=(r=r+Math.imul(F,oe)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,oe)|0,n=n+Math.imul(w,se)|0,r=(r=r+Math.imul(w,ce)|0)+Math.imul(D,se)|0,i=i+Math.imul(D,ce)|0,n=n+Math.imul(y,ue)|0,r=(r=r+Math.imul(y,ge)|0)+Math.imul(v,ue)|0,i=i+Math.imul(v,ge)|0;var Se=(c+(n=n+Math.imul(E,Be)|0)|0)+((8191&(r=(r=r+Math.imul(E,he)|0)+Math.imul(m,Be)|0))<<13)|0;c=((i=i+Math.imul(m,he)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(H,$),r=(r=Math.imul(H,ee))+Math.imul(_,$)|0,i=Math.imul(_,ee),n=n+Math.imul(L,Ae)|0,r=(r=r+Math.imul(L,ne)|0)+Math.imul(k,Ae)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(N,ie)|0,r=(r=r+Math.imul(N,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(F,se)|0,r=(r=r+Math.imul(F,ce)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ce)|0,n=n+Math.imul(w,ue)|0,r=(r=r+Math.imul(w,ge)|0)+Math.imul(D,ue)|0,i=i+Math.imul(D,ge)|0;var Fe=(c+(n=n+Math.imul(y,Be)|0)|0)+((8191&(r=(r=r+Math.imul(y,he)|0)+Math.imul(v,Be)|0))<<13)|0;c=((i=i+Math.imul(v,he)|0)+(r>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(H,Ae),r=(r=Math.imul(H,ne))+Math.imul(_,Ae)|0,i=Math.imul(_,ne),n=n+Math.imul(L,ie)|0,r=(r=r+Math.imul(L,oe)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,oe)|0,n=n+Math.imul(N,se)|0,r=(r=r+Math.imul(N,ce)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,ce)|0,n=n+Math.imul(F,ue)|0,r=(r=r+Math.imul(F,ge)|0)+Math.imul(x,ue)|0,i=i+Math.imul(x,ge)|0;var xe=(c+(n=n+Math.imul(w,Be)|0)|0)+((8191&(r=(r=r+Math.imul(w,he)|0)+Math.imul(D,Be)|0))<<13)|0;c=((i=i+Math.imul(D,he)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(H,ie),r=(r=Math.imul(H,oe))+Math.imul(_,ie)|0,i=Math.imul(_,oe),n=n+Math.imul(L,se)|0,r=(r=r+Math.imul(L,ce)|0)+Math.imul(k,se)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(N,ue)|0,r=(r=r+Math.imul(N,ge)|0)+Math.imul(R,ue)|0,i=i+Math.imul(R,ge)|0;var Ue=(c+(n=n+Math.imul(F,Be)|0)|0)+((8191&(r=(r=r+Math.imul(F,he)|0)+Math.imul(x,Be)|0))<<13)|0;c=((i=i+Math.imul(x,he)|0)+(r>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(H,se),r=(r=Math.imul(H,ce))+Math.imul(_,se)|0,i=Math.imul(_,ce),n=n+Math.imul(L,ue)|0,r=(r=r+Math.imul(L,ge)|0)+Math.imul(k,ue)|0,i=i+Math.imul(k,ge)|0;var Ne=(c+(n=n+Math.imul(N,Be)|0)|0)+((8191&(r=(r=r+Math.imul(N,he)|0)+Math.imul(R,Be)|0))<<13)|0;c=((i=i+Math.imul(R,he)|0)+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(H,ue),r=(r=Math.imul(H,ge))+Math.imul(_,ue)|0,i=Math.imul(_,ge);var Re=(c+(n=n+Math.imul(L,Be)|0)|0)+((8191&(r=(r=r+Math.imul(L,he)|0)+Math.imul(k,Be)|0))<<13)|0;c=((i=i+Math.imul(k,he)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Me=(c+(n=Math.imul(H,Be))|0)+((8191&(r=(r=Math.imul(H,he))+Math.imul(_,Be)|0))<<13)|0;return c=((i=Math.imul(_,he))+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=Ie,s[1]=Qe,s[2]=pe,s[3]=fe,s[4]=Ee,s[5]=me,s[6]=Ce,s[7]=ye,s[8]=ve,s[9]=be,s[10]=we,s[11]=De,s[12]=Se,s[13]=Fe,s[14]=xe,s[15]=Ue,s[16]=Ne,s[17]=Re,s[18]=Me,0!==c&&(s[19]=c,A.length++),A};function h(e,t,A){return(new I).mulp(e,t,A)}function I(e,t){this.x=e,this.y=t}Math.imul||(B=d),i.prototype.mulTo=function(e,t){var A,n=this.length+e.length;return A=10===this.length&&10===e.length?B(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,A){A.negative=t.negative^e.negative,A.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}A.words[i]=a,n=o,o=r}return 0!==n?A.words[i]=n:A.length--,A.strip()}(this,e,t):h(this,e,t),A},I.prototype.makeRBT=function(e){for(var t=new Array(e),A=i.prototype._countBits(e)-1,n=0;n>=1;return n},I.prototype.permute=function(e,t,A,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,A[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[A]=67108863&i}return 0!==t&&(this.words[A]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),A=0;A>>r}return t}(e);if(0===t.length)return new i(1);for(var A=this,n=0;n=0);var t,A=e%26,r=(e-A)/26,i=67108863>>>26-A<<26-A;if(0!==A){var o=0;for(t=0;t>>26-A}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,c=0;c=0&&(0!==l||c>=r);c--){var u=0|this.words[c];this.words[c]=l<<26-i|u>>>i,l=u&a}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,A){return n(0===this.negative),this.iushrn(e,t,A)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,A=(e-t)/26,r=1<=0);var t=e%26,A=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=A)return this;if(0!==t&&A++,this.length=Math.min(A,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+A]=67108863&i}for(;r>26,this.words[r+A]=67108863&i;if(0===a)return this.strip();for(n(-1===a),a=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var A=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(A=26-this._countBits(o))&&(r=r.ushln(A),n.iushln(A),o=0|r.words[r.length-1]);var a,s=n.length-r.length;if("mod"!==t){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;u--){var g=67108864*(0|n.words[r.length+u])+(0|n.words[r.length+u-1]);for(g=Math.min(g/o|0,67108863),n._ishlnsubmul(r,g,u);0!==n.negative;)g--,n.negative=0,n._ishlnsubmul(r,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=g)}return a&&a.strip(),n.strip(),"div"!==t&&0!==A&&n.iushrn(A),{div:a||null,mod:n}},i.prototype.divmod=function(e,t,A){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(r=a.div.neg()),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(r=a.div.neg()),{div:r,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var A=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=A.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,A=0,r=this.length-1;r>=0;r--)A=(t*A+(0|this.words[r]))%e;return A},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,A=this.length-1;A>=0;A--){var r=(0|this.words[A])+67108864*t;this.words[A]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),a=new i(0),s=new i(1),c=0;t.isEven()&&A.isEven();)t.iushrn(1),A.iushrn(1),++c;for(var l=A.clone(),u=t.clone();!t.isZero();){for(var g=0,d=1;0===(t.words[0]&d)&&g<26;++g,d<<=1);if(g>0)for(t.iushrn(g);g-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(l),o.isub(u)),r.iushrn(1),o.iushrn(1);for(var B=0,h=1;0===(A.words[0]&h)&&B<26;++B,h<<=1);if(B>0)for(A.iushrn(B);B-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(u)),a.iushrn(1),s.iushrn(1);t.cmp(A)>=0?(t.isub(A),r.isub(a),o.isub(s)):(A.isub(t),a.isub(r),s.isub(o))}return{a,b:s,gcd:A.iushln(c)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),a=new i(0),s=A.clone();t.cmpn(1)>0&&A.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var u=0,g=1;0===(A.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(A)>=0?(t.isub(A),o.isub(a)):(A.isub(t),a.isub(o))}return(r=0===t.cmpn(1)?o:a).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),A=e.clone();t.negative=0,A.negative=0;for(var n=0;t.isEven()&&A.isEven();n++)t.iushrn(1),A.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;A.isEven();)A.iushrn(1);var r=t.cmp(A);if(r<0){var i=t;t=A,A=i}else if(0===r||0===A.cmpn(1))break;t.isub(A)}return A.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,A=(e-t)/26,r=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,A=e<0;if(0!==this.negative&&!A)return-1;if(0===this.negative&&A)return 1;if(this.strip(),this.length>1)t=1;else{A&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;A--){var n=0|this.words[A],r=0|e.words[A];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var Q={k256:null,p224:null,p192:null,p25519:null};function p(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function m(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}p.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},p.prototype.ireduce=function(e){var t,A=e;do{this.split(A,this.tmp),t=(A=(A=this.imulK(A)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?A.isub(this.p):void 0!==A.strip?A.strip():A._strip(),A},p.prototype.split=function(e,t){e.iushrn(this.n,0,t)},p.prototype.imulK=function(e){return e.imul(this.k)},r(f,p),f.prototype.split=function(e,t){for(var A=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},f.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,A=0;A>>=26,e.words[A]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(Q[e])return Q[e];var t;if("k256"===e)t=new f;else if("p224"===e)t=new E;else if("p192"===e)t=new m;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return Q[e]=t,t},y.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,t){this._verify2(e,t);var A=e.add(t);return A.cmp(this.m)>=0&&A.isub(this.m),A._forceRed(this)},y.prototype.iadd=function(e,t){this._verify2(e,t);var A=e.iadd(t);return A.cmp(this.m)>=0&&A.isub(this.m),A},y.prototype.sub=function(e,t){this._verify2(e,t);var A=e.sub(t);return A.cmpn(0)<0&&A.iadd(this.m),A._forceRed(this)},y.prototype.isub=function(e,t){this._verify2(e,t);var A=e.isub(t);return A.cmpn(0)<0&&A.iadd(this.m),A},y.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},y.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},y.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var A=this.m.add(new i(1)).iushrn(2);return this.pow(e,A)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var a=new i(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,c).cmp(s);)l.redIAdd(s);for(var u=this.pow(l,r),g=this.pow(e,r.addn(1).iushrn(1)),d=this.pow(e,r),B=o;0!==d.cmp(a);){for(var h=d,I=0;0!==h.cmp(a);I++)h=h.redSqr();n(I=0;n--){for(var c=t.words[n],l=s-1;l>=0;l--){var u=c>>l&1;r!==A[0]&&(r=this.sqr(r)),0!==u||0!==o?(o<<=1,o|=u,(4===++a||0===n&&0===l)&&(r=this.mul(r,A[o]),a=0,o=0)):a=0}s=26}return r},y.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},y.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new v(e)},r(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},v.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var A=e.imul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var A=e.mul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=A.nmd(e),this)},2551:(e,t,A)=>{"use strict";var n=A(6540),r=A(9982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,A=1;At}return!1}(t,A,r,n)&&(A=null),n||null===r?function(e){return!!u.call(B,e)||!u.call(d,e)&&(g.test(e)?B[e]=!0:(d[e]=!0,!1))}(t)&&(null===A?e.removeAttribute(t):e.setAttribute(t,""+A)):r.mustUseProperty?e[r.propertyName]=null===A?3!==r.type&&"":A:(t=r.attributeName,n=r.attributeNamespace,null===A?e.removeAttribute(t):(A=3===(r=r.type)||4===r&&!0===A?"":""+A,n?e.setAttributeNS(n,t,A):e.setAttribute(t,A))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Q,p);I[t]=new h(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Q,p);I[t]=new h(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Q,p);I[t]=new h(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){I[e]=new h(e,1,!1,e.toLowerCase(),null,!1,!1)})),I.xlinkHref=new h("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){I[e]=new h(e,1,!1,e.toLowerCase(),null,!0,!0)}));var E=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,m=Symbol.for("react.element"),C=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),D=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var R=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function L(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=M&&e[M]||e["@@iterator"])?e:null}var k,G=Object.assign;function H(e){if(void 0===k)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);k=t&&t[1]||""}return"\n"+k+e}var _=!1;function Y(e,t){if(!e||_)return"";_=!0;var A=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var n=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){n=e}e.call(t.prototype)}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var r=t.stack.split("\n"),i=n.stack.split("\n"),o=r.length-1,a=i.length-1;1<=o&&0<=a&&r[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(r[o]!==i[a]){if(1!==o||1!==a)do{if(o--,0>--a||r[o]!==i[a]){var s="\n"+r[o].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}}while(1<=o&&0<=a);break}}}finally{_=!1,Error.prepareStackTrace=A}return(e=e?e.displayName||e.name:"")?H(e):""}function T(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return Y(e.type,!1);case 11:return Y(e.type.render,!1);case 1:return Y(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case y:return"Fragment";case C:return"Portal";case b:return"Profiler";case v:return"StrictMode";case F:return"Suspense";case x:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case D:return(e.displayName||"Context")+".Consumer";case w:return(e._context.displayName||"Context")+".Provider";case S:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case U:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return V(e(t))}catch(e){}}return null}function P(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return V(t);case 8:return t===v?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function O(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function J(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",A=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==A&&"function"==typeof A.get&&"function"==typeof A.set){var r=A.get,i=A.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:A.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function j(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var A=t.getValue(),n="";return e&&(n=K(e)?e.checked?"true":"false":e.value),(e=n)!==A&&(t.setValue(e),!0)}function z(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function q(e,t){var A=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=A?A:e._wrapperState.initialChecked})}function Z(e,t){var A=null==t.defaultValue?"":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;A=O(null!=t.value?t.value:A),e._wrapperState={initialChecked:n,initialValue:A,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function W(e,t){null!=(t=t.checked)&&f(e,"checked",t,!1)}function X(e,t){W(e,t);var A=O(t.value),n=t.type;if(null!=A)"number"===n?(0===A&&""===e.value||e.value!=A)&&(e.value=""+A):e.value!==""+A&&(e.value=""+A);else if("submit"===n||"reset"===n)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,A):t.hasOwnProperty("defaultValue")&&ee(e,t.type,O(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function $(e,t,A){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!("submit"!==n&&"reset"!==n||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,A||t===e.value||(e.value=t),e.defaultValue=t}""!==(A=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==A&&(e.name=A)}function ee(e,t,A){"number"===t&&z(e.ownerDocument)===e||(null==A?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+A&&(e.defaultValue=""+A))}var te=Array.isArray;function Ae(e,t,A,n){if(e=e.options,t){t={};for(var r=0;r"+t.valueOf().toString()+"",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,A,n){MSApp.execUnsafeLocalFunction((function(){return le(e,t)}))}:le);function ge(e,t){if(t){var A=e.firstChild;if(A&&A===e.lastChild&&3===A.nodeType)return void(A.nodeValue=t)}e.textContent=t}var de={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Be=["Webkit","ms","Moz","O"];function he(e,t,A){return null==t||"boolean"==typeof t||""===t?"":A||"number"!=typeof t||0===t||de.hasOwnProperty(e)&&de[e]?(""+t).trim():t+"px"}function Ie(e,t){for(var A in e=e.style,t)if(t.hasOwnProperty(A)){var n=0===A.indexOf("--"),r=he(A,t[A],n);"float"===A&&(A="cssFloat"),n?e.setProperty(A,r):e[A]=r}}Object.keys(de).forEach((function(e){Be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),de[t]=de[e]}))}));var Qe=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pe(e,t){if(t){if(Qe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(i(62))}}function fe(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ee=null;function me(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,ye=null,ve=null;function be(e){if(e=fr(e)){if("function"!=typeof Ce)throw Error(i(280));var t=e.stateNode;t&&(t=mr(t),Ce(e.stateNode,e.type,t))}}function we(e){ye?ve?ve.push(e):ve=[e]:ye=e}function De(){if(ye){var e=ye,t=ve;if(ve=ye=null,be(e),t)for(e=0;e>>=0)?32:31-(at(e)/st|0)|0},at=Math.log,st=Math.LN2,ct=64,lt=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gt(e,t){var A=e.pendingLanes;if(0===A)return 0;var n=0,r=e.suspendedLanes,i=e.pingedLanes,o=268435455&A;if(0!==o){var a=o&~r;0!==a?n=ut(a):0!==(i&=o)&&(n=ut(i))}else 0!==(o=A&~r)?n=ut(o):0!==i&&(n=ut(i));if(0===n)return 0;if(0!==t&&t!==n&&0===(t&r)&&((r=n&-n)>=(i=t&-t)||16===r&&4194240&i))return t;if(4&n&&(n|=16&A),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=n;0A;A++)t.push(e);return t}function Qt(e,t,A){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=A}function pt(e,t){var A=e.entangledLanes|=t;for(e=e.entanglements;A;){var n=31-ot(A),r=1<=MA),GA=String.fromCharCode(32),HA=!1;function _A(e,t){switch(e){case"keyup":return-1!==NA.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YA(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var TA=!1,VA={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function PA(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!VA[e.type]:"textarea"===t}function OA(e,t,A,n){we(n),0<(t=Jn(t,"onChange")).length&&(A=new cA("onChange","change",null,A,n),e.push({event:A,listeners:t}))}var KA=null,JA=null;function jA(e){Hn(e,0)}function zA(e){if(j(Er(e)))return e}function qA(e,t){if("change"===e)return t}var ZA=!1;if(l){var WA;if(l){var XA="oninput"in document;if(!XA){var $A=document.createElement("div");$A.setAttribute("oninput","return;"),XA="function"==typeof $A.oninput}WA=XA}else WA=!1;ZA=WA&&(!document.documentMode||9=t)return{node:n,offset:t-e};e=A}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cn(n)}}function un(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?un(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function gn(){for(var e=window,t=z();t instanceof e.HTMLIFrameElement;){try{var A="string"==typeof t.contentWindow.location.href}catch(e){A=!1}if(!A)break;t=z((e=t.contentWindow).document)}return t}function dn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Bn(e){var t=gn(),A=e.focusedElem,n=e.selectionRange;if(t!==A&&A&&A.ownerDocument&&un(A.ownerDocument.documentElement,A)){if(null!==n&&dn(A))if(t=n.start,void 0===(e=n.end)&&(e=t),"selectionStart"in A)A.selectionStart=t,A.selectionEnd=Math.min(e,A.value.length);else if((e=(t=A.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var r=A.textContent.length,i=Math.min(n.start,r);n=void 0===n.end?i:Math.min(n.end,r),!e.extend&&i>n&&(r=n,n=i,i=r),r=ln(A,i);var o=ln(A,n);r&&o&&(1!==e.rangeCount||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(r.node,r.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=A;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof A.focus&&A.focus(),A=0;A=document.documentMode,In=null,Qn=null,pn=null,fn=!1;function En(e,t,A){var n=A.window===A?A.document:9===A.nodeType?A:A.ownerDocument;fn||null==In||In!==z(n)||(n="selectionStart"in(n=In)&&dn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},pn&&sn(pn,n)||(pn=n,0<(n=Jn(Qn,"onSelect")).length&&(t=new cA("onSelect","select",null,t,A),e.push({event:t,listeners:n}),t.target=In)))}function mn(e,t){var A={};return A[e.toLowerCase()]=t.toLowerCase(),A["Webkit"+e]="webkit"+t,A["Moz"+e]="moz"+t,A}var Cn={animationend:mn("Animation","AnimationEnd"),animationiteration:mn("Animation","AnimationIteration"),animationstart:mn("Animation","AnimationStart"),transitionend:mn("Transition","TransitionEnd")},yn={},vn={};function bn(e){if(yn[e])return yn[e];if(!Cn[e])return e;var t,A=Cn[e];for(t in A)if(A.hasOwnProperty(t)&&t in vn)return yn[e]=A[t];return e}l&&(vn=document.createElement("div").style,"AnimationEvent"in window||(delete Cn.animationend.animation,delete Cn.animationiteration.animation,delete Cn.animationstart.animation),"TransitionEvent"in window||delete Cn.transitionend.transition);var wn=bn("animationend"),Dn=bn("animationiteration"),Sn=bn("animationstart"),Fn=bn("transitionend"),xn=new Map,Un="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nn(e,t){xn.set(e,t),s(t,[e])}for(var Rn=0;Rnyr||(e.current=Cr[yr],Cr[yr]=null,yr--)}function wr(e,t){yr++,Cr[yr]=e.current,e.current=t}var Dr={},Sr=vr(Dr),Fr=vr(!1),xr=Dr;function Ur(e,t){var A=e.type.contextTypes;if(!A)return Dr;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var r,i={};for(r in A)i[r]=t[r];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Nr(e){return null!=e.childContextTypes}function Rr(){br(Fr),br(Sr)}function Mr(e,t,A){if(Sr.current!==Dr)throw Error(i(168));wr(Sr,t),wr(Fr,A)}function Lr(e,t,A){var n=e.stateNode;if(t=t.childContextTypes,"function"!=typeof n.getChildContext)return A;for(var r in n=n.getChildContext())if(!(r in t))throw Error(i(108,P(e)||"Unknown",r));return G({},A,n)}function kr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dr,xr=Sr.current,wr(Sr,e),wr(Fr,Fr.current),!0}function Gr(e,t,A){var n=e.stateNode;if(!n)throw Error(i(169));A?(e=Lr(e,t,xr),n.__reactInternalMemoizedMergedChildContext=e,br(Fr),br(Sr),wr(Sr,e)):br(Fr),wr(Fr,A)}var Hr=null,_r=!1,Yr=!1;function Tr(e){null===Hr?Hr=[e]:Hr.push(e)}function Vr(){if(!Yr&&null!==Hr){Yr=!0;var e=0,t=ft;try{var A=Hr;for(ft=1;e>=o,r-=o,Zr=1<<32-ot(t)+r|A<h?(I=u,u=null):I=u.sibling;var Q=d(r,u,a[h],s);if(null===Q){null===u&&(u=I);break}e&&u&&null===Q.alternate&&t(r,u),i=o(Q,i,h),null===l?c=Q:l.sibling=Q,l=Q,u=I}if(h===a.length)return A(r,u),ri&&Xr(r,h),c;if(null===u){for(;hI?(Q=h,h=null):Q=h.sibling;var f=d(r,h,p.value,c);if(null===f){null===h&&(h=Q);break}e&&h&&null===f.alternate&&t(r,h),a=o(f,a,I),null===u?l=f:u.sibling=f,u=f,h=Q}if(p.done)return A(r,h),ri&&Xr(r,I),l;if(null===h){for(;!p.done;I++,p=s.next())null!==(p=g(r,p.value,c))&&(a=o(p,a,I),null===u?l=p:u.sibling=p,u=p);return ri&&Xr(r,I),l}for(h=n(r,h);!p.done;I++,p=s.next())null!==(p=B(h,r,I,p.value,c))&&(e&&null!==p.alternate&&h.delete(null===p.key?I:p.key),a=o(p,a,I),null===u?l=p:u.sibling=p,u=p);return e&&h.forEach((function(e){return t(r,e)})),ri&&Xr(r,I),l}return function e(n,i,o,s){if("object"==typeof o&&null!==o&&o.type===y&&null===o.key&&(o=o.props.children),"object"==typeof o&&null!==o){switch(o.$$typeof){case m:e:{for(var c=o.key,l=i;null!==l;){if(l.key===c){if((c=o.type)===y){if(7===l.tag){A(n,l.sibling),(i=r(l,o.props.children)).return=n,n=i;break e}}else if(l.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===N&&pi(c)===l.type){A(n,l.sibling),(i=r(l,o.props)).ref=Ii(n,l,o),i.return=n,n=i;break e}A(n,l);break}t(n,l),l=l.sibling}o.type===y?((i=Lc(o.props.children,n.mode,s,o.key)).return=n,n=i):((s=Mc(o.type,o.key,o.props,null,n.mode,s)).ref=Ii(n,i,o),s.return=n,n=s)}return a(n);case C:e:{for(l=o.key;null!==i;){if(i.key===l){if(4===i.tag&&i.stateNode.containerInfo===o.containerInfo&&i.stateNode.implementation===o.implementation){A(n,i.sibling),(i=r(i,o.children||[])).return=n,n=i;break e}A(n,i);break}t(n,i),i=i.sibling}(i=Hc(o,n.mode,s)).return=n,n=i}return a(n);case N:return e(n,i,(l=o._init)(o._payload),s)}if(te(o))return h(n,i,o,s);if(L(o))return I(n,i,o,s);Qi(n,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==i&&6===i.tag?(A(n,i.sibling),(i=r(i,o)).return=n,n=i):(A(n,i),(i=Gc(o,n.mode,s)).return=n,n=i),a(n)):A(n,i)}}var Ei=fi(!0),mi=fi(!1),Ci=vr(null),yi=null,vi=null,bi=null;function wi(){bi=vi=yi=null}function Di(e){var t=Ci.current;br(Ci),e._currentValue=t}function Si(e,t,A){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==n&&(n.childLanes|=t)):null!==n&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===A)break;e=e.return}}function Fi(e,t){yi=e,bi=vi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(fa=!0),e.firstContext=null)}function xi(e){var t=e._currentValue;if(bi!==e)if(e={context:e,memoizedValue:t,next:null},null===vi){if(null===yi)throw Error(i(308));vi=e,yi.dependencies={lanes:0,firstContext:e}}else vi=vi.next=e;return t}var Ui=null;function Ni(e){null===Ui?Ui=[e]:Ui.push(e)}function Ri(e,t,A,n){var r=t.interleaved;return null===r?(A.next=A,Ni(t)):(A.next=r.next,r.next=A),t.interleaved=A,Mi(e,n)}function Mi(e,t){e.lanes|=t;var A=e.alternate;for(null!==A&&(A.lanes|=t),A=e,e=e.return;null!==e;)e.childLanes|=t,null!==(A=e.alternate)&&(A.childLanes|=t),A=e,e=e.return;return 3===A.tag?A.stateNode:null}var Li=!1;function ki(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Hi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function _i(e,t,A){var n=e.updateQueue;if(null===n)return null;if(n=n.shared,2&Ss){var r=n.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),n.pending=t,Mi(e,A)}return null===(r=n.interleaved)?(t.next=t,Ni(n)):(t.next=r.next,r.next=t),n.interleaved=t,Mi(e,A)}function Yi(e,t,A){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&A)){var n=t.lanes;A|=n&=e.pendingLanes,t.lanes=A,pt(e,A)}}function Ti(e,t){var A=e.updateQueue,n=e.alternate;if(null!==n&&A===(n=n.updateQueue)){var r=null,i=null;if(null!==(A=A.firstBaseUpdate)){do{var o={eventTime:A.eventTime,lane:A.lane,tag:A.tag,payload:A.payload,callback:A.callback,next:null};null===i?r=i=o:i=i.next=o,A=A.next}while(null!==A);null===i?r=i=t:i=i.next=t}else r=i=t;return A={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:n.shared,effects:n.effects},void(e.updateQueue=A)}null===(e=A.lastBaseUpdate)?A.firstBaseUpdate=t:e.next=t,A.lastBaseUpdate=t}function Vi(e,t,A,n){var r=e.updateQueue;Li=!1;var i=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(null!==a){r.shared.pending=null;var s=a,c=s.next;s.next=null,null===o?i=c:o.next=c,o=s;var l=e.alternate;null!==l&&(a=(l=l.updateQueue).lastBaseUpdate)!==o&&(null===a?l.firstBaseUpdate=c:a.next=c,l.lastBaseUpdate=s)}if(null!==i){var u=r.baseState;for(o=0,l=c=s=null,a=i;;){var g=a.lane,d=a.eventTime;if((n&g)===g){null!==l&&(l=l.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var B=e,h=a;switch(g=t,d=A,h.tag){case 1:if("function"==typeof(B=h.payload)){u=B.call(d,u,g);break e}u=B;break e;case 3:B.flags=-65537&B.flags|128;case 0:if(null==(g="function"==typeof(B=h.payload)?B.call(d,u,g):B))break e;u=G({},u,g);break e;case 2:Li=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(g=r.effects)?r.effects=[a]:g.push(a))}else d={eventTime:d,lane:g,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===l?(c=l=d,s=u):l=l.next=d,o|=g;if(null===(a=a.next)){if(null===(a=r.shared.pending))break;a=(g=a).next,g.next=null,r.lastBaseUpdate=g,r.shared.pending=null}}if(null===l&&(s=u),r.baseState=s,r.firstBaseUpdate=c,r.lastBaseUpdate=l,null!==(t=r.shared.interleaved)){r=t;do{o|=r.lane,r=r.next}while(r!==t)}else null===i&&(r.shared.lanes=0);ks|=o,e.lanes=o,e.memoizedState=u}}function Pi(e,t,A){if(e=t.effects,t.effects=null,null!==e)for(t=0;tA?A:4,e(!0);var n=ro.transition;ro.transition={};try{e(!1),t()}finally{ft=A,ro.transition=n}}function Jo(){return fo().memoizedState}function jo(e,t,A){var n=tc(e);A={lane:n,action:A,hasEagerState:!1,eagerState:null,next:null},qo(e)?Zo(t,A):null!==(A=Ri(e,t,A,n))&&(Ac(A,e,n,ec()),Wo(A,t,n))}function zo(e,t,A){var n=tc(e),r={lane:n,action:A,hasEagerState:!1,eagerState:null,next:null};if(qo(e))Zo(t,r);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var o=t.lastRenderedState,a=i(o,A);if(r.hasEagerState=!0,r.eagerState=a,an(a,o)){var s=t.interleaved;return null===s?(r.next=r,Ni(t)):(r.next=s.next,s.next=r),void(t.interleaved=r)}}catch(e){}null!==(A=Ri(e,t,r,n))&&(Ac(A,e,n,r=ec()),Wo(A,t,n))}}function qo(e){var t=e.alternate;return e===oo||null!==t&&t===oo}function Zo(e,t){lo=co=!0;var A=e.pending;null===A?t.next=t:(t.next=A.next,A.next=t),e.pending=t}function Wo(e,t,A){if(4194240&A){var n=t.lanes;A|=n&=e.pendingLanes,t.lanes=A,pt(e,A)}}var Xo={readContext:xi,useCallback:Bo,useContext:Bo,useEffect:Bo,useImperativeHandle:Bo,useInsertionEffect:Bo,useLayoutEffect:Bo,useMemo:Bo,useReducer:Bo,useRef:Bo,useState:Bo,useDebugValue:Bo,useDeferredValue:Bo,useTransition:Bo,useMutableSource:Bo,useSyncExternalStore:Bo,useId:Bo,unstable_isNewReconciler:!1},$o={readContext:xi,useCallback:function(e,t){return po().memoizedState=[e,void 0===t?null:t],e},useContext:xi,useEffect:Lo,useImperativeHandle:function(e,t,A){return A=null!=A?A.concat([e]):null,Ro(4194308,4,_o.bind(null,t,e),A)},useLayoutEffect:function(e,t){return Ro(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ro(4,2,e,t)},useMemo:function(e,t){var A=po();return t=void 0===t?null:t,e=e(),A.memoizedState=[e,t],e},useReducer:function(e,t,A){var n=po();return t=void 0!==A?A(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=jo.bind(null,oo,e),[n.memoizedState,e]},useRef:function(e){return e={current:e},po().memoizedState=e},useState:xo,useDebugValue:To,useDeferredValue:function(e){return po().memoizedState=e},useTransition:function(){var e=xo(!1),t=e[0];return e=Ko.bind(null,e[1]),po().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,A){var n=oo,r=po();if(ri){if(void 0===A)throw Error(i(407));A=A()}else{if(A=t(),null===Fs)throw Error(i(349));30&io||bo(n,t,A)}r.memoizedState=A;var o={value:A,getSnapshot:t};return r.queue=o,Lo(Do.bind(null,n,o,e),[e]),n.flags|=2048,Uo(9,wo.bind(null,n,o,A,t),void 0,null),A},useId:function(){var e=po(),t=Fs.identifierPrefix;if(ri){var A=Wr;t=":"+t+"R"+(A=(Zr&~(1<<32-ot(Zr)-1)).toString(32)+A),0<(A=uo++)&&(t+="H"+A.toString(32)),t+=":"}else t=":"+t+"r"+(A=go++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ea={readContext:xi,useCallback:Vo,useContext:xi,useEffect:ko,useImperativeHandle:Yo,useInsertionEffect:Go,useLayoutEffect:Ho,useMemo:Po,useReducer:mo,useRef:No,useState:function(){return mo(Eo)},useDebugValue:To,useDeferredValue:function(e){return Oo(fo(),ao.memoizedState,e)},useTransition:function(){return[mo(Eo)[0],fo().memoizedState]},useMutableSource:yo,useSyncExternalStore:vo,useId:Jo,unstable_isNewReconciler:!1},ta={readContext:xi,useCallback:Vo,useContext:xi,useEffect:ko,useImperativeHandle:Yo,useInsertionEffect:Go,useLayoutEffect:Ho,useMemo:Po,useReducer:Co,useRef:No,useState:function(){return Co(Eo)},useDebugValue:To,useDeferredValue:function(e){var t=fo();return null===ao?t.memoizedState=e:Oo(t,ao.memoizedState,e)},useTransition:function(){return[Co(Eo)[0],fo().memoizedState]},useMutableSource:yo,useSyncExternalStore:vo,useId:Jo,unstable_isNewReconciler:!1};function Aa(e,t){if(e&&e.defaultProps){for(var A in t=G({},t),e=e.defaultProps)void 0===t[A]&&(t[A]=e[A]);return t}return t}function na(e,t,A,n){A=null==(A=A(n,t=e.memoizedState))?t:G({},t,A),e.memoizedState=A,0===e.lanes&&(e.updateQueue.baseState=A)}var ra={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,A){e=e._reactInternals;var n=ec(),r=tc(e),i=Hi(n,r);i.payload=t,null!=A&&(i.callback=A),null!==(t=_i(e,i,r))&&(Ac(t,e,r,n),Yi(t,e,r))},enqueueReplaceState:function(e,t,A){e=e._reactInternals;var n=ec(),r=tc(e),i=Hi(n,r);i.tag=1,i.payload=t,null!=A&&(i.callback=A),null!==(t=_i(e,i,r))&&(Ac(t,e,r,n),Yi(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var A=ec(),n=tc(e),r=Hi(A,n);r.tag=2,null!=t&&(r.callback=t),null!==(t=_i(e,r,n))&&(Ac(t,e,n,A),Yi(t,e,n))}};function ia(e,t,A,n,r,i,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,i,o):!(t.prototype&&t.prototype.isPureReactComponent&&sn(A,n)&&sn(r,i))}function oa(e,t,A){var n=!1,r=Dr,i=t.contextType;return"object"==typeof i&&null!==i?i=xi(i):(r=Nr(t)?xr:Sr.current,i=(n=null!=(n=t.contextTypes))?Ur(e,r):Dr),t=new t(A,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ra,e.stateNode=t,t._reactInternals=e,n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=i),t}function aa(e,t,A,n){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(A,n),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(A,n),t.state!==e&&ra.enqueueReplaceState(t,t.state,null)}function sa(e,t,A,n){var r=e.stateNode;r.props=A,r.state=e.memoizedState,r.refs={},ki(e);var i=t.contextType;"object"==typeof i&&null!==i?r.context=xi(i):(i=Nr(t)?xr:Sr.current,r.context=Ur(e,i)),r.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(na(e,t,i,A),r.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(t=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),t!==r.state&&ra.enqueueReplaceState(r,r.state,null),Vi(e,A,r,n),r.state=e.memoizedState),"function"==typeof r.componentDidMount&&(e.flags|=4194308)}function ca(e,t){try{var A="",n=t;do{A+=T(n),n=n.return}while(n);var r=A}catch(e){r="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:r,digest:null}}function la(e,t,A){return{value:e,source:null,stack:null!=A?A:null,digest:null!=t?t:null}}function ua(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var ga="function"==typeof WeakMap?WeakMap:Map;function da(e,t,A){(A=Hi(-1,A)).tag=3,A.payload={element:null};var n=t.value;return A.callback=function(){Os||(Os=!0,Ks=n),ua(0,t)},A}function Ba(e,t,A){(A=Hi(-1,A)).tag=3;var n=e.type.getDerivedStateFromError;if("function"==typeof n){var r=t.value;A.payload=function(){return n(r)},A.callback=function(){ua(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(A.callback=function(){ua(0,t),"function"!=typeof n&&(null===Js?Js=new Set([this]):Js.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),A}function ha(e,t,A){var n=e.pingCache;if(null===n){n=e.pingCache=new ga;var r=new Set;n.set(t,r)}else void 0===(r=n.get(t))&&(r=new Set,n.set(t,r));r.has(A)||(r.add(A),e=bc.bind(null,e,t,A),t.then(e,e))}function Ia(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Qa(e,t,A,n,r){return 1&e.mode?(e.flags|=65536,e.lanes=r,e):(e===t?e.flags|=65536:(e.flags|=128,A.flags|=131072,A.flags&=-52805,1===A.tag&&(null===A.alternate?A.tag=17:((t=Hi(-1,1)).tag=2,_i(A,t,1))),A.lanes|=1),e)}var pa=E.ReactCurrentOwner,fa=!1;function Ea(e,t,A,n){t.child=null===e?mi(t,null,A,n):Ei(t,e.child,A,n)}function ma(e,t,A,n,r){A=A.render;var i=t.ref;return Fi(t,r),n=Io(e,t,A,n,i,r),A=Qo(),null===e||fa?(ri&&A&&ei(t),t.flags|=1,Ea(e,t,n,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Oa(e,t,r))}function Ca(e,t,A,n,r){if(null===e){var i=A.type;return"function"!=typeof i||Nc(i)||void 0!==i.defaultProps||null!==A.compare||void 0!==A.defaultProps?((e=Mc(A.type,null,n,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,ya(e,t,i,n,r))}if(i=e.child,0===(e.lanes&r)){var o=i.memoizedProps;if((A=null!==(A=A.compare)?A:sn)(o,n)&&e.ref===t.ref)return Oa(e,t,r)}return t.flags|=1,(e=Rc(i,n)).ref=t.ref,e.return=t,t.child=e}function ya(e,t,A,n,r){if(null!==e){var i=e.memoizedProps;if(sn(i,n)&&e.ref===t.ref){if(fa=!1,t.pendingProps=n=i,0===(e.lanes&r))return t.lanes=e.lanes,Oa(e,t,r);131072&e.flags&&(fa=!0)}}return wa(e,t,A,n,r)}function va(e,t,A){var n=t.pendingProps,r=n.children,i=null!==e?e.memoizedState:null;if("hidden"===n.mode)if(1&t.mode){if(!(1073741824&A))return e=null!==i?i.baseLanes|A:A,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,wr(Rs,Ns),Ns|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=null!==i?i.baseLanes:A,wr(Rs,Ns),Ns|=n}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},wr(Rs,Ns),Ns|=A;else null!==i?(n=i.baseLanes|A,t.memoizedState=null):n=A,wr(Rs,Ns),Ns|=n;return Ea(e,t,r,A),t.child}function ba(e,t){var A=t.ref;(null===e&&null!==A||null!==e&&e.ref!==A)&&(t.flags|=512,t.flags|=2097152)}function wa(e,t,A,n,r){var i=Nr(A)?xr:Sr.current;return i=Ur(t,i),Fi(t,r),A=Io(e,t,A,n,i,r),n=Qo(),null===e||fa?(ri&&n&&ei(t),t.flags|=1,Ea(e,t,A,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Oa(e,t,r))}function Da(e,t,A,n,r){if(Nr(A)){var i=!0;kr(t)}else i=!1;if(Fi(t,r),null===t.stateNode)Pa(e,t),oa(t,A,n),sa(t,A,n,r),n=!0;else if(null===e){var o=t.stateNode,a=t.memoizedProps;o.props=a;var s=o.context,c=A.contextType;c="object"==typeof c&&null!==c?xi(c):Ur(t,c=Nr(A)?xr:Sr.current);var l=A.getDerivedStateFromProps,u="function"==typeof l||"function"==typeof o.getSnapshotBeforeUpdate;u||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==n||s!==c)&&aa(t,o,n,c),Li=!1;var g=t.memoizedState;o.state=g,Vi(t,n,o,r),s=t.memoizedState,a!==n||g!==s||Fr.current||Li?("function"==typeof l&&(na(t,A,l,n),s=t.memoizedState),(a=Li||ia(t,A,a,n,g,s,c))?(u||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=s),o.props=n,o.state=s,o.context=c,n=a):("function"==typeof o.componentDidMount&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Gi(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Aa(t.type,a),o.props=c,u=t.pendingProps,g=o.context,s="object"==typeof(s=A.contextType)&&null!==s?xi(s):Ur(t,s=Nr(A)?xr:Sr.current);var d=A.getDerivedStateFromProps;(l="function"==typeof d||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==u||g!==s)&&aa(t,o,n,s),Li=!1,g=t.memoizedState,o.state=g,Vi(t,n,o,r);var B=t.memoizedState;a!==u||g!==B||Fr.current||Li?("function"==typeof d&&(na(t,A,d,n),B=t.memoizedState),(c=Li||ia(t,A,c,n,g,B,s)||!1)?(l||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(n,B,s),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(n,B,s)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=B),o.props=n,o.state=B,o.context=s,n=c):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),n=!1)}return Sa(e,t,A,n,i,r)}function Sa(e,t,A,n,r,i){ba(e,t);var o=!!(128&t.flags);if(!n&&!o)return r&&Gr(t,A,!1),Oa(e,t,i);n=t.stateNode,pa.current=t;var a=o&&"function"!=typeof A.getDerivedStateFromError?null:n.render();return t.flags|=1,null!==e&&o?(t.child=Ei(t,e.child,null,i),t.child=Ei(t,null,a,i)):Ea(e,t,a,i),t.memoizedState=n.state,r&&Gr(t,A,!0),t.child}function Fa(e){var t=e.stateNode;t.pendingContext?Mr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Mr(0,t.context,!1),qi(e,t.containerInfo)}function xa(e,t,A,n,r){return di(),Bi(r),t.flags|=256,Ea(e,t,A,n),t.child}var Ua,Na,Ra,Ma,La={dehydrated:null,treeContext:null,retryLane:0};function ka(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ga(e,t,A){var n,r=t.pendingProps,o=$i.current,a=!1,s=!!(128&t.flags);if((n=s)||(n=(null===e||null!==e.memoizedState)&&!!(2&o)),n?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),wr($i,1&o),null===e)return ci(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,a?(r=t.mode,a=t.child,s={mode:"hidden",children:s},1&r||null===a?a=kc(s,r,0,null):(a.childLanes=0,a.pendingProps=s),e=Lc(e,r,A,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ka(A),t.memoizedState=La,e):Ha(t,s));if(null!==(o=e.memoizedState)&&null!==(n=o.dehydrated))return function(e,t,A,n,r,o,a){if(A)return 256&t.flags?(t.flags&=-257,_a(e,t,a,n=la(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=n.fallback,r=t.mode,n=kc({mode:"visible",children:n.children},r,0,null),(o=Lc(o,r,a,null)).flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,1&t.mode&&Ei(t,e.child,null,a),t.child.memoizedState=ka(a),t.memoizedState=La,o);if(!(1&t.mode))return _a(e,t,a,null);if("$!"===r.data){if(n=r.nextSibling&&r.nextSibling.dataset)var s=n.dgst;return n=s,_a(e,t,a,n=la(o=Error(i(419)),n,void 0))}if(s=0!==(a&e.childLanes),fa||s){if(null!==(n=Fs)){switch(a&-a){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}0!==(r=0!==(r&(n.suspendedLanes|a))?0:r)&&r!==o.retryLane&&(o.retryLane=r,Mi(e,r),Ac(n,e,r,-1))}return hc(),_a(e,t,a,n=la(Error(i(421))))}return"$?"===r.data?(t.flags|=128,t.child=e.child,t=Dc.bind(null,e),r._reactRetry=t,null):(e=o.treeContext,ni=cr(r.nextSibling),Ai=t,ri=!0,ii=null,null!==e&&(jr[zr++]=Zr,jr[zr++]=Wr,jr[zr++]=qr,Zr=e.id,Wr=e.overflow,qr=t),(t=Ha(t,n.children)).flags|=4096,t)}(e,t,s,r,n,o,A);if(a){a=r.fallback,s=t.mode,n=(o=e.child).sibling;var c={mode:"hidden",children:r.children};return 1&s||t.child===o?(r=Rc(o,c)).subtreeFlags=14680064&o.subtreeFlags:((r=t.child).childLanes=0,r.pendingProps=c,t.deletions=null),null!==n?a=Rc(n,a):(a=Lc(a,s,A,null)).flags|=2,a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,s=null===(s=e.child.memoizedState)?ka(A):{baseLanes:s.baseLanes|A,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~A,t.memoizedState=La,r}return e=(a=e.child).sibling,r=Rc(a,{mode:"visible",children:r.children}),!(1&t.mode)&&(r.lanes=A),r.return=t,r.sibling=null,null!==e&&(null===(A=t.deletions)?(t.deletions=[e],t.flags|=16):A.push(e)),t.child=r,t.memoizedState=null,r}function Ha(e,t){return(t=kc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function _a(e,t,A,n){return null!==n&&Bi(n),Ei(t,e.child,null,A),(e=Ha(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ya(e,t,A){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Si(e.return,t,A)}function Ta(e,t,A,n,r){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:A,tailMode:r}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=A,i.tailMode=r)}function Va(e,t,A){var n=t.pendingProps,r=n.revealOrder,i=n.tail;if(Ea(e,t,n.children,A),2&(n=$i.current))n=1&n|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ya(e,A,t);else if(19===e.tag)Ya(e,A,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(wr($i,n),1&t.mode)switch(r){case"forwards":for(A=t.child,r=null;null!==A;)null!==(e=A.alternate)&&null===eo(e)&&(r=A),A=A.sibling;null===(A=r)?(r=t.child,t.child=null):(r=A.sibling,A.sibling=null),Ta(t,!1,r,A,i);break;case"backwards":for(A=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===eo(e)){t.child=r;break}e=r.sibling,r.sibling=A,A=r,r=e}Ta(t,!0,A,null,i);break;case"together":Ta(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Pa(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Oa(e,t,A){if(null!==e&&(t.dependencies=e.dependencies),ks|=t.lanes,0===(A&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(A=Rc(e=t.child,e.pendingProps),t.child=A,A.return=t;null!==e.sibling;)e=e.sibling,(A=A.sibling=Rc(e,e.pendingProps)).return=t;A.sibling=null}return t.child}function Ka(e,t){if(!ri)switch(e.tailMode){case"hidden":t=e.tail;for(var A=null;null!==t;)null!==t.alternate&&(A=t),t=t.sibling;null===A?e.tail=null:A.sibling=null;break;case"collapsed":A=e.tail;for(var n=null;null!==A;)null!==A.alternate&&(n=A),A=A.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ja(e){var t=null!==e.alternate&&e.alternate.child===e.child,A=0,n=0;if(t)for(var r=e.child;null!==r;)A|=r.lanes|r.childLanes,n|=14680064&r.subtreeFlags,n|=14680064&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)A|=r.lanes|r.childLanes,n|=r.subtreeFlags,n|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=n,e.childLanes=A,t}function ja(e,t,A){var n=t.pendingProps;switch(ti(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ja(t),null;case 1:case 17:return Nr(t.type)&&Rr(),Ja(t),null;case 3:return n=t.stateNode,Zi(),br(Fr),br(Sr),Ao(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(ui(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ii&&(oc(ii),ii=null))),Na(e,t),Ja(t),null;case 5:Xi(t);var r=zi(ji.current);if(A=t.type,null!==e&&null!=t.stateNode)Ra(e,t,A,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(null===t.stateNode)throw Error(i(166));return Ja(t),null}if(e=zi(Ki.current),ui(t)){n=t.stateNode,A=t.type;var o=t.memoizedProps;switch(n[gr]=t,n[dr]=o,e=!!(1&t.mode),A){case"dialog":_n("cancel",n),_n("close",n);break;case"iframe":case"object":case"embed":_n("load",n);break;case"video":case"audio":for(r=0;r<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof n.is?e=s.createElement(A,{is:n.is}):(e=s.createElement(A),"select"===A&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,A),e[gr]=t,e[dr]=n,Ua(e,t,!1,!1),t.stateNode=e;e:{switch(s=fe(A,n),A){case"dialog":_n("cancel",e),_n("close",e),r=n;break;case"iframe":case"object":case"embed":_n("load",e),r=n;break;case"video":case"audio":for(r=0;rVs&&(t.flags|=128,n=!0,Ka(o,!1),t.lanes=4194304)}else{if(!n)if(null!==(e=eo(s))){if(t.flags|=128,n=!0,null!==(A=e.updateQueue)&&(t.updateQueue=A,t.flags|=4),Ka(o,!0),null===o.tail&&"hidden"===o.tailMode&&!s.alternate&&!ri)return Ja(t),null}else 2*We()-o.renderingStartTime>Vs&&1073741824!==A&&(t.flags|=128,n=!0,Ka(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(null!==(A=o.last)?A.sibling=s:t.child=s,o.last=s)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=We(),t.sibling=null,A=$i.current,wr($i,n?1&A|2:1&A),t):(Ja(t),null);case 22:case 23:return uc(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&1&t.mode?!!(1073741824&Ns)&&(Ja(t),6&t.subtreeFlags&&(t.flags|=8192)):Ja(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function za(e,t){switch(ti(t),t.tag){case 1:return Nr(t.type)&&Rr(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Zi(),br(Fr),br(Sr),Ao(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Xi(t),null;case 13:if(br($i),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));di()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return br($i),null;case 4:return Zi(),null;case 10:return Di(t.type._context),null;case 22:case 23:return uc(),null;default:return null}}Ua=function(e,t){for(var A=t.child;null!==A;){if(5===A.tag||6===A.tag)e.appendChild(A.stateNode);else if(4!==A.tag&&null!==A.child){A.child.return=A,A=A.child;continue}if(A===t)break;for(;null===A.sibling;){if(null===A.return||A.return===t)return;A=A.return}A.sibling.return=A.return,A=A.sibling}},Na=function(){},Ra=function(e,t,A,n){var r=e.memoizedProps;if(r!==n){e=t.stateNode,zi(Ki.current);var i,o=null;switch(A){case"input":r=q(e,r),n=q(e,n),o=[];break;case"select":r=G({},r,{value:void 0}),n=G({},n,{value:void 0}),o=[];break;case"textarea":r=ne(e,r),n=ne(e,n),o=[];break;default:"function"!=typeof r.onClick&&"function"==typeof n.onClick&&(e.onclick=$n)}for(l in pe(A,n),A=null,r)if(!n.hasOwnProperty(l)&&r.hasOwnProperty(l)&&null!=r[l])if("style"===l){var s=r[l];for(i in s)s.hasOwnProperty(i)&&(A||(A={}),A[i]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(a.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in n){var c=n[l];if(s=null!=r?r[l]:void 0,n.hasOwnProperty(l)&&c!==s&&(null!=c||null!=s))if("style"===l)if(s){for(i in s)!s.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(A||(A={}),A[i]="");for(i in c)c.hasOwnProperty(i)&&s[i]!==c[i]&&(A||(A={}),A[i]=c[i])}else A||(o||(o=[]),o.push(l,A)),A=c;else"dangerouslySetInnerHTML"===l?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(o=o||[]).push(l,c)):"children"===l?"string"!=typeof c&&"number"!=typeof c||(o=o||[]).push(l,""+c):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(a.hasOwnProperty(l)?(null!=c&&"onScroll"===l&&_n("scroll",e),o||s===c||(o=[])):(o=o||[]).push(l,c))}A&&(o=o||[]).push("style",A);var l=o;(t.updateQueue=l)&&(t.flags|=4)}},Ma=function(e,t,A,n){A!==n&&(t.flags|=4)};var qa=!1,Za=!1,Wa="function"==typeof WeakSet?WeakSet:Set,Xa=null;function $a(e,t){var A=e.ref;if(null!==A)if("function"==typeof A)try{A(null)}catch(A){vc(e,t,A)}else A.current=null}function es(e,t,A){try{A()}catch(A){vc(e,t,A)}}var ts=!1;function As(e,t,A){var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{if((r.tag&e)===e){var i=r.destroy;r.destroy=void 0,void 0!==i&&es(t,A,i)}r=r.next}while(r!==n)}}function ns(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var A=t=t.next;do{if((A.tag&e)===e){var n=A.create;A.destroy=n()}A=A.next}while(A!==t)}}function rs(e){var t=e.ref;if(null!==t){var A=e.stateNode;e.tag,e=A,"function"==typeof t?t(e):t.current=e}}function is(e){var t=e.alternate;null!==t&&(e.alternate=null,is(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[gr],delete t[dr],delete t[hr],delete t[Ir],delete t[Qr]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function os(e){return 5===e.tag||3===e.tag||4===e.tag}function as(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||os(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ss(e,t,A){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?8===A.nodeType?A.parentNode.insertBefore(e,t):A.insertBefore(e,t):(8===A.nodeType?(t=A.parentNode).insertBefore(e,A):(t=A).appendChild(e),null!=(A=A._reactRootContainer)||null!==t.onclick||(t.onclick=$n));else if(4!==n&&null!==(e=e.child))for(ss(e,t,A),e=e.sibling;null!==e;)ss(e,t,A),e=e.sibling}function cs(e,t,A){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?A.insertBefore(e,t):A.appendChild(e);else if(4!==n&&null!==(e=e.child))for(cs(e,t,A),e=e.sibling;null!==e;)cs(e,t,A),e=e.sibling}var ls=null,us=!1;function gs(e,t,A){for(A=A.child;null!==A;)ds(e,t,A),A=A.sibling}function ds(e,t,A){if(it&&"function"==typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(rt,A)}catch(e){}switch(A.tag){case 5:Za||$a(A,t);case 6:var n=ls,r=us;ls=null,gs(e,t,A),us=r,null!==(ls=n)&&(us?(e=ls,A=A.stateNode,8===e.nodeType?e.parentNode.removeChild(A):e.removeChild(A)):ls.removeChild(A.stateNode));break;case 18:null!==ls&&(us?(e=ls,A=A.stateNode,8===e.nodeType?sr(e.parentNode,A):1===e.nodeType&&sr(e,A),Vt(e)):sr(ls,A.stateNode));break;case 4:n=ls,r=us,ls=A.stateNode.containerInfo,us=!0,gs(e,t,A),ls=n,us=r;break;case 0:case 11:case 14:case 15:if(!Za&&null!==(n=A.updateQueue)&&null!==(n=n.lastEffect)){r=n=n.next;do{var i=r,o=i.destroy;i=i.tag,void 0!==o&&(2&i||4&i)&&es(A,t,o),r=r.next}while(r!==n)}gs(e,t,A);break;case 1:if(!Za&&($a(A,t),"function"==typeof(n=A.stateNode).componentWillUnmount))try{n.props=A.memoizedProps,n.state=A.memoizedState,n.componentWillUnmount()}catch(e){vc(A,t,e)}gs(e,t,A);break;case 21:gs(e,t,A);break;case 22:1&A.mode?(Za=(n=Za)||null!==A.memoizedState,gs(e,t,A),Za=n):gs(e,t,A);break;default:gs(e,t,A)}}function Bs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var A=e.stateNode;null===A&&(A=e.stateNode=new Wa),t.forEach((function(t){var n=Sc.bind(null,e,t);A.has(t)||(A.add(t),t.then(n,n))}))}}function hs(e,t){var A=t.deletions;if(null!==A)for(var n=0;nr&&(r=a),n&=~o}if(n=r,10<(n=(120>(n=We()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*vs(n/1960))-n)){e.timeoutHandle=nr(mc.bind(null,e,Ys,Ps),n);break}mc(e,Ys,Ps);break;default:throw Error(i(329))}}}return nc(e,We()),e.callbackNode===A?rc.bind(null,e):null}function ic(e,t){var A=_s;return e.current.memoizedState.isDehydrated&&(gc(e,t).flags|=256),2!==(e=Ic(e,t))&&(t=Ys,Ys=A,null!==t&&oc(t)),e}function oc(e){null===Ys?Ys=e:Ys.push.apply(Ys,e)}function ac(e,t){for(t&=~Hs,t&=~Gs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0e?16:e,null===zs)var n=!1;else{if(e=zs,zs=null,qs=0,6&Ss)throw Error(i(331));var r=Ss;for(Ss|=4,Xa=e.current;null!==Xa;){var o=Xa,a=o.child;if(16&Xa.flags){var s=o.deletions;if(null!==s){for(var c=0;cWe()-Ts?gc(e,0):Hs|=A),nc(e,t)}function wc(e,t){0===t&&(1&e.mode?(t=lt,!(130023424&(lt<<=1))&&(lt=4194304)):t=1);var A=ec();null!==(e=Mi(e,t))&&(Qt(e,t,A),nc(e,A))}function Dc(e){var t=e.memoizedState,A=0;null!==t&&(A=t.retryLane),wc(e,A)}function Sc(e,t){var A=0;switch(e.tag){case 13:var n=e.stateNode,r=e.memoizedState;null!==r&&(A=r.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(i(314))}null!==n&&n.delete(t),wc(e,A)}function Fc(e,t){return je(e,t)}function xc(e,t,A,n){this.tag=e,this.key=A,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Uc(e,t,A,n){return new xc(e,t,A,n)}function Nc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Rc(e,t){var A=e.alternate;return null===A?((A=Uc(e.tag,t,e.key,e.mode)).elementType=e.elementType,A.type=e.type,A.stateNode=e.stateNode,A.alternate=e,e.alternate=A):(A.pendingProps=t,A.type=e.type,A.flags=0,A.subtreeFlags=0,A.deletions=null),A.flags=14680064&e.flags,A.childLanes=e.childLanes,A.lanes=e.lanes,A.child=e.child,A.memoizedProps=e.memoizedProps,A.memoizedState=e.memoizedState,A.updateQueue=e.updateQueue,t=e.dependencies,A.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},A.sibling=e.sibling,A.index=e.index,A.ref=e.ref,A}function Mc(e,t,A,n,r,o){var a=2;if(n=e,"function"==typeof e)Nc(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case y:return Lc(A.children,r,o,t);case v:a=8,r|=8;break;case b:return(e=Uc(12,A,t,2|r)).elementType=b,e.lanes=o,e;case F:return(e=Uc(13,A,t,r)).elementType=F,e.lanes=o,e;case x:return(e=Uc(19,A,t,r)).elementType=x,e.lanes=o,e;case R:return kc(A,r,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:a=10;break e;case D:a=9;break e;case S:a=11;break e;case U:a=14;break e;case N:a=16,n=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Uc(a,A,t,r)).elementType=e,t.type=n,t.lanes=o,t}function Lc(e,t,A,n){return(e=Uc(7,e,n,t)).lanes=A,e}function kc(e,t,A,n){return(e=Uc(22,e,n,t)).elementType=R,e.lanes=A,e.stateNode={isHidden:!1},e}function Gc(e,t,A){return(e=Uc(6,e,null,t)).lanes=A,e}function Hc(e,t,A){return(t=Uc(4,null!==e.children?e.children:[],e.key,t)).lanes=A,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _c(e,t,A,n,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=It(0),this.expirationTimes=It(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=It(0),this.identifierPrefix=n,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Yc(e,t,A,n,r,i,o,a,s){return e=new _c(e,t,A,a,s),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Uc(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:A,cache:null,transitions:null,pendingSuspenseBoundaries:null},ki(i),e}function Tc(e){if(!e)return Dr;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Nr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var A=e.type;if(Nr(A))return Lr(e,A,t)}return t}function Vc(e,t,A,n,r,i,o,a,s){return(e=Yc(A,n,!0,e,0,i,0,a,s)).context=Tc(null),A=e.current,(i=Hi(n=ec(),r=tc(A))).callback=null!=t?t:null,_i(A,i,r),e.current.lanes=r,Qt(e,r,n),nc(e,n),e}function Pc(e,t,A,n){var r=t.current,i=ec(),o=tc(r);return A=Tc(A),null===t.context?t.context=A:t.pendingContext=A,(t=Hi(i,o)).payload={element:e},null!==(n=void 0===n?null:n)&&(t.callback=n),null!==(e=_i(r,t,o))&&(Ac(e,r,o,i),Yi(e,r,o)),o}function Oc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Kc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var A=e.retryLane;e.retryLane=0!==A&&A{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},2668:()=>{},2723:(e,t,A)=>{"use strict";var n=A(7952),r=A(4367),i=A(3349);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=r.toArray(e.entropy,e.entropyEnc||"hex"),A=r.toArray(e.nonce,e.nonceEnc||"hex"),n=r.toArray(e.pers,e.persEnc||"hex");i(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,A,n)}e.exports=o,o.prototype._init=function(e,t,A){var n=e.concat(t).concat(A);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(A||[])),this._reseed=1},o.prototype.generate=function(e,t,A,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=A,A=t,t=null),A&&(A=r.toArray(A,n||"hex"),this._update(A));for(var i=[];i.length{"use strict";function n(e,t){var A=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),A.push.apply(A,n)}return A}function r(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,A=""+t.data;t=t.next;)A+=e+t.data;return A}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,A,n,r=s.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=i.data,A=r,n=o,s.prototype.copy.call(t,A,n),o+=i.data.length,i=i.next;return r}},{key:"consume",value:function(e,t){var A;return er.length?r.length:e;if(i===r.length?n+=r:n+=r.slice(0,e),0===(e-=i)){i===r.length?(++A,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=r.slice(i));break}++A}return this.length-=A,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),A=this.head,n=1;for(A.data.copy(t),e-=A.data.length;A=A.next;){var r=A.data,i=e>r.length?r.length:e;if(r.copy(t,t.length-e,0,i),0===(e-=i)){i===r.length?(++n,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=r.slice(i));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return c(this,r(r({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,A),Object.defineProperty(t,"prototype",{writable:!1}),e}()},2801:function(e,t,A){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var A=function(){};A.prototype=t.prototype,e.prototype=new A,e.prototype.constructor=e}function i(e,t,A){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(A=t,t=10),this._init(e||0,t||10,A||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:A(7965).Buffer}catch(e){}function a(e,t){var A=e.charCodeAt(t);return A>=65&&A<=70?A-55:A>=97&&A<=102?A-87:A-48&15}function s(e,t,A){var n=a(e,A);return A-1>=t&&(n|=a(e,A-1)<<4),n}function c(e,t,A,n){for(var r=0,i=Math.min(e.length,A),o=t;o=49?a-49+10:a>=17?a-17+10:a}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,A){if("number"==typeof e)return this._initNumber(e,t,A);if("object"==typeof e)return this._initArray(e,t,A);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===A)for(r=0,i=0;r>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,A){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,A){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-A,o=i%n,a=Math.min(i,i-o)+A,s=0,l=A;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};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"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[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(e,t,A){A.negative=t.negative^e.negative;var n=e.length+t.length|0;A.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,a=67108863&o,s=o/67108864|0;A.words[0]=a;for(var c=1;c>>26,u=67108863&s,g=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=g;d++){var B=c-d|0;l+=(o=(r=0|e.words[B])*(i=0|t.words[d])+u)/67108864|0,u=67108863&o}A.words[c]=0|u,s=0|l}return 0!==s?A.words[c]=0|s:A.length--,A.strip()}i.prototype.toString=function(e,t){var A;if(t=0|t||1,16===(e=e||10)||"hex"===e){A="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?l[6-s.length]+s+A:s+A,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(A=i.toString(16)+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}if(e===(0|e)&&e>=2&&e<=36){var c=u[e],d=g[e];A="";var B=this.clone();for(B.negative=0;!B.isZero();){var h=B.modn(d).toString(e);A=(B=B.idivn(d)).isZero()?h+A:l[c-h.length]+h+A}for(this.isZero()&&(A="0"+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,A){var r=this.byteLength(),i=A||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===t,c=new e(i),l=this.clone();if(s){for(a=0;!l.isZero();a++)o=l.andln(255),l.iushrn(8),c[a]=o;for(;a=4096&&(A+=13,t>>>=13),t>=64&&(A+=7,t>>>=7),t>=8&&(A+=4,t>>>=4),t>=2&&(A+=2,t>>>=2),A+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,A=0;return 8191&t||(A+=13,t>>>=13),127&t||(A+=7,t>>>=7),15&t||(A+=4,t>>>=4),3&t||(A+=2,t>>>=2),1&t||A++,A},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var A=0;Ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,A;this.length>e.length?(t=this,A=e):(t=e,A=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),A=e%26;this._expand(t),A>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-A),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var A=e/26|0,r=e%26;return this._expand(A+1),this.words[A]=t?this.words[A]|1<e.length?(A=this,n=e):(A=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=A.length,0!==r)this.words[this.length]=r,this.length++;else if(A!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var A,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(A=this,n=e):(A=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,d=0|o[1],B=8191&d,h=d>>>13,I=0|o[2],Q=8191&I,p=I>>>13,f=0|o[3],E=8191&f,m=f>>>13,C=0|o[4],y=8191&C,v=C>>>13,b=0|o[5],w=8191&b,D=b>>>13,S=0|o[6],F=8191&S,x=S>>>13,U=0|o[7],N=8191&U,R=U>>>13,M=0|o[8],L=8191&M,k=M>>>13,G=0|o[9],H=8191&G,_=G>>>13,Y=0|a[0],T=8191&Y,V=Y>>>13,P=0|a[1],O=8191&P,K=P>>>13,J=0|a[2],j=8191&J,z=J>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],Ae=8191&te,ne=te>>>13,re=0|a[6],ie=8191&re,oe=re>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,le=0|a[8],ue=8191&le,ge=le>>>13,de=0|a[9],Be=8191&de,he=de>>>13;A.negative=e.negative^t.negative,A.length=19;var Ie=(c+(n=Math.imul(u,T))|0)+((8191&(r=(r=Math.imul(u,V))+Math.imul(g,T)|0))<<13)|0;c=((i=Math.imul(g,V))+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,T),r=(r=Math.imul(B,V))+Math.imul(h,T)|0,i=Math.imul(h,V);var Qe=(c+(n=n+Math.imul(u,O)|0)|0)+((8191&(r=(r=r+Math.imul(u,K)|0)+Math.imul(g,O)|0))<<13)|0;c=((i=i+Math.imul(g,K)|0)+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,n=Math.imul(Q,T),r=(r=Math.imul(Q,V))+Math.imul(p,T)|0,i=Math.imul(p,V),n=n+Math.imul(B,O)|0,r=(r=r+Math.imul(B,K)|0)+Math.imul(h,O)|0,i=i+Math.imul(h,K)|0;var pe=(c+(n=n+Math.imul(u,j)|0)|0)+((8191&(r=(r=r+Math.imul(u,z)|0)+Math.imul(g,j)|0))<<13)|0;c=((i=i+Math.imul(g,z)|0)+(r>>>13)|0)+(pe>>>26)|0,pe&=67108863,n=Math.imul(E,T),r=(r=Math.imul(E,V))+Math.imul(m,T)|0,i=Math.imul(m,V),n=n+Math.imul(Q,O)|0,r=(r=r+Math.imul(Q,K)|0)+Math.imul(p,O)|0,i=i+Math.imul(p,K)|0,n=n+Math.imul(B,j)|0,r=(r=r+Math.imul(B,z)|0)+Math.imul(h,j)|0,i=i+Math.imul(h,z)|0;var fe=(c+(n=n+Math.imul(u,Z)|0)|0)+((8191&(r=(r=r+Math.imul(u,W)|0)+Math.imul(g,Z)|0))<<13)|0;c=((i=i+Math.imul(g,W)|0)+(r>>>13)|0)+(fe>>>26)|0,fe&=67108863,n=Math.imul(y,T),r=(r=Math.imul(y,V))+Math.imul(v,T)|0,i=Math.imul(v,V),n=n+Math.imul(E,O)|0,r=(r=r+Math.imul(E,K)|0)+Math.imul(m,O)|0,i=i+Math.imul(m,K)|0,n=n+Math.imul(Q,j)|0,r=(r=r+Math.imul(Q,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,n=n+Math.imul(B,Z)|0,r=(r=r+Math.imul(B,W)|0)+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0;var Ee=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(r=(r=r+Math.imul(u,ee)|0)+Math.imul(g,$)|0))<<13)|0;c=((i=i+Math.imul(g,ee)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(w,T),r=(r=Math.imul(w,V))+Math.imul(D,T)|0,i=Math.imul(D,V),n=n+Math.imul(y,O)|0,r=(r=r+Math.imul(y,K)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,K)|0,n=n+Math.imul(E,j)|0,r=(r=r+Math.imul(E,z)|0)+Math.imul(m,j)|0,i=i+Math.imul(m,z)|0,n=n+Math.imul(Q,Z)|0,r=(r=r+Math.imul(Q,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(B,$)|0,r=(r=r+Math.imul(B,ee)|0)+Math.imul(h,$)|0,i=i+Math.imul(h,ee)|0;var me=(c+(n=n+Math.imul(u,Ae)|0)|0)+((8191&(r=(r=r+Math.imul(u,ne)|0)+Math.imul(g,Ae)|0))<<13)|0;c=((i=i+Math.imul(g,ne)|0)+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(F,T),r=(r=Math.imul(F,V))+Math.imul(x,T)|0,i=Math.imul(x,V),n=n+Math.imul(w,O)|0,r=(r=r+Math.imul(w,K)|0)+Math.imul(D,O)|0,i=i+Math.imul(D,K)|0,n=n+Math.imul(y,j)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,n=n+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,W)|0,n=n+Math.imul(Q,$)|0,r=(r=r+Math.imul(Q,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(B,Ae)|0,r=(r=r+Math.imul(B,ne)|0)+Math.imul(h,Ae)|0,i=i+Math.imul(h,ne)|0;var Ce=(c+(n=n+Math.imul(u,ie)|0)|0)+((8191&(r=(r=r+Math.imul(u,oe)|0)+Math.imul(g,ie)|0))<<13)|0;c=((i=i+Math.imul(g,oe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,T),r=(r=Math.imul(N,V))+Math.imul(R,T)|0,i=Math.imul(R,V),n=n+Math.imul(F,O)|0,r=(r=r+Math.imul(F,K)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,K)|0,n=n+Math.imul(w,j)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(D,j)|0,i=i+Math.imul(D,z)|0,n=n+Math.imul(y,Z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(E,$)|0,r=(r=r+Math.imul(E,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0,n=n+Math.imul(Q,Ae)|0,r=(r=r+Math.imul(Q,ne)|0)+Math.imul(p,Ae)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(B,ie)|0,r=(r=r+Math.imul(B,oe)|0)+Math.imul(h,ie)|0,i=i+Math.imul(h,oe)|0;var ye=(c+(n=n+Math.imul(u,se)|0)|0)+((8191&(r=(r=r+Math.imul(u,ce)|0)+Math.imul(g,se)|0))<<13)|0;c=((i=i+Math.imul(g,ce)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(L,T),r=(r=Math.imul(L,V))+Math.imul(k,T)|0,i=Math.imul(k,V),n=n+Math.imul(N,O)|0,r=(r=r+Math.imul(N,K)|0)+Math.imul(R,O)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(F,j)|0,r=(r=r+Math.imul(F,z)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,z)|0,n=n+Math.imul(w,Z)|0,r=(r=r+Math.imul(w,W)|0)+Math.imul(D,Z)|0,i=i+Math.imul(D,W)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(E,Ae)|0,r=(r=r+Math.imul(E,ne)|0)+Math.imul(m,Ae)|0,i=i+Math.imul(m,ne)|0,n=n+Math.imul(Q,ie)|0,r=(r=r+Math.imul(Q,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0,n=n+Math.imul(B,se)|0,r=(r=r+Math.imul(B,ce)|0)+Math.imul(h,se)|0,i=i+Math.imul(h,ce)|0;var ve=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(r=(r=r+Math.imul(u,ge)|0)+Math.imul(g,ue)|0))<<13)|0;c=((i=i+Math.imul(g,ge)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(H,T),r=(r=Math.imul(H,V))+Math.imul(_,T)|0,i=Math.imul(_,V),n=n+Math.imul(L,O)|0,r=(r=r+Math.imul(L,K)|0)+Math.imul(k,O)|0,i=i+Math.imul(k,K)|0,n=n+Math.imul(N,j)|0,r=(r=r+Math.imul(N,z)|0)+Math.imul(R,j)|0,i=i+Math.imul(R,z)|0,n=n+Math.imul(F,Z)|0,r=(r=r+Math.imul(F,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,n=n+Math.imul(w,$)|0,r=(r=r+Math.imul(w,ee)|0)+Math.imul(D,$)|0,i=i+Math.imul(D,ee)|0,n=n+Math.imul(y,Ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(v,Ae)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(E,ie)|0,r=(r=r+Math.imul(E,oe)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,oe)|0,n=n+Math.imul(Q,se)|0,r=(r=r+Math.imul(Q,ce)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(B,ue)|0,r=(r=r+Math.imul(B,ge)|0)+Math.imul(h,ue)|0,i=i+Math.imul(h,ge)|0;var be=(c+(n=n+Math.imul(u,Be)|0)|0)+((8191&(r=(r=r+Math.imul(u,he)|0)+Math.imul(g,Be)|0))<<13)|0;c=((i=i+Math.imul(g,he)|0)+(r>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(H,O),r=(r=Math.imul(H,K))+Math.imul(_,O)|0,i=Math.imul(_,K),n=n+Math.imul(L,j)|0,r=(r=r+Math.imul(L,z)|0)+Math.imul(k,j)|0,i=i+Math.imul(k,z)|0,n=n+Math.imul(N,Z)|0,r=(r=r+Math.imul(N,W)|0)+Math.imul(R,Z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(F,$)|0,r=(r=r+Math.imul(F,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,n=n+Math.imul(w,Ae)|0,r=(r=r+Math.imul(w,ne)|0)+Math.imul(D,Ae)|0,i=i+Math.imul(D,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(E,se)|0,r=(r=r+Math.imul(E,ce)|0)+Math.imul(m,se)|0,i=i+Math.imul(m,ce)|0,n=n+Math.imul(Q,ue)|0,r=(r=r+Math.imul(Q,ge)|0)+Math.imul(p,ue)|0,i=i+Math.imul(p,ge)|0;var we=(c+(n=n+Math.imul(B,Be)|0)|0)+((8191&(r=(r=r+Math.imul(B,he)|0)+Math.imul(h,Be)|0))<<13)|0;c=((i=i+Math.imul(h,he)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(H,j),r=(r=Math.imul(H,z))+Math.imul(_,j)|0,i=Math.imul(_,z),n=n+Math.imul(L,Z)|0,r=(r=r+Math.imul(L,W)|0)+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(N,$)|0,r=(r=r+Math.imul(N,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(F,Ae)|0,r=(r=r+Math.imul(F,ne)|0)+Math.imul(x,Ae)|0,i=i+Math.imul(x,ne)|0,n=n+Math.imul(w,ie)|0,r=(r=r+Math.imul(w,oe)|0)+Math.imul(D,ie)|0,i=i+Math.imul(D,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,ce)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(E,ue)|0,r=(r=r+Math.imul(E,ge)|0)+Math.imul(m,ue)|0,i=i+Math.imul(m,ge)|0;var De=(c+(n=n+Math.imul(Q,Be)|0)|0)+((8191&(r=(r=r+Math.imul(Q,he)|0)+Math.imul(p,Be)|0))<<13)|0;c=((i=i+Math.imul(p,he)|0)+(r>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(H,Z),r=(r=Math.imul(H,W))+Math.imul(_,Z)|0,i=Math.imul(_,W),n=n+Math.imul(L,$)|0,r=(r=r+Math.imul(L,ee)|0)+Math.imul(k,$)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(N,Ae)|0,r=(r=r+Math.imul(N,ne)|0)+Math.imul(R,Ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(F,ie)|0,r=(r=r+Math.imul(F,oe)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,oe)|0,n=n+Math.imul(w,se)|0,r=(r=r+Math.imul(w,ce)|0)+Math.imul(D,se)|0,i=i+Math.imul(D,ce)|0,n=n+Math.imul(y,ue)|0,r=(r=r+Math.imul(y,ge)|0)+Math.imul(v,ue)|0,i=i+Math.imul(v,ge)|0;var Se=(c+(n=n+Math.imul(E,Be)|0)|0)+((8191&(r=(r=r+Math.imul(E,he)|0)+Math.imul(m,Be)|0))<<13)|0;c=((i=i+Math.imul(m,he)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(H,$),r=(r=Math.imul(H,ee))+Math.imul(_,$)|0,i=Math.imul(_,ee),n=n+Math.imul(L,Ae)|0,r=(r=r+Math.imul(L,ne)|0)+Math.imul(k,Ae)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(N,ie)|0,r=(r=r+Math.imul(N,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(F,se)|0,r=(r=r+Math.imul(F,ce)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ce)|0,n=n+Math.imul(w,ue)|0,r=(r=r+Math.imul(w,ge)|0)+Math.imul(D,ue)|0,i=i+Math.imul(D,ge)|0;var Fe=(c+(n=n+Math.imul(y,Be)|0)|0)+((8191&(r=(r=r+Math.imul(y,he)|0)+Math.imul(v,Be)|0))<<13)|0;c=((i=i+Math.imul(v,he)|0)+(r>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(H,Ae),r=(r=Math.imul(H,ne))+Math.imul(_,Ae)|0,i=Math.imul(_,ne),n=n+Math.imul(L,ie)|0,r=(r=r+Math.imul(L,oe)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,oe)|0,n=n+Math.imul(N,se)|0,r=(r=r+Math.imul(N,ce)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,ce)|0,n=n+Math.imul(F,ue)|0,r=(r=r+Math.imul(F,ge)|0)+Math.imul(x,ue)|0,i=i+Math.imul(x,ge)|0;var xe=(c+(n=n+Math.imul(w,Be)|0)|0)+((8191&(r=(r=r+Math.imul(w,he)|0)+Math.imul(D,Be)|0))<<13)|0;c=((i=i+Math.imul(D,he)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(H,ie),r=(r=Math.imul(H,oe))+Math.imul(_,ie)|0,i=Math.imul(_,oe),n=n+Math.imul(L,se)|0,r=(r=r+Math.imul(L,ce)|0)+Math.imul(k,se)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(N,ue)|0,r=(r=r+Math.imul(N,ge)|0)+Math.imul(R,ue)|0,i=i+Math.imul(R,ge)|0;var Ue=(c+(n=n+Math.imul(F,Be)|0)|0)+((8191&(r=(r=r+Math.imul(F,he)|0)+Math.imul(x,Be)|0))<<13)|0;c=((i=i+Math.imul(x,he)|0)+(r>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(H,se),r=(r=Math.imul(H,ce))+Math.imul(_,se)|0,i=Math.imul(_,ce),n=n+Math.imul(L,ue)|0,r=(r=r+Math.imul(L,ge)|0)+Math.imul(k,ue)|0,i=i+Math.imul(k,ge)|0;var Ne=(c+(n=n+Math.imul(N,Be)|0)|0)+((8191&(r=(r=r+Math.imul(N,he)|0)+Math.imul(R,Be)|0))<<13)|0;c=((i=i+Math.imul(R,he)|0)+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(H,ue),r=(r=Math.imul(H,ge))+Math.imul(_,ue)|0,i=Math.imul(_,ge);var Re=(c+(n=n+Math.imul(L,Be)|0)|0)+((8191&(r=(r=r+Math.imul(L,he)|0)+Math.imul(k,Be)|0))<<13)|0;c=((i=i+Math.imul(k,he)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Me=(c+(n=Math.imul(H,Be))|0)+((8191&(r=(r=Math.imul(H,he))+Math.imul(_,Be)|0))<<13)|0;return c=((i=Math.imul(_,he))+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=Ie,s[1]=Qe,s[2]=pe,s[3]=fe,s[4]=Ee,s[5]=me,s[6]=Ce,s[7]=ye,s[8]=ve,s[9]=be,s[10]=we,s[11]=De,s[12]=Se,s[13]=Fe,s[14]=xe,s[15]=Ue,s[16]=Ne,s[17]=Re,s[18]=Me,0!==c&&(s[19]=c,A.length++),A};function h(e,t,A){return(new I).mulp(e,t,A)}function I(e,t){this.x=e,this.y=t}Math.imul||(B=d),i.prototype.mulTo=function(e,t){var A,n=this.length+e.length;return A=10===this.length&&10===e.length?B(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,A){A.negative=t.negative^e.negative,A.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}A.words[i]=a,n=o,o=r}return 0!==n?A.words[i]=n:A.length--,A.strip()}(this,e,t):h(this,e,t),A},I.prototype.makeRBT=function(e){for(var t=new Array(e),A=i.prototype._countBits(e)-1,n=0;n>=1;return n},I.prototype.permute=function(e,t,A,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,A[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[A]=67108863&i}return 0!==t&&(this.words[A]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),A=0;A>>r}return t}(e);if(0===t.length)return new i(1);for(var A=this,n=0;n=0);var t,A=e%26,r=(e-A)/26,i=67108863>>>26-A<<26-A;if(0!==A){var o=0;for(t=0;t>>26-A}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,c=0;c=0&&(0!==l||c>=r);c--){var u=0|this.words[c];this.words[c]=l<<26-i|u>>>i,l=u&a}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,A){return n(0===this.negative),this.iushrn(e,t,A)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,A=(e-t)/26,r=1<=0);var t=e%26,A=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=A)return this;if(0!==t&&A++,this.length=Math.min(A,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+A]=67108863&i}for(;r>26,this.words[r+A]=67108863&i;if(0===a)return this.strip();for(n(-1===a),a=0,r=0;r