/*! For license information please see PGP.js.LICENSE.txt */ (()=>{var t={87568:(t,e,r)=>{var n=e;n.bignum=r(72344),n.define=r(47363).define,n.base=r(9673),n.constants=r(22153),n.decoders=r(22853),n.encoders=r(24669)},47363:(t,e,r)=>{var n=r(87568),i=r(56698);function o(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new o(t,e)},o.prototype._createNamed=function(t){var e;try{e=r(18950).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return i(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},o.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(n.decoders[t])),this.decoders[t]},o.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},o.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n.encoders[t])),this.encoders[t]},o.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},47227:(t,e,r)=>{var n=r(56698),i=r(9673).Reporter,o=r(48287).Buffer;function s(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function a(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return t instanceof a||(t=new a(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}n(s,i),e.t=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(t){var e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.d=a,a.prototype.join=function(t,e){return t||(t=new o(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},9673:(t,e,r)=>{var n=e;n.Reporter=r(89220).a,n.DecoderBuffer=r(47227).t,n.EncoderBuffer=r(47227).d,n.Node=r(90993)},90993:(t,e,r)=>{var n=r(9673).Reporter,i=r(9673).EncoderBuffer,o=r(9673).DecoderBuffer,s=r(43349),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"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function f(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=f;var h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){var t=this._baseState,e={};h.forEach((function(r){e[r]=t[r]}));var r=new this.constructor(e.parent);return r._baseState=e,r},f.prototype._wrap=function(){var t=this._baseState;u.forEach((function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},f.prototype._init=function(t){var e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),s.equal(e.children.length,1,"Root node can have only one child")},f.prototype._useArgs=function(t){var e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){f.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),a.forEach((function(t){f.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}})),f.prototype.use=function(t){s(t);var e=this._baseState;return s(null===e.use),e.use=t,this},f.prototype.optional=function(){return this._baseState.optional=!0,this},f.prototype.def=function(t){var e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},f.prototype.explicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},f.prototype.implicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},f.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},f.prototype.key=function(t){var e=this._baseState;return s(null===e.key),e.key=t,this},f.prototype.any=function(){return this._baseState.any=!0,this},f.prototype.choice=function(t){var e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},f.prototype.contains=function(t){var e=this._baseState;return s(null===e.use),e.contains=t,this},f.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var n,i=r.default,s=!0,a=null;if(null!==r.key&&(a=t.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(s=this._peekTag(t,u,r.any),t.isError(s))return s}else{var f=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(f)}}if(r.obj&&s&&(n=t.enterObject()),s){if(null!==r.explicit){var h=this._decodeTag(t,r.explicit);if(t.isError(h))return h;t=h}var c=t.offset;if(null===r.use&&null===r.choice){r.any&&(f=t.save());var l=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(l))return l;r.any?i=t.raw(f):t=l}if(e&&e.track&&null!==r.tag&&e.track(t.path(),c,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(p,e)}}return r.obj&&s&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==a&&t.exitKey(a):t.leaveKey(a,r.key,i),i},f.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},f.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},f.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var s=t.save(),a=r.choice[o];try{var u=a._decode(t,e);if(t.isError(u))return!1;n={type:o,value:u},i=!0}catch(e){return t.restore(s),!1}return!0}),this),i?n:t.error("Choice not matched")},f.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},f.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},f.prototype._encodeValue=function(t,e,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);var o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var s=null,a=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)s=this._getUse(i.contains,r)._encode(t,e),a=!0;else if(i.children)s=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var n=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i}),this).filter((function(t){return t})),s=this._createEncoderBuffer(s);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(t.map((function(r){var n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)}),u))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(s=this._encodePrimitive(i.tag,t),a=!0);if(!i.any&&null===i.choice){var f=null!==i.implicit?i.implicit:i.tag,h=null===i.implicit?"universal":"context";null===f?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(f,a,h,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},f.prototype._encodeChoice=function(t,e){var r=this._baseState,n=r.choice[t.type];return n||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},f.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},f.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},f.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},89220:(t,e,r)=>{var n=r(56698);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.a=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},74598:(t,e,r)=>{var n=r(22153);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=n._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=n._reverse(e.tag)},22153:(t,e,r)=>{var n=e;n._reverse=function(t){var e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r})),e},n.der=r(74598)},62010:(t,e,r)=>{var n=r(56698),i=r(87568),o=i.base,s=i.bignum,a=i.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new f,this.tree._init(t.body)}function f(t){o.Node.call(this,"der",t)}function h(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=a.tagClass[r>>6],i=!(32&r);if(31&~r)r&=31;else{var o=r;for(r=0;!(128&~o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function c(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(!(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o{var n=e;n.der=r(62010),n.pem=r(58903)},58903:(t,e,r)=>{var n=r(56698),i=r(48287).Buffer,o=r(62010);function s(t){o.call(this,t),this.enc="pem"}n(s,o),t.exports=s,s.prototype.decode=function(t,e){for(var r=t.toString().split(/[\r\n]+/g),n=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,u=-1,f=0;f{var n=r(56698),i=r(48287).Buffer,o=r(87568),s=o.base,a=o.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new f,this.tree._init(t.body)}function f(t){s.Node.call(this,"der",t)}function h(t){return t<10?"0"+t:t}t.exports=u,u.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(f,s.Node),f.prototype._encodeComposite=function(t,e,r,n){var o,s=function(t,e,r,n){var i;if("seqof"===t?t="seq":"setof"===t&&(t="set"),a.tagByName.hasOwnProperty(t))i=a.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);i=t}return i>=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=a.tagClassByName[r||"universal"]<<6)}(t,e,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=s,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var u=1,f=n.length;f>=256;f>>=8)u++;(o=new i(2+u))[0]=s,o[1]=128|u,f=1+u;for(var h=n.length;h>0;f--,h>>=8)o[f]=255&h;return this._createEncoderBuffer([o,n])},f.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new i(2*t.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(n=0;n=128;s>>=7)o++}var a=new i(o),u=a.length-1;for(n=t.length-1;n>=0;n--)for(s=t[n],a[u--]=127&s;(s>>=7)>0;)a[u--]=128|127&s;return this._createEncoderBuffer(a)},f.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[h(n.getFullYear()),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[h(n.getFullYear()%100),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new i(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var o=new i(n);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);n=1;for(var s=t;s>=256;s>>=8)n++;for(s=(o=new Array(n)).length-1;s>=0;s--)o[s]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},f.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},f.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},f.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n{var n=e;n.der=r(70082),n.pem=r(90735)},90735:(t,e,r)=>{var n=r(56698),i=r(70082);function o(t){i.call(this,t),this.enc="pem"}n(o,i),t.exports=o,o.prototype.encode=function(t,e){for(var r=i.prototype.encode.call(this,t).toString("base64"),n=["-----BEGIN "+e.label+"-----"],o=0;o=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,h=r;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=c[t],p=l[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:h[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,I=0|s[7],P=8191&I,T=I>>>13,U=0|s[8],F=8191&U,C=U>>>13,O=0|s[9],L=8191&O,N=O>>>13,z=0|a[0],q=8191&z,j=z>>>13,K=0|a[1],Z=8191&K,H=K>>>13,G=0|a[2],V=8191&G,W=G>>>13,$=0|a[3],Y=8191&$,X=$>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,j))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,j))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,q),i=(i=Math.imul(d,j))+Math.imul(m,q)|0,o=Math.imul(m,j);var _t=(f+(n=n+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(l,Z)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,j))+Math.imul(g,q)|0,o=Math.imul(g,j),n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,H)|0;var gt=(f+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(l,V)|0))<<13)|0;f=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,j))+Math.imul(w,q)|0,o=Math.imul(w,j),n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,H)|0,n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,W)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,W)|0;var bt=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,X)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,j))+Math.imul(x,q)|0,o=Math.imul(x,j),n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,H)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,j))+Math.imul(A,q)|0,o=Math.imul(A,j),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(v,V)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,j))+Math.imul(R,q)|0,o=Math.imul(R,j),n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,j))+Math.imul(T,q)|0,o=Math.imul(T,j),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,j))+Math.imul(C,q)|0,o=Math.imul(C,j),n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,j))+Math.imul(N,q)|0,o=Math.imul(N,j),n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,H)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,H))+Math.imul(N,Z)|0,o=Math.imul(N,H),n=n+Math.imul(F,V)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(N,V)|0,o=Math.imul(N,W),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(N,Y)|0,o=Math.imul(N,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ft)|0,n=n+Math.imul(P,ct)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var It=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Pt=(f+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(C,dt)|0))<<13)|0;f=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=It,u[16]=Pt,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function m(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(d=p),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,f=0;f=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&t.negative?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;!(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;!(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;!(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;!(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var _={k256:null,p224:null,p192:null,p25519:null};function g(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(_[t])return _[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return _[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},34529:(t,e,r)=>{"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i=0;f--)if(h[f]!==c[f])return!1;for(f=h.length-1;f>=0;f--)if(!g(t[u=h[f]],e[u],r,n))return!1;return!0}(t,e,r,s))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&y(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!t&&i&&!r;if((!t&&o.isError(i)&&s&&v(i,r)||a)&&y(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}c.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return d(m(t.actual),128)+" "+t.operator+" "+d(m(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},o.inherits(c.AssertionError,Error),c.fail=y,c.ok=_,c.equal=function(t,e,r){t!=e&&y(t,e,r,"==",c.equal)},c.notEqual=function(t,e,r){t==e&&y(t,e,r,"!=",c.notEqual)},c.deepEqual=function(t,e,r){g(t,e,!1)||y(t,e,r,"deepEqual",c.deepEqual)},c.deepStrictEqual=function(t,e,r){g(t,e,!0)||y(t,e,r,"deepStrictEqual",c.deepStrictEqual)},c.notDeepEqual=function(t,e,r){g(t,e,!1)&&y(t,e,r,"notDeepEqual",c.notDeepEqual)},c.notDeepStrictEqual=function t(e,r,n){g(e,r,!0)&&y(e,r,n,"notDeepStrictEqual",t)},c.strictEqual=function(t,e,r){t!==e&&y(t,e,r,"===",c.strictEqual)},c.notStrictEqual=function(t,e,r){t===e&&y(t,e,r,"!==",c.notStrictEqual)},c.throws=function(t,e,r){w(!0,t,e,r)},c.doesNotThrow=function(t,e,r){w(!1,t,e,r)},c.ifError=function(t){if(t)throw t};var k=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}},67526:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],u=o[1],f=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),h=0,c=u>0?s-4:s;for(r=0;r>16&255,f[h++]=e>>8&255,f[h++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,f[h++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,f[h++]=e>>8&255,f[h++]=255&e),f},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,f=n-i;af?f:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,o,s=[],a=e;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},39404:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(47790).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u=49?f-49+10:f>=17?f-17+10:f,n(f>=0&&s0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,h=r;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(t){o.prototype.inspect=c}else o.prototype.inspect=c;function c(){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"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r._strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?l[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=p[t],h=d[t];r="";var c=this.clone();for(c.negative=0;!c.isZero();){var m=c.modrn(h).toString(t);r=(c=c.idivn(h)).isZero()?m+r:l[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,I=0|s[7],P=8191&I,T=I>>>13,U=0|s[8],F=8191&U,C=U>>>13,O=0|s[9],L=8191&O,N=O>>>13,z=0|a[0],q=8191&z,j=z>>>13,K=0|a[1],Z=8191&K,H=K>>>13,G=0|a[2],V=8191&G,W=G>>>13,$=0|a[3],Y=8191&$,X=$>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,j))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,j))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,q),i=(i=Math.imul(d,j))+Math.imul(m,q)|0,o=Math.imul(m,j);var _t=(f+(n=n+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(l,Z)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,j))+Math.imul(g,q)|0,o=Math.imul(g,j),n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,H)|0;var gt=(f+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(l,V)|0))<<13)|0;f=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,j))+Math.imul(w,q)|0,o=Math.imul(w,j),n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,H)|0,n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,W)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,W)|0;var bt=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,X)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,j))+Math.imul(x,q)|0,o=Math.imul(x,j),n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,H)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,j))+Math.imul(A,q)|0,o=Math.imul(A,j),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(v,V)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,j))+Math.imul(R,q)|0,o=Math.imul(R,j),n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,j))+Math.imul(T,q)|0,o=Math.imul(T,j),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,j))+Math.imul(C,q)|0,o=Math.imul(C,j),n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,j))+Math.imul(N,q)|0,o=Math.imul(N,j),n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,H)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,H))+Math.imul(N,Z)|0,o=Math.imul(N,H),n=n+Math.imul(F,V)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(N,V)|0,o=Math.imul(N,W),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(N,Y)|0,o=Math.imul(N,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ft)|0,n=n+Math.imul(P,ct)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var It=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Pt=(f+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(C,dt)|0))<<13)|0;f=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=It,u[16]=Pt,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function _(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(t,e,r){return _(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(y=m),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):r<63?m(this,t,e):r<1024?_(this,t,e):g(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,f=0;f=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&t.negative?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;!(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;!(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;!(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;!(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(k,w),k.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},k.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new k;else if("p224"===t)e=new M;else if("p192"===t)e=new x;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return v[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(h(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},50585:(t,e,r)=>{var n=r(71865).H;let i;for(var o in i=r(n?17495:59875),i)e[o]=i[o]},17495:function(t,e,r){var n=r(48287).Buffer;!function(){var e=r(71865).H,o=e(0),s=e(1);function a(t,r){if(!(this instanceof a))return new a(t,r);if("string"==typeof t)t=t.replace(/\s+/g,""),r||(r=10),this._v=e(t,r);else if("number"==typeof t)this._v=e(t);else if("object"==typeof t&&Array.isArray(t))this._v=e.fromBuffer(n.from(t));else{if(t.constructor!=o.constructor)throw new Error("failed to get valid inner object in constructor");this._v=t}}function u(t){return new a(e(t))}function f(t){return"number"==typeof t?u(t):t}a.prototype.bitLength=function(){return 0==this.signum()?0:this._v.bitLength()},a.prototype.byteLength=function(){return this.bitLength()>>3},a.prototype.modPowInt=function(t,r){return new a(this._v.powm(e(t),r._v))},a.prototype.modInt=function(t){return this._v.mod(e(t)).toNumber()},a.prototype.testBit=function(t){var e=s.shiftLeft(t);return this._v.and(e).eq(o)?0:1},a.prototype.setBit=function(t){var r=e(1).shiftLeft(t);return new a(this._v.or(r))},a.prototype.shiftLeft=function(t){return new a(this._v.shiftLeft(t))},a.prototype.shiftRight=function(t){return new a(this._v.shiftRight(t))},a.prototype.compareTo=function(t){return this._v.cmp(t._v)},a.prototype.modPow=function(t,e){return new a(this._v.powm(t._v,e._v))},a.prototype.square=function(){return new a(this._v.mul(this._v))},a.prototype.mod=function(t){var e=this._v.mod(t._v);return e.cmp(o)<0&&(e=e.add(t._v)),new a(e)},a.prototype.abs=function(){return new a(this._v.abs())},a.prototype.pow=function(t){return new a(this._v.pow(f(t)._v))},a.prototype.intValue=function(){return this._v.toNumber()},a.prototype.signum=function(){var t=this._v.cmp(o);return ret=t>0?1:0===t?0:-1,ret},a.prototype.negate=function(){return new a(this._v.neg())},a.prototype.equals=function(t){return this._v.eq(t._v)},a.prototype.subtract=function(t){return new a(this._v.sub(t._v))},a.prototype.add=function(t){return new a(this._v.add(t._v))},a.prototype.multiply=function(t){return new a(this._v.mul(t._v))},a.prototype.divide=function(t){if(this._v.ge(o)&&t._v.ge(o))i=this._v.div(t._v);else{var e=this.signum()*t.signum();i=this._v.abs().div(t._v.abs()),e<0&&(i=i.neg())}return new a(i)},a.prototype.gcd=function(t){return new a(this._v.gcd(t._v))},a.prototype.fromBuffer=function(t){return new a(e.fromBuffer(t))},a.fromByteArrayUnsigned=function(t){return a.fromBuffer(n.from(t))},a.fromBuffer=function(t){return new a(e.fromBuffer(t))},a.fromDERInteger=function(t){var e;if(0==t.length)e=a.ZERO;else if(0==t[0])e=a.fromBuffer(t);else if(e=a.fromBuffer(t),128&t[0]){var r=a.ONE.shiftLeft(e.bitLength());e=e.subtract(r)}return e},a.prototype.compute_twos_complement=function(){var t=this.add(a.ONE).bitLength(),e=Math.floor(t/8)+1;return a.ONE.shiftLeft(8*e).add(this)},a.prototype.toDERInteger=function(){var t=null,e=this.signum();return 0==e?t=n.from([0]):e<0?t=this.compute_twos_complement().toBuffer():(t=this.toBuffer(),this.bitLength()%8==0&&(pad=n.from([0]),t=n.concat([pad,t]))),function(t){for(var e=new Array,r=0;r0){var r=n.alloc(diff);r.fill(0),e=n.concat([r,e])}return e},a.prototype.toHex=function(t){var e=this;return this.signum()<0&&(e=this.compute_twos_complement()),e.toBuffer(t).toString("hex")},a.prototype.clone=function(){return new a(e(this._v))},a.prototype.getLowestSetBit=function(){for(var t=this._v.bitLength(),r=-1,n=e(1),i=0;i"},a.prototype.toString=function(t){t||(t=10);var e=this._v.toString(t);return 0==e.length?e="0":16==t&&e.length>1&&("0"==e[0]?e=e.slice(1):"-0"==e.slice(0,2)&&(e="-"+e.slice(2))),e},a.valueOf=function(t){return f(t)},a.ZERO=u(0),a.ONE=u(1),t.exports={BigInteger:a,nbi:function(){return new a(e(0))},nbv:u,nbits:function(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}}}()},59875:function(t,e,r){var n=r(48287).Buffer;!function(){function e(t,r,n){if(!(this instanceof e))return new e(t,r,n);null!=t&&("number"==typeof t?this.fromNumber(t,r,n):null==r&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,r))}function r(){return new e(null)}e.prototype.am=function(t,e,r,n,i,o){for(var s=16383&e,a=e>>14;--o>=0;){var u=16383&this[t],f=this[t++]>>14,h=a*u+f*s;i=((u=s*u+((16383&h)<<14)+r[n]+i)>>28)+(h>>14)+a*f,r[n++]=268435455&u}return i},e.prototype.DB=28,e.prototype.DM=268435455,e.prototype.DV=1<<28,e.prototype.FV=Math.pow(2,52),e.prototype.F1=24,e.prototype.F2=4;var i,o,s=new Array;for(i="0".charCodeAt(0),o=0;o<=9;++o)s[i++]=o;for(i="a".charCodeAt(0),o=10;o<36;++o)s[i++]=o;for(i="A".charCodeAt(0),o=10;o<36;++o)s[i++]=o;function a(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function u(t,e){var r=s[t.charCodeAt(e)];return null==r?-1:r}function f(t){var e=r();return e.fromInt(t),e}function h(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function c(t){this.m=t}function l(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function g(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function b(){}function v(t){return t}function w(t){this.r2=r(),this.q3=r(),e.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}c.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},c.prototype.revert=function(t){return t},c.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},c.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},c.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},l.prototype.convert=function(t){var n=r();return t.abs().dlShiftTo(this.m.t,n),n.divRemTo(this.m,null,n),t.s<0&&n.compareTo(e.ZERO)>0&&this.m.subTo(n,n),n},l.prototype.revert=function(t){var e=r();return t.copyTo(e),this.reduce(e),e},l.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},l.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},l.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},e.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},e.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},e.prototype.fromString=function(t,r,n){var i;if(16==r)i=4;else if(8==r)i=3;else if(256==r)i=8;else if(2==r)i=1;else if(32==r)i=5;else{if(4!=r)return this.fromRadix(t,r),this;i=2}this.t=0,this.s=0;for(var o=t.length,s=!1,a=0;--o>=0;){var f=8==i?255&t[o]:u(t,o);f<0?"-"==t.charAt(o)&&(s=!0):(s=!1,0==a?this[this.t++]=f:a+i>this.DB?(this[this.t-1]|=(f&(1<>this.DB-a):this[this.t-1]|=f<=this.DB&&(a-=this.DB))}return!n&&8==i&&128&t[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},e.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},e.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e[r+s+1]=this[r]>>i|a,a=(this[r]&o)<=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},e.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(e[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},e.prototype.multiplyTo=function(t,r){var n=this.abs(),i=t.abs(),o=n.t;for(r.t=o+i.t;--o>=0;)r[o]=0;for(o=0;o=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},e.prototype.divRemTo=function(t,n,i){var o=t.abs();if(!(o.t<=0)){var s=this.abs();if(s.t0?(o.lShiftTo(c,a),s.lShiftTo(c,i)):(o.copyTo(a),s.copyTo(i));var l=a.t,p=a[l-1];if(0!=p){var d=p*(1<1?a[l-2]>>this.F2:0),m=this.FV/d,y=(1<=0&&(i[i.t++]=1,i.subTo(v,i)),e.ONE.dlShiftTo(l,v),v.subTo(a,a);a.t=0;){var w=i[--g]==p?this.DM:Math.floor(i[g]*m+(i[g-1]+_)*y);if((i[g]+=a.am(0,w,i,b,0,l))0&&i.rShiftTo(c,i),u<0&&e.ZERO.subTo(i,i)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var i=r(),o=r(),s=n.convert(this),a=h(t)-1;for(s.copyTo(i);--a>=0;)if(n.sqrTo(i,o),(t&1<0)n.mulTo(o,s,i);else{var u=i;i=o,o=u}return n.revert(i)},e.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<0)for(u>u)>0&&(i=!0,o=a(r));s>=0;)u>(u+=this.DB-e)):(r=this[s]>>(u-=e)&n,u<=0&&(u+=this.DB,--s)),r>0&&(i=!0),i&&(o+=a(r));return i?o:"0"},e.prototype.negate=function(){var t=r();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+h(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=r();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new c(e):new l(e),this.exp(t,r)},e.ZERO=f(0),e.ONE=f(1),b.prototype.convert=v,b.prototype.revert=v,b.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},b.prototype.sqrTo=function(t,e){t.squareTo(e)},w.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=r();return t.copyTo(e),this.reduce(e),e},w.prototype.revert=function(t){return t},w.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},w.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},w.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var k=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],M=(1<<26)/k[k.length-1];function h(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}e.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},e.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),i=f(n),o=r(),s=r(),a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(n+s.intValue()).toString(t).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(t)+a},e.prototype.fromRadix=function(t,r){this.fromInt(0),null==r&&(r=10);for(var n=this.chunkSize(r),i=Math.pow(r,n),o=!1,s=0,a=0,f=0;f=n&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(r,s)),this.dAddOffset(a,0)),o&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,r,n){if("number"==typeof r)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),d,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var i=new Array,o=7&t;i.length=1+(t>>3),r.nextBytes(i),o>0?i[0]&=(1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},e.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},e.prototype.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(e-this.t,0);n0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),i=n.getLowestSetBit();if(i<=0)return!1;var o=n.shiftRight(i);(t=t+1>>1)>k.length&&(t=k.length);for(var s=r(),a=0;a>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(t){var e=this.t,r=new Array;r[0]=this.s;var n,i=this.DB-e*this.DB%8,o=0;if(e-- >0)for(i>i)!=(this.s&this.DM)>>i&&(r[o++]=n|this.s<=0;)i<8?(n=(this[e]&(1<>(i+=this.DB-8)):(n=this[e]>>(i-=8)&255,i<=0&&(i+=this.DB,--e)),t&&(128&n&&(n|=-256),0==o&&(128&this.s)!=(128&n)&&++o),(o>0||n!=this.s)&&(r[o++]=n);return r},e.prototype.equals=function(t){return 0==this.compareTo(t)},e.prototype.min=function(t){return this.compareTo(t)<0?this:t},e.prototype.max=function(t){return this.compareTo(t)>0?this:t},e.prototype.and=function(t){var e=r();return this.bitwiseTo(t,p,e),e},e.prototype.or=function(t){var e=r();return this.bitwiseTo(t,d,e),e},e.prototype.xor=function(t){var e=r();return this.bitwiseTo(t,m,e),e},e.prototype.andNot=function(t){var e=r();return this.bitwiseTo(t,y,e),e},e.prototype.not=function(){for(var t=r(),e=0;e=this.t?0!=this.s:!!(this[e]&1<1){var m=r();for(i.sqrTo(a[1],m);u<=d;)a[u]=r(),i.mulTo(m,a[u-2],a[u]),u+=2}var y,_,g=t.t-1,b=!0,v=r();for(o=h(t[g])-1;g>=0;){for(o>=p?y=t[g]>>o-p&d:(y=(t[g]&(1<0&&(y|=t[g-1]>>this.DB+o-p)),u=n;!(1&y);)y>>=1,--u;if((o-=u)<0&&(o+=this.DB,--g),b)a[y].copyTo(s),b=!1;else{for(;u>1;)i.sqrTo(s,v),i.sqrTo(v,s),u-=2;u>0?i.sqrTo(s,v):(_=s,s=v,v=_),i.mulTo(v,a[y],s)}for(;g>=0&&!(t[g]&1<=0?(n.subTo(i,n),r&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(n,i),r&&a.subTo(o,a),u.subTo(s,u))}return 0!=i.compareTo(e.ONE)?e.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},e.prototype.pow=function(t){return this.exp(t,new b)},e.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},e.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=k[k.length-1]){for(e=0;e>8),(r+=String.fromCharCode(255&e))+util.bin2str(t)},e.prototype.square=function(){var t=r();return this.squareTo(t),t},e.prototype.fromBuffer=function(t){return this.fromString(function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n"},e.fromHex=function(t){if(!t.match(/^[a-fA-F0-9]*$/))throw new Error("hex string invalid: "+t);if(t.length%2!=0)throw new Error("got an odd-length hex-string");return new e(t,16)},e.valueOf=function(t){return function(t){return"number"==typeof t?f(t):t}(t)},e.prototype.toBuffer=function(t){var e;t||(t=0);var r=this.signum();e=0==r?[]:this.toByteArray(r<0);var i=n.from(e);if((diff=t-e.length)>0){var o=n.alloc(diff);o.fill(0),i=n.concat([o,i])}return i},e.prototype.byteLength=function(){return this.t},e.prototype.toDERInteger=function(){return this.toByteArray(!0)},e.fromDERInteger=function(t){var e=r();return e.fromString(t,256,!1),e},e.prototype.toByteArrayUnsigned=function(){return new Uint8Array(this.toBuffer())},e.fromByteArrayUnsigned=function(t){return e.fromBuffer(n.from(t))},e.prototype.toHex=function(t){return this.toBuffer(t).toString("hex")},t.exports={BigInteger:e,nbi:r,nbv:f,Montgomery:l,Classic:c,nbits:h}}()},71865:(t,e,r)=>{var n=null,i=["bigint","bignum"];for(var o in i)try{n=r(40132)(i[o]);break}catch(t){}e.H=n},40132:t=>{function e(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}e.keys=()=>[],e.resolve=e,e.id=40132,t.exports=e},15037:(t,e,r)=>{var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r{var n=r(92861).Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i>>24]^h[d>>>16&255]^c[m>>>8&255]^l[255&y]^e[_++],s=f[d>>>24]^h[m>>>16&255]^c[y>>>8&255]^l[255&p]^e[_++],a=f[m>>>24]^h[y>>>16&255]^c[p>>>8&255]^l[255&d]^e[_++],u=f[y>>>24]^h[p>>>16&255]^c[d>>>8&255]^l[255&m]^e[_++],p=o,d=s,m=a,y=u;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[m>>>8&255]<<8|n[255&y])^e[_++],s=(n[d>>>24]<<24|n[m>>>16&255]<<16|n[y>>>8&255]<<8|n[255&p])^e[_++],a=(n[m>>>24]<<24|n[y>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^e[_++],u=(n[y>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&m])^e[_++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var f=a^a<<1^a<<2^a<<3^a<<4;f=f>>>8^255&f^99,r[s]=f,n[f]=s;var h=t[s],c=t[h],l=t[c],p=257*t[f]^16843008*f;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*l^65537*c^257*h^16843008*s,o[0][f]=p<<24|p>>>8,o[1][f]=p<<16|p>>>16,o[2][f]=p<<8|p>>>24,o[3][f]=p,0===s?s=a=1:(s=h^t[t[t[l^h]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function f(t){this._key=i(t),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/e|0]<<24):e>6&&o%e==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-e]^s}for(var f=[],h=0;h>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},f.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},f.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},f.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=f},92356:(t,e,r)=>{var n=r(50462),i=r(92861).Buffer,o=r(56168),s=r(56698),a=r(25892),u=r(30295),f=r(45122);function h(t,e,r,s){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var h=this._cipher.encryptBlock(u);this._ghash=new a(h),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new a(r),o=e.length,s=o%16;n.update(e),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*o,h=i.alloc(8);h.writeUIntBE(u,0,8),n.update(h),t._finID=n.state;var c=i.from(t._finID);return f(c),c}(this,r,h),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(h,o),h.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},h.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i{var n=r(25799),i=r(36171),o=r(3219);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},36171:(t,e,r)=>{var n=r(92356),i=r(92861).Buffer,o=r(530),s=r(50650),a=r(56168),u=r(50462),f=r(68078);function h(t,e,r){a.call(this),this._cache=new c,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function c(){this.cache=i.allocUnsafe(0)}function l(t,e,r){var a=o[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===a.type?new s(a.module,e,r,!0):"auth"===a.type?new n(a.module,e,r,!0):new h(a.module,e,r)}r(56698)(h,a),h.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},h.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},c.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=f(e,!1,r.key,r.iv);return l(t,n.key,n.iv)},e.createDecipheriv=l},25799:(t,e,r)=>{var n=r(530),i=r(92356),o=r(92861).Buffer,s=r(50650),a=r(56168),u=r(50462),f=r(68078);function h(t,e,r){a.call(this),this._cache=new l,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(56698)(h,a),h.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var c=o.alloc(16,16);function l(){this.cache=o.allocUnsafe(0)}function p(t,e,r){var a=n[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,e,r):"auth"===a.type?new i(a.module,e,r):new h(a.module,e,r)}h.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(c))throw this._cipher.scrub(),new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=o.concat([this.cache,t])},l.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},l.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r{var n=r(92861).Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,e&&(r[0]=r[0]^225<<24)}var s;this.state=o(n)},s.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=s},45122:t=>{t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},92884:(t,e,r)=>{var n=r(30295);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},46383:(t,e,r)=>{var n=r(92861).Buffer,i=r(30295);function o(t,e,r){var o=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var i,s=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){s=n.concat([s,o(t,e,r)]);break}i=t._cache.length,s=n.concat([s,o(t,e.slice(0,i),r)]),e=e.slice(i)}return s}},55264:(t,e,r)=>{var n=r(92861).Buffer;function i(t,e,r){for(var n,i,s=-1,a=0;++s<8;)n=e&1<<7-s?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>s%8,t._prev=o(t._prev,r?n:i);return a}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a{var n=r(92861).Buffer;function i(t,e,r){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:i])]),i}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a{var n=r(30295),i=r(92861).Buffer,o=r(45122);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var a=0;a{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},530:(t,e,r)=>{var n={ECB:r(52632),CBC:r(92884),CFB:r(46383),CFB8:r(86975),CFB1:r(55264),OFB:r(46843),CTR:r(63053),GCM:r(63053)},i=r(3219);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},46843:(t,e,r)=>{var n=r(48287).Buffer,i=r(30295);function o(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length{var n=r(50462),i=r(92861).Buffer,o=r(56168);function s(t,e,r,s){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=t}r(56698)(s,o),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},30125:(t,e,r)=>{var n=r(84050),i=r(1241),o=r(530),s=r(32438),a=r(68078);function u(t,e,r){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function f(t,e,r){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return u(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=u,e.createDecipher=e.Decipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return f(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=f,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},84050:(t,e,r)=>{var n=r(56168),i=r(29560),o=r(56698),s=r(92861).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(t){n.call(this);var e,r=t.mode.toLowerCase(),i=a[r];e=t.decrypt?"decrypt":"encrypt";var o=t.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=s.concat([o,o.slice(0,8)]));var u=t.iv;s.isBuffer(u)||(u=s.from(u)),this._des=i.create({key:o,iv:u,type:e})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],t.exports=u,o(u,n),u.prototype._update=function(t){return s.from(this._des.update(t))},u.prototype._final=function(){return s.from(this._des.final())}},32438:(t,e)=>{e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},67332:(t,e,r)=>{var n=r(48287).Buffer,i=r(39404),o=r(53209);function s(t){var e,r=t.modulus.byteLength();do{e=new i(o(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function a(t,e){var r=function(t){var e=s(t);return{blinder:e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),o=e.modulus.byteLength(),a=new i(t).mul(r.blinder).umod(e.modulus),u=a.toRed(i.mont(e.prime1)),f=a.toRed(i.mont(e.prime2)),h=e.coefficient,c=e.prime1,l=e.prime2,p=u.redPow(e.exponent1).fromRed(),d=f.redPow(e.exponent2).fromRed(),m=p.isub(d).imul(h).umod(c).imul(l);return d.iadd(m).imul(r.unblinder).umod(e.modulus).toArrayLike(n,"be",o)}a.getr=s,t.exports=a},55715:(t,e,r)=>{"use strict";t.exports=r(62951)},20:(t,e,r)=>{"use strict";var n=r(48223).Buffer,i=r(47108),o=r(46737),s=r(56698),a=r(35359),u=r(74847),f=r(62951);function h(t){o.Writable.call(this);var e=f[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function c(t){o.Writable.call(this);var e=f[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){return new h(t)}function p(t){return new c(t)}Object.keys(f).forEach((function(t){f[t].id=n.from(f[t].id,"hex"),f[t.toLowerCase()]=f[t]})),s(h,o.Writable),h.prototype._write=function(t,e,r){this._hash.update(t),r()},h.prototype.update=function(t,e){return this._hash.update("string"==typeof t?n.from(t,e):t),this},h.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=a(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},s(c,o.Writable),c.prototype._write=function(t,e,r){this._hash.update(t),r()},c.prototype.update=function(t,e){return this._hash.update("string"==typeof t?n.from(t,e):t),this},c.prototype.verify=function(t,e,r){var i="string"==typeof e?n.from(e,r):e;this.end();var o=this._hash.digest();return u(i,o,t,this._signType,this._tag)},t.exports={Sign:l,Verify:p,createSign:l,createVerify:p}},35359:(t,e,r)=>{"use strict";var n=r(48223).Buffer,i=r(83507),o=r(67332),s=r(86729).ec,a=r(39404),u=r(78170),f=r(64589);function h(t,e,r,o){if((t=n.from(t.toArray())).length0&&r.ishrn(n),r}function l(t,e,r){var o,s;do{for(o=n.alloc(0);8*o.length{"use strict";var n=r(48223).Buffer,i=r(39404),o=r(86729).ec,s=r(78170),a=r(64589);function u(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=0)throw new Error("invalid sig")}t.exports=function(t,e,r,f,h){var c=s(r);if("ec"===c.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(t,e,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),s=r.data.subjectPrivateKey.data;return i.verify(e,t,s)}(t,e,c)}if("dsa"===c.type){if("dsa"!==f)throw new Error("wrong public key type");return function(t,e,r){var n=r.data.p,o=r.data.q,a=r.data.g,f=r.data.pub_key,h=s.signature.decode(t,"der"),c=h.s,l=h.r;u(c,o),u(l,o);var p=i.mont(n),d=c.invm(o);return 0===a.toRed(p).redPow(new i(e).mul(d).mod(o)).fromRed().mul(f.toRed(p).redPow(l.mul(d).mod(o)).fromRed()).mod(n).mod(o).cmp(l)}(t,e,c)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");e=n.concat([h,e]);for(var l=c.modulus.byteLength(),p=[1],d=0;e.length+p.length+2{"use strict";var n=r(33225),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var o=Object.create(r(15622));o.inherits=r(56698);var s=r(30206),a=r(7314);o.inherits(c,s);for(var u=i(a.prototype),f=0;f{"use strict";t.exports=o;var n=r(81816),i=Object.create(r(15622));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(56698),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},30206:(t,e,r)=>{"use strict";var n=r(65606),i=r(33225);t.exports=b;var o,s=r(64634);b.ReadableState=g,r(37007).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(5567),f=r(24116).Buffer,h=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=Object.create(r(15622));c.inherits=r(56698);var l=r(92668),p=void 0;p=l&&l.debuglog?l.debuglog("stream"):function(){};var d,m=r(20672),y=r(36278);c.inherits(b,u);var _=["error","close","destroy","pause","resume"];function g(t,e){t=t||{};var n=e instanceof(o=o||r(26248));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=r(6427).I),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||r(26248),!(this instanceof b))return new b(t);this._readableState=new g(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function v(t,e,r,n,i){var o,s=t._readableState;return null===e?(s.reading=!1,function(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,x(t)}}(t,s)):(i||(o=function(t,e){var r,n;return n=e,f.isBuffer(n)||n instanceof h||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===f.prototype||(e=function(t){return f.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?w(t,s,e,!1):E(t,s)):w(t,s,e,!1))):n||(s.reading=!1)),function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=k?t=k:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function x(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(S,t):S(t))}function S(t){p("emit readable"),t.emit("readable"),R(t)}function E(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(A,t,e))}function A(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;return to.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0==(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=f.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0==(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e),n}(t,e.buffer,e.decoder),r);var r}function P(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(T,e,t))}function T(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function U(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):x(this),null;if(0===(t=M(t,e))&&e.ended)return 0===e.length&&P(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t0?I(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&P(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=e&&!1===e.end||t===n.stdout||t===n.stderr?g:f;function f(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",(function e(n,i){p("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,p("cleanup"),t.removeListener("close",y),t.removeListener("finish",_),t.removeListener("drain",h),t.removeListener("error",m),t.removeListener("unpipe",e),r.removeListener("end",f),r.removeListener("end",g),r.removeListener("data",d),c=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}));var h=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,R(t))}}(r);t.on("drain",h);var c=!1,l=!1;function d(e){p("ondata"),l=!1,!1!==t.write(e)||l||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==U(o.pipes,t))&&!c&&(p("false write response, pause",o.awaitDrain),o.awaitDrain++,l=!0),r.pause())}function m(e){p("onerror",e),g(),t.removeListener("error",m),0===a(t,"error")&&t.emit("error",e)}function y(){t.removeListener("finish",_),g()}function _(){p("onfinish"),t.removeListener("close",y),g()}function g(){p("unpipe"),r.unpipe(t)}return r.on("data",d),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",m),t.once("close",y),t.once("finish",_),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o{"use strict";t.exports=s;var n=r(26248),i=Object.create(r(15622));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";var n=r(33225);function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(undefined),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=y;var o,s=n.nextTick;y.WritableState=m;var a=Object.create(r(15622));a.inherits=r(56698);var u,f={deprecate:r(94643)},h=r(5567),c=r(24116).Buffer,l=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},p=r(36278);function d(){}function m(t,e){o=o||r(26248),t=t||{};var a=e instanceof o;this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,f=t.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:a&&(f||0===f)?f:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(k,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(o(i),t._writableState.errorEmitted=!0,t.emit("error",i),k(t,e))}(t,r,i,e,o);else{var a=v(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||b(t,r),i?s(g,t,r,a,o):g(t,r,a,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function y(t){if(o=o||r(26248),!(u.call(y,this)||this instanceof o))return new y(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function _(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function g(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),k(t,e)}function b(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,_(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,h=r.encoding,c=r.callback;if(_(t,e,!1,e.objectMode?1:f.length,f,h,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function v(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function w(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),k(t,e)}))}function k(t,e){var r=v(e);return r&&(function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,n.nextTick(w,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}a.inherits(y,h),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!u.call(this,t)||this===y&&t&&t._writableState instanceof m}})):u=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,c.isBuffer(i)||i instanceof l);return a&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=d),o.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),n.nextTick(i,s),o=!1),o}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,r)),e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,k(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}},20672:(t,e,r)=>{"use strict";var n=r(24116).Buffer,i=r(21638);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);for(var e,r,i=n.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=i,r=s,o.data.copy(e,r),s+=o.data.length,o=o.next;return i},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},36278:(t,e,r)=>{"use strict";var n=r(33225);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,t)):n.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},5567:(t,e,r)=>{t.exports=r(37007).EventEmitter},24116:(t,e,r)=>{var n=r(48287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},46737:(t,e,r)=>{(e=t.exports=r(30206)).Stream=e,e.Readable=e,e.Writable=r(7314),e.Duplex=r(26248),e.Transform=r(81816),e.PassThrough=r(75242)},48223:(t,e,r)=>{var n=r(48287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},6427:(t,e,r)=>{"use strict";var n=r(88393).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=h,this.end=c,e=3;break;default:return this.write=l,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function f(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function h(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.I=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},88393:(t,e,r)=>{var n=r(48287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},5974:(t,e,r)=>{"use strict";var n=r(48287).Buffer,i=r(65606),o=r(34529),s=r(44442),a=r(58411),u=r(71447),f=r(19681);for(var h in f)e[h]=f[h];function c(t){if("number"!=typeof t||te.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7,c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?a.deflateEnd(this.strm):this.mode!==e.INFLATE&&this.mode!==e.GUNZIP&&this.mode!==e.INFLATERAW&&this.mode!==e.UNZIP||u.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null)},c.prototype.write=function(t,e,r,n,i,o,s){return this._write(!0,t,e,r,n,i,o,s)},c.prototype.writeSync=function(t,e,r,n,i,o,s){return this._write(!1,t,e,r,n,i,o,s)},c.prototype._write=function(t,r,s,a,u,f,h,c){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==e.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===r,"must provide flush value"),this.write_in_progress=!0,r!==e.Z_NO_FLUSH&&r!==e.Z_PARTIAL_FLUSH&&r!==e.Z_SYNC_FLUSH&&r!==e.Z_FULL_FLUSH&&r!==e.Z_FINISH&&r!==e.Z_BLOCK)throw new Error("Invalid flush value");if(null==s&&(s=n.alloc(0),u=0,a=0),this.strm.avail_in=u,this.strm.input=s,this.strm.next_in=a,this.strm.avail_out=c,this.strm.output=f,this.strm.next_out=h,this.flush=r,!t)return this._process(),this._checkError()?this._afterSync():void 0;var l=this;return i.nextTick((function(){l._process(),l._after()})),this},c.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},c.prototype._process=function(){var t=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=a.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(31!==this.strm.input[t]){this.mode=e.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=u.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=u.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=u.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=u.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},c.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},c.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},c.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(t,r,n,i,s){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(t>=8&&t<=15,"invalid windowBits"),o(r>=-1&&r<=9,"invalid compression level"),o(n>=1&&n<=9,"invalid memlevel"),o(i===e.Z_FILTERED||i===e.Z_HUFFMAN_ONLY||i===e.Z_RLE||i===e.Z_FIXED||i===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,t,n,i,s),this._setDictionary()},c.prototype.params=function(){throw new Error("deflateParams Not supported")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(t,r,n,i,o){switch(this.level=t,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,this.mode!==e.GZIP&&this.mode!==e.GUNZIP||(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),this.mode!==e.DEFLATERAW&&this.mode!==e.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new s,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=a.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=u.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=o,this.write_in_progress=!1,this.init_done=!0},c.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=a.deflateSetDictionary(this.strm,this.dictionary)}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},c.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=a.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=u.inflateReset(this.strm)}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=c},78559:(t,e,r)=>{"use strict";var n=r(65606),i=r(48287).Buffer,o=r(88310).Transform,s=r(5974),a=r(40537),u=r(34529).ok,f=r(48287).kMaxLength,h="Cannot create final Buffer. It would be larger than 0x"+f.toString(16)+" bytes";s.Z_MIN_WINDOWBITS=8,s.Z_MAX_WINDOWBITS=15,s.Z_DEFAULT_WINDOWBITS=15,s.Z_MIN_CHUNK=64,s.Z_MAX_CHUNK=1/0,s.Z_DEFAULT_CHUNK=16384,s.Z_MIN_MEMLEVEL=1,s.Z_MAX_MEMLEVEL=9,s.Z_DEFAULT_MEMLEVEL=8,s.Z_MIN_LEVEL=-1,s.Z_MAX_LEVEL=9,s.Z_DEFAULT_LEVEL=s.Z_DEFAULT_COMPRESSION;for(var c=Object.keys(s),l=0;l=f?s=new RangeError(h):e=i.concat(n,o),n=[],t.close(),r(s,e)}t.on("error",(function(e){t.removeListener("end",a),t.removeListener("readable",s),r(e)})),t.on("end",a),t.end(e),s()}function b(t,e){if("string"==typeof e&&(e=i.from(e)),!i.isBuffer(e))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return t._processChunk(e,r)}function v(t){if(!(this instanceof v))return new v(t);B.call(this,t,s.DEFLATE)}function w(t){if(!(this instanceof w))return new w(t);B.call(this,t,s.INFLATE)}function k(t){if(!(this instanceof k))return new k(t);B.call(this,t,s.GZIP)}function M(t){if(!(this instanceof M))return new M(t);B.call(this,t,s.GUNZIP)}function x(t){if(!(this instanceof x))return new x(t);B.call(this,t,s.DEFLATERAW)}function S(t){if(!(this instanceof S))return new S(t);B.call(this,t,s.INFLATERAW)}function E(t){if(!(this instanceof E))return new E(t);B.call(this,t,s.UNZIP)}function A(t){return t===s.Z_NO_FLUSH||t===s.Z_PARTIAL_FLUSH||t===s.Z_SYNC_FLUSH||t===s.Z_FULL_FLUSH||t===s.Z_FINISH||t===s.Z_BLOCK}function B(t,r){var n=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||e.Z_DEFAULT_CHUNK,o.call(this,t),t.flush&&!A(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!A(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||s.Z_NO_FLUSH,this._finishFlushFlag=void 0!==t.finishFlush?t.finishFlush:s.Z_FINISH,t.chunkSize&&(t.chunkSizee.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBitse.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.levele.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevele.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=e.Z_FILTERED&&t.strategy!=e.Z_HUFFMAN_ONLY&&t.strategy!=e.Z_RLE&&t.strategy!=e.Z_FIXED&&t.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!i.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new s.Zlib(r);var a=this;this._hadError=!1,this._handle.onerror=function(t,r){D(a),a._hadError=!0;var n=new Error(t);n.errno=r,n.code=e.codes[r],a.emit("error",n)};var u=e.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(u=t.level);var f=e.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(f=t.strategy),this._handle.init(t.windowBits||e.Z_DEFAULT_WINDOWBITS,u,t.memLevel||e.Z_DEFAULT_MEMLEVEL,f,t.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=f,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!n._handle},configurable:!0,enumerable:!0})}function D(t,e){e&&n.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}function R(t){t.emit("close")}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(d),writable:!1}),e.Deflate=v,e.Inflate=w,e.Gzip=k,e.Gunzip=M,e.DeflateRaw=x,e.InflateRaw=S,e.Unzip=E,e.createDeflate=function(t){return new v(t)},e.createInflate=function(t){return new w(t)},e.createDeflateRaw=function(t){return new x(t)},e.createInflateRaw=function(t){return new S(t)},e.createGzip=function(t){return new k(t)},e.createGunzip=function(t){return new M(t)},e.createUnzip=function(t){return new E(t)},e.deflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new v(e),t,r)},e.deflateSync=function(t,e){return b(new v(e),t)},e.gzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new k(e),t,r)},e.gzipSync=function(t,e){return b(new k(e),t)},e.deflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new x(e),t,r)},e.deflateRawSync=function(t,e){return b(new x(e),t)},e.unzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new E(e),t,r)},e.unzipSync=function(t,e){return b(new E(e),t)},e.inflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new w(e),t,r)},e.inflateSync=function(t,e){return b(new w(e),t)},e.gunzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new M(e),t,r)},e.gunzipSync=function(t,e){return b(new M(e),t)},e.inflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),g(new S(e),t,r)},e.inflateRawSync=function(t,e){return b(new S(e),t)},a.inherits(B,o),B.prototype.params=function(t,r,i){if(te.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+t);if(r!=e.Z_FILTERED&&r!=e.Z_HUFFMAN_ONLY&&r!=e.Z_RLE&&r!=e.Z_FIXED&&r!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==t||this._strategy!==r){var o=this;this.flush(s.Z_SYNC_FLUSH,(function(){u(o._handle,"zlib binding closed"),o._handle.params(t,r),o._hadError||(o._level=t,o._strategy=r,i&&i())}))}else n.nextTick(i)},B.prototype.reset=function(){return u(this._handle,"zlib binding closed"),this._handle.reset()},B.prototype._flush=function(t){this._transform(i.alloc(0),"",t)},B.prototype.flush=function(t,e){var r=this,o=this._writableState;("function"==typeof t||void 0===t&&!e)&&(e=t,t=s.Z_FULL_FLUSH),o.ended?e&&n.nextTick(e):o.ending?e&&this.once("end",e):o.needDrain?e&&this.once("drain",(function(){return r.flush(t,e)})):(this._flushFlag=t,this.write(i.alloc(0),"",e))},B.prototype.close=function(t){D(this,t),n.nextTick(R,this)},B.prototype._transform=function(t,e,r){var n,o=this._writableState,a=(o.ending||o.ended)&&(!t||o.length===t.length);return null===t||i.isBuffer(t)?this._handle?(a?n=this._finishFlushFlag:(n=this._flushFlag,t.length>=o.length&&(this._flushFlag=this._opts.flush||s.Z_NO_FLUSH)),void this._processChunk(t,n,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},B.prototype._processChunk=function(t,e,r){var n=t&&t.length,o=this._chunkSize-this._offset,s=0,a=this,c="function"==typeof r;if(!c){var l,p=[],d=0;this.on("error",(function(t){l=t})),u(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(e,t,s,n,this._buffer,this._offset,o)}while(!this._hadError&&g(m[0],m[1]));if(this._hadError)throw l;if(d>=f)throw D(this),new RangeError(h);var y=i.concat(p,d);return D(this),y}u(this._handle,"zlib binding closed");var _=this._handle.write(e,t,s,n,this._buffer,this._offset,o);function g(f,h){if(this&&(this.buffer=null,this.callback=null),!a._hadError){var l=o-h;if(u(l>=0,"have should not go down"),l>0){var m=a._buffer.slice(a._offset,a._offset+l);a._offset+=l,c?a.push(m):(p.push(m),d+=m.length)}if((0===h||a._offset>=a._chunkSize)&&(o=a._chunkSize,a._offset=0,a._buffer=i.allocUnsafe(a._chunkSize)),0===h){if(s+=n-f,n=f,!c)return!0;var y=a._handle.write(e,t,s,n,a._buffer,a._offset,a._chunkSize);return y.callback=g,void(y.buffer=t)}if(!c)return!1;r()}}_.buffer=t,_.callback=g},a.inherits(v,B),a.inherits(w,B),a.inherits(k,B),a.inherits(M,B),a.inherits(x,B),a.inherits(S,B),a.inherits(E,B)},30295:(t,e,r)=>{var n=r(48287).Buffer;t.exports=function(t,e){for(var r=Math.min(t.length,e.length),i=new n(r),o=0;o{"use strict";const n=r(67526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|m(t,e);let n=a(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if($(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($(t,ArrayBuffer)||t&&$(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&($(t,SharedArrayBuffer)||t&&$(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|d(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||Y(t.length)?a(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return h(t),a(t<0?0:0|d(t))}function l(t){const e=t.length<0?0:0|d(t.length),r=a(e);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(i)return n?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return B(this,e,r);case"latin1":case"binary":return D(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function _(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){let o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if($(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),f=this.slice(n,i),h=t.slice(e,r);for(let t=0;t>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":case"latin1":case"binary":return k(this,t,e,r);case"base64":return M(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function B(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let n=e;nr)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function U(t,e,r,n,i){j(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function F(t,e,r,n,i){j(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function C(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(t,e,r,n,o){return e=+e,r>>>=0,o||C(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function L(t,e,r,n,o){return e=+e,r>>>=0,o||C(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||P(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||P(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=J((function(t){K(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||P(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||P(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||P(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=J((function(t){K(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||P(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||P(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||P(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||P(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||T(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||T(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=J((function(t,e=0){return U(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=J((function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);T(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i>>=0,!n){const n=Math.pow(2,8*r-1);T(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=J((function(t,e=0){return U(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=J((function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,r){return O(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return O(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function j(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new N.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){K(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||Z(e,t.length-(r+1))}(n,i,o)}function K(t,e){if("number"!=typeof t)throw new N.ERR_INVALID_ARG_TYPE(e,"number",t)}function Z(t,e,r){if(Math.floor(t)!==t)throw K(t,r),new N.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),z("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function V(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function $(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Y(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},96842:(t,e,n)=>{var i=n(48287).Buffer,o=function(){"use strict";function t(t,e){var r=t.length;if(e>=r)throw RangeError("Out of bound");if(e<0)throw RangeError("Out of bound");var n=t;t=t.join(""),n.sort();for(var i={},o=r-1;o>=0;o--)i[n[o]]=o;var s=[];for(o=0;o0;t[i]=t[--i]);r.push(t[0]=n)}var r=function(){this.init=function(t){this.masks=[];for(var e=0;e<31;e++)this.masks[e]=(1<>1;return this.readbits(e)*(1<>this.bits-t&e;return this.bits-=t,this.bitfield&=~(e<this.max_bits&&(this.max_bits=t.bits)}),this)}};return{bz2:{decode:function(n){var o=new r;if(o.init(n),o.readbits(16),104!=o.readbits(8))throw"Unknown (not type 'h'uffman Bzip2) compression method";var s=o.readbits(8);if(!(49<=s&&s<=57))throw"Unknown (not size '1'-'9') Bzip2 blocksize";function a(t){for(var e=[],r=t.readbits(16),n=32768;n>0;n>>=1)if(r&n)for(var i=t.readbits(16),o=32768;o>0;o>>=1)e.push(Boolean(i&o));else for(var s=0;s<16;s++)e.push(!1);return e}s-=48;var u=[];return function(){for(;;){var r=o.readbits2(48);if(o.readbits2(32),54156738319193!=r){if(25779555029136==r){o.readbits(7&o.bits);break}throw"Illegal Bzip2 blocktype = 0x"+r.toString(16)}if(o.readbits(1))throw"Bzip2 randomised support not implemented";var n=o.readbits(24),s=a(o),f=o.readbits(3);if(2>f||f>6)throw RangeError("Bzip2: Number of Huffman groups not in range 2..6");for(var h=[0,1,2,3,4,5,6].slice(0,f),c=[],l=0,p=o.readbits(15);l=f)throw RangeError("More than max ("+f+") groups");e(h,d,c)}for(var m=[],y=s.reduce((function(t,e){return t+e}),0)+2,_=0;_20)throw RangeError("Bzip2 Huffman length code outside range 0..20");for(;o.readbits(1);)g-=2*o.readbits(1)-1;b.push(g)}m.push(b)}for(var v=[],w=0;w=0;d--)s[d]&&M.push(String.fromCharCode(d));M.reverse();for(var x,S,E=0,A=0,B=0,D=0,R=[];;){for(var I in--A<=0&&(A=50,E<=c.length&&(x=v[c[E++]])),x.faht)if(o.bits>o.bits-I]){o.bitfield&=o.masks[o.bits-=I],S=S.code;break}if(0<=S&&S<=1)0==B&&(D=1),B+=D<0;B--)R.push(P);if(S==y-1)break;e(M,S-1,R)}}for(var T=t(R,n),U=[],F=(l=0,T.length);l0;C--)U.push(d);l+=5}else U.push(T[l++]);u.push(U.join(""))}}(),u.join("")}}}}();t.exports=function(t){return s=t.toString("binary"),r=o.bz2.decode(s),new i(r,"binary")}},56168:(t,e,r)=>{var n=r(92861).Buffer,i=r(88310).Transform,o=r(83141).I;function s(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(56698)(s,i),s.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=s},15622:(t,e,r)=>{var n=r(48287).Buffer;function i(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===i(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===i(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===i(t)},e.isError=function(t){return"[object Error]"===i(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n.isBuffer},61324:(t,e,r)=>{var n=r(48287).Buffer,i=r(86729),o=r(92801);t.exports=function(t){return new a(t)};var s={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 a(t){this.curveType=s[t],this.curveType||(this.curveType={name:t}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(t,e,r){Array.isArray(t)||(t=t.toArray());var i=new n(t);if(r&&i.length=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,h=r;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=c[t],p=l[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:h[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,I=0|s[7],P=8191&I,T=I>>>13,U=0|s[8],F=8191&U,C=U>>>13,O=0|s[9],L=8191&O,N=O>>>13,z=0|a[0],q=8191&z,j=z>>>13,K=0|a[1],Z=8191&K,H=K>>>13,G=0|a[2],V=8191&G,W=G>>>13,$=0|a[3],Y=8191&$,X=$>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,j))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,j))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,q),i=(i=Math.imul(d,j))+Math.imul(m,q)|0,o=Math.imul(m,j);var _t=(f+(n=n+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(l,Z)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,j))+Math.imul(g,q)|0,o=Math.imul(g,j),n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,H)|0;var gt=(f+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(l,V)|0))<<13)|0;f=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,j))+Math.imul(w,q)|0,o=Math.imul(w,j),n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,H)|0,n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,W)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,W)|0;var bt=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,X)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,j))+Math.imul(x,q)|0,o=Math.imul(x,j),n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,H)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,j))+Math.imul(A,q)|0,o=Math.imul(A,j),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(v,V)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,j))+Math.imul(R,q)|0,o=Math.imul(R,j),n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,j))+Math.imul(T,q)|0,o=Math.imul(T,j),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,j))+Math.imul(C,q)|0,o=Math.imul(C,j),n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,j))+Math.imul(N,q)|0,o=Math.imul(N,j),n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,H)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,H))+Math.imul(N,Z)|0,o=Math.imul(N,H),n=n+Math.imul(F,V)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(N,V)|0,o=Math.imul(N,W),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(N,Y)|0,o=Math.imul(N,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ft)|0,n=n+Math.imul(P,ct)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var It=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Pt=(f+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(C,dt)|0))<<13)|0;f=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=It,u[16]=Pt,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function m(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(d=p),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,f=0;f=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&t.negative?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;!(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;!(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;!(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;!(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var _={k256:null,p224:null,p192:null,p25519:null};function g(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(_[t])return _[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return _[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},47108:(t,e,r)=>{"use strict";var n=r(56698),i=r(88276),o=r(66011),s=r(62802),a=r(56168);function u(t){a.call(this,"digest"),this._hash=t}n(u,a),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(s(t))}},20320:(t,e,r)=>{var n=r(88276);t.exports=function(t){return(new n).update(t).digest()}},83507:(t,e,r)=>{"use strict";var n=r(56698),i=r(41800),o=r(56168),s=r(92861).Buffer,a=r(20320),u=r(66011),f=r(62802),h=s.alloc(128);function c(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=e,e.length>r?e=("rmd160"===t?new u:f(t)).update(e).digest():e.length{"use strict";var n=r(56698),i=r(92861).Buffer,o=r(56168),s=i.alloc(128),a=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length{"use strict";e.rng=r(53209),r(47108),r(83507);var n=r(55715),i=Object.keys(n),o=(["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i),r(78396));o.pbkdf2,o.pbkdf2Sync;var s=r(30125);s.Cipher,s.createCipher,s.Cipheriv,s.createCipheriv,s.Decipher,s.createDecipher,s.Decipheriv,s.createDecipheriv,s.getCiphers,s.listCiphers;var a=r(15380);a.DiffieHellmanGroup,a.createDiffieHellmanGroup,a.getDiffieHellman,a.createDiffieHellman,a.DiffieHellman;var u=r(20);u.createSign,u.Sign,u.createVerify,u.Verify,r(61324);var f=r(97168);f.publicEncrypt,f.privateEncrypt,f.publicDecrypt,f.privateDecrypt;var h=r(76983);h.randomFill,h.randomFillSync},29560:(t,e,r)=>{"use strict";e.utils=r(87626),e.Cipher=r(82808),e.DES=r(82211),e.CBC=r(3389),e.EDE=r(65279)},3389:(t,e,r)=>{"use strict";var n=r(43349),i=r(56698),o={};function s(t){n.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e{"use strict";var n=r(43349);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e{"use strict";var n=r(43349),i=r(56698),o=r(87626),s=r(82808);function a(){this.tmp=new Array(2),this.keys=null}function u(t){s.call(this,t);var e=new a;this._desState=e,this.deriveKeys(e,t.key)}i(u,s),t.exports=u,u.create=function(t){return new u(t)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(t,e){t.keys=new Array(32),n.equal(e.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(e,0),i=o.readUInt32BE(e,4);o.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var s=0;s>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,t.keys,s)}},u.prototype._update=function(t,e,r,n){var i=this._desState,s=o.readUInt32BE(t,e),a=o.readUInt32BE(t,e+4);o.ip(s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,a,i.tmp,0):this._decrypt(i,s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(r,s,n),o.writeUInt32BE(r,a,n+4)},u.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n>>0,s=l}o.rip(a,s,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var s=r,a=e,u=t.keys.length-2;u>=0;u-=2){var f=t.keys[u],h=t.keys[u+1];o.expand(s,t.tmp,0),f^=t.tmp[0],h^=t.tmp[1];var c=o.substitute(f,h),l=s;s=(a^o.permute(c))>>>0,a=l}o.rip(s,a,n,i)}},65279:(t,e,r)=>{"use strict";var n=r(43349),i=r(56698),o=r(82808),s=r(82211);function a(t,e){n.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function u(t){o.call(this,t);var e=new a(this.type,this.options.key);this._edeState=e}i(u,o),t.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},87626:(t,e)=>{"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=e>>>a+s&1,i<<=1,i|=t>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=e>>>a+s&1,o<<=1,o|=t>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var o=0,s=0,a=r.length>>>1,u=0;u>>r[u]&1;for(u=a;u>>r[u]&1;n[i+0]=o>>>0,n[i+1]=s>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(t>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(e>>>18-6*i&63)];return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r>>i[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length{var n=r(48287).Buffer,i=r(4934),o=r(23241),s=r(14910),a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new n(o[t].prime,"hex"),r=new n(o[t].gen,"hex");return new s(e,r)},e.createDiffieHellman=e.DiffieHellman=function t(e,r,o,u){return n.isBuffer(r)||void 0===a[r]?t(e,"binary",r,o):(r=r||"binary",u=u||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,u)),"number"==typeof e?new s(i(e,o),o,!0):(n.isBuffer(e)||(e=new n(e,r)),new s(e,o,!0)))}},14910:(t,e,r)=>{var n=r(48287).Buffer,i=r(66473),o=new(r(52244)),s=new i(24),a=new i(11),u=new i(10),f=new i(3),h=new i(7),c=r(4934),l=r(53209);function p(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this._pub=new i(t),this}function d(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this._priv=new i(t),this}t.exports=y;var m={};function y(t,e,r){this.setGenerator(e),this.__prime=new i(t),this._prime=i.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=p,this.setPrivateKey=d):this._primeCode=8}function _(t,e){var r=new n(t.toArray());return e?r.toString(e):r}Object.defineProperty(y.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in m)return m[n];var i,l=0;if(t.isEven()||!c.simpleSieve||!c.fermatTest(t)||!o.test(t))return l+=1,l+="02"===r||"05"===r?8:4,m[n]=l,l;switch(o.test(t.shrn(1))||(l+=2),r){case"02":t.mod(s).cmp(a)&&(l+=8);break;case"05":(i=t.mod(u)).cmp(f)&&i.cmp(h)&&(l+=8);break;default:l+=4}return m[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),y.prototype.generateKeys=function(){return this._priv||(this._priv=new i(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},y.prototype.computeSecret=function(t){var e=(t=(t=new i(t)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(e.toArray()),o=this.getPrime();if(r.length{var n=r(53209);t.exports=g,g.simpleSieve=y,g.fermatTest=_;var i=r(66473),o=new i(24),s=new(r(52244)),a=new i(1),u=new i(2),f=new i(5),h=(new i(16),new i(8),new i(10)),c=new i(3),l=(new i(7),new i(11)),p=new i(4),d=(new i(12),null);function m(){if(null!==d)return d;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;it;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(f))for(;r.mod(h).cmp(c);)r.iadd(p)}else for(;r.mod(o).cmp(l);)r.iadd(p);if(y(d=r.shrn(1))&&y(r)&&_(d)&&_(r)&&s.test(d)&&s.test(r))return r}}},66473:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(66089).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,h=r;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=c[t],p=l[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:h[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,I=0|s[7],P=8191&I,T=I>>>13,U=0|s[8],F=8191&U,C=U>>>13,O=0|s[9],L=8191&O,N=O>>>13,z=0|a[0],q=8191&z,j=z>>>13,K=0|a[1],Z=8191&K,H=K>>>13,G=0|a[2],V=8191&G,W=G>>>13,$=0|a[3],Y=8191&$,X=$>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,j))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,j))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,q),i=(i=Math.imul(d,j))+Math.imul(m,q)|0,o=Math.imul(m,j);var _t=(f+(n=n+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(l,Z)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,j))+Math.imul(g,q)|0,o=Math.imul(g,j),n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,H)|0;var gt=(f+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(l,V)|0))<<13)|0;f=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,j))+Math.imul(w,q)|0,o=Math.imul(w,j),n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,H)|0,n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,W)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,W)|0;var bt=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,X)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,j))+Math.imul(x,q)|0,o=Math.imul(x,j),n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,H)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,j))+Math.imul(A,q)|0,o=Math.imul(A,j),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(v,V)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,j))+Math.imul(R,q)|0,o=Math.imul(R,j),n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,j))+Math.imul(T,q)|0,o=Math.imul(T,j),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,j))+Math.imul(C,q)|0,o=Math.imul(C,j),n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,j))+Math.imul(N,q)|0,o=Math.imul(N,j),n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,H)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,H))+Math.imul(N,Z)|0,o=Math.imul(N,H),n=n+Math.imul(F,V)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(N,V)|0,o=Math.imul(N,W),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(N,Y)|0,o=Math.imul(N,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ft)|0,n=n+Math.imul(P,ct)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var It=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Pt=(f+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(C,dt)|0))<<13)|0;f=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=It,u[16]=Pt,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function m(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(d=p),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,f=0;f=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&t.negative?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;!(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;!(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;!(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;!(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var _={k256:null,p224:null,p192:null,p25519:null};function g(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(_[t])return _[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return _[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},86729:(t,e,r)=>{"use strict";var n=e;n.version=r(1636).rE,n.utils=r(47011),n.rand=r(15037),n.curve=r(894),n.curves=r(60480),n.ec=r(57447),n.eddsa=r(8650)},36677:(t,e,r)=>{"use strict";var n=r(28490),i=r(47011),o=i.getNAF,s=i.getJSF,a=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<=s;h--)u=(u<<1)+n[h];f.push(u)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),p=i;p>0;p--){for(s=0;s=0;f--){for(var h=0;f>=0&&0===s[f];f--)h++;if(f>=0&&h++,u=u.dblp(h),f<0)break;var c=s[f];a(0!==c),u="affine"===t.type?c>0?u.mixedAdd(i[c-1>>1]):u.mixedAdd(i[-c-1>>1].neg()):c>0?u.add(i[c-1>>1]):u.add(i[-c-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){var a,u,f,h=this._wnafT1,c=this._wnafT2,l=this._wnafT3,p=0;for(a=0;a=1;a-=2){var m=a-1,y=a;if(1===h[m]&&1===h[y]){var _=[e[m],null,null,e[y]];0===e[m].y.cmp(e[y].y)?(_[1]=e[m].add(e[y]),_[2]=e[m].toJ().mixedAdd(e[y].neg())):0===e[m].y.cmp(e[y].y.redNeg())?(_[1]=e[m].toJ().mixedAdd(e[y]),_[2]=e[m].add(e[y].neg())):(_[1]=e[m].toJ().mixedAdd(e[y]),_[2]=e[m].toJ().mixedAdd(e[y].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],b=s(r[m],r[y]);for(p=Math.max(b[0].length,p),l[m]=new Array(p),l[y]=new Array(p),u=0;u=0;a--){for(var x=0;a>=0;){var S=!0;for(u=0;u=0&&x++,k=k.dblp(x),a<0)break;for(u=0;u0?f=c[u][E-1>>1]:E<0&&(f=c[u][-E-1>>1].neg()),k="affine"===f.type?k.mixedAdd(f):k.add(f))}}for(a=0;a=Math.ceil((t.bitLength()+1)/e.step)},f.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i{"use strict";var n=r(47011),i=r(28490),o=r(56698),s=r(36677),a=n.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.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|t.c)}function f(t,e,r,n,o){s.BasePoint.call(this,t,"projective"),null===e&&null===r&&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 i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(e&&!u||!e&&u)&&(a=a.redNeg()),this.point(t,a)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(f,s.BasePoint),u.prototype.pointFromJSON=function(t){return f.fromJSON(this,t)},u.prototype.point=function(t,e,r,n){return new f(this,t,e,r,n)},f.fromJSON=function(t,e){return new f(t,e[0],e[1],e[2])},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),s=o.redSub(r),a=n.redSub(e),u=i.redMul(s),f=o.redMul(a),h=i.redMul(a),c=s.redMul(o);return this.curve.point(u,f,c,h)},f.prototype._projDbl=function(){var t,e,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var f=(n=this.curve._mulA(a)).redAdd(u);this.zOne?(t=s.redSub(a).redSub(u).redMul(f.redSub(this.curve.two)),e=f.redMul(n.redSub(u)),r=f.redSqr().redSub(f).redSub(f)):(i=this.z.redSqr(),o=f.redSub(i).redISub(i),t=s.redSub(a).redISub(u).redMul(o),e=f.redMul(n.redSub(u)),r=f.redMul(o))}else n=a.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(s.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(a.redISub(u)),r=n.redMul(o);return this.curve.point(t,e,r)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(e),f=o.redMul(s),h=a.redMul(u),c=o.redMul(u),l=s.redMul(a);return this.curve.point(f,h,l,c)},f.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),f=i.redAdd(a),h=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),c=n.redMul(u).redMul(h);return this.curve.twisted?(e=n.redMul(f).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(f)):(e=n.redMul(f).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(f)),this.curve.point(c,e,r)},f.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},f.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},f.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},f.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},f.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},894:(t,e,r)=>{"use strict";var n=e;n.base=r(36677),n.short=r(39188),n.mont=r(30370),n.edwards=r(31298)},30370:(t,e,r)=>{"use strict";var n=r(28490),i=r(56698),o=r(36677),s=r(47011);function a(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.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 u(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},a.prototype.point=function(t,e){return new u(this,t,e)},a.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=i.redMul(n),a=e.z.redMul(o.redAdd(s).redSqr()),u=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},39188:(t,e,r)=>{"use strict";var n=r(47011),i=r(28490),o=r(56698),s=r(36677),a=n.assert;function u(t){s.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(t,e,r,n){s.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function h(t,e,r,n){s.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,s,a,u,f,h,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,p=this.n.clone(),d=new i(1),m=new i(0),y=new i(0),_=new i(1),g=0;0!==l.cmpn(0);){var b=p.div(l);f=p.sub(b.mul(l)),h=y.sub(b.mul(d));var v=_.sub(b.mul(m));if(!n&&f.cmp(c)<0)e=u.neg(),r=d,n=f.neg(),o=h;else if(n&&2==++g)break;u=f,p=l,l=f,y=d,d=h,_=m,m=v}s=f.neg(),a=h;var w=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(w)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),f=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(f).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},f.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},f.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},f.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},f.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},f.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(h,s.BasePoint),u.prototype.jpoint=function(t,e,r){return new h(this,t,e,r)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),h=f.redMul(a),c=n.redMul(f),l=u.redSqr().redIAdd(h).redISub(c).redISub(c),p=u.redMul(c.redISub(l)).redISub(o.redMul(h)),d=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(l,p,d)},h.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),h=r.redMul(u),c=a.redSqr().redIAdd(f).redISub(h).redISub(h),l=a.redMul(h.redISub(c)).redISub(i.redMul(f)),p=this.z.redMul(s);return this.curve.jpoint(c,l,p)},h.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},60480:(t,e,r)=>{"use strict";var n,i=e,o=r(77952),s=r(894),a=r(47011).assert;function u(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(74011)}catch(t){n=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},57447:(t,e,r)=>{"use strict";var n=r(28490),i=r(32723),o=r(47011),s=r(60480),a=r(15037),u=o.assert,f=r(61200),h=r(28545);function c(t){if(!(this instanceof c))return new c(t);"string"==typeof t&&(u(Object.prototype.hasOwnProperty.call(s,t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=c,c.prototype.keyPair=function(t){return new f(this,t)},c.prototype.keyFromPrivate=function(t,e){return f.fromPrivate(this,t,e)},c.prototype.keyFromPublic=function(t,e){return f.fromPublic(this,t,e)},c.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(t,e,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),u=t.toArray("be",s),f=new i({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),c=this.n.sub(new n(1)),l=0;;l++){var p=o.k?o.k(l):new n(f.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(c)>=0)){var d=this.g.mul(p);if(!d.isInfinity()){var m=d.getX(),y=m.umod(this.n);if(0!==y.cmpn(0)){var _=p.invm(this.n).mul(y.mul(e.getPrivate()).iadd(t));if(0!==(_=_.umod(this.n)).cmpn(0)){var g=(d.getY().isOdd()?1:0)|(0!==m.cmp(y)?2:0);return o.canonical&&_.cmp(this.nh)>0&&(_=this.n.sub(_),g^=1),new h({r:y,s:_,recoveryParam:g})}}}}}},c.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new h(e,"hex")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),f=u.mul(t).umod(this.n),c=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(f,r.getPublic(),c)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(f,r.getPublic(),c)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(t,e,r,i){u((3&r)===r,"The recovery param is more than two bits"),e=new h(e,i);var o=this.n,s=new n(t),a=e.r,f=e.s,c=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");a=l?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var p=e.r.invm(o),d=o.sub(s).mul(p).umod(o),m=f.mul(p).umod(o);return this.g.mulAdd(d,a,m)},c.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new h(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},61200:(t,e,r)=>{"use strict";var n=r(28490),i=r(47011).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return""}},28545:(t,e,r)=>{"use strict";var n=r(28490),i=r(47011),o=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return!(i<=127)&&(e.place=s,i)}function f(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=u(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=u(t,r);if(!1===s)return!1;var f=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var h=u(t,r);if(!1===h)return!1;if(t.length!==h+r.place)return!1;var c=t.slice(r.place,h+r.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new n(f),this.s=new n(c),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=f(e),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];h(n,e.length),(n=n.concat(e)).push(2),h(n,r.length);var o=n.concat(r),s=[48];return h(s,o.length),s=s.concat(o),i.encode(s,t)}},8650:(t,e,r)=>{"use strict";var n=r(77952),i=r(60480),o=r(47011),s=o.assert,a=o.parseBytes,u=r(46661),f=r(90220);function h(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof h))return new h(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=h,h.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},h.prototype.verify=function(t,e,r){t=a(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},h.prototype.hashInt=function(){for(var t=this.hash(),e=0;e{"use strict";var n=r(47011),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},90220:(t,e,r)=>{"use strict";var n=r(28490),i=r(47011),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},74011:t=>{t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},47011:(t,e,r)=>{"use strict";var n=e,i=r(28490),o=r(43349),s=r(64367);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(t,e,r){var n,i=new Array(Math.max(t.bitLength(),r)+1);for(n=0;n(o>>1)-1?(o>>1)-u:u,s.isubn(a)):a=0,i[n]=a,s.iushrn(1)}return i},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,u=t.andln(3)+i&3,f=e.andln(3)+o&3;3===u&&(u=-1),3===f&&(f=-1),s=1&u?3!=(n=t.andln(7)+i&7)&&5!==n||2!==f?u:-u:0,r[0].push(s),a=1&f?3!=(n=e.andln(7)+o&7)&&5!==n||2!==u?f:-f:0,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},28490:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(79368).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,h=r;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=c[t],p=l[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:h[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,I=0|s[7],P=8191&I,T=I>>>13,U=0|s[8],F=8191&U,C=U>>>13,O=0|s[9],L=8191&O,N=O>>>13,z=0|a[0],q=8191&z,j=z>>>13,K=0|a[1],Z=8191&K,H=K>>>13,G=0|a[2],V=8191&G,W=G>>>13,$=0|a[3],Y=8191&$,X=$>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,j))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,j))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,q),i=(i=Math.imul(d,j))+Math.imul(m,q)|0,o=Math.imul(m,j);var _t=(f+(n=n+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(l,Z)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,j))+Math.imul(g,q)|0,o=Math.imul(g,j),n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,H)|0;var gt=(f+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(l,V)|0))<<13)|0;f=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,j))+Math.imul(w,q)|0,o=Math.imul(w,j),n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,H)|0,n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,W)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,W)|0;var bt=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,X)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,j))+Math.imul(x,q)|0,o=Math.imul(x,j),n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,H)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,j))+Math.imul(A,q)|0,o=Math.imul(A,j),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(v,V)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,j))+Math.imul(R,q)|0,o=Math.imul(R,j),n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,j))+Math.imul(T,q)|0,o=Math.imul(T,j),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,j))+Math.imul(C,q)|0,o=Math.imul(C,j),n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,j))+Math.imul(N,q)|0,o=Math.imul(N,j),n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,H)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,H))+Math.imul(N,Z)|0,o=Math.imul(N,H),n=n+Math.imul(F,V)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(N,V)|0,o=Math.imul(N,W),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(N,Y)|0,o=Math.imul(N,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ft)|0,n=n+Math.imul(P,ct)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var It=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Pt=(f+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(C,dt)|0))<<13)|0;f=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=It,u[16]=Pt,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function m(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(d=p),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,f=0;f=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&t.negative?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;!(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;!(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;!(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;!(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var _={k256:null,p224:null,p192:null,p25519:null};function g(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(_[t])return _[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return _[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},37007:t=>{function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function n(t){return"object"==typeof t&&null!==t}function i(t){return void 0===t}t.exports=e,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},e.prototype.emit=function(t){var e,o,s,a,u,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var h=new Error('Uncaught, unspecified "error" event. ('+e+")");throw h.context=e,h}if(i(o=this._events[t]))return!1;if(r(o))switch(arguments.length){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),o.apply(this,a)}else if(n(o))for(a=Array.prototype.slice.call(arguments,1),s=(f=o.slice()).length,u=0;u0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(t,e){if(!r(e))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(t,i),n||(n=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},e.prototype.removeListener=function(t,e){var i,o,s,a;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(i=this._events[t]).length,o=-1,i===e||r(i.listener)&&i.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(n(i)){for(a=s;a-- >0;)if(i[a]===e||i[a].listener&&i[a].listener===e){o=a;break}if(o<0)return this;1===i.length?(i.length=0,delete this._events[t]):i.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},e.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},e.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},e.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},e.listenerCount=function(t,e){return t.listenerCount(e)}},68078:(t,e,r)=>{var n=r(92861).Buffer,i=r(88276);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),u=n.alloc(o||0),f=n.alloc(0);s>0||o>0;){var h=new i;h.update(f),h.update(t),e&&h.update(e),f=h.digest();var c=0;if(s>0){var l=a.length-s;c=Math.min(s,f.length),f.copy(a,l,0,c),s-=c}if(c0){var p=u.length-o,d=Math.min(o,f.length-c);f.copy(u,p,c,c+d),o-=d}}return f.fill(0),{key:a,iv:u}}},4729:(t,e,r)=>{"use strict";var n=r(17417).Buffer,i=r(28399).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(56698)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer")}(t),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},17417:(t,e,r)=>{var n=r(48287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},77952:(t,e,r)=>{var n=e;n.utils=r(67426),n.common=r(66166),n.sha=r(46229),n.ripemd=r(46784),n.hmac=r(28948),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},66166:(t,e,r)=>{"use strict";var n=r(67426),i=r(43349);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o{"use strict";var n=r(67426),i=r(43349);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e{"use strict";var n=r(67426),i=r(66166),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,f=i.BlockHash;function h(){if(!(this instanceof h))return new h;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function l(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(h,f),e.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],f=this.h[3],h=this.h[4],g=r,b=n,v=i,w=f,k=h,M=0;M<80;M++){var x=s(o(u(r,c(M,n,i,f),t[d[M]+e],l(M)),y[M]),h);r=h,h=f,f=o(i,10),i=n,n=x,x=s(o(u(g,c(79-M,b,v,w),t[m[M]+e],p(M)),_[M]),k),g=k,k=w,w=o(v,10),v=b,b=x}x=a(this.h[1],i,w),this.h[1]=a(this.h[2],f,k),this.h[2]=a(this.h[3],h,g),this.h[3]=a(this.h[4],r,b),this.h[4]=a(this.h[0],n,v),this.h[0]=x},h.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],_=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},46229:(t,e,r)=>{"use strict";e.sha1=r(43917),e.sha224=r(47714),e.sha256=r(2287),e.sha384=r(21911),e.sha512=r(57766)},43917:(t,e,r)=>{"use strict";var n=r(67426),i=r(66166),o=r(66225),s=n.rotl32,a=n.sum32,u=n.sum32_5,f=o.ft_1,h=i.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,h),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n{"use strict";var n=r(67426),i=r(2287);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},2287:(t,e,r)=>{"use strict";var n=r(67426),i=r(66166),o=r(66225),s=r(43349),a=n.sum32,u=n.sum32_4,f=n.sum32_5,h=o.ch32,c=o.maj32,l=o.s0_256,p=o.s1_256,d=o.g0_256,m=o.g1_256,y=i.BlockHash,_=[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 g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=_,this.W=new Array(64)}n.inherits(g,y),t.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n{"use strict";var n=r(67426),i=r(57766);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},57766:(t,e,r)=>{"use strict";var n=r(67426),i=r(66166),o=r(43349),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,f=n.shr64_lo,h=n.sum64,c=n.sum64_hi,l=n.sum64_lo,p=n.sum64_4_hi,d=n.sum64_4_lo,m=n.sum64_5_hi,y=n.sum64_5_lo,_=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;_.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function v(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function w(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function k(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function M(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function x(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function S(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function E(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function A(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function B(t,e){var r=s(t,e,1)^s(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function D(t,e){var r=a(t,e,1)^a(t,e,8)^f(t,e,7);return r<0&&(r+=4294967296),r}function R(t,e){var r=s(t,e,19)^s(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}function I(t,e){var r=a(t,e,19)^a(e,t,29)^f(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(b,_),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n{"use strict";var n=r(67426).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},67426:(t,e,r)=>{"use strict";var n=r(43349),i=r(56698);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u=0,f=e;return u+=(f=f+n>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,f){var h=0,c=e;return h+=(c=c+n>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,f){return e+n+o+a+f>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},32723:(t,e,r)=>{"use strict";var n=r(77952),i=r(64367),o=r(43349);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=s,s.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.lengththis.waiter.seqid?(n=this.waiter,this.waiter={cb:e,seqid:r},n.cb(new Error("our seqid="+n.seqid+" was preempted by "+r))):e(new Error("our seqid="+r+" is too stale (since "+this.waiter.seqid+" is ahead of us)")),this._decref()):r>this.seqid?this.waiter={seqid:r,cb:e}:(e(new Error("our seqid="+r+" is too stale (since "+this.seqid+" is already in flight)")),this._decref())},t.prototype.release=function(){var t,e;return null!=this.waiter?(e=this.waiter,this.seqid=e.seqid,t=e.cb,this.waiter=null,t(null,this)):(this.open=!0,this.seqid=null),this._decref()},t}(),e.SingleFlightTable=function(){function t(){this._jobs={}}return t.prototype._create=function(t){var e;return e=t.key,this._jobs[e]=new i({table:this,key:e})},t.prototype._remove=function(t){var e;return e=t.key,delete this._jobs[e]},t.prototype.enter=function(t,e){var r,n,i;return i=t.seqid,r=t.key,(n=this._jobs[r]||this._create({key:r}))._incref(),n._enter({seqid:i},e)},t}()}).call(this)},96761:function(t){(function(){t.exports={k:"__iced_k",k_noop:"__iced_k_noop",param:"__iced_p_",ns:"iced",runtime:"runtime",Deferrals:"Deferrals",deferrals:"__iced_deferrals",fulfill:"_fulfill",b_while:"_break",t_while:"_while",c_while:"_continue",n_while:"_next",n_arg:"__iced_next_arg",defer_method:"defer",slot:"__slot",assign_fn:"assign_fn",autocb:"autocb",retslot:"ret",trace:"__iced_trace",passed_deferral:"__iced_passed_deferral",findDeferral:"findDeferral",lineno:"lineno",parent:"parent",filename:"filename",funcname:"funcname",catchExceptions:"catchExceptions",runtime_modes:["node","inline","window","none","browserify","interp"],trampoline:"trampoline",context:"context",defer_arg:"__iced_defer_"}}).call(this)},46618:function(t,e,r){(function(){var t,n,i,o,s,a=[].slice;t=r(96761),e.iced=n=r(96081),s=function(t,e,r,i){var o,s,u,f,h,c;h=n.findDeferral(arguments),s=new n.Rendezvous,i[0]=s.id(!0).defer({assign_fn:function(){return o=a.call(arguments,0)},lineno:20,context:c}),u=setTimeout(s.id(!1).defer({lineno:21,context:c}),e),c=new n.Deferrals((function(){return r&&(r[0]=f),f&&clearTimeout(u),t.apply(null,o)}),{parent:h,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced"}),s.wait(c.defer({assign_fn:function(){return f=arguments[0]},lineno:22})),c._fulfill()},e.timeout=function(t,e,r){var n;return s(t,e,r,n=[]),n[0]},i=function(t,e,r){var i,o,s;o=n.findDeferral(arguments),s=new n.Deferrals((function(){return i||(e[0]=!1),t()}),{parent:o,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced"}),r[0]=s.defer({assign_fn:function(){return i=arguments[0]},lineno:40}),s._fulfill()},e.iand=function(t,e){var r;return i(t,e,r=[]),r[0]},o=function(t,e,r){var i,o,s;o=n.findDeferral(arguments),s=new n.Deferrals((function(){return i&&(e[0]=!0),t()}),{parent:o,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced"}),r[0]=s.defer({assign_fn:function(){return i=arguments[0]},lineno:59}),s._fulfill()},e.ior=function(t,e){var r;return o(t,e,r=[]),r[0]},e.Pipeliner=function(){function e(e,r){this.window=e||1,this.delay=r||0,this.queue=[],this.n_out=0,this.cb=null,this[t.deferrals]=this,this.defer=this._defer}return e.prototype.waitInQueue=function(t){var e,r,i;e=n.findDeferral(arguments),(i=this,function(t){var o;o=function(t){var s,a;if(s=t,a=function(){return n.trampoline((function(){return o(t)}))},!(i.n_out>=i.window))return s();!function(t){r=new n.Deferrals(t,{parent:e,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced",funcname:"Pipeliner.waitInQueue"}),i.cb=r.defer({lineno:101}),r._fulfill()}(a)},o(t)})(function(i){return function(){i.n_out++,function(t){if(!i.delay)return t();!function(t){r=new n.Deferrals(t,{parent:e,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced",funcname:"Pipeliner.waitInQueue"}),setTimeout(r.defer({lineno:109}),i.delay),r._fulfill()}(t)}((function(){return t()}))}}(this))},e.prototype.__defer=function(t,e){var r,i,o,s,u,f;o=n.findDeferral(arguments),u=this,f=function(){if(u.n_out--,u.cb)return r=u.cb,u.cb=null,r()},s=new n.Deferrals(f,{parent:o,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced",funcname:"Pipeliner.__defer"}),i=s.defer({lineno:123}),t[0]=function(){var t,r;return t=1<=arguments.length?a.call(arguments,0):[],null!=(r=e.assign_fn)&&r.apply(null,t),i()},s._fulfill()},e.prototype._defer=function(t){var e;return e=[],this.__defer(e,t),e[0]},e.prototype.flush=function(t){var e,r,i,o,s;r=t,e=n.findDeferral(arguments),o=this,i=function(t){var r,a;if(r=t,a=function(){return n.trampoline((function(){return i(t)}))},!o.n_out)return r();!function(t){s=new n.Deferrals(t,{parent:e,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced",funcname:"Pipeliner.flush"}),o.cb=s.defer({lineno:152}),s._fulfill()}(a)},i(r)},e}()}).call(this)},41060:function(t,e,r){(function(){var t,n,i,o,s,a;for(e.const=r(96761),s=0,a=(i=[r(96081),r(46618)]).length;s")+" ("+e[t.filename]+":"+(e[t.lineno]+1)+")"},f=function(t){return"undefined"!=typeof console&&null!==console?console.error("ICED warning: "+t):void 0},e.trampoline=u=function(t){return a(500)?null!=(null!=n?n.nextTick:void 0)?n.nextTick(t):setTimeout(t):t()},e.Deferrals=function(){function t(t,e){this.trace=e,this.continuation=t,this.count=1,this.ret=null}return t.prototype._call=function(t){var e;return this.continuation?(h=t,e=this.continuation,this.continuation=null,e(this.ret)):f("Entered dead await at "+l(t))},t.prototype._fulfill=function(t,e){if(!(--this.count>0))return u((r=this,function(){return r._call(e)}));var r},t.prototype.defer=function(t){return this.count++,o(this,t,null,this.trace)},t}(),e.findDeferral=function(e){var r,n,i;for(n=0,i=e.length;n{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,h=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+c],c+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,f=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*m}},56698:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},64634:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},16462:function(t,e,r){(function(){var e,n,i,o,s,a,u,f;e=r(75656).openpgp.public_key_algorithms,u=r(16357).RSA,n=r(57563).DSA,a=r(32293).ElGamal,o=r(63493).ECDSA,i=r(5757).ECDH,s=r(16662).EDDSA,f=function(t){switch(t){case e.RSA:case e.RSA_ENCRYPT_ONLY:case e.RSA_SIGN_ONLY:return u;case e.ELGAMAL:return a;case e.DSA:return n;case e.ECDSA:return o;case e.ECDH:return i;case e.EDDSA:return s;default:throw new Error("unknown public key system: "+t)}},t.exports={get_class:f,RSA:u,DSA:n,ElGamal:a}}).call(this)},54295:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c;f=r(41060),h=r(75656),t=h.openpgp,i=h.kb,c=r(90927),o=c.SHA256,c.SHA512,a=r(92975),u=r(56507).util.bufeq_secure,s=r(17260).SRF,e.BaseKey=function(){function t(){}return t.alloc=function(t,e,r){var n,i,o,s,u,f,h;for(null==r&&(r={}),o=e.length,n=null,s=0,u=(f=t.ORDER).length;so)return t(n=new Error("Can't hide > "+o+" bits; got "+r));h=o-r+l,function(t){d=new f.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/basekeypair.iced",funcname:"BaseKeyPair.hide"}),s().random_nbit(h,d.defer({assign_fn:function(){return u=arguments[0]},lineno:127})),d._fulfill()}((function(){return t(c=u.multiply(a).add(i))}))}((function(){return e(n,c)}))},e.prototype.validity_check=function(t){return this.pub.validity_check(t)},e.prototype._dsa_verify_update_and_check_hash=function(t,e){var r,i,o,s,a,u,h,c,l,p;h=f.findDeferral(arguments),u=t.sig,r=t.data,s=t.hasher,o=t.hash,a=t.klass,i=null,n.isBuffer(u)&&(l=a.read_sig_from_buf(u),i=l[0],u=l[1]),o||(o=s(r)),(p=this,function(t){if(2!==u.length)return t(i=new Error("Need an [r,s] pair for a DSA-style signature"));!function(t){c=new f.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/basekeypair.iced",funcname:"BaseKeyPair._dsa_verify_update_and_check_hash"}),p.pub.verify(u,o,c.defer({assign_fn:function(){return i=arguments[0],arguments[1]},lineno:148})),c._fulfill()}(t)})((function(){return e(i)}))},e}()}).call(this)},11620:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a;a=r(50585),s=a.nbv,o=a.nbi,i=a.BigInteger,r(92975).nbs,r(86459).buffer_to_ui8a,e.BaseX=t=function(){function t(t){var e,r,n,i,o;for(this.alphabet=t,this.base=this.alphabet.length,this.basebn=s(this.base),this.lookup={},r=n=0,i=(o=this.alphabet).length;n0;)t=n.divideAndRemainder(this.basebn),a=t[0],u=t[1],e=this.alphabet[u.intValue()],n=a,r.push(e);return r}.call(this)).reverse(),s=[],f=0,h=t.length;fh;a=0<=h?++t:--t)e.push(0);return e}()),d=t.slice(h),a=l=d.length-1;l>=0;a=l+=-1){if(r=d[a],null==(o=this.lookup[r]))throw new Error("Value passed is not a valid BaseX string.");u=u.add(e.multiply(s(o))),e=e.multiply(this.basebn)}return n.concat([f,n.from(u.toByteArray())])},t}(),e.base58=new t("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),e.base32=new t("abcdefghijkmnpqrstuvwxyz23456789"),e.base91=new t("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`~!@#$%^&*()-_=+{}[]|;:,<>./?")}).call(this)},92975:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d;l=(d=r(50585)).nbv,f=d.nbi,t=d.BigInteger,h=d.nbits,r(86459).buffer_to_ui8a,c=function(t,e){return null==e&&(e=10),f().fromString(t,e)},s=function(t){return t.toByteArray().length},p=function(t){var e,r,i;return i=8*((e=t.toByteArray()).length-1)+h(e[0]),(r=n.alloc(2)).writeUInt16BE(i,0),n.concat([r,n.from(e)])},a=function(t){var e,r,i,o,s;return e=i=null,t.length<2?e=new Error("need at least 2 bytes; got "+t.length):(r=n.from(t.slice(0,2)),t=t.slice(2),o=r.readUInt16BE(0),s=Math.ceil(o/8),t.length>3,i=(1<<(s=e%8))-1,n=a=u=(t=t.slice(0,t.length-o)).length-1;u<=0?a<=0:a>=0;n=u<=0?++a:--a)r=t.readUInt8(n)>>s,n>0&&(r|=(t.readUInt8(n-1)&i)<<8-s),t.writeUInt8(r,n);return t},i=function(t,e){var r,n,i,o;return 8*t.length<=e?f().fromBuffer(t):(n=(e>>3)+((i=e%8)?1:0),r=t.slice(0,n),o=f().fromBuffer(r),i>0&&(o=o.shiftRight(8-i)),o)},e.toMPI=p,e.nbs=c,e.mpi_from_buffer=a,e.mpi_to_padded_octets=u,e.buffer_shift_right=o,e.bn_from_left_n_bits=i,t.prototype.to_mpi_buffer=function(){return p(this)},t.prototype.mpi_byte_length=function(){return s(this)},t.prototype.to_padded_octets=function(t){return u(this,t)},e.BigInteger=t,e.nbi=f,e.nbv=l,e.nbits=h}).call(this)},75656:function(t,e){(function(){var t,r,n;for(r in e.openpgp={public_key_algorithms:{RSA:1,RSA_ENCRYPT_ONLY:2,RSA_SIGN_ONLY:3,ELGAMAL:16,DSA:17,ECDH:18,ECDSA:19,ELGAMAL_SIGN_AND_ENCRYPT:20,EDDSA:22},symmetric_key_algorithms:{CAST5:3,AES128:7,AES192:8,AES256:9},hash_algorithms:{MD5:1,SHA1:2,RIPEMD160:3,SHA256:8,SHA384:9,SHA512:10,SHA224:11},sig_subpacket:{creation_time:2,expiration_time:3,exportable_certificate:4,trust_signature:5,regular_expression:6,revocable:7,key_expiration_time:9,preferred_symmetric_algorithms:11,revocation_key:12,issuer:16,notation_data:20,preferred_hash_algorithms:21,preferred_compression_algorithms:22,key_server_preferences:23,preferred_key_server:24,primary_user_id:25,policy_uri:26,key_flags:27,signers_user_id:28,reason_for_revocation:29,features:30,signature_target:31,embedded_signature:32,issuer_fingerprint:33,experimental_low:101,experimental_high:110},sig_types:{binary_doc:0,canonical_text:1,issuer:16,persona:17,casual:18,positive:19,subkey_binding:24,primary_binding:25,direct:31,key_revocation:32,subkey_revocation:40,certificate_revocation:48},message_types:{generic:0,public_key:4,private_key:5,signature:8,clearsign:9},s2k:{plain:0,salt:1,salt_iter:3,gnu:101,gnu_dummy:1001},s2k_convention:{none:0,checksum:255,sha1:254},ecdh:{param_bytes:3,version:1},packet_tags:{PKESK:1,signature:2,one_pass_sig:4,secret_key:5,public_key:6,secret_subkey:7,compressed:8,literal:11,public_subkey:14,userid:13,user_attribute:17,SEIPD:18,MDC:19},literal_formats:{binary:98,text:116,utf8:117},versions:{PKESK:3,SEIPD:1,one_pass_sig:3,keymaterial:{V4:4},signature:{V2:2,V3:3,V4:4}},signatures:{key:153,userid:180,user_attribute:209},key_flags:{certify_keys:1,sign_data:2,encrypt_comm:4,encrypt_storage:8,private_split:16,auth:32,shared:128},features:{modification_detection:1},key_server_preferences:{no_modify:128},compression:{none:0,zip:1,zlib:2,bzip:3}},e.kb={key_encryption:{none:0,triplesec_v1:1,triplesec_v2:2,triplesec_v3:3},packet_tags:{p3skb:513,signature:514,encryption:515},public_key_algorithms:{NACL_EDDSA:32,NACL_DH:33},versions:{V1:1},padding:{EMSA_PCKS1_v1_5:3,RSASSA_PSS:4},key_defaults:{primary:{expire_in:0,nbits:{RSA:4096,ECDSA:384,DSA:2048}},sub:{expire_in:252288e3,nbits:{RSA:2048,ECDH:256,ECDSA:256,DSA:2048,ELGAMAL:2048}}},kid:{version:1,trailer:10,algo:8,len:32}},e.ops={encrypt:1,decrypt:2,verify:4,sign:8},e.header={version:"Keybase OpenPGP",comment:"https://keybase.io/crypto"},t={default_key_expire_in:126144e3})n=t[r],e[r]=n}).call(this)},57563:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d,m,y,_={}.hasOwnProperty,g=function(t,e){for(var r in e)_.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};c=r(41060),(h=r(92975)).nbits,h.nbv,h.BigInteger,p=r(17260),f=p.SRF,p.MRF,(d=r(86459)).bufeq_secure,d.ASP,r(30647).make_esc,l=r(75656),o=l.openpgp,l.kb,m=r(54295),t=m.BaseKey,i=m.BaseKeyPair,y=r(17260),f=y.SRF,y.MRF,u=function(e){function r(t){this.p=t.p,this.q=t.q,this.g=t.g,this.y=t.y}return g(r,e),r.type=o.public_key_algorithms.DSA,r.prototype.type=r.type,r.ORDER=["p","q","g","y"],r.prototype.ORDER=r.ORDER,r.alloc=function(e){return t.alloc(r,e)},r.prototype.trunc_hash=function(t){return h.bn_from_left_n_bits(t,this.q.bitLength())},r.prototype.nbits=function(){var t;return null!=(t=this.p)?t.bitLength():void 0},r.prototype.verify=function(t,e,r){var n,i,o,s,a,u,f;return o=t[0],s=t[1],n=null,i=this.trunc_hash(e),f=s.modInverse(this.q),a=i.multiply(f).mod(this.q),u=o.multiply(f).mod(this.q),this.g.modPow(a,this.p).multiply(this.y.modPow(u,this.p)).mod(this.p).mod(this.q).equals(o)||(n=new Error("verification failed")),r(n)},r}(t),a=function(e){function r(t){this.x=t.x,this.pub=t.pub}return g(r,e),r.ORDER=["x"],r.prototype.ORDER=r.ORDER,r.alloc=function(e,n){return t.alloc(r,e,{pub:n})},r.prototype.sign=function(t,e){var r,n,i,o,s,a,u,l,p,d,m,y;l=c.findDeferral(arguments),d=this.pub,o=d.p,s=d.q,r=d.g,n=this.pub.trunc_hash(t),m=this,y=function(){return i=i.add(h.BigInteger.ONE),a=r.modPow(i,o).mod(s),u=i.modInverse(s).multiply(n.add(m.x.multiply(a))).mod(s),e([a,u])},p=new c.Deferrals(y,{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/dsa.iced",funcname:"Priv.sign"}),f().random_zn(s.subtract(h.nbv(2)),p.defer({assign_fn:function(){return i=arguments[0]},lineno:76})),p._fulfill()},r}(t),s=function(t){function e(t){var r,n;n=t.pub,r=t.priv,e.__super__.constructor.call(this,{pub:n,priv:r})}return g(e,t),e.Pub=u,e.prototype.Pub=u,e.Priv=a,e.prototype.Priv=a,e.type=o.public_key_algorithms.DSA,e.prototype.type=e.type,e.prototype.get_type=function(){return this.type},e.klass_name="DSA",e.parse=function(t){return i.parse(e,t)},e.prototype.can_encrypt=function(){return!1},e.prototype.fulfills_flags=function(t){return(t&this.good_for_flags())===t},e.prototype.good_for_flags=function(){return o.key_flags.certify_keys|o.key_flags.sign_data},e.prototype.verify_unpad_and_check_hash=function(t,r){var n,i,o,s;return s=t.sig,n=t.data,o=t.hasher,i=t.hash,this._dsa_verify_update_and_check_hash({sig:s,data:n,hasher:o,hash:i,klass:e},r)},e.prototype.pad_and_sign=function(t,e,r){var i,o,s,a,u,f,h;u=c.findDeferral(arguments),(o=e.hasher)||(o=SHA512),i=o(t),(h=this,function(t){f=new c.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/dsa.iced",funcname:"Pair.pad_and_sign"}),h.priv.sign(i,f.defer({assign_fn:function(){return a=arguments[0]},lineno:128})),f._fulfill()})((function(){return r(null,n.concat(function(){var t,e,r;for(r=[],t=0,e=a.length;to;r=0<=o?++i:--i)e[t.length-1-r]=t[r];return e},e.prototype.decrypt=function(t,r){return t=e.reverse_buf(t),v.alloc({}).scalarmult(t,r)},e.prototype.generate=function(t){var r,n,i,o,s;i=g.findDeferral(arguments),(s=this,function(t){o=new g.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/ecc/curves.iced",funcname:"Curve25519.generate"}),s.random_scalar(o.defer({assign_fn:function(){return n=arguments[0]},lineno:290})),o._fulfill()})((function(){return r=v.alloc({}).scalarmult_base(n),n=e.reverse_buf(n),t({x:n,R:r})}))},e}(i),e.nist_p256=w=function(){var t,e,r,n,o,u;return u=s("FFFFFFFF 00000001 00000000 00000000 00000000 FFFFFFFF FFFFFFFF FFFFFFFF"),r=s("FFFFFFFF 00000001 00000000 00000000 00000000 FFFFFFFF FFFFFFFF FFFFFFFC"),n=s("5AC635D8 AA3A93E7 B3EBBD55 769886BC 651D06B0 CC53B0F6 3BCE3C3E 27D2604B"),o=s("FFFFFFFF 00000000 FFFFFFFF FFFFFFFF BCE6FAAD A7179E84 F3B9CAC2 FC632551"),t=s("6B17D1F2 E12C4247 F8BCE6E5 63A440F2 77037D81 2DEB33A0 F4A13945 D898C296"),e=s("4FE342E2 FE1A7F9B 8EE7EB4A 7C0F9E16 2BCE3357 6B315ECE CBB64068 37BF51F5"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.nist_p256})},e.nist_p384=k=function(){var t,e,r,n,o,u;return u=s("ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff"),r=s("ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc"),n=s("b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef"),o=s("ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973"),t=s("aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7"),e=s("3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.nist_p384})},e.nist_p521=M=function(){var t,e,r,n,o,u;return u=s("000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff"),r=s("000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc"),n=s("00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00"),o=s("000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409"),t=s("000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66"),e=s("00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.nist_p521})},e.brainpool_p256=d=function(){var t,e,r,n,o,u;return u=s("a9fb57db a1eea9bc 3e660a90 9d838d72 6e3bf623 d5262028 2013481d 1f6e5377"),r=s("7d5a0975 fc2c3057 eef67530 417affe7 fb8055c1 26dc5c6c e94a4b44 f330b5d9"),n=s("26dc5c6c e94a4b44 f330b5d9 bbd77cbf 95841629 5cf7e1ce 6bccdc18 ff8c07b6"),o=s("a9fb57db a1eea9bc 3e660a90 9d838d71 8c397aa3 b561a6f7 901e0e82 974856a7"),t=s("8bd2aeb9 cb7e57cb 2c4b482f fc81b7af b9de27e1 e3bd23c2 3a4453bd 9ace3262"),e=s("547ef835 c3dac4fd 97f8461a 14611dc9 c2774513 2ded8e54 5c1d54c7 2f046997"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.brainpool_p256})},e.brainpool_p384=m=function(){var t,e,r,n,o,u;return u=s("8cb91e82 a3386d28 0f5d6f7e 50e641df 152f7109 ed5456b4 12b1da19 7fb71123 acd3a729 901d1a71 87470013 3107ec53"),r=s("7bc382c6 3d8c150c 3c72080a ce05afa0 c2bea28e 4fb22787 139165ef ba91f90f 8aa5814a 503ad4eb 04a8c7dd 22ce2826"),n=s("04a8c7dd 22ce2826 8b39b554 16f0447c 2fb77de1 07dcd2a6 2e880ea5 3eeb62d5 7cb43902 95dbc994 3ab78696 fa504c11"),o=s("8cb91e82 a3386d28 0f5d6f7e 50e641df 152f7109 ed5456b3 1f166e6c ac0425a7 cf3ab6af 6b7fc310 3b883202 e9046565"),t=s("1d1c64f0 68cf45ff a2a63a81 b7c13f6b 8847a3e7 7ef14fe3 db7fcafe 0cbd10e8 e826e034 36d646aa ef87b2e2 47d4af1e"),e=s("8abe1d75 20f9c2a4 5cb1eb8e 95cfd552 62b70b29 feec5864 e19c054f f9912928 0e464621 77918111 42820341 263c5315"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.brainpool_p384})},e.brainpool_p512=y=function(){var t,e,r,n,o,u;return u=s("aadd9db8 dbe9c48b 3fd4e6ae 33c9fc07 cb308db3 b3c9d20e d6639cca 70330871 7d4d9b00 9bc66842 aecda12a e6a380e6 2881ff2f 2d82c685 28aa6056 583a48f3"),r=s("7830a331 8b603b89 e2327145 ac234cc5 94cbdd8d 3df91610 a83441ca ea9863bc 2ded5d5a a8253aa1 0a2ef1c9 8b9ac8b5 7f1117a7 2bf2c7b9 e7c1ac4d 77fc94ca"),n=s("3df91610 a83441ca ea9863bc 2ded5d5a a8253aa1 0a2ef1c9 8b9ac8b5 7f1117a7 2bf2c7b9 e7c1ac4d 77fc94ca dc083e67 984050b7 5ebae5dd 2809bd63 8016f723"),o=s("aadd9db8 dbe9c48b 3fd4e6ae 33c9fc07 cb308db3 b3c9d20e d6639cca 70330870 553e5c41 4ca92619 41866119 7fac1047 1db1d381 085ddadd b5879682 9ca90069"),t=s("81aee4bd d82ed964 5a21322e 9c4c6a93 85ed9f70 b5d916c1 b43b62ee f4d0098e ff3b1f78 e2d0d48d 50d1687b 93b97d5f 7c6d5047 406a5e68 8b352209 bcb9f822"),e=s("7dde385d 566332ec c0eabfa9 cf7822fd f209f700 24a57b1a a000c55b 881f8111 b2dcde49 4a5f485e 5bca4bd8 8a2763ae d1ca2b2f a8f05406 78cd1e0f 3ad80892"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.brainpool_p512})},e.cv25519=_=function(){return new o({oid:a.cv25519})},a={nist_p256:n.from([42,134,72,206,61,3,1,7]),nist_p384:n.from([43,129,4,0,34]),nist_p521:n.from([43,129,4,0,35]),brainpool_p256:n.from([43,36,3,3,2,8,1,1,7]),brainpool_p384:n.from([43,36,3,3,2,8,1,1,11]),brainpool_p512:n.from([43,36,3,3,2,8,1,1,13]),cv25519:n.from([43,6,1,4,1,151,85,1,5,1])},u={},a)S=a[b],u[S.toString("hex")]=e[b];for(b in f={Curve25519:_,"NIST P-256":w,"NIST P-384":k,brainpoolP256r1:d,brainpoolP384r1:m,brainpoolP512r1:y},a)f[b]=e[b];e.alloc_by_oid=function(t){var e,r,i;return n.isBuffer(t)&&(t=t.toString("hex")),r=e=null,null!=(i=u[t.toLowerCase()])?e=i():r=new Error("Unknown curve OID: "+t),[r,e]},e.alloc_by_nbits=function(t){var e,r,n;return n=e=null,t||(t=256),null!=(r=function(){switch(t){case 256:return w;case 384:return k;case 521:return M;default:return null}}())?n=r():e=new Error("No curve for "+t+" bits"),[e,n]},e.alloc_by_name=function(t){var e,r,n;return n=r=null,null!=(e=f[t])?r=e():n=new Error("Unknown curve name: "+t),[n,r]}}).call(this)},5757:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E={}.hasOwnProperty,A=function(t,e){for(var r in e)E.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};m=r(41060),k=r(86459),b=k.uint_to_buffer,k.bufeq_secure,k.ASP,_=r(30647).make_esc,y=r(75656),s=y.openpgp,M=r(54295),o=M.BaseKeyPair,i=M.BaseKey,l=r(4486).ecc_pkcs5_pad_data,x=r(65280),p=x.generate,t=x.BaseEccKey,d=r(90927),g=r(20776),c=r(94077).SlicerBuffer,S=r(93829),w=S.wrap,v=S.unwrap,h=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return A(r,e),r.type=s.public_key_algorithms.ECDH,r.prototype.type=r.type,r.prototype.apply_defaults=function(){return this.cipher||(this.cipher=g.get_cipher()),this.hasher||(this.hasher=d.SHA512)},r.prototype.read_params=function(t){var e,r,n,i;if((r=t.read_uint8())<(e=s.ecdh.param_bytes))throw new Error("Need at least "+e+" bytes of params; got "+r);if((i=t.read_uint8())!==(n=s.ecdh.version))throw new Error("Cannot deal with future extensions, byte="+i+"; wanted "+n);return this.hasher=d.alloc_or_throw(t.read_uint8()),this.cipher=g.get_cipher(t.read_uint8()),t.advance(r-3)},r.alloc=function(e){return t.alloc(r,e)},r.prototype.serialize_params=function(){return n.concat([b(8,s.ecdh.param_bytes),b(8,s.ecdh.version),b(8,this.hasher.type),b(8,this.cipher.type)])},r.prototype.serialize=function(){return n.concat([r.__super__.serialize.call(this),this.serialize_params()])},r.prototype.format_params=function(t){var e;return e=t.fingerprint,n.concat([b(8,this.curve.oid.length),this.curve.oid,b(8,this.type),this.serialize_params(),n.from("Anonymous Sender ","utf8"),e])},r.prototype.kdf=function(t){var e,r,i,o,s;return e=t.X,s=t.params,o=this.cipher.key_size,r=this.curve.point_to_mpi_buffer_compact(e),i=n.concat([n.from([0,0,0,1]),r,s]),this.hasher(i).slice(0,o)},r.prototype.encrypt=function(t,e,r){var n,i,o,s,a,u,f,h,c;f=m.findDeferral(arguments),s=e.fingerprint,(c=this,function(t){h=new m.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdh.iced",funcname:"Pub.encrypt"}),c.curve.encrypt(c.R,h.defer({assign_fn:function(){return o=arguments[0].V,i=arguments[0].S},lineno:97})),h._fulfill()})(function(e){return function(){return u=e.format_params({fingerprint:s}),a=e.kdf({X:i,params:u}),n=w({key:a,plaintext:t,cipher:e.cipher}),r({V:o,C:n})}}(this))},r}(t),f=function(t){function e(t){this.x=t.x,this.pub=t.pub}return A(e,t),e.ORDER=["x"],e.prototype.ORDER=e.ORDER,e.prototype.serialize=function(){return this.pub.curve.coord_to_mpi_buffer(this.x)},e.alloc=function(t,r){var n,i,o,s,a,u,f,h,c;for(a=t.length,o=null,n=r.curve,i={pub:r},u=0,f=(h=e.ORDER).length;u0?n=new Error("bad r"):s.signum()<=0||a.compareTo(this.curve.p)>0?n=new Error("bad s"):(o=this.curve.n,h=a.modInverse(o),u=i.multiply(h).mod(o),f=s.multiply(h).mod(o),this.curve.G.multiplyTwo(u,this.R,f).affineX.mod(o).equals(s)||(n=new Error("verification failed"))),r(n)},r}(t),f=function(t){function e(t){this.x=t.x,this.pub=t.pub}return b(e,t),e.ORDER=["x"],e.prototype.ORDER=e.ORDER,e.alloc=function(t,r){return i.alloc(e,t,{pub:r})},e.prototype.sign=function(t,e){var r,n,i,o,s,a,u,f,h,c,l;f=p.findDeferral(arguments),c=this.pub.curve,s=c.n,r=c.G,i=this.pub.trunc_hash(t),(l=this,function(t){h=new p.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdsa.iced",funcname:"Priv.sign"}),l.pub.curve.random_scalar(h.defer({assign_fn:function(){return o=arguments[0]},lineno:79})),h._fulfill()})(function(t){return function(){if(n=r.multiply(o),0===(a=n.affineX.mod(s)).signum())throw new Error("invalid r-value");return u=o.modInverse(s).multiply(i.add(t.x.multiply(a))).mod(s),e([a,u])}}(this))},e}(i),u=function(t){function e(t){var r,n;n=t.pub,r=t.priv,e.__super__.constructor.call(this,{pub:n,priv:r})}return b(e,t),e.Pub=h,e.prototype.Pub=h,e.Priv=f,e.prototype.Priv=f,e.type=s.public_key_algorithms.ECDSA,e.prototype.type=e.type,e.klass_name="ECDSA",e.prototype.get_type=function(){return this.type},e.parse=function(t){return o.parse(e,t)},e.prototype.can_encrypt=function(){return!1},e.subkey_algo=function(t){return t&(s.key_flags.certify_keys|s.key_flags.sign_data)?e:a},e.prototype.fulfills_flags=function(t){return(t&(s.key_flags.certify_keys|s.key_flags.sign_data))===t},e.prototype.verify_unpad_and_check_hash=function(t,r){var n,i,o,s;return s=t.sig,n=t.data,o=t.hasher,i=t.hash,this._dsa_verify_update_and_check_hash({sig:s,data:n,hasher:o,hash:i,klass:e},r)},e.prototype.pad_and_sign=function(t,e,r){var i,o,s,a,u,f,h;u=p.findDeferral(arguments),(o=e.hasher)||(o=SHA512),i=o(t),(h=this,function(t){f=new p.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdsa.iced",funcname:"Pair.pad_and_sign"}),h.priv.sign(i,f.defer({assign_fn:function(){return a=arguments[0]},lineno:134})),f._fulfill()})((function(){return r(null,n.concat(function(){var t,e,r;for(r=[],t=0,e=a.length;t256||e<216?n=new Error("Got an unexpected number of Bits for an EdDSA value: "+e):(r=2+Math.ceil(e/8),i=t.slice(2,r),t=t.slice(r)),[n,i,t]},e.read_sig_from_buf=function(t){var r,n,i,o,s,a;return s=t.length,o=["r","s"],n=null,r=function(){var r,i,s,u;for(u=[],r=0,i=o.length;r=0&&(e&o)===e?i=this.key:n=new Error("Key not found"),r(n,i)},r.prototype.get_keypair=function(){return this.key},r.prototype.get_primary_keypair=function(){return this.key},r.prototype.can_verify=function(){return!0},r.prototype.can_sign=function(){var t;return null!=(t=this.key)?t.can_sign():void 0},r.prototype.eq=function(t){return this.key.eq(t.key)},r.import_private=function(t,e){var i,s,a,u,f,h,c;if(h=M.findDeferral(arguments),s=t.hex,u=t.raw,i=f=null,null!=s)try{u=n.from(s,"hex")}catch(t){return e(t)}c=new M.Deferrals((function(){return null==i&&(f=new r({key:a})),e(i,f)}),{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"KeyManager.import_private"}),o.import_private({raw:u},c.defer({assign_fn:function(){return i=arguments[0],a=arguments[1]},lineno:69})),c._fulfill()},r.import_public=function(t,e){var i,a,u,f,h,c,l,p;if(c=M.findDeferral(arguments),a=t.hex,f=t.raw,i=h=null,null!=a)try{f=n.from(a,"hex")}catch(t){return e(t)}p=o.parse_kb(f),i=p[0],u=p[1],function(t){if(null==i)return t(h=new r({key:u}));!function(t){l=new M.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"KeyManager.import_public"}),s.import_public({raw:f},l.defer({assign_fn:function(){return i=arguments[0],h=arguments[1]},lineno:84})),l._fulfill()}(t)}((function(){return e(i,h)}))},r.prototype.check_public_eq=function(t){return this.eq(t)},r.prototype.export_public=function(t,e){return t.asp,t.regen,e(null,this.key.ekid().toString("hex"))},r.prototype.export_private=function(t,e){var r,n,i,o,s,a;o=M.findDeferral(arguments),t.asp,n=t.p3skb,t.passphrase,r=i=null,(a=this,function(t){if(n)return t(r=new Error("No support yet for P3SKB encrypted secret key exports"));!function(t){s=new M.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"KeyManager.export_private"}),a.key.export_secret_key_kb({},s.defer({assign_fn:function(){return r=arguments[0],i=arguments[1]},lineno:106})),s._fulfill()}(t)})((function(){return e(r,i)}))},r.prototype.export_server_half=function(){var t;return null!=(t=this.server_half)?t.toString("hex"):void 0},r.prototype.get_ekid=function(){return this.get_keypair().ekid()},r.prototype.get_fp2=function(){return this.get_ekid()},r.prototype.get_fp2_formatted=function(){return y.encode(this.get_fp2())},r.prototype.get_type=function(){return"kb"},r.prototype.make_sig_eng=function(){return new c({km:this})},r.prototype.verify_raw=function(t,e){var r,n,i,o;return i=t.sig,r=t.payload,n=t.prefix,new h({key:null!=(o=this.key)?o.ekid():void 0,payload:r,prefix:n,sig:i,detached:!0}).verify(e)},r}(f),s=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return P(r,t),r.generate=function(t,e){return t.algo=i,t.klass=r,u.generate(t,e)},r.prototype.make_sig_eng=function(){return null},r.prototype.can_sign=function(){return!1},r.prototype.can_verify=function(){return!1},r.prototype.can_encrypt=function(){return!0},r.prototype.can_decrypt=function(){var t;return null!=(null!=(t=this.key)?t.priv:void 0)},r.import_private=function(t,e){var i,o,s,a,u,f;if(u=M.findDeferral(arguments),o=t.hex,a=t.raw,i=null,null!=o)try{a=n.from(o,"hex")}catch(t){return e(t)}f=new M.Deferrals((function(){return e(i,s)}),{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"EncKeyManager.import_private"}),r.generate({seed:a},f.defer({assign_fn:function(){return i=arguments[0],s=arguments[1]},lineno:158})),f._fulfill()},r.prototype.get_mask=function(){return e.key_flags.encrypt_comm|e.key_flags.encrypt_storage},r.import_public=function(t,e){var o,s,a,u,f,h;if(s=t.hex,u=t.raw,f=null,null!=s)try{u=n.from(s,"hex")}catch(t){return e(t)}return o=(h=i.parse_kb(u))[0],a=h[1],null==o&&(f=new r({key:a})),e(o,f)},r}(u),A=function(t){var e,r,i,o,s;if(e=t.armored,r=t.binary,i=t.rawobj,o=t.require_packet_hash,null==e&&null==i&&null==r)return[new Error("need either 'armored' or 'binary' or 'rawobj'"),null];if(null!=e&&(r=n.from(e,"base64")),null!=r)try{i=v.unseal(r,{strict:o})}catch(t){return[t,null]}return[(s=d(i))[0],s[1],r]},E=function(t,e){var r,n,i,o,s,a,f,h,c,l,p;l=M.findDeferral(arguments),r=t.armored,n=t.binary,f=t.rawobj,i=t.encrypt_for,a=t.prefix,h=t.require_packet_hash,o=S(e,"unbox"),p=new M.Deferrals((function(){null!=a&&(s.prefix=a),p=new M.Deferrals((function(){return null!=c.keypair&&(c.km=new u({key:c.keypair})),null!=c.sender_keypair&&(c.sender_km=new u({key:c.sender_keypair})),null!=c.receiver_keypair&&(c.receiver_km=new u({key:c.receiver_keypair})),e(null,c,n)}),{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),s.unbox({encrypt_for:i},o(p.defer({assign_fn:function(){return c=arguments[0]},lineno:203}))),p._fulfill()}),{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),m(A({armored:r,binary:n,rawobj:f,require_packet_hash:h}),o(p.defer({assign_fn:function(){return s=arguments[0],n=arguments[1]},lineno:201}))),p._fulfill()},_=function(t,e){var r,n,i,o,s,u,f,c,l,p,d,m,y,_,b;y=M.findDeferral(arguments),u=t.msg,m=t.sign_with,o=t.encrypt_for,r=t.anonymous,f=t.nonce,p=t.prefix,i=t.dohash,s=S(e,"box"),u=g(u),b=function(){return c=l.frame_packet(),i||(i=!1),d=v.seal({obj:c,dohash:i}),n=d.toString("base64"),e(null,n,d,l.sig)},null!=o?function(t){_=new M.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),a.box({sign_with:m,encrypt_for:o,plaintext:u,anonymous:r,nonce:f},s(_.defer({assign_fn:function(){return l=arguments[0]},lineno:220}))),_._fulfill()}(b):function(t){_=new M.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),h.box({km:m,payload:u,prefix:p},s(_.defer({assign_fn:function(){return l=arguments[0]},lineno:222}))),_._fulfill()}(b)},B=function(t,e){var r,n,i,o,s,a,f,h,c,l;c=M.findDeferral(arguments),r=t.armored,n=t.binary,s=t.kid,f=t.require_packet_hash,o=S(e),i=null,l=new M.Deferrals((function(){l=new M.Deferrals((function(){return h.km.check_public_eq(a)||(i=new w.WrongSigningKeyError("Got wrong signing key")),e(i,h.payload)}),{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),E({armored:r,binary:n,require_packet_hash:f},o(l.defer({assign_fn:function(){return h=arguments[0]},lineno:235}))),l._fulfill()}),{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),u.import_public({hex:s},o(l.defer({assign_fn:function(){return a=arguments[0]},lineno:234}))),l._fulfill()},k=function(t){var e,r,n;return e=t.armored,[(n=b({armored:e}))[0],null!=(r=n[1])?r.body:void 0]},b=function(t){var r;return r=t.armored,[null,{body:n.from(r,"base64"),type:e.message_types.generic,payload:r}]},c=function(t){function e(t){this.km=t.km}return P(e,t),e.prototype.get_km=function(){return this.km},e.prototype.get_unverified_payload_from_raw_sig_body=function(t,e){var r,n,i,o,s,a,u;a=M.findDeferral(arguments),r=t.body,s=t.require_packet_hash,n=S(e,"get_payload_from_raw_sig_body"),u=new M.Deferrals((function(){u=new M.Deferrals((function(){return e(null,i.payload)}),{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.get_unverified_payload_from_raw_sig_body"}),m(d(o),n(u.defer({assign_fn:function(){return i=arguments[0]},lineno:270}))),u._fulfill()}),{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.get_unverified_payload_from_raw_sig_body"}),p((function(){return v.unseal(r,{strict:s})}),n(u.defer({assign_fn:function(){return o=arguments[0]},lineno:269}))),u._fulfill()},e.prototype.get_body=function(t,e){var r;return e((r=k(t))[0],r[1])},e.prototype.box=function(t,e,r){var n,i,o,s,a,u,f,h,c,l;f=M.findDeferral(arguments),s=(c=null!=r?r:{}).prefix,i=c.dohash,o=S(e,"SignatureEngine::box"),(l=this,function(e){h=new M.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.box"}),_({msg:t,prefix:s,sign_with:l.km,dohash:i},o(h.defer({assign_fn:function(){return n=arguments[0],a=arguments[1],u=arguments[2]},lineno:283}))),h._fulfill()})((function(){return e(null,{type:"kb",armored:n,kb:n,raw:a,sig:u})}))},e.prototype.unbox=function(t,e,r){var i,o,s,a,u,f,h,c,l,p;h=M.findDeferral(arguments),null==r&&(r={}),a=S(e,"SignatureEngine::unbox"),s=u=null,(i=n.isBuffer(t)?{binary:t}:{armored:t}).prefix=r.prefix,i.require_packet_hash=r.require_packet_hash,l=this,p=function(){return f.km.eq(l.km)?u=f.payload:(f.km.get_ekid().toString("hex"),l.km.get_ekid().toString("hex"),s=new w.WrongSigningKeyError("Got wrong signing key")),e(s,u,o)},c=new M.Deferrals(p,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.unbox"}),E(i,a(c.defer({assign_fn:function(){return f=arguments[0],o=arguments[1]},lineno:296}))),c._fulfill()},e}(l),t.exports={box:_,unbox:E,unbox_decode:A,KeyManager:u,EncKeyManager:s,decode_sig:b,get_sig_body:k,encode:v,verify:B}}).call(this)},21194:function(t,e,r){(function(){var t,n,i,o,s;n=r(75656).kb,i=r(81768).P3SKB,o=r(13105).Signature,t=r(10838).Encryption,s=function(t){try{return[null,t()]}catch(t){return[t,null]}},e.alloc=function(e){var r,a,u,f,h;return f=e.tag,r=e.body,h=function(){switch(f){case n.packet_tags.p3skb:return s((function(){return i.alloc({tag:f,body:r})}));case n.packet_tags.signature:return s((function(){return o.alloc({tag:f,body:r})}));case n.packet_tags.encryption:return s((function(){return t.alloc({tag:f,body:r})}));default:return[a=new Error("unknown packet tag: "+f),null]}}(),a=h[0],u=h[1],[a,u]}}).call(this)},75226:function(t,e,r){(function(){var t,n,i;r(86459),i=r(14174).seal,t=r(75656).kb,n=function(){function e(){}return e.prototype.frame_packet=function(){return{tag:this.tag(),body:this.get_packet_body()}},e.prototype.frame_packet_armored=function(t){var e,r;return e=t.dohash,r=this.frame_packet(),i({obj:r,dohash:e}).toString("base64")},e.prototype.is_signature=function(){return!1},e.prototype.is_p3skb=function(){return!1},e.alloc=function(e){var n,i,o,s;return s=e.tag,n=e.body,i=null,o=function(){switch(s){case t.packet_tags.p3skb:return r(81768).P3SKB.alloc({tag:s,body:n});case t.packet_tags.signature:return r(13105).Signature.alloc({tag:s,body:n});default:return i=new Error("unknown packet tag: "+s),null}}(),[i,o]},e.prototype.unbox=function(t,e){return e(new Error("unbox() unimplemented for tag="+this.tag))},e}(),e.Packet=n}).call(this)},10838:function(t,e,r){(function(){var t,n,i,o,s,a,u,f={}.hasOwnProperty;s=r(41060),a=r(75656),n=a.kb,a.openpgp,i=r(75226).Packet,u=r(30647).make_esc,o=r(70021).dh,t=function(t){function e(t){this.encrypt_for=t.encrypt_for,this.sign_with=t.sign_with,this.plaintext=t.plaintext,this.ciphertext=t.ciphertext,this.sender_key=t.sender_key,this.nonce=t.nonce,this.anonymous=t.anonymous,e.__super__.constructor.call(this),this.ephemeral=!1}return function(t,e){for(var r in e)f.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.ENC_TYPE=n.public_key_algorithms.NACL_DH,e.tag=function(){return n.packet_tags.encryption},e.prototype.tag=function(){return e.tag()},e.prototype.get_packet_body=function(){var t;return t=e.ENC_TYPE,{sender_key:this.sender_key,ciphertext:this.ciphertext,nonce:this.nonce,enc_type:t,receiver_key:this.receiver_key}},e.alloc=function(t){var r,n,i,o,s,a;if(a=t.tag,i=t.body,s=null,null!=(o=a!==e.tag()?new Error("wrong tag found: "+a):(r=i.enc_type)!==(n=e.ENC_TYPE)?o=new Error("Expected Curve25519 DH (type "+n+"); got "+r):(s=new e(i),null)))throw o;return s},e.prototype.is_signature=function(){return!1},e.prototype.get_sender_keypair=function(t,e){var r,n,i,a,u,f,h;u=s.findDeferral(arguments),a=t.sign_with,r=t.encrypt,n=i=null,(h=this,function(t){if(null!=a)return t(i=a.get_keypair());!function(t){if(null!=h.sign_with)return t(i=h.sign_with.get_keypair());!function(t){if(null!=h.sender_keypair)return t(i=h.sender_keypair);!function(t){var e;if(!r)return t(null!=h.sender_key?(e=o.Pair.parse_kb(h.sender_key),n=e[0],h.sender_keypair=e[1],null==n?i=h.sender_keypair:void 0):n=new Error("Cannot encrypt without a sender keypair"));!function(t){var e;f=new s.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.get_sender_keypair"}),o.Pair.generate({},f.defer({assign_fn:(e=h,function(){return n=arguments[0],e.sender_keypair=arguments[1]}),lineno:56})),f._fulfill()}((function(){return i=h.sender_keypair,t(h.ephemeral=!0)}))}(t)}(t)}(t)})((function(){return e(n,i)}))},e.prototype.encrypt=function(t,e){var r,n,i,o,a,f;o=s.findDeferral(arguments),r=u(e,"encrypt"),(f=this,function(t){a=new s.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.encrypt"}),f.get_sender_keypair({encrypt:!0},r(a.defer({assign_fn:function(){return i=arguments[0]},lineno:71}))),a._fulfill()})(function(t){return function(){var u,f;n=t.encrypt_for.get_keypair(),a=new s.Deferrals((function(){return t.anonymous&&!t.ephemeral||(t.sender_key=i.ekid()),t.anonymous||(t.receiver_key=n.ekid()),e(null)}),{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.encrypt"}),n.encrypt_kb({plaintext:t.plaintext,sender:i,nonce:t.nonce},r(a.defer({assign_fn:(u=t,f=t,function(){return u.ciphertext=arguments[0].ciphertext,f.nonce=arguments[0].nonce}),lineno:73}))),a._fulfill()}}(this))},e.prototype.decrypt=function(t,e){var r,n,i,o,a,f,h,c,l;h=s.findDeferral(arguments),f=t.sign_with,n=t.encrypt_for,i=u(e,"decrypt"),(l=this,function(t){c=new s.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.decrypt"}),l.get_sender_keypair({sign_with:f},i(c.defer({assign_fn:function(){return a=arguments[0]},lineno:82}))),c._fulfill()})(function(t){return function(){var u;r={ciphertext:t.ciphertext,nonce:t.nonce,sender:a},o=n.get_keypair(),c=new s.Deferrals((function(){return e(null,{sender_keypair:a,plaintext:t.plaintext,receiver_keypair:o})}),{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.decrypt"}),o.decrypt_kb(r,i(c.defer({assign_fn:(u=t,function(){return u.plaintext=arguments[0]}),lineno:85}))),c._fulfill()}}(this))},e.prototype.unbox=function(t,e){var r,n,i,o,a,u;o=s.findDeferral(arguments),r=t.encrypt_for,(u=this,function(t){a=new s.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.unbox"}),u.decrypt({encrypt_for:r},a.defer({assign_fn:function(){return n=arguments[0],i=arguments[1]},lineno:91})),a._fulfill()})((function(){return e(n,i)}))},e.box=function(t,r){var n,i,o,a,u,f,h,c,l;c=s.findDeferral(arguments),h=t.sign_with,i=t.encrypt_for,f=t.plaintext,n=t.anonymous,a=t.nonce,u=new e({sign_with:h,encrypt_for:i,plaintext:f,anonymous:n,nonce:a}),l=new s.Deferrals((function(){return null!=o&&(u=null),r(o,u)}),{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.box"}),u.encrypt({},l.defer({assign_fn:function(){return o=arguments[0]},lineno:98})),l._fulfill()},e}(i),e.Encryption=t}).call(this)},81768:function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h={}.hasOwnProperty;s=r(41060),n=r(75656).kb,a=r(31093),r(90927).SHA512,t=a.Decryptor,a.prng.native_rng,o=r(75226).Packet,(u=r(14174)).pack,u.box,r(30647).make_esc,r(16357),(f=r(86459)).bufeq_secure,f.bufferify,i=function(e){function r(t){var e,i;this.pub=t.pub,i=t.priv_clear,e=t.priv,this.type=t.type,r.__super__.constructor.call(this),this.priv=null!=e?e:null!=i?{data:i,encryption:n.key_encryption.none}:void 0}return function(t,e){for(var r in e)h.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.tag=function(){return n.packet_tags.p3skb},r.prototype.tag=function(){return r.tag()},r.prototype.get_packet_body=function(){var t;return t={pub:this.pub,priv:this.priv},null!=this.type&&(t.type=this.type),t},r.prototype.lock=function(t,e){var r,i,o,a,u,f,h,c;f=s.findDeferral(arguments),r=t.asp,u=t.tsenc,a=t.passphrase_generation,(c=this,function(t){h=new s.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/p3skb.iced",funcname:"P3SKB.lock"}),u.run({data:c.priv.data,progress_hook:null!=r?r.progress_hook():void 0},h.defer({assign_fn:function(){return o=arguments[0],i=arguments[1]},lineno:30})),h._fulfill()})(function(t){return function(){return null==o&&(t.priv.data=i,t.priv.encryption=n.key_encryption.triplesec_v3,null!=a&&(t.priv.passphrase_generation=a)),e(o)}}(this))},r.prototype.unlock=function(e,r){var i,o,a,u,f,h,c,l,p,d,m,y;d=s.findDeferral(arguments),o=e.asp,p=e.tsenc,h=e.passphrase_generation,(y=this,function(e){switch(y.priv.encryption){case n.key_encryption.triplesec_v3:case n.key_encryption.triplesec_v2:case n.key_encryption.triplesec_v1:u=new t({enc:p}),c=null!=o?o.progress_hook():void 0,function(t){m=new s.Deferrals(t,{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/p3skb.iced",funcname:"P3SKB.unlock"}),u.run({data:y.priv.data,progress_hook:c},m.defer({assign_fn:function(){return f=arguments[0],l=arguments[1]},lineno:42})),m._fulfill()}((function(){return u.scrub(),e(null==f?(y.priv.data=l,y.priv.encryption=n.key_encryption.none):null!=(i=h)&&null!=(a=y.priv.passphrase_generation)&&i!==a?f=new Error("Decryption failed, likely due to old passphrase (wanted v"+i+" but got v"+a+") ["+f.toString()+"]"):void 0)}));break;case n.key_encryption.none:return e();default:return e(f=new Error("Unknown key encryption type: "+k.encryption))}})((function(){return r(f)}))},r.alloc=function(t){var e,n;if(n=t.tag,e=t.body,n===r.tag())return new r(e);throw new Error("wrong tag found: "+n)},r.prototype.has_private=function(){return null!=this.priv},r.prototype.is_locked=function(){return this.priv.encryption!==n.key_encryption.none},r.prototype.get_private_data=function(){var t;return null!=(t=this.priv)?t.data:void 0},r.prototype.get_public_data=function(){return this.pub},r.prototype.get_key_type=function(){return this.type},r.prototype.is_p3skb=function(){return!0},r}(o),e.P3SKB=i}).call(this)},13105:function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h={}.hasOwnProperty;a=r(41060),u=r(75656),n=u.kb,t=u.openpgp,i=r(75226).Packet,f=r(30647).make_esc,s=r(70021).eddsa,o=function(e){function r(t){var e;this.key=t.key,this.payload=t.payload,this.sig=t.sig,this.detached=t.detached,null!=(e=t.prefix)&&(this.prefix=e),r.__super__.constructor.call(this)}return function(t,e){for(var r in e)h.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.SIG_TYPE=n.public_key_algorithms.NACL_EDDSA,r.HASH_TYPE=t.hash_algorithms.SHA512,r.tag=function(){return n.packet_tags.signature},r.prototype.tag=function(){return r.tag()},r.prototype.get_packet_body=function(){var t,e,n;return n=r.SIG_TYPE,t=r.HASH_TYPE,e={key:this.key,payload:this.payload,sig:this.sig,detached:this.detached,sig_type:n,hash_type:t},null!=this.prefix&&(e.prefix=this.prefix),e},r.alloc=function(t){var e,n,i,o,s,a;if(a=t.tag,i=t.body,s=null,null!=(o=a!==r.tag()?new Error("wrong tag found: "+a):(e=i.hash_type)!==(n=r.HASH_TYPE)?new Error("Expected SHA512 (type "+n+"); got "+e):(e=i.sig_type)!==(n=r.SIG_TYPE)?o=new Error("Expected EDDSA (type "+n+"); got "+e):(s=new r(i),null)))throw o;return s},r.prototype.is_signature=function(){return!0},r.prototype.verify=function(t){var e,r,n,i,o,u,h;i=a.findDeferral(arguments),r=f(t,"verify"),u=s.Pair.parse_kb(this.key),e=u[0],n=u[1],(h=this,function(t){if(null!=e)return t();!function(t){o=new a.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/signature.iced",funcname:"Signature.verify"}),n.verify_kb(h,r(o.defer({lineno:61}))),o._fulfill()}(t)})(function(r){return function(){return t(e,{keypair:n,payload:r.payload})}}(this))},r.prototype.unbox=function(t,e){var r,n,i,o,s;i=a.findDeferral(arguments),(s=this,function(t){o=new a.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/signature.iced",funcname:"Signature.unbox"}),s.verify(o.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:67})),o._fulfill()})((function(){return e(r,n)}))},r.box=function(t,e){var n,i,o,s,u,h,c,l,p,d;p=a.findDeferral(arguments),o=t.km,c=t.prefix,h=t.payload,i=f(e,"@sign"),u=o.get_keypair(),n=!0,d=new a.Deferrals((function(){return s=new r({key:u.ekid(),payload:h,sig:l,detached:n,prefix:c}),e(null,s)}),{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/signature.iced",funcname:"Signature.box"}),u.sign_kb({payload:h,prefix:c,detached:n},i(d.defer({assign_fn:function(){return l=arguments[0]},lineno:76}))),d._fulfill()},r}(i),e.Signature=o,e.sign=o.sign}).call(this)},2568:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o;o=r(41060),t=r(17260).SRF,e.bufxor=i=function(t,e){var r,i,o;return r=function(){var r,n,s;for(s=[],o=r=0,n=t.length;r1)n=new Error("specify only one of `encrypt_for`, `encryption_keys` and `encryption_key`");else if(null!=this.encrypt_for)for(this.encryption_keys=[],i=a=0,u=(f=this.encrypt_for=e(this.encrypt_for)).length;athis._end||this.i>this.buf.length)throw new Error("read off the end of the packet @"+this.i+"/"+this.buf.length+"/"+this._end)},t.prototype.read_uint8=function(){var t;return t=this.buf.readUInt8(this.i++),this.check(),t},t.prototype.read_uint16=function(){var t;return t=this.buf.readUInt16BE(this.i),this.i+=2,this.check(),t},t.prototype.read_uint32=function(){var t;return t=this.buf.readUInt32BE(this.i),this.i+=4,this.check(),t},t.prototype.read_buffer_at_most=function(t){return this.read_buffer(Math.min(t,this.rem()))},t.prototype.read_buffer=function(t){var e;return e=this.buf.slice(this.i,this.i+t),this.i+=t,this.check(),e},t.prototype.end=function(){return this._end||this.buf.length},t.prototype.peek_rest_to_buffer=function(){return this.buf.slice(this.i,this.end())},t.prototype.consume_rest_to_buffer=function(){var t;return t=this.peek_rest_to_buffer(),this.i=this.end(),t},t.prototype.advance=function(t){return null==t&&(t=1),this.i+=t},t.prototype.peek_to_buffer=function(t){return this.buf.slice(this.i,this.i+t)},t.prototype.peek_uint8=function(){return this.buf.readUInt8(this.i)},t.prototype.peek_uint16=function(){return this.buf.readUInt16BE(this.i)},t.prototype.read_string=function(){return this.read_buffer(this.read_uint8())},t.prototype.read_v4_length=function(){var t,e;return t=!1,[(e=this.peek_uint8())<192?(this.advance(1),e):e<224?this.read_uint16()-49152+192:e<255?(this.advance(1),1<<(31&e)):(this.advance(1),t=!0,this.read_uint32()),t]},t}(),e.SlicerBuffer=t}).call(this)},6657:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,I,P={}.hasOwnProperty;M=r(41060),x=r(30647).make_esc,h=r(68304).OnePassSignature,D=r(67022),m=D.Signature,a=D.CreationTime,u=D.Issuer,s=r(50179).Compressed,f=r(55395).Literal,B=r(86459).unix_time,d=r(17260).SRF,A=r(31093),R=r(20776),w=R.export_key_pgp,k=R.get_cipher,E=A.util.scrub_buffer,y=A.WordArray,I=r(75408),l=I.SEIPD,c=I.PKESK,o=r(75656).openpgp,p=r(90927).SHA512,v=r(57004).encode,_=r(70379),g=r(23725),t=r(39740).BaseBurner,b=n.from(function(){var t,e;for(e=[],t=0;t<16;t++)e.push(0);return e}()),i=function(t){function e(t){var r,n,i,o,s;this.literals=t.literals,this.opts=t.opts,o=t.sign_with,n=t.encrypt_for,s=t.signing_key,i=t.encryption_key,r=t.asp,e.__super__.constructor.call(this,{sign_with:o,encrypt_for:n,signing_key:s,encryption_key:i,asp:r}),this.packets=[],this.opts||(this.opts={}),this.signed_payload=null}return function(t,e){for(var r in e)P.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype._frame_literals=function(t){var e,r,i,o,s,a,u;s=M.findDeferral(arguments),e=x(t,"Burner::_frame_literals"),o=[],(u=this,function(t){var n,f,h,c;h=u.literals,f=h.length,n=0,c=function(t){var l;if(l=function(){return M.trampoline((function(){return++n,c(t)}))},!(n>>24&255,e[r+1]=o>>>16&255,e[r+2]=o>>>8&255,e[r+3]=255&o,e[r+4]=n>>>24&255,e[r+5]=n>>>16&255,e[r+6]=n>>>8&255,e[r+7]=255&n;return e},t.prototype._decrypt_ui8a=function(t){var e,r,n,i,o,s,a;for(i=t.length,e=new Uint8Array(i),r=a=0;a>>24&255,e[r+1]=o>>>16&255,e[r+2]=o>>>8&255,e[r+3]=255&o,e[r+4]=n>>>24&255,e[r+5]=n>>16&255,e[r+6]=n>>8&255,e[r+7]=255&n;return e},t.prototype.keySchedule=function(t){var e,r,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g;for(h=function(){var e,r,n,i;for(i=[],e=0,r=(n=t.words).length;e>>2]>>>24-8*(3&e[2])&255],c^=n.sBox[5][h[e[3]>>>2]>>>24-8*(3&e[3])&255],c^=n.sBox[6][h[e[4]>>>2]>>>24-8*(3&e[4])&255],c^=n.sBox[7][h[e[5]>>>2]>>>24-8*(3&e[5])&255],c^=n.sBox[l[o]][h[e[6]>>>2]>>>24-8*(3&e[6])&255],h[e[0]]=c;for(o=y=0;y<4;o=++y)r=n.scheduleB[f][o],c=n.sBox[4][h[r[0]>>>2]>>>24-8*(3&r[0])&255],c^=n.sBox[5][h[r[1]>>>2]>>>24-8*(3&r[1])&255],c^=n.sBox[6][h[r[2]>>>2]>>>24-8*(3&r[2])&255],c^=n.sBox[7][h[r[3]>>>2]>>>24-8*(3&r[3])&255],c^=n.sBox[4+o][h[r[4]>>>2]>>>24-8*(3&r[4])&255],s[a]=c,a++}for(g=[],i=_=0;_<16;i=++_)this.masking[i]=s[i],g.push(this.rotate[i]=31&s[16+i]);return g},t.prototype.f1=function(t,e,r){var i,o;return i=(o=e+t)<>>32-r,(n.sBox[0][i>>>24]^n.sBox[1][i>>>16&255])-n.sBox[2][i>>>8&255]+n.sBox[3][255&i]},t.prototype.f2=function(t,e,r){var i,o;return i=(o=e^t)<>>32-r,n.sBox[0][i>>>24]-n.sBox[1][i>>>16&255]+n.sBox[2][i>>>8&255]^n.sBox[3][255&i]},t.prototype.f3=function(t,e,r){var i,o;return i=(o=e-t)<>>32-r,(n.sBox[0][i>>>24]+n.sBox[1][i>>>16&255]^n.sBox[2][i>>>8&255])-n.sBox[3][255&i]},t}(),e.CAST5=t}).call(this)},66206:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u;o=(u=r(31093)).ciphers,i=u.WordArray,t=o.AES,a=function(e){var r,o,s,a,u,f,h,c,l,p;return r=e.block_cipher_class,h=e.key,a=e.cipher,l=e.plaintext,f=e.iv,r||(r=t),a||(a=new r(i.from_buffer(h))),o=a.blockSize,s=i.from_buffer(f.slice(0,o)),p=0,c=function(){var t;for(t=[];l.length>p;)a.encryptBlock(s.words,0),u=s,s=i.from_buffer(l.slice(p,p+o)),u.xor(s,{n_words:s.words.length}),p+=o,s=u,t.push(u.to_buffer());return t}(),n.concat(c).slice(0,l.length)},s=function(e){var r,o,s,a,u,f,h,c,l,p,d;return o=e.block_cipher_class,c=e.key,a=e.cipher,u=e.ciphertext,h=e.iv,o||(o=t),a||(a=new o(i.from_buffer(c))),s=a.blockSize,h||(h=n.from(function(){var t,e;for(e=[],t=0;0<=s?ts;0<=s?++t:--t)e.push(0);return e}())),r=i.from_buffer(h.slice(0,s)),d=0,l=function(){var t;for(t=[];u.length>d;)a.encryptBlock(r.words,0),f=r,r=i.from_buffer(u.slice(d,d+s)),f.xor(r,{}),d+=s,t.push(f.to_buffer());return t}(),(p=n.concat(l)).slice(p,u.length)},e.encrypt=a,e.decrypt=s}).call(this)},70379:function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,I={}.hasOwnProperty;b=r(41060),x=r(30647).make_esc,B=r(67022),u=B.Signature,o=B.CreationTime,s=B.Issuer,D=r(86459),c=D.bufferify,E=D.unix_time,r(17260).SRF,S=r(31093),(R=r(20776)).export_key_pgp,R.get_cipher,S.util.scrub_buffer,S.WordArray,M=r(75656),t=M.openpgp,n=r(51342),(g=r(90927)).SHA512,_=r(57004).encode,l=r(56507).armor.clearsign_header,a=r(55395).Literal,h=r(66681).Base,e.input_to_cleartext=v=function(t){var e;return e=t.split(/\n/),{show:c(w(e)),sign:c(k(e))}},e.dash_escape=d=function(t){return t.length>=1&&"-"===t[0]?"- "+t:t},e.dash_unescape_line=m=function(t){var e,r,n;return r=!1,[null!=(e=t.match(/^-( )?(.*?)$/))?(1!==(null!=(n=e[1])?n.length:void 0)&&(r=!0),e[2]):t,r]},e.dash_unescape_lines=y=function(t,e){var r,n,i;return null==e&&(e=null),function(){var o,s,a,u;for(u=[],r=o=0,s=t.length;o=0&&""===n[i];i+=-1)r++;return r>0&&n.pop(),n.join("\r\n")},e.whitespace_strip=A=function(t){var e;return(e=(t=t.replace(/\r/g,"")).match(/^(.*?)([ \t]*)$/))?e[1]:t},i=function(){function e(t){this.msg=t.msg,this.signing_key=t.signing_key,this.now=t.now,this.hasher=t.hasher}return e.prototype._fix_msg=function(t){return this._cleartext=v(this.msg.toString("utf8")),t(null)},e.prototype._sign_msg=function(e){var r,n,i,a;n=b.findDeferral(arguments),this.sig=new u({hasher:this.hasher,sig_type:t.sig_types.canonical_text,key:this.signing_key.key,hashed_subpackets:[new o(this.now||E())],unhashed_subpackets:[new s(this.signing_key.get_key_id())]}),(a=this,function(t){var e;i=new b.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner._sign_msg"}),a.sig.write(a._cleartext.sign,i.defer({assign_fn:(e=a,function(){return r=arguments[0],e._sig_output=arguments[1]}),lineno:118})),i._fulfill()})(function(t){return function(){return e(r,t._sig_output)}}(this))},e.prototype.scrub=function(){},e.prototype.hasher_name=function(){return this.sig.hasher.algname},e.prototype._encode=function(e){return e(null,l(n,this._cleartext.show,this.hasher_name())+_(t.message_types.signature,this._sig_output))},e.prototype.run=function(t){var e,r,n,i,o,s;i=b.findDeferral(arguments),r=x(t,"ClearSigner::run"),(s=this,function(t){o=new b.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner.run"}),s._fix_msg(r(o.defer({lineno:140}))),o._fulfill()})(function(s){return function(){o=new b.Deferrals((function(){o=new b.Deferrals((function(){return t(null,e,n)}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner.run"}),s._encode(r(o.defer({assign_fn:function(){return e=arguments[0]},lineno:142}))),o._fulfill()}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner.run"}),s._sign_msg(r(o.defer({assign_fn:function(){return n=arguments[0]},lineno:141}))),o._fulfill()}}(this))},e}(),f=function(e){function r(t){var e,n;n=t.packets,this.clearsign=t.clearsign,e=t.keyfetch,this.now=t.now,this.assert_pgp_hash=t.assert_pgp_hash,r.__super__.constructor.call(this,{packets:n,keyfetch:e})}return function(t,e){for(var r in e)I.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype._reformat_text=function(e){var r;return r=c(p(this.clearsign.lines)),this._literal=new a({data:r,format:t.literal_formats.utf8,date:this.now||E()}),e(null)},r.prototype._make_hasher=function(t){var e,r;return e=null,r=(this.clearsign.headers.hash||"MD5").trim(),null==(this._sig.hasher=g[r])&&(e=new Error("Unknown hash algorithm: "+r)),t(e)},r.prototype._verify=function(t){var e,r,n,i,o;n=b.findDeferral(arguments),r={now:this.now,assert_pgp_hash:this.assert_pgp_hash},(o=this,function(t){i=new b.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier._verify"}),o._sig.verify([o._literal],i.defer({assign_fn:function(){return e=arguments[0]},lineno:184}),r),i._fulfill()})((function(){return t(e)}))},r.prototype._check_headers=function(t){var e,r,n;for(r in e=null,n=this.clearsign.headers)if(n[r],"hash"!==r){e=new Error("Unallowed header: "+r);break}return t(e)},r.prototype.run=function(t){var e,r,n,i;r=b.findDeferral(arguments),e=x(t,"Verifier::run"),(i=this,function(t){n=new b.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._check_headers(e(n.defer({lineno:201}))),n._fulfill()})(function(i){return function(){n=new b.Deferrals((function(){n=new b.Deferrals((function(){!function(t){n=new b.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._fetch_key(e(n.defer({lineno:204}))),n._fulfill()}((function(){!function(t){n=new b.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._make_hasher(e(n.defer({lineno:205}))),n._fulfill()}((function(){!function(t){n=new b.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._verify(e(n.defer({lineno:206}))),n._fulfill()}((function(){return t(null,i._literal)}))}))}))}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._reformat_text(e(n.defer({lineno:203}))),n._fulfill()}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._find_signature(e(n.defer({lineno:202}))),n._fulfill()}}(this))},r}(h),e.sign=function(t,e){var r,n,o,s,a,u,f,h,c,l;c=b.findDeferral(arguments),a=t.msg,h=t.signing_key,u=t.now,s=t.hasher,r=new i({msg:a,signing_key:h,now:u,hasher:s}),l=new b.Deferrals((function(){return r.scrub(),e(o,n,f)}),{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"sign"}),r.run(l.defer({assign_fn:function(){return o=arguments[0],n=arguments[1],f=arguments[2]},lineno:217})),l._fulfill()},e.verify=function(t,e){var r,n,i,o,s,a,u,h,c,l;c=b.findDeferral(arguments),u=t.packets,n=t.clearsign,o=t.keyfetch,a=t.now,r=t.assert_pgp_hash,h=new f({packets:u,clearsign:n,keyfetch:o,now:a,assert_pgp_hash:r}),l=new b.Deferrals((function(){return e(i,s)}),{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"verify"}),h.run(l.defer({assign_fn:function(){return i=arguments[0],s=arguments[1]},lineno:225})),l._fulfill()}}).call(this)},23725:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b={}.hasOwnProperty;l=r(41060),d=r(30647).make_esc,g=r(67022),a=g.Signature,i=g.CreationTime,o=g.Issuer,_=r(86459).unix_time,r(31093).WordArray,p=r(75656),t=p.openpgp,r(51342),y=r(90927).streamers,c=r(57004).encode,s=r(55395).Literal,h=r(66681).Base,m=r(76652),u=function(){function e(t){this.data=t.data,this.hash_streamer=t.hash_streamer,this.signing_key=t.signing_key}return e.prototype.run=function(t){var e,r,n,i,o,s;i=l.findDeferral(arguments),r=d(t,"Signer::run"),(s=this,function(t){o=new l.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer.run"}),s._run_hash(r(o.defer({lineno:39}))),o._fulfill()})(function(s){return function(){o=new l.Deferrals((function(){o=new l.Deferrals((function(){return t(null,e,n)}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer.run"}),s._encode(r(o.defer({assign_fn:function(){return e=arguments[0]},lineno:41}))),o._fulfill()}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer.run"}),s._sign(r(o.defer({assign_fn:function(){return n=arguments[0]},lineno:40}))),o._fulfill()}}(this))},e.prototype.scrub=function(){},e.prototype._sign=function(e){var r,s,u,f,h;u=l.findDeferral(arguments),this.sig=new a({sig_type:t.sig_types.canonical_text,key:this.signing_key.key,hashed_subpackets:[new i(_())],unhashed_subpackets:[new o(this.signing_key.get_key_id())],hasher:this.hash_streamer}),r=n.from([]),(h=this,function(t){var e;f=new l.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer._sign"}),h.sig.write(r,f.defer({assign_fn:(e=h,function(){return s=arguments[0],e._sig_output=arguments[1]}),lineno:59})),f._fulfill()})(function(t){return function(){return e(s,t._sig_output)}}(this))},e.prototype._encode=function(e){return e(null,c(t.message_types.signature,this._sig_output))},e.prototype._run_hash=function(t){var e;return e=null,null!=this.hash_streamer||(null!=this.data?(this.hash_streamer=y.SHA512(),this.hash_streamer.update(this.data)):e=new Error("Need either a hasher or data")),t(e)},e}(),f=function(t){function e(t){var r,n;n=t.packets,this.data=t.data,this.data_fn=t.data_fn,r=t.keyfetch,this.now=t.now,this.assert_pgp_hash=t.assert_pgp_hash,e.__super__.constructor.call(this,{packets:n,keyfetch:r})}return function(t,e){for(var r in e)b.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype._consume_data=function(t){var e,r,n,i,o,s,a,u;s=l.findDeferral(arguments),n=null,(u=this,function(t){if(null==u.data_fn)return t();n=null,u._sig.hasher.klass,o=y[u._sig.hasher.algname](),e=function(t){return o.update(t)},i=!0,function(t){var o;o=function(t){var f;if(f=function(){return l.trampoline((function(){return o(t)}))},!i)return t();a=new l.Deferrals((function(){return f((null!=n||r)&&(i=!1))}),{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier._consume_data"}),u.data_fn(e,a.defer({assign_fn:function(){return n=arguments[0],r=arguments[1]},lineno:101})),a._fulfill()},o(t)}((function(){return t(u._sig.hasher=o)}))})((function(){return t(n)}))},e.prototype._verify=function(t){var e,r,n,i,o,a;i=l.findDeferral(arguments),e=this.data?[new s({data:this.data})]:[],this.literals=e,n={now:this.now,assert_pgp_hash:this.assert_pgp_hash},(a=this,function(t){o=new l.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier._verify"}),a._sig.verify(e,o.defer({assign_fn:function(){return r=arguments[0]},lineno:113}),n),o._fulfill()})((function(){return t(r)}))},e.prototype._make_literals=function(t){return this.literals.length||this.literals.push(new s({data:n.from([])})),this.literals[0].push_sig(new m.Data({sig:this._sig})),t(null)},e.prototype.run=function(t){var e,r,n,i;r=l.findDeferral(arguments),e=d(t,"Verifier::run"),(i=this,function(t){n=new l.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._find_signature(e(n.defer({lineno:128}))),n._fulfill()})(function(i){return function(){n=new l.Deferrals((function(){n=new l.Deferrals((function(){!function(t){n=new l.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._verify(e(n.defer({lineno:131}))),n._fulfill()}((function(){!function(t){n=new l.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._make_literals(e(n.defer({lineno:132}))),n._fulfill()}((function(){return t(null,i.literals)}))}))}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._consume_data(e(n.defer({lineno:130}))),n._fulfill()}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._fetch_key(e(n.defer({lineno:129}))),n._fulfill()}}(this))},e}(h),e.sign=function(t,e){var r,n,i,o,s,a,f,h,c,p;c=l.findDeferral(arguments),r=t.data,o=t.hash_streamer,h=t.signing_key,s=t.now,a=new u({data:r,hash_streamer:o,signing_key:h,now:s}),p=new l.Deferrals((function(){return a.scrub(),e(i,n,f)}),{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"sign"}),a.run(p.defer({assign_fn:function(){return i=arguments[0],n=arguments[1],f=arguments[2]},lineno:139})),p._fulfill()},e.verify=function(t,e){var r,n,i,o,s,a,u,h,c,p,d;p=l.findDeferral(arguments),n=t.data,i=t.data_fn,h=t.packets,s=t.keyfetch,u=t.now,r=t.assert_pgp_hash,c=new f({data:n,data_fn:i,packets:h,keyfetch:s,now:u,assert_pgp_hash:r}),d=new l.Deferrals((function(){return e(o,a)}),{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"verify"}),c.run(d.defer({assign_fn:function(){return o=arguments[0],a=arguments[1]},lineno:147})),d._fulfill()}}).call(this)},23309:function(t,e,r){(function(){var t,n,i;n=r(6657).burn,i=r(71427),t=r(58532).SignatureEngine,e.box=n,e.unbox=i.do_message,e.SignatureEngine=t}).call(this)},8041:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,I,P,T,U,F,C,O,L,N,z,q,j,K,Z,H,G={}.hasOwnProperty,V=function(t,e){for(var r in e)G.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},W=[].slice;R=r(41060),_=r(16357).RSA,o=r(63493).ECDSA,g=r(90927).SHA256,P=r(75656),u=P.kb,i=P.openpgp,U=r(30647).make_esc,B=r(92).errors,q=r(86459),D=q.format_pgp_fingerprint_2,k=q.athrow,w=q.assert_no_nulls,t=q.ASP,I=q.katch,M=q.bufeq_secure,N=q.unix_time,x=q.bufferify,C=r(70475).ops_to_keyflags,j=r(55129),l=j.Lifespan,v=j.Subkey,y=j.Primary,K=r(57004),p=K.Message,A=K.encode,S=K.decode,E=K.decode_strict,O=r(98700).parse,f=r(71427).KeyBlock,F=r(29171),Z=r(14174),L=Z.read_base64,z=Z.unseal,d=r(81768).P3SKB,(H=r(87746)).KeyFetcher,H.KeyFetched,b=r(58532).SignatureEngine,s=r(31093).Encryptor,c=r(78548).KeyManagerInterface,a=function(){function t(t){var e,r,n;for(this.primary=t.primary,this.subkeys=t.subkeys,this.userids=t.userids,this.key_manager=t.key_manager,this.packets=[],this.messages=[],this._allocate_key_packets(),e=0,r=(n=this.subkeys).length;eA;S=0<=A?++t:--t)e.push(f);return e}()),C||(C=function(){var t,e,r;for(r=[],t=0,e=P.length;te?t:e},e=d=0,m=(y=this.userids).length;d0?(i=n.from(function(){var t,e;for(e=[],t=0;0<=r?tr;0<=r?++t:--t)e.push(0);return e}()),n.concat([t.consume_rest_to_buffer(),i])):t.read_buffer(this.block_size),this._emit_buf(e)},e.prototype._emit_buf=function(t){var e;return(e=f.from_buffer(t.slice(0,this.block_size))).xor(this.FRE,{n_words:Math.min(e.words.length,this.FRE.words.length)}),t=e.to_buffer(),this.out_bufs.push(t),this.FR=n.from(t)},e.prototype._init=function(t){var e,r,i,o;return this.FR=n.from(function(){var t,e,r;for(r=[],i=t=0,e=this.block_size;0<=e?te;i=0<=e?++t:--t)r.push(0);return r}.call(this)),t=d(t,2),this._enc(),this._emit_buf(t),this._enc(),e=this.FRE.to_buffer(),r=n.from(function(){var r,n;for(n=[],i=r=0;r<2;i=++r)n.push(e.readUInt8(i)^t.readUInt8(this.block_size+i));return n}.call(this)),this.out_bufs.push(r),o=this.resync?2:0,this.compact().copy(this.FR,0,o,o+this.block_size),this._enc()},e.prototype.enc=function(t,e){var r,i,o,s,a,h,c,d,m,y,_,g;y=l.findDeferral(arguments),c=new u(t),o=p(e,"Encryptor::enc"),this.resync?this._emit_sb(c):(r=n.concat([n.from([0,0]),c.read_buffer(this.block_size-2)]),(m=f.from_buffer(r)).xor(this.FRE,{}),r=m.to_buffer().slice(2),this.out_bufs.push(r),(i=this.compact()).copy(this.FR,0,i.length-this.block_size,i.length)),d=c.rem(),(g=this,function(t){_=new l.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Encryptor.enc"}),g.asp.progress({what:"ofcb encryption",i:0,total:d},o(_.defer({lineno:168}))),_._fulfill()})(function(r){return function(){var n;(n=function(t){var e,i,a;if(e=t,a=function(){return l.trampoline((function(){return n(t)}))},!(s=c.rem()))return e();for(i=0;i<4096&&(r._enc(),r._emit_sb(c),s=c.rem());i++);!function(t){_=new l.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Encryptor.enc"}),r.asp.progress({what:"ofcb encryption",i:d-s,total:d},o(_.defer({lineno:177}))),_._fulfill()}(a)})((function(){return h=r.compact(),a=t.length+r.block_size+2,h=h.slice(0,a),e(null,h)}))}}(this))},e}(o),s=function(t){function e(t){var r,n,i,o,s;n=t.block_cipher_class,o=t.key,i=t.cipher,t.prefixrandom,s=t.resync,this.ciphertext=t.ciphertext,r=t.asp,e.__super__.constructor.call(this,{block_cipher_class:n,key:o,cipher:i,resync:s,asp:r}),this._init()}return _(e,t),e.prototype._init=function(){return this.reset()},e.prototype.reset=function(){return this.sb=new u(this.ciphertext)},e.prototype.next_block=function(){return f.from_buffer(this.sb.read_buffer_at_most(this.block_size))},e.prototype.get_prefix=function(){return this._prefix},e.prototype.check=function(t){var e,r,n,i;return this.reset(),r=new f(function(){var t,e,r;for(r=[],t=0,e=this.block_size/4;0<=e?te;0<=e?++t:--t)r.push(0);return r}.call(this)),this.cipher.encryptBlock(r.words,0),e=this.next_block(),r.xor(e,{}),this._prefix=r.to_buffer(),this.cipher.encryptBlock(e.words,0),t((n=65535&r.words.slice(-1)[0])==(i=e.words[0]>>>16^this.sb.peek_uint16())?null:new Error("Canary block mismatch: "+n+" != "+i))},e.prototype.dec=function(t){var e,r,n,i,o,s,a,u,f;a=l.findDeferral(arguments),this.reset(),this.resync&&this.sb.advance(2),n=this.next_block(),r=p(t,"Decryption::dec"),s=this.sb.rem(),(f=this,function(t){u=new l.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Decryptor.dec"}),f.asp.progress({what:"ofcb decrypt",i:0,total:s},r(u.defer({lineno:239}))),u._fulfill()})(function(f){return function(){var h;(h=function(t){var o,c,p;if(o=t,p=function(){return l.trampoline((function(){return h(t)}))},!(i=f.sb.rem()))return o();for(c=0;c<4096&&(e=n,f.cipher.encryptBlock(e.words,0),n=f.next_block(),e.xor(n,{}),f.out_bufs.push(e.to_buffer().slice(0,n.sigBytes)),i=f.sb.rem());c++);!function(t){u=new l.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Decryptor.dec"}),f.asp.progress({what:"ofcb decrypt",i:s-i,total:s},r(u.defer({lineno:251}))),u._fulfill()}(p)})((function(){return o=f.compact(),f.resync||(o=o.slice(2)),t(null,o)}))}}(this))},e}(o),c=function(t,e){var r,n,i,o,s,u,f;return n=t.block_cipher_class,o=t.key,i=t.cipher,u=t.prefixrandom,f=t.resync,s=t.plaintext,r=t.asp,new a({block_cipher_class:n,key:o,cipher:i,prefixrandom:u,resync:f,asp:r}).enc(s,e)},h=function(t,e){var r,n,i,o,a,u,f,h,c,p,d;p=l.findDeferral(arguments),n=t.block_cipher_class,f=t.key,i=t.cipher,c=t.resync,o=t.ciphertext,r=t.asp,a=new s({block_cipher_class:n,key:f,cipher:i,resync:c,ciphertext:o,asp:r}),d=new l.Deferrals((function(){!function(t){if(null!=u)return t();!function(t){d=new l.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced"}),a.dec(d.defer({assign_fn:function(){return u=arguments[0],h=arguments[1]},lineno:268})),d._fulfill()}(t)}((function(){return e(u,h)}))}),{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced"}),a.check(d.defer({assign_fn:function(){return u=arguments[0]},lineno:267})),d._fulfill()},e.encrypt=c,e.decrypt=h,e.Decryptor=s,r(91565).rng}).call(this)},29171:function(t,e,r){(function(){e.KeyMaterial=r(7894).KeyMaterial,e.Signature=r(67022).Signature,e.UserID=r(54836).UserID}).call(this)},94495:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o;o=r(70475),r(75656).openpgp,i=r(76652),t=function(){function t(){this._psc=new i.Collection}return t.prototype.frame_packet=function(t,e){var r;return r=[n.from([192|t]),o.encode_length(e.length),e],n.concat(r)},t.prototype.set=function(t){var e,r,n;for(e in n=[],t)r=t[e],n.push(this[e]=r);return n},t.prototype.is_signature=function(){return!1},t.prototype.is_key_material=function(){return!1},t.prototype.is_duplicate_primary=function(){return!1},t.prototype.to_userid=function(){return null},t.prototype.to_user_attribute=function(){return null},t.prototype.to_literal=function(){return null},t.prototype.to_esk_packet=function(){return null},t.prototype.to_enc_data_packet=function(){return null},t.prototype.replay=function(){return this.frame_packet(this.tag,this.raw)},t.prototype.inflate=function(t){return t(null,null)},t.prototype.push_sig=function(t){return this._psc.push(t)},t.prototype.get_psc=function(){return this._psc},t.prototype.clear_psc=function(){return this._psc.clear()},t.prototype.get_data_signer=function(){return this.get_psc().get_data_signer()},t.prototype.get_data_signers=function(){return this.get_psc().get_data_signers()},t.prototype.get_signed_userids=function(){return[]},t.prototype.get_subkey_binding=function(){return null},t.prototype.is_self_signed=function(){return!1},t}(),e.Packet=t}).call(this)},50179:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p={}.hasOwnProperty;h=r(41060),s=r(94495).Packet,t=r(75656).openpgp,r(16462),l=r(78559),c=r(86459).uint_to_buffer,a=r(96842),f=function(t,e){var r,i,o,s,a,u;a=h.findDeferral(arguments),t=n.concat([n.from([120,156]),t]),s=l.createInflate({flush:l.Z_FULL_FLUSH}),r=[],i=function(t){var i;if(null!=(i=e))return null!=t&&"Z_BUF_ERROR"===t.code&&(t=null),e=null,i(t,null!=t?null:n.concat(r))},s.on("readable",(function(){var t;if(null!=(t=s.read()))return r.push(t)})),s.on("end",(function(){return i(null)})),s.on("error",(function(t){return i(t)})),u=new h.Deferrals((function(){!function(t){if(null!=o)return t();!function(t){u=new h.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced"}),s.end(o),u._fulfill()}(t)}((function(){if(null!=o)return i(o)}))}),{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced"}),s.write(t,u.defer({assign_fn:function(){return o=arguments[0]},lineno:53})),u._fulfill()},u=function(t,e){var r,n;r=null;try{n=a(t)}catch(t){r=t}return e(r,n)},i=function(e){function r(t){this.algo=t.algo,this.compressed=t.compressed,this.inflated=t.inflated}return function(t,e){for(var r in e)p.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.parse=function(t){return new o(t).parse()},r.prototype.inflate=function(e){var r,n,i,o,s;i=h.findDeferral(arguments),r=n=null,(s=this,function(e){switch(s.algo){case t.compression.none:return e(n=s.compressed);case t.compression.zlib:!function(t){o=new h.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.inflate"}),l.inflate(s.compressed,o.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:95})),o._fulfill()}(e);break;case t.compression.zip:!function(t){o=new h.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.inflate"}),f(s.compressed,o.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:97})),o._fulfill()}(e);break;case t.compression.bzip:!function(t){o=new h.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.inflate"}),u(s.compressed,o.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:99})),o._fulfill()}(e);break;default:return e(r=new Error("no known inflation -- algo: "+s.algo))}})((function(){return e(r,n)}))},r.prototype.deflate=function(e){var r,n,i,o,s;i=h.findDeferral(arguments),r=n=null,(s=this,function(e){switch(s.algo){case t.compression.none:return e(n=s.inflated);case t.compression.zlib:!function(t){o=new h.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.deflate"}),l.deflate(s.inflated,o.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:111})),o._fulfill()}(e);break;case t.compression.zip:!function(t){o=new h.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.deflate"}),fake_zip_deflate(s.inflated,o.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:113})),o._fulfill()}(e);break;default:return e(r=new Error("no known deflation -- algo: "+s.algo))}})((function(){return e(r,n)}))},r.prototype.write_unframed=function(t){var e,r,i,o,s,a;o=h.findDeferral(arguments),r=i=null,(a=this,function(t){var e;s=new h.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.write_unframed"}),a.deflate(s.defer({assign_fn:(e=a,function(){return r=arguments[0],e.compressed=arguments[1]}),lineno:122})),s._fulfill()})(function(o){return function(){return null==r&&(e=[c(8,o.algo),o.compressed],i=n.concat(e)),t(r,i)}}(this))},r.prototype.write=function(e){var r,n,i,o,s,a;o=h.findDeferral(arguments),r=n=null,(a=this,function(t){s=new h.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.write"}),a.write_unframed(s.defer({assign_fn:function(){return r=arguments[0],i=arguments[1]},lineno:132})),s._fulfill()})(function(o){return function(){return null==r&&(n=o.frame_packet(t.packet_tags.compressed,i)),e(r,n)}}(this))},r}(s),o=function(){function t(t){this.slice=t}return t.prototype.parse=function(){var t,e;return t=this.slice.read_uint8(),e=this.slice.consume_rest_to_buffer(),new i({algo:t,compressed:e})},t}(),e.Compressed=i}).call(this)},71093:function(t,e,r){(function(){var t,n={}.hasOwnProperty;t=function(t){function e(t,e){this.type=t,this.body=e}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,t),e}(r(94495).Packet),e.Generic=t}).call(this)},7894:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,I,P,T,U,F={}.hasOwnProperty;S=r(41060),i=r(75656).openpgp,I=(D=r(31093)).hash,_=I.SHA1,I.SHA256,d=r(16357).Pair,o=r(57563).Pair,f=r(32293).Pair,h=r(81490).Pair,a=r(63493).Pair,s=r(5757).Pair,u=r(16662).Pair,t=D.ciphers.AES,E=D.prng.native_rng,k=r(70475).calc_checksum,P=r(86459),w=P.bufferify,P.unix_time,v=P.bufeq_secure,P.katch,P.make_time_packet,R=P.uint_to_buffer,T=r(66206),M=T.decrypt,x=T.encrypt,l=r(94495).Packet,m=r(67022),b=m.Signature,r(57004).encode,U=r(929),y=U.S2K,g=U.SecretKeyMaterial,B=r(20776),r(40537),A=r(76652),c=function(e){function r(t){this.key=t.key,this.timestamp=t.timestamp,this.passphrase=t.passphrase,this.skm=t.skm,this.opts=t.opts,this.flags=t.flags,this.opts||(this.opts={}),this.flags||(this.flags=0),this._is_duplicate_primary=!1,this.hasher=null,r.__super__.constructor.call(this)}return function(t,e){for(var r in e)F.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype._write_private_enc=function(e,r,o){var s,a,u,f,h,c,l,p;return e.push(n.from([i.s2k_convention.sha1,i.symmetric_key_algorithms.AES256,i.s2k.salt_iter,i.hash_algorithms.SHA256])),p=(new _).bufhash(r),l=E(8),e.push(l),e.push(n.from([96])),h=t.keySize,f=(new y).write(o,l,96,h),u=t.blockSize,a=E(u),e.push(a),c=n.concat([r,p]),s=x({block_cipher_class:t,key:f,plaintext:c,iv:a}),e.push(s)},r.prototype._write_private_clear=function(t,e){return t.push(n.from([i.s2k_convention.none]),e,R(16,k(e)))},r.prototype._write_public=function(t){var e;return e=this.key.serialize(),t.push(n.from([i.versions.keymaterial.V4]),R(32,this.timestamp),n.from([this.key.type]),e)},r.prototype._write_dummy=function(t){return t.push(n.from([i.s2k_convention.sha1,i.symmetric_key_algorithms.AES256,i.s2k.gnu,2]),n.from("GNU","utf8"),n.from([1]))},r.prototype.add_flags=function(t){return this.flags|=t},r.prototype.private_body=function(t){var e,r,i,o;return e=[],this._write_public(e),o=null!=(r=this.key.priv)?r.serialize():null,i=t.passphrase||this.passphrase,null==o?this._write_dummy(e):null!=i?this._write_private_enc(e,o,i):this._write_private_clear(e,o),n.concat(e)},r.prototype.private_framed=function(t){var e,r,n;return r=this.private_body(t),e=i.packet_tags,n=t.subkey?e.secret_subkey:e.secret_key,this.frame_packet(n,r)},r.prototype.public_body=function(){var t;return t=[],this._write_public(t),n.concat(t)},r.prototype.get_fingerprint=function(){var t;return t=this.public_body(),(new _).bufhash(n.concat([n.from([i.signatures.key]),R(16,t.length),t]))},r.prototype.get_key_id=function(){return this.get_fingerprint().slice(12,20)},r.prototype.get_short_key_id=function(){return this.get_key_id().slice(-4).toString("hex").toUpperCase()},r.prototype.get_klass=function(){return this.key.constructor},r.prototype.export_framed=function(t){return null==t&&(t={}),t.private?this.private_framed(t):this.public_framed(t)},r.prototype.public_framed=function(t){var e,r,n;return null==t&&(t={}),r=this.public_body(),e=i.packet_tags,n=t.subkey?e.public_subkey:e.public_key,this.frame_packet(n,r)},r.prototype.to_signature_payload=function(){var t;return t=this.public_body(),n.concat([n.from([i.signatures.key]),R(16,t.length),t])},r.prototype.self_sign_key=function(t,e){var r,n,i,o,s,a,u,f,h,c,l;h=S.findDeferral(arguments),f=t.userids,n=t.lifespan,o=t.raw_payload,r=null,a=[],i=!0,(l=this,function(t){var e,p,d,m;p=(d=f).length,e=0,m=function(t){var f,y,_;return f=t,_=y=function(){return S.trampoline((function(){return++e,m(t)}))},er.expire_at||!(e.expire_at=r.generated},r.prototype.get_expire_time=function(){return null==this.get_psc()?null:this.is_primary()?this._get_expire_time_on_primary():this._get_expire_time_on_subkey()},r.prototype._get_expire_time_on_primary=function(){var t,e,r,n,i,o,s,a,u,f,h,c;for(s in o=this.get_psc().lookup.self_sigs_by_uid,f=null,this.timestamp,o){for(u=null,h=0,c=(e=o[s]).length;h0},t.prototype.get_data_signer=function(){return this.lookup.data.length>0?this.lookup.data[0]:null},t.prototype.get_data_signers=function(){return this.lookup.data},t.prototype.get_subkey_binding=function(){return this.lookup.subkey_binding.length?this.lookup.subkey_binding[0]:null},t}(),e.SelfSig=i,e.SubkeyBinding=o,e.Data=n,e.Collection=r}).call(this)},75408:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S={}.hasOwnProperty,E=function(t,e){for(var r in e)S.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};g=r(41060),h=r(94495).Packet,i=r(75656).openpgp,d=r(16462),k=r(90927),p=k.SHA1,v=k.streamers,M=r(86459),w=M.uint_to_buffer,y=M.bufeq_secure,m=M.bufeq_fast,x=r(57605),_=x.encrypt,o=x.Decryptor,t=r(56507).util.ASP,b=r(30647).make_esc,u=function(t){function e(t){this.crypto_type=t.crypto_type,this.key_id=t.key_id,this.ekey=t.ekey}return E(e,t),e.parse=function(t){return new f(t).parse()},e.prototype.to_esk_packet=function(){return this},e.prototype.get_key_id=function(){return this.key_id},e.prototype.write_unframed=function(t){var e;return e=[w(8,i.versions.PKESK),this.key_id,w(8,this.crypto_type),this.ekey.output()],t(null,n.concat(e))},e.prototype.write=function(t){var e,r,n,o,s,a;o=g.findDeferral(arguments),r=null,(a=this,function(t){s=new g.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"PKESK.write"}),a.write_unframed(s.defer({assign_fn:function(){return e=arguments[0],n=arguments[1]},lineno:36})),s._fulfill()})(function(o){return function(){return null==e&&(r=o.frame_packet(i.packet_tags.PKESK,n)),t(e,r)}}(this))},e}(h),c=function(e){function r(t){this.ciphertext=t.ciphertext}return E(r,e),r.parse=function(t){return new l(t).parse()},r.prototype.to_enc_data_packet=function(){return this},r.prototype.check=function(){},r.prototype.decrypt=function(e,r){var n,i,a,u,f,h,c,l,p,d,m;d=g.findDeferral(arguments),i=e.cipher,n=e.asp,a=new o({cipher:i,ciphertext:this.ciphertext,asp:n}),f=b(r,"SEIPD::decrypt"),n=t.make(n),m=new g.Deferrals((function(){m=new g.Deferrals((function(){var t;t=s.parse(p),h=t[0],c=t[1],l=a.get_prefix(),function(t){m=new g.Deferrals(t,{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.decrypt"}),h.compute({prefix:l,plaintext:c,asp:n},f(m.defer({lineno:70}))),m._fulfill()}((function(){return u=h.check()?null:new Error("MDC mismatch"),r(u,c)}))}),{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.decrypt"}),a.dec(f(m.defer({assign_fn:function(){return p=arguments[0]},lineno:64}))),m._fulfill()}),{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.decrypt"}),a.check(f(m.defer({lineno:63}))),m._fulfill()},r.prototype.encrypt=function(e,r){var i,o,a,u,f,h,c,l,p,d,m;l=g.findDeferral(arguments),o=e.cipher,h=e.plaintext,c=e.prefixrandom,i=e.asp,u=new s({}),a=b(r,"SEIPD::encrypt"),i=t.make(i),d=this,m=function(){var t;h=n.concat([h,s.header,f]),p=new g.Deferrals((function(){return r(null)}),{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.encrypt"}),_({cipher:o,plaintext:h,prefixrandom:c},a(p.defer({assign_fn:(t=d,function(){return t.ciphertext=arguments[0]}),lineno:83}))),p._fulfill()},p=new g.Deferrals(m,{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.encrypt"}),u.compute({plaintext:h,prefix:c,asp:i},a(p.defer({assign_fn:function(){return f=arguments[0]},lineno:81}))),p._fulfill()},r.prototype.write_unframed=function(t){return t(null,n.concat([w(8,i.versions.SEIPD),this.ciphertext]))},r.prototype.write=function(t){var e,r,n,o,s,a;o=g.findDeferral(arguments),r=e=null,(a=this,function(t){s=new g.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.write"}),a.write_unframed(s.defer({assign_fn:function(){return e=arguments[0],n=arguments[1]},lineno:97})),s._fulfill()})(function(o){return function(){return null==e&&(r=o.frame_packet(i.packet_tags.SEIPD,n)),t(e,r)}}(this))},r}(h),s=function(e){function r(t){this.digest=t.digest}return E(r,e),r.header=n.from([192|i.packet_tags.MDC,p.output_length]),r.prototype.header=r.header,r.parse=function(t){return new a(t).parse()},r.prototype.compute=function(e,r){var i,o,s,a,u,f,h,c,l,p,d,m,y;c=g.findDeferral(arguments),u=e.plaintext,f=e.prefix,i=e.asp,i=t.make(i),(s=v.SHA1()).update(n.concat([f,f.slice(-2)])),o=b(r,"MDC::compute"),h=1048576,p=this,d=function(){return s.update(p.header),p.computed=s(),r(null,p.computed)},a=0,u.length,m=h,y=function(t){var e,r;if(e=t,r=function(){return g.trampoline((function(){return a+=m,y(t)}))},a>=u.length)return e();s.update(u.slice(a,a+h)),function(t){l=new g.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"MDC.compute"}),i.progress({what:"MDC",total:u.length,i:a},o(l.defer({lineno:122}))),l._fulfill()}(r)},y(d)},r.prototype.check=function(){return y(this.digest,this.computed)},r}(h),a=function(){function t(t){this.buf=t}return t.prototype.parse=function(){var t,e,r,n,i;if(r=s.header.length,n=p.output_length+r,i=this.buf.slice(0,-n),t=this.buf.slice(-n),!m(t.slice(0,r),s.header))throw new Error("Missing MDC header");return e=t.slice(r),[new s({digest:e}),i]},t}(),l=function(){function t(t){this.slice=t}return t.prototype.payload_split=function(t){},t.prototype.parse=function(){var t,e;if((e=this.slice.read_uint8())!==i.versions.SEIPD)throw new Error("Unknown SEIPD version "+e);return t=this.slice.consume_rest_to_buffer(),new c({ciphertext:t})},t}(),f=function(){function t(t){this.slice=t}return t.prototype.parse=function(){var t,e,r,n;if((n=this.slice.read_uint8())!==i.versions.PKESK)throw new Error("Unknown PKESK version: "+n);return r=this.slice.read_buffer(8),t=this.slice.read_uint8(),e=d.get_class(t).parse_output(this.slice.consume_rest_to_buffer()),new u({crypto_type:t,key_id:r,ekey:e})},t}(),e.SEIPD=c,e.PKESK=u,e.MDC=s}).call(this)},67022:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,I,P,T,U,F,C,O,L,N,z,q,j,K,Z,H,G,V,W,$,Y,X,J,Q,tt,et={}.hasOwnProperty,rt=function(t,e){for(var r in e)et.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};V=r(41060),y=r(94495).Packet,t=r(75656).openpgp,D=t.sig_subpacket,J=r(70475),G=J.encode_length,J.make_time_packet,Q=r(86459),X=Q.unix_time,Y=Q.uint_to_buffer,H=Q.bufeq_secure,tt=r(90927),j=tt.alloc_or_throw,I=tt.SHA512,R=tt.SHA1,Z=r(16462),r(40537),$=r(76652),K=r(34529),L=r(94077).SlicerBuffer,W=r(30647).make_esc,F=function(e){function r(t){this.key=t.key,this.hasher=t.hasher,this.key_id=t.key_id,this.sig_data=t.sig_data,this.public_key_class=t.public_key_class,this.signed_hash_value_hash=t.signed_hash_value_hash,this.time=t.time,this.sig=t.sig,this.type=t.type,this.version=t.version,null==this.hasher&&(this.hasher=I),this._framed_output=null}return rt(r,e),r.prototype.is_signature=function(){return!0},r.prototype.get_key_id=function(){return this.key_id},r.prototype.get_key_flags=function(){return 0},r.prototype.get_key_expires=function(){return 0},r.prototype.get_issuer_key_id=function(){return this.key_id},r.prototype.get_issuer_fingerprint=function(){return null},r.prototype.when_generated=function(){return this.time},r.prototype.time_of_primary_uid_sig=function(){return null},r.prototype.gen_prefix=function(){return n.concat([n.from([t.versions.signature.V3,this.type],Y(32,this.time),this.key_id,n.from([this.key.type,this.hasher.type]))])},r.prototype.prepare_payload=function(t){var e,r;return(e=function(){var e,n,i;for(i=[],e=0,n=t.length;e1?(h=new Error("Only expecting one (or no) UserID-style packet(s) in a self-sig (got "+d+")"),[]):[this.primary].concat(e);case s.subkey_binding:case s.primary_binding:case s.subkey_revocation:return m=[],1!==e.length?h=new Error("Wrong number of data packets; expected only 1"):null==this.primary?h=new Error("Need a primary key for subkey signature"):(b=e[0],m=[this.primary,b]),m;case s.direct:return[this.primary].concat(e);default:return h=new Error("cannot verify sigtype "+this.type),[]}}.call(this),(x=this,function(t){var e;if(null!=h||x.is_third_party&&x.type===s.key_revocation)return t();a=function(){var t,e,r,n;for(n=[],t=0,e=(r=this.data_packets).length;te},r.prototype.time_primary_pair=function(){var e,r,n;return e=t.sig_types,(r=this.type)===e.issuer||r===e.persona||r===e.casual||r===e.positive?[this.when_generated(),!!(null!=(n=this.subpacket_index.hashed[D.primary_user_id])?n.flag:void 0)]:null},r.prototype._check_key_sig_expiration=function(e){var r,n,i,o,s,a,u,f,h,c,l;return n=null,r=t.sig_types,o=0,h=0,(l=this.type)!==r.issuer&&l!==r.persona&&l!==r.casual&&l!==r.positive&&l!==r.subkey_binding&&l!==r.primary_binding||(i=(e.subkey||this.primary).timestamp,s=this.subpacket_index.hashed[D.key_expiration_time],f=this.subpacket_index.hashed[D.creation_time],c=this.subpacket_index.hashed[D.sig_expiration_time],u=null!=(a=null!=e?e.now:void 0)?a:X(),null!=i&&(null!=s?s.time:void 0)&&(o=i+s.time),null!=f&&(null!=c?c.time:void 0)&&(h=f.time+c.time),o&&!e.time_travel&&u>o&&(n=new Error("Key expired "+(u-o)+"s ago")),h&&!e.time_travel&&u>h&&(n=new Error("Sig expired "+(u-o)+"s ago"))),[n,o,h]},r.prototype.get_key_flags=function(){var e,r,n;return(null!=(e=this.subpacket_index)&&null!=(r=e.hashed)&&null!=(n=r[t.sig_subpacket.key_flags])?n.all_flags():void 0)||0},r.prototype.get_issuer_key_id=function(){var e,r;return null!=(e=this.subpacket_index)&&null!=(r=e.all[t.sig_subpacket.issuer])?r.id:void 0},r.prototype.get_issuer_fingerprint=function(){var t;return null!=(t=this.subpacket_index.all[D.issuer_fingerprint])?t.fingerprint:void 0},r}(y),N=function(){function t(t){this.type=t,this.critical=!1,this.five_byte_len=!1}return t.prototype.set_opts=function(t){var e,r;for(e in t)r=t[e],this[e]=r;return!0},t.prototype.to_buffer=function(){var t;return t=this._v_to_buffer(),n.concat([G(t.length+1,this.five_byte_len),Y(8,this.type|(this.critical?128:0)),t])},t.prototype.to_sig=function(){return null},t.prototype.export_to_option=function(){return null},t}(),s=function(t){function e(t,e){this.buf=t,this.type=e}return rt(e,t),e.parse=function(t,r){return new e(t.consume_rest_to_buffer(),r)},e.prototype._v_to_buffer=function(){return this.buf},e}(N),z=function(t){function e(t,r){this.time=r,this.never_expires=0===this.time,e.__super__.constructor.call(this,t)}return rt(e,t),e.parse=function(t,e){return new e(t.read_uint32())},e.prototype._v_to_buffer=function(){return Y(32,this.time)},e}(N),b=function(t){function e(t,r){var n,i,o,s;for(this.v=r,e.__super__.constructor.call(this,t),i=0,o=(s=this.v).length;i=D.experimental_low&&b<=D.experimental_high)return s;throw new Error("Unknown signature subpacket: "+b)}}().parse(this.slice,b)).set_opts({critical:t,five_byte_len:r}),this.slice.unclamp(e),_},e.prototype.parse=function(){var e;switch(e=this.slice.read_uint8()){case t.versions.signature.V2:return this.parse_v2_or_v3(e,U);case t.versions.signature.V3:return this.parse_v2_or_v3(e,C);case t.versions.signature.V4:return this.parse_v4();default:throw new Error("Unknown signature version: "+e)}},e}(),e.CreationTime=i,e.KeyFlags=p,e.KeyExpirationTime=l,e.PreferredSymmetricAlgorithms=M,e.PreferredHashAlgorithms=w,e.PreferredCompressionAlgorithms=v,e.Features=f,e.KeyServerPreferences=d,e.Issuer=h,e.EmbeddedSignature=o,e.PrimaryUserId=x}).call(this)},13454:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h={}.hasOwnProperty;t=r(75656).openpgp,(u=(s=r(31093)).hash).SHA1,u.SHA256,s.ciphers.AES,s.prng.native_rng,(f=r(86459)).bufferify,a=f.uint_to_buffer,r(66206).encrypt,i=r(94495).Packet,r(56507).userid.parse,o=function(e){function r(t){this.data=t,r.__super__.constructor.call(this)}return function(t,e){for(var r in e)h.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype.write=function(){return this.frame_packet(t.packet_tags.user_attribute,this.data)},r.parse=function(t){return new r(t.consume_rest_to_buffer())},r.prototype.to_user_attribute=function(){return this},r.prototype.to_signature_payload=function(){return n.concat([n.from([t.signatures.user_attribute]),a(32,this.data.length),this.data])},r}(i),e.UserAttribute=o}).call(this)},54836:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l={}.hasOwnProperty;t=r(75656).openpgp,(h=(u=r(31093)).hash).SHA1,h.SHA256,u.ciphers.AES,u.prng.native_rng,c=r(86459),s=c.bufferify,f=c.uint_to_buffer,r(66206).encrypt,i=r(94495).Packet,a=r(56507).userid.parse,o=function(e){function r(t,e){this.components=null!=e?e:null,this.userid=s(t),null==this.compontents&&this._parse(),r.__super__.constructor.call(this),this._time_primary_pair=null,this.primary=!1,this.most_recent_sig=null}return function(t,e){for(var r in e)l.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype.utf8=function(){return this.userid.toString("utf8")},r.prototype.write=function(){return this.frame_packet(t.packet_tags.userid,this.userid)},r.parse=function(t){return new r(t.consume_rest_to_buffer())},r.prototype.to_userid=function(){return this},r.prototype.cmp=function(t){var e,r;return(e=this.utf8())<(r=t.utf8())?-1:e===r?0:1},r.prototype.to_signature_payload=function(){return n.concat([n.from([t.signatures.userid]),f(32,this.userid.length),this.userid])},r.prototype._parse=function(){var t;if(null!=(t=a(this.utf8())))return this.components=t},r.prototype.get_username=function(){var t;return null!=(t=this.components)?t.username:void 0},r.prototype.get_comment=function(){var t;return null!=(t=this.components)?t.comment:void 0},r.prototype.get_email=function(){var t;return null!=(t=this.components)?t.email:void 0},r.prototype.time_primary_pair=function(){var t,e,r,n,i,o;if(null==this._time_primary_pair){for(e=function(){var t,e,r,i,o;for(o=[],t=0,e=(r=this.get_psc().get_self_sigs()).length;t",t)},r.prototype.get_framed_signature_output=function(){var t,e,r;return null!=(t=this.get_psc())&&null!=(e=t.get_self_sig())&&null!=(r=e.sig)?r.get_framed_output():void 0},r.prototype.mark_revoked=function(t){return this.revocation=t},r.prototype.is_revoked=function(){return null!=this.revocation},r}(i),e.UserID=o}).call(this)},98700:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g;_=r(86459),d=r(94077).SlicerBuffer,t=r(75656).openpgp,s=r(7894).KeyMaterial,p=r(67022).Signature,g=r(75408),l=g.SEIPD,h=g.PKESK,y=r(54836).UserID,m=r(13454).UserAttribute,i=r(50179).Compressed,o=r(71093).Generic,f=r(68304).OnePassSignature,a=r(55395).Literal,r(40537).inspect,u=function(){function t(t){this.slice=t}return t.prototype.parse=function(){var t;for(t=[];this.slice.rem();)t.push(this.parse_packet());return t},t.prototype.parse_packet=function(){return new c(this.slice).parse()},t}(),c=function(){function e(t){this.slice=t,this.body=null,this.real_packet_len=null,this.tag=null,this.len=null,this.header_len=null}return e.prototype.parse_header=function(){return this.parse_tag_and_len(),this.header_len||(this.header_len=this.slice.offset()),this.body||(this.body=new d(this.slice.read_buffer(this.len))),this.real_packet_len||(this.real_packet_len=this.len),this.slice.unclamp()},e.prototype.parse=function(){return this.parse_header(),this.parse_body()},e.prototype.parse_body=function(){var e,r,n,u;return r=t.packet_tags,n=(u=this.body).peek_rest_to_buffer(),(e=function(){switch(this.tag){case r.PKESK:return h.parse(u);case r.one_pass_sig:return f.parse(u);case r.secret_key:return s.parse_private_key(u,{subkey:!1});case r.secret_subkey:return s.parse_private_key(u,{subkey:!0});case r.public_key:return s.parse_public_key(u,{subkey:!1});case r.public_subkey:return s.parse_public_key(u,{subkey:!0});case r.signature:return p.parse(u);case r.userid:return y.parse(u);case r.user_attribute:return m.parse(u);case r.SEIPD:return l.parse(u);case r.literal:return a.parse(u);case r.compressed:return i.parse(u);default:return new o(this.tag,u)}}.call(this)).set({tag:this.tag,real_packet_len:this.real_packet_len,header_len:this.header_len,raw:n}),e},e.prototype.parse_tag_and_len=function(){var t;if(this.slice.len()<2||!(128&(t=this.slice.read_uint8())))throw new Error("This doesn't look like a binary PGP packet (c="+t+")");return 64&t?this.parse_tag_and_len_new(t):this.parse_tag_and_len_old(t)},e.prototype.parse_tag_and_len_old=function(t){return this.tag=(63&t)>>2,this.len=function(){switch(3&t){case 0:return this.slice.read_uint8();case 1:return this.slice.read_uint16();case 2:return this.slice.read_uint32();case 3:return this.slice.rem()}}.call(this)},e.prototype.parse_tag_and_len_new=function(t){return this.tag=63&t,this.parse_tag_len_new()},e.prototype.parse_tag_len_new=function(){var t,e,r,i,o;for(e=!0,o=[],this.len=0,r=0;e;)e=!1,r=(t=this.slice.read_uint8())<192?t:255===t?this.slice.read_uint32():t<224?(t-192<<8)+(this.slice.read_uint8()+192):(this.header_len||(this.header_len=this.slice.offset()),i=1<<(31&t),o.push(this.slice.read_buffer(i)),e=!0,i),this.len+=r;if(o.length)return o.push(this.slice.read_buffer(r)),this.body=new d(n.concat(o)),this.len=this.body.length,this.real_packet_len=this.slice.offset()},e}(),e.parse=function(t){return _.katch((function(){return new u(new d(t)).parse()}))}}).call(this)},71427:function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d,m,y;u=r(41060),l=r(30647).make_esc,r(87746).OPS,c=r(75656),t=c.openpgp,y=r(86459),h=y.katch,y.unix_time,y.athrow,o=y.Warnings,a=y.bufeq_secure,p=r(98700).parse,f=r(20776).import_key_pgp,r(40537),s=r(57004),r(90927),d=r(70379).verify,m=r(23725).verify,n=function(){function e(t,e){this.packets=t,this.verified_signatures=[],this.subkeys=[],this.primary=null,this.userids=[],this.user_attributes=[],this.warnings=new o,this.opts=e||{},null==this.opts.strict&&(this.opts.strict=!0)}return e.prototype.to_obj=function(){return{subkeys:this.subkeys,primary:this.primary,userids:this.userids}},e.prototype._extract_keys=function(){var t,e,r,n,i,o;if(t=null,this.packets.length)if((this.primary=this.packets[0]).is_primary())for(e=n=0,i=(o=this.packets.slice(1)).length;n0&&(a=0,c=[]),f.is_duplicate_primary()||c.push(f),g()}()},_(e)})((function(){return e(null)}))},e}(),i=function(){function e(t){this.keyfetch=t.keyfetch,this.data_fn=t.data_fn,this.data=t.data,this.strict=t.strict,this.now=t.now,this.assert_pgp_hash=t.assert_pgp_hash,this.literals=[],this.enc_data_packet=null,this.warnings=new o}return e.prototype._get_session_key=function(t){var e,r,n,i,o,s,a,f,h,l,p,d,m,y,_,g;y=u.findDeferral(arguments),n=[],r=null,p=!1,s=function(){var t;for(t=[];this.packets.length&&(h=this.packets[0].to_esk_packet());)n.push(h),this.packets.shift(),t.push(h.get_key_id());return t}.call(this),(g=this,function(t){if(!s.length)return t(e=!1);e=!0,function(t){_=new u.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._get_session_key"}),g.keyfetch.fetch(s,c.ops.decrypt,_.defer({assign_fn:function(){return r=arguments[0],f=arguments[1],o=arguments[2]},lineno:178})),_._fulfill()}((function(){!function(t){if(null!=r)return t();l=n[o],a=f.find_pgp_key_material(s[o]),i=a.get_fingerprint(),d=a.key,function(t){_=new u.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._get_session_key"}),d.decrypt_and_unpad(l.ekey,{fingerprint:i},_.defer({assign_fn:function(){return r=arguments[0],m=arguments[1],p=arguments[2]},lineno:184})),_._fulfill()}((function(){return t(null==r?g.encryption_subkey=a:void 0)}))}(t)}))})((function(){return t(r,e,m,p)}))},e.prototype._find_encrypted_data=function(t){var e,r;return e=r=null,this.packets.length&&(r=this.packets[0].to_enc_data_packet())?this.packets.pop():e=new Error("Could not find encrypted data packet"),t(e,r)},e.prototype._decrypt_with_session_key=function(t,e,r,n){var i,o,s,a,c,l;a=u.findDeferral(arguments),l=h((function(){return f(t,r)})),o=l[0],i=l[1],function(t){if(null!=o)return t();!function(t){c=new u.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt_with_session_key"}),e.decrypt({cipher:i},c.defer({assign_fn:function(){return o=arguments[0],s=arguments[1]},lineno:206})),c._fulfill()}(t)}((function(){return n(o,s)}))},e.prototype._parse=function(t,e){var r;return e((r=p(t))[0],r[1])},e.prototype._decrypt=function(t){var e,r,n,i,o,s,a,f,h,c;f=u.findDeferral(arguments),r=l(t,"Message::decrypt"),(c=this,function(t){h=new u.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),c._get_session_key(r(h.defer({assign_fn:function(){return n=arguments[0],a=arguments[1],o=arguments[2]},lineno:219}))),h._fulfill()})(function(c){return function(){!function(t){if(!n)return t();!function(t){h=new u.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),c._find_encrypted_data(r(h.defer({assign_fn:function(){return e=arguments[0]},lineno:221}))),h._fulfill()}((function(){!function(t){h=new u.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),c._decrypt_with_session_key(a,e,o,r(h.defer({assign_fn:function(){return s=arguments[0]},lineno:222}))),h._fulfill()}((function(){!function(t){h=new u.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),c._parse(s,r(h.defer({assign_fn:function(){return i=arguments[0]},lineno:223}))),h._fulfill()}((function(){return t(c.packets=i.concat(c.packets))}))}))}))}((function(){return t(null)}))}}(this))},e.prototype._inflate=function(t){var e,r,n,i,o,s,a;o=u.findDeferral(arguments),i=[],e=l(t,"Message::_inflate"),(a=this,function(t){var f,h,c,l;c=a.packets,h=c.length,f=0,l=function(t){var p;if(p=function(){return u.trampoline((function(){return++f,l(t)}))},!(f>4)+e},e.prototype.set_hash_algorithm=function(t){return null!=(this.hash=a(t))?this.streamer=f[this.hash.algname]():(console.warn("No such hash: "+t+"; defaulting to SHA-256"),this.hash=o,this.streamer=f.SHA256())},e.prototype.read=function(e){var r;switch(this.type=e.read_uint8(),this.type){case t.s2k.plain:this.set_hash_algorithm(e.read_uint8());break;case t.s2k.salt:this.set_hash_algorithm(e.read_uint8()),this.salt=e.read_buffer(8);break;case t.s2k.salt_iter:this.set_hash_algorithm(e.read_uint8()),this.salt=e.read_buffer(8),this.EXPBIAS=6,r=e.read_uint8(),this.count=this._count(r,this.EXPBIAS);break;case t.s2k.gnu:this.read_gnu_extensions(e);break;default:throw new Error("unknown s2k type! "+this.type)}return this},e.prototype.read_gnu_extensions=function(e){var r;if(e.read_uint8(),"GNU"===e.read_buffer(3).toString("utf8")){if(1001===(r=e.read_uint8()+1e3))return this.type=t.s2k.gnu_dummy;throw new Error("unknown s2k gnu protection mode: "+r)}throw new Error("Malformed GNU-extension: "+ext)},e.prototype.write=function(t,e,r,n){return this.type=3,this.salt=e,this.count=this._count(r,6),this.s2kLength=10,this.produce_key(t,n)},e.prototype.is_dummy=function(){return this.type===t.s2k.gnu_dummy},e.prototype.produce_key=function(e,r){var i,o,s,a;return null==r&&(r=16),function(){switch(this.type){case t.s2k.plain:return this.hash(e);case t.s2k.salt:return this.hash(n.concat([this.salt,e]));case t.s2k.salt_iter:return a=n.concat([this.salt,e]),i=u({alg:this.hash.algname,seed:a,count:this.count}),null==r||24!==r&&32!==r?i:(s=n.from([0]),o=u({alg:this.hash.algname,seed:a,count:this.count,prefix:s}),n.concat([i,o]));default:return null}}.call(this).slice(0,r)},e}(),h={},u=function(t){var e,r,i,o,s,a,u,c,l,p,d,m;if(e=t.alg,l=t.seed,i=t.count,a=t.prefix,o=e+"-"+l.toString("base64")+"-"+i,null!=a&&(o+="-"+a.toString("base64")),null!=(m=h[o]))return m;for(p=f[e](),null!=a&&p.update(a),r=n.concat(function(){var t,e;for(e=[],t=0;t<4096;++t)e.push(l);return e}()),d=0;d+r.length<=i;)p.update(r),d+=r.length;return u=i-d,s=Math.ceil(u/l.length),c=p(n.concat(function(){var t,e;for(e=[],t=0;0<=s?ts;0<=s?++t:--t)e.push(l);return e}()).slice(0,u)),h[o]=c,c},s=function(){function e(){this.s2k_convention=null,this.s2k=null,this.iv=null,this.cipher=null,this.payload=null}return e.prototype.is_dummy=function(){return null!=this.s2k&&this.s2k.is_dummy()},e.prototype.has_private=function(){return!this.is_dummy()},e.prototype.is_locked=function(){return this.s2k_convention!==t.s2k_convention.none&&!this.is_dummy()},e}(),e.S2K=i,e.SecretKeyMaterial=s}).call(this)},58532:function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c={}.hasOwnProperty;u=r(41060),f=r(30647).make_esc,i=r(6657).burn,h=r(71427),o=r(57004).decode,t=r(75656),n=r(78548).SignatureEngineInterface,e.decode_sig=s=function(e){var r,n,i,s,a;return r=e.armored,n=(a=o(r))[0],i=a[1],s=t.openpgp.message_types,null==n&&i.type!==s.generic&&(n=new Error("wrong message type; expected a generic message; got "+i.type)),[n,i]},e.get_sig_body=a=function(t){var e,r,n,i,o;return e=t.armored,i=null,r=(o=s({armored:e}))[0],n=o[1],null==r&&(i=n.body),[r,i]},e.SignatureEngine=function(t){function e(t){this.km=t.km}return function(t,e){for(var r in e)c.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.get_km=function(){return this.km},e.prototype.box=function(t,e,r){var n,o,s,a,f,h;a=u.findDeferral(arguments),null==r&&(r={}),o={type:"pgp"},(h=this,function(e){if(null!=r.prefix)return e(n=new Error("prefixes cannot be used with PGP"));!function(e){if(null==(s=h.km.find_signing_pgp_key()))return e(n=new Error("No signing key found"));!function(e){var h,c;f=new u.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.box"}),i({msg:t,signing_key:s,opts:r},f.defer({assign_fn:(h=o,c=o,function(){return n=arguments[0],h.pgp=arguments[1],c.raw=arguments[2]}),lineno:38})),f._fulfill()}((function(){return e(null==n?o.armored=o.pgp:void 0)}))}(e)})((function(){return e(n,o)}))},e.prototype.get_unverified_payload_from_raw_sig_body=function(t,e){var r,n,i,o,s,a,c,l,p,d;p=u.findDeferral(arguments),r=t.body,i=f(e,"get_payload_from_raw_sig_body"),l=null,a=new h.Message({}),d=new u.Deferrals((function(){return 1!==(c=s.length)||null==(o=s[0])?n=new Error("Got "+c+" literals; only wanted 1"):l=o.data,e(n,l)}),{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.get_unverified_payload_from_raw_sig_body"}),a.parse_and_inflate(r,i(d.defer({assign_fn:function(){return s=arguments[0]},lineno:49}))),d._fulfill()},e.prototype.get_body=function(t,e){var r;return e((r=a(t))[0],r[1])},e.prototype.decode=function(t,e){var r;return e((r=s({armored:t}))[0],r[1])},e.prototype.unbox=function(t,e,r){var n,i,o,s,a,c,l;a=u.findDeferral(arguments),null==r&&(r={}),i=f(e,"SignatureEngine::unbox"),(l=this,function(e){if("string"!=typeof t)return e();!function(e){c=new u.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.unbox"}),l.decode(t,i(c.defer({assign_fn:function(){return t=arguments[0]},lineno:73}))),c._fulfill()}(e)})(function(f){return function(){r.keyfetch=f.km,r.strict=!0,n=new h.Message(r),c=new u.Deferrals((function(){c=new u.Deferrals((function(){return e(null,s,t.body)}),{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.unbox"}),f._check_result(o,i(c.defer({assign_fn:function(){return s=arguments[0]},lineno:78}))),c._fulfill()}),{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.unbox"}),n.parse_and_process({body:t.body},i(c.defer({assign_fn:function(){return o=arguments[0]},lineno:77}))),c._fulfill()}}(this))},e.prototype._check_result=function(t,e){var r,n,i,o,s,a,u;return n=s=null,1!==(o=t.length)||null==(i=t[0])?n=new Error("Expected only one pgp literal; got "+o):null==(a=null!=(u=i.get_data_signer())?u.sig:void 0)?n=new Error("Expected a signature on the payload message"):null==this.km.find_pgp_key(r=a.get_key_id())?n=new Error("Failed sanity check; didn't have a key for '"+r.toString("hex")+"'"):s=i.data,e(n,s)},e}(n)}).call(this)},70475:function(t,e,r){var n=r(48287).Buffer;(function(){var t;t=r(75656),e.make_time_packet=function(t){var e;return t||(t=Math.floor(Date.now()/1e3)),(e=n.alloc(4)).writeUInt32BE(t,0),e},e.calc_checksum=function(t){var e,r,n,i;for(r=0,e=n=0,i=t.length;0<=i?ni;e=0<=i?++n:--n)r=(r+t.readUInt8(e))%65536;return r},e.encode_length=function(t,e){var r;return null==e&&(e=!1),r=null,t>=8384||e?((r=n.alloc(5)).writeUInt8(255,0),r.writeUInt32BE(t,1)):t<192?(r=n.alloc(1)).writeUInt8(t,0):t>=192&&t<8384&&(r=n.alloc(2)).writeUInt16BE(t-192+49152,0),r},e.ops_to_keyflags=function(e){var r;return r=0,e&t.ops.encrypt&&(r|=t.openpgp.key_flags.encrypt_comm),e&t.ops.decrypt&&(r|=t.openpgp.key_flags.encrypt_comm),e&t.ops.verify&&(r|=t.openpgp.key_flags.sign_data),e&t.ops.sign&&(r|=t.openpgp.key_flags.sign_data),r},e.fit_to_size=function(t,e){var r;return 0==(r=t-e.length)?e:r>0?n.concat([n.alloc(r),e]):r<0?e.slice(-t):void 0}}).call(this)},66681:function(t,e,r){(function(){var t,n,i;n=r(41060),i=r(75656),t=i.openpgp,e.Base=function(){function e(t){this.packets=t.packets,this.keyfetch=t.keyfetch,this._sig=null}return e.prototype._find_signature=function(e){var r;return e(1!==(r=this.packets.length)?new Error("Expected one signature packet; got "+r):(this._sig=this.packets[0]).tag!==t.packet_tags.signature?new Error("Expected a signature packet; but got type="+this.packets[0].tag):null)},e.prototype._fetch_key=function(t){var e,r,o,s,a,u,f;a=n.findDeferral(arguments),r=this._sig.get_key_id(),(f=this,function(t){u=new n.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/verifier.iced",funcname:"Base._fetch_key"}),f.keyfetch.fetch([r],i.ops.verify,u.defer({assign_fn:function(){return e=arguments[0],s=arguments[1],arguments[2]},lineno:28})),u._fulfill()})(function(n){return function(){return null==e&&(o=s.find_pgp_key_material(r),n._sig.key=o.key,n._sig.key_manager=s,n._sig.subkey_material=o),t(e)}}(this))},e}()}).call(this)},4486:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c;f=r(41060),t=r(90927).SHA512,r(75656).openpgp,h=r(92975).nbs,c=r(86459),s=c.buffer_to_ui8a,o=c.bufeq_secure,i=r(17260).SRF,u={MD5:[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],SHA1:[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],SHA224:[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28],SHA256:[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],SHA384:[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],SHA512:[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64]},e.emsa_pkcs1_encode=function(e,r,i){var o,a,f,c;return null==i&&(i={}),a=i.hasher||t,f=u[a.algname],c=r-f.length-3-a.output_length,o=n.concat([n.from([0,1]),n.from(function(){var t,e;for(e=[],t=0;0<=c?tc;0<=c?++t:--t)e.push(255);return e}()),n.from([0]),n.from(f),e]),h(s(o),256)},e.emsa_pkcs1_decode=function(t,e){var r,i,s,a,f;if(r=f=null,a=0,t.length<2)r=new Error("signature was way too short: < 2 bytes");else if(1!==t.readUInt16BE(0))r=new Error("Sig verify error: Didn't get two-byte header 0x00 0x01");else{for(a=2;a=t.length||0!==t.readUInt8(a)?r=new Error("Sig verify error: Missed the 0x0 separator"):(a++,s=u[e.algname],o(n.from(s),t.slice(a,s.length+a))?(a+=s.length,(i=t.slice(a)).length!==e.output_length?r=new Error("Sig verify error: trailing garbage in signature"):f=i):r=new Error("Sig verify error: missing ASN header for "+e.algname))}return[r,f]},a=function(t,e){var r,o,s,a,u,h,c,l;h=f.findDeferral(arguments),o=[],l=function(e){var n,p;if(n=e,p=function(){return f.trampoline((function(){return l(e)}))},!(o.lengtha;u=0<=a?++t:--t)0!==(s=r.readUInt8(u))&&o.push(s);return p()}),{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/pad.iced"}),i().random_bytes(a,c.defer({assign_fn:function(){return r=arguments[0]},lineno:77})),c._fulfill()},l((function(){return e(n.from(o))}))},e.eme_pkcs1_encode=function(t,e,r){var i,o,u,c,l,p,d;p=f.findDeferral(arguments),l=u=null,function(r){if(t.length>e-11)return r(u=new Error("cannot encrypt message -- it's too long!"));c=e-3-t.length,function(t){d=new f.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/pad.iced",funcname:"eme_pkcs1_encode"}),a(c,d.defer({assign_fn:function(){return i=arguments[0]},lineno:93})),d._fulfill()}((function(){return o=n.concat([n.from([0,2]),i,n.from([0]),t]),r(l=h(s(o),256))}))}((function(){return r(u,l)}))},e.eme_pkcs1_decode=function(t){var e,r,n;if(e=n=null,t.length<12)e=new Error("Ciphertext too short, needs to be >= 12 bytes");else if(2!==t.readUInt16BE(0))e=new Error("Failed to find expected header: 0x00 0x02");else{for(r=2;r=t.length?e=new Error("didn't get 0x00 seperator octet"):(r++,n=t.slice(r))}return[e,n]},e.ecc_pkcs5_pad_data=function(t){var e,r,i,o;return e=i=null,(r=40-t.length)<0?e=new Error("Pad underrun"):(o=function(){var t,e;for(e=[],t=0;0<=r?tr;0<=r?t++:t--)e.push(r);return e}(),i=n.concat([t,n.from(o)])),[e,i]},e.ecc_pkcs5_unpad_data=function(t,e){var r,n,i,o,s,a;if(n=null,(o=t.length-e)<0)n=new Error("Pad length was < 0; pad underrun");else if(t.length%8!=0)n=new Error("Padded data must be a multiple of 8 bytes long");else for(i=s=e,a=t.length;e<=a?sa;i=e<=a?++s:--s)if((r=t.readUInt8(i))!==o){n=new Error("Got bad PKCS#5 pad character "+r+" at position "+i+"; wanted "+o);break}return n}}).call(this)},65960:function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w;f=r(41060),v=r(50585),p=v.nbv,v.nbi,i=v.BigInteger,r(31093).prng.native_rng,_=r(73035).small_primes,h=r(30647).make_esc,t=r(86459).ASP,l=r(92975).nbs,w=r(17260),o=w.MRF,a=w.SRF,n=function(){function t(){this.tot=0,this.n=0}return t.prototype.start=function(){return this._t=Date.now()},t.prototype.stop=function(){var t;return t=Date.now()-this._t,console.log("ran in "+t),this.tot+=t,this.n++},t.prototype.avg=function(){return this.tot/this.n},t}(),m=function(t,e){return t.modInt(e)},new n,u=function(t){var e,r,n,i,o;for(i=p(1),r=t.bitLength(),r--,e=t.byteLength(),n=o=r;r<=0?o<=0:o>=0;n=r<=0?++o:--o)(i=i.square()).byteLength()>e&&(i=i.mod(t)),t.testBit(n)&&(i=i.shiftLeft(1));return i.compareTo(t)>0&&(i=i.mod(t)),0===i.compareTo(p(2))},g=function(t){var e,r,n,s,a,u,f,h;if(a=t.s,s=t.r,r=t.p,n=t.p1,0!==(u=o().random_zn(r).modPow(s,r)).compareTo(i.ONE))for(e=f=h=a-1;h<=0?f<=0:f>=0;e=h<=0?++f:--f)if(0!==u.compareTo(n)){if(0===e)return!1;if(0===(u=u.square().mod(r)).compareTo(i.ONE))return!1}return!0},b=function(t){var e,r;return!((e=t.p).compareTo(i.ZERO)<=0||(e.compareTo(p(7))<=0?2!==(r=e.intValue())&&3!==r&&5!==r&&7!==r:!e.testBit(0)))},c=function(e,r){var n,o,s,a,u,c,l,p,d,m,y;m=f.findDeferral(arguments),u=e.p,a=e.iter,(n=e.asp)||(n=new t({})),a||(a=10),o=h(r,"miller_rabin"),p=b({p:u}),function(t){if(!p)return t();c=u.subtract(i.ONE),d=c.getLowestSetBit(),l=c.shiftRight(d),p=!0,function(t){var e,r,i,h;s=0,i=(e=a)>0?1:-1,r=e>0,h=function(t){var e,_;if(e=t,_=function(){return f.trampoline((function(){return s+=i,h(t)}))},!0===r&&s>=a||!1===r&&s<=a)return e();y=new f.Deferrals((function(){!function(t){if(g({s:d,r:l,p:u,p1:c}))return t();p=!1,e()}(_)}),{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),n.progress({what:"mr",i:s,total:a,p:u},o(y.defer({lineno:122}))),y._fulfill()},h(t)}((function(){!function(t){y=new f.Deferrals(t,{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),n.progress({what:"mr",i:a,total:a,p:u},o(y.defer({lineno:127}))),y._fulfill()}(t)}))}((function(){return r(null,p)}))},s=function(){function t(t,e){this.p=t,this.sieve=e,this.inc=0,this.maxinc=-1,this.sievepos=m(this.p,this.sieve.length),this.calcmods()}return t.prototype.getp=function(){return this.p},t.prototype.setmax=function(t){if(-1!==this.maxinc)throw new Error("can only setmax() once");return this.maxinc=t},t.prototype.calcmods=function(){var t;return this.p=this.p.add(p(this.inc)),-1!==this.maxinc&&(this.maxinc-=this.inc),this.inc=0,this.mods=function(){var e,r,n;for(n=[],e=0,r=_.length;e=e;)if(this.mods[t]-=e,this.mods[t]+this.inc===0)return!0;return!1},t.prototype.next_weak=function(){for(var t;;){if(t=this.sieve[this.sievepos],this.sievepos=(this.sievepos+t)%this.sieve.length,this.inc+=t,this.inc>this.maxinc&&this.maxinc>0)return this.tmp=p(0),this.tmp;if(this.inc<0&&this.calcmods(),!this.decrement_mods_find_divisor())return this.tmp=this.p.add(p(this.inc)),this.tmp}},t.prototype.next_fermat=function(){for(;;)if(this.next_weak(),!this.tmp||u(this.tmp))return this.tmp},t.prototype.next_strong=function(t){for(null==t&&(t=32);;)if(this.next_weak(),!this.tmp||u(this.tmp)&&probab_prime(this.tmp,t))return this.tmp},t}(),d=function(t,e){var r,n,a,l,d,m,y,_,g,b,v,w,k,M,x,S,E;x=f.findDeferral(arguments),k=t.start,b=t.range,w=t.sieve,r=t.asp,(d=t.iters)||(d=20),(y=new s(k,w)).setmax(b),g=function(){var t;for(t=[];(_=y.next_weak()).compareTo(i.ZERO)>0;)t.push(_);return t}(),n=h(e,"prime_search"),v=null,E=function(t){var e,i;if(e=t,i=function(){return f.trampoline((function(){return E(t)}))},!g.length||null!=v)return e();a=o().random_word()%g.length,m=g[a],S=new f.Deferrals((function(){!function(t){if(!u(m))return t();!function(t){S=new f.Deferrals(t,{parent:x,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),c({p:m,iters:d,asp:r},n(S.defer({assign_fn:function(){return l=arguments[0]},lineno:229}))),S._fulfill()}((function(){!function(t){S=new f.Deferrals(t,{parent:x,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),r.progress({what:"passed_mr",p:m},n(S.defer({lineno:230}))),S._fulfill()}((function(){return t(l?v=m:r.progress({what:"failed_mr",p:m}))}))}))}((function(){return M=g.pop(),i(ae)return!0;if(t%r==0)return!1}return!1},e.fermat2_test=u,e.nbs=l,e.small_primes=_,e.miller_rabin=c,e.random_prime=y}).call(this)},73035:function(t,e){(function(){e.small_primes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999,5003,5009,5011,5021,5023,5039,5051,5059,5077,5081,5087,5099,5101,5107,5113,5119,5147,5153,5167,5171,5179,5189,5197,5209,5227,5231,5233,5237,5261,5273,5279,5281,5297,5303,5309,5323,5333,5347,5351,5381,5387,5393,5399,5407,5413,5417,5419,5431,5437,5441,5443,5449,5471,5477,5479,5483,5501,5503,5507,5519,5521,5527,5531,5557,5563,5569,5573,5581,5591,5623,5639,5641,5647,5651,5653,5657,5659,5669,5683,5689,5693,5701,5711,5717,5737,5741,5743,5749,5779,5783,5791,5801,5807,5813,5821,5827,5839,5843,5849,5851,5857,5861,5867,5869,5879,5881,5897,5903,5923,5927,5939,5953,5981,5987,6007,6011,6029,6037,6043,6047,6053,6067,6073,6079,6089,6091,6101,6113,6121,6131,6133,6143,6151,6163,6173,6197,6199,6203,6211,6217,6221,6229,6247,6257,6263,6269,6271,6277,6287,6299,6301,6311,6317,6323,6329,6337,6343,6353,6359,6361,6367,6373,6379,6389,6397,6421,6427,6449,6451,6469,6473,6481,6491,6521,6529,6547,6551,6553,6563,6569,6571,6577,6581,6599,6607,6619,6637,6653,6659,6661,6673,6679,6689,6691,6701,6703,6709,6719,6733,6737,6761,6763,6779,6781,6791,6793,6803,6823,6827,6829,6833,6841,6857,6863,6869,6871,6883,6899,6907,6911,6917,6947,6949,6959,6961,6967,6971,6977,6983,6991,6997,7001,7013,7019,7027,7039,7043,7057,7069,7079,7103,7109,7121,7127,7129,7151,7159,7177,7187,7193,7207,7211,7213,7219,7229,7237,7243,7247,7253,7283,7297,7307,7309,7321,7331,7333,7349,7351,7369,7393,7411,7417,7433,7451,7457,7459,7477,7481,7487,7489,7499,7507,7517,7523,7529,7537,7541,7547,7549,7559,7561,7573,7577,7583,7589,7591,7603,7607,7621,7639,7643,7649,7669,7673,7681,7687,7691,7699,7703,7717,7723,7727,7741,7753,7757,7759,7789,7793,7817,7823,7829,7841,7853,7867,7873,7877,7879,7883,7901,7907,7919,7927,7933,7937,7949,7951,7963,7993,8009,8011,8017,8039,8053,8059,8069,8081,8087,8089,8093,8101,8111,8117,8123,8147,8161,8167,8171,8179,8191,8209,8219,8221,8231,8233,8237,8243,8263,8269,8273,8287,8291,8293,8297,8311,8317,8329,8353,8363,8369,8377,8387,8389,8419,8423,8429,8431,8443,8447,8461,8467,8501,8513,8521,8527,8537,8539,8543,8563,8573,8581,8597,8599,8609,8623,8627,8629,8641,8647,8663,8669,8677,8681,8689,8693,8699,8707,8713,8719,8731,8737,8741,8747,8753,8761,8779,8783,8803,8807,8819,8821,8831,8837,8839,8849,8861,8863,8867,8887,8893,8923,8929,8933,8941,8951,8963,8969,8971,8999,9001,9007,9011,9013,9029,9041,9043,9049,9059,9067,9091,9103,9109,9127,9133,9137,9151,9157,9161,9173,9181,9187,9199,9203,9209,9221,9227,9239,9241,9257,9277,9281,9283,9293,9311,9319,9323,9337,9341,9343,9349,9371,9377,9391,9397,9403,9413,9419,9421,9431,9433,9437,9439,9461,9463,9467,9473,9479,9491,9497,9511,9521,9533,9539,9547,9551,9587,9601,9613,9619,9623,9629,9631,9643,9649,9661,9677,9679,9689,9697,9719,9721,9733,9739,9743,9749,9767,9769,9781,9787,9791,9803,9811,9817,9829,9833,9839,9851,9857,9859,9871,9883,9887,9901,9907,9923,9929,9931,9941,9949,9967,9973,10007,10009,10037,10039,10061,10067,10069,10079,10091,10093,10099,10103,10111,10133,10139,10141,10151,10159,10163,10169,10177,10181,10193,10211,10223,10243,10247,10253,10259,10267,10271,10273,10289,10301,10303,10313,10321,10331,10333,10337,10343,10357,10369,10391,10399,10427,10429,10433,10453,10457,10459,10463,10477,10487,10499,10501,10513,10529,10531,10559,10567,10589,10597,10601,10607,10613,10627,10631,10639,10651,10657,10663,10667,10687,10691,10709,10711,10723,10729,10733,10739,10753,10771,10781,10789,10799,10831,10837,10847,10853,10859,10861,10867,10883,10889,10891,10903,10909,10937,10939,10949,10957,10973,10979,10987,10993,11003,11027,11047,11057,11059,11069,11071,11083,11087,11093,11113,11117,11119,11131,11149,11159,11161,11171,11173,11177,11197,11213,11239,11243,11251,11257,11261,11273,11279,11287,11299,11311,11317,11321,11329,11351,11353,11369,11383,11393,11399,11411,11423,11437,11443,11447,11467,11471,11483,11489,11491,11497,11503,11519,11527,11549,11551,11579,11587,11593,11597,11617,11621,11633,11657,11677,11681,11689,11699,11701,11717,11719,11731,11743,11777,11779,11783,11789,11801,11807,11813,11821,11827,11831,11833,11839,11863,11867,11887,11897,11903,11909,11923,11927,11933,11939,11941,11953,11959,11969,11971,11981,11987,12007,12011,12037,12041,12043,12049,12071,12073,12097,12101,12107,12109,12113,12119,12143,12149,12157,12161,12163,12197,12203,12211,12227,12239,12241,12251,12253,12263,12269,12277,12281,12289,12301,12323,12329,12343,12347,12373,12377,12379,12391,12401,12409,12413,12421,12433,12437,12451,12457,12473,12479,12487,12491,12497,12503,12511,12517,12527,12539,12541,12547,12553,12569,12577,12583,12589,12601,12611,12613,12619,12637,12641,12647,12653,12659,12671,12689,12697,12703,12713,12721,12739,12743,12757,12763,12781,12791,12799,12809,12821,12823,12829,12841,12853,12889,12893,12899,12907,12911,12917,12919,12923,12941,12953,12959,12967,12973,12979,12983,13001,13003,13007,13009,13033,13037,13043,13049,13063,13093,13099,13103,13109,13121,13127,13147,13151,13159,13163,13171,13177,13183,13187,13217,13219,13229,13241,13249,13259,13267,13291,13297,13309,13313,13327,13331,13337,13339,13367,13381,13397,13399,13411,13417,13421,13441,13451,13457,13463,13469,13477,13487,13499,13513,13523,13537,13553,13567,13577,13591,13597,13613,13619,13627,13633,13649,13669,13679,13681,13687,13691,13693,13697,13709,13711,13721,13723,13729,13751,13757,13759,13763,13781,13789,13799,13807,13829,13831,13841,13859,13873,13877,13879,13883,13901,13903,13907,13913,13921,13931,13933,13963,13967,13997,13999,14009,14011,14029,14033,14051,14057,14071,14081,14083,14087,14107,14143,14149,14153,14159,14173,14177,14197,14207,14221,14243,14249,14251,14281,14293,14303,14321,14323,14327,14341,14347,14369,14387,14389,14401,14407,14411,14419,14423,14431,14437,14447,14449,14461,14479,14489,14503,14519,14533,14537,14543,14549,14551,14557,14561,14563,14591,14593,14621,14627,14629,14633,14639,14653,14657,14669,14683,14699,14713,14717,14723,14731,14737,14741,14747,14753,14759,14767,14771,14779,14783,14797,14813,14821,14827,14831,14843,14851,14867,14869,14879,14887,14891,14897,14923,14929,14939,14947,14951,14957,14969,14983,15013,15017,15031,15053,15061,15073,15077,15083,15091,15101,15107,15121,15131,15137,15139,15149,15161,15173,15187,15193,15199,15217,15227,15233,15241,15259,15263,15269,15271,15277,15287,15289,15299,15307,15313,15319,15329,15331,15349,15359,15361,15373,15377,15383,15391,15401,15413,15427,15439,15443,15451,15461,15467,15473,15493,15497,15511,15527,15541,15551,15559,15569,15581,15583,15601,15607,15619,15629,15641,15643,15647,15649,15661,15667,15671,15679,15683,15727,15731,15733,15737,15739,15749,15761,15767,15773,15787,15791,15797,15803,15809,15817,15823,15859,15877,15881,15887,15889,15901,15907,15913,15919,15923,15937,15959,15971,15973,15991,16001,16007,16033,16057,16061,16063,16067,16069,16073,16087,16091,16097,16103,16111,16127,16139,16141,16183,16187,16189,16193,16217,16223,16229,16231,16249,16253,16267,16273,16301,16319,16333,16339,16349,16361,16363,16369,16381,16411,16417,16421,16427,16433,16447,16451,16453,16477,16481,16487,16493,16519,16529,16547,16553,16561,16567,16573,16603,16607,16619,16631,16633,16649,16651,16657,16661,16673,16691,16693,16699,16703,16729,16741,16747,16759,16763,16787,16811,16823,16829,16831,16843,16871,16879,16883,16889,16901,16903,16921,16927,16931,16937,16943,16963,16979,16981,16987,16993,17011,17021,17027,17029,17033,17041,17047,17053,17077,17093,17099,17107,17117,17123,17137,17159,17167,17183,17189,17191,17203,17207,17209,17231,17239,17257,17291,17293,17299,17317,17321,17327,17333,17341,17351,17359,17377,17383,17387,17389,17393,17401,17417,17419,17431,17443,17449,17467,17471,17477,17483,17489,17491,17497,17509,17519,17539,17551,17569,17573,17579,17581,17597,17599,17609,17623,17627,17657,17659,17669,17681,17683,17707,17713,17729,17737,17747,17749,17761,17783,17789,17791,17807,17827,17837,17839,17851,17863,17881,17891,17903,17909,17911,17921,17923,17929,17939,17957,17959,17971,17977,17981,17987,17989,18013,18041,18043,18047,18049,18059,18061,18077,18089,18097,18119,18121,18127,18131,18133,18143,18149,18169,18181,18191,18199,18211,18217,18223,18229,18233,18251,18253,18257,18269,18287,18289,18301,18307,18311,18313,18329,18341,18353,18367,18371,18379,18397,18401,18413,18427,18433,18439,18443,18451,18457,18461,18481,18493,18503,18517,18521,18523,18539,18541,18553,18583,18587,18593,18617,18637,18661,18671,18679,18691,18701,18713,18719,18731,18743,18749,18757,18773,18787,18793,18797,18803,18839,18859,18869,18899,18911,18913,18917,18919,18947,18959,18973,18979,19001,19009,19013,19031,19037,19051,19069,19073,19079,19081,19087,19121,19139,19141,19157,19163,19181,19183,19207,19211,19213,19219,19231,19237,19249,19259,19267,19273,19289,19301,19309,19319,19333,19373,19379,19381,19387,19391,19403,19417,19421,19423,19427,19429,19433,19441,19447,19457,19463,19469,19471,19477,19483,19489,19501,19507,19531,19541,19543,19553,19559,19571,19577,19583,19597,19603,19609,19661,19681,19687,19697,19699,19709,19717,19727,19739,19751,19753,19759,19763,19777,19793,19801,19813,19819,19841,19843,19853,19861,19867,19889,19891,19913,19919,19927,19937,19949,19961,19963,19973,19979,19991,19993,19997,20011,20021,20023,20029,20047,20051,20063,20071,20089,20101,20107,20113,20117,20123,20129,20143,20147,20149,20161,20173,20177,20183,20201,20219,20231,20233,20249,20261,20269,20287,20297,20323,20327,20333,20341,20347,20353,20357,20359,20369,20389,20393,20399,20407,20411,20431,20441,20443,20477,20479,20483,20507,20509,20521,20533,20543,20549,20551,20563,20593,20599,20611,20627,20639,20641,20663,20681,20693,20707,20717,20719,20731,20743,20747,20749,20753,20759,20771,20773,20789,20807,20809,20849,20857,20873,20879,20887,20897,20899,20903,20921,20929,20939,20947,20959,20963,20981,20983,21001,21011,21013,21017,21019,21023,21031,21059,21061,21067,21089,21101,21107,21121,21139,21143,21149,21157,21163,21169,21179,21187,21191,21193,21211,21221,21227,21247,21269,21277,21283,21313,21317,21319,21323,21341,21347,21377,21379,21383,21391,21397,21401,21407,21419,21433,21467,21481,21487,21491,21493,21499,21503,21517,21521,21523,21529,21557,21559,21563,21569,21577,21587,21589,21599,21601,21611,21613,21617,21647,21649,21661,21673,21683,21701,21713,21727,21737,21739,21751,21757,21767,21773,21787,21799,21803,21817,21821,21839,21841,21851,21859,21863,21871,21881,21893,21911,21929,21937,21943,21961,21977,21991,21997,22003,22013,22027,22031,22037,22039,22051,22063,22067,22073,22079,22091,22093,22109,22111,22123,22129,22133,22147,22153,22157,22159,22171,22189,22193,22229,22247,22259,22271,22273,22277,22279,22283,22291,22303,22307,22343,22349,22367,22369,22381,22391,22397,22409,22433,22441,22447,22453,22469,22481,22483,22501,22511,22531,22541,22543,22549,22567,22571,22573,22613,22619,22621,22637,22639,22643,22651,22669,22679,22691,22697,22699,22709,22717,22721,22727,22739,22741,22751,22769,22777,22783,22787,22807,22811,22817,22853,22859,22861,22871,22877,22901,22907,22921,22937,22943,22961,22963,22973,22993,23003,23011,23017,23021,23027,23029,23039,23041,23053,23057,23059,23063,23071,23081,23087,23099,23117,23131,23143,23159,23167,23173,23189,23197,23201,23203,23209,23227,23251,23269,23279,23291,23293,23297,23311,23321,23327,23333,23339,23357,23369,23371,23399,23417,23431,23447,23459,23473,23497,23509,23531,23537,23539,23549,23557,23561,23563,23567,23581,23593,23599,23603,23609,23623,23627,23629,23633,23663,23669,23671,23677,23687,23689,23719,23741,23743,23747,23753,23761,23767,23773,23789,23801,23813,23819,23827,23831,23833,23857,23869,23873,23879,23887,23893,23899,23909,23911,23917,23929,23957,23971,23977,23981,23993,24001,24007,24019,24023,24029,24043,24049,24061,24071,24077,24083,24091,24097,24103,24107,24109,24113,24121,24133,24137,24151,24169,24179,24181,24197,24203,24223,24229,24239,24247,24251,24281,24317,24329,24337,24359,24371,24373,24379,24391,24407,24413,24419,24421,24439,24443,24469,24473,24481,24499,24509,24517,24527,24533,24547,24551,24571,24593,24611,24623,24631,24659,24671,24677,24683,24691,24697,24709,24733,24749,24763,24767,24781,24793,24799,24809,24821,24841,24847,24851,24859,24877,24889,24907,24917,24919,24923,24943,24953,24967,24971,24977,24979,24989,25013,25031,25033,25037,25057,25073,25087,25097,25111,25117,25121,25127,25147,25153,25163,25169,25171,25183,25189,25219,25229,25237,25243,25247,25253,25261,25301,25303,25307,25309,25321,25339,25343,25349,25357,25367,25373,25391,25409,25411,25423,25439,25447,25453,25457,25463,25469,25471,25523,25537,25541,25561,25577,25579,25583,25589,25601,25603,25609,25621,25633,25639,25643,25657,25667,25673,25679,25693,25703,25717,25733,25741,25747,25759,25763,25771,25793,25799,25801,25819,25841,25847,25849,25867,25873,25889,25903,25913,25919,25931,25933,25939,25943,25951,25969,25981,25997,25999,26003,26017,26021,26029,26041,26053,26083,26099,26107,26111,26113,26119,26141,26153,26161,26171,26177,26183,26189,26203,26209,26227,26237,26249,26251,26261,26263,26267,26293,26297,26309,26317,26321,26339,26347,26357,26371,26387,26393,26399,26407,26417,26423,26431,26437,26449,26459,26479,26489,26497,26501,26513,26539,26557,26561,26573,26591,26597,26627,26633,26641,26647,26669,26681,26683,26687,26693,26699,26701,26711,26713,26717,26723,26729,26731,26737,26759,26777,26783,26801,26813,26821,26833,26839,26849,26861,26863,26879,26881,26891,26893,26903,26921,26927,26947,26951,26953,26959,26981,26987,26993,27011,27017,27031,27043,27059,27061,27067,27073,27077,27091,27103,27107,27109,27127,27143,27179,27191,27197,27211,27239,27241,27253,27259,27271,27277,27281,27283,27299,27329,27337,27361,27367,27397,27407,27409,27427,27431,27437,27449,27457,27479,27481,27487,27509,27527,27529,27539,27541,27551,27581,27583,27611,27617,27631,27647,27653,27673,27689,27691,27697,27701,27733,27737,27739,27743,27749,27751,27763,27767,27773,27779,27791,27793,27799,27803,27809,27817,27823,27827,27847,27851,27883,27893,27901,27917,27919,27941,27943,27947,27953,27961,27967,27983,27997,28001,28019,28027,28031,28051,28057,28069,28081,28087,28097,28099,28109,28111,28123,28151,28163,28181,28183,28201,28211,28219,28229,28277,28279,28283,28289,28297,28307,28309,28319,28349,28351,28387,28393,28403,28409,28411,28429,28433,28439,28447,28463,28477,28493,28499,28513,28517,28537,28541,28547,28549,28559,28571,28573,28579,28591,28597,28603,28607,28619,28621,28627,28631,28643,28649,28657,28661,28663,28669,28687,28697,28703,28711,28723,28729,28751,28753,28759,28771,28789,28793,28807,28813,28817,28837,28843,28859,28867,28871,28879,28901,28909,28921,28927,28933,28949,28961,28979,29009,29017,29021,29023,29027,29033,29059,29063,29077,29101,29123,29129,29131,29137,29147,29153,29167,29173,29179,29191,29201,29207,29209,29221,29231,29243,29251,29269,29287,29297,29303,29311,29327,29333,29339,29347,29363,29383,29387,29389,29399,29401,29411,29423,29429,29437,29443,29453,29473,29483,29501,29527,29531,29537,29567,29569,29573,29581,29587,29599,29611,29629,29633,29641,29663,29669,29671,29683,29717,29723,29741,29753,29759,29761,29789,29803,29819,29833,29837,29851,29863,29867,29873,29879,29881,29917,29921,29927,29947,29959,29983,29989,30011,30013,30029,30047,30059,30071,30089,30091,30097,30103,30109,30113,30119,30133,30137,30139,30161,30169,30181,30187,30197,30203,30211,30223,30241,30253,30259,30269,30271,30293,30307,30313,30319,30323,30341,30347,30367,30389,30391,30403,30427,30431,30449,30467,30469,30491,30493,30497,30509,30517,30529,30539,30553,30557,30559,30577,30593,30631,30637,30643,30649,30661,30671,30677,30689,30697,30703,30707,30713,30727,30757,30763,30773,30781,30803,30809,30817,30829,30839,30841,30851,30853,30859,30869,30871,30881,30893,30911,30931,30937,30941,30949,30971,30977,30983,31013,31019,31033,31039,31051,31063,31069,31079,31081,31091,31121,31123,31139,31147,31151,31153,31159,31177,31181,31183,31189,31193,31219,31223,31231,31237,31247,31249,31253,31259,31267,31271,31277,31307,31319,31321,31327,31333,31337,31357,31379,31387,31391,31393,31397,31469,31477,31481,31489,31511,31513,31517,31531,31541,31543,31547,31567,31573,31583,31601,31607,31627,31643,31649,31657,31663,31667,31687,31699,31721,31723,31727,31729,31741,31751,31769,31771,31793,31799,31817,31847,31849,31859,31873,31883,31891,31907,31957,31963,31973,31981,31991,32003,32009,32027,32029,32051,32057,32059,32063,32069,32077,32083,32089,32099,32117,32119,32141,32143,32159,32173,32183,32189,32191,32203,32213,32233,32237,32251,32257,32261,32297,32299,32303,32309,32321,32323,32327,32341,32353,32359,32363,32369,32371,32377,32381,32401,32411,32413,32423,32429,32441,32443,32467,32479,32491,32497,32503,32507,32531,32533,32537,32561,32563,32569,32573,32579,32587,32603,32609,32611,32621,32633,32647,32653,32687,32693,32707,32713,32717,32719,32749,32771,32779,32783,32789,32797,32801,32803,32831,32833,32839,32843,32869,32887,32909,32911,32917,32933,32939,32941,32957,32969,32971,32983,32987,32993,32999,33013,33023,33029,33037,33049,33053,33071,33073,33083,33091,33107,33113,33119,33149,33151,33161,33179,33181,33191,33199,33203,33211,33223,33247,33287,33289,33301,33311,33317,33329,33331,33343,33347,33349,33353,33359,33377,33391,33403,33409,33413,33427,33457,33461,33469,33479,33487,33493,33503,33521,33529,33533,33547,33563,33569,33577,33581,33587,33589,33599,33601,33613,33617,33619,33623,33629,33637,33641,33647,33679,33703,33713,33721,33739,33749,33751,33757,33767,33769,33773,33791,33797,33809,33811,33827,33829,33851,33857,33863,33871,33889,33893,33911,33923,33931,33937,33941,33961,33967,33997,34019,34031,34033,34039,34057,34061,34123,34127,34129,34141,34147,34157,34159,34171,34183,34211,34213,34217,34231,34253,34259,34261,34267,34273,34283,34297,34301,34303,34313,34319,34327,34337,34351,34361,34367,34369,34381,34403,34421,34429,34439,34457,34469,34471,34483,34487,34499,34501,34511,34513,34519,34537,34543,34549,34583,34589,34591,34603,34607,34613,34631,34649,34651,34667,34673,34679,34687,34693,34703,34721,34729,34739,34747,34757,34759,34763,34781,34807,34819,34841,34843,34847,34849,34871,34877,34883,34897,34913,34919,34939,34949,34961,34963,34981,35023,35027,35051,35053,35059,35069,35081,35083,35089,35099,35107,35111,35117,35129,35141,35149,35153,35159,35171,35201,35221,35227,35251,35257,35267,35279,35281,35291,35311,35317,35323,35327,35339,35353,35363,35381,35393,35401,35407,35419,35423,35437,35447,35449,35461,35491,35507,35509,35521,35527,35531,35533,35537,35543,35569,35573,35591,35593,35597,35603,35617,35671,35677,35729,35731,35747,35753,35759,35771,35797,35801,35803,35809,35831,35837,35839,35851,35863,35869,35879,35897,35899,35911,35923,35933,35951,35963,35969,35977,35983,35993,35999,36007,36011,36013,36017,36037,36061,36067,36073,36083,36097,36107,36109,36131,36137,36151,36161,36187,36191,36209,36217,36229,36241,36251,36263,36269,36277,36293,36299,36307,36313,36319,36341,36343,36353,36373,36383,36389,36433,36451,36457,36467,36469,36473,36479,36493,36497,36523,36527,36529,36541,36551,36559,36563,36571,36583,36587,36599,36607,36629,36637,36643,36653,36671,36677,36683,36691,36697,36709,36713,36721,36739,36749,36761,36767,36779,36781,36787,36791,36793,36809,36821,36833,36847,36857,36871,36877,36887,36899,36901,36913,36919,36923,36929,36931,36943,36947,36973,36979,36997,37003,37013,37019,37021,37039,37049,37057,37061,37087,37097,37117,37123,37139,37159,37171,37181,37189,37199,37201,37217,37223,37243,37253,37273,37277,37307,37309,37313,37321,37337,37339,37357,37361,37363,37369,37379,37397,37409,37423,37441,37447,37463,37483,37489,37493,37501,37507,37511,37517,37529,37537,37547,37549,37561,37567,37571,37573,37579,37589,37591,37607,37619,37633,37643,37649,37657,37663,37691,37693,37699,37717,37747,37781,37783,37799,37811,37813,37831,37847,37853,37861,37871,37879,37889,37897,37907,37951,37957,37963,37967,37987,37991,37993,37997,38011,38039,38047,38053,38069,38083,38113,38119,38149,38153,38167,38177,38183,38189,38197,38201,38219,38231,38237,38239,38261,38273,38281,38287,38299,38303,38317,38321,38327,38329,38333,38351,38371,38377,38393,38431,38447,38449,38453,38459,38461,38501,38543,38557,38561,38567,38569,38593,38603,38609,38611,38629,38639,38651,38653,38669,38671,38677,38693,38699,38707,38711,38713,38723,38729,38737,38747,38749,38767,38783,38791,38803,38821,38833,38839,38851,38861,38867,38873,38891,38903,38917,38921,38923,38933,38953,38959,38971,38977,38993,39019,39023,39041,39043,39047,39079,39089,39097,39103,39107,39113,39119,39133,39139,39157,39161,39163,39181,39191,39199,39209,39217,39227,39229,39233,39239,39241,39251,39293,39301,39313,39317,39323,39341,39343,39359,39367,39371,39373,39383,39397,39409,39419,39439,39443,39451,39461,39499,39503,39509,39511,39521,39541,39551,39563,39569,39581,39607,39619,39623,39631,39659,39667,39671,39679,39703,39709,39719,39727,39733,39749,39761,39769,39779,39791,39799,39821,39827,39829,39839,39841,39847,39857,39863,39869,39877,39883,39887,39901,39929,39937,39953,39971,39979,39983,39989,40009,40013,40031,40037,40039,40063,40087,40093,40099,40111,40123,40127,40129,40151,40153,40163,40169,40177,40189,40193,40213,40231,40237,40241,40253,40277,40283,40289,40343,40351,40357,40361,40387,40423,40427,40429,40433,40459,40471,40483,40487,40493,40499,40507,40519,40529,40531,40543,40559,40577,40583,40591,40597,40609,40627,40637,40639,40693,40697,40699,40709,40739,40751,40759,40763,40771,40787,40801,40813,40819,40823,40829,40841,40847,40849,40853,40867,40879,40883,40897,40903,40927,40933,40939,40949,40961,40973,40993,41011,41017,41023,41039,41047,41051,41057,41077,41081,41113,41117,41131,41141,41143,41149,41161,41177,41179,41183,41189,41201,41203,41213,41221,41227,41231,41233,41243,41257,41263,41269,41281,41299,41333,41341,41351,41357,41381,41387,41389,41399,41411,41413,41443,41453,41467,41479,41491,41507,41513,41519,41521,41539,41543,41549,41579,41593,41597,41603,41609,41611,41617,41621,41627,41641,41647,41651,41659,41669,41681,41687,41719,41729,41737,41759,41761,41771,41777,41801,41809,41813,41843,41849,41851,41863,41879,41887,41893,41897,41903,41911,41927,41941,41947,41953,41957,41959,41969,41981,41983,41999,42013,42017,42019,42023,42043,42061,42071,42073,42083,42089,42101,42131,42139,42157,42169,42179,42181,42187,42193,42197,42209,42221,42223,42227,42239,42257,42281,42283,42293,42299,42307,42323,42331,42337,42349,42359,42373,42379,42391,42397,42403,42407,42409,42433,42437,42443,42451,42457,42461,42463,42467,42473,42487,42491,42499,42509,42533,42557,42569,42571,42577,42589,42611,42641,42643,42649,42667,42677,42683,42689,42697,42701,42703,42709,42719,42727,42737,42743,42751,42767,42773,42787,42793,42797,42821,42829,42839,42841,42853,42859,42863,42899,42901,42923,42929,42937,42943,42953,42961,42967,42979,42989,43003,43013,43019,43037,43049,43051,43063,43067,43093,43103,43117,43133,43151,43159,43177,43189,43201,43207,43223,43237,43261,43271,43283,43291,43313,43319,43321,43331,43391,43397,43399,43403,43411,43427,43441,43451,43457,43481,43487,43499,43517,43541,43543,43573,43577,43579,43591,43597,43607,43609,43613,43627,43633,43649,43651,43661,43669,43691,43711,43717,43721,43753,43759,43777,43781,43783,43787,43789,43793,43801,43853,43867,43889,43891,43913,43933,43943,43951,43961,43963,43969,43973,43987,43991,43997,44017,44021,44027,44029,44041,44053,44059,44071,44087,44089,44101,44111,44119,44123,44129,44131,44159,44171,44179,44189,44201,44203,44207,44221,44249,44257,44263,44267,44269,44273,44279,44281,44293,44351,44357,44371,44381,44383,44389,44417,44449,44453,44483,44491,44497,44501,44507,44519,44531,44533,44537,44543,44549,44563,44579,44587,44617,44621,44623,44633,44641,44647,44651,44657,44683,44687,44699,44701,44711,44729,44741,44753,44771,44773,44777,44789,44797,44809,44819,44839,44843,44851,44867,44879,44887,44893,44909,44917,44927,44939,44953,44959,44963,44971,44983,44987,45007,45013,45053,45061,45077,45083,45119,45121,45127,45131,45137,45139,45161,45179,45181,45191,45197,45233,45247,45259,45263,45281,45289,45293,45307,45317,45319,45329,45337,45341,45343,45361,45377,45389,45403,45413,45427,45433,45439,45481,45491,45497,45503,45523,45533,45541,45553,45557,45569,45587,45589,45599,45613,45631,45641,45659,45667,45673,45677,45691,45697,45707,45737,45751,45757,45763,45767,45779,45817,45821,45823,45827,45833,45841,45853,45863,45869,45887,45893,45943,45949,45953,45959,45971,45979,45989,46021,46027,46049,46051,46061,46073,46091,46093,46099,46103,46133,46141,46147,46153,46171,46181,46183,46187,46199,46219,46229,46237,46261,46271,46273,46279,46301,46307,46309,46327,46337,46349,46351,46381,46399,46411,46439,46441,46447,46451,46457,46471,46477,46489,46499,46507,46511,46523,46549,46559,46567,46573,46589,46591,46601,46619,46633,46639,46643,46649,46663,46679,46681,46687,46691,46703,46723,46727,46747,46751,46757,46769,46771,46807,46811,46817,46819,46829,46831,46853,46861,46867,46877,46889,46901,46919,46933,46957,46993,46997,47017,47041,47051,47057,47059,47087,47093,47111,47119,47123,47129,47137,47143,47147,47149,47161,47189,47207,47221,47237,47251,47269,47279,47287,47293,47297,47303,47309,47317,47339,47351,47353,47363,47381,47387,47389,47407,47417,47419,47431,47441,47459,47491,47497,47501,47507,47513,47521,47527,47533,47543,47563,47569,47581,47591,47599,47609,47623,47629,47639,47653,47657,47659,47681,47699,47701,47711,47713,47717,47737,47741,47743,47777,47779,47791,47797,47807,47809,47819,47837,47843,47857,47869,47881,47903,47911,47917,47933,47939,47947,47951,47963,47969,47977,47981,48017,48023,48029,48049,48073,48079,48091,48109,48119,48121,48131,48157,48163,48179,48187,48193,48197,48221,48239,48247,48259,48271,48281,48299,48311,48313,48337,48341,48353,48371,48383,48397,48407,48409,48413,48437,48449,48463,48473,48479,48481,48487,48491,48497,48523,48527,48533,48539,48541,48563,48571,48589,48593,48611,48619,48623,48647,48649,48661,48673,48677,48679,48731,48733,48751,48757,48761,48767,48779,48781,48787,48799,48809,48817,48821,48823,48847,48857,48859,48869,48871,48883,48889,48907,48947,48953,48973,48989,48991,49003,49009,49019,49031,49033,49037,49043,49057,49069,49081,49103,49109,49117,49121,49123,49139,49157,49169,49171,49177,49193,49199,49201,49207,49211,49223,49253,49261,49277,49279,49297,49307,49331,49333,49339,49363,49367,49369,49391,49393,49409,49411,49417,49429,49433,49451,49459,49463,49477,49481,49499,49523,49529,49531,49537,49547,49549,49559,49597,49603,49613,49627,49633,49639,49663,49667,49669,49681,49697,49711,49727,49739,49741,49747,49757,49783,49787,49789,49801,49807,49811,49823,49831,49843,49853,49871,49877,49891,49919,49921,49927,49937,49939,49943,49957,49991,49993,49999,50021,50023,50033,50047,50051,50053,50069,50077,50087,50093,50101,50111,50119,50123,50129,50131,50147,50153,50159,50177,50207,50221,50227,50231,50261,50263,50273,50287,50291,50311,50321,50329,50333,50341,50359,50363,50377,50383,50387,50411,50417,50423,50441,50459,50461,50497,50503,50513,50527,50539,50543,50549,50551,50581,50587,50591,50593,50599,50627,50647,50651,50671,50683,50707,50723,50741,50753,50767,50773,50777,50789,50821,50833,50839,50849,50857,50867,50873,50891,50893,50909,50923,50929,50951,50957,50969,50971,50989,50993,51001,51031,51043,51047,51059,51061,51071,51109,51131,51133,51137,51151,51157,51169,51193,51197,51199,51203,51217,51229,51239,51241,51257,51263,51283,51287,51307,51329,51341,51343,51347,51349,51361,51383,51407,51413,51419,51421,51427,51431,51437,51439,51449,51461,51473,51479,51481,51487,51503,51511,51517,51521,51539,51551,51563,51577,51581,51593,51599,51607,51613,51631,51637,51647,51659,51673,51679,51683,51691,51713,51719,51721,51749,51767,51769,51787,51797,51803,51817,51827,51829,51839,51853,51859,51869,51871,51893,51899,51907,51913,51929,51941,51949,51971,51973,51977,51991,52009,52021,52027,52051,52057,52067,52069,52081,52103,52121,52127,52147,52153,52163,52177,52181,52183,52189,52201,52223,52237,52249,52253,52259,52267,52289,52291,52301,52313,52321,52361,52363,52369,52379,52387,52391,52433,52453,52457,52489,52501,52511,52517,52529,52541,52543,52553,52561,52567,52571,52579,52583,52609,52627,52631,52639,52667,52673,52691,52697,52709,52711,52721,52727,52733,52747,52757,52769,52783,52807,52813,52817,52837,52859,52861,52879,52883,52889,52901,52903,52919,52937,52951,52957,52963,52967,52973,52981,52999,53003,53017,53047,53051,53069,53077,53087,53089,53093,53101,53113,53117,53129,53147,53149,53161,53171,53173,53189,53197,53201,53231,53233,53239,53267,53269,53279,53281,53299,53309,53323,53327,53353,53359,53377,53381,53401,53407,53411,53419,53437,53441,53453,53479,53503,53507,53527,53549,53551,53569,53591,53593,53597,53609,53611,53617,53623,53629,53633,53639,53653,53657,53681,53693,53699,53717,53719,53731,53759,53773,53777,53783,53791,53813,53819,53831,53849,53857,53861,53881,53887,53891,53897,53899,53917,53923,53927,53939,53951,53959,53987,53993,54001,54011,54013,54037,54049,54059,54083,54091,54101,54121,54133,54139,54151,54163,54167,54181,54193,54217,54251,54269,54277,54287,54293,54311,54319,54323,54331,54347,54361,54367,54371,54377,54401,54403,54409,54413,54419,54421,54437,54443,54449,54469,54493,54497,54499,54503,54517,54521,54539,54541,54547,54559,54563,54577,54581,54583,54601,54617,54623,54629,54631,54647,54667,54673,54679,54709,54713,54721,54727,54751,54767,54773,54779,54787,54799,54829,54833,54851,54869,54877,54881,54907,54917,54919,54941,54949,54959,54973,54979,54983,55001,55009,55021,55049,55051,55057,55061,55073,55079,55103,55109,55117,55127,55147,55163,55171,55201,55207,55213,55217,55219,55229,55243,55249,55259,55291,55313,55331,55333,55337,55339,55343,55351,55373,55381,55399,55411,55439,55441,55457,55469,55487,55501,55511,55529,55541,55547,55579,55589,55603,55609,55619,55621,55631,55633,55639,55661,55663,55667,55673,55681,55691,55697,55711,55717,55721,55733,55763,55787,55793,55799,55807,55813,55817,55819,55823,55829,55837,55843,55849,55871,55889,55897,55901,55903,55921,55927,55931,55933,55949,55967,55987,55997,56003,56009,56039,56041,56053,56081,56087,56093,56099,56101,56113,56123,56131,56149,56167,56171,56179,56197,56207,56209,56237,56239,56249,56263,56267,56269,56299,56311,56333,56359,56369,56377,56383,56393,56401,56417,56431,56437,56443,56453,56467,56473,56477,56479,56489,56501,56503,56509,56519,56527,56531,56533,56543,56569,56591,56597,56599,56611,56629,56633,56659,56663,56671,56681,56687,56701,56711,56713,56731,56737,56747,56767,56773,56779,56783,56807,56809,56813,56821,56827,56843,56857,56873,56891,56893,56897,56909,56911,56921,56923,56929,56941,56951,56957,56963,56983,56989,56993,56999,57037,57041,57047,57059,57073,57077,57089,57097,57107,57119,57131,57139,57143,57149,57163,57173,57179,57191,57193,57203,57221,57223,57241,57251,57259,57269,57271,57283,57287,57301,57329,57331,57347,57349,57367,57373,57383,57389,57397,57413,57427,57457,57467,57487,57493,57503,57527,57529,57557,57559,57571,57587,57593,57601,57637,57641,57649,57653,57667,57679,57689,57697,57709,57713,57719,57727,57731,57737,57751,57773,57781,57787,57791,57793,57803,57809,57829,57839,57847,57853,57859,57881,57899,57901,57917,57923,57943,57947,57973,57977,57991,58013,58027,58031,58043,58049,58057,58061,58067,58073,58099,58109,58111,58129,58147,58151,58153,58169,58171,58189,58193,58199,58207,58211,58217,58229,58231,58237,58243,58271,58309,58313,58321,58337,58363,58367,58369,58379,58391,58393,58403,58411,58417,58427,58439,58441,58451,58453,58477,58481,58511,58537,58543,58549,58567,58573,58579,58601,58603,58613,58631,58657,58661,58679,58687,58693,58699,58711,58727,58733,58741,58757,58763,58771,58787,58789,58831,58889,58897,58901,58907,58909,58913,58921,58937,58943,58963,58967,58979,58991,58997,59009,59011,59021,59023,59029,59051,59053,59063,59069,59077,59083,59093,59107,59113,59119,59123,59141,59149,59159,59167,59183,59197,59207,59209,59219,59221,59233,59239,59243,59263,59273,59281,59333,59341,59351,59357,59359,59369,59377,59387,59393,59399,59407,59417,59419,59441,59443,59447,59453,59467,59471,59473,59497,59509,59513,59539,59557,59561,59567,59581,59611,59617,59621,59627,59629,59651,59659,59663,59669,59671,59693,59699,59707,59723,59729,59743,59747,59753,59771,59779,59791,59797,59809,59833,59863,59879,59887,59921,59929,59951,59957,59971,59981,59999,60013,60017,60029,60037,60041,60077,60083,60089,60091,60101,60103,60107,60127,60133,60139,60149,60161,60167,60169,60209,60217,60223,60251,60257,60259,60271,60289,60293,60317,60331,60337,60343,60353,60373,60383,60397,60413,60427,60443,60449,60457,60493,60497,60509,60521,60527,60539,60589,60601,60607,60611,60617,60623,60631,60637,60647,60649,60659,60661,60679,60689,60703,60719,60727,60733,60737,60757,60761,60763,60773,60779,60793,60811,60821,60859,60869,60887,60889,60899,60901,60913,60917,60919,60923,60937,60943,60953,60961,61001,61007,61027,61031,61043,61051,61057,61091,61099,61121,61129,61141,61151,61153,61169,61211,61223,61231,61253,61261,61283,61291,61297,61331,61333,61339,61343,61357,61363,61379,61381,61403,61409,61417,61441,61463,61469,61471,61483,61487,61493,61507,61511,61519,61543,61547,61553,61559,61561,61583,61603,61609,61613,61627,61631,61637,61643,61651,61657,61667,61673,61681,61687,61703,61717,61723,61729,61751,61757,61781,61813,61819,61837,61843,61861,61871,61879,61909,61927,61933,61949,61961,61967,61979,61981,61987,61991,62003,62011,62017,62039,62047,62053,62057,62071,62081,62099,62119,62129,62131,62137,62141,62143,62171,62189,62191,62201,62207,62213,62219,62233,62273,62297,62299,62303,62311,62323,62327,62347,62351,62383,62401,62417,62423,62459,62467,62473,62477,62483,62497,62501,62507,62533,62539,62549,62563,62581,62591,62597,62603,62617,62627,62633,62639,62653,62659,62683,62687,62701,62723,62731,62743,62753,62761,62773,62791,62801,62819,62827,62851,62861,62869,62873,62897,62903,62921,62927,62929,62939,62969,62971,62981,62983,62987,62989,63029,63031,63059,63067,63073,63079,63097,63103,63113,63127,63131,63149,63179,63197,63199,63211,63241,63247,63277,63281,63299,63311,63313,63317,63331,63337,63347,63353,63361,63367,63377,63389,63391,63397,63409,63419,63421,63439,63443,63463,63467,63473,63487,63493,63499,63521,63527,63533,63541,63559,63577,63587,63589,63599,63601,63607,63611,63617,63629,63647,63649,63659,63667,63671,63689,63691,63697,63703,63709,63719,63727,63737,63743,63761,63773,63781,63793,63799,63803,63809,63823,63839,63841,63853,63857,63863,63901,63907,63913,63929,63949,63977,63997,64007,64013,64019,64033,64037,64063,64067,64081,64091,64109,64123,64151,64153,64157,64171,64187,64189,64217,64223,64231,64237,64271,64279,64283,64301,64303,64319,64327,64333,64373,64381,64399,64403,64433,64439,64451,64453,64483,64489,64499,64513,64553,64567,64577,64579,64591,64601,64609,64613,64621,64627,64633,64661,64663,64667,64679,64693,64709,64717,64747,64763,64781,64783,64793,64811,64817,64849,64853,64871,64877,64879,64891,64901,64919,64921,64927,64937,64951,64969,64997,65003,65011,65027,65029,65033,65053,65063,65071,65089,65099,65101,65111,65119,65123,65129,65141,65147,65167,65171,65173,65179,65183,65203,65213,65239,65257,65267,65269,65287,65293,65309,65323,65327,65353,65357,65371,65381,65393,65407,65413,65419,65423,65437,65447,65449,65479,65497,65519,65521,65537,65539,65543,65551,65557,65563,65579,65581,65587,65599,65609,65617,65629,65633,65647,65651,65657,65677,65687,65699,65701,65707,65713,65717,65719,65729,65731,65761,65777,65789,65809,65827,65831,65837,65839,65843,65851,65867,65881,65899,65921,65927,65929,65951,65957,65963,65981,65983,65993,66029,66037,66041,66047,66067,66071,66083,66089,66103,66107,66109,66137,66161,66169,66173,66179,66191,66221,66239,66271,66293,66301,66337,66343,66347,66359,66361,66373,66377,66383,66403,66413,66431,66449,66457,66463,66467,66491,66499,66509,66523,66529,66533,66541,66553,66569,66571,66587,66593,66601,66617,66629,66643,66653,66683,66697,66701,66713,66721,66733,66739,66749,66751,66763,66791,66797,66809,66821,66841,66851,66853,66863,66877,66883,66889,66919,66923,66931,66943,66947,66949,66959,66973,66977,67003,67021,67033,67043,67049,67057,67061,67073,67079,67103,67121,67129,67139,67141,67153,67157,67169,67181,67187,67189,67211,67213,67217,67219,67231,67247,67261,67271,67273,67289,67307,67339,67343,67349,67369,67391,67399,67409,67411,67421,67427,67429,67433,67447,67453,67477,67481,67489,67493,67499,67511,67523,67531,67537,67547,67559,67567,67577,67579,67589,67601,67607,67619,67631,67651,67679,67699,67709,67723,67733,67741,67751,67757,67759,67763,67777,67783,67789,67801,67807,67819,67829,67843,67853,67867,67883,67891,67901,67927,67931,67933,67939,67943,67957,67961,67967,67979,67987,67993,68023,68041,68053,68059,68071,68087,68099,68111,68113,68141,68147,68161,68171,68207,68209,68213,68219,68227,68239,68261,68279,68281,68311,68329,68351,68371,68389,68399,68437,68443,68447,68449,68473,68477,68483,68489,68491,68501,68507,68521,68531,68539,68543,68567,68581,68597,68611,68633,68639,68659,68669,68683,68687,68699,68711,68713,68729,68737,68743,68749,68767,68771,68777,68791,68813,68819,68821,68863,68879,68881,68891,68897,68899,68903,68909,68917,68927,68947,68963,68993,69001,69011,69019,69029,69031,69061,69067,69073,69109,69119,69127,69143,69149,69151,69163,69191,69193,69197,69203,69221,69233,69239,69247,69257,69259,69263,69313,69317,69337,69341,69371,69379,69383,69389,69401,69403,69427,69431,69439,69457,69463,69467,69473,69481,69491,69493,69497,69499,69539,69557,69593,69623,69653,69661,69677,69691,69697,69709,69737,69739,69761,69763,69767,69779,69809,69821,69827,69829,69833,69847,69857,69859,69877,69899,69911,69929,69931,69941,69959,69991,69997,70001,70003,70009,70019,70039,70051,70061,70067,70079,70099,70111,70117,70121,70123,70139,70141,70157,70163,70177,70181,70183,70199,70201,70207,70223,70229,70237,70241,70249,70271,70289,70297,70309,70313,70321,70327,70351,70373,70379,70381,70393,70423,70429,70439,70451,70457,70459,70481,70487,70489,70501,70507,70529,70537,70549,70571,70573,70583,70589,70607,70619,70621,70627,70639,70657,70663,70667,70687,70709,70717,70729,70753,70769,70783,70793,70823,70841,70843,70849,70853,70867,70877,70879,70891,70901,70913,70919,70921,70937,70949,70951,70957,70969,70979,70981,70991,70997,70999,71011,71023,71039,71059,71069,71081,71089,71119,71129,71143,71147,71153,71161,71167,71171,71191,71209,71233,71237,71249,71257,71261,71263,71287,71293,71317,71327,71329,71333,71339,71341,71347,71353,71359,71363,71387,71389,71399,71411,71413,71419,71429,71437,71443,71453,71471,71473,71479,71483,71503,71527,71537,71549,71551,71563,71569,71593,71597,71633,71647,71663,71671,71693,71699,71707,71711,71713,71719,71741,71761,71777,71789,71807,71809,71821,71837,71843,71849,71861,71867,71879,71881,71887,71899,71909,71917,71933,71941,71947,71963,71971,71983,71987,71993,71999,72019,72031,72043,72047,72053,72073,72077,72089,72091,72101,72103,72109,72139,72161,72167,72169,72173,72211,72221,72223,72227,72229,72251,72253,72269,72271,72277,72287,72307,72313,72337,72341,72353,72367,72379,72383,72421,72431,72461,72467,72469,72481,72493,72497,72503,72533,72547,72551,72559,72577,72613,72617,72623,72643,72647,72649,72661,72671,72673,72679,72689,72701,72707,72719,72727,72733,72739,72763,72767,72797,72817,72823,72859,72869,72871,72883,72889,72893,72901,72907,72911,72923,72931,72937,72949,72953,72959,72973,72977,72997,73009,73013,73019,73037,73039,73043,73061,73063,73079,73091,73121,73127,73133,73141,73181,73189,73237,73243,73259,73277,73291,73303,73309,73327,73331,73351,73361,73363,73369,73379,73387,73417,73421,73433,73453,73459,73471,73477,73483,73517,73523,73529,73547,73553,73561,73571,73583,73589,73597,73607,73609,73613,73637,73643,73651,73673,73679,73681,73693,73699,73709,73721,73727,73751,73757,73771,73783,73819,73823,73847,73849,73859,73867,73877,73883,73897,73907,73939,73943,73951,73961,73973,73999,74017,74021,74027,74047,74051,74071,74077,74093,74099,74101,74131,74143,74149,74159,74161,74167,74177,74189,74197,74201,74203,74209,74219,74231,74257,74279,74287,74293,74297,74311,74317,74323,74353,74357,74363,74377,74381,74383,74411,74413,74419,74441,74449,74453,74471,74489,74507,74509,74521,74527,74531,74551,74561,74567,74573,74587,74597,74609,74611,74623,74653,74687,74699,74707,74713,74717,74719,74729,74731,74747,74759,74761,74771,74779,74797,74821,74827,74831,74843,74857,74861,74869,74873,74887,74891,74897,74903,74923,74929,74933,74941,74959,75011,75013,75017,75029,75037,75041,75079,75083,75109,75133,75149,75161,75167,75169,75181,75193,75209,75211,75217,75223,75227,75239,75253,75269,75277,75289,75307,75323,75329,75337,75347,75353,75367,75377,75389,75391,75401,75403,75407,75431,75437,75479,75503,75511,75521,75527,75533,75539,75541,75553,75557,75571,75577,75583,75611,75617,75619,75629,75641,75653,75659,75679,75683,75689,75703,75707,75709,75721,75731,75743,75767,75773,75781,75787,75793,75797,75821,75833,75853,75869,75883,75913,75931,75937,75941,75967,75979,75983,75989,75991,75997,76001,76003,76031,76039,76079,76081,76091,76099,76103,76123,76129,76147,76157,76159,76163,76207,76213,76231,76243,76249,76253,76259,76261,76283,76289,76303,76333,76343,76367,76369,76379,76387,76403,76421,76423,76441,76463,76471,76481,76487,76493,76507,76511,76519,76537,76541,76543,76561,76579,76597,76603,76607,76631,76649,76651,76667,76673,76679,76697,76717,76733,76753,76757,76771,76777,76781,76801,76819,76829,76831,76837,76847,76871,76873,76883,76907,76913,76919,76943,76949,76961,76963,76991,77003,77017,77023,77029,77041,77047,77069,77081,77093,77101,77137,77141,77153,77167,77171,77191,77201,77213,77237,77239,77243,77249,77261,77263,77267,77269,77279,77291,77317,77323,77339,77347,77351,77359,77369,77377,77383,77417,77419,77431,77447,77471,77477,77479,77489,77491,77509,77513,77521,77527,77543,77549,77551,77557,77563,77569,77573,77587,77591,77611,77617,77621,77641,77647,77659,77681,77687,77689,77699,77711,77713,77719,77723,77731,77743,77747,77761,77773,77783,77797,77801,77813,77839,77849,77863,77867,77893,77899,77929,77933,77951,77969,77977,77983,77999,78007,78017,78031,78041,78049,78059,78079,78101,78121,78137,78139,78157,78163,78167,78173,78179,78191,78193,78203,78229,78233,78241,78259,78277,78283,78301,78307,78311,78317,78341,78347,78367,78401,78427,78437,78439,78467,78479,78487,78497,78509,78511,78517,78539,78541,78553,78569,78571,78577,78583,78593,78607,78623,78643,78649,78653,78691,78697,78707,78713,78721,78737,78779,78781,78787,78791,78797,78803,78809,78823,78839,78853,78857,78877,78887,78889,78893,78901,78919,78929,78941,78977,78979,78989,79031,79039,79043,79063,79087,79103,79111,79133,79139,79147,79151,79153,79159,79181,79187,79193,79201,79229,79231,79241,79259,79273,79279,79283,79301,79309,79319,79333,79337,79349,79357,79367,79379,79393,79397,79399,79411,79423,79427,79433,79451,79481,79493,79531,79537,79549,79559,79561,79579,79589,79601,79609,79613,79621,79627,79631,79633,79657,79669,79687,79691,79693,79697,79699,79757,79769,79777,79801,79811,79813,79817,79823,79829,79841,79843,79847,79861,79867,79873,79889,79901,79903,79907,79939,79943,79967,79973,79979,79987,79997,79999,80021,80039,80051,80071,80077,80107,80111,80141,80147,80149,80153,80167,80173,80177,80191,80207,80209,80221,80231,80233,80239,80251,80263,80273,80279,80287,80309,80317,80329,80341,80347,80363,80369,80387,80407,80429,80447,80449,80471,80473,80489,80491,80513,80527,80537,80557,80567,80599,80603,80611,80621,80627,80629,80651,80657,80669,80671,80677,80681,80683,80687,80701,80713,80737,80747,80749,80761,80777,80779,80783,80789,80803,80809,80819,80831,80833,80849,80863,80897,80909,80911,80917,80923,80929,80933,80953,80963,80989,81001,81013,81017,81019,81023,81031,81041,81043,81047,81049,81071,81077,81083,81097,81101,81119,81131,81157,81163,81173,81181,81197,81199,81203,81223,81233,81239,81281,81283,81293,81299,81307,81331,81343,81349,81353,81359,81371,81373,81401,81409,81421,81439,81457,81463,81509,81517,81527,81533,81547,81551,81553,81559,81563,81569,81611,81619,81629,81637,81647,81649,81667,81671,81677,81689,81701,81703,81707,81727,81737,81749,81761,81769,81773,81799,81817,81839,81847,81853,81869,81883,81899,81901,81919,81929,81931,81937,81943,81953,81967,81971,81973,82003,82007,82009,82013,82021,82031,82037,82039,82051,82067,82073,82129,82139,82141,82153,82163,82171,82183,82189,82193,82207,82217,82219,82223,82231,82237,82241,82261,82267,82279,82301,82307,82339,82349,82351,82361,82373,82387,82393,82421,82457,82463,82469,82471,82483,82487,82493,82499,82507,82529,82531,82549,82559,82561,82567,82571,82591,82601,82609,82613,82619,82633,82651,82657,82699,82721,82723,82727,82729,82757,82759,82763,82781,82787,82793,82799,82811,82813,82837,82847,82883,82889,82891,82903,82913,82939,82963,82981,82997,83003,83009,83023,83047,83059,83063,83071,83077,83089,83093,83101,83117,83137,83177,83203,83207,83219,83221,83227,83231,83233,83243,83257,83267,83269,83273,83299,83311,83339,83341,83357,83383,83389,83399,83401,83407,83417,83423,83431,83437,83443,83449,83459,83471,83477,83497,83537,83557,83561,83563,83579,83591,83597,83609,83617,83621,83639,83641,83653,83663,83689,83701,83717,83719,83737,83761,83773,83777,83791,83813,83833,83843,83857,83869,83873,83891,83903,83911,83921,83933,83939,83969,83983,83987,84011,84017,84047,84053,84059,84061,84067,84089,84121,84127,84131,84137,84143,84163,84179,84181,84191,84199,84211,84221,84223,84229,84239,84247,84263,84299,84307,84313,84317,84319,84347,84349,84377,84389,84391,84401,84407,84421,84431,84437,84443,84449,84457,84463,84467,84481,84499,84503,84509,84521,84523,84533,84551,84559,84589,84629,84631,84649,84653,84659,84673,84691,84697,84701,84713,84719,84731,84737,84751,84761,84787,84793,84809,84811,84827,84857,84859,84869,84871,84913,84919,84947,84961,84967,84977,84979,84991,85009,85021,85027,85037,85049,85061,85081,85087,85091,85093,85103,85109,85121,85133,85147,85159,85193,85199,85201,85213,85223,85229,85237,85243,85247,85259,85297,85303,85313,85331,85333,85361,85363,85369,85381,85411,85427,85429,85439,85447,85451,85453,85469,85487,85513,85517,85523,85531,85549,85571,85577,85597,85601,85607,85619,85621,85627,85639,85643,85661,85667,85669,85691,85703,85711,85717,85733,85751,85781,85793,85817,85819,85829,85831,85837,85843,85847,85853,85889,85903,85909,85931,85933,85991,85999,86011,86017,86027,86029,86069,86077,86083,86111,86113,86117,86131,86137,86143,86161,86171,86179,86183,86197,86201,86209,86239,86243,86249,86257,86263,86269,86287,86291,86293,86297,86311,86323,86341,86351,86353,86357,86369,86371,86381,86389,86399,86413,86423,86441,86453,86461,86467,86477,86491,86501,86509,86531,86533,86539,86561,86573,86579,86587,86599,86627,86629,86677,86689,86693,86711,86719,86729,86743,86753,86767,86771,86783,86813,86837,86843,86851,86857,86861,86869,86923,86927,86929,86939,86951,86959,86969,86981,86993,87011,87013,87037,87041,87049,87071,87083,87103,87107,87119,87121,87133,87149,87151,87179,87181,87187,87211,87221,87223,87251,87253,87257,87277,87281,87293,87299,87313,87317,87323,87337,87359,87383,87403,87407,87421,87427,87433,87443,87473,87481,87491,87509,87511,87517,87523,87539,87541,87547,87553,87557,87559,87583,87587,87589,87613,87623,87629,87631,87641,87643,87649,87671,87679,87683,87691,87697,87701,87719,87721,87739,87743,87751,87767,87793,87797,87803,87811,87833,87853,87869,87877,87881,87887,87911,87917,87931,87943,87959,87961,87973,87977,87991,88001,88003,88007,88019,88037,88069,88079,88093,88117,88129,88169,88177,88211,88223,88237,88241,88259,88261,88289,88301,88321,88327,88337,88339,88379,88397,88411,88423,88427,88463,88469,88471,88493,88499,88513,88523,88547,88589,88591,88607,88609,88643,88651,88657,88661,88663,88667,88681,88721,88729,88741,88747,88771,88789,88793,88799,88801,88807,88811,88813,88817,88819,88843,88853,88861,88867,88873,88883,88897,88903,88919,88937,88951,88969,88993,88997,89003,89009,89017,89021,89041,89051,89057,89069,89071,89083,89087,89101,89107,89113,89119,89123,89137,89153,89189,89203,89209,89213,89227,89231,89237,89261,89269,89273,89293,89303,89317,89329,89363,89371,89381,89387,89393,89399,89413,89417,89431,89443,89449,89459,89477,89491,89501,89513,89519,89521,89527,89533,89561,89563,89567,89591,89597,89599,89603,89611,89627,89633,89653,89657,89659,89669,89671,89681,89689,89753,89759,89767,89779,89783,89797,89809,89819,89821,89833,89839,89849,89867,89891,89897,89899,89909,89917,89923,89939,89959,89963,89977,89983,89989,90001,90007,90011,90017,90019,90023,90031,90053,90059,90067,90071,90073,90089,90107,90121,90127,90149,90163,90173,90187,90191,90197,90199,90203,90217,90227,90239,90247,90263,90271,90281,90289,90313,90353,90359,90371,90373,90379,90397,90401,90403,90407,90437,90439,90469,90473,90481,90499,90511,90523,90527,90529,90533,90547,90583,90599,90617,90619,90631,90641,90647,90659,90677,90679,90697,90703,90709,90731,90749,90787,90793,90803,90821,90823,90833,90841,90847,90863,90887,90901,90907,90911,90917,90931,90947,90971,90977,90989,90997,91009,91019,91033,91079,91081,91097,91099,91121,91127,91129,91139,91141,91151,91153,91159,91163,91183,91193,91199,91229,91237,91243,91249,91253,91283,91291,91297,91303,91309,91331,91367,91369,91373,91381,91387,91393,91397,91411,91423,91433,91453,91457,91459,91463,91493,91499,91513,91529,91541,91571,91573,91577,91583,91591,91621,91631,91639,91673,91691,91703,91711,91733,91753,91757,91771,91781,91801,91807,91811,91813,91823,91837,91841,91867,91873,91909,91921,91939,91943,91951,91957,91961,91967,91969,91997,92003,92009,92033,92041,92051,92077,92083,92107,92111,92119,92143,92153,92173,92177,92179,92189,92203,92219,92221,92227,92233,92237,92243,92251,92269,92297,92311,92317,92333,92347,92353,92357,92363,92369,92377,92381,92383,92387,92399,92401,92413,92419,92431,92459,92461,92467,92479,92489,92503,92507,92551,92557,92567,92569,92581,92593,92623,92627,92639,92641,92647,92657,92669,92671,92681,92683,92693,92699,92707,92717,92723,92737,92753,92761,92767,92779,92789,92791,92801,92809,92821,92831,92849,92857,92861,92863,92867,92893,92899,92921,92927,92941,92951,92957,92959,92987,92993,93001,93047,93053,93059,93077,93083,93089,93097,93103,93113,93131,93133,93139,93151,93169,93179,93187,93199,93229,93239,93241,93251,93253,93257,93263,93281,93283,93287,93307,93319,93323,93329,93337,93371,93377,93383,93407,93419,93427,93463,93479,93481,93487,93491,93493,93497,93503,93523,93529,93553,93557,93559,93563,93581,93601,93607,93629,93637,93683,93701,93703,93719,93739,93761,93763,93787,93809,93811,93827,93851,93871,93887,93889,93893,93901,93911,93913,93923,93937,93941,93949,93967,93971,93979,93983,93997,94007,94009,94033,94049,94057,94063,94079,94099,94109,94111,94117,94121,94151,94153,94169,94201,94207,94219,94229,94253,94261,94273,94291,94307,94309,94321,94327,94331,94343,94349,94351,94379,94397,94399,94421,94427,94433,94439,94441,94447,94463,94477,94483,94513,94529,94531,94541,94543,94547,94559,94561,94573,94583,94597,94603,94613,94621,94649,94651,94687,94693,94709,94723,94727,94747,94771,94777,94781,94789,94793,94811,94819,94823,94837,94841,94847,94849,94873,94889,94903,94907,94933,94949,94951,94961,94993,94999,95003,95009,95021,95027,95063,95071,95083,95087,95089,95093,95101,95107,95111,95131,95143,95153,95177,95189,95191,95203,95213,95219,95231,95233,95239,95257,95261,95267,95273,95279,95287,95311,95317,95327,95339,95369,95383,95393,95401,95413,95419,95429,95441,95443,95461,95467,95471,95479,95483,95507,95527,95531,95539,95549,95561,95569,95581,95597,95603,95617,95621,95629,95633,95651,95701,95707,95713,95717,95723,95731,95737,95747,95773,95783,95789,95791,95801,95803,95813,95819,95857,95869,95873,95881,95891,95911,95917,95923,95929,95947,95957,95959,95971,95987,95989,96001,96013,96017,96043,96053,96059,96079,96097,96137,96149,96157,96167,96179,96181,96199,96211,96221,96223,96233,96259,96263,96269,96281,96289,96293,96323,96329,96331,96337,96353,96377,96401,96419,96431,96443,96451,96457,96461,96469,96479,96487,96493,96497,96517,96527,96553,96557,96581,96587,96589,96601,96643,96661,96667,96671,96697,96703,96731,96737,96739,96749,96757,96763,96769,96779,96787,96797,96799,96821,96823,96827,96847,96851,96857,96893,96907,96911,96931,96953,96959,96973,96979,96989,96997,97001,97003,97007,97021,97039,97073,97081,97103,97117,97127,97151,97157,97159,97169,97171,97177,97187,97213,97231,97241,97259,97283,97301,97303,97327,97367,97369,97373,97379,97381,97387,97397,97423,97429,97441,97453,97459,97463,97499,97501,97511,97523,97547,97549,97553,97561,97571,97577,97579,97583,97607,97609,97613,97649,97651,97673,97687,97711,97729,97771,97777,97787,97789,97813,97829,97841,97843,97847,97849,97859,97861,97871,97879,97883,97919,97927,97931,97943,97961,97967,97973,97987,98009,98011,98017,98041,98047,98057,98081,98101,98123,98129,98143,98179,98207,98213,98221,98227,98251,98257,98269,98297,98299,98317,98321,98323,98327,98347,98369,98377,98387,98389,98407,98411,98419,98429,98443,98453,98459,98467,98473,98479,98491,98507,98519,98533,98543,98561,98563,98573,98597,98621,98627,98639,98641,98663,98669,98689,98711,98713,98717,98729,98731,98737,98773,98779,98801,98807,98809,98837,98849,98867,98869,98873,98887,98893,98897,98899,98909,98911,98927,98929,98939,98947,98953,98963,98981,98993,98999,99013,99017,99023,99041,99053,99079,99083,99089,99103,99109,99119,99131,99133,99137,99139,99149,99173,99181,99191,99223,99233,99241,99251,99257,99259,99277,99289,99317,99347,99349,99367,99371,99377,99391,99397,99401,99409,99431,99439,99469,99487,99497,99523,99527,99529,99551,99559,99563,99571,99577,99581,99607,99611,99623,99643,99661,99667,99679,99689,99707,99709,99713,99719,99721,99733,99761,99767,99787,99793,99809,99817,99823,99829,99833,99839,99859,99871,99877,99881,99901,99907,99923,99929,99961,99971,99989,99991,100003,100019,100043,100049,100057,100069,100103,100109,100129,100151,100153,100169,100183,100189,100193,100207,100213,100237,100267,100271,100279,100291,100297,100313,100333,100343,100357,100361,100363,100379,100391,100393,100403,100411,100417,100447,100459,100469,100483,100493,100501,100511,100517,100519,100523,100537,100547,100549,100559,100591,100609,100613,100621,100649,100669,100673,100693,100699,100703,100733,100741,100747,100769,100787,100799,100801,100811,100823,100829,100847,100853,100907,100913,100927,100931,100937,100943,100957,100981,100987,100999,101009,101021,101027,101051,101063,101081,101089,101107,101111,101113,101117,101119,101141,101149,101159,101161,101173,101183,101197,101203,101207,101209,101221,101267,101273,101279,101281,101287,101293,101323,101333,101341,101347,101359,101363,101377,101383,101399,101411,101419,101429,101449,101467,101477,101483,101489,101501,101503,101513,101527,101531,101533,101537,101561,101573,101581,101599,101603,101611,101627,101641,101653,101663,101681,101693,101701,101719,101723,101737,101741,101747,101749,101771,101789,101797,101807,101833,101837,101839,101863,101869,101873,101879,101891,101917,101921,101929,101939,101957,101963,101977,101987,101999,102001,102013,102019,102023,102031,102043,102059,102061,102071,102077,102079,102101,102103,102107,102121,102139,102149,102161,102181,102191,102197,102199,102203,102217,102229,102233,102241,102251,102253,102259,102293,102299,102301,102317,102329,102337,102359,102367,102397,102407,102409,102433,102437,102451,102461,102481,102497,102499,102503,102523,102533,102539,102547,102551,102559,102563,102587,102593,102607,102611,102643,102647,102653,102667,102673,102677,102679,102701,102761,102763,102769,102793,102797,102811,102829,102841,102859,102871,102877,102881,102911,102913,102929,102931,102953,102967,102983,103001,103007,103043,103049,103067,103069,103079,103087,103091,103093,103099,103123,103141,103171,103177,103183,103217,103231,103237,103289,103291,103307,103319,103333,103349,103357,103387,103391,103393,103399,103409,103421,103423,103451,103457,103471,103483,103511,103529,103549,103553,103561,103567,103573,103577,103583,103591,103613,103619,103643,103651,103657,103669,103681,103687,103699,103703,103723,103769,103787,103801,103811,103813,103837,103841,103843,103867,103889,103903,103913,103919,103951,103963,103967,103969,103979,103981,103991,103993,103997,104003,104009,104021,104033,104047,104053,104059,104087,104089,104107,104113,104119,104123,104147,104149,104161,104173,104179,104183,104207,104231,104233,104239,104243,104281,104287,104297,104309,104311,104323,104327,104347,104369,104381,104383,104393,104399,104417,104459,104471,104473,104479,104491,104513,104527,104537,104543,104549,104551,104561,104579,104593,104597,104623,104639,104651,104659,104677,104681,104683,104693,104701,104707,104711,104717,104723,104729]}).call(this)},17260:function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d;f=r(41060),t=r(50585).BigInteger,p=r(31093),u=p.WordArray,c=p.prng,h=c.native_rng,n=r(62132).Lock,o=function(){function e(){}return e.prototype.nextBytes=function(t){var e,r,n,i,o,s;for(s=[],n=i=0,o=(e=h(t.length)).length;i0&&r.compareTo(e)<0)return r},e}(),l=null,i=function(){return null==l&&(l=new o),l},a=function(){function e(){this.buf=null,this.lock=new n}return e.prototype.random_word=function(t){var e,r,n;r=f.findDeferral(arguments),n=new f.Deferrals((function(){return t(e.to_buffer().readUInt32BE(0))}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_word"}),c.generate(4,n.defer({assign_fn:function(){return e=arguments[0]},lineno:49})),n._fulfill()},e.prototype.random_double=function(t){var e,r,n;r=f.findDeferral(arguments),n=new f.Deferrals((function(){return t(e.to_buffer().readDoubleBE(0))}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_double"}),c.generate(8,n.defer({assign_fn:function(){return e=arguments[0]},lineno:55})),n._fulfill()},e.prototype.rand_0_1=function(t){var e,r,n,i,o,s;i=f.findDeferral(arguments),(s=this,function(t){o=new f.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.rand_0_1"}),s.random_word(o.defer({assign_fn:function(){return r=arguments[0]},lineno:61})),o._fulfill()})(function(s){return function(){o=new f.Deferrals((function(){return e=r*Math.pow(2,-32)+n*Math.pow(2,-64),t(e)}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.rand_0_1"}),s.random_word(o.defer({assign_fn:function(){return n=arguments[0]},lineno:62})),o._fulfill()}}(this))},e.prototype.random_zn=function(e,r){var n,i,o,s,a;o=f.findDeferral(arguments),n=!0,i=!1,(a=this,function(r){var u;u=function(r){var h;if(h=function(){return f.trampoline((function(){return u(r)}))},!n)return r();s=new f.Deferrals((function(){return h(n=i.compareTo(t.ONE)<=0||i.compareTo(e)>=0)}),{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_zn"}),a.random_nbit(e.bitLength(),s.defer({assign_fn:function(){return i=arguments[0]},lineno:72})),s._fulfill()},u(r)})((function(){return r(i)}))},e.prototype.nextBytes=function(t){var e,r,n,i;for(i=[],e=r=0,n=t.length;0<=n?rn;e=0<=n?++r:--r)i.push(t[e]=this.buf[e]);return i},e.prototype.random_word_array=function(t,e){var r,n,i,o,s,a,h;s=f.findDeferral(arguments),o=new u,(h=this,function(t){a=new f.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_word_array"}),h.lock.acquire(a.defer({lineno:88})),a._fulfill()})(function(u){return function(){var h;h=function(e){var u,l;if(u=e,l=function(){return f.trampoline((function(){return h(e)}))},!((n=t-o.sigBytes)>0))return u();i=Math.min(512,n),a=new f.Deferrals((function(){return l(o=o.concat(r))}),{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_word_array"}),c.generate(i,a.defer({assign_fn:function(){return r=arguments[0]},lineno:91})),a._fulfill()},h((function(){return u.lock.release(),e(o)}))}}(this))},e.prototype.random_bytes=function(t,e){var r,n,i,o;n=f.findDeferral(arguments),(o=this,function(e){i=new f.Deferrals(e,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_bytes"}),o.random_word_array(t,i.defer({assign_fn:function(){return r=arguments[0]},lineno:99})),i._fulfill()})((function(){return e(r.to_buffer())}))},e.prototype.random_nbit=function(e,r){var n,i,o,s,a,u;s=f.findDeferral(arguments),n=1+(e>>3),(u=this,function(t){a=new f.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_nbit"}),u.random_bytes(n,a.defer({assign_fn:function(){return o=arguments[0]},lineno:106})),a._fulfill()})(function(n){return function(){a=new f.Deferrals((function(){return n.buf=o,i=t.random_nbit(e,n),n.lock.release(),r(i)}),{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_nbit"}),n.lock.acquire(a.defer({lineno:107})),a._fulfill()}}(this))},e}(),d=null,s=function(){return null==d&&(d=new a),d},e.MRF=i,e.SRF=s}).call(this)},93829:function(t,e,r){(function(){var t,n,i,o;n=r(31093).WordArray,r(86459).bufeq_secure,t=n.from_hex("A6A6A6A6A6A6A6A6"),o=function(t){return t.split(t.words.length>>1)},e.wrap=function(e){var r,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k;if(d=e.plaintext,p=e.key,h=e.cipher,c=(k=i({input:d,key:p,cipher:h}))[0],u=k[1],o=k[2],null!=c)throw c;for(r=t,f=u,y=new n([0,0]),_=0;_<6;++_)for(l=g=0,v=f.length;g=0;p=g+=-1)m=f[p],r.xor(y,{}),s=r.clone().concat(m),o.decryptBlock(s.words),r=s.slice(0,2),f[p]=s.slice(2,4),y.words[1]--;if(r.equal(t)){for(u=new n([]),b=0,v=f.length;b32?new Error("e="+this.e+" > 2^32"):null:new Error("n % 2 != 1"):new Error("gcd(n,e) != 1"))},e}(i),h=function(e){function r(t){var e,n;e=t.priv,n=t.pub,r.__super__.constructor.call(this,{priv:e,pub:n})}return P(r,e),r.type=a.public_key_algorithms.RSA,r.prototype.type=r.type,r.prototype.get_type=function(){return this.type},r.klass_name="RSA",r.Pub=l,r.prototype.Pub=l,r.Priv=c,r.prototype.Priv=c,r.parse=function(t){return o.parse(r,t)},r.alloc=function(t){var e,r;return r=t.pub,e=t.priv,o.alloc({pub:r,priv:e})},r.subkey_algo=function(t){return r},r.prototype.sanity_check=function(t){var e,r,n,i,o,s,a,f,h,c;f=w.findDeferral(arguments),e=0===this.priv.n().compareTo(this.pub.n)?null:new Error("pq != n"),(c=this,function(t){if(null!=e)return t();r=u().random_zn(c.pub.n),function(t){h=new w.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),c.encrypt(r,h.defer({assign_fn:function(){return n=arguments[0]},lineno:240})),h._fulfill()}((function(){!function(t){h=new w.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),c.decrypt(n,h.defer({assign_fn:function(){return e=arguments[0],i=arguments[1]},lineno:241})),h._fulfill()}((function(){return t(null==e&&0!==r.compareTo(i)?e=new Error("Decrypt/encrypt failed"):void 0)}))}))})(function(r){return function(){!function(t){if(null!=e)return t();o=u().random_zn(r.pub.n),function(t){h=new w.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),r.sign(o,h.defer({assign_fn:function(){return s=arguments[0]},lineno:246})),h._fulfill()}((function(){!function(t){h=new w.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),r.verify(s,h.defer({assign_fn:function(){return a=arguments[0]},lineno:247})),h._fulfill()}((function(){return t(0!==o.compareTo(a)&&(e=new Error("Sign/verify failed")))}))}))}((function(){return t(e)}))}}(this))},r.parse_sig=function(t){var e,r,n,i;if(e=(i=m.mpi_from_buffer(t.peek_rest_to_buffer()))[0],n=i[1],i[2],r=i[3],null!=e)throw e;return t.advance(r),n},r.prototype.encrypt=function(t,e){return this.pub.encrypt(t,e)},r.prototype.decrypt=function(t,e){return this.priv.decrypt(t,e)},r.prototype.max_value=function(){return this.pub.n},r.make=function(t){var e,n,i,o,s,a,u,f,h,p,d,m;return u=t.p,p=t.q,o=t.e,t.phi,f=t.p1,d=t.q1,s=t.lambda,a=u.multiply(p),n=(e=o.modInverse(s)).mod(f),i=e.mod(d),m=u.modInverse(p),h=new l({n:a,e:o}),new r({priv:new c({p:u,q:p,d:e,dmp1:n,dmq1:i,u:m,pub:h}),pub:h})},r.prototype.to_openpgp=function(){var t;return(t=new((new RSA).keyObject)).n=this.pub.n,t.e=this.pub.e.intValue(),t.ee=this.pub.e,t.d=this.priv.d,t.p=this.priv.p,t.q=this.priv.q,t.dmp1=this.priv.dmp1,t.dmq1=this.priv.dmq1,t.u=this.priv.u,t},r.prototype.sign=function(t,e){return this.priv.sign(t,e)},r.prototype.verify=function(t,e){return this.pub.verify(t,e)},r.prototype.pad_and_encrypt=function(t,e,r){var n,i,o,s,a,u,f;a=w.findDeferral(arguments),i=s=null,(f=this,function(e){u=new w.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.pad_and_encrypt"}),g(t,f.pub.n.mpi_byte_length(),u.defer({assign_fn:function(){return i=arguments[0],o=arguments[1]},lineno:306})),u._fulfill()})(function(t){return function(){!function(e){if(null!=i)return e();!function(e){u=new w.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.pad_and_encrypt"}),t.encrypt(o,u.defer({assign_fn:function(){return n=arguments[0]},lineno:308})),u._fulfill()}((function(){return e(s=t.export_output({y_mpi:n}))}))}((function(){return r(i,s)}))}}(this))},r.prototype.decrypt_and_unpad=function(t,e,r){var n,i,o,s,a,u,f;a=w.findDeferral(arguments),i=s=null,(f=this,function(e){u=new w.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.decrypt_and_unpad"}),f.decrypt(t.y(),u.defer({assign_fn:function(){return i=arguments[0],o=arguments[1]},lineno:318})),u._fulfill()})(function(t){return function(){var e;return null==i&&(n=o.to_padded_octets(t.pub.n),e=_(n),i=e[0],s=e[1]),r(i,s)}}(this))},r.prototype.pad_and_sign=function(t,e,r){var n,i,o,s,a,u,f;a=w.findDeferral(arguments),(i=e.hasher)||(i=p),n=i(t),o=v(n,this.pub.n.mpi_byte_length(),{hasher:i}),(f=this,function(t){u=new w.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.pad_and_sign"}),f.sign(o,u.defer({assign_fn:function(){return s=arguments[0]},lineno:330})),u._fulfill()})((function(){return r(null,s.to_mpi_buffer())}))},r.prototype.verify_unpad_and_check_hash=function(t,e){var r,i,o,s,a,u,f,h,c,l,p,d;c=w.findDeferral(arguments),f=t.sig,i=t.data,a=t.hasher,s=t.hash,o=null,n.isBuffer(f)&&(p=m.mpi_from_buffer(f),o=p[0],f=p[1]),(d=this,function(t){if(null!=o)return t();!function(t){l=new w.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.verify_unpad_and_check_hash"}),d.verify(f,l.defer({assign_fn:function(){return h=arguments[0]},lineno:339})),l._fulfill()}((function(){var e;return r=h.to_padded_octets(d.pub.n),e=b(r,a),o=e[0],u=e[1],t(null==o?(s||(s=a(i)),y(u,s)?void 0:o=new Error("hash mismatch")):void 0)}))})((function(){return e(o)}))},r.generate=function(e,n){var i,o,a,u,f,h,c,l,p,d,m,y,_,g,b,v,k;b=w.findDeferral(arguments),p=e.nbits,h=e.iters,o=e.e,i=e.asp,o||(o=65537),a=o,p||(p=4096),h||(h=10),i||(i=new t({})),o=x(a),u=M(n,"generate_rsa_keypair"),f=!0,p>>=1,k=function(t){var e;if(e=function(){return w.trampoline((function(){return k(t)}))},!f)return t();v=new w.Deferrals((function(){v=new w.Deferrals((function(){!function(t){v=new w.Deferrals(t,{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),S({asp:i.section("q"),e:o,nbits:p,iters:h},u(v.defer({assign_fn:function(){return _=arguments[0]},lineno:365}))),v._fulfill()}((function(){!function(t){v=new w.Deferrals(t,{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),i.progress({what:"found",q:_},u(v.defer({lineno:366}))),v._fulfill()}((function(){var t;return d.compareTo(_)<=0&&(d=(t=[_,d])[0],_=t[1]),g=_.subtract(s.ONE),m=d.subtract(s.ONE),y=m.multiply(g),l=y.divide(g.gcd(m)),e(0!==y.gcd(o).compareTo(s.ONE)?("function"==typeof progress_hook&&progress_hook({what:"unlucky_phi"}),f=!0):f=!1)}))}))}),{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),i.progress({what:"found",p:d},u(v.defer({lineno:364}))),v._fulfill()}),{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),S({asp:i.section("p"),e:o,nbits:p,iters:h},u(v.defer({assign_fn:function(){return d=arguments[0]},lineno:363}))),v._fulfill()},k((function(){return c=r.make({p:d,q:_,e:o,phi:y,p1:m,q1:g,lambda:l}),n(null,c)}))},r.parse_output=function(t){return f.parse(t)},r.prototype.export_output=function(t){return new f(t)},r.prototype.validity_check=function(t){var e,r,n,i;r=w.findDeferral(arguments),(i=this,function(t){n=new w.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.validity_check"}),i.pub.validity_check(n.defer({assign_fn:function(){return e=arguments[0]},lineno:391})),n._fulfill()})((function(){return t(e)}))},r}(o),f=function(){function t(t){this.y_mpi=t.y_mpi,this.y_buf=t.y_buf}return t.parse=function(e){var r,n,i,o;if(r=(o=m.mpi_from_buffer(e))[0],i=o[1],n=o[2],o[3],null!=r)throw r;if(0!==n.length)throw new Error("junk at the end of input");return new t({y_mpi:i})},t.prototype.y=function(){return this.y_mpi},t.prototype.hide=function(t,e){var r,n,i,o,s,a,u,f;a=w.findDeferral(arguments),i=t.key,o=t.max,s=t.slosh,o||(o=8192),s||(s=128),(f=this,function(t){u=new w.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Output.hide"}),i.hide({i:f.y(),max:o,slosh:s},u.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:417})),u._fulfill()})(function(t){return function(){return null==r&&(t.y_mpi=n,t.y_buf=null),e(r)}}(this))},t.prototype.find=function(t){var e;return e=t.key,this.y_mpi=e.find(this.y_mpi)},t.prototype.output=function(){return this.y_buf||this.y_mpi.to_mpi_buffer()},t}(),e.RSA=e.Pair=h,e.Output=f}).call(this)},20776:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l;i=r(75656).openpgp.symmetric_key_algorithms,c=r(31093),t=c.ciphers.AES,o=r(88017).CAST5,s=r(94077).SlicerBuffer,a=c.WordArray,l=r(86459).uint_to_buffer,f=r(4486).ecc_pkcs5_unpad_data,e.get_cipher=h=function(e){var r;return e||(e=i.AES256),(r=function(){switch(e){case i.AES128:return{klass:t,key_size:16};case i.AES192:return{klass:t,key_size:24};case i.AES256:return{klass:t,key_size:32};case i.CAST5:return{klass:o,key_size:o.keySize};default:throw new Error("unknown cipher: "+e)}}()).type=e,r},e.checksum2=u=function(t){var e,r,n,i;for(r=0,e=n=0,i=t.length;0<=i?ni;e=0<=i?++n:--n)r=r+t.readUInt8(e)&65535;return r},e.import_key_pgp=function(t,e){var r,n,i,o,c;if(null==e&&(e=!1),c=new s(t),n=h(c.read_uint8()),o=c.read_buffer(n.key_size),r=c.read_uint16(),null!=(i=u(o)!==r?new Error("Checksum mismatch"):e?f(t,c.offset()):c.rem()?new Error("Junk at the end of input"):null))throw i;return new n.klass(a.from_buffer(o))},e.export_key_pgp=function(t,e){var r;return r=u(e),n.concat([n.from([t]),e,l(16,r)])}}).call(this)},23072:function(t,e,r){(function(){var t,n,i,o,s;t=r(41060),o=r(8041),s=r(58532),i=r(60648),e.import_armored_public=function(e,r){var n,s,a,u,f,h,c,l,p;c=t.findDeferral(arguments),n=e.armored,s=e.asp,u=e.opts,h=null,p=function(){return r(a,f,h)},n.match(/^-{5}BEGIN PGP PUBLIC KEY BLOCK-{5}/)?function(e){l=new t.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/ukm.iced",funcname:"import_armored_public"}),o.KeyManager.import_from_armored_pgp({armored:n,asp:s,opts:u},l.defer({assign_fn:function(){return a=arguments[0],f=arguments[1],h=arguments[2]},lineno:12})),l._fulfill()}(p):function(e){l=new t.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/ukm.iced",funcname:"import_armored_public"}),i.KeyManager.import_public({hex:n},l.defer({assign_fn:function(){return a=arguments[0],f=arguments[1]},lineno:14})),l._fulfill()}(p)},n=function(t){return t.match(/^-{5}BEGIN PGP MESSAGE-{5}/)},e.decode_sig=function(t){var e;return e=t.armored,n(e)?s.decode_sig({armored:e}):i.decode_sig({armored:e})},e.get_sig_body=function(t){var e;return e=t.armored,n(e)?s.get_sig_body({armored:e}):i.get_sig_body({armored:e})}}).call(this)},86459:function(t,e,r){(function(){var t,n,i,o,s,a;for(s=0,a=(i=[r(56507).util,r(70475),r(2568)]).length;s{var n=r(34529),i=r(50585).BigInteger,o=r(10728);function s(t,e,r,n,s,a,u){this.p=t,this.a=e,this.b=r,this.G=o.fromAffine(this,n,s),this.n=a,this.h=u,this.infinity=new o(this,null,null,i.ZERO),this.pOverFour=t.add(i.ONE).shiftRight(2)}s.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p).modPow(this.pOverFour,this.p),n=r;return r.isEven()^!t&&(n=this.p.subtract(n)),o.fromAffine(this,e,n)},s.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},s.prototype.isOnCurve=function(t){if(this.isInfinity(t))return!0;var e=t.affineX,r=t.affineY,n=this.a,i=this.b,o=this.p;if(e.signum()<0||e.compareTo(o)>=0)return!1;if(r.signum()<0||r.compareTo(o)>=0)return!1;var s=r.square().mod(o),a=e.pow(3).add(n.multiply(e)).add(i).mod(o);return s.equals(a)},s.prototype.validate=function(t){n(!this.isInfinity(t),"Point is at infinity"),n(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return n(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=s},33722:(t,e,r)=>{var n=r(10728),i=r(1181),o=r(49538);t.exports={Curve:i,Point:n,getCurveByName:o}},49538:(t,e,r)=>{var n=r(50585).BigInteger,i=r(95755),o=r(1181);t.exports=function(t){var e=i[t];if(!e)return null;var r=new n(e.p,16),s=new n(e.a,16),a=new n(e.b,16),u=new n(e.n,16),f=new n(e.h,16),h=new n(e.Gx,16),c=new n(e.Gy,16);return new o(r,s,a,h,c,u,f)}},10728:(t,e,r)=>{var n=r(48287).Buffer,i=r(34529),o=r(50585).BigInteger,s=o.valueOf(3);function a(t,e,r,n){i.notStrictEqual(n,void 0,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=n,this._zInv=null,this.compressed=!0}Object.defineProperty(a.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(a.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(a.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),a.fromAffine=function(t,e,r){return new a(t,e,r,o.ONE)},a.prototype.equals=function(t){return t===this||(this.curve.isInfinity(this)?this.curve.isInfinity(t):this.curve.isInfinity(t)?this.curve.isInfinity(this):0===t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p).signum()&&0===t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p).signum())},a.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new a(this.curve,this.x,t,this.z)},a.prototype.add=function(t){if(this.curve.isInfinity(this))return t;if(this.curve.isInfinity(t))return this;var e=this.x,r=this.y,n=t.x,i=t.y.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),o=n.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===o.signum())return 0===i.signum()?this.twice():this.curve.infinity;var u=o.square(),f=u.multiply(o),h=e.multiply(u),c=i.square().multiply(this.z),l=c.subtract(h.shiftLeft(1)).multiply(t.z).subtract(f).multiply(o).mod(this.curve.p),p=h.multiply(s).multiply(i).subtract(r.multiply(f)).subtract(c.multiply(i)).multiply(t.z).add(i.multiply(f)).mod(this.curve.p),d=f.multiply(this.z).multiply(t.z).mod(this.curve.p);return new a(this.curve,l,p,d)},a.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.signum())return this.curve.infinity;var t=this.x,e=this.y,r=e.multiply(this.z),n=r.multiply(e).mod(this.curve.p),i=this.curve.a,o=t.square().multiply(s);0!==i.signum()&&(o=o.add(this.z.square().multiply(i)));var u=(o=o.mod(this.curve.p)).square().subtract(t.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p),f=o.multiply(s).multiply(t).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(o.pow(3)).mod(this.curve.p),h=r.pow(3).shiftLeft(3).mod(this.curve.p);return new a(this.curve,u,f,h)},a.prototype.multiply=function(t){if(this.curve.isInfinity(this))return this;if(0===t.signum())return this.curve.infinity;for(var e=t,r=e.multiply(s),n=this.negate(),i=this,o=r.bitLength()-2;o>0;--o){i=i.twice();var a=r.testBit(o);a!=e.testBit(o)&&(i=i.add(a?this:n))}return i},a.prototype.multiplyTwo=function(t,e,r){var n;n=t.bitLength()>r.bitLength()?t.bitLength()-1:r.bitLength()-1;for(var i=this.curve.infinity,o=this.add(e);n>=0;){i=i.twice();var s=t.testBit(n),a=r.testBit(n);s?i=a?i.add(o):i.add(this):a&&(i=i.add(e)),--n}return i},a.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return n.from("00","hex");var e,r=this.affineX,i=this.affineY,o=Math.floor((this.curve.p.bitLength()+7)/8);return t?(e=n.alloc(1+o)).writeUInt8(i.isEven()?2:3,0):((e=n.alloc(1+o+o)).writeUInt8(4,0),i.toBuffer(o).copy(e,1+o)),r.toBuffer(o).copy(e,1),e},a.decodeFrom=function(t,e){var r,n=e.readUInt8(0),s=4!==n,u=o.fromBuffer(e.slice(1,33)),f=Math.floor((t.p.bitLength()+7)/8);if(s){i.equal(e.length,f+1,"Invalid sequence length"),i(2===n||3===n,"Invalid sequence tag");var h=3===n;r=t.pointFromX(h,u)}else{i.equal(e.length,1+f+f,"Invalid sequence length");var c=o.fromBuffer(e.slice(1+f));r=a.fromAffine(t,u,c)}return r.compressed=s,r},a.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=a},33273:function(t,e,r){var n=r(48287).Buffer;(function(){var t,r;e.b2u=t=function(t){return new Uint8Array(t)},e.u2b=r=function(t){return n.from(t)},e.Base=function(){function e(t){this.publicKey=t.publicKey,this.secretKey=t.secretKey,this.lib=t.lib}return e.prototype.genFromSeed=function(e){var n,i;return n=e.seed,i=this.lib.js.sign.keyPair.fromSeed(t(n)),this.secretKey=r(i.secretKey),this.publicKey=r(i.publicKey),{secretKey:this.secretKey,publicKey:this.publicKey}},e.prototype.genBoxPair=function(){var t;return t=this.lib.js.box.keyPair(),this.secretKey=r(t.secretKey),this.publicKey=r(t.publicKey),{secretKey:this.secretKey,publicKey:this.publicKey}},e.prototype.get_secret_key=function(){return this.secretKey},e.prototype.get_public_key=function(){return this.publicKey},e}()}).call(this)},30589:function(t,e,r){(function(){var t,n,i,o;o=r(88947),i=null,t=r(3787).Sodium,n=r(63393).TweetNaCl;try{i=Object(function(){var t=new Error("Cannot find module 'sodium'");throw t.code="MODULE_NOT_FOUND",t}())}catch(t){}e.sign={publicKeyLength:o.sign.publicKeyLength,secretKeyLength:o.sign.secretKeyLength,signatureLength:o.sign.signatureLength,seedLength:o.sign.seedLength},e.alloc=function(e){var r,s,a;return r=e.publicKey,a=e.secretKey,(s=e.force_js||null==i?new n({publicKey:r,secretKey:a}):new t({publicKey:r,secretKey:a})).lib={c:i,js:o},s}}).call(this)},3787:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o={}.hasOwnProperty;i=r(4516).bufeq_secure,t=r(33273).Base,e.Sodium=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)o.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype._detach=function(t){var e;return e=this.lib.c.crypto_sign_BYTES,{sig:t.slice(0,e),payload:t.slice(e)}},e.prototype._pad=function(t){return n.concat([n.alloc(16),t])},e.prototype._unpad=function(t){return t.slice(16)},e.prototype.verify=function(t){var e,r,o,s,a,u;return s=t.payload,u=t.sig,(e=t.detached)&&null==s?[r=new Error("in detached mode, you must supply a payload"),null]:(o=e?n.concat([u,s]):u,null==(a=this.lib.c.crypto_sign_open(o,this.publicKey))?r=new Error("Signature failed to verify"):e||(null==s?s=a:i(a,s)||(r=new Error("got unexpected payload"))),null!=r&&(s=null),[r,s])},e.prototype.sign=function(t){var e,r,n;return e=t.detached,r=t.payload,n=this.lib.c.crypto_sign(r,this.secretKey),e?this._detach(n).sig:n},e.prototype.encrypt=function(t){var e,r,n;return r=t.plaintext,e=t.nonce,n=t.pubkey,this._unpad(this.lib.c.crypto_box(r,e,n,this.secretKey))},e.prototype.secretbox=function(t){var e,r;return r=t.plaintext,e=t.nonce,this._unpad(this.lib.c.crypto_secretbox(r,e,this.secretKey))},e.prototype.decrypt=function(t){var e,r,n,i;if(e=t.ciphertext,r=t.nonce,i=t.pubkey,n=this.lib.c.crypto_box_open(this._pad(e),r,i,this.secretKey))return n;throw new Error("Sodium decrypt failed!")},e.prototype.secretbox_open=function(t){var e,r,n;if(e=t.ciphertext,r=t.nonce,n=this.lib.c.crypto_secretbox_open(this._pad(e),r,this.secretKey))return n;throw new Error("Sodium secretbox_open failed!")},e.prototype.box_beforenm=function(t){var e,r;return e=t.pubkey,r=t.seckey,this.lib.c.crypto_box_beforenm(e,r)},e.prototype.box_open_afternm=function(t){var e,r,n,i;if(e=t.ciphertext,r=t.nonce,i=t.secret,n=this.lib.c.crypto_box_open_afternm(this._pad(e),r,i))return n;throw new Error("Sodium box_open_afternm failed!")},e.prototype.scalarmult_base=function(t){return n.from(this.lib.c.crypto_scalarmult_base(t))},e.prototype.scalarmult=function(t,e){return n.from(this.lib.c.crypto_scalarmult(t,e))},e}(t)}).call(this)},63393:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u={}.hasOwnProperty;o=r(4516).bufeq_secure,a=r(33273),i=a.b2u,s=a.u2b,t=a.Base,e.TweetNaCl=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)u.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.verify=function(t){var e,r,a,u;return r=t.payload,u=t.sig,e=null,t.detached?(null==r&&(r=n.alloc(0)),this.lib.js.sign.detached.verify(i(r),i(u),i(this.publicKey))||(e=new Error("Signature failed to verify"))):null==(a=this.lib.js.sign.open(i(u),i(this.publicKey)))?e=new Error("signature didn't verify"):null==(a=s(a))?e=new Error("failed to convert from a Uint8Array to a buffer"):null==r||o(a,r)?r=a:e=new Error("got unexpected payload"),null!=e&&(r=null),[e,r]},e.prototype.sign=function(t){var e,r;return r=t.payload,e=t.detached?this.lib.js.sign.detached:this.lib.js.sign,s(e(i(r),i(this.secretKey)))},e.prototype.encrypt=function(t){var e,r,n;return r=t.plaintext,e=t.nonce,n=t.pubkey,s(this.lib.js.box(r,e,n,this.secretKey))},e.prototype.secretbox=function(t){var e,r;return r=t.plaintext,e=t.nonce,s(this.lib.js.secretbox(r,e,this.secretKey))},e.prototype.decrypt=function(t){var e,r,n,o;if(e=t.ciphertext,r=t.nonce,o=t.pubkey,n=this.lib.js.box.open(i(e),r,o,this.secretKey))return s(n);throw new Error("TweetNaCl box_open failed!")},e.prototype.secretbox_open=function(t){var e,r,n;if(e=t.ciphertext,r=t.nonce,n=this.lib.js.secretbox.open(i(e),r,this.secretKey))return s(n);throw new Error("TweetNaCl secretbox_open failed!")},e.prototype.box_beforenm=function(t){var e,r;return e=t.pubkey,r=t.seckey,s(this.lib.js.box.before(e,r))},e.prototype.box_open_afternm=function(t){var e,r,n,o;if(e=t.ciphertext,r=t.nonce,o=t.secret,n=this.lib.js.box.open.after(i(e),r,o))return s(n);throw new Error("TweetNaCl box_open_afternm failed!")},e.prototype.scalarmult_base=function(t){return n.from(this.lib.js.scalarMult.base(t))},e.prototype.scalarmult=function(t,e){return n.from(this.lib.js.scalarMult(t,e))},e}(t)}).call(this)},4516:function(t,e){(function(){e.bufeq_secure=function(t,e){var r,n;return function(){var i,o;if(null==t&&null==e)return!0;if(null==t||null==e)return!1;if(t.length!==e.length)return!1;for(r=0,n=i=0,o=t.length;0<=o?io;n=0<=o?++i:--i)r|=t.readUInt8(n)^e.readUInt8(n);return 0===r}()}}).call(this)},73065:function(t,e,r){var n,i;!function(o,s){"use strict";n=function(){var t=function(){},e="undefined",r=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},o=null;function s(t,e){var r=t[e];if("function"==typeof r.bind)return r.bind(t);try{return Function.prototype.bind.call(r,t)}catch(e){return function(){return Function.prototype.apply.apply(r,[t,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(){for(var r=this.getLevel(),i=0;i=0&&e<=c.levels.SILENT)return e;throw new TypeError("log.setLevel() called with invalid level: "+t)}"string"==typeof t?l+=":"+t:"symbol"==typeof t&&(l=void 0),c.name=t,c.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},c.methodFactory=r||h,c.getLevel=function(){return null!=f?f:null!=a?a:s},c.setLevel=function(t,r){return f=d(t),!1!==r&&function(t){var r=(n[t]||"silent").toUpperCase();if(typeof window!==e&&l){try{return void(window.localStorage[l]=r)}catch(t){}try{window.document.cookie=encodeURIComponent(l)+"="+r+";"}catch(t){}}}(f),u.call(c)},c.setDefaultLevel=function(t){a=d(t),p()||c.setLevel(t,!1)},c.resetLevel=function(){f=null,function(){if(typeof window!==e&&l){try{window.localStorage.removeItem(l)}catch(t){}try{window.document.cookie=encodeURIComponent(l)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}(),u.call(c)},c.enableAll=function(t){c.setLevel(c.levels.TRACE,t)},c.disableAll=function(t){c.setLevel(c.levels.SILENT,t)},c.rebuild=function(){if(o!==c&&(s=d(o.getLevel())),u.call(c),o===c)for(var t in i)i[t].rebuild()},s=d(o?o.getLevel():"WARN");var m=p();null!=m&&(f=d(m)),u.call(c)}(o=new c).getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=i[t];return e||(e=i[t]=new c(t,o.methodFactory)),e};var l=typeof window!==e?window.log:void 0;return o.noConflict=function(){return typeof window!==e&&window.log===o&&(window.log=l),o},o.getLoggers=function(){return i},o.default=o,o},void 0===(i=n.call(e,r,e,t))||(t.exports=i)}()},88276:(t,e,r)=>{"use strict";var n=r(56698),i=r(4729),o=r(92861).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<>>32-e}function f(t,e,r,n,i,o,s){return u(t+(e&r|~e&n)+i+o|0,s)+e|0}function h(t,e,r,n,i,o,s){return u(t+(e&n|r&~n)+i+o|0,s)+e|0}function c(t,e,r,n,i,o,s){return u(t+(e^r^n)+i+o|0,s)+e|0}function l(t,e,r,n,i,o,s){return u(t+(r^(e|~n))+i+o|0,s)+e|0}n(a,i),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=f(r,n,i,o,t[0],3614090360,7),o=f(o,r,n,i,t[1],3905402710,12),i=f(i,o,r,n,t[2],606105819,17),n=f(n,i,o,r,t[3],3250441966,22),r=f(r,n,i,o,t[4],4118548399,7),o=f(o,r,n,i,t[5],1200080426,12),i=f(i,o,r,n,t[6],2821735955,17),n=f(n,i,o,r,t[7],4249261313,22),r=f(r,n,i,o,t[8],1770035416,7),o=f(o,r,n,i,t[9],2336552879,12),i=f(i,o,r,n,t[10],4294925233,17),n=f(n,i,o,r,t[11],2304563134,22),r=f(r,n,i,o,t[12],1804603682,7),o=f(o,r,n,i,t[13],4254626195,12),i=f(i,o,r,n,t[14],2792965006,17),r=h(r,n=f(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=h(o,r,n,i,t[6],3225465664,9),i=h(i,o,r,n,t[11],643717713,14),n=h(n,i,o,r,t[0],3921069994,20),r=h(r,n,i,o,t[5],3593408605,5),o=h(o,r,n,i,t[10],38016083,9),i=h(i,o,r,n,t[15],3634488961,14),n=h(n,i,o,r,t[4],3889429448,20),r=h(r,n,i,o,t[9],568446438,5),o=h(o,r,n,i,t[14],3275163606,9),i=h(i,o,r,n,t[3],4107603335,14),n=h(n,i,o,r,t[8],1163531501,20),r=h(r,n,i,o,t[13],2850285829,5),o=h(o,r,n,i,t[2],4243563512,9),i=h(i,o,r,n,t[7],1735328473,14),r=c(r,n=h(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=c(o,r,n,i,t[8],2272392833,11),i=c(i,o,r,n,t[11],1839030562,16),n=c(n,i,o,r,t[14],4259657740,23),r=c(r,n,i,o,t[1],2763975236,4),o=c(o,r,n,i,t[4],1272893353,11),i=c(i,o,r,n,t[7],4139469664,16),n=c(n,i,o,r,t[10],3200236656,23),r=c(r,n,i,o,t[13],681279174,4),o=c(o,r,n,i,t[0],3936430074,11),i=c(i,o,r,n,t[3],3572445317,16),n=c(n,i,o,r,t[6],76029189,23),r=c(r,n,i,o,t[9],3654602809,4),o=c(o,r,n,i,t[12],3873151461,11),i=c(i,o,r,n,t[15],530742520,16),r=l(r,n=c(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=l(o,r,n,i,t[7],1126891415,10),i=l(i,o,r,n,t[14],2878612391,15),n=l(n,i,o,r,t[5],4237533241,21),r=l(r,n,i,o,t[12],1700485571,6),o=l(o,r,n,i,t[3],2399980690,10),i=l(i,o,r,n,t[10],4293915773,15),n=l(n,i,o,r,t[1],2240044497,21),r=l(r,n,i,o,t[8],1873313359,6),o=l(o,r,n,i,t[15],4264355552,10),i=l(i,o,r,n,t[6],2734768916,15),n=l(n,i,o,r,t[13],1309151649,21),r=l(r,n,i,o,t[4],4149444226,6),o=l(o,r,n,i,t[11],3174756917,10),i=l(i,o,r,n,t[2],718787259,15),n=l(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},52244:(t,e,r)=>{var n=r(61158),i=r(15037);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),s=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var a=t.subn(1),u=0;!a.testn(u);u++);for(var f=t.shrn(u),h=a.toRed(o);e>0;e--){var c=this._randrange(new n(2),a);r&&r(c);var l=c.toRed(o).redPow(f);if(0!==l.cmp(s)&&0!==l.cmp(h)){for(var p=1;p0;e--){var h=this._randrange(new n(2),s),c=t.gcd(h);if(0!==c.cmpn(1))return c;var l=h.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(f)){for(var p=1;p=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,h=r;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=c[t],p=l[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:h[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,I=0|s[7],P=8191&I,T=I>>>13,U=0|s[8],F=8191&U,C=U>>>13,O=0|s[9],L=8191&O,N=O>>>13,z=0|a[0],q=8191&z,j=z>>>13,K=0|a[1],Z=8191&K,H=K>>>13,G=0|a[2],V=8191&G,W=G>>>13,$=0|a[3],Y=8191&$,X=$>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,j))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,j))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,q),i=(i=Math.imul(d,j))+Math.imul(m,q)|0,o=Math.imul(m,j);var _t=(f+(n=n+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(l,Z)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,j))+Math.imul(g,q)|0,o=Math.imul(g,j),n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,H)|0;var gt=(f+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(l,V)|0))<<13)|0;f=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,j))+Math.imul(w,q)|0,o=Math.imul(w,j),n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,H)|0,n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,W)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,W)|0;var bt=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,X)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,j))+Math.imul(x,q)|0,o=Math.imul(x,j),n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,H)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,j))+Math.imul(A,q)|0,o=Math.imul(A,j),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(v,V)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,j))+Math.imul(R,q)|0,o=Math.imul(R,j),n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,j))+Math.imul(T,q)|0,o=Math.imul(T,j),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,j))+Math.imul(C,q)|0,o=Math.imul(C,j),n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,j))+Math.imul(N,q)|0,o=Math.imul(N,j),n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,H)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,H))+Math.imul(N,Z)|0,o=Math.imul(N,H),n=n+Math.imul(F,V)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(N,V)|0,o=Math.imul(N,W),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(N,Y)|0,o=Math.imul(N,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ft)|0,n=n+Math.imul(P,ct)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var It=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Pt=(f+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(C,dt)|0))<<13)|0;f=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=It,u[16]=Pt,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function m(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(d=p),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,f=0;f=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&t.negative?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;!(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;!(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;!(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;!(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var _={k256:null,p224:null,p192:null,p25519:null};function g(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(_[t])return _[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return _[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},43349:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},64367:(t,e)=>{"use strict";var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},2757:function(t,e,r){(function(){var t,n,i;n=r(41060),i=function(){},t=t=function(){function t(t){t=t||{},this.lazy_loop_delay=t.lazy_loop_delay||30,this.loop_delay=t.loop_delay||5,this.work_min=t.work_min||1,this.auto_stop_bits=t.auto_stop_bits||4096,this.max_bits_per_delta=t.max_bits_per_delta||4,this.auto_stop=!t.auto_stop||t.auto_stop,this.entropies=[],this.running=!0,this.is_generating=!1,this.timer_race_loop()}return t.prototype.generate=function(t,e){var r,i,o,s,a,u;s=n.findDeferral(arguments),this.is_generating=!0,this.running||this.resume(),i=0,o=[],(u=this,function(e){var f,h;f=[],h=function(e){var c,l;if(c=function(){return n.trampoline((function(){return h(e)}))},l=function(t){return f.push(t),c()},!(i{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(t[i]=r[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o{"use strict";t.exports=function(t,e,r,n){for(var i=65535&t,o=t>>>16&65535,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16}},19681:t=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},14823:t=>{"use strict";var e=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,r,n,i){var o=e,s=i+n;t^=-1;for(var a=i;a>>8^o[255&(t^r[a])];return~t}},58411:(t,e,r)=>{"use strict";var n,i=r(9805),o=r(23665),s=r(53269),a=r(14823),u=r(54674),f=0,h=0,c=-2,l=2,p=8,d=286,m=30,y=19,_=2*d+1,g=15,b=3,v=258,w=v+b+1,k=42,M=103,x=113,S=666;function E(t,e){return t.msg=u[e],e}function A(t){return(t<<1)-(t>4?9:0)}function B(t){for(var e=t.length;--e>=0;)t[e]=0}function D(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function R(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,D(t.strm)}function I(t,e){t.pending_buf[t.pending++]=e}function P(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function T(t,e){var r,n,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-w?t.strstart-(t.w_size-w):0,f=t.window,h=t.w_mask,c=t.prev,l=t.strstart+v,p=f[o+s-1],d=f[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(f[(r=e)+s]===d&&f[r+s-1]===p&&f[r]===f[o]&&f[++r]===f[o+1]){o+=2,r++;do{}while(f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&os){if(t.match_start=e,s=n,n>=a)break;p=f[o+s-1],d=f[o+s]}}}while((e=c[e&h])>u&&0!=--i);return s<=t.lookahead?s:t.lookahead}function U(t){var e,r,n,o,u,f,h,c,l,p,d=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-w)){i.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--r);e=r=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--r);o+=d}if(0===t.strm.avail_in)break;if(f=t.strm,h=t.window,c=t.strstart+t.lookahead,l=o,p=void 0,(p=f.avail_in)>l&&(p=l),r=0===p?0:(f.avail_in-=p,i.arraySet(h,f.input,f.next_in,p,c),1===f.state.wrap?f.adler=s(f.adler,h,p,c):2===f.state.wrap&&(f.adler=a(f.adler,h,p,c)),f.next_in+=p,f.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=b)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<=b&&(t.ins_h=(t.ins_h<=b)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-b),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=b){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=b&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=b-1)),t.prev_length>=b&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-b,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-b),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<15&&(a=2,n-=16),o<1||o>9||r!==p||n<8||n>15||e<0||e>9||s<0||s>4)return E(t,c);8===n&&(n=9);var u=new L;return t.state=u,u.strm=t,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(U(t),0===t.lookahead&&e===f)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,R(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-w&&(R(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(R(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(R(t,!1),t.strm.avail_out),1)})),new O(4,4,8,4,F),new O(4,5,16,8,F),new O(4,6,32,32,F),new O(4,4,16,16,C),new O(8,16,32,32,C),new O(8,16,128,128,C),new O(8,32,128,256,C),new O(32,128,258,1024,C),new O(32,258,258,4096,C)],e.deflateInit=function(t,e){return q(t,e,p,15,8,0)},e.deflateInit2=q,e.deflateReset=z,e.deflateResetKeep=N,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,h):c},e.deflate=function(t,e){var r,i,s,u;if(!t||!t.state||e>5||e<0)return t?E(t,c):c;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===S&&4!==e)return E(t,0===t.avail_out?-5:c);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===k)if(2===i.wrap)t.adler=0,I(i,31),I(i,139),I(i,8),i.gzhead?(I(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),I(i,255&i.gzhead.time),I(i,i.gzhead.time>>8&255),I(i,i.gzhead.time>>16&255),I(i,i.gzhead.time>>24&255),I(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),I(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(I(i,255&i.gzhead.extra.length),I(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(I(i,0),I(i,0),I(i,0),I(i,0),I(i,0),I(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),I(i,3),i.status=x);else{var l=p+(i.w_bits-8<<4)<<8;l|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(l|=32),l+=31-l%31,i.status=x,P(i,l),0!==i.strstart&&(P(i,t.adler>>>16),P(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),D(t),s=i.pending,i.pending!==i.pending_buf_size));)I(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),D(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexs&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),D(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexs&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=M)}else i.status=M;if(i.status===M&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&D(t),i.pending+2<=i.pending_buf_size&&(I(i,255&t.adler),I(i,t.adler>>8&255),t.adler=0,i.status=x)):i.status=x),0!==i.pending){if(D(t),0===t.avail_out)return i.last_flush=-1,h}else if(0===t.avail_in&&A(e)<=A(r)&&4!==e)return E(t,-5);if(i.status===S&&0!==t.avail_in)return E(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==f&&i.status!==S){var d=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(U(t),0===t.lookahead)){if(e===f)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(R(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(R(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(R(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,s,a=t.window;;){if(t.lookahead<=v){if(U(t),t.lookahead<=v&&e===f)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=b&&t.strstart>0&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=t.strstart+v;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=b?(r=o._tr_tally(t,1,t.match_length-b),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(R(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(R(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(R(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==d&&4!==d||(i.status=S),1===d||3===d)return 0===t.avail_out&&(i.last_flush=-1),h;if(2===d&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(B(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),D(t),0===t.avail_out))return i.last_flush=-1,h}return 4!==e?h:i.wrap<=0?1:(2===i.wrap?(I(i,255&t.adler),I(i,t.adler>>8&255),I(i,t.adler>>16&255),I(i,t.adler>>24&255),I(i,255&t.total_in),I(i,t.total_in>>8&255),I(i,t.total_in>>16&255),I(i,t.total_in>>24&255)):(P(i,t.adler>>>16),P(i,65535&t.adler)),D(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?h:1)},e.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==k&&69!==e&&73!==e&&91!==e&&e!==M&&e!==x&&e!==S?E(t,c):(t.state=null,e===x?E(t,-3):h):c},e.deflateSetDictionary=function(t,e){var r,n,o,a,u,f,l,p,d=e.length;if(!t||!t.state)return c;if(2===(a=(r=t.state).wrap)||1===a&&r.status!==k||r.lookahead)return c;for(1===a&&(t.adler=s(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(B(r.head),r.strstart=0,r.block_start=0,r.insert=0),p=new i.Buf8(r.w_size),i.arraySet(p,e,d-r.w_size,r.w_size,0),e=p,d=r.w_size),u=t.avail_in,f=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,U(r);r.lookahead>=b;){n=r.strstart,o=r.lookahead-(b-1);do{r.ins_h=(r.ins_h<{"use strict";t.exports=function(t,e){var r,n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E;r=t.state,n=t.next_in,S=t.input,i=n+(t.avail_in-5),o=t.next_out,E=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=r.dmax,f=r.wsize,h=r.whave,c=r.wnext,l=r.window,p=r.hold,d=r.bits,m=r.lencode,y=r.distcode,_=(1<>>=v=b>>>24,d-=v,0==(v=b>>>16&255))E[o++]=65535&b;else{if(!(16&v)){if(64&v){if(32&v){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}b=m[(65535&b)+(p&(1<>>=v,d-=v),d<15&&(p+=S[n++]<>>=v=b>>>24,d-=v,16&(v=b>>>16&255)){if(k=65535&b,d<(v&=15)&&(p+=S[n++]<u){t.msg="invalid distance too far back",r.mode=30;break t}if(p>>>=v,d-=v,k>(v=o-s)){if((v=k-v)>h&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(M=0,x=l,0===c){if(M+=f-v,v2;)E[o++]=x[M++],E[o++]=x[M++],E[o++]=x[M++],w-=3;w&&(E[o++]=x[M++],w>1&&(E[o++]=x[M++]))}else{M=o-k;do{E[o++]=E[M++],E[o++]=E[M++],E[o++]=E[M++],w-=3}while(w>2);w&&(E[o++]=E[M++],w>1&&(E[o++]=E[M++]))}break}if(64&v){t.msg="invalid distance code",r.mode=30;break t}b=y[(65535&b)+(p&(1<>3,p&=(1<<(d-=w<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n{"use strict";var n=r(9805),i=r(53269),o=r(14823),s=r(47293),a=r(21998),u=0,f=-2,h=1,c=12,l=30,p=852,d=592;function m(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function y(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=h,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(p),e.distcode=e.distdyn=new n.Buf32(d),e.sane=1,e.back=-1,u):f}function g(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,_(t)):f}function b(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?f:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,g(t))):f}function v(t,e){var r,n;return t?(n=new y,t.state=n,n.window=null,(r=b(t,e))!==u&&(t.state=null),r):f}var w,k,M=!0;function x(t){if(M){var e;for(w=new n.Buf32(512),k=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,w,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,k,0,t.work,{bits:5}),M=!1}t.lencode=w,t.lenbits=9,t.distcode=k,t.distbits=5}function S(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=o(r.check,z,2,0),v=0,w=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&v)<<8)+(v>>8))%31){t.msg="incorrect header check",r.mode=l;break}if(8!=(15&v)){t.msg="unknown compression method",r.mode=l;break}if(w-=4,F=8+(15&(v>>>=4)),0===r.wbits)r.wbits=F;else if(F>r.wbits){t.msg="invalid window size",r.mode=l;break}r.dmax=1<>8&1),512&r.flags&&(z[0]=255&v,z[1]=v>>>8&255,r.check=o(r.check,z,2,0)),v=0,w=0,r.mode=3;case 3:for(;w<32;){if(0===g)break t;g--,v+=p[y++]<>>8&255,z[2]=v>>>16&255,z[3]=v>>>24&255,r.check=o(r.check,z,4,0)),v=0,w=0,r.mode=4;case 4:for(;w<16;){if(0===g)break t;g--,v+=p[y++]<>8),512&r.flags&&(z[0]=255&v,z[1]=v>>>8&255,r.check=o(r.check,z,2,0)),v=0,w=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===g)break t;g--,v+=p[y++]<>>8&255,r.check=o(r.check,z,2,0)),v=0,w=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((E=r.length)>g&&(E=g),E&&(r.head&&(F=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,p,y,E,F)),512&r.flags&&(r.check=o(r.check,p,E,y)),g-=E,y+=E,r.length-=E),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break t;E=0;do{F=p[y+E++],r.head&&F&&r.length<65536&&(r.head.name+=String.fromCharCode(F))}while(F&&E>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=c;break;case 10:for(;w<32;){if(0===g)break t;g--,v+=p[y++]<>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===g)break t;g--,v+=p[y++]<>>=1)){case 0:r.mode=14;break;case 1:if(x(r),r.mode=20,6===e){v>>>=2,w-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=l}v>>>=2,w-=2;break;case 14:for(v>>>=7&w,w-=7&w;w<32;){if(0===g)break t;g--,v+=p[y++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=l;break}if(r.length=65535&v,v=0,w=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(E=r.length){if(E>g&&(E=g),E>b&&(E=b),0===E)break t;n.arraySet(d,p,y,E,_),g-=E,y+=E,b-=E,_+=E,r.length-=E;break}r.mode=c;break;case 17:for(;w<14;){if(0===g)break t;g--,v+=p[y++]<>>=5,w-=5,r.ndist=1+(31&v),v>>>=5,w-=5,r.ncode=4+(15&v),v>>>=4,w-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=l;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,w-=3}for(;r.have<19;)r.lens[q[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,O={bits:r.lenbits},C=a(0,r.lens,0,19,r.lencode,0,r.work,O),r.lenbits=O.bits,C){t.msg="invalid code lengths set",r.mode=l;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,I=65535&N,!((D=N>>>24)<=w);){if(0===g)break t;g--,v+=p[y++]<>>=D,w-=D,r.lens[r.have++]=I;else{if(16===I){for(L=D+2;w>>=D,w-=D,0===r.have){t.msg="invalid bit length repeat",r.mode=l;break}F=r.lens[r.have-1],E=3+(3&v),v>>>=2,w-=2}else if(17===I){for(L=D+3;w>>=D)),v>>>=3,w-=3}else{for(L=D+7;w>>=D)),v>>>=7,w-=7}if(r.have+E>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=l;break}for(;E--;)r.lens[r.have++]=F}}if(r.mode===l)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=l;break}if(r.lenbits=9,O={bits:r.lenbits},C=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,O),r.lenbits=O.bits,C){t.msg="invalid literal/lengths set",r.mode=l;break}if(r.distbits=6,r.distcode=r.distdyn,O={bits:r.distbits},C=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,O),r.distbits=O.bits,C){t.msg="invalid distances set",r.mode=l;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(g>=6&&b>=258){t.next_out=_,t.avail_out=b,t.next_in=y,t.avail_in=g,r.hold=v,r.bits=w,s(t,M),_=t.next_out,d=t.output,b=t.avail_out,y=t.next_in,p=t.input,g=t.avail_in,v=r.hold,w=r.bits,r.mode===c&&(r.back=-1);break}for(r.back=0;R=(N=r.lencode[v&(1<>>16&255,I=65535&N,!((D=N>>>24)<=w);){if(0===g)break t;g--,v+=p[y++]<>P)])>>>16&255,I=65535&N,!(P+(D=N>>>24)<=w);){if(0===g)break t;g--,v+=p[y++]<>>=P,w-=P,r.back+=P}if(v>>>=D,w-=D,r.back+=D,r.length=I,0===R){r.mode=26;break}if(32&R){r.back=-1,r.mode=c;break}if(64&R){t.msg="invalid literal/length code",r.mode=l;break}r.extra=15&R,r.mode=22;case 22:if(r.extra){for(L=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;R=(N=r.distcode[v&(1<>>16&255,I=65535&N,!((D=N>>>24)<=w);){if(0===g)break t;g--,v+=p[y++]<>P)])>>>16&255,I=65535&N,!(P+(D=N>>>24)<=w);){if(0===g)break t;g--,v+=p[y++]<>>=P,w-=P,r.back+=P}if(v>>>=D,w-=D,r.back+=D,64&R){t.msg="invalid distance code",r.mode=l;break}r.offset=I,r.extra=15&R,r.mode=24;case 24:if(r.extra){for(L=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=l;break}r.mode=25;case 25:if(0===b)break t;if(E=M-b,r.offset>E){if((E=r.offset-E)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=l;break}E>r.wnext?(E-=r.wnext,A=r.wsize-E):A=r.wnext-E,E>r.length&&(E=r.length),B=r.window}else B=d,A=_-r.offset,E=r.length;E>b&&(E=b),b-=E,r.length-=E;do{d[_++]=B[A++]}while(--E);0===r.length&&(r.mode=21);break;case 26:if(0===b)break t;d[_++]=r.length,b--,r.mode=21;break;case 27:if(r.wrap){for(;w<32;){if(0===g)break t;g--,v|=p[y++]<{"use strict";var n=r(9805),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,r,u,f,h,c,l){var p,d,m,y,_,g,b,v,w,k=l.bits,M=0,x=0,S=0,E=0,A=0,B=0,D=0,R=0,I=0,P=0,T=null,U=0,F=new n.Buf16(16),C=new n.Buf16(16),O=null,L=0;for(M=0;M<=15;M++)F[M]=0;for(x=0;x=1&&0===F[E];E--);if(A>E&&(A=E),0===E)return f[h++]=20971520,f[h++]=20971520,l.bits=1,0;for(S=1;S0&&(0===t||1!==E))return-1;for(C[1]=0,M=1;M<15;M++)C[M+1]=C[M]+F[M];for(x=0;x852||2===t&&I>592)return 1;for(;;){b=M-D,c[x]g?(v=O[L+c[x]],w=T[U+c[x]]):(v=96,w=0),p=1<>D)+(d-=p)]=b<<24|v<<16|w}while(0!==d);for(p=1<>=1;if(0!==p?(P&=p-1,P+=p):P=0,x++,0==--F[M]){if(M===E)break;M=e[r+c[x]]}if(M>A&&(P&y)!==m){for(0===D&&(D=A),_+=S,R=1<<(B=M-D);B+D852||2===t&&I>592)return 1;f[m=P&y]=A<<24|B<<16|_-h}}return 0!==P&&(f[_+P]=M-D<<24|64<<16),l.bits=A,0}},54674:t=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},23665:(t,e,r)=>{"use strict";var n=r(9805);function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=256,s=286,a=30,u=15,f=16,h=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],c=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],p=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);i(d);var m=new Array(60);i(m);var y=new Array(512);i(y);var _=new Array(256);i(_);var g=new Array(29);i(g);var b,v,w,k=new Array(a);function M(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function x(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function S(t){return t<256?y[t]:y[256+(t>>>7)]}function E(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function A(t,e,r){t.bi_valid>f-r?(t.bi_buf|=e<>f-t.bi_valid,t.bi_valid+=r-f):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function R(t,e,r){var n,i,o=new Array(u+1),s=0;for(n=1;n<=u;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=e;i++){var a=t[2*i+1];0!==a&&(t[2*i]=D(o[a]++,a))}}function I(t){var e;for(e=0;e8?E(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function T(t,e,r,n){var i=2*e,o=2*r;return t[i]>1;r>=1;r--)U(t,o,r);i=f;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,U(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,s,a,f=e.dyn_tree,h=e.max_code,c=e.stat_desc.static_tree,l=e.stat_desc.has_stree,p=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,m=e.stat_desc.max_length,y=0;for(o=0;o<=u;o++)t.bl_count[o]=0;for(f[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=f[2*f[2*(n=t.heap[r])+1]+1]+1)>m&&(o=m,y++),f[2*n+1]=o,n>h||(t.bl_count[o]++,s=0,n>=d&&(s=p[n-d]),a=f[2*n],t.opt_len+=a*(o+s),l&&(t.static_len+=a*(c[2*n+1]+s)));if(0!==y){do{for(o=m-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[m]--,y-=2}while(y>0);for(o=m;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>h||(f[2*i+1]!==o&&(t.opt_len+=(o-f[2*i+1])*f[2*i],f[2*i+1]=o),n--)}}(t,e),R(o,h,t.bl_count)}function O(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,f=4;for(0===s&&(u=138,f=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++a>=7;n0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*p[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==e?z(t,e,r,n):4===t.strategy||s===i?(A(t,2+(n?1:0),3),F(t,d,m)):(A(t,4+(n?1:0),3),function(t,e,r,n){var i;for(A(t,e-257,5),A(t,r-1,5),A(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(_[r]+o+1)]++,t.dyn_dtree[2*S(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){A(t,2,3),B(t,256,d),function(t){16===t.bi_valid?(E(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},44442:t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},21137:(t,e,r)=>{"use strict";var n=r(87568);e.certificate=r(36413);var i=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())}));e.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=o;var s=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(s),this.key("subjectPublicKey").bitstr())}));e.PublicKey=a;var u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=u;var f=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())}));e.EncryptedPrivateKey=f;var h=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())}));e.DSAPrivateKey=h,e.DSAparam=n.define("DSAparam",(function(){this.int()}));var c=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),l=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(c),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=l,e.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},36413:(t,e,r)=>{"use strict";var n=r(87568),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),f=n.define("RDNSequence",(function(){this.seqof(u)})),h=n.define("Name",(function(){this.choice({rdnSequence:this.use(f)})})),c=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),l=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),p=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(h),this.key("validity").use(c),this.key("subject").use(h),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),d=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=d},24101:(t,e,r)=>{"use strict";var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=r(68078),a=r(1241),u=r(29716).Buffer;t.exports=function(t,e){var r,f=t.toString(),h=f.match(n);if(h){var c="aes"+h[1],l=u.from(h[2],"hex"),p=u.from(h[3].replace(/[\r\n]/g,""),"base64"),d=s(e,l.slice(0,8),parseInt(h[1],10)).key,m=[],y=a.createDecipheriv(c,d,l);m.push(y.update(p)),m.push(y.final()),r=u.concat(m)}else{var _=f.match(o);r=u.from(_[2].replace(/[\r\n]/g,""),"base64")}return{tag:f.match(i)[1],data:r}}},78170:(t,e,r)=>{"use strict";var n=r(21137),i=r(15579),o=r(24101),s=r(1241),a=r(78396),u=r(29716).Buffer;function f(t){var e;"object"!=typeof t||u.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=u.from(t));var r,f,h=o(t,e),c=h.tag,l=h.data;switch(c){case"CERTIFICATE":f=n.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=n.PublicKey.decode(l,"der")),r=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=n.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":l=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[t.algorithm.decrypt.cipher.algo.join(".")],f=t.algorithm.decrypt.cipher.iv,h=t.subjectPrivateKey,c=parseInt(o.split("-")[1],10)/8,l=a.pbkdf2Sync(e,r,n,c,"sha1"),p=s.createDecipheriv(o,l,f),d=[];return d.push(p.update(h)),d.push(p.final()),u.concat(d)}(l=n.EncryptedPrivateKey.decode(l,"der"),e);case"PRIVATE KEY":switch(r=(f=n.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:n.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=n.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=n.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+c)}}f.signature=n.signature,t.exports=f},29716:(t,e,r)=>{var n=r(48287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},78396:(t,e,r)=>{e.pbkdf2=r(43832),e.pbkdf2Sync=r(21352)},43832:(t,e,r)=>{var n,i,o=r(92861).Buffer,s=r(64196),a=r(2455),u=r(21352),f=r(93382),h=r.g.crypto&&r.g.crypto.subtle,c={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];function p(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function d(t,e,r,n,i){return h.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return h.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return o.from(t)}))}t.exports=function(t,e,i,m,y,_){"function"==typeof y&&(_=y,y=void 0);var g=c[(y=y||"sha1").toLowerCase()];if(g&&"function"==typeof r.g.Promise){if(s(i,m),t=f(t,a,"Password"),e=f(e,a,"Salt"),"function"!=typeof _)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){p()((function(){e(null,t)}))}),(function(t){p()((function(){e(t)}))}))}(function(t){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(void 0!==l[t])return l[t];var e=d(n=n||o.alloc(8),n,10,128,t).then((function(){return!0})).catch((function(){return!1}));return l[t]=e,e}(g).then((function(r){return r?d(t,e,i,m,g):u(t,e,i,m,y)})),_)}else p()((function(){var r;try{r=u(t,e,i,m,y)}catch(t){return _(t)}_(null,r)}))}},2455:(t,e,r)=>{var n,i=r(65606);n=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",t.exports=n},64196:t=>{var e=Math.pow(2,30)-1;t.exports=function(t,r){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>e||r!=r)throw new TypeError("Bad key length")}},21352:(t,e,r)=>{var n=r(20320),i=r(66011),o=r(62802),s=r(92861).Buffer,a=r(64196),u=r(2455),f=r(93382),h=s.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(t,e,r){var a=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?n:function(e){return o(t).update(e).digest()}}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=a(e):e.length{var n=r(92861).Buffer;t.exports=function(t,e,r){if(n.isBuffer(t))return t;if("string"==typeof t)return n.from(t,e);if(ArrayBuffer.isView(t))return n.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},9983:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d,m,y;y=r(12118),p=y.trim,y.strip,c=y.katch,y.bufeq_fast,d=y.uint_to_buffer,l=function(t){return null==t&&(t=""),t+"\n"},e.Encoder=t=function(){function t(t){this.C=t}return t.prototype.frame=function(t){var e;return e=function(){var t,e;for(e=[],t=0;t<5;++t)e.push("-");return e}().join(""),{begin:l(e+"BEGIN PGP "+t+e),end:l(e+"END PGP "+t+e)}},t.prototype.b64e=function(t){var e,r,n,i;return i=t.toString("base64"),n=function(){var t,n,o;for(o=[],r=t=0,n=i.length;t16;)r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r<<8^u[255&(r>>16^t.readUInt8(n+0))])<<8^u[255&(r>>16^t.readUInt8(n+1))])<<8^u[255&(r>>16^t.readUInt8(n+2))])<<8^u[255&(r>>16^t.readUInt8(n+3))])<<8^u[255&(r>>16^t.readUInt8(n+4))])<<8^u[255&(r>>16^t.readUInt8(n+5))])<<8^u[255&(r>>16^t.readUInt8(n+6))])<<8^u[255&(r>>16^t.readUInt8(n+7))])<<8^u[255&(r>>16^t.readUInt8(n+8))])<<8^u[255&(r>>16^t.readUInt8(n+9))])<<8^u[255&(r>>16^t.readUInt8(n+10))])<<8^u[255&(r>>16^t.readUInt8(n+11))])<<8^u[255&(r>>16^t.readUInt8(n+12))])<<8^u[255&(r>>16^t.readUInt8(n+13))])<<8^u[255&(r>>16^t.readUInt8(n+14))])<<8^u[255&(r>>16^t.readUInt8(n+15))],n+=16;for(i=n,o=t.length;n<=o?io;n<=o?++i:--i)r=r<<8^u[255&(r>>16^t.readUInt8(n++))];return 16777215&r},h=function(t,e){return a(s(t),e)},e.crc24_to_base64=a=function(t,e){return null==e&&(e=!0),(e?"=":"")+d(32,t).slice(1,4).toString("base64")},f=function(t){return l(h(t,!0))},m=function(t,e){return h(t,!1)===e},e.Message=i=function(){function t(t){this.body=t.body,this.type=t.type,this.comment=t.comment,this.version=t.version,this.pre=t.pre,this.post=t.post,this.lines=[],this.fields={},this.payload=null}return t.prototype.unsplit=function(t){return t.join("\n")},t.prototype.raw=function(){return this.unsplit(this.lines)},t.prototype.finish_unframe=function(t){var e,r;if(r=t.pre,e=t.post,this.pre=this.unsplit(r),this.post=this.unsplit(e),null!=this.clearsign)return this.clearsign.body=this.unsplit(this.clearsign.lines)},t.prototype.make_clearsign=function(){return this.clearsign={headers:{},lines:[],body:null}},t}(),e.Parser=o=function(){function t(t,e){this.strict=(null!=e?e:{}).strict,this.init(t)}return t.prototype.init=function(t){return this.data=n.isBuffer(t)?t.toString("utf8"):t,this.lines=this.data.split(/\r?\n/),this.checksum=null,this.body=null,this.type=null,this.ret=null,this.last_type=null},t.prototype.parse=function(){return this.ret=new i({}),this.unframe(),this.check_charset(),this.pop_headers(),this.parse_type(),this.strip_empties_in_footer(),this.strict&&this.verify_base64_lines(),this.trim_lines(),this.find_checksum(),this.read_body(),this.check_checksum(),this.ret},t.prototype.parse_type=function(){return this.ret.type=this.ret.fields.type=this.type},t.prototype.last_line=function(){return this.payload.slice(-1)[0]},t.prototype.mparse=function(){var t,e,r;for(r=[],t=!0;t;)this.skip(),this.lines.length?(e=this.parse(),r.push(e),this.init(e.post)):t=!1;return r},t.prototype.skip=function(){var t;for(t=[];this.lines.length&&!this.lines[0].match(/\S+/);)t.push(this.lines.shift());return t},t.prototype.read_body=function(){var t;return this.ret.payload=this.payload.join("\n"),t=this.payload.join(""),this.ret.body=n.from(t,"base64")},t.prototype.check_checksum=function(){if(this.ret.fields.checksum=this.checksum,null!=this.checksum&&!m(this.ret.body,this.checksum))throw new Error("checksum mismatch")},t.prototype.pop_headers=function(){var t,e,r;for(r=[];this.payload.length;)if(e=(t=this.payload.shift()).match(/^Version: (.*)/))r.push(this.ret.version=e[1]);else if(null!=(e=t.match(/^Comment: (.*)/)))r.push(this.ret.comment=e[1]);else{if(null==t||0===t.length||t.match(/^\s+$/))break;if(!t.match(/^\S+: .+$/))throw new Error("bad PGP armor found; expected a newline")}return r},t.prototype.strip_empties_in_footer=function(){var t,e;for(e=[];null!=(t=this.last_line())?t.match(/^\s*$/):void 0;)e.push(this.payload.pop());return e},t.prototype.verify_base64_lines=function(){var t,e,r,n,i,o;for(e=/^[a-zA-Z0-9\/+=]+$/,o=[],r=0,n=(i=this.payload).length;r80)throw new Error("armor line longer than 80 characters");o.push(void 0)}return o},t.prototype.trim_lines=function(){var t;return this.payload=function(){var e,r,n,i;for(i=[],e=0,r=(n=this.payload).length;e)?$/,null!=(r=t.match(n))&&(e={username:r[1],comment:r[2],email:r[3]}),e},e.format=function(t){var e,r,n,i;return e=[],(null!=(r=t.username)?r.length:void 0)&&e.push(t.username),(null!=(n=t.comment)?n.length:void 0)&&e.push("("+t.comment+")"),(null!=(i=t.email)?i.length:void 0)&&e.push("<"+t.email+">"),e.join(" ")}}).call(this)},12118:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l=[].slice;u=r(41060),c=function(){},t=r(30647).Canceler,i=r(34529),e.uint_to_buffer=function(t,e){var r;switch(r=null,t){case 16:(r=n.alloc(2)).writeUInt16BE(e,0);break;case 32:(r=n.alloc(4)).writeUInt32BE(e,0);break;case 8:(r=n.alloc(1)).writeUInt8(e,0);break;default:throw new Error("Bit types not found: "+nbit)}return r},e.ASP=function(){function e(e){var r,n,i;i=e.progress_hook,n=e.delay,r=e.canceler,this._delay=null!=n?n:2,this._canceler=r||new t,this._progress_hook=i||function(t){},this._section=null}return e.prototype.section=function(t){return this._section=t,this},e.prototype.progress=function(t,e){var r,n,i,o,s;if(o=c,n=u.findDeferral(arguments),this._section&&(t.section=this._section),this._progress_hook(t),null==e)return o();(s=this,function(t){i=new u.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/pgp-utils/src/util.iced",funcname:"ASP.progress"}),s.delay(i.defer({assign_fn:function(){return r=arguments[0]},lineno:43})),i._fulfill()})((function(){return o(e(r))}))},e.prototype.delay=function(t){var e,r,n;e=u.findDeferral(arguments),(n=this,function(t){r=new u.Deferrals(t,{parent:e,filename:"/Users/max/src/keybase/pgp-utils/src/util.iced",funcname:"ASP.delay"}),setTimeout(r.defer({lineno:47}),n.delay),r._fulfill()})(function(e){return function(){return t(e._canceler.err())}}(this))},e.prototype.canceler=function(){return this._canceler},e.prototype.progress_hook=function(){return this._progress_hook},e.make=function(t){return t||new e({})},e}(),e.Warnings=function(){function t(){this._w=[]}return t.prototype.push=function(){var t,e;return t=1<=arguments.length?l.call(arguments,0):[],(e=this._w).push.apply(e,t)},t.prototype.warnings=function(){return this._w},t}(),e.bufeq_fast=function(t,e){var r,n,i;if(null==t&&null==e)return!0;if(null==t||null==e)return!1;if(t.length!==e.length)return!1;for(r=n=0,i=t.length;0<=i?ni;r=0<=i?++n:--n)if(t.readUInt8(r)!==e.readUInt8(r))return!1;return!0},e.bufeq_secure=s=function(t,e){var r,n;return function(){var i,o;if(null==t&&null==e)return!0;if(null==t||null==e)return!1;if(t.length!==e.length)return!1;for(r=0,n=i=0,o=t.length;0<=o?io;n=0<=o?++i:--i)r|=t.readUInt8(n)^e.readUInt8(n);return 0===r}()},e.streq_secure=function(t,e){var r;return r=function(t){return null!=t?a(t):null},s(r(t),r(e))},e.bufferify=a=function(t){if(n.isBuffer(t))return t;if("string"==typeof t)return n.from(t,"utf8");throw new Error("Cannot convert to buffer: "+t)},e.katch=f=function(t){var e,r;r=e=null;try{r=t()}catch(t){e=t}return[e,r]},e.akatch=function(t,e){return o(f(t),e)},e.buffer_to_ui8a=function(t){var e,r,n,i;for(r=t.length,n=new Uint8Array(r),e=i=0;0<=r?ir;e=0<=r?++i:--i)n[e]=t.readUInt8(e);return n},e.ui32a_to_ui8a=function(t,e){var r,n,i,o;for(null==e&&(e=null),e||(e=new Uint8Array(4*t.length)),r=0,i=0,o=t.length;i>24&255,e[r++]=n>>16&255,e[r++]=n>>8&255,e[r++]=255&n;return e},e.ui8a_to_ui32a=function(t,e){var r,n,i,o,s;for(null==e&&(e=null),e||(e=new Uint32Array(t.length>>2)),n=0,r=o=0,s=t.length;os;0<=s?++t:--t)e.push(" ");return e}().join("")),o=function(t){return null==s?"":"\n"+function(){var e,r;for(r=[],e=0;0<=t?et;0<=t?++e:--e)r.push(s);return r}().join("")},r=function(t,e){var n,s,a,u,f,h;return Array.isArray(t)?a="["+function(){var n,i,o;for(o=[],n=0,i=t.length;n8?(o=function(){var t,e,i;for(i=[],n=t=0,e=r.length;t0?te;r=t+=a)n.push(u.slice(r,r+a).join(" "));return n}(),s=function(t,e){return function(){var r,n,i;for(i=[],r=0,n=e-t.length;0<=n?rn;0<=n?r++:r--)i.push("0");return i}().join("")+t},function(){var t,e,u;for(u=[],r=t=0,e=i.length;t{"use strict";var n=r(65606);void 0===n||!n.version||0===n.version.indexOf("v0.")||0===n.version.indexOf("v1.")&&0!==n.version.indexOf("v1.8.")?t.exports={nextTick:function(t,e,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return n.nextTick(t);case 2:return n.nextTick((function(){t.call(null,e)}));case 3:return n.nextTick((function(){t.call(null,e,r)}));case 4:return n.nextTick((function(){t.call(null,e,r,i)}));default:for(o=new Array(a-1),s=0;s{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var a,u=[],f=!1,h=-1;function c(){f&&a&&(f=!1,a.length?u=a.concat(u):h=-1,u.length&&l())}function l(){if(!f){var t=s(c);f=!0;for(var e=u.length;e;){for(a=u,u=[];++h1)for(var r=1;r{e.publicEncrypt=r(28902),e.privateDecrypt=r(77362),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},48206:(t,e,r)=>{var n=r(47108),i=r(92861).Buffer;function o(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var r,s=i.alloc(0),a=0;s.length=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,h=r;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?h[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=c[t],p=l[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:h[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,I=0|s[7],P=8191&I,T=I>>>13,U=0|s[8],F=8191&U,C=U>>>13,O=0|s[9],L=8191&O,N=O>>>13,z=0|a[0],q=8191&z,j=z>>>13,K=0|a[1],Z=8191&K,H=K>>>13,G=0|a[2],V=8191&G,W=G>>>13,$=0|a[3],Y=8191&$,X=$>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,j))+Math.imul(l,q)|0))<<13)|0;f=((o=Math.imul(l,j))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,q),i=(i=Math.imul(d,j))+Math.imul(m,q)|0,o=Math.imul(m,j);var _t=(f+(n=n+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(l,Z)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,j))+Math.imul(g,q)|0,o=Math.imul(g,j),n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,H)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,H)|0;var gt=(f+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(l,V)|0))<<13)|0;f=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,q),i=(i=Math.imul(v,j))+Math.imul(w,q)|0,o=Math.imul(w,j),n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,H)|0,n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,W)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,W)|0;var bt=(f+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,X)|0)+Math.imul(l,Y)|0))<<13)|0;f=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,j))+Math.imul(x,q)|0,o=Math.imul(x,j),n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,H)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,j))+Math.imul(A,q)|0,o=Math.imul(A,j),n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(v,V)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,j))+Math.imul(R,q)|0,o=Math.imul(R,j),n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,j))+Math.imul(T,q)|0,o=Math.imul(T,j),n=n+Math.imul(D,Z)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,j))+Math.imul(C,q)|0,o=Math.imul(C,j),n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,j))+Math.imul(N,q)|0,o=Math.imul(N,j),n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,H)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,H)|0,n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,H))+Math.imul(N,Z)|0,o=Math.imul(N,H),n=n+Math.imul(F,V)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(N,V)|0,o=Math.imul(N,W),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,X))+Math.imul(N,Y)|0,o=Math.imul(N,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ft)|0,n=n+Math.imul(P,ct)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var It=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0;var Pt=(f+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(C,dt)|0))<<13)|0;f=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=It,u[16]=Pt,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function m(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(d=p),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,f=0;f=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&t.negative?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;!(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;!(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;!(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;!(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var _={k256:null,p224:null,p192:null,p25519:null};function g(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(t,e){t.iushrn(this.n,0,e)},g.prototype.imulK=function(t){return t.imul(this.k)},i(b,g),b.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(_[t])return _[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return _[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(!(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},77362:(t,e,r)=>{var n=r(78170),i=r(48206),o=r(52061),s=r(82509),a=r(67332),u=r(47108),f=r(99247),h=r(92861).Buffer;t.exports=function(t,e,r){var c;c=t.padding?t.padding:r?1:4;var l,p=n(t),d=p.modulus.byteLength();if(e.length>d||new s(e).cmp(p.modulus)>=0)throw new Error("decryption error");l=r?f(new s(e),p):a(e,p);var m=h.alloc(d-l.length);if(l=h.concat([m,l],d),4===c)return function(t,e){var r=t.modulus.byteLength(),n=u("sha1").update(h.alloc(0)).digest(),s=n.length;if(0!==e[0])throw new Error("decryption error");var a=e.slice(1,s+1),f=e.slice(s+1),c=o(a,i(f,s)),l=o(f,i(c,r-s-1));if(function(t,e){t=h.from(t),e=h.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));for(var i=-1;++i=e.length){o++;break}var s=e.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,s.length<8&&o++,o)throw new Error("decryption error");return e.slice(i)}(0,l,r);if(3===c)return l;throw new Error("unknown padding")}},28902:(t,e,r)=>{var n=r(78170),i=r(53209),o=r(47108),s=r(48206),a=r(52061),u=r(82509),f=r(99247),h=r(67332),c=r(92861).Buffer;t.exports=function(t,e,r){var l;l=t.padding?t.padding:r?1:4;var p,d=n(t);if(4===l)p=function(t,e){var r=t.modulus.byteLength(),n=e.length,f=o("sha1").update(c.alloc(0)).digest(),h=f.length,l=2*h;if(n>r-l-2)throw new Error("message too long");var p=c.alloc(r-n-l-2),d=r-h-1,m=i(h),y=a(c.concat([f,p,c.alloc(1,1),e],d),s(m,d)),_=a(m,s(y,h));return new u(c.concat([c.alloc(1),_,y],r))}(d,e);else if(1===l)p=function(t,e,r){var n,o=e.length,s=t.modulus.byteLength();if(o>s-11)throw new Error("message too long");return n=r?c.alloc(s-o-3,255):function(t){for(var e,r=c.allocUnsafe(t),n=0,o=i(2*t),s=0;n=0)throw new Error("data too long for modulus")}return r?h(p,d):f(p,d)}},99247:(t,e,r)=>{var n=r(82509),i=r(92861).Buffer;t.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},52061:t=>{t.exports=function(t,e){for(var r=t.length,n=-1;++nthis._small_buf_sz?(this._push_sub_buffer(t),this._i=t.length,this._tot+=t.length):((r=Math.min(t.length,this._lib()))>0&&(t.copy(this._ab(),this._i,0,r),this._i+=r,this._tot+=r),r0&&i.push(e.slice(0,n));this._sub_buffers=[],this._frozen_buf=t.concat(i,this._tot)}return this._frozen_buf},e.prototype._freeze_to=function(t){return this._frozen_buf=t,this._tot=t.length,this._sub_buffers=[],this._cp=0,this},e.prototype.bytes_left=function(){return this._tot-this._cp},e.prototype._get=function(t){if(t(e=this.bytes_left()))throw new Error("Corruption: asked for "+t+" bytes, but only "+e+" available");return r=this._cp+t,n=this._frozen_buf.slice(this._cp,r),this._cp=r,n},e.isBuffer=function(e){return t.isBuffer(e)},e}(),e.bufeq=function(t,e){var r,n,i;if(t.length!==e.length)return!1;for(r=n=0,i=t.lenth;0<=i?ni;r=0<=i?++n:--n)if(t.readUInt8(r)!==e.readUInt8(r))return!1;return!0}}).call(this)},46965:function(t,e){(function(){e.C={null:192,false:194,true:195,bin8:196,bin16:197,bin32:198,ext8:199,ext16:200,ext32:201,float:202,double:203,uint8:204,uint16:205,uint32:206,uint64:207,int8:208,int16:209,int32:210,int64:211,fix_ext1:212,fix_ext2:213,fix_ext4:214,fix_ext8:215,fix_ext16:216,str8:217,str16:218,str32:219,array16:220,array32:221,map16:222,map32:223,fix_str_min:160,fix_str_max:191,fix_array_min:144,fix_array_max:159,fix_map_min:128,fix_map_max:143,fix_array_count_mask:15,fix_map_count_mask:15,fix_str_count_mask:31,negative_fix_min:224,negative_fix_max:255,negative_fix_mask:31,negative_fix_offset:32,positive_fix_max:127,rpc_request:0,rpc_response:1,rpc_notify:2}}).call(this)},83123:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s;o=r(6981).pack,s=r(56962).unpack,t=r(46965).C,e.pack=function(t,e){var r,i;return null==e&&(e={}),i=o(t,e),r=o(i.length),n.concat([r,i])},e.frame_len=i=function(e){return e<=t.positive_fix_max?1:e===t.uint8?2:e===t.uint16?3:e===t.uint32?5:0},e.unpack=function(t,e){var r,n,o,a,u;if(null==e&&(e={}),t.length<1)throw new Error("need a buffer > 1 bytes");if(n=t.readUInt8(0),0===(o=i(n)))throw new Error("no data frame found");if(t.length0?1:0),0===r?0:o-r]},e.Packer=n=function(){function e(t){this._opts=null!=t?t:{},this._buffer=new i}return e.prototype.output=function(){return this._buffer.freeze()},e.prototype.p=function(t){switch(typeof t){case"number":return this.p_number(t);case"string":return this.p_str(t);case"boolean":return this.p_boolean(t);case"undefined":return this.p_null();case"object":if(null==t)return this.p_null();if(s(t))return this.p_array(t);if(i.isBuffer(t))return this.p_bin(t);if(!this.p_ext(t))return this.p_obj(t)}},e.prototype.p_number=function(t){return a(t)?t>=0?this.p_positive_int(t):this.p_negative_int(t):this.p_pack_double(t)},e.prototype.p_pack_double=function(e){return null!=this._opts.floats?(this.p_uint8(t.float),this._buffer.push_float32(e)):(this.p_uint8(t.double),this._buffer.push_float64(e))},e.prototype.p_uint8=function(t){return this._buffer.push_uint8(t)},e.prototype.p_uint16=function(t){return this._buffer.push_uint16(t)},e.prototype.p_uint32=function(t){return this._buffer.push_uint32(t)},e.prototype.p_int8=function(t){return this._buffer.push_int8(t)},e.prototype.p_int16=function(t){return this._buffer.push_int16(t)},e.prototype.p_int32=function(t){return this._buffer.push_int32(t)},e.prototype.p_neg_int64=function(t){var e,r,n;return e=(n=u(0-t))[0],r=n[1],this.p_uint32(e),this.p_uint32(r)},e.prototype.p_boolean=function(e){return this.p_uint8(e?t.true:t.false)},e.prototype.p_null=function(){return this.p_uint8(t.null)},e.prototype.p_array=function(e){var r,n,i,o;for(this.p_len(e.length,t.fix_array_min,t.fix_array_max,t.array16,t.array32),o=[],n=0,i=e.length;n=-32?this.p_int8(e):e>=-128?(this.p_uint8(t.int8),this.p_int8(e)):e>=-32768?(this.p_uint8(t.int16),this.p_int16(e)):e>=-2147483648?(this.p_uint8(t.int32),this.p_int32(e)):(this.p_uint8(t.int64),this.p_neg_int64(e))},e.prototype.p_buffer=function(t){return this._buffer.push_buffer(t)},e.prototype.p_bin=function(e){return this.p_len(e.length,null,null,t.bin16,t.bin32,t.bin8),this.p_buffer(e)},e.prototype.p_str=function(e){var r,n;return r=this._buffer.prepare_utf8(e),n=this._opts.no_str8?null:t.str8,this.p_len(r.length,t.fix_str_min,t.fix_str_max,t.str16,t.str32,n),this.p_buffer(r)},e.prototype.p_len=function(t,e,r,n,i,o){return null==o&&(o=null),null!=e&&null!=r&&t<=r-e?this.p_uint8(t|e):null!=o&&t<=255?(this.p_uint8(o),this.p_uint8(t)):t<=65535?(this.p_uint8(n),this.p_uint16(t)):(this.p_uint8(i),this.p_uint32(t))},e.prototype.p_ext=function(e){var r,n,i,o;if(null==this._opts.ext)return!1;if(i=this._opts.ext(e)){switch(o=i[0],n=(r=i[1]).length){case 1:this.p_uint8(t.fix_ext1);break;case 2:this.p_uint8(t.fix_ext2);break;case 4:this.p_uint8(t.fix_ext4);break;case 8:this.p_uint8(t.fix_ext8);break;case 16:this.p_uint8(t.fix_ext16);break;default:n<=255?(this.p_uint8(t.ext8),this.p_uint8(n)):n<=65535?(this.p_uint8(t.ext16),this.p_uint16(n)):(this.p_uint8(t.ext32),this.p_uint32(n))}return this.p_uint8(o),this.p_buffer(r),!0}return!1},e}(),e.pack=function(t,e){var r;return null==e&&(e={}),(r=new n(e)).p(t),r.output()}}).call(this)},56962:function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c;t=r(46965).C,h=r(78638),s=h.bufeq,n=h.PpBuffer,(c=r(59520)).pow2,f=c.twos_compl_inv,i=c.U32MAX,u=r(6981).pack,a=function(t,e){return{type:t,raw:e}},e.Unpacker=o=function(){function e(t,e){this._opts=null!=e?e:{},this._orig_buffer=t,this._buffer=new n(t),this._ext=this._opts.ext||(this._opts.no_ext?null:a)}return e.prototype.u_buf=function(t){return this._buffer.read_buffer(t)},e.prototype.u_str=function(t){return this.u_buf(t).toString("utf8")},e.prototype.u_bin=function(t){return this.u_buf(t)},e.prototype.u_ext=function(t){var e,r;if(r=this.u_uint8(),e=this.u_buf(t),null!=this._opts.ext)return this._opts.ext(r,e);throw new Error("No ext hook but got message type: "+r)},e.prototype.u_array=function(t){var e,r;for(r=[],e=0;0<=t?et;0<=t?++e:--e)r.push(this.u());return r},e.prototype.u_map=function(t){var e,r,n,i,o,s,a;for(i={},n=[],e=o=0;0<=t?ot;e=0<=t?++o:--o){if(r=this.u(),n.push(r),null!=i[r])throw new Error("duplicate key '"+r+"'");i[r]=this.u()}if(this._opts.strict)for(e=s=0,a=n.length-1;0<=a?sa;e=0<=a?++s:--s)if(n[e]>n[e+1])throw new Error("unsorted object keys in strict mode: "+n[e]+" > "+n[e+1]);return i},e.prototype.u_uint8=function(){return this._buffer.read_uint8()},e.prototype.u_uint16=function(){return this._buffer.read_uint16()},e.prototype.u_uint32=function(){return this._buffer.read_uint32()},e.prototype.u_int8=function(){return this._buffer.read_int8()},e.prototype.u_int16=function(){return this._buffer.read_int16()},e.prototype.u_int32=function(){return this._buffer.read_int32()},e.prototype.u_uint64=function(){return this.u_uint32()*i+this.u_uint32()},e.prototype.u_double=function(){return this._buffer.read_float64()},e.prototype.u_float=function(){return this._buffer.read_float32()},e.prototype.u_int64=function(){var t,e,r;return t=(r=function(){var t,e;for(e=[],t=0;t<2;++t)e.push(this.u_uint32());return e}.call(this))[0],e=r[1],i*(t-i)+e},e.prototype.u=function(){var e,r;if((e=this.u_uint8())<=t.positive_fix_max)return e;if(e>=t.negative_fix_min&&e<=t.negative_fix_max)return f(e,8);if(e>=t.fix_str_min&&e<=t.fix_str_max)return r=e&t.fix_str_count_mask,this.u_str(r);if(e>=t.fix_array_min&&e<=t.fix_array_max)return r=e&t.fix_array_count_mask,this.u_array(r);if(e>=t.fix_map_min&&e<=t.fix_map_max)return r=e&t.fix_map_count_mask,this.u_map(r);switch(e){case t.null:return null;case t.true:return!0;case t.false:return!1;case t.uint8:return this.u_uint8();case t.uint16:return this.u_uint16();case t.uint32:return this.u_uint32();case t.uint64:return this.u_uint64();case t.int8:return this.u_int8();case t.int16:return this.u_int16();case t.int32:return this.u_int32();case t.int64:return this.u_int64();case t.double:return this.u_double();case t.float:return this.u_float();case t.str8:return this.u_str(this.u_uint8());case t.str16:return this.u_str(this.u_uint16());case t.str32:return this.u_str(this.u_uint32());case t.bin8:return this.u_bin(this.u_uint8());case t.bin16:return this.u_bin(this.u_uint16());case t.bin32:return this.u_bin(this.u_uint32());case t.array16:return this.u_array(this.u_uint16());case t.array32:return this.u_array(this.u_uint32());case t.map16:return this.u_map(this.u_uint16());case t.map32:return this.u_map(this.u_uint32());case t.fix_ext1:return this.u_ext(1);case t.fix_ext2:return this.u_ext(2);case t.fix_ext4:return this.u_ext(4);case t.fix_ext8:return this.u_ext(8);case t.fix_ext16:return this.u_ext(16);case t.ext8:return this.u_ext(this.u_uint8());case t.ext16:return this.u_ext(this.u_uint16());case t.ext32:return this.u_ext(this.u_uint32());default:throw new Error("unhandled type "+e)}},e.prototype.unpack=function(){var t,e,r,n;if(n=this.u(),this._opts.strict){if((t=(r=u(n,{sort_keys:!0})).length)!==(e=this._orig_buffer.length))throw new Error("encoding size mismatch: wanted "+t+" but got "+e);if(!s(r,this._orig_buffer))throw new Error("Got non-standard encoding in strict mode")}return n},e}(),e.unpack=function(t,e){return null==e&&(e={}),new o(t,e).unpack()}}).call(this)},59520:function(t,e){(function(){var t;e.pow2=t=function(t){return t<31?1<>e:Math.floor(t/Math.pow(2,e))},e.twos_compl=function(e,r){return e<0?t(r)-Math.abs(e):e},e.twos_compl_inv=function(e,r){return e-t(r)}}).call(this)},53209:(t,e,r)=>{"use strict";var n=r(65606),i=65536,o=r(92861).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(t);if(t>0)if(t>i)for(var a=0;a{"use strict";var n=r(65606);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(92861),s=(r(53209),o.Buffer),a=o.kMaxLength,u=r.g.crypto||r.g.msCrypto,f=Math.pow(2,32)-1;function h(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>f||t<0)throw new TypeError("offset must be a uint32");if(t>a||t>e)throw new RangeError("offset out of range")}function c(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>a)throw new RangeError("buffer too small")}function l(t,e,r,i){var o=t.buffer,s=new Uint8Array(o,e,r);return u.getRandomValues(s),i?void n.nextTick((function(){i(null,t)})):t}u&&u.getRandomValues?(e.randomFill=function(t,e,n,i){if(!(s.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)i=e,e=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-e;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(e,t.length),c(n,e,t.length),l(t,e,n,i)},e.randomFillSync=function(t,e,n){if(void 0===e&&(e=0),!(s.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return h(e,t.length),void 0===n&&(n=t.length-e),c(n,e,t.length),l(t,e,n)}):(e.randomFill=i,e.randomFillSync=i)},86048:t=>{"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,s,a,u;if("string"==typeof e&&(o="not ",e.substr(0,4)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var f=("number"!=typeof u&&(u=0),u+1>(a=t).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(t,'" ').concat(f," ").concat(i," ").concat(n(e,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.F=e},25382:(t,e,r)=>{"use strict";var n=r(65606),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var o=r(45412),s=r(16708);r(56698)(h,o);for(var a=i(s.prototype),u=0;u{"use strict";t.exports=i;var n=r(74610);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(56698)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},45412:(t,e,r)=>{"use strict";var n,i=r(65606);t.exports=S,S.ReadableState=x,r(37007).EventEmitter;var o,s=function(t,e){return t.listeners(e).length},a=r(40345),u=r(48287).Buffer,f=r.g.Uint8Array||function(){},h=r(79838);o=h&&h.debuglog?h.debuglog("stream"):function(){};var c,l,p,d=r(80345),m=r(75896),y=r(65291).getHighWaterMark,_=r(86048).F,g=_.ERR_INVALID_ARG_TYPE,b=_.ERR_STREAM_PUSH_AFTER_EOF,v=_.ERR_METHOD_NOT_IMPLEMENTED,w=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(56698)(S,a);var k=m.errorOrDestroy,M=["error","close","destroy","pause","resume"];function x(t,e,i){n=n||r(25382),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=r(83141).I),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function S(t){if(n=n||r(25382),!(this instanceof S))return new S(t);var e=this instanceof n;this._readableState=new x(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function E(t,e,r,n,i){o("readableAddChunk",e);var s,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(o("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?R(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}}(t,a);else if(i||(s=function(t,e){var r,n;return n=e,u.isBuffer(n)||n instanceof f||"string"==typeof e||void 0===e||t.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],e)),r}(a,e)),s)k(t,s);else if(a.objectMode||e&&e.length>0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),n)a.endEmitted?k(t,new w):A(t,a,e,!0);else if(a.ended)k(t,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?A(t,a,e,!1):P(t,a)):A(t,a,e,!1)}else n||(a.reading=!1,P(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=B?t=B:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function R(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(I,t))}function I(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,O(t)}function P(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(T,t,e))}function T(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function F(t){o("readable nexttick read 0"),t.read(0)}function C(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),O(t),e.flowing&&!e.reading&&t.read(0)}function O(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function L(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function N(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(z,e,t))}function z(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function q(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):R(this),null;if(0===(t=D(t,e))&&e.ended)return 0===e.length&&N(this),null;var n,i=e.needReadable;return o("need readable",i),(0===e.length||e.length-t0?L(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(t){k(this,new v("_read()"))},S.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,e);var a=e&&!1===e.end||t===i.stdout||t===i.stderr?m:u;function u(){o("onend"),t.end()}n.endEmitted?i.nextTick(a):r.once("end",a),t.on("unpipe",(function e(i,s){o("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),t.removeListener("close",p),t.removeListener("finish",d),t.removeListener("drain",f),t.removeListener("error",l),t.removeListener("unpipe",e),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",c),h=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}));var f=function(t){return function(){var e=t._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,O(t))}}(r);t.on("drain",f);var h=!1;function c(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==q(n.pipes,t))&&!h&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function l(e){o("onerror",e),m(),t.removeListener("error",l),0===s(t,"error")&&k(t,e)}function p(){t.removeListener("finish",d),m()}function d(){o("onfinish"),t.removeListener("close",p),m()}function m(){o("unpipe"),r.unpipe(t)}return r.on("data",c),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",l),t.once("close",p),t.once("finish",d),t.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?R(this):n.reading||i.nextTick(F,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(U,this),r},S.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(U,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(C,t,e))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var s=0;s{"use strict";t.exports=h;var n=r(86048).F,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(25382);function f(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";var n,i=r(65606);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(undefined),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=S,S.WritableState=x;var s,a={deprecate:r(94643)},u=r(40345),f=r(48287).Buffer,h=r.g.Uint8Array||function(){},c=r(75896),l=r(65291).getHighWaterMark,p=r(86048).F,d=p.ERR_INVALID_ARG_TYPE,m=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,_=p.ERR_STREAM_CANNOT_PIPE,g=p.ERR_STREAM_DESTROYED,b=p.ERR_STREAM_NULL_VALUES,v=p.ERR_STREAM_WRITE_AFTER_END,w=p.ERR_UNKNOWN_ENCODING,k=c.errorOrDestroy;function M(){}function x(t,e,s){n=n||r(25382),t=t||{},"boolean"!=typeof s&&(s=e instanceof n),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=l(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new y;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,o){--e.pendingcb,r?(i.nextTick(o,n),i.nextTick(I,t,e),t._writableState.errorEmitted=!0,k(t,n)):(o(n),t._writableState.errorEmitted=!0,k(t,n),I(t,e))}(t,r,n,e,o);else{var s=D(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||B(t,r),n?i.nextTick(A,t,r,s,o):A(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function S(t){var e=this instanceof(n=n||r(25382));if(!e&&!s.call(S,this))return new S(t);this._writableState=new x(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),u.call(this)}function E(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new g("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function A(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),I(t,e)}function B(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,E(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,h=r.encoding,c=r.callback;if(E(t,e,!1,e.objectMode?1:f.length,f,h,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function D(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function R(t,e){t._final((function(r){e.pendingcb--,r&&k(t,r),e.prefinished=!0,t.emit("prefinish"),I(t,e)}))}function I(t,e){var r=D(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,i.nextTick(R,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(56698)(S,u),x.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(x.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===S&&t&&t._writableState instanceof x}})):s=function(t){return t instanceof this},S.prototype.pipe=function(){k(this,new _)},S.prototype.write=function(t,e,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=t,f.isBuffer(n)||n instanceof h);return a&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=M),o.ending?function(t,e){var r=new v;k(t,r),i.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new d("chunk",["string","Buffer"],r)),!o||(k(t,o),i.nextTick(n,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,r)),e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,e,r){r(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,I(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=c.destroy,S.prototype._undestroy=c.undestroy,S.prototype._destroy=function(t,e){e(t)}},2955:(t,e,r)=>{"use strict";var n,i=r(65606);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(86238),a=Symbol("lastResolve"),u=Symbol("lastReject"),f=Symbol("error"),h=Symbol("ended"),c=Symbol("lastPromise"),l=Symbol("handlePromise"),p=Symbol("stream");function d(t,e){return{value:t,done:e}}function m(t){var e=t[a];if(null!==e){var r=t[p].read();null!==r&&(t[c]=null,t[a]=null,t[u]=null,e(d(r,!1)))}}function y(t){i.nextTick(m,t)}var _=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((o(n={get stream(){return this[p]},next:function(){var t=this,e=this[f];if(null!==e)return Promise.reject(e);if(this[h])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[f]?r(t[f]):e(d(void 0,!0))}))}));var r,n=this[c];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[h]?r(d(void 0,!0)):e[l](r,n)}),n)}}(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(d(o,!1));r=new Promise(this[l])}return this[c]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var t=this;return new Promise((function(e,r){t[p].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),_);t.exports=function(t){var e,r=Object.create(g,(o(e={},p,{value:t,writable:!0}),o(e,a,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,f,{value:null,writable:!0}),o(e,h,{value:t._readableState.endEmitted,writable:!0}),o(e,l,{value:function(t,e){var n=r[p].read();n?(r[c]=null,r[a]=null,r[u]=null,t(d(n,!1))):(r[a]=t,r[u]=e)},writable:!0}),e));return r[c]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[u];return null!==e&&(r[c]=null,r[a]=null,r[u]=null,e(t)),void(r[f]=t)}var n=r[a];null!==n&&(r[c]=null,r[a]=null,r[u]=null,n(d(void 0,!0))),r[h]=!0})),t.on("readable",y.bind(null,r)),r}},80345:(t,e,r)=>{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e{"use strict";var n=r(65606);function i(t,e){s(t,e),o(t)}function o(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function s(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,t)):n.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e?(n.nextTick(o,r),e(t)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},86238:(t,e,r)=>{"use strict";var n=r(86048).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},57758:(t,e,r)=>{"use strict";var n,i=r(86048).F,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t){t()}function f(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),i=0;i0,(function(t){h||(h=t),t&&l.forEach(u),o||(l.forEach(u),c(h))}))}));return e.reduce(f)}},65291:(t,e,r)=>{"use strict";var n=r(86048).F.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},40345:(t,e,r)=>{t.exports=r(37007).EventEmitter},28399:(t,e,r)=>{(e=t.exports=r(45412)).Stream=e,e.Readable=e,e.Writable=r(16708),e.Duplex=r(25382),e.Transform=r(74610),e.PassThrough=r(63600),e.finished=r(86238),e.pipeline=r(57758)},66011:(t,e,r)=>{"use strict";var n=r(48287).Buffer,i=r(56698),o=r(4729),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],c=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(t,e){return t<>>32-e}function m(t,e,r,n,i,o,s,a){return d(t+(e^r^n)+o+s|0,a)+i|0}function y(t,e,r,n,i,o,s,a){return d(t+(e&r|~e&n)+o+s|0,a)+i|0}function _(t,e,r,n,i,o,s,a){return d(t+((e|~r)^n)+o+s|0,a)+i|0}function g(t,e,r,n,i,o,s,a){return d(t+(e&n|r&~n)+o+s|0,a)+i|0}function b(t,e,r,n,i,o,s,a){return d(t+(e^(r|~n))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,v=0|this._a,w=0|this._b,k=0|this._c,M=0|this._d,x=0|this._e,S=0;S<80;S+=1){var E,A;S<16?(E=m(r,n,i,o,p,t[a[S]],c[0],f[S]),A=b(v,w,k,M,x,t[u[S]],l[0],h[S])):S<32?(E=y(r,n,i,o,p,t[a[S]],c[1],f[S]),A=g(v,w,k,M,x,t[u[S]],l[1],h[S])):S<48?(E=_(r,n,i,o,p,t[a[S]],c[2],f[S]),A=_(v,w,k,M,x,t[u[S]],l[2],h[S])):S<64?(E=g(r,n,i,o,p,t[a[S]],c[3],f[S]),A=y(v,w,k,M,x,t[u[S]],l[3],h[S])):(E=b(r,n,i,o,p,t[a[S]],c[4],f[S]),A=m(v,w,k,M,x,t[u[S]],l[4],h[S])),r=p,p=o,o=d(i,10),i=n,n=E,v=x,x=M,M=d(k,10),k=w,w=A}var B=this._b+i+M|0;this._b=this._c+o+x|0,this._c=this._d+p+v|0,this._d=this._e+r+w|0,this._e=this._a+n+k|0,this._a=B},p.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=p},92861:(t,e,r)=>{var n=r(48287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},90392:(t,e,r)=>{var n=r(92861).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},62802:(t,e,r)=>{var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};n.sha=r(27816),n.sha1=r(63737),n.sha224=r(26710),n.sha256=r(24107),n.sha384=r(32827),n.sha512=r(82890)},27816:(t,e,r)=>{var n=r(56698),i=r(90392),o=r(92861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,c=0;c<16;++c)r[c]=t.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var l=0;l<80;++l){var p=~~(l/20),d=0|((e=n)<<5|e>>>27)+h(p,i,o,a)+u+r[l]+s[p];u=a,a=o,o=f(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},63737:(t,e,r)=>{var n=r(56698),i=r(90392),o=r(92861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<5|t>>>27}function h(t){return t<<30|t>>>2}function c(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=(e=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|e>>>31;for(var p=0;p<80;++p){var d=~~(p/20),m=f(n)+c(d,i,o,a)+u+r[p]+s[d]|0;u=a,a=o,o=h(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},26710:(t,e,r)=>{var n=r(56698),i=r(24107),o=r(90392),s=r(92861).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},24107:(t,e,r)=>{var n=r(56698),i=r(90392),o=r(92861).Buffer,s=[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],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t,e,r){return r^t&(e^r)}function h(t,e,r){return t&e|r&(t|e)}function c(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function p(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,d=0|this._f,m=0|this._g,y=0|this._h,_=0;_<16;++_)r[_]=t.readInt32BE(4*_);for(;_<64;++_)r[_]=0|(((e=r[_-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[_-7]+p(r[_-15])+r[_-16];for(var g=0;g<64;++g){var b=y+l(u)+f(u,d,m)+s[g]+r[g]|0,v=c(n)+h(n,i,o)|0;y=m,m=d,d=u,u=a+b|0,a=o,o=i,i=n,n=b+v|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=d+this._f|0,this._g=m+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},32827:(t,e,r)=>{var n=r(56698),i=r(82890),o=r(90392),s=r(92861).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},82890:(t,e,r)=>{var n=r(56698),i=r(90392),o=r(92861).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function f(t,e,r){return r^t&(e^r)}function h(t,e,r){return t&e|r&(t|e)}function c(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function _(t,e){return t>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,g=0|this._gh,b=0|this._hh,v=0|this._al,w=0|this._bl,k=0|this._cl,M=0|this._dl,x=0|this._el,S=0|this._fl,E=0|this._gl,A=0|this._hl,B=0;B<32;B+=2)e[B]=t.readInt32BE(4*B),e[B+1]=t.readInt32BE(4*B+4);for(;B<160;B+=2){var D=e[B-30],R=e[B-30+1],I=p(D,R),P=d(R,D),T=m(D=e[B-4],R=e[B-4+1]),U=y(R,D),F=e[B-14],C=e[B-14+1],O=e[B-32],L=e[B-32+1],N=P+C|0,z=I+F+_(N,P)|0;z=(z=z+T+_(N=N+U|0,U)|0)+O+_(N=N+L|0,L)|0,e[B]=z,e[B+1]=N}for(var q=0;q<160;q+=2){z=e[q],N=e[q+1];var j=h(r,n,i),K=h(v,w,k),Z=c(r,v),H=c(v,r),G=l(a,x),V=l(x,a),W=s[q],$=s[q+1],Y=f(a,u,g),X=f(x,S,E),J=A+V|0,Q=b+G+_(J,A)|0;Q=(Q=(Q=Q+Y+_(J=J+X|0,X)|0)+W+_(J=J+$|0,$)|0)+z+_(J=J+N|0,N)|0;var tt=H+K|0,et=Z+j+_(tt,H)|0;b=g,A=E,g=u,E=S,u=a,S=x,a=o+Q+_(x=M+J|0,M)|0,o=i,M=k,i=n,k=w,n=r,w=v,r=Q+et+_(v=J+tt|0,J)|0}this._al=this._al+v|0,this._bl=this._bl+w|0,this._cl=this._cl+k|0,this._dl=this._dl+M|0,this._el=this._el+x|0,this._fl=this._fl+S|0,this._gl=this._gl+E|0,this._hl=this._hl+A|0,this._ah=this._ah+r+_(this._al,v)|0,this._bh=this._bh+n+_(this._bl,w)|0,this._ch=this._ch+i+_(this._cl,k)|0,this._dh=this._dh+o+_(this._dl,M)|0,this._eh=this._eh+a+_(this._el,x)|0,this._fh=this._fh+u+_(this._fl,S)|0,this._gh=this._gh+g+_(this._gl,E)|0,this._hh=this._hh+b+_(this._hl,A)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},88310:(t,e,r)=>{t.exports=i;var n=r(37007).EventEmitter;function i(){n.call(this)}r(56698)(i,n),i.Readable=r(45412),i.Writable=r(16708),i.Duplex=r(25382),i.Transform=r(74610),i.PassThrough=r(63600),i.finished=r(86238),i.pipeline=r(57758),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(h(),0===n.listenerCount(this,"error"))throw t}function h(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",h),r.removeListener("close",h),t.removeListener("close",h)}return r.on("error",f),t.on("error",f),r.on("end",h),r.on("close",h),t.on("close",h),t.emit("pipe",r),t}},83141:(t,e,r)=>{"use strict";var n=r(15003).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=h,this.end=c,e=3;break;default:return this.write=l,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function f(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function h(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.I=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},15003:(t,e,r)=>{var n=r(48287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},83097:function(t,e,r){(function(){var t,n,i,o,s,a={}.hasOwnProperty;n=r(78689).BlockCipher,s=r(4748).scrub_vec,o=function(){function t(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=function(){var t,e;for(e=[],t=0;t<4;++t)e.push([]);return e}(),this.INV_SUB_MIX=function(){var t,e;for(e=[],t=0;t<4;++t)e.push([]);return e}(),this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}return t.prototype.init=function(){var t,e,r,n,i,o,s,a,u,f;for(t=function(){var t,r;for(r=[],e=t=0;t<256;e=++t)e<128?r.push(e<<1):r.push(e<<1^283);return r}(),i=0,u=0,e=f=0;f<256;e=++f)r=(r=u^u<<1^u<<2^u<<3^u<<4)>>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,a=t[s=t[o=t[i]]],n=257*t[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*a^65537*s^257*o^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=u=1:(i=o^t[t[t[a^o]]],u^=t[t[u]]);return!0},t}(),i=new o,t=function(t){function e(t){this._key=t.clone(),this._doReset()}return function(t,e){for(var r in e)a.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.blockSize=16,e.prototype.blockSize=e.blockSize,e.keySize=32,e.prototype.keySize=e.keySize,e.ivSize=e.blockSize,e.prototype.ivSize=e.ivSize,e.prototype._doReset=function(){var t,e,r,n,o,s,a,u;for(r=this._key.words,e=this._key.sigBytes/4,this._nRounds=e+6,o=4*(this._nRounds+1),this._keySchedule=[],n=a=0;0<=o?ao;n=0<=o?++a:--a)this._keySchedule[n]=n>>24,s=i.SBOX[s>>>24]<<24|i.SBOX[s>>>16&255]<<16|i.SBOX[s>>>8&255]<<8|i.SBOX[255&s],s^=i.RCON[n/e|0]<<24):e>6&&n%e==4&&(s=i.SBOX[s>>>24]<<24|i.SBOX[s>>>16&255]<<16|i.SBOX[s>>>8&255]<<8|i.SBOX[255&s]),this._keySchedule[n-e]^s);for(this._invKeySchedule=[],t=u=0;0<=o?uo;t=0<=o?++u:--u)n=o-t,s=this._keySchedule[n-(t%4?0:4)],this._invKeySchedule[t]=t<4||n<=4?s:i.INV_SUB_MIX[0][i.SBOX[s>>>24]]^i.INV_SUB_MIX[1][i.SBOX[s>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[s>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[255&s]];return!0},e.prototype.encryptBlock=function(t,e){return null==e&&(e=0),this._doCryptBlock(t,e,this._keySchedule,i.SUB_MIX,i.SBOX)},e.prototype.decryptBlock=function(t,e){var r,n;return null==e&&(e=0),r=[t[e+3],t[e+1]],t[e+1]=r[0],t[e+3]=r[1],this._doCryptBlock(t,e,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX),n=[t[e+3],t[e+1]],t[e+1]=n[0],t[e+3]=n[1],n},e.prototype.scrub=function(){return s(this._keySchedule),s(this._invKeySchedule),this._key.scrub()},e.prototype._doCryptBlock=function(t,e,r,n,i){var o,s,a,u,f,h,c,l,p,d,m;for(s=t[e]^r[0],a=t[e+1]^r[1],u=t[e+2]^r[2],f=t[e+3]^r[3],o=4,d=1,m=this._nRounds;1<=m?dm;1<=m?++d:--d)h=n[0][s>>>24]^n[1][a>>>16&255]^n[2][u>>>8&255]^n[3][255&f]^r[o++],c=n[0][a>>>24]^n[1][u>>>16&255]^n[2][f>>>8&255]^n[3][255&s]^r[o++],l=n[0][u>>>24]^n[1][f>>>16&255]^n[2][s>>>8&255]^n[3][255&a]^r[o++],p=n[0][f>>>24]^n[1][s>>>16&255]^n[2][a>>>8&255]^n[3][255&u]^r[o++],s=h,a=c,u=l,f=p;return h=(i[s>>>24]<<24|i[a>>>16&255]<<16|i[u>>>8&255]<<8|i[255&f])^r[o++],c=(i[a>>>24]<<24|i[u>>>16&255]<<16|i[f>>>8&255]<<8|i[255&s])^r[o++],l=(i[u>>>24]<<24|i[f>>>16&255]<<16|i[s>>>8&255]<<8|i[255&a])^r[o++],p=(i[f>>>24]<<24|i[s>>>16&255]<<16|i[a>>>8&255]<<8|i[255&u])^r[o++],t[e]=h,t[e+1]=c,t[e+2]=l,t[e+3]=p},e}(n),e.AES=t}).call(this)},78689:function(t,e,r){(function(){var t,n,i,o,s,a,u={}.hasOwnProperty;s=r(75411).WordArray,a=r(4748),i=function(t){function e(){e.__super__.constructor.call(this)}return function(t,e){for(var r in e)u.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.reset=function(){return e.__super__.reset.call(this),this._doReset(),this},e.prototype.update=function(t){return this._append(t),this._process(),this},e.prototype.finalize=function(t){return t&&this._append(t),this._doFinalize()},e.prototype.bufhash=function(t){var e,r,n;return r=s.from_buffer(t),e=(n=this.finalize(r)).to_buffer(),r.scrub(),n.scrub(),e},e}(n=function(){function t(){this.reset()}return t.prototype._minBufferSize=0,t.prototype.reset=function(){return this._data=new s,this._nDataBytes=0},t.prototype._append=function(t){return this._data.concat(t),this._nDataBytes+=t.sigBytes},t.prototype._process=function(t){var e,r,n,i,o,a,u,f,h,c;if(n=(e=this._data).words,i=(r=e.sigBytes)/(4*this.blockSize),a=(i=t?Math.ceil(i):Math.max((0|i)-this._minBufferSize,0))*this.blockSize,o=Math.min(4*a,r),a){for(u=h=0,c=this.blockSize;c>0?ha;u=h+=c)this._doProcessBlock(n,u);f=n.splice(0,a),e.sigBytes-=o}return new s(f,o)},t.prototype.copy_to=function(t){return t._data=this._data.clone(),t._nDataBytes=this._nDataBytes},t.prototype.clone=function(){var e;return e=new t,this.copy_to(e),e},t}()),e.BlockCipher=t=function(){function t(t){}return t.prototype.encryptBlock=function(t,e){},t}(),o=function(){function t(){}return t.prototype.encryptBlock=function(t,e){var r,n;return null==e&&(e=0),n=this.get_pad(),r=Math.min(t.words.length-e,this.bsiw),t.xor(n,{dst_offset:e,n_words:r}),n.scrub(),this.bsiw},t.prototype.encrypt=function(t){var e,r,n,i;for(e=r=0,n=t.words.length,i=this.bsiw;i>0?rn;e=r+=i)this.encryptBlock(t,e);return t},t.prototype.bulk_encrypt=function(t,e){var r,n,i,o,s,u;return n=t.input,i=t.progress_hook,s=t.what,o={update:(u=this,function(t,e){var r,i,o,s;for(s=[],r=i=t,o=u.bsiw;o>0?ie;r=i+=o)s.push(u.encryptBlock(n,r));return s}),finalize:function(){return n},default_n:1024*this.bsiw},r={progress_hook:i,cb:e,what:s},a.bulk(n.sigBytes,o,r)},t}(),e.BlockCipher=t,e.Hasher=i,e.BufferedBlockAlgorithm=n,e.StreamCipher=o}).call(this)},72659:function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c={}.hasOwnProperty,l=function(t,e){for(var r in e)c.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};h=r(42659),i=h.HMAC,f=h.bulk_sign,s=r(54234).SHA512,o=r(95766).KECCAK,a=r(75411).WordArray,n=function(t){function e(t,r){var n,a,u,f,h;null==r&&(r=[s,o]),h=t.split(r.length),this.hashers=function(){var t,e,o;for(o=[],a=t=0,e=r.length;te;0<=e?++t:--t)r.push(0);return r}()))}return t.prototype.WORD_MAX=4294967295,t.prototype.inc=function(){var e,r;for(e=!0,r=this._value.words.length-1;e&&r>=0;)++this._value.words[r]>t.WORD_MAX?this._value.words[r]=0:e=!1,r--;return this},t.prototype.inc_le=function(){var e,r;for(e=!0,r=0;e&&rt.WORD_MAX?this._value.words[r]=0:e=!1,r++;return this},t.prototype.get=function(){return this._value},t.prototype.copy=function(){return this._value.clone()},t}(),t=function(t){function e(t){if(this.block_cipher=t.block_cipher,this.iv=t.iv,e.__super__.constructor.call(this),this.bsiw=this.block_cipher.blockSize/4,this.iv.sigBytes!==this.block_cipher.blockSize)throw new Error("IV is wrong length ("+this.iv.sigBytes+")");this.ctr=new n({value:this.iv})}return function(t,e){for(var r in e)f.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.scrub=function(){return this.block_cipher.scrub()},e.prototype.get_pad=function(){var t;return t=this.ctr.copy(),this.ctr.inc(),this.block_cipher.encryptBlock(t.words),t},e}(i),a=function(e){var r,n,i,o,s;return r=e.block_cipher,o=e.iv,i=e.input,s=(n=new t({block_cipher:r,iv:o})).encrypt(i),n.scrub(),s},s=function(e,r){var n,i,o,s,a,f,h,c,l;c=u.findDeferral(arguments),n=e.block_cipher,s=e.iv,o=e.input,a=e.progress_hook,h=e.what,i=new t({block_cipher:n,iv:s}),l=new u.Deferrals((function(){return r(f)}),{parent:c,filename:"/Users/max/src/keybase/triplesec/src/ctr.iced"}),i.bulk_encrypt({input:o,progress_hook:a,what:h},l.defer({assign_fn:function(){return f=arguments[0]},lineno:121})),l._fulfill()},e.Counter=n,e.Cipher=t,e.encrypt=a,e.bulk_encrypt=s}).call(this)},9370:function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d={}.hasOwnProperty;c=r(41060),f=r(75411).WordArray,r(92272),t=r(83097).AES,a=r(15098).TwoFish,r(83069),i=r(72659).Concat,r(54234).SHA512,s=r(92272).Salsa20,n=(p=r(4622)).Base,u=p.V,l=r(30647).make_esc,o=function(e){function r(t){var e,n;n=t.key,e=t.enc,r.__super__.constructor.call(this,{key:n}),null!=e&&(this.key=e.key,this.derived_keys=e.derived_keys)}return function(t,e){for(var r in e)d.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype.read_header=function(t){var e;return t(null==(e=this.ct.unshift(2))?new Error("Ciphertext underrun in header"):null==(this.version=u[e.words[1]])?new Error("bad header; couldn't find a good version (got "+e.words[1]+")"):e.words[0]!==this.version.header[0]?new Error("Bad header: unrecognized magic value"):null)},r.prototype.verify_sig=function(t,e){var r,n,o,s,a,u;s=c.findDeferral(arguments),(u=this,function(e){if(null==(o=u.ct.unshift(i.get_output_size()/4)))return e(n=new Error("Ciphertext underrun in signature"));!function(e){a=new c.Deferrals(e,{parent:s,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.verify_sig"}),u.sign({input:u.ct,key:t,salt:u.salt},a.defer({assign_fn:function(){return n=arguments[0],r=arguments[1]},lineno:63})),a._fulfill()}((function(){return e(n=null!=n?n:o.equal(r)?null:new Error("Signature mismatch or bad decryption key"))}))})((function(){return e(n)}))},r.prototype.unshift_iv=function(t,e,r){var n;return r(null!=(n=this.ct.unshift(t/4))?null:new Error("Ciphertext underrun in "+e),n)},r.prototype.read_salt=function(t){return t(null==(this.salt=this.ct.unshift(this.version.salt_size/4))?new Error("Ciphertext underrrun in read_salt"):null)},r.prototype.generate_keys=function(t,e){var r,n,i,o,s,a;o=c.findDeferral(arguments),i=t.progress_hook,(a=this,function(t){s=new c.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.generate_keys"}),a.kdf({salt:a.salt,progress_hook:i},s.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:114})),s._fulfill()})((function(){return e(r,n)}))},r.prototype.run=function(e,r){var n,i,o,u,h,p,d,m;p=c.findDeferral(arguments),n=e.data,u=e.progress_hook,i=l(r,"Decryptor::run"),this.ct=f.from_buffer(n),(m=this,function(t){d=new c.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),m.read_header(i(d.defer({lineno:141}))),d._fulfill()})(function(e){return function(){d=new c.Deferrals((function(){var n;d=new c.Deferrals((function(){!function(t){d=new c.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.verify_sig(e.keys.hmac,i(d.defer({lineno:144}))),d._fulfill()}((function(){!function(r){d=new c.Deferrals(r,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.unshift_iv(t.ivSize,"AES",i(d.defer({assign_fn:function(){return o=arguments[0]},lineno:145}))),d._fulfill()}((function(){!function(t){d=new c.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.run_aes({iv:o,input:e.ct,key:e.keys.aes,progress_hook:u},i(d.defer({assign_fn:function(){return d.ret=arguments[0]},lineno:146}))),d._fulfill()}((function(){!function(t){if(!e.version.use_twofish)return t();!function(t){d=new c.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.unshift_iv(a.ivSize,"2fish",i(d.defer({assign_fn:function(){return o=arguments[0]},lineno:148}))),d._fulfill()}((function(){!function(t){d=new c.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.run_twofish({iv:o,input:e.ct,key:e.keys.twofish,progress_hook:u},i(d.defer({assign_fn:function(){return d.ret=arguments[0]},lineno:149}))),d._fulfill()}(t)}))}((function(){!function(t){d=new c.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.unshift_iv(s.ivSize,"Salsa",i(d.defer({assign_fn:function(){return o=arguments[0]},lineno:150}))),d._fulfill()}((function(){!function(t){d=new c.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.run_salsa20({iv:o,input:e.ct,key:e.keys.salsa20,output_iv:!1,progress_hook:u},i(d.defer({assign_fn:function(){return h=arguments[0]},lineno:151}))),d._fulfill()}((function(){return r(null,h.to_buffer())}))}))}))}))}))}))}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.generate_keys({progress_hook:u},i(d.defer({assign_fn:(n=e,function(){return n.keys=arguments[0]}),lineno:143}))),d._fulfill()}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.read_salt(i(d.defer({lineno:142}))),d._fulfill()}}(this))},r.prototype.clone=function(){var t,e;return(t=new r({key:null!=(e=this.key)?e.to_buffer():void 0,rng:this.rng,version:this.version})).derived_keys=this.clone_derived_keys(),t},r}(n),h=function(t,e){var r,n,i,s,a,u,f,h;f=c.findDeferral(arguments),s=t.key,r=t.data,a=t.progress_hook,n=new o({key:s}),h=new c.Deferrals((function(){return n.scrub(),e(i,u)}),{parent:f,filename:"/Users/max/src/keybase/triplesec/src/dec.iced"}),n.run({data:r,progress_hook:a},h.defer({assign_fn:function(){return i=arguments[0],u=arguments[1]},lineno:181})),h._fulfill()},e.Decryptor=o,e.decrypt=h}).call(this)},8801:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u;u=r(41060),a=r(42659),s=r(75411).WordArray,o=r(62132).Lock,i=function(){function t(t,e,r){this.hmac=r||a.sign,this.security_strength=256,t=this.check_entropy(t),e||(e=new s([])),this._instantiate(t,e)}return t.prototype.check_entropy=function(t,e){if(null==e&&(e=!1),8*t.sigBytes*2<(e?2:3)*this.security_strength)throw new Error("entropy must be at least "+1.5*this.security_strength+" bits.");return t},t.prototype._hmac=function(t,e){return this.hmac({key:t,input:e})},t.prototype._update=function(t){var e,r;return e=new s([0],1),null!=t&&(e=e.concat(t)),r=this.V.clone().concat(e),this.K=this._hmac(this.K,r),r.scrub(),e.scrub(),this.V=this._hmac(this.K,this.V),null!=t&&(r=this.V.clone().concat(new s([1<<24],1)).concat(t),this.K=this._hmac(this.K,r),r.scrub(),this.V=this._hmac(this.K,this.V)),null!=t?t.scrub():void 0},t.prototype._instantiate=function(t,e){var r;return r=t.concat(e),this.K=s.from_buffer(n.from(function(){var t,e;for(e=[],t=0;t<64;++t)e.push(0);return e}())),this.V=s.from_buffer(n.from(function(){var t,e;for(e=[],t=0;t<64;++t)e.push(1);return e}())),this._update(r),t.scrub(),this.reseed_counter=1},t.prototype.reseed=function(t){return this._update(this.check_entropy(t,!0)),this.reseed_counter=1},t.prototype.generate=function(t){var e,r;if(8*t>7500)throw new Error("generate cannot generate > 7500 bits in 1 call.");if(this.reseed_counter>=1e4)throw new Error("Need a reseed!");for(e=[];0===e.length||e.length*e[0].length*4100))return t();!function(t){s=new u.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/triplesec/src/drbg.iced",funcname:"ADRBG.generate"}),a.gen_seed(256,s.defer({assign_fn:function(){return n=arguments[0]},lineno:150})),s._fulfill()}((function(){return t(a.drbg.reseed(n))}))}((function(){return r=a.drbg.generate(t),a.lock.release(),e(r)}))}))}}(this))},t}(),e.DRBG=i,e.ADRBG=t}).call(this)},4622:function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x={}.hasOwnProperty;g=r(41060),d=r(75411).WordArray,w=r(92272),t=r(83097).AES,l=r(15098).TwoFish,y=r(83069),m=(M=r(72659)).XOR,i=M.Concat,h=r(54234).SHA512,f=r(35282).SHA3STD,a=r(95766).KECCAK,u=r(57753).PBKDF2,c=r(85123).Scrypt,k=r(4748),v=r(52361),b=r(30647).make_esc,s=r(42659).HMAC_SHA256,p={1:{header:[479516638,1],salt_size:8,xsalsa20_rev:!0,kdf:{klass:u,opts:{c:1024,klass:m}},use_twofish:!0,hmac_hashes:[h,a],hmac_key_size:96,version:1},2:{header:[479516638,2],salt_size:16,xsalsa20_rev:!0,kdf:{klass:c,opts:{c:64,klass:m,N:12,r:8,p:1}},use_twofish:!0,hmac_hashes:[h,a],hmac_key_size:96,version:2},3:{header:[479516638,3],salt_size:16,xsalsa20_rev:!1,kdf:{klass:c,opts:{c:1,klass:s,N:15,r:8,p:1}},use_twofish:!0,hmac_hashes:[h,a],hmac_key_size:96,version:3},4:{header:[479516638,4],salt_size:16,xsalsa20_rev:!1,kdf:{klass:c,opts:{c:1,klass:s,N:15,r:8,p:1}},hmac_key_size:96,use_twofish:!1,hmac_hashes:[h,f],version:4}},e.CURRENT_VERSION=4,n=function(){function e(t){var e,r;if(e=t.key,r=t.version,this.version=p[null!=r?r:4],null==this.version)throw new Error("unknown version: "+r);this.set_key(e),this.derived_keys={}}return e.prototype.kdf=function(e,r){var n,i,o,s,a,u,f,h,c,p,m,y,_,b,v,k,M,x;k=g.findDeferral(arguments),_=e.salt,s=e.extra_keymaterial,m=e.progress_hook,(x=this,function(t){M=new g.Deferrals(t,{parent:k,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.kdf"}),x._check_scrubbed(x.key,"in KDF",r,M.defer({lineno:121})),M._fulfill()})(function(e){return function(){b=_.to_hex(),f=e.key.clone(),M=new g.Deferrals((function(){!function(r){if(null!=(h=e.derived_keys[b]))return r();for(u in e._kdf=new e.version.kdf.klass(e.version.kdf.opts),c={hmac:e.version.hmac_key_size,aes:t.keySize,salsa20:w.Salsa20.keySize},e.version.use_twofish&&(c.twofish=l.keySize),p=e.version.use_twofish?["hmac","aes","twofish","salsa20"]:["hmac","aes","salsa20"],i=s||0,c)v=c[u],i+=v;n={dkLen:i,key:f,progress_hook:m,salt:_},function(t){M=new g.Deferrals(t,{parent:k,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.kdf"}),e._kdf.run(n,M.defer({assign_fn:function(){return y=arguments[0]},lineno:152})),M._fulfill()}((function(){var t,n;for(h={},a=0,t=0,n=p.length;tthis.hasherBlockSizeBytes&&(this.key=this.hasher.finalize(this.key)),this.key.clamp(),this._oKey=this.key.clone(),this._iKey=this.key.clone(),r=n=0,o=this.hasherBlockSize;0<=o?no;r=0<=o?++n:--n)this._oKey.words[r]^=1549556828,this._iKey.words[r]^=909522486;this._oKey.sigBytes=this._iKey.sigBytes=this.hasherBlockSizeBytes,this.reset()}return t.outputSize=64,t.prototype.outputSize=t.outputSize,t.prototype.get_output_size=function(){return this.hasher.output_size},t.prototype.reset=function(){return this.hasher.reset().update(this._iKey)},t.prototype.update=function(t){return this.hasher.update(t),this},t.prototype.finalize=function(t){var e,r,n;return e=this.hasher.finalize(t),this.hasher.reset(),r=this._oKey.clone().concat(e),n=this.hasher.finalize(r),e.scrub(),r.scrub(),n},t.prototype.scrub=function(){return this.key.scrub(),this._iKey.scrub(),this._oKey.scrub()},t}(),a=function(e){var r,n,i,o,s;return o=e.key,i=e.input,n=e.hash_class,s=(r=new t(o,n)).finalize(i.clamp()),r.scrub(),s},o=function(e,r){var n,i,o,a,f,h,c,l,p,d,m;d=s.findDeferral(arguments),a=e.key,o=e.input,h=e.progress_hook,f=e.klass,p=e.what,n=e.combine_klasses,f||(f=t),p||(p="hmac_sha512"),i=new f(a,n),o.clamp(),l={update:function(t,e){return i.update(o.slice(t,e))},finalize:function(){return i.finalize()},default_n:1e3*i.hasherBlockSize},m=new s.Deferrals((function(){return i.scrub(),r(c)}),{parent:d,filename:"/Users/max/src/keybase/triplesec/src/hmac.iced"}),u.bulk(o.sigBytes,l,{what:p,progress_hook:h,cb:m.defer({assign_fn:function(){return c=arguments[0]},lineno:137})}),m._fulfill()},e.HMAC_SHA256=function(t){function e(t){e.__super__.constructor.call(this,t,n)}return function(t,e){for(var r in e)f.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e}(t),e.HMAC=t,e.sign=a,e.bulk_sign=o}).call(this)},95766:function(t,e,r){(function(){var t,n,i,o,s,a,u,f={}.hasOwnProperty;u=r(75411),o=u.WordArray,s=u.X64Word,u.X64WordArray,n=r(78689).Hasher,t=function(){function t(){this.RHO_OFFSETS=[],this.PI_INDEXES=[],this.ROUND_CONSTANTS=[],this.T=[],this.compute_rho_offsets(),this.compute_pi_indexes(),this.compute_round_constants(),this.make_reusables()}return t.prototype.compute_rho_offsets=function(){var t,e,r,n,i,o;for(r=1,n=0,o=[],e=i=0;i<24;e=++i)this.RHO_OFFSETS[r+5*n]=(e+1)*(e+2)/2%64,t=(2*r+3*n)%5,r=n%5,o.push(n=t);return o},t.prototype.compute_pi_indexes=function(){var t,e,r,n;for(n=[],t=r=0;r<5;t=++r)n.push(function(){var r,n;for(n=[],e=r=0;r<5;e=++r)n.push(this.PI_INDEXES[t+5*e]=e+(2*t+3*e)%5*5);return n}.call(this));return n},t.prototype.compute_round_constants=function(){var t,e,r,n,i,o,a,u,f;for(t=1,f=[],r=a=0;a<24;r=++a){for(o=0,i=0,n=u=0;u<7;n=++u)1&t&&((e=(1<w;y=0<=w?++I:--I)n=16711935&((n=t[e+2*y])<<8|n>>>24)|4278255360&(n<<24|n>>>8),i=16711935&((i=t[e+2*y+1])<<8|i>>>24)|4278255360&(i<<24|i>>>8),(_=S[y]).high^=i,_.low^=n;for(z=[],M=P=0;P<24;M=++P){for(D=T=0;T<5;D=++T){for(B=A=0,R=U=0;U<5;R=++U)B^=(_=S[D+5*R]).high,A^=_.low;(f=r.T[D]).high=B,f.low=A}for(D=F=0;F<5;D=++F)for(m=r.T[(D+4)%5],p=(h=r.T[(D+1)%5]).high,l=h.low,B=m.high^(p<<1|l>>>31),A=m.low^(l<<1|p>>>31),R=C=0;C<5;R=++C)(_=S[D+5*R]).high^=B,_.low^=A;for(g=O=1;O<25;g=++O)v=(_=S[g]).high,b=_.low,(k=r.RHO_OFFSETS[g])<32?(B=v<>>32-k,A=b<>>32-k):(B=b<>>64-k,A=v<>>64-k),(u=r.T[r.PI_INDEXES[g]]).high=B,u.low=A;for(o=r.T[0],E=S[0],o.high=E.high,o.low=E.low,D=L=0;L<5;D=++L)for(R=N=0;N<5;R=++N)_=S[g=D+5*R],s=r.T[g],c=r.T[(D+1)%5+5*R],d=r.T[(D+2)%5+5*R],_.high=s.high^~c.high&d.high,_.low=s.low^~c.low&d.low;_=S[0],x=r.ROUND_CONSTANTS[M],_.high^=x.high,z.push(_.low^=x.low)}return z},e.prototype._doFinalize=function(){var t,e,r,n,i,s,a,u,f,h,c,l,p;for(r=(e=this._data).words,this._nDataBytes,f=8*e.sigBytes,t=32*this.blockSize,r[f>>>5]|=this.pad<<24-f%32,r[(Math.ceil((f+1)/t)*t>>>5)-1]|=128,e.sigBytes=4*r.length,this._process(),l=this._state,c=(h=this.outputLength/8)/8,n=[],i=p=0;0<=c?pc;i=0<=c?++p:--p)u=16711935&((u=(s=l[i]).high)<<8|u>>>24)|4278255360&(u<<24|u>>>8),a=16711935&((a=s.low)<<8|a>>>24)|4278255360&(a<<24|a>>>8),n.push(a),n.push(u);return new o(n,h)},e.prototype.copy_to=function(t){var r;return e.__super__.copy_to.call(this,t),t._state=function(){var t,e,n,i;for(i=[],t=0,e=(n=this._state).length;t>>24)|4278255360&(x<<24|x>>>8);return o=this._hash.words,a=e[r+0],u=e[r+1],y=e[r+2],_=e[r+3],g=e[r+4],b=e[r+5],v=e[r+6],w=e[r+7],k=e[r+8],M=e[r+9],h=e[r+10],c=e[r+11],l=e[r+12],p=e[r+13],d=e[r+14],m=e[r+15],S=o[0],E=o[1],A=o[2],B=o[3],S=t(S,E,A,B,a,7,f.T[0]),B=t(B,S,E,A,u,12,f.T[1]),A=t(A,B,S,E,y,17,f.T[2]),E=t(E,A,B,S,_,22,f.T[3]),S=t(S,E,A,B,g,7,f.T[4]),B=t(B,S,E,A,b,12,f.T[5]),A=t(A,B,S,E,v,17,f.T[6]),E=t(E,A,B,S,w,22,f.T[7]),S=t(S,E,A,B,k,7,f.T[8]),B=t(B,S,E,A,M,12,f.T[9]),A=t(A,B,S,E,h,17,f.T[10]),E=t(E,A,B,S,c,22,f.T[11]),S=t(S,E,A,B,l,7,f.T[12]),B=t(B,S,E,A,p,12,f.T[13]),A=t(A,B,S,E,d,17,f.T[14]),E=t(E,A,B,S,m,22,f.T[15]),S=n(S,E,A,B,u,5,f.T[16]),B=n(B,S,E,A,v,9,f.T[17]),A=n(A,B,S,E,c,14,f.T[18]),E=n(E,A,B,S,a,20,f.T[19]),S=n(S,E,A,B,b,5,f.T[20]),B=n(B,S,E,A,h,9,f.T[21]),A=n(A,B,S,E,m,14,f.T[22]),E=n(E,A,B,S,g,20,f.T[23]),S=n(S,E,A,B,M,5,f.T[24]),B=n(B,S,E,A,d,9,f.T[25]),A=n(A,B,S,E,_,14,f.T[26]),E=n(E,A,B,S,k,20,f.T[27]),S=n(S,E,A,B,p,5,f.T[28]),B=n(B,S,E,A,y,9,f.T[29]),A=n(A,B,S,E,w,14,f.T[30]),E=n(E,A,B,S,l,20,f.T[31]),S=i(S,E,A,B,b,4,f.T[32]),B=i(B,S,E,A,k,11,f.T[33]),A=i(A,B,S,E,c,16,f.T[34]),E=i(E,A,B,S,d,23,f.T[35]),S=i(S,E,A,B,u,4,f.T[36]),B=i(B,S,E,A,g,11,f.T[37]),A=i(A,B,S,E,w,16,f.T[38]),E=i(E,A,B,S,h,23,f.T[39]),S=i(S,E,A,B,p,4,f.T[40]),B=i(B,S,E,A,a,11,f.T[41]),A=i(A,B,S,E,_,16,f.T[42]),E=i(E,A,B,S,v,23,f.T[43]),S=i(S,E,A,B,M,4,f.T[44]),B=i(B,S,E,A,l,11,f.T[45]),A=i(A,B,S,E,m,16,f.T[46]),E=i(E,A,B,S,y,23,f.T[47]),S=s(S,E,A,B,a,6,f.T[48]),B=s(B,S,E,A,w,10,f.T[49]),A=s(A,B,S,E,d,15,f.T[50]),E=s(E,A,B,S,b,21,f.T[51]),S=s(S,E,A,B,l,6,f.T[52]),B=s(B,S,E,A,_,10,f.T[53]),A=s(A,B,S,E,h,15,f.T[54]),E=s(E,A,B,S,u,21,f.T[55]),S=s(S,E,A,B,k,6,f.T[56]),B=s(B,S,E,A,m,10,f.T[57]),A=s(A,B,S,E,v,15,f.T[58]),E=s(E,A,B,S,p,21,f.T[59]),S=s(S,E,A,B,g,6,f.T[60]),B=s(B,S,E,A,c,10,f.T[61]),A=s(A,B,S,E,y,15,f.T[62]),E=s(E,A,B,S,M,21,f.T[63]),o[0]=o[0]+S|0,o[1]=o[1]+E|0,o[2]=o[2]+A|0,o[3]=o[3]+B|0},r.prototype._doFinalize=function(){var t,e,r,n,i,o,s,a,u,f,h;for(n=(r=this._data).words,a=8*this._nDataBytes,n[(s=8*r.sigBytes)>>>5]|=128<<24-s%32,u=Math.floor(a/4294967296),f=a,n[15+(s+64>>>9<<4)]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),n[14+(s+64>>>9<<4)]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),r.sigBytes=4*(n.length+1),this._process(),t=(i=this._hash).words,o=h=0;h<4;o=++h)e=t[o],t[o]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return i},r.prototype.copy_to=function(t){return r.__super__.copy_to.call(this,t),t._hash=this._hash.clone()},r.prototype.clone=function(){var t;return t=new r,this.copy_to(t),t},r}(o),t=function(t,e,r,n,i,o,s){var a;return((a=t+(e&r|~e&n)+i+s)<>>32-o)+e},n=function(t,e,r,n,i,o,s){var a;return((a=t+(e&n|r&~n)+i+s)<>>32-o)+e},i=function(t,e,r,n,i,o,s){var a;return((a=t+(e^r^n)+i+s)<>>32-o)+e},s=function(t,e,r,n,i,o,s){var a;return((a=t+(r^(e|~n))+i+s)<>>32-o)+e},e.transform=function(t){var e;return e=(new a).finalize(t),t.scrub(),e}}).call(this)},57753:function(t,e,r){(function(){var t,n,i,o,s,a;o=r(41060),t=r(42659).HMAC,i=r(75411).WordArray,a=r(4748),n=function(){function e(e){this.klass=e.klass,this.c=e.c,this.c||(this.c=1024),this.klass||(this.klass=t)}return e.prototype._PRF=function(t){return this.prf.reset(),this.prf.finalize(t)},e.prototype._gen_T_i=function(t,e){var r,n,s,u,f,h,c,l,p,d;l=o.findDeferral(arguments),f=t.salt,n=t.i,(s=t.progress_hook)(0),h=f.clone().concat(new i([n])),r=this._PRF(h),u=r.clone(),n=1,(d=this,function(t){var e;e=function(t){var i,f;if(i=t,f=function(){return o.trampoline((function(){return e(t)}))},!(n1,r=function(e){var n;if(n=function(){return o.trampoline((function(){return _?a+=1:a-=1,r(e)}))},!0===_&&a>f||!1===_&&a>>24)|4278255360&(i<<24|i>>>8);for(n=this._hash.words,w=t._hl.words,k=t._hr.words,B=t._zl.words,D=t._zr.words,S=t._sl.words,E=t._sr.words,l=o=n[0],d=p=n[1],y=m=n[2],g=_=n[3],v=b=n[4],M=I=0;I<80;M=++I)A=o+e[r+B[M]]|0,A+=M<16?s(p,m,_)+w[0]:M<32?a(p,m,_)+w[1]:M<48?u(p,m,_)+w[2]:M<64?f(p,m,_)+w[3]:h(p,m,_)+w[4],A=(A=c(A|=0,S[M]))+b|0,o=b,b=_,_=c(m,10),m=p,p=A,A=l+e[r+D[M]]|0,A+=M<16?h(d,y,g)+k[0]:M<32?f(d,y,g)+k[1]:M<48?u(d,y,g)+k[2]:M<64?a(d,y,g)+k[3]:s(d,y,g)+k[4],A=(A=c(A|=0,E[M]))+v|0,l=v,v=g,g=c(y,10),y=d,d=A;return A=n[1]+m+g|0,n[1]=n[2]+_+v|0,n[2]=n[3]+b+l|0,n[3]=n[4]+o+d|0,n[4]=n[0]+p+y|0,n[0]=A},r.prototype._doFinalize=function(){var t,e,r,n,i,o,s,a,u;for(n=(r=this._data).words,a=8*this._nDataBytes,n[(s=8*r.sigBytes)>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r.sigBytes=4*(n.length+1),this._process(),t=(i=this._hash).words,o=u=0;u<5;o=++u)e=t[o],t[o]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return i},r.prototype.scrub=function(){return this._hash.scrub()},r.prototype.copy_to=function(t){return r.__super__.copy_to.call(this,t),t._hash=this._hash.clone()},r.prototype.clone=function(){var t;return t=new r,this.copy_to(t),t},r}(n),s=function(t,e,r){return t^e^r},a=function(t,e,r){return t&e|~t&r},u=function(t,e,r){return(t|~e)^r},f=function(t,e,r){return t&r|e&~r},h=function(t,e,r){return t^(e|~r)},c=function(t,e){return t<>>32-e},l=function(t){var e;return e=(new i).finalize(t),t.scrub(),e},e.RIPEMD160=i,e.transform=l}).call(this)},92272:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a,u,f,h,c,l,p,d,m,y={}.hasOwnProperty,_=function(t,e){for(var r in e)y.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};p=r(41060),m=r(75411),c=m.endian_reverse,f=m.WordArray,i=r(83069).Counter,l=r(4748).fixup_uint32,u=r(78689).StreamCipher,d=r(4748),h=function(t,e){var r,n,i,o;for(n=i=0,o=e.length;i>>25)+r|0)<<9|e>>>23)+l|0)<<13|e>>>19)+y|0)<<18|e>>>14,p^=(e=(n^=(e=(a^=(e=(_^=(e=p+n|0)<<7|e>>>25)+p|0)<<9|e>>>23)+_|0)<<13|e>>>19)+a|0)<<18|e>>>14,i^=(e=(d^=(e=(h^=(e=(u^=(e=i+d|0)<<7|e>>>25)+i|0)<<9|e>>>23)+u|0)<<13|e>>>19)+h|0)<<18|e>>>14,f^=(e=(o^=(e=(m^=(e=(c^=(e=f+o|0)<<7|e>>>25)+f|0)<<9|e>>>23)+c|0)<<13|e>>>19)+m|0)<<18|e>>>14,r^=(e=(c^=(e=(h^=(e=(n^=(e=r+c|0)<<7|e>>>25)+r|0)<<9|e>>>23)+n|0)<<13|e>>>19)+h|0)<<18|e>>>14,p^=(e=(l^=(e=(m^=(e=(d^=(e=p+l|0)<<7|e>>>25)+p|0)<<9|e>>>23)+d|0)<<13|e>>>19)+m|0)<<18|e>>>14,i^=(e=(_^=(e=(y^=(e=(o^=(e=i+_|0)<<7|e>>>25)+i|0)<<9|e>>>23)+o|0)<<13|e>>>19)+y|0)<<18|e>>>14,f^=(e=(u^=(e=(a^=(e=(s^=(e=f+u|0)<<7|e>>>25)+f|0)<<9|e>>>23)+s|0)<<13|e>>>19)+a|0)<<18|e>>>14;return[r,n,h,c,l,p,d,m,y,_,i,o,s,a,u,f]},t}()),e.Salsa20WordStream=a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return _(e,t),e.prototype._reset=function(){return e.__super__._reset.call(this)},e.prototype.getWordArray=function(t){var e,r,n,i,o,s,a,u;for(null==t||t===this.blockSize?o=this._generateBlock():(n=Math.ceil(t/this.blockSize),e=function(){var t,e;for(e=[],r=t=0;0<=n?tn;r=0<=n?++t:--t)e.push(this._generateBlock());return e}.call(this),o=(u=[]).concat.apply(u,e)),r=s=0,a=o.length;s0;)this._i===e&&(this._generateBlockBuffer(),this._i=0),r=Math.min(t,e-this._i),i.push(r===e?this._buf:this._buf.slice(this._i,this._i+r)),this._i+=r,t-=r;return n.concat(i)},e.prototype._generateBlockBuffer=function(){var t,e,r,i,o;for(this._buf=n.alloc(this.blockSize),e=i=0,o=(r=this._generateBlock()).length;io;n=0<=o?++i:--i)a(r,t,n,1),this.salsa20_8(r),s(e,r,n,0,1);for(n=0;n(n=4294967295)?new Error("asked for too much data"):this.r*this.p>=1<<30?new Error("r & p are too big"):(this.r>n/128/this.p||this.r>n/256||this.N>n/128/this.r)&&new Error("N is too big"),s=new Int32Array(64*this.r),i=new Int32Array(32*this.r*this.N),h=function(t){return t.what+=" (pass 1)","function"==typeof d?d(t):void 0},(w=this,function(t){g=new c.Deferrals(t,{parent:_,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),w.pbkdf2({key:f.clone(),salt:y,dkLen:128*w.r*w.p,c:w.c0,progress_hook:h},g.defer({assign_fn:function(){return r=arguments[0]},lineno:214})),g._fulfill()})(function(t){return function(){var n;r=new Int32Array(r.words),m(r),h=function(e){return function(r){return"function"==typeof d?d({i:r+e*t.N*2,what:"scrypt",total:t.p*t.N*2}):void 0}},u=0,b=t.p,v=b>0,(n=function(e){var o,a;if(o=e,a=function(){return c.trampoline((function(){return v?u+=1:u-=1,n(e)}))},!0===v&&u>=t.p||!1===v&&u<=t.p)return o();!function(e){g=new c.Deferrals(e,{parent:_,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),t.smix({B:r.subarray(32*t.r*u),V:i,XY:s,progress_hook:h(u)},g.defer({lineno:221})),g._fulfill()}(a)})((function(){m(r),h=function(t){return t.what+=" (pass 2)","function"==typeof d?d(t):void 0},g=new c.Deferrals((function(){return p(s),p(i),p(r),f.scrub(),e(l)}),{parent:_,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),t.pbkdf2({key:f,salt:o.from_i32a(r),dkLen:a,c:t.c1,progress_hook:h},g.defer({assign_fn:function(){return l=arguments[0]},lineno:229})),g._fulfill()}))}}(this))},e}(),d=function(t,e){var r,n,o,s,a,u,f,h,l,p,d,m,y,_,g;_=c.findDeferral(arguments),f=t.key,m=t.salt,d=t.r,r=t.N,l=t.p,o=t.c0,s=t.c1,n=t.c,h=t.klass,p=t.progress_hook,a=t.dkLen,u=new i({r:d,N:r,p:l,c:n,c0:o,c1:s,klass:h}),g=new c.Deferrals((function(){return e(y)}),{parent:_,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced"}),u.run({key:f,salt:m,progress_hook:p,dkLen:a},g.defer({assign_fn:function(){return y=arguments[0]},lineno:259})),g._fulfill()},e.Scrypt=i,e.scrypt=d,e.v_endian_reverse=m}).call(this)},78249:function(t,e,r){(function(){var t,n,i,o,s,a={}.hasOwnProperty;o=r(75411).WordArray,t=r(78689).Hasher,i=[],n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)a.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.blockSize=16,e.prototype.blockSize=e.blockSize,e.output_size=20,e.prototype.output_size=e.output_size,e.prototype._doReset=function(){return this._hash=new o([1732584193,4023233417,2562383102,271733878,3285377520])},e.prototype._doProcessBlock=function(t,e){var r,n,o,s,a,u,f,h,c,l;for(n=(r=this._hash.words)[0],o=r[1],s=r[2],a=r[3],u=r[4],f=l=0;l<80;f=++l)f<16?i[f]=0|t[e+f]:(h=i[f-3]^i[f-8]^i[f-14]^i[f-16],i[f]=h<<1|h>>>31),c=(n<<5|n>>>27)+u+i[f],c+=f<20?1518500249+(o&s|~o&a):f<40?1859775393+(o^s^a):f<60?(o&s|o&a|s&a)-1894007588:(o^s^a)-899497514,u=a,a=s,s=o<<30|o>>>2,o=n,n=c;return r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+u|0},e.prototype._doFinalize=function(){var t,e,r,n;return e=(t=this._data).words,n=8*this._nDataBytes,e[(r=8*t.sigBytes)>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},e.prototype.copy_to=function(t){return e.__super__.copy_to.call(this,t),t._hash=this._hash.clone()},e.prototype.clone=function(){var t;return t=new e,this.copy_to(t),t},e}(t),s=s=function(t){var e;return e=(new n).finalize(t),t.scrub(),e},e.SHA1=n,e.transform=s}).call(this)},55526:function(t,e,r){(function(){var t,n,i,o,s={}.hasOwnProperty;i=r(75411).WordArray,n=r(39995).SHA256,t=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)s.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.output_size=28,e.prototype.output_size=e.output_size,e.prototype._doReset=function(){return this._hash=new i([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},e.prototype._doFinalize=function(){var t;return(t=e.__super__._doFinalize.call(this)).sigBytes-=4,t},e.prototype.clone=function(){var t;return t=new e,this.copy_to(t),t},e}(n),o=function(e){var r;return r=(new t).finalize(e),e.scrub(),r},e.SHA224=t,e.transform=o}).call(this)},39995:function(t,e,r){(function(){var t,n,i,o,s,a,u={}.hasOwnProperty;o=r(75411).WordArray,n=r(78689).Hasher,t=function(){function t(){this.H=[],this.K=[],this.W=[],this.init()}return t.prototype.isPrime=function(t){var e,r,n;if(2===t||3===t||5===t||7===t)return!0;if(1===t||4===t||6===t||8===t||9===t)return!1;for(r=Math.ceil(Math.sqrt(t)),e=n=2;2<=r?n<=r:n>=r;e=2<=r?++n:--n)if(t%e==0)return!1;return!0},t.prototype.getFractionalBits=function(t){return 4294967296*(t-(0|t))|0},t.prototype.init=function(){var t,e,r;for(t=2,e=0,r=[];e<64;)this.isPrime(t)&&(e<8&&(this.H[e]=this.getFractionalBits(Math.pow(t,.5))),this.K[e]=this.getFractionalBits(Math.pow(t,1/3)),e++),r.push(t++);return r},t}(),s=new t,i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)u.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.blockSize=16,e.prototype.blockSize=e.blockSize,e.output_size=32,e.prototype.output_size=e.output_size,e.prototype._doReset=function(){return this._hash=new o(s.H.slice(0))},e.prototype.get_output_size=function(){return this.output_size},e.prototype._doProcessBlock=function(t,e){var r,n,i,o,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k;for(r=this._hash.words,i=s.W,n=s.K,o=r[0],a=r[1],u=r[2],f=r[3],h=r[4],c=r[5],l=r[6],_=r[7],g=k=0;k<64;g=++k)g<16?i[g]=0|t[e+g]:(p=((d=i[g-15])<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,m=((y=i[g-2])<<15|y>>>17)^(y<<13|y>>>19)^y>>>10,i[g]=p+i[g-7]+m+i[g-16]),b=o&a^o&u^a&u,v=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),w=_+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&c^~h&l)+n[g]+i[g],_=l,l=c,c=h,h=f+w|0,f=u,u=a,a=o,o=w+(v+b)|0;return r[0]=r[0]+o|0,r[1]=r[1]+a|0,r[2]=r[2]+u|0,r[3]=r[3]+f|0,r[4]=r[4]+h|0,r[5]=r[5]+c|0,r[6]=r[6]+l|0,r[7]=r[7]+_|0},e.prototype._doFinalize=function(){var t,e,r,n;return e=(t=this._data).words,n=8*this._nDataBytes,e[(r=8*t.sigBytes)>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},e.prototype.scrub=function(){return this._hash.scrub()},e.prototype.copy_to=function(t){return e.__super__.copy_to.call(this,t),t._hash=this._hash.clone()},e.prototype.clone=function(){var t;return t=new e,this.copy_to(t),t},e}(n),a=function(t){var e;return e=(new i).finalize(t),t.scrub(),e},e.SHA256=i,e.transform=a}).call(this)},34759:function(t,e,r){(function(){var t;t=r(95766),e.SHA3=t.KECCAK,e.transform=t.transform}).call(this)},3915:function(t,e,r){(function(){var t,n,i,o,s,a,u,f={}.hasOwnProperty;a=r(75411),o=a.X64WordArray,a.WordArray,i=(u=r(54234)).SHA512,t=u.Global,n=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)f.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.output_size=48,r.prototype.output_size=r.output_size,r.prototype._doReset=function(){return this._hash=new o(t.convert([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]))},r.prototype._doFinalize=function(){var t;return(t=r.__super__._doFinalize.call(this)).sigBytes-=16,t},r.prototype.clone=function(){var t;return t=new r,this.copy_to(t),t},r}(i),s=function(t){var e;return e=(new n).finalize(t),t.scrub(),e},e.SHA384=n,e.transform=s}).call(this)},35282:function(t,e,r){(function(){var t,n,i,o={}.hasOwnProperty;r(75411).WordArray,r(78689).Hasher,t=r(95766).KECCAK,n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)o.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.pad=6,e}(t),i=function(t){var e;return e=(new n).finalize(t),t.scrub(),e},e.SHA3STD=n,e.transform=i}).call(this)},54234:function(t,e,r){(function(){var t,n,i,o,s,a,u,f={}.hasOwnProperty;u=r(75411),o=u.X64Word,s=u.X64WordArray,n=r(78689).Hasher,t=function(){function t(){this.K=this.convert([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]),this.I=new s(this.convert([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])),this.W=function(){var t,e;for(e=[],t=0;t<80;++t)e.push(new o(0,0));return e}()}return t.convert=function(t){var e,r,n,i;for(i=[],e=r=0,n=t.length;r>>1|(et=Q.low)<<31)^(tt>>>8|et<<24)^tt>>>7,J=(et>>>1|tt<<31)^(et>>>8|tt<<24)^(et>>>7|tt<<25),rt=((ot=(it=R[ct-2]).high)>>>19|(st=it.low)<<13)^(ot<<3|st>>>29)^ot>>>6,nt=(st>>>19|ot<<13)^(st<<3|ot>>>29)^(st>>>6|ot<<26),F=(F=(F=X+(U=R[ct-7]).high+((C=J+U.low)>>>0>>0?1:0))+rt+((C+=nt)>>>0>>0?1:0))+(P=R[ct-16]).high+((C+=T=P.low)>>>0>>0?1:0),I.high=F,I.low=C),j=V&$^~V&at,K=W&Y^~W&ut,lt=O&N^O&q^N&q,pt=L&z^L&Z^z&Z,dt=(O>>>28|L<<4)^(O<<30|L>>>2)^(O<<25|L>>>7),mt=(L>>>28|O<<4)^(L<<30|O>>>2)^(L<<25|O>>>7),yt=ft+((V>>>14|W<<18)^(V>>>18|W<<14)^(V<<23|W>>>9))+((_t=ht+((W>>>14|V<<18)^(W>>>18|V<<14)^(W<<23|V>>>9)))>>>0>>0?1:0),ft=at,ht=ut,at=$,ut=Y,$=V,Y=W,V=H+(yt=(yt=(yt=yt+j+((_t+=K)>>>0>>0?1:0))+(B=a.K[ct]).high+((_t+=D=B.low)>>>0>>0?1:0))+F+((_t+=C)>>>0>>0?1:0))+((W=G+_t|0)>>>0>>0?1:0)|0,H=q,G=Z,q=N,Z=z,N=O,z=L,O=yt+(dt+lt+((gt=mt+pt)>>>0>>0?1:0))+((L=_t+gt|0)>>>0<_t>>>0?1:0)|0;return o=n.low=o+L,n.high=i+O+(o>>>0>>0?1:0),f=s.low=f+z,s.high=u+N+(f>>>0>>0?1:0),l=h.low=l+Z,h.high=c+q+(l>>>0>>0?1:0),m=p.low=m+G,p.high=d+H+(m>>>0>>0?1:0),g=y.low=g+W,y.high=_+V+(g>>>0>>0?1:0),w=b.low=w+Y,b.high=v+$+(w>>>0>>0?1:0),x=k.low=x+ut,k.high=M+at+(x>>>0>>0?1:0),A=S.low=A+ht,S.high=E+ft+(A>>>0>>0?1:0)},e.prototype._doFinalize=function(){var t,e,r;return t=this._data.words,r=8*this._nDataBytes,t[(e=8*this._data.sigBytes)>>>5]|=128<<24-e%32,t[30+(e+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(e+128>>>10<<5)]=r,this._data.sigBytes=4*t.length,this._process(),this._hash.toX32()},e.prototype.copy_to=function(t){return e.__super__.copy_to.call(this,t),t._hash=this._hash.clone()},e.prototype.clone=function(){var t;return t=new e,this.copy_to(t),t},e}(n),e.transform=function(t){var e;return e=(new i).finalize(t),t.scrub(),e}}).call(this)},15098:function(t,e,r){(function(){var t,n,i,o={}.hasOwnProperty;t=r(78689).BlockCipher,i=r(4748).scrub_vec,n=new function(){this.P=[[169,103,179,232,4,253,163,118,154,146,128,120,228,221,209,56,13,198,53,152,24,247,236,108,67,117,55,38,250,19,148,72,242,208,139,48,132,84,223,35,25,91,61,89,243,174,162,130,99,1,131,46,217,81,155,124,166,235,165,190,22,12,227,97,192,140,58,245,115,44,37,11,187,78,137,107,83,106,180,241,225,230,189,69,226,244,182,102,204,149,3,86,212,28,30,215,251,195,142,181,233,207,191,186,234,119,57,175,51,201,98,113,129,121,9,173,36,205,249,216,229,197,185,77,68,8,134,231,161,29,170,237,6,112,178,210,65,123,160,17,49,194,39,144,32,246,96,255,150,92,177,171,158,156,82,27,95,147,10,239,145,133,73,238,45,79,143,59,71,135,109,70,214,62,105,100,42,206,203,47,252,151,5,122,172,127,213,26,75,14,167,90,40,20,63,41,136,60,76,2,184,218,176,23,85,31,138,125,87,199,141,116,183,196,159,114,126,21,34,18,88,7,153,52,110,80,222,104,101,188,219,248,200,168,43,64,220,254,50,164,202,16,33,240,211,93,15,0,111,157,54,66,74,94,193,224],[117,243,198,244,219,123,251,200,74,211,230,107,69,125,232,75,214,50,216,253,55,113,241,225,48,15,248,27,135,250,6,63,94,186,174,91,138,0,188,157,109,193,177,14,128,93,210,213,160,132,7,20,181,144,44,163,178,115,76,84,146,116,54,81,56,176,189,90,252,96,98,150,108,66,247,16,124,40,39,140,19,149,156,199,36,70,59,112,202,227,133,203,17,208,147,184,166,131,32,255,159,119,195,204,3,111,8,191,64,231,43,226,121,12,170,130,65,58,234,185,228,154,164,151,126,218,122,23,102,148,161,29,61,240,222,179,11,114,167,28,239,209,83,62,143,51,38,95,236,118,42,73,129,136,238,33,196,26,235,217,197,57,153,205,173,49,139,1,24,35,221,31,78,45,249,72,79,242,101,142,120,92,88,25,141,229,152,87,103,127,5,100,175,99,182,254,245,183,60,165,206,233,104,68,224,77,67,105,41,46,172,21,89,168,10,158,110,71,223,52,53,106,207,220,34,201,192,155,137,212,237,171,18,162,13,82,187,2,47,169,215,97,30,180,80,4,246,194,22,37,134,86,85,9,190,145]],this.P_00=1,this.P_01=0,this.P_02=0,this.P_03=1,this.P_04=1,this.P_10=0,this.P_11=0,this.P_12=1,this.P_13=1,this.P_14=0,this.P_20=1,this.P_21=1,this.P_22=0,this.P_23=0,this.P_24=0,this.P_30=0,this.P_31=1,this.P_32=1,this.P_33=0,this.P_34=1,this.GF256_FDBK=361,this.GF256_FDBK_2=this.GF256_FDBK/2,this.GF256_FDBK_4=this.GF256_FDBK/4,this.RS_GF_FDBK=333,this.SK_STEP=33686018,this.SK_BUMP=16843009,this.SK_ROTL=9},e.TwoFish=function(t){function e(t){this._key=t.clone(),this.gMDS0=[],this.gMDS1=[],this.gMDS2=[],this.gMDS3=[],this.gSubKeys=[],this.gSBox=[],this.k64Cnt=0,this._doReset()}return function(t,e){for(var r in e)o.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.blockSize=16,e.prototype.blockSize=e.blockSize,e.keySize=32,e.prototype.keySize=e.keySize,e.ivSize=e.blockSize,e.prototype.ivSize=e.ivSize,e.prototype.getByte=function(t,e){return t>>>8*e&255},e.prototype.switchEndianness=function(t){return(255&t)<<24|(t>>8&255)<<16|(t>>16&255)<<8|t>>24&255},e.prototype.LFSR1=function(t){return t>>1^(1&t?n.GF256_FDBK_2:0)},e.prototype.LFSR2=function(t){return t>>2^(2&t?n.GF256_FDBK_2:0)^(1&t?n.GF256_FDBK_4:0)},e.prototype.Mx_X=function(t){return t^this.LFSR2(t)},e.prototype.Mx_Y=function(t){return t^this.LFSR1(t)^this.LFSR2(t)},e.prototype.RS_rem=function(t){var e,r,i;return r=255&((e=t>>>24&255)<<1^(128&e?n.RS_GF_FDBK:0)),t<<8^(i=e>>>1^(1&e?n.RS_GF_FDBK>>>1:0)^r)<<24^r<<16^i<<8^e},e.prototype.RS_MDS_Encode=function(t,e){var r,n,i;for(r=e,n=0;n<4;++n)r=this.RS_rem(r);for(r^=t,i=0;i<4;++i)r=this.RS_rem(r);return r},e.prototype.F32=function(t,e){var r,i,o,s,a,u,f,h,c;return r=this.getByte(t,0),i=this.getByte(t,1),o=this.getByte(t,2),s=this.getByte(t,3),a=e[0],u=e[1],f=e[2],h=e[3],1==(c=3&this.k64Cnt)?this.gMDS0[255&n.P[n.P_01][r]^this.getByte(a,0)]^this.gMDS1[255&n.P[n.P_11][i]^this.getByte(a,1)]^this.gMDS2[255&n.P[n.P_21][o]^this.getByte(a,2)]^this.gMDS3[255&n.P[n.P_31][s]^this.getByte(a,3)]:(0===c&&(r=255&n.P[n.P_04][r]^this.getByte(h,0),i=255&n.P[n.P_14][i]^this.getByte(h,1),o=255&n.P[n.P_24][o]^this.getByte(h,2),s=255&n.P[n.P_34][s]^this.getByte(h,3)),(0===c||3===c)&&(r=255&n.P[n.P_03][r]^this.getByte(f,0),i=255&n.P[n.P_13][i]^this.getByte(f,1),o=255&n.P[n.P_23][o]^this.getByte(f,2),s=255&n.P[n.P_33][s]^this.getByte(f,3)),this.gMDS0[255&n.P[n.P_01][255&n.P[n.P_02][r]^this.getByte(u,0)]^this.getByte(a,0)]^this.gMDS1[255&n.P[n.P_11][255&n.P[n.P_12][i]^this.getByte(u,1)]^this.getByte(a,1)]^this.gMDS2[255&n.P[n.P_21][255&n.P[n.P_22][o]^this.getByte(u,2)]^this.getByte(a,2)]^this.gMDS3[255&n.P[n.P_31][255&n.P[n.P_32][s]^this.getByte(u,3)]^this.getByte(a,3)])},e.prototype.Fe32_0=function(t){return this.gSBox[0+2*(255&t)]^this.gSBox[1+2*(t>>>8&255)]^this.gSBox[512+2*(t>>>16&255)]^this.gSBox[513+2*(t>>>24&255)]},e.prototype.Fe32_3=function(t){return this.gSBox[0+2*(t>>>24&255)]^this.gSBox[1+2*(255&t)]^this.gSBox[512+2*(t>>>8&255)]^this.gSBox[513+2*(t>>>16&255)]},e.prototype._doReset=function(){var t,e,r,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A;if(p=[],d=[],w=[],y=[],_=[],g=[],this.k64Cnt=this._key.words.length/2,this.k64Cnt<1)throw"Key size less than 64 bits";if(this.k64Cnt>4)throw"Key size larger than 256 bits";for(a=k=0;k<256;a=++k)u=255&n.P[0][a],y[0]=u,_[0]=255&this.Mx_X(u),g[0]=255&this.Mx_Y(u),u=255&n.P[1][a],y[1]=u,_[1]=255&this.Mx_X(u),g[1]=255&this.Mx_Y(u),this.gMDS0[a]=y[n.P_00]|_[n.P_00]<<8|g[n.P_00]<<16|g[n.P_00]<<24,this.gMDS1[a]=g[n.P_10]|g[n.P_10]<<8|_[n.P_10]<<16|y[n.P_10]<<24,this.gMDS2[a]=_[n.P_20]|g[n.P_20]<<8|y[n.P_20]<<16|g[n.P_20]<<24,this.gMDS3[a]=_[n.P_30]|y[n.P_30]<<8|g[n.P_30]<<16|_[n.P_30]<<24;for(a=M=0,E=this.k64Cnt;0<=E?ME;a=0<=E?++M:--M)b=2*a,p[a]=this.switchEndianness(this._key.words[b]),d[a]=this.switchEndianness(this._key.words[b+1]),w[this.k64Cnt-1-a]=this.RS_MDS_Encode(p[a],d[a]);for(a=x=0;x<20;a=++x)v=a*n.SK_STEP,t=this.F32(v,p),t+=e=(e=this.F32(v+n.SK_BUMP,d))<<8|e>>>24,this.gSubKeys[2*a]=t,t+=e,this.gSubKeys[2*a+1]=t<>>32-n.SK_ROTL;for(f=w[0],h=w[1],c=w[2],l=w[3],this.gSBox=[],A=[],a=S=0;S<256;a=++S)r=i=o=s=a,1==(m=3&this.k64Cnt)?(this.gSBox[2*a]=this.gMDS0[255&n.P[n.P_01][r]^this.getByte(f,0)],this.gSBox[2*a+1]=this.gMDS1[255&n.P[n.P_11][i]^this.getByte(f,1)],this.gSBox[2*a+512]=this.gMDS2[255&n.P[n.P_21][o]^this.getByte(f,2)],A.push(this.gSBox[2*a+513]=this.gMDS3[255&n.P[n.P_31][s]^this.getByte(f,3)])):(0===m&&(r=255&n.P[n.P_04][r]^this.getByte(l,0),i=255&n.P[n.P_14][i]^this.getByte(l,1),o=255&n.P[n.P_24][o]^this.getByte(l,2),s=255&n.P[n.P_34][s]^this.getByte(l,3)),0!==m&&3!==m||(r=255&n.P[n.P_03][r]^this.getByte(c,0),i=255&n.P[n.P_13][i]^this.getByte(c,1),o=255&n.P[n.P_23][o]^this.getByte(c,2),s=255&n.P[n.P_33][s]^this.getByte(c,3)),this.gSBox[2*a]=this.gMDS0[255&n.P[n.P_01][255&n.P[n.P_02][r]^this.getByte(h,0)]^this.getByte(f,0)],this.gSBox[2*a+1]=this.gMDS1[255&n.P[n.P_11][255&n.P[n.P_12][i]^this.getByte(h,1)]^this.getByte(f,1)],this.gSBox[2*a+512]=this.gMDS2[255&n.P[n.P_21][255&n.P[n.P_22][o]^this.getByte(h,2)]^this.getByte(f,2)],A.push(this.gSBox[2*a+513]=this.gMDS3[255&n.P[n.P_31][255&n.P[n.P_32][s]^this.getByte(h,3)]^this.getByte(f,3)]));return A},e.prototype.scrub=function(){return i(this.gSubKeys),i(this.gSBox),this._key.scrub()},e.prototype.decryptBlock=function(t,e){var r,n,i,o,s,a,u,f;for(null==e&&(e=0),a=this.switchEndianness(t[e])^this.gSubKeys[4],u=this.switchEndianness(t[e+1])^this.gSubKeys[5],o=this.switchEndianness(t[e+2])^this.gSubKeys[6],s=this.switchEndianness(t[e+3])^this.gSubKeys[7],r=39,f=0;f<16;f+=2)s^=(n=this.Fe32_0(a))+2*(i=this.Fe32_3(u))+this.gSubKeys[r--],o=(o<<1|o>>>31)^n+i+this.gSubKeys[r--],s=s>>>1|s<<31,u^=(n=this.Fe32_0(o))+2*(i=this.Fe32_3(s))+this.gSubKeys[r--],a=(a<<1|a>>>31)^n+i+this.gSubKeys[r--],u=u>>>1|u<<31;return t[e]=this.switchEndianness(o^this.gSubKeys[0]),t[e+1]=this.switchEndianness(s^this.gSubKeys[1]),t[e+2]=this.switchEndianness(a^this.gSubKeys[2]),t[e+3]=this.switchEndianness(u^this.gSubKeys[3])},e.prototype.encryptBlock=function(t,e){var r,n,i,o,s,a,u,f;for(null==e&&(e=0),o=this.switchEndianness(t[e])^this.gSubKeys[0],s=this.switchEndianness(t[e+1])^this.gSubKeys[1],a=this.switchEndianness(t[e+2])^this.gSubKeys[2],u=this.switchEndianness(t[e+3])^this.gSubKeys[3],r=8,f=0;f<16;f+=2)a=(a^=(n=this.Fe32_0(o))+(i=this.Fe32_3(s))+this.gSubKeys[r++])>>>1|a<<31,u=(u<<1|u>>>31)^n+2*i+this.gSubKeys[r++],o=(o^=(n=this.Fe32_0(a))+(i=this.Fe32_3(u))+this.gSubKeys[r++])>>>1|o<<31,s=(s<<1|s>>>31)^n+2*i+this.gSubKeys[r++];return t[e]=this.switchEndianness(a^this.gSubKeys[4]),t[e+1]=this.switchEndianness(u^this.gSubKeys[5]),t[e+2]=this.switchEndianness(o^this.gSubKeys[6]),t[e+3]=this.switchEndianness(s^this.gSubKeys[7])},e}(t)}).call(this)},4748:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o;i=r(41060),o=Math.pow(2,32),e.fixup_uint32=function(t){var e;return t>o||t<0?(e=Math.abs(t)%o,t<0?o-e:e):t},e.scrub_buffer=function(t){var e,r;for(r=t.length>>2,e=0;eo;e=0<=o?++i:--i)r.writeUInt8(t.readUInt8(e),e);return r},e.scrub_vec=function(t){var e,r,n;for(e=r=0,n=t.length;0<=n?rn;e=0<=n?++r:--r)t[e]=0;return!1},e.default_delay=t=function(t,e,r){var n,o,s;n=i.findDeferral(arguments),s=function(){return r()},"undefined"!=typeof setImmediate&&null!==setImmediate?function(t){o=new i.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/triplesec/src/util.iced"}),setImmediate(o.defer({lineno:45})),o._fulfill()}(s):function(t){o=new i.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/triplesec/src/util.iced"}),setTimeout(o.defer({lineno:47}),1),o._fulfill()}(s)},e.buffer_cmp_ule=function(t,e){var r,n,i,o,s,a;for(i=o=0,r=t.length,n=e.length;in-o)return 1;if(n-o>r-i)return-1;for(;i0))return t();p=Math.min(l,c),_(h,h+p),o(h),v=new i.Deferrals((function(){return e(h+=p)}),{parent:b,filename:"/Users/max/src/keybase/triplesec/src/util.iced",funcname:"bulk"}),u(h,y,v.defer({lineno:105})),v._fulfill()})((function(){return o(y),m=f(),s(m)}))}}).call(this)},75411:function(t,e,r){var n=r(48287).Buffer;(function(){var t,i,o,s,a;a=r(4748),i=function(t){var e,r,n,i;for(r=new Uint8Array(t.length),e=n=0,i=t.length;0<=i?ni;e=0<=i?++n:--n)r[e]=t.readUInt8(e);return r},s=function(t){var e,r,i,o;for(r=n.alloc(t.length),e=i=0,o=t.length;0<=o?io;e=0<=o?++i:--i)r.writeUInt8(t[e],e);return r},o=function(t){return t>>>24&255|(t>>>16&255)<<8|(t>>>8&255)<<16|(255&t)<<24},e.WordArray=t=function(){function t(t,e){this.words=t||[],this.sigBytes=null!=e?e:4*this.words.length}return t.prototype.concat=function(t){var e,r,n,i,o;if(i=t.words,n=t.sigBytes,this.clamp(),this.sigBytes%4)for(e=o=0;0<=n?on;e=0<=n?++o:--o)r=i[e>>>2]>>>24-e%4*8&255,this.words[this.sigBytes+e>>>2]|=r<<24-(this.sigBytes+e)%4*8;else this.words=this.words.concat(i);return this.sigBytes+=n,this},t.prototype.clamp=function(){return this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this},t.prototype.clone=function(){return new t(this.words.slice(0),this.sigBytes)},t.prototype.to_buffer=function(){var t,e,r,i,o,s,u;for(e=n.alloc(this.sigBytes),r=0,o=0,s=(u=this.words).length;o=4&&(i=a.fixup_uint32(i),e.writeUInt32BE(i,r),r+=4);for(;r>>2]>>>24-r%4*8&255,e.writeUInt8(t,r),r++;return e},t.prototype.endian_reverse=function(){var t,e,r,n,i;for(t=r=0,n=(i=this.words).length;r0?ei;r=e+=n)o.push(new t(this.words.slice(r,r+n)));return o}.call(this)},t.prototype.to_utf8=function(){return this.to_buffer().toString("utf8")},t.prototype.to_hex=function(){return this.to_buffer().toString("hex")},t.prototype.to_ui8a=function(){return i(this.to_buffer())},t.alloc=function(e){return n.isBuffer(e)?t.from_buffer(e):"object"==typeof e&&e instanceof t?e:"string"==typeof e?t.from_hex(e):null},t.from_buffer=function(e){var r,n,i;for(i=[],n=0;e.length-n>=4;)i.push(e.readUInt32BE(n)),n+=4;if(n=4;)i.push(e.readUInt32LE(n)),n+=4;if(ni;n=0<=i?++u:--u)s=this.words[r+n]^t.words[o+n],this.words[r+n]=a.fixup_uint32(s);return this},t.prototype.truncate=function(e){var r;if(!(e<=this.sigBytes))throw new Error("Cannot truncate: "+e+" > "+this.sigBytes);return r=Math.ceil(e/4),new t(this.words.slice(0,r),e)},t.prototype.unshift=function(e){var r;return this.words.length>=e?(r=this.words.splice(0,e),this.sigBytes-=4*e,new t(r)):null},t.prototype.is_scrubbed=function(){var t,e,r;for(t=0,e=(r=this.words).length;t{var n=r(69656).Buffer;!function(t){"use strict";var e=function(t){var e,r=new Float64Array(16);if(t)for(e=0;e>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function y(t,e,r,n,i){var o,s=0;for(o=0;o>>8)-1}function _(t,e,r,n){return y(t,e,r,n,16)}function g(t,e,r,n){return y(t,e,r,n,32)}function b(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,f=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,h=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,_=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,k=s,M=a,x=u,S=f,E=h,A=c,B=l,D=p,R=d,I=m,P=y,T=_,U=g,F=b,C=v,O=0;O<20;O+=2)w^=(i=(T^=(i=(D^=(i=(S^=(i=w+T|0)<<7|i>>>25)+w|0)<<9|i>>>23)+S|0)<<13|i>>>19)+D|0)<<18|i>>>14,E^=(i=(k^=(i=(U^=(i=(R^=(i=E+k|0)<<7|i>>>25)+E|0)<<9|i>>>23)+R|0)<<13|i>>>19)+U|0)<<18|i>>>14,I^=(i=(A^=(i=(M^=(i=(F^=(i=I+A|0)<<7|i>>>25)+I|0)<<9|i>>>23)+F|0)<<13|i>>>19)+M|0)<<18|i>>>14,C^=(i=(P^=(i=(B^=(i=(x^=(i=C+P|0)<<7|i>>>25)+C|0)<<9|i>>>23)+x|0)<<13|i>>>19)+B|0)<<18|i>>>14,w^=(i=(x^=(i=(M^=(i=(k^=(i=w+x|0)<<7|i>>>25)+w|0)<<9|i>>>23)+k|0)<<13|i>>>19)+M|0)<<18|i>>>14,E^=(i=(S^=(i=(B^=(i=(A^=(i=E+S|0)<<7|i>>>25)+E|0)<<9|i>>>23)+A|0)<<13|i>>>19)+B|0)<<18|i>>>14,I^=(i=(R^=(i=(D^=(i=(P^=(i=I+R|0)<<7|i>>>25)+I|0)<<9|i>>>23)+P|0)<<13|i>>>19)+D|0)<<18|i>>>14,C^=(i=(F^=(i=(U^=(i=(T^=(i=C+F|0)<<7|i>>>25)+C|0)<<9|i>>>23)+T|0)<<13|i>>>19)+U|0)<<18|i>>>14;w=w+o|0,k=k+s|0,M=M+a|0,x=x+u|0,S=S+f|0,E=E+h|0,A=A+c|0,B=B+l|0,D=D+p|0,R=R+d|0,I=I+m|0,P=P+y|0,T=T+_|0,U=U+g|0,F=F+b|0,C=C+v|0,t[0]=w>>>0&255,t[1]=w>>>8&255,t[2]=w>>>16&255,t[3]=w>>>24&255,t[4]=k>>>0&255,t[5]=k>>>8&255,t[6]=k>>>16&255,t[7]=k>>>24&255,t[8]=M>>>0&255,t[9]=M>>>8&255,t[10]=M>>>16&255,t[11]=M>>>24&255,t[12]=x>>>0&255,t[13]=x>>>8&255,t[14]=x>>>16&255,t[15]=x>>>24&255,t[16]=S>>>0&255,t[17]=S>>>8&255,t[18]=S>>>16&255,t[19]=S>>>24&255,t[20]=E>>>0&255,t[21]=E>>>8&255,t[22]=E>>>16&255,t[23]=E>>>24&255,t[24]=A>>>0&255,t[25]=A>>>8&255,t[26]=A>>>16&255,t[27]=A>>>24&255,t[28]=B>>>0&255,t[29]=B>>>8&255,t[30]=B>>>16&255,t[31]=B>>>24&255,t[32]=D>>>0&255,t[33]=D>>>8&255,t[34]=D>>>16&255,t[35]=D>>>24&255,t[36]=R>>>0&255,t[37]=R>>>8&255,t[38]=R>>>16&255,t[39]=R>>>24&255,t[40]=I>>>0&255,t[41]=I>>>8&255,t[42]=I>>>16&255,t[43]=I>>>24&255,t[44]=P>>>0&255,t[45]=P>>>8&255,t[46]=P>>>16&255,t[47]=P>>>24&255,t[48]=T>>>0&255,t[49]=T>>>8&255,t[50]=T>>>16&255,t[51]=T>>>24&255,t[52]=U>>>0&255,t[53]=U>>>8&255,t[54]=U>>>16&255,t[55]=U>>>24&255,t[56]=F>>>0&255,t[57]=F>>>8&255,t[58]=F>>>16&255,t[59]=F>>>24&255,t[60]=C>>>0&255,t[61]=C>>>8&255,t[62]=C>>>16&255,t[63]=C>>>24&255}(t,e,r,n)}function v(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,f=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,h=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,_=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)o^=(i=(_^=(i=(p^=(i=(f^=(i=o+_|0)<<7|i>>>25)+o|0)<<9|i>>>23)+f|0)<<13|i>>>19)+p|0)<<18|i>>>14,h^=(i=(s^=(i=(g^=(i=(d^=(i=h+s|0)<<7|i>>>25)+h|0)<<9|i>>>23)+d|0)<<13|i>>>19)+g|0)<<18|i>>>14,m^=(i=(c^=(i=(a^=(i=(b^=(i=m+c|0)<<7|i>>>25)+m|0)<<9|i>>>23)+b|0)<<13|i>>>19)+a|0)<<18|i>>>14,v^=(i=(y^=(i=(l^=(i=(u^=(i=v+y|0)<<7|i>>>25)+v|0)<<9|i>>>23)+u|0)<<13|i>>>19)+l|0)<<18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,h^=(i=(f^=(i=(l^=(i=(c^=(i=h+f|0)<<7|i>>>25)+h|0)<<9|i>>>23)+c|0)<<13|i>>>19)+l|0)<<18|i>>>14,m^=(i=(d^=(i=(p^=(i=(y^=(i=m+d|0)<<7|i>>>25)+m|0)<<9|i>>>23)+y|0)<<13|i>>>19)+p|0)<<18|i>>>14,v^=(i=(b^=(i=(g^=(i=(_^=(i=v+b|0)<<7|i>>>25)+v|0)<<9|i>>>23)+_|0)<<13|i>>>19)+g|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=h>>>0&255,t[5]=h>>>8&255,t[6]=h>>>16&255,t[7]=h>>>24&255,t[8]=m>>>0&255,t[9]=m>>>8&255,t[10]=m>>>16&255,t[11]=m>>>24&255,t[12]=v>>>0&255,t[13]=v>>>8&255,t[14]=v>>>16&255,t[15]=v>>>24&255,t[16]=c>>>0&255,t[17]=c>>>8&255,t[18]=c>>>16&255,t[19]=c>>>24&255,t[20]=l>>>0&255,t[21]=l>>>8&255,t[22]=l>>>16&255,t[23]=l>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=d>>>0&255,t[29]=d>>>8&255,t[30]=d>>>16&255,t[31]=d>>>24&255}(t,e,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function k(t,e,r,n,i,o,s){var a,u,f=new Uint8Array(16),h=new Uint8Array(64);for(u=0;u<16;u++)f[u]=0;for(u=0;u<8;u++)f[u]=o[u];for(;i>=64;){for(b(h,f,s,w),u=0;u<64;u++)t[e+u]=r[n+u]^h[u];for(a=1,u=8;u<16;u++)a=a+(255&f[u])|0,f[u]=255&a,a>>>=8;i-=64,e+=64,n+=64}if(i>0)for(b(h,f,s,w),u=0;u=64;){for(b(u,a,i,w),s=0;s<64;s++)t[e+s]=u[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,e+=64}if(r>0)for(b(u,a,i,w),s=0;s>>13|r<<3),n=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function A(t,e,r,n,i,o){var s=new E(o);return s.update(r,n,i),s.finish(t,e),0}function B(t,e,r,n,i,o){var s=new Uint8Array(16);return A(s,0,r,n,i,o),_(t,e,s,0)}function D(t,e,r,n,i){var o;if(r<32)return-1;for(S(t,0,e,0,r,n,i),A(t,16,t,32,r-32,t),o=0;o<16;o++)t[o]=0;return 0}function R(t,e,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(x(s,0,32,n,i),0!==B(e,16,e,32,r-32,s))return-1;for(S(t,0,e,0,r,n,i),o=0;o<32;o++)t[o]=0;return 0}function I(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function P(t){var e,r,n=1;for(e=0;e<16;e++)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function T(t,e,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function U(t,r){var n,i,o,s=e(),a=e();for(n=0;n<16;n++)a[n]=r[n];for(P(a),P(a),P(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,T(a,s,1-o)}for(n=0;n<16;n++)t[2*n]=255&a[n],t[2*n+1]=a[n]>>8}function F(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return U(r,t),U(n,e),g(r,0,n,0)}function C(t){var e=new Uint8Array(32);return U(e,t),1&e[0]}function O(t,e){var r;for(r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function L(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function N(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function z(t,e,r){var n,i,o=0,s=0,a=0,u=0,f=0,h=0,c=0,l=0,p=0,d=0,m=0,y=0,_=0,g=0,b=0,v=0,w=0,k=0,M=0,x=0,S=0,E=0,A=0,B=0,D=0,R=0,I=0,P=0,T=0,U=0,F=0,C=r[0],O=r[1],L=r[2],N=r[3],z=r[4],q=r[5],j=r[6],K=r[7],Z=r[8],H=r[9],G=r[10],V=r[11],W=r[12],$=r[13],Y=r[14],X=r[15];o+=(n=e[0])*C,s+=n*O,a+=n*L,u+=n*N,f+=n*z,h+=n*q,c+=n*j,l+=n*K,p+=n*Z,d+=n*H,m+=n*G,y+=n*V,_+=n*W,g+=n*$,b+=n*Y,v+=n*X,s+=(n=e[1])*C,a+=n*O,u+=n*L,f+=n*N,h+=n*z,c+=n*q,l+=n*j,p+=n*K,d+=n*Z,m+=n*H,y+=n*G,_+=n*V,g+=n*W,b+=n*$,v+=n*Y,w+=n*X,a+=(n=e[2])*C,u+=n*O,f+=n*L,h+=n*N,c+=n*z,l+=n*q,p+=n*j,d+=n*K,m+=n*Z,y+=n*H,_+=n*G,g+=n*V,b+=n*W,v+=n*$,w+=n*Y,k+=n*X,u+=(n=e[3])*C,f+=n*O,h+=n*L,c+=n*N,l+=n*z,p+=n*q,d+=n*j,m+=n*K,y+=n*Z,_+=n*H,g+=n*G,b+=n*V,v+=n*W,w+=n*$,k+=n*Y,M+=n*X,f+=(n=e[4])*C,h+=n*O,c+=n*L,l+=n*N,p+=n*z,d+=n*q,m+=n*j,y+=n*K,_+=n*Z,g+=n*H,b+=n*G,v+=n*V,w+=n*W,k+=n*$,M+=n*Y,x+=n*X,h+=(n=e[5])*C,c+=n*O,l+=n*L,p+=n*N,d+=n*z,m+=n*q,y+=n*j,_+=n*K,g+=n*Z,b+=n*H,v+=n*G,w+=n*V,k+=n*W,M+=n*$,x+=n*Y,S+=n*X,c+=(n=e[6])*C,l+=n*O,p+=n*L,d+=n*N,m+=n*z,y+=n*q,_+=n*j,g+=n*K,b+=n*Z,v+=n*H,w+=n*G,k+=n*V,M+=n*W,x+=n*$,S+=n*Y,E+=n*X,l+=(n=e[7])*C,p+=n*O,d+=n*L,m+=n*N,y+=n*z,_+=n*q,g+=n*j,b+=n*K,v+=n*Z,w+=n*H,k+=n*G,M+=n*V,x+=n*W,S+=n*$,E+=n*Y,A+=n*X,p+=(n=e[8])*C,d+=n*O,m+=n*L,y+=n*N,_+=n*z,g+=n*q,b+=n*j,v+=n*K,w+=n*Z,k+=n*H,M+=n*G,x+=n*V,S+=n*W,E+=n*$,A+=n*Y,B+=n*X,d+=(n=e[9])*C,m+=n*O,y+=n*L,_+=n*N,g+=n*z,b+=n*q,v+=n*j,w+=n*K,k+=n*Z,M+=n*H,x+=n*G,S+=n*V,E+=n*W,A+=n*$,B+=n*Y,D+=n*X,m+=(n=e[10])*C,y+=n*O,_+=n*L,g+=n*N,b+=n*z,v+=n*q,w+=n*j,k+=n*K,M+=n*Z,x+=n*H,S+=n*G,E+=n*V,A+=n*W,B+=n*$,D+=n*Y,R+=n*X,y+=(n=e[11])*C,_+=n*O,g+=n*L,b+=n*N,v+=n*z,w+=n*q,k+=n*j,M+=n*K,x+=n*Z,S+=n*H,E+=n*G,A+=n*V,B+=n*W,D+=n*$,R+=n*Y,I+=n*X,_+=(n=e[12])*C,g+=n*O,b+=n*L,v+=n*N,w+=n*z,k+=n*q,M+=n*j,x+=n*K,S+=n*Z,E+=n*H,A+=n*G,B+=n*V,D+=n*W,R+=n*$,I+=n*Y,P+=n*X,g+=(n=e[13])*C,b+=n*O,v+=n*L,w+=n*N,k+=n*z,M+=n*q,x+=n*j,S+=n*K,E+=n*Z,A+=n*H,B+=n*G,D+=n*V,R+=n*W,I+=n*$,P+=n*Y,T+=n*X,b+=(n=e[14])*C,v+=n*O,w+=n*L,k+=n*N,M+=n*z,x+=n*q,S+=n*j,E+=n*K,A+=n*Z,B+=n*H,D+=n*G,R+=n*V,I+=n*W,P+=n*$,T+=n*Y,U+=n*X,v+=(n=e[15])*C,s+=38*(k+=n*L),a+=38*(M+=n*N),u+=38*(x+=n*z),f+=38*(S+=n*q),h+=38*(E+=n*j),c+=38*(A+=n*K),l+=38*(B+=n*Z),p+=38*(D+=n*H),d+=38*(R+=n*G),m+=38*(I+=n*V),y+=38*(P+=n*W),_+=38*(T+=n*$),g+=38*(U+=n*Y),b+=38*(F+=n*X),o=(n=(o+=38*(w+=n*O))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=u,t[4]=f,t[5]=h,t[6]=c,t[7]=l,t[8]=p,t[9]=d,t[10]=m,t[11]=y,t[12]=_,t[13]=g,t[14]=b,t[15]=v}function q(t,e){z(t,e,e)}function j(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)q(i,i),2!==n&&4!==n&&z(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function K(t,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),u=e(),h=e(),c=e(),l=e(),p=e(),d=e();for(o=0;o<31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,O(a,n),o=0;o<16;o++)h[o]=a[o],l[o]=u[o]=c[o]=0;for(u[0]=l[0]=1,o=254;o>=0;--o)T(u,h,i=s[o>>>3]>>>(7&o)&1),T(c,l,i),L(p,u,c),N(u,u,c),L(c,h,l),N(h,h,l),q(l,p),q(d,u),z(u,c,u),z(c,h,p),L(p,u,c),N(u,u,c),q(h,u),N(c,l,d),z(u,c,f),L(u,u,l),z(c,c,u),z(u,l,d),z(l,h,a),q(h,p),T(u,h,i),T(c,l,i);for(o=0;o<16;o++)a[o+16]=u[o],a[o+32]=c[o],a[o+48]=h[o],a[o+64]=l[o];var m=a.subarray(32),y=a.subarray(16);return j(m,m),z(y,y,m),U(t,y),0}function Z(t,e){return K(t,e,s)}function H(t,e){return i(e,32),Z(t,e)}function G(t,e,r){var n=new Uint8Array(32);return K(n,r,e),v(t,o,n,w)}E.prototype.blocks=function(t,e,r){for(var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k=this.fin?0:2048,M=this.h[0],x=this.h[1],S=this.h[2],E=this.h[3],A=this.h[4],B=this.h[5],D=this.h[6],R=this.h[7],I=this.h[8],P=this.h[9],T=this.r[0],U=this.r[1],F=this.r[2],C=this.r[3],O=this.r[4],L=this.r[5],N=this.r[6],z=this.r[7],q=this.r[8],j=this.r[9];r>=16;)l=c=0,l+=(M+=8191&(n=255&t[e+0]|(255&t[e+1])<<8))*T,l+=(x+=8191&(n>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3))*(5*j),l+=(S+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6))*(5*q),l+=(E+=8191&(o>>>7|(s=255&t[e+6]|(255&t[e+7])<<8)<<9))*(5*z),c=(l+=(A+=8191&(s>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12))*(5*N))>>>13,l&=8191,l+=(B+=a>>>1&8191)*(5*L),l+=(D+=8191&(a>>>14|(u=255&t[e+10]|(255&t[e+11])<<8)<<2))*(5*O),l+=(R+=8191&(u>>>11|(f=255&t[e+12]|(255&t[e+13])<<8)<<5))*(5*C),l+=(I+=8191&(f>>>8|(h=255&t[e+14]|(255&t[e+15])<<8)<<8))*(5*F),p=c+=(l+=(P+=h>>>5|k)*(5*U))>>>13,p+=M*U,p+=x*T,p+=S*(5*j),p+=E*(5*q),c=(p+=A*(5*z))>>>13,p&=8191,p+=B*(5*N),p+=D*(5*L),p+=R*(5*O),p+=I*(5*C),c+=(p+=P*(5*F))>>>13,p&=8191,d=c,d+=M*F,d+=x*U,d+=S*T,d+=E*(5*j),c=(d+=A*(5*q))>>>13,d&=8191,d+=B*(5*z),d+=D*(5*N),d+=R*(5*L),d+=I*(5*O),m=c+=(d+=P*(5*C))>>>13,m+=M*C,m+=x*F,m+=S*U,m+=E*T,c=(m+=A*(5*j))>>>13,m&=8191,m+=B*(5*q),m+=D*(5*z),m+=R*(5*N),m+=I*(5*L),y=c+=(m+=P*(5*O))>>>13,y+=M*O,y+=x*C,y+=S*F,y+=E*U,c=(y+=A*T)>>>13,y&=8191,y+=B*(5*j),y+=D*(5*q),y+=R*(5*z),y+=I*(5*N),_=c+=(y+=P*(5*L))>>>13,_+=M*L,_+=x*O,_+=S*C,_+=E*F,c=(_+=A*U)>>>13,_&=8191,_+=B*T,_+=D*(5*j),_+=R*(5*q),_+=I*(5*z),g=c+=(_+=P*(5*N))>>>13,g+=M*N,g+=x*L,g+=S*O,g+=E*C,c=(g+=A*F)>>>13,g&=8191,g+=B*U,g+=D*T,g+=R*(5*j),g+=I*(5*q),b=c+=(g+=P*(5*z))>>>13,b+=M*z,b+=x*N,b+=S*L,b+=E*O,c=(b+=A*C)>>>13,b&=8191,b+=B*F,b+=D*U,b+=R*T,b+=I*(5*j),v=c+=(b+=P*(5*q))>>>13,v+=M*q,v+=x*z,v+=S*N,v+=E*L,c=(v+=A*O)>>>13,v&=8191,v+=B*C,v+=D*F,v+=R*U,v+=I*T,w=c+=(v+=P*(5*j))>>>13,w+=M*j,w+=x*q,w+=S*z,w+=E*N,c=(w+=A*L)>>>13,w&=8191,w+=B*O,w+=D*C,w+=R*F,w+=I*U,M=l=8191&(c=(c=((c+=(w+=P*T)>>>13)<<2)+c|0)+(l&=8191)|0),x=p+=c>>>=13,S=d&=8191,E=m&=8191,A=y&=8191,B=_&=8191,D=g&=8191,R=b&=8191,I=v&=8191,P=w&=8191,e+=16,r-=16;this.h[0]=M,this.h[1]=x,this.h[2]=S,this.h[3]=E,this.h[4]=A,this.h[5]=B,this.h[6]=D,this.h[7]=R,this.h[8]=I,this.h[9]=P},E.prototype.finish=function(t,e){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(s[9]>>>15)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},E.prototype.update=function(t,e,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(t,e,i),e+=i,r-=i),r){for(n=0;n=128;){for(k=0;k<16;k++)M=8*k+W,R[k]=r[M+0]<<24|r[M+1]<<16|r[M+2]<<8|r[M+3],I[k]=r[M+4]<<24|r[M+5]<<16|r[M+6]<<8|r[M+7];for(k=0;k<80;k++)if(i=P,o=T,s=U,a=F,u=C,f=O,h=L,l=z,p=q,d=j,m=K,y=Z,_=H,g=G,E=65535&(S=V),A=S>>>16,B=65535&(x=N),D=x>>>16,E+=65535&(S=(Z>>>14|C<<18)^(Z>>>18|C<<14)^(C>>>9|Z<<23)),A+=S>>>16,B+=65535&(x=(C>>>14|Z<<18)^(C>>>18|Z<<14)^(Z>>>9|C<<23)),D+=x>>>16,E+=65535&(S=Z&H^~Z&G),A+=S>>>16,B+=65535&(x=C&O^~C&L),D+=x>>>16,x=$[2*k],E+=65535&(S=$[2*k+1]),A+=S>>>16,B+=65535&x,D+=x>>>16,x=R[k%16],A+=(S=I[k%16])>>>16,B+=65535&x,D+=x>>>16,B+=(A+=(E+=65535&S)>>>16)>>>16,E=65535&(S=w=65535&E|A<<16),A=S>>>16,B=65535&(x=v=65535&B|(D+=B>>>16)<<16),D=x>>>16,E+=65535&(S=(z>>>28|P<<4)^(P>>>2|z<<30)^(P>>>7|z<<25)),A+=S>>>16,B+=65535&(x=(P>>>28|z<<4)^(z>>>2|P<<30)^(z>>>7|P<<25)),D+=x>>>16,A+=(S=z&q^z&j^q&j)>>>16,B+=65535&(x=P&T^P&U^T&U),D+=x>>>16,c=65535&(B+=(A+=(E+=65535&S)>>>16)>>>16)|(D+=B>>>16)<<16,b=65535&E|A<<16,E=65535&(S=m),A=S>>>16,B=65535&(x=a),D=x>>>16,A+=(S=w)>>>16,B+=65535&(x=v),D+=x>>>16,T=i,U=o,F=s,C=a=65535&(B+=(A+=(E+=65535&S)>>>16)>>>16)|(D+=B>>>16)<<16,O=u,L=f,N=h,P=c,q=l,j=p,K=d,Z=m=65535&E|A<<16,H=y,G=_,V=g,z=b,k%16==15)for(M=0;M<16;M++)x=R[M],E=65535&(S=I[M]),A=S>>>16,B=65535&x,D=x>>>16,x=R[(M+9)%16],E+=65535&(S=I[(M+9)%16]),A+=S>>>16,B+=65535&x,D+=x>>>16,v=R[(M+1)%16],E+=65535&(S=((w=I[(M+1)%16])>>>1|v<<31)^(w>>>8|v<<24)^(w>>>7|v<<25)),A+=S>>>16,B+=65535&(x=(v>>>1|w<<31)^(v>>>8|w<<24)^v>>>7),D+=x>>>16,v=R[(M+14)%16],A+=(S=((w=I[(M+14)%16])>>>19|v<<13)^(v>>>29|w<<3)^(w>>>6|v<<26))>>>16,B+=65535&(x=(v>>>19|w<<13)^(w>>>29|v<<3)^v>>>6),D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,R[M]=65535&B|D<<16,I[M]=65535&E|A<<16;E=65535&(S=z),A=S>>>16,B=65535&(x=P),D=x>>>16,x=t[0],A+=(S=e[0])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[0]=P=65535&B|D<<16,e[0]=z=65535&E|A<<16,E=65535&(S=q),A=S>>>16,B=65535&(x=T),D=x>>>16,x=t[1],A+=(S=e[1])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[1]=T=65535&B|D<<16,e[1]=q=65535&E|A<<16,E=65535&(S=j),A=S>>>16,B=65535&(x=U),D=x>>>16,x=t[2],A+=(S=e[2])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[2]=U=65535&B|D<<16,e[2]=j=65535&E|A<<16,E=65535&(S=K),A=S>>>16,B=65535&(x=F),D=x>>>16,x=t[3],A+=(S=e[3])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[3]=F=65535&B|D<<16,e[3]=K=65535&E|A<<16,E=65535&(S=Z),A=S>>>16,B=65535&(x=C),D=x>>>16,x=t[4],A+=(S=e[4])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[4]=C=65535&B|D<<16,e[4]=Z=65535&E|A<<16,E=65535&(S=H),A=S>>>16,B=65535&(x=O),D=x>>>16,x=t[5],A+=(S=e[5])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[5]=O=65535&B|D<<16,e[5]=H=65535&E|A<<16,E=65535&(S=G),A=S>>>16,B=65535&(x=L),D=x>>>16,x=t[6],A+=(S=e[6])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[6]=L=65535&B|D<<16,e[6]=G=65535&E|A<<16,E=65535&(S=V),A=S>>>16,B=65535&(x=N),D=x>>>16,x=t[7],A+=(S=e[7])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[7]=N=65535&B|D<<16,e[7]=V=65535&E|A<<16,W+=128,n-=128}return n}function X(t,e,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Y(i,o,e,r),r%=128,n=0;n=0;--i)Q(t,e,n=r[i/8|0]>>(7&i)&1),J(e,t),J(t,t),Q(t,e,n)}function rt(t,r){var n=[e(),e(),e(),e()];I(n[0],l),I(n[1],p),I(n[2],u),z(n[3],l,p),et(t,n,r)}function nt(t,r,n){var o,s=new Uint8Array(64),a=[e(),e(),e(),e()];for(n||i(r,32),X(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,rt(a,s),tt(t,a),o=0;o<32;o++)r[o+32]=t[o];return 0}var it=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ot(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;i++)e[i]+=r-(e[31]>>4)*it[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*it[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function st(t){var e,r=new Float64Array(64);for(e=0;e<64;e++)r[e]=t[e];for(e=0;e<64;e++)t[e]=0;ot(t,r)}function at(t,r,n,i){var o,s,a=new Uint8Array(64),u=new Uint8Array(64),f=new Uint8Array(64),h=new Float64Array(64),c=[e(),e(),e(),e()];X(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var l=n+64;for(o=0;o=0;n--)q(i,i),1!==n&&z(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}(n,n),z(n,n,o),z(n,n,s),z(n,n,s),z(t[0],n,s),q(i,t[0]),z(i,i,s),F(i,o)&&z(t[0],t[0],d),q(i,t[0]),z(i,i,s),F(i,o)?-1:(C(t[0])===r[31]>>7&&N(t[0],a,t[0]),z(t[3],t[0],t[1]),0)}(l,i))return-1;for(o=0;o=0},t.sign.keyPair=function(){var t=new Uint8Array(ht),e=new Uint8Array(ct);return nt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(pt(t),t.length!==ct)throw new Error("bad secret key size");for(var e=new Uint8Array(ht),r=0;r{!function(t){var e,r,n,i=String.fromCharCode;function o(t){for(var e,r,n=[],i=0,o=t.length;i=55296&&e<=56319&&i=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function a(t,e){return i(t>>e&63|128)}function u(t){if(!(4294967168&t))return i(t);var e="";return 4294965248&t?4294901760&t?4292870144&t||(e=i(t>>18&7|240),e+=a(t,12),e+=a(t,6)):(s(t),e=i(t>>12&15|224),e+=a(t,6)):e=i(t>>6&31|192),e+i(63&t|128)}function f(){if(n>=r)throw Error("Invalid byte index");var t=255&e[n];if(n++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function h(){var t,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(t=255&e[n],n++,!(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|f())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|f()<<6|f())>=2048)return s(i),i;throw Error("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|f()<<12|f()<<6|f())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}t.version="3.0.0",t.encode=function(t){for(var e=o(t),r=e.length,n=-1,i="";++n65535&&(o+=i((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=i(e);return o}(a)}}(e)},94643:(t,e,r)=>{function n(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},36622:t=>{"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},81135:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},40537:(t,e,r)=>{var n=r(65606),i=/%[sdj%]/g;e.format=function(t){if(!_(t)){for(var e=[],r=0;r=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),h(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function f(t,e){return t}function h(t,r,n){if(t.customInspect&&r&&M(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return _(i)||(i=h(t,i,n)),i}var o=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(_(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(r);if(0===s.length){if(M(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(b(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return c(r)}var f,v="",x=!1,S=["{","}"];return p(r)&&(x=!0,S=["[","]"]),M(r)&&(v=" [Function"+(r.name?": "+r.name:"")+"]"),b(r)&&(v=" "+RegExp.prototype.toString.call(r)),w(r)&&(v=" "+Date.prototype.toUTCString.call(r)),k(r)&&(v=" "+c(r)),0!==s.length||x&&0!=r.length?n<0?b(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),f=x?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(f,v,S)):S[0]+v+S[1]}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),A(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=m(r)?h(t,u.value,null):h(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),g(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function m(t){return null===t}function y(t){return"number"==typeof t}function _(t){return"string"==typeof t}function g(t){return void 0===t}function b(t){return v(t)&&"[object RegExp]"===x(t)}function v(t){return"object"==typeof t&&null!==t}function w(t){return v(t)&&"[object Date]"===x(t)}function k(t){return v(t)&&("[object Error]"===x(t)||t instanceof Error)}function M(t){return"function"==typeof t}function x(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(g(o)&&(o=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else s[t]=function(){};return s[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=_,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=b,e.isObject=v,e.isDate=w,e.isError=k,e.isFunction=M,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(81135);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[S((t=new Date).getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":"),[t.getDate(),E[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(36622),e._extend=function(t,e){if(!e||!v(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}},18950:()=>{},78982:()=>{},47790:()=>{},73776:()=>{},21638:()=>{},92668:()=>{},77965:()=>{},66089:()=>{},79368:()=>{},64688:()=>{},51069:()=>{},15340:()=>{},79838:()=>{},69656:()=>{},71281:()=>{},4633:(t,e,r)=>{var n=r(73738).default;function i(){"use strict";t.exports=i=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},o=Object.prototype,s=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},f=u.iterator||"@@iterator",h=u.asyncIterator||"@@asyncIterator",c=u.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(e){l=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),s=new T(n||[]);return a(o,"_invoke",{value:D(t,r,s)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var m="suspendedStart",y="suspendedYield",_="executing",g="completed",b={};function v(){}function w(){}function k(){}var M={};l(M,f,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(U([])));S&&S!==o&&s.call(S,f)&&(M=S);var E=k.prototype=v.prototype=Object.create(M);function A(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(i,o,a,u){var f=d(t[i],t,o);if("throw"!==f.type){var h=f.arg,c=h.value;return c&&"object"==n(c)&&s.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(c).then((function(t){h.value=t,a(h)}),(function(t){return r("throw",t,a,u)}))}u(f.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}})}function D(t,r,n){var i=m;return function(o,s){if(i===_)throw Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:e,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=R(a,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===m)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=_;var f=d(t,r,n);if("normal"===f.type){if(i=n.done?g:y,f.arg===b)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(i=g,n.method="throw",n.arg=f.arg)}}}function R(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;var s=o.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function U(t){if(t||""===t){var r=t[f];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=s.call(o,"catchLoc"),f=s.call(o,"finallyLoc");if(u&&f){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:U(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},r}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},73738:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},54756:(t,e,r)=>{var n=r(4633)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},3219:t=>{"use strict";t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},62951:t=>{"use strict";t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},64589:t=>{"use strict";t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},23241:t=>{"use strict";t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},1636:t=>{"use strict";t.exports={rE:"6.5.5"}},12448:t=>{"use strict";t.exports=JSON.parse('{"name":"kbpgp","description":"Keybase\'s PGP Implementation","keywords":["crypto","pgp","keybase"],"author":"Maxwell Krohn","version":"2.1.15","license":"BSD-3-Clause","types":"./index.d.ts","main":"./lib/main.js","directories":{"lib":"lib/"},"homepage":"http://github.com/keybase/kbpgp","bugs":"https://github.com/keybase/kbpgp/issues","repository":{"type":"git","url":"git://github.com/keybase/kbpgp.git"},"dependencies":{"bn":"^1.0.5","bzip-deflate":"^1.0.0","deep-equal":"^1.1.0","iced-error":"0.0.13","iced-lock":"^1.0.2","iced-runtime":"^1.0.4","keybase-ecurve":"^1.0.1","keybase-nacl":"^1.1.2","minimist":"^1.2.0","pgp-utils":"0.0.35","purepack":"^1.0.5","triplesec":"^4.0.3","tweetnacl":"^0.13.1"},"devDependencies":{"browserify":"^16.5.0","colors":"0.6.2","iced-coffee-script":"108.0.11","iced-test":"0.0.30","icsify":"^0.8.0","uglify-js":"^2.8.29"},"scripts":{"test":"make test"}}')},95755:t=>{"use strict";t.exports=JSON.parse('{"secp128r1":{"p":"fffffffdffffffffffffffffffffffff","a":"fffffffdfffffffffffffffffffffffc","b":"e87579c11079f43dd824993c2cee5ed3","n":"fffffffe0000000075a30d1b9038a115","h":"01","Gx":"161ff7528b899b2d0c28607ca52c5b86","Gy":"cf5ac8395bafeb13c02da292dded7a83"},"secp160k1":{"p":"fffffffffffffffffffffffffffffffeffffac73","a":"00","b":"07","n":"0100000000000000000001b8fa16dfab9aca16b6b3","h":"01","Gx":"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb","Gy":"938cf935318fdced6bc28286531733c3f03c4fee"},"secp160r1":{"p":"ffffffffffffffffffffffffffffffff7fffffff","a":"ffffffffffffffffffffffffffffffff7ffffffc","b":"1c97befc54bd7a8b65acf89f81d4d4adc565fa45","n":"0100000000000000000001f4c8f927aed3ca752257","h":"01","Gx":"4a96b5688ef573284664698968c38bb913cbfc82","Gy":"23a628553168947d59dcc912042351377ac5fb32"},"secp192k1":{"p":"fffffffffffffffffffffffffffffffffffffffeffffee37","a":"00","b":"03","n":"fffffffffffffffffffffffe26f2fc170f69466a74defd8d","h":"01","Gx":"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d","Gy":"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},"secp192r1":{"p":"fffffffffffffffffffffffffffffffeffffffffffffffff","a":"fffffffffffffffffffffffffffffffefffffffffffffffc","b":"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1","n":"ffffffffffffffffffffffff99def836146bc9b1b4d22831","h":"01","Gx":"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012","Gy":"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},"secp256k1":{"p":"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","a":"00","b":"07","n":"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","h":"01","Gx":"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","Gy":"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},"secp256r1":{"p":"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff","a":"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc","b":"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b","n":"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551","h":"01","Gx":"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296","Gy":"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}')},15579:t=>{"use strict";t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";var t={};function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);roe});var y=n(54756),_=n.n(y);function g(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||r(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var b=n(73065),v=n.n(b),w=n(90031),k=n.n(w);function M(t,e,r){return e=p(e),l(t,x()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}const S=function(t){function e(){var t;a(this,e);for(var r=arguments.length,n=new Array(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!t)return"";if("string"==typeof t&&(t=O.strToArrayBuffer(t)),t instanceof ArrayBuffer&&(t=new Uint8Array(t)),64!==(e=O.expandAlphRange(e).join("")).length&&65!==e.length)throw new S(`Invalid Base64 alphabet length (${e.length}): ${e}`);for(var r,n,i,o,s,a,u,f="",h=0;h>2,s=(3&r)<<4|(n=t[h++])>>4,a=(15&n)<<2|(i=t[h++])>>6,u=63&i,isNaN(n)?a=u=64:isNaN(i)&&(u=64),f+=e.charAt(o)+e.charAt(s)+e.charAt(a)+e.charAt(u);return f}function A(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!t)return"string"===r?"":[];if(e=e||"A-Za-z0-9+/=",64!==(e=O.expandAlphRange(e).join("")).length&&65!==e.length)throw new S(`Error: Base64 alphabet should be 64 characters long, or 65 with a padding character. Found ${e.length}: ${e}`);if(n){var o=new RegExp("[^"+e.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");t=t.replace(o,"")}if(i){if(t.length%4==1)throw new S(`Error: Invalid Base64 input length (${t.length}). Cannot be 4n+1, even without padding chars.`);if(65===e.length){var s=e.charAt(64),a=t.indexOf(s);if(a>=0){if(a>2,h=(3&p)<<6|d,(u=c<<2|l>>4)>=0&&u<256&&m.push(u),f>=0&&f<256&&64!==p&&m.push(f),h>=0&&h<256&&64!==d&&m.push(h)}return"string"===r?O.byteArrayToUtf8(m):m}function B(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(r<1||Math.round(r)!==r)throw new S("Byte length must be a positive integer");if("None"!==e){var n="Auto"===e?/[^a-f\d]|0x/gi:O.regexRep(e);t=t.split(n)}else t=[t];for(var i=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:"Auto";e=O.charRep(e);var r=[],n=t.split(e);""===n[n.length-1]&&(n=n.slice(0,n.length-1));for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(r<1||Math.round(r)!==r)throw new S("Byte length must be a positive integer");var n=O.regexRep(e);t=t.replace(n,"");for(var i=[],o=0;o65535){t-=65536;var e=String.fromCharCode(t>>>10&1023|55296);return t=56320|1023&t,e+String.fromCharCode(t)}return String.fromCharCode(t)}},{key:"ord",value:function(t){if(2===t.length){var e=t.charCodeAt(0),r=t.charCodeAt(1);if(e>=55296&&e<56320&&r>=56320&&r<57344)return 1024*(e-55296)+r-56320+65536}return t.charCodeAt(0)}},{key:"padBytesRight",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=new Array(e);return n.fill(r),g(t).forEach((function(t,e){n[e]=t})),n}},{key:"truncate",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return t.length>e&&(t=t.slice(0,e-r.length)+r),t}},{key:"hex",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(e="string"==typeof e?t.ord(e):e).toString(16).padStart(r,"0")}},{key:"bin",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(e="string"==typeof e?t.ord(e):e).toString(2).padStart(r,"0")}},{key:"printable",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t.replace(/[^\x20-\x7f]/g,"."):(t=t.replace(/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,"."),e||(t=t.replace(/[\x09-\x10\u2028\u2029]/g,".")),t)}},{key:"escapeWhitespace",value:function(t){return t.replace(/[\x09-\x10]/g,(function(t){return String.fromCharCode(57344+t.charCodeAt(0))}))}},{key:"parseEscapedChars",value:function(t){return t.replace(/\\([abfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g,(function(t,e){switch(e[0]){case"\\":return"\\";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return String.fromCharCode(parseInt(e,8));case"a":return String.fromCharCode(7);case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(e.substr(1),16));case"u":return"{"===e[1]?String.fromCodePoint(parseInt(e.slice(2,-1),16)):String.fromCharCode(parseInt(e.substr(1),16))}}))}},{key:"escapeRegex",value:function(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(e){for(var r=[],n=0;n=0;i--)r=256*r+t[i];return r}},{key:"intToByteArray",value:function(t,e,r){var n=new Array(e);if("little"===r)for(var i=0;i>>=8;else for(var o=e-1;o>=0;o--)n[o]=255&t,t>>>=8;return n}},{key:"strToArrayBuffer",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to array buffer`),!e)return new ArrayBuffer;for(var r,n=new Uint8Array(e.length),i=e.length;i--;)if(r=e.charCodeAt(i),n[i]=r,r>255)return t.strToUtf8ArrayBuffer(e);return n.buffer}},{key:"strToUtf8ArrayBuffer",value:function(t){if(v().debug(`Converting string[${null==t?void 0:t.length}] to UTF8 array buffer`),!t)return new ArrayBuffer;var e=new TextEncoder("utf-8").encode(t);return t.length!==e.length&&(C()&&self&&"function"==typeof self.setOption?self.setOption("attemptHighlight",!1):F()&&(window.app.options.attemptHighlight=!1)),e.buffer}},{key:"strToByteArray",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to byte array`),!e)return[];for(var r,n=new Array(e.length),i=e.length;i--;)if(r=e.charCodeAt(i),n[i]=r,r>255)return t.strToUtf8ByteArray(e);return n}},{key:"strToUtf8ByteArray",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to UTF8 byte array`),!e)return[];var r=k().encode(e);return e.length!==r.length&&(C()?self.setOption("attemptHighlight",!1):F()&&(window.app.options.attemptHighlight=!1)),t.strToByteArray(r)}},{key:"strToCharcode",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to charcode`),!e)return[];for(var r=[],n=0;n=55296&&i<56320){var o=e[n+1].charCodeAt(0);o>=56320&&o<57344&&(i=t.ord(e[n]+e[++n]))}r.push(i)}return r}},{key:"byteArrayToUtf8",value:function(e){var r;if(v().debug(`Converting byte array[${null===(r=e)||void 0===r?void 0:r.length}] to UTF8`),!e||!e.length)return"";e instanceof Uint8Array||(e=new Uint8Array(e));try{var n=new TextDecoder("utf-8",{fatal:!0}).decode(e);return n.length!==e.length&&(C()?self.setOption("attemptHighlight",!1):F()&&(window.app.options.attemptHighlight=!1)),n}catch(r){return t.byteArrayToChars(e)}}},{key:"byteArrayToChars",value:function(t){if(v().debug(`Converting byte array[${null==t?void 0:t.length}] to chars`),!t||!t.length)return"";for(var e="",r=0;r1&&void 0!==arguments[1])||arguments[1];if(v().debug(`Converting array buffer[${null==e?void 0:e.byteLength}] to str`),!e||!e.byteLength)return"";var n=new Uint8Array(e);return r?t.byteArrayToUtf8(n):t.byteArrayToChars(n)}},{key:"calculateShannonEntropy",value:function(t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var e,r=[],n=new Array(256).fill(0);for(e=0;e0&&r.push(n[e]/t.length);var i,o=0;for(e=0;e1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],o=!1,s=!1,a="",u=[],f=[];t.length&&"\ufeff"===t[0]&&(t=t.substr(1));for(var h=0;h=0?(u.push(a),a=""):!s&&i.indexOf(e)>=0?(u.push(a),a="",f.push(u),u=[],i.indexOf(r)>=0&&r!==e&&h++):a+=e:s=!0;return u.length&&(u.push(a),f.push(u)),f}},{key:"stripHtmlTags",value:function(t){function e(t,r){var n=r.replace(t,"");return n.length===r.length?n:e(t,n)}return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(t=e(/]*>(\s|\S)*?<\/script[^>]*>/gi,t),t=e(/]*>(\s|\S)*?<\/style[^>]*>/gi,t)),e(/<[^>]+>/g,t)}},{key:"escapeHtml",value:function(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","\0":""};return t?t.replace(/[&<>"'`\u0000]/g,(function(t){return e[t]})):t}},{key:"unescapeHtml",value:function(t){var e={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/","`":"`","":"\0"};return t.replace(/(&#?x?[a-z0-9]{2,4};|\ue000)/gi,(function(t){return e[t]||t}))}},{key:"toTitleCase",value:function(t){return t.replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))}},{key:"encodeURIFragment",value:function(t){var e={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(t=encodeURIComponent(t)).replace(/%[0-9A-F]{2}/g,(function(t){return e[t]||t}))}},{key:"generatePrettyRecipe",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="",i="",o="",s="";return t.forEach((function(t){n=t.op.replace(/ /g,"_"),i=JSON.stringify(t.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),o=t.disabled?"/disabled":"",s=t.breakpoint?"/breakpoint":"",r+=`${n}(${i}${o}${s})`,e&&(r+="\n")})),r}},{key:"parseRecipeConfig",value:function(t){if(0===(t=t.trim()).length)return[];if("["===t[0])return JSON.parse(t);var e,r;t=t.replace(/\n/g,"");for(var n=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)/'])*)(\/[^)]+)?\)/g,i=[];e=n.exec(t);){r="["+(r=e[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var o={op:e[1].replace(/_/g," "),args:JSON.parse(r)};e[3]&&e[3].indexOf("disabled")>0&&(o.disabled=!0),e[3]&&e[3].indexOf("breakpoint")>0&&(o.breakpoint=!0),i.push(o)}return i}},{key:"displayFilesAsHTML",value:(e=s(_().mark((function e(r){var n,i,o,a,u;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=function(e){return`
\n
\n
\n ${t.escapeHtml(e.name)}\n
\n
\n
`},i=function(e,r){if(r.startsWith("image")){var n="data:";return n+=r+";",""}return`
${t.escapeHtml(t.arrayBufferToStr(e.buffer))}
`},o=function(){var e=s(_().mark((function e(r,n){var o,s,a,u;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.readFile(r);case 2:return o=e.sent,s=new Blob([o],{type:r.type||"octet/stream"}),a=URL.createObjectURL(s),u=`
\n
\n
\n \n \n ${r.size.toLocaleString()} bytes\n \n save\n \n \n open_in_browser\n \n \n
\n
\n
\n
\n ${i(o,r.type)}\n
\n
\n
`,e.abrupt("return",u);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),a=`
\n ${r.length} file(s) found\n
`,u=0;case 5:if(!(u=t.size)e(i);else{var r=t.slice(o,o+s);n.readAsArrayBuffer(r)}};n.onload=function(t){i.set(new Uint8Array(n.result),o),o+=s,a()},n.onerror=function(t){r(n.error.message)},a()}))}},{key:"readFileSync",value:function(t){if(!U())throw new TypeError("Browser environment cannot support readFileSync");return Uint8Array.from(t.data).buffer}},{key:"mod",value:function(t,e){return(t%e+e)%e}},{key:"gcd",value:function(e,r){return r?t.gcd(r,e%r):e}},{key:"modInv",value:function(t,e){t%=e;for(var r=1;rt?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),e.slice(0,t)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(t,e){return t|=0,e=String(void 0!==e?e:" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),String(this)+e.slice(0,t))});const z=function(t){function e(){var t;a(this,e);for(var r=arguments.length,n=new Array(r),i=0;i0||t===e?e:e-1}function Q(t){for(var e,r,n=1,i=t.length,o=t[0]+"";nf^r?1:-1;for(a=(u=i.length)<(f=o.length)?u:f,s=0;so[s]^r?1:-1;return u==f?0:u>f^r?1:-1}function et(t,e,r,n){if(tr||t!==K(t))throw Error(Z+(n||"Argument")+("number"==typeof t?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function rt(t){var e=t.c.length-1;return J(t.e/V)==e&&t.c[e]%2!=0}function nt(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function it(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else eb?l.c=l.e=null:t.e=10;u/=10,a++);return void(a>b?l.c=l.e=null:(l.e=a,l.c=[t]))}c=String(t)}else{if(!q.test(c=String(t)))return i(l,c,f);l.s=45==c.charCodeAt(0)?(c=c.slice(1),-1):1}(a=c.indexOf("."))>-1&&(c=c.replace(".","")),(u=c.search(/e/i))>0?(a<0&&(a=u),a+=+c.slice(u+1),c=c.substring(0,u)):a<0&&(a=c.length)}else{if(et(e,2,x.length,"Base"),10==e&&S)return R(l=new E(t),d+l.e+1,m);if(c=String(t),f="number"==typeof t){if(0*t!=0)return i(l,c,f,e);if(l.s=1/t<0?(c=c.slice(1),-1):1,E.DEBUG&&c.replace(/^0\.0*|\./,"").length>15)throw Error(H+t)}else l.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1;for(r=x.slice(0,e),a=u=0,h=c.length;ua){a=h;continue}}else if(!s&&(c==c.toUpperCase()&&(c=c.toLowerCase())||c==c.toLowerCase()&&(c=c.toUpperCase()))){s=!0,u=-1,a=0;continue}return i(l,String(t),f,e)}f=!1,(a=(c=n(c,e,10,l.s)).indexOf("."))>-1?c=c.replace(".",""):a=c.length}for(u=0;48===c.charCodeAt(u);u++);for(h=c.length;48===c.charCodeAt(--h););if(c=c.slice(u,++h)){if(h-=u,f&&E.DEBUG&&h>15&&(t>W||t!==K(t)))throw Error(H+l.s*t);if((a=a-u-1)>b)l.c=l.e=null;else if(a=_)?nt(u,s):it(u,s,"0");else if(o=(t=R(new E(t),e,r)).e,a=(u=Q(t.c)).length,1==n||2==n&&(e<=o||o<=y)){for(;aa){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-a)>0)for(o+1==a&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function B(t,e){for(var r,n,i=1,o=new E(t[0]);i=10;i/=10,n++);return(r=n+r*V-1)>b?t.c=t.e=null:r=10;a/=10,i++);if((o=e-i)<0)o+=V,s=e,u=c[f=0],h=K(u/l[i-s-1]%10);else if((f=j((o+1)/V))>=c.length){if(!n)break t;for(;c.length<=f;c.push(0));u=h=0,i=1,s=(o%=V)-V+1}else{for(u=a=c[f],i=1;a>=10;a/=10,i++);h=(s=(o%=V)-V+i)<0?0:K(u/l[i-s-1]%10)}if(n=n||e<0||null!=c[f+1]||(s<0?u:u%l[i-s-1]),n=r<4?(h||n)&&(0==r||r==(t.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(o>0?s>0?u/l[i-s]:0:c[f-1])%10&1||r==(t.s<0?8:7)),e<1||!c[0])return c.length=0,n?(e-=t.e+1,c[0]=l[(V-e%V)%V],t.e=-e||0):c[0]=t.e=0,t;if(0==o?(c.length=f,a=1,f--):(c.length=f+1,a=l[V-o],c[f]=s>0?K(u/l[i-s]%l[s])*a:0),n)for(;;){if(0==f){for(o=1,s=c[0];s>=10;s/=10,o++);for(s=c[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(t.e++,c[0]==G&&(c[0]=1));break}if(c[f]+=a,c[f]!=G)break;c[f--]=0,a=1}for(o=c.length;0===c[--o];c.pop());}t.e>b?t.c=t.e=null:t.e=_?nt(e,r):it(e,r,"0"),t.s<0?"-"+e:e)}return E.clone=t,E.ROUND_UP=0,E.ROUND_DOWN=1,E.ROUND_CEIL=2,E.ROUND_FLOOR=3,E.ROUND_HALF_UP=4,E.ROUND_HALF_DOWN=5,E.ROUND_HALF_EVEN=6,E.ROUND_HALF_CEIL=7,E.ROUND_HALF_FLOOR=8,E.EUCLID=9,E.config=E.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(Z+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(et(r=t[e],0,X,e),d=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(et(r=t[e],0,8,e),m=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(et(r[0],-X,0,e),et(r[1],0,X,e),y=r[0],_=r[1]):(et(r,-X,X,e),y=-(_=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)et(r[0],-X,-1,e),et(r[1],1,X,e),g=r[0],b=r[1];else{if(et(r,-X,X,e),!r)throw Error(Z+e+" cannot be zero: "+r);g=-(b=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(Z+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(Z+"crypto unavailable");v=r}else v=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(et(r=t[e],0,9,e),w=r),t.hasOwnProperty(e="POW_PRECISION")&&(et(r=t[e],0,X,e),k=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(Z+e+" not an object: "+r);M=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(Z+e+" invalid: "+r);S="0123456789"==r.slice(0,10),x=r}}return{DECIMAL_PLACES:d,ROUNDING_MODE:m,EXPONENTIAL_AT:[y,_],RANGE:[g,b],CRYPTO:v,MODULO_MODE:w,POW_PRECISION:k,FORMAT:M,ALPHABET:x}},E.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!E.DEBUG)return!0;var e,r,n=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-X&&i<=X&&i===K(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%V)<1&&(e+=V),String(n[0]).length==e){for(e=0;e=G||r!==K(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(Z+"Invalid BigNumber: "+t)},E.maximum=E.max=function(){return B(arguments,-1)},E.minimum=E.min=function(){return B(arguments,1)},E.random=(o=9007199254740992,s=Math.random()*o&2097151?function(){return K(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,i,o,a=0,u=[],f=new E(p);if(null==t?t=d:et(t,0,X),i=j(t/V),v)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));a>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[a]=r[0],e[a+1]=r[1]):(u.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw v=!1,Error(Z+"crypto unavailable");for(e=crypto.randomBytes(i*=7);a=9e15?crypto.randomBytes(7).copy(e,a):(u.push(o%1e14),a+=7);a=i/7}if(!v)for(;a=10;o/=10,a++);ar-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var u,f,h,c,l,p,y,_,g=n.indexOf("."),b=d,v=m;for(g>=0&&(c=k,k=0,n=n.replace(".",""),p=(_=new E(i)).pow(n.length-g),k=c,_.c=e(it(Q(p.c),p.e,"0"),10,o,t),_.e=_.c.length),h=c=(y=e(n,i,o,a?(u=x,t):(u=t,x))).length;0==y[--c];y.pop());if(!y[0])return u.charAt(0);if(g<0?--h:(p.c=y,p.e=h,p.s=s,y=(p=r(p,_,b,v,o)).c,l=p.r,h=p.e),g=y[f=h+b+1],c=o/2,l=l||f<0||null!=y[f+1],l=v<4?(null!=g||l)&&(0==v||v==(p.s<0?3:2)):g>c||g==c&&(4==v||l||6==v&&1&y[f-1]||v==(p.s<0?8:7)),f<1||!y[0])n=l?it(u.charAt(1),-b,u.charAt(0)):u.charAt(0);else{if(y.length=f,l)for(--o;++y[--f]>o;)y[f]=0,f||(++h,y=[1].concat(y));for(c=y.length;!y[--c];);for(g=0,n="";g<=c;n+=u.charAt(y[g++]));n=it(n,h,u.charAt(0))}return n}}(),r=function(){function t(t,e,r){var n,i,o,s,a=0,u=t.length,f=e%Y,h=e/Y|0;for(t=t.slice();u--;)a=((i=f*(o=t[u]%Y)+(n=h*o+(s=t[u]/Y|0)*f)%Y*Y+a)/r|0)+(n/Y|0)+h*s,t[u]=i%r;return a&&(t=[a].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]1;t.splice(0,1));}return function(n,i,o,s,a){var u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S=n.s==i.s?1:-1,A=n.c,B=i.c;if(!(A&&A[0]&&B&&B[0]))return new E(n.s&&i.s&&(A?!B||A[0]!=B[0]:B)?A&&0==A[0]||!B?0*S:S/0:NaN);for(y=(m=new E(S)).c=[],S=o+(f=n.e-i.e)+1,a||(a=G,f=J(n.e/V)-J(i.e/V),S=S/V|0),h=0;B[h]==(A[h]||0);h++);if(B[h]>(A[h]||0)&&f--,S<0)y.push(1),c=!0;else{for(w=A.length,M=B.length,h=0,S+=2,(l=K(a/(B[0]+1)))>1&&(B=t(B,l,a),A=t(A,l,a),M=B.length,w=A.length),v=M,g=(_=A.slice(0,M)).length;g=a/2&&k++;do{if(l=0,(u=e(B,_,M,g))<0){if(b=_[0],M!=g&&(b=b*a+(_[1]||0)),(l=K(b/k))>1)for(l>=a&&(l=a-1),d=(p=t(B,l,a)).length,g=_.length;1==e(p,_,d,g);)l--,r(p,M=10;S/=10,h++);R(m,o+(m.e=h+f*V-1)+1,s,c)}else m.e=f,m.r=+c;return m}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,f=/^\.([^.]+)$/,h=/^-?(Infinity|NaN)$/,c=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(t,e,r,n){var i,o=r?e:e.replace(c,"");if(h.test(o))t.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,(function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e})),n&&(i=n,o=o.replace(u,"$1").replace(f,"0.$1")),e!=o))return new E(o,i);if(E.DEBUG)throw Error(Z+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},l.absoluteValue=l.abs=function(){var t=new E(this);return t.s<0&&(t.s=1),t},l.comparedTo=function(t,e){return tt(this,new E(t,e))},l.decimalPlaces=l.dp=function(t,e){var r,n,i,o=this;if(null!=t)return et(t,0,X),null==e?e=m:et(e,0,8),R(new E(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=((i=r.length-1)-J(this.e/V))*V,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},l.dividedBy=l.div=function(t,e){return r(this,new E(t,e),d,m)},l.dividedToIntegerBy=l.idiv=function(t,e){return r(this,new E(t,e),0,1)},l.exponentiatedBy=l.pow=function(t,e){var r,n,i,o,s,a,u,f,h=this;if((t=new E(t)).c&&!t.isInteger())throw Error(Z+"Exponent not an integer: "+I(t));if(null!=e&&(e=new E(e)),s=t.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!t.c||!t.c[0])return f=new E(Math.pow(+I(h),s?t.s*(2-rt(t)):+I(t))),e?f.mod(e):f;if(a=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new E(NaN);(n=!a&&h.isInteger()&&e.isInteger())&&(h=h.mod(e))}else{if(t.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||s&&h.c[1]>=24e7:h.c[0]<8e13||s&&h.c[0]<=9999975e7)))return o=h.s<0&&rt(t)?-0:0,h.e>-1&&(o=1/o),new E(a?1/o:o);k&&(o=j(k/V+2))}for(s?(r=new E(.5),a&&(t.s=1),u=rt(t)):u=(i=Math.abs(+I(t)))%2,f=new E(p);;){if(u){if(!(f=f.times(h)).c)break;o?f.c.length>o&&(f.c.length=o):n&&(f=f.mod(e))}if(i){if(0===(i=K(i/2)))break;u=i%2}else if(R(t=t.times(r),t.e+1,1),t.e>14)u=rt(t);else{if(0==(i=+I(t)))break;u=i%2}h=h.times(h),o?h.c&&h.c.length>o&&(h.c.length=o):n&&(h=h.mod(e))}return n?f:(a&&(f=p.div(f)),e?f.mod(e):o?R(f,k,m,void 0):f)},l.integerValue=function(t){var e=new E(this);return null==t?t=m:et(t,0,8),R(e,e.e+1,t)},l.isEqualTo=l.eq=function(t,e){return 0===tt(this,new E(t,e))},l.isFinite=function(){return!!this.c},l.isGreaterThan=l.gt=function(t,e){return tt(this,new E(t,e))>0},l.isGreaterThanOrEqualTo=l.gte=function(t,e){return 1===(e=tt(this,new E(t,e)))||0===e},l.isInteger=function(){return!!this.c&&J(this.e/V)>this.c.length-2},l.isLessThan=l.lt=function(t,e){return tt(this,new E(t,e))<0},l.isLessThanOrEqualTo=l.lte=function(t,e){return-1===(e=tt(this,new E(t,e)))||0===e},l.isNaN=function(){return!this.s},l.isNegative=function(){return this.s<0},l.isPositive=function(){return this.s>0},l.isZero=function(){return!!this.c&&0==this.c[0]},l.minus=function(t,e){var r,n,i,o,s=this,a=s.s;if(e=(t=new E(t,e)).s,!a||!e)return new E(NaN);if(a!=e)return t.s=-e,s.plus(t);var u=s.e/V,f=t.e/V,h=s.c,c=t.c;if(!u||!f){if(!h||!c)return h?(t.s=-e,t):new E(c?s:NaN);if(!h[0]||!c[0])return c[0]?(t.s=-e,t):new E(h[0]?s:3==m?-0:0)}if(u=J(u),f=J(f),h=h.slice(),a=u-f){for((o=a<0)?(a=-a,i=h):(f=u,i=c),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(n=(o=(a=h.length)<(e=c.length))?a:e,a=e=0;e0)for(;e--;h[r++]=0);for(e=G-1;n>a;){if(h[--n]=0;){for(r=0,l=b[i]%y,p=b[i]/y|0,o=i+(s=u);o>i;)r=((f=l*(f=g[--s]%y)+(a=p*f+(h=g[s]/y|0)*l)%y*y+d[o]+r)/m|0)+(a/y|0)+p*h,d[o--]=f%m;d[o]=r}return r?++n:d.splice(0,1),D(t,d,n)},l.negated=function(){var t=new E(this);return t.s=-t.s||null,t},l.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new E(t,e)).s,!i||!e)return new E(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/V,s=t.e/V,a=n.c,u=t.c;if(!o||!s){if(!a||!u)return new E(i/0);if(!a[0]||!u[0])return u[0]?t:new E(a[0]?n:0*i)}if(o=J(o),s=J(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(e=u.length)<0&&(r=u,u=a,a=r,e=i),i=0;e;)i=(a[--e]=a[e]+u[e]+i)/G|0,a[e]=G===a[e]?0:a[e]%G;return i&&(a=[i].concat(a),++s),D(t,a,s)},l.precision=l.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return et(t,1,X),null==e?e=m:et(e,0,8),R(new E(o),t,e);if(!(r=o.c))return null;if(n=(i=r.length-1)*V+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},l.shiftedBy=function(t){return et(t,-9007199254740991,W),this.times("1e"+t)},l.squareRoot=l.sqrt=function(){var t,e,n,i,o,s=this,a=s.c,u=s.s,f=s.e,h=d+4,c=new E("0.5");if(1!==u||!a||!a[0])return new E(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+I(s)))||u==1/0?(((e=Q(a)).length+f)%2==0&&(e+="0"),u=Math.sqrt(+e),f=J((f+1)/2)-(f<0||f%2),n=new E(e=u==1/0?"5e"+f:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+f)):n=new E(u+""),n.c[0])for((u=(f=n.e)+h)<3&&(u=0);;)if(o=n,n=c.times(o.plus(r(s,o,h,1))),Q(o.c).slice(0,u)===(e=Q(n.c)).slice(0,u)){if(n.e0&&d>0){for(o=d%a||a,h=p.substr(0,o);o0&&(h+=f+p.slice(o)),l&&(h="-"+h)}n=c?h+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?c.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):c):h}return(r.prefix||"")+n+(r.suffix||"")},l.toFraction=function(t){var e,n,i,o,s,a,u,f,h,c,l,d,y=this,_=y.c;if(null!=t&&(!(u=new E(t)).isInteger()&&(u.c||1!==u.s)||u.lt(p)))throw Error(Z+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+I(u));if(!_)return new E(y);for(e=new E(p),h=n=new E(p),i=f=new E(p),d=Q(_),s=e.e=d.length-y.e-1,e.c[0]=$[(a=s%V)<0?V+a:a],t=!t||u.comparedTo(e)>0?s>0?e:h:u,a=b,b=1/0,u=new E(d),f.c[0]=0;c=r(u,e,0,1),1!=(o=n.plus(c.times(i))).comparedTo(t);)n=i,i=o,h=f.plus(c.times(o=h)),f=o,e=u.minus(c.times(o=e)),u=o;return o=r(t.minus(n),i,0,1),f=f.plus(o.times(h)),n=n.plus(o.times(i)),f.s=h.s=y.s,l=r(h,i,s*=2,m).minus(y).abs().comparedTo(r(f,n,s,m).minus(y).abs())<1?[h,i]:[f,n],b=a,l},l.toNumber=function(){return+I(this)},l.toPrecision=function(t,e){return null!=t&&et(t,1,X),A(this,t,e,2)},l.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=y||o>=_?nt(Q(r.c),o):it(Q(r.c),o,"0"):10===t&&S?e=it(Q((r=R(new E(r),d+o+1,m)).c),r.e,"0"):(et(t,2,x.length,"Base"),e=n(it(Q(r.c),o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},l.valueOf=l.toJSON=function(){return I(this)},l._isBigNumber=!0,l[Symbol.toStringTag]="BigNumber",l[Symbol.for("nodejs.util.inspect.custom")]=l.valueOf,null!=e&&E.set(e),E}();const st=ot;var at=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;a(this,t),this.bytes=e,this.length=this.bytes.length,this.position=r,this.bitPos=n}return c(t,[{key:"clone",value:function(){return new t(this.bytes,this.position,this.bitPos)}},{key:"getBytes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.position>this.length)){var e=null!==t?this.position+t:this.length,r=this.bytes.slice(this.position,e);return this.position=e,this.bitPos=0,r}}},{key:"readString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(this.position>this.length)){-1===t&&(t=this.length-this.position);for(var e="",r=this.position;r1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r=0;if("be"===e)for(var n=this.position;n=this.position;i--)r<<=8,r|=this.bytes[i];return this.position+=t,this.bitPos=0,r}}},{key:"readBits",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r,n=0,i=0;for(n=this.bytes[this.position++]&(r=this.bitPos,"be"===e?(1<<8-r)-1:256-(1<>>=this.bitPos),i=8-this.bitPos,this.bitPos=0;it){var o=i-t;"be"===e?n>>>=o:n&=(1<this.length))if(this.bitPos=0,"number"!=typeof t){var e=t.length,r=t[e-1];this.position=e;for(var n,i=function(t,e){var r=new Array;return t.forEach((function(t,n){r[t]=e-n})),r}(t,e);this.position=0;o--)if(this.bytes[this.position-e+o]!==t[o]){n=!1,this.position+=i[t[o]];break}if(n){this.position-=e;break}}}else for(;++this.positionthis.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"moveBackwardsBy",value:function(t){var e=this.position-t;if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"moveBackwardsByBits",value:function(t){if(t<=this.bitPos)this.bitPos-=t;else for(this.bitPos>0&&(t-=this.bitPos,this.bitPos=0);t>0;)this.moveBackwardsBy(1),this.bitPos=8,this.moveBackwardsByBits(t),t-=8}},{key:"moveTo",value:function(t){if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"hasMore",value:function(){return this.position0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position;return this.bitPos>0&&e++,this.bytes.slice(t,e)}}])}();function ut(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ft(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ft(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r>4],u=i[(15&s)>>2],f=(2&s)>>1;if("free"===a||"bad"===a||"reserved"===u){r.moveBackwardsBy(1);break}var h=Math.floor(144*a/u+f);if(r.position+h>r.length){r.moveTo(r.length);break}r.moveForwardsBy(h-3)}return r.carve()}},{name:"MPEG-4 Part 14 audio",extension:"m4a",mime:"audio/m4a",description:"",signature:[{4:102,5:116,6:121,7:112,8:77,9:52,10:65},{0:77,1:52,2:65,3:32}],extractor:null},{name:"Free Lossless Audio Codec",extension:"flac",mime:"audio/x-flac",description:"",signature:{0:102,1:76,2:97,3:67},extractor:null},{name:"Adaptive Multi-Rate audio codec",extension:"amr",mime:"audio/amr",description:"",signature:{0:35,1:33,2:65,3:77,4:82,5:10},extractor:null},{name:"Audacity",extension:"au",mime:"audio/x-au",description:"",signature:{0:100,1:110,2:115,3:46,24:65,25:117,26:100,27:97,28:99,29:105,30:116,31:121,32:66,33:108,34:111,35:99,36:107,37:70,38:105,39:108,40:101},extractor:null},{name:"Audacity Block",extension:"auf",mime:"application/octet-stream",description:"",signature:{0:65,1:117,2:100,3:97,4:99,5:105,6:116,7:121,8:66,9:108,10:111,11:99,12:107,13:70,14:105,15:108,16:101},extractor:null},{name:"Audio Interchange File",extension:"aif",mime:"audio/x-aiff",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:70},extractor:null},{name:"Audio Interchange File (compressed)",extension:"aifc",mime:"audio/x-aifc",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:67},extractor:null}],Documents:[{name:"Portable Document Format",extension:"pdf",mime:"application/pdf",description:"",signature:{0:37,1:80,2:68,3:70},extractor:function(t,e){var r=new at(t.slice(e));return r.continueUntil([37,37,69,79,70]),r.moveForwardsBy(5),r.consumeIf(13),r.consumeIf(10),r.carve()}},{name:"Portable Document Format (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:65,1:74,2:86,3:66,4:69,5:82,6:105},extractor:null},{name:"Adobe PostScript",extension:"ps,eps,ai,pfa",mime:"application/postscript",description:"",signature:{0:37,1:33,2:80,3:83,4:45,5:65,6:100,7:111,8:98,9:101},extractor:null},{name:"PostScript",extension:"ps",mime:"application/postscript",description:"",signature:{0:37,1:33},extractor:null},{name:"Encapsulated PostScript",extension:"eps,ai",mime:"application/eps",description:"",signature:{0:197,1:208,2:211,3:198},extractor:null},{name:"Rich Text Format",extension:"rtf",mime:"application/rtf",description:"",signature:{0:123,1:92,2:114,3:116},extractor:function(t,e){var r=new at(t.slice(e)),n=0;if(123!==r.readInt(1))throw new Error("Not a valid RTF file");for(n++;n>0&&r.hasMore();)switch(r.readInt(1)){case 123:n++;break;case 125:n--;break;case 92:r.consumeIf(92),r.position++}return r.carve()}},{name:"Microsoft Office document/OLE2",extension:"ole2,doc,xls,dot,ppt,xla,ppa,pps,pot,msi,sdw,db,vsd,msg",mime:"application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint",description:"Microsoft Office documents",signature:{0:208,1:207,2:17,3:224,4:161,5:177,6:26,7:225},extractor:null},{name:"Microsoft Office document/OLE2 (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:48,1:77,2:56,3:82,4:52,5:75,6:71,7:120},extractor:null},{name:"Microsoft Office 2007+ document",extension:"docx,xlsx,pptx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation",description:"",signature:{38:95,39:84,40:121,41:112,42:101,43:115,44:93,45:46,46:120,47:109,48:108},extractor:ct},{name:"Microsoft Access database",extension:"mdb,mda,mde,mdt,fdb,psa",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:74,14:101,15:116},extractor:null},{name:"Microsoft Access 2007+ database",extension:"accdb,accde,accda,accdu",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:65,14:67,15:69,16:32},extractor:null},{name:"Microsoft OneNote document",extension:"one",mime:"application/onenote",description:"",signature:{0:228,1:82,2:92,3:123,4:140,5:216,6:167,7:77,8:174,9:177,10:83,11:120,12:208,13:41,14:150,15:211},extractor:null},{name:"Outlook Express database",extension:"dbx",mime:"application/octet-stream",description:"",signature:{0:207,1:173,2:18,3:254,4:[48,197,198,199],11:17},extractor:null},{name:"Personal Storage Table (Outlook)",extension:"pst,ost,fdb,pab",mime:"application/octet-stream",description:"",signature:{0:33,1:66,2:68,3:78},extractor:null},{name:"Microsoft Exchange Database",extension:"edb",mime:"application/octet-stream",description:"",signature:{4:239,5:205,6:171,7:137,8:[32,35],9:6,10:0,11:0,12:[0,1],13:0,14:0,15:0},extractor:null},{name:"WordPerfect document",extension:"wpd,wp,wp5,wp6,wpp,bk!,wcm",mime:"application/wordperfect",description:"",signature:{0:255,1:87,2:80,3:67,7:[0,1,2],8:1,9:10},extractor:null},{name:"EPUB e-book",extension:"epub",mime:"application/epub+zip",description:"",signature:{0:80,1:75,2:3,3:4,30:109,31:105,32:109,33:101,34:116,35:121,36:112,37:101,38:97,39:112,40:112,41:108,42:105,43:99,44:97,45:116,46:105,47:111,48:110,49:47,50:101,51:112,52:117,53:98,54:43,55:122,56:105,57:112},extractor:ct}],Applications:[{name:"Windows Portable Executable",extension:"exe,dll,drv,vxd,sys,ocx,vbx,com,fon,scr",mime:"application/vnd.microsoft.portable-executable",description:"",signature:{0:77,1:90,3:[0,1,2],5:[0,1,2]},extractor:function(t,e){var r=new at(t.slice(e));r.moveTo(60);var n=r.readInt(4,"le");r.moveTo(n),r.moveForwardsBy(6);var i=r.readInt(2,"le");r.moveForwardsBy(16);var o=523===r.readInt(2,"le")?112:96;r.moveForwardsBy(o-2),r.moveForwardsBy(32);var s=r.readInt(4,"le"),a=r.readInt(4,"le");if(s>0)return r.moveTo(s+a),r.carve();r.moveForwardsBy(88),r.moveForwardsBy(40*(i-1)),r.moveForwardsBy(16);var u=r.readInt(4,"le"),f=r.readInt(4,"le");return r.moveTo(f+u),r.carve()}},{name:"Executable and Linkable Format",extension:"elf,bin,axf,o,prx,so",mime:"application/x-executable",description:"Executable and Linkable Format file. No standard file extension.",signature:{0:127,1:69,2:76,3:70},extractor:function(t,e){var r=new at(t.slice(e));r.moveForwardsBy(4);var n=1===r.readInt(1),i=1===r.readInt(1)?"le":"be";r.moveForwardsBy(n?26:34);var o=n?r.readInt(4,i):r.readInt(8,i);r.moveForwardsBy(10);var s=r.readInt(2,i),a=r.readInt(2,i);return r.moveTo(o),r.moveForwardsBy(s*a),r.carve()}},{name:"MacOS Mach-O object",extension:"dylib",mime:"application/octet-stream",description:"",signature:[{0:202,1:254,2:186,3:190,4:0,5:0,6:0,7:[1,2,3]},{0:206,1:250,2:237,3:254,4:7,5:0,6:0,7:0,8:[1,2,3]}],extractor:lt},{name:"MacOS Mach-O 64-bit object",extension:"dylib",mime:"application/octet-stream",description:"",signature:{0:207,1:250,2:237,3:254},extractor:lt},{name:"Adobe Flash",extension:"swf",mime:"application/x-shockwave-flash",description:"",signature:{0:[67,70],1:87,2:83},extractor:null},{name:"Java Class",extension:"class",mime:"application/java-vm",description:"",signature:{0:202,1:254,2:186,3:190},extractor:null},{name:"Dalvik Executable",extension:"dex",mime:"application/octet-stream",description:"Dalvik Executable as used by Android",signature:{0:100,1:101,2:120,3:10,4:48,5:51,6:53,7:0},extractor:null},{name:"Google Chrome Extension",extension:"crx",mime:"application/crx",description:"Google Chrome extension or packaged app",signature:{0:67,1:114,2:50,3:52},extractor:null}],Archives:[{name:"PKZIP archive",extension:"zip",mime:"application/zip",description:"",signature:{0:80,1:75,2:[3,5,7],3:[4,6,8]},extractor:ct},{name:"PKZIP archive (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:85,1:69,2:115,3:68,4:66,5:66},extractor:null},{name:"TAR archive",extension:"tar",mime:"application/x-tar",description:"",signature:{257:117,258:115,259:116,260:97,261:114},extractor:function(t,e){for(var r=new at(t.slice(e)),n=function(){if(r.moveForwardsBy(257),r.getBytes(5).join("")!==[117,115,116,97,114].join(""))return r.moveBackwardsBy(262),1;r.moveBackwardsBy(138);var t=0;r.getBytes(11).forEach((function(e,r){t+=(e-48).toString()})),t=512*Math.ceil(parseInt(t,8)/512),r.moveForwardsBy(t+377)};r.hasMore()&&!n(););return r.consumeWhile(0),r.carve()}},{name:"Roshal Archive",extension:"rar",mime:"application/x-rar-compressed",description:"",signature:{0:82,1:97,2:114,3:33,4:26,5:7,6:[0,1]},extractor:null},{name:"Gzip",extension:"gz",mime:"application/gzip",description:"",signature:{0:31,1:139,2:8},extractor:function(t,e){var r=new at(t.slice(e));r.moveForwardsBy(3);var n=r.readInt(1);if(r.moveForwardsBy(4),r.readInt(1),r.moveForwardsBy(1),4&n){var i=r.readInt(2,"le");r.moveForwardsby(i)}return 8&n&&(r.continueUntil(0),r.moveForwardsBy(1)),16&n&&(r.continueUntil(0),r.moveForwardsBy(1)),2&n&&r.moveForwardsBy(2),gt(r),r.moveForwardsBy(8),r.carve()}},{name:"Bzip2",extension:"bz2",mime:"application/x-bzip2",description:"",signature:{0:66,1:90,2:104},extractor:function(t,e){for(var r=new at(t.slice(e)),n=[[119,36,83,133,9],[238,72,167,10,18],[220,145,78,20,36],[185,34,156,40,72],[114,69,56,80,144],[187,146,41,194,132],[93,201,20,225,66],[46,228,138,112,161],[23,114,69,56,80]],i=0;i=2368&&r.moveForwardsBy(4);var a=r.readInt(1,"be");if(r.moveForwardsBy(a),64&s){var u=r.readInt(4,"be");r.moveForwardsBy(u)}for(r.moveForwardsBy(4);r.hasMore();){var f=r.readInt(4,"be");if(0===f)break;var h=r.readInt(4,"be"),c=f===h?i:i+n;r.moveForwardsBy(h+4*c)}return r.carve()}},{name:"Linux deb package",extension:"deb",mime:"application/vnd.debian.binary-package",description:"",signature:{0:33,1:60,2:97,3:114,4:99,5:104,6:62},extractor:function(t,e){var r=new at(t.slice(e));for(r.moveForwardsBy(8);r.hasMore();){r.moveForwardsBy(48);var n,i="",o=ut(r.getBytes(10));try{for(o.s();!(n=o.n()).done;){var s=n.value;i+=String.fromCharCode(s)}}catch(t){o.e(t)}finally{o.f()}i=parseInt(i.trim(),10),r.moveForwardsBy(2),r.moveForwardsBy(i)}return r.carve()}},{name:"Apple Disk Image",extension:"dmg",mime:"application/x-apple-diskimage",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96},extractor:null}],Miscellaneous:[{name:"UTF-8 text",extension:"txt",mime:"text/plain",description:"UTF-8 encoded Unicode byte order mark, commonly but not exclusively seen in text files.",signature:{0:239,1:187,2:191},extractor:null},{name:"UTF-32 LE text",extension:"utf32le",mime:"charset/utf32le",description:"Little-endian UTF-32 encoded Unicode byte order mark.",signature:{0:255,1:254,2:0,3:0},extractor:null},{name:"UTF-16 LE text",extension:"utf16le",mime:"charset/utf16le",description:"Little-endian UTF-16 encoded Unicode byte order mark.",signature:{0:255,1:254},extractor:null},{name:"Web Open Font Format",extension:"woff",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:70,4:0,5:1,6:0,7:0},extractor:null},{name:"Web Open Font Format 2",extension:"woff2",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:50,4:0,5:1,6:0,7:0},extractor:null},{name:"Embedded OpenType font",extension:"eot",mime:"application/octet-stream",description:"",signature:[{8:2,9:0,10:1,34:76,35:80},{8:1,9:0,10:0,34:76,35:80},{8:2,9:0,10:2,34:76,35:80}],extractor:null},{name:"TrueType Font",extension:"ttf",mime:"application/font-sfnt",description:"",signature:{0:0,1:1,2:0,3:0,4:0},extractor:null},{name:"OpenType Font",extension:"otf",mime:"application/font-sfnt",description:"",signature:{0:79,1:84,2:84,3:79,4:0},extractor:null},{name:"SQLite",extension:"sqlite",mime:"application/x-sqlite3",description:"",signature:{0:83,1:81,2:76,3:105},extractor:function(t,e){var r=new at(t.slice(e));r.moveTo(16);var n=r.readInt(2);r.moveTo(28);var i=r.readInt(4);return r.moveTo(n*i),r.carve()}},{name:"BitTorrent link",extension:"torrent",mime:"application/x-bittorrent",description:"",signature:[{0:100,1:56,2:58,3:97,4:110,5:110,6:111,7:117,8:110,9:99,10:101,11:35,12:35,13:58},{0:100,1:52,2:58,3:105,4:110,5:102,6:111,7:100,8:[52,53,54],9:58}],extractor:null},{name:"Cryptocurrency wallet",extension:"wallet",mime:"application/octet-stream",description:"",signature:{0:0,1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:98,13:49,14:5,15:0},extractor:null},{name:"Registry fragment",extension:"hbin",mime:"application/octet-stream",description:"",signature:{0:104,1:98,2:105,3:110,4:0},extractor:null},{name:"Registry script",extension:"rgs",mime:"application/octet-stream",description:"",signature:{0:72,1:75,2:67,3:82,4:13,5:10,6:92,7:123},extractor:null},{name:"WinNT Registry Hive",extension:"registry",mime:"application/octet-stream",description:"",signature:{0:114,1:101,2:103,3:102},extractor:null},{name:"Windows Event Log",extension:"evt",mime:"application/octet-stream",description:"",signature:{0:48,1:0,2:0,3:0,4:76,5:102,6:76,7:101},extractor:function(t,e){var r=new at(t.slice(e));r.moveTo(20);var n=r.readInt(4,"le");r.moveTo(n);var i=r.readInt(4,"le");return r.moveForwardsBy(i-4),r.carve()}},{name:"Windows Event Log",extension:"evtx",mime:"application/octet-stream",description:"",signature:{0:69,1:108,2:102,3:70,4:105,5:108,6:101},extractor:function(t,e){var r=new at(t.slice(e));r.moveTo(40);var n=r.readInt(4,"le")-44;for(r.moveForwardsBy(n);r.hasMore()&&r.getBytes(7).join("")===[69,108,102,67,104,110,107].join("");)r.moveForwardsBy(65529);return r.consumeWhile(0),r.carve()}},{name:"Windows Pagedump",extension:"dmp",mime:"application/octet-stream",description:"",signature:{0:80,1:65,2:71,3:69,4:68,5:85,6:[77,54],7:[80,52]},extractor:function(t,e){var r=new at(t.slice(e));return r.moveTo(112),r.moveTo(4096*(r.readInt(4,"le")+1)),r.carve()}},{name:"Windows Prefetch",extension:"pf",mime:"application/x-pf",description:"",signature:{0:[17,23,26],1:0,2:0,3:0,4:83,5:67,6:67,7:65},extractor:function(t,e){var r=new at(t.slice(e));return r.moveTo(12),r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"Windows Prefetch (Win 10)",extension:"pf",mime:"application/x-pf",description:"",signature:{0:77,1:65,2:77,3:4,7:0},extractor:function(t,e){var r=new at(t.slice(e));return r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"PList (XML)",extension:"plist",mime:"application/xml",description:"",signature:{39:60,40:33,41:68,42:79,43:67,44:84,45:89,46:80,47:69,48:32,49:112,50:108,51:105,52:115,53:116},extractor:function(t,e){var r=new at(t.slice(e)),n=0;for(r.continueUntil([60,112,108,105,115,116]),r.moveForwardsBy(6),n++;n>0&&r.hasMore();)60===r.readInt(1)&&(r.getBytes(5).join("")===[112,108,105,115,116].join("")?n++:r.moveBackwardsBy(5),r.getBytes(7).join("")===[47,112,108,105,115,116,62].join("")?n--:r.moveBackwardsBy(7));return r.consumeIf(10),r.carve()}},{name:"PList (binary)",extension:"bplist,plist,ipmeta,abcdp,mdbackup,mdinfo,strings,nib,ichat,qtz,webbookmark,webhistory",mime:"application/x-plist",description:"",signature:{0:98,1:112,2:108,3:105,4:115,5:116,6:48,7:48},extractor:null},{name:"MacOS X Keychain",extension:"keychain",mime:"application/octet-stream",description:"",signature:{0:107,1:121,2:99,3:104,4:0,5:1},extractor:function(t,e){var r=new at(t.slice(e));return r.moveTo(20),r.moveForwardsBy(r.readInt(4)),r.carve()}},{name:"TCP Packet",extension:"tcp",mime:"application/tcp",description:"",signature:{12:8,13:0,14:69,15:0,21:0,22:function(t){return t>=1&&t<=128},23:6},extractor:null},{name:"UDP Packet",extension:"udp",mime:"application/udp",description:"",signature:{12:8,13:0,14:69,15:0,16:[0,1,2,3,4,5],22:function(t){return t>=1&&t<=128},23:17},extractor:null},{name:"Compiled HTML",extension:"chm,chw,chi",mime:"application/vnd.ms-htmlhelp",description:"",signature:{0:73,1:84,2:83,3:70,4:3,5:0,6:0,7:0},extractor:null},{name:"Windows Password",extension:"pwl",mime:"application/octet-stream",description:"",signature:{0:227,1:130,2:133,3:150},extractor:null},{name:"Bitlocker recovery key",extension:"bitlocker",mime:"application/octet-stream",description:"",signature:{0:255,1:254,2:66,3:0,4:105,5:0,6:116,7:0,8:76,9:0,10:111,11:0,12:99,13:0,14:107,15:0,16:101,17:0,18:114,19:0,20:32,21:0},extractor:null},{name:"Certificate",extension:"cer,cat,p7b,p7c,p7m,p7s,swz,rsa,crl,crt,der",mime:"application/pkix-cert",description:"",signature:{0:48,1:130,4:[6,10,48]},extractor:null},{name:"Certificate",extension:"cat,swz,p7m",mime:"application/vnd.ms-pki.seccat",description:"",signature:{0:48,1:131,2:function(t){return 0!==t},5:6,6:9},extractor:null},{name:"PGP pubring",extension:"pkr,gpg",mime:"application/pgp-keys",description:"",signature:{0:153,1:1,2:[13,162],3:4},extractor:null},{name:"PGP secring",extension:"skr",mime:"application/pgp-keys",description:"",signature:[{0:149,1:1,2:207,3:4},{0:149,1:3,2:198,3:4},{0:149,1:5,2:134,3:4}],extractor:null},{name:"PGP Safe",extension:"pgd",mime:"application/pgp-keys",description:"",signature:{0:80,1:71,2:80,3:100,4:77,5:65,6:73,7:78,8:96,9:1,10:0},extractor:null},{name:"Task Scheduler",extension:"job",mime:"application/octet-stream",description:"",signature:{0:[0,1,2,3],1:[5,6],2:1,3:0,20:70,21:0},extractor:null},{name:"Windows Shortcut",extension:"lnk",mime:"application/x-ms-shortcut",description:"",signature:{0:76,1:0,2:0,3:0,4:1,5:20,6:2,7:0,8:0,9:0,10:0,11:0,12:192,13:0,14:0,15:0,16:0,17:0,18:0,19:70},extractor:function(t,e){var r=new at(t.slice(e));return r.moveTo(52),r.moveTo(r.readInt(4,"le")),r.carve()}},{name:"Bash",extension:"bash",mime:"application/bash",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:98,8:97,9:115,10:104},extractor:null},{name:"Shell",extension:"sh",mime:"application/sh",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:115,8:104},extractor:null},{name:"Python",extension:"py,pyc,pyd,pyo,pyw,pyz",mime:"application/python",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:121,13:116,14:104,15:111,16:110,17:[50,51,10,13]},extractor:null},{name:"Ruby",extension:"rb",mime:"application/ruby",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:114,12:117,13:98,14:121},extractor:null},{name:"perl",extension:"pl,pm,t,pod",mime:"application/perl",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:101,13:114,14:108},extractor:null},{name:"php",extension:"php,phtml,php3,php4,php5,php7,phps,php-s,pht,phar",mime:"application/php",description:"",signature:{0:60,1:63,2:112,3:104,4:112},extractor:null},{name:"Smile",extension:"sml",mime:"\tapplication/x-jackson-smile",description:"",signature:{0:58,1:41,2:10},extractor:null},{name:"Lua Bytecode",extension:"luac",mime:"application/x-lua",description:"",signature:{0:27,1:76,2:117,3:97},extractor:null},{name:"WebAssembly binary",extension:"wasm",mime:"application/octet-stream",description:"",signature:{0:0,1:97,2:115,3:109},extractor:null}]};function ct(t,e){var r=new at(t.slice(e));r.continueUntil([80,75,5,6]),r.moveForwardsBy(20);var n=r.readInt(2,"le");return r.moveForwardsBy(n),r.carve()}function lt(t,e){var r="207250237254",n=new at(t.slice(e)),i=n.getBytes(4).join("");return n.moveTo(function(t,e,r){var n=28;e&&(n+=4),t.moveTo(16);var i=t.readInt(4,r);return function(t,e,r,n){for(var i=0,o=0;o0&&t.moveForwardsBy(1)}var bt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],vt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function wt(t,e,r){for(var n,i=0;(n=Mt(t,e))&&256!==n;){if(++i>1e4)throw new Error("Caught in probable infinite loop while parsing Huffman Block");n<256||(t.readBits(bt[n-257],"le"),n=Mt(t,r),t.readBits(vt[n],"le"))}}function kt(t){for(var e=Math.max.apply(Math,t),r=Math.min.apply(Math,t),n=1<>=1;for(var l=o<<16|u,p=f;p>>16;if(a>o)throw new Error(`Invalid Huffman Code length while parsing DEFLATE block at pos ${t.position}: ${a}`);return t.moveBackwardsByBits(o-a),65535&s}function xt(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t.length){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:0;for(var n in t){var i=parseInt(n,10)+r;switch(typeof t[n]){case"number":if(e[i]!==t[n])return!1;break;case"object":if(t[n].indexOf(e[i])<0)return!1;break;case"function":if(!t[n](e[i]))return!1;break;default:throw new Error(`Unrecognised signature type at offset ${n}`)}}return!0}const Et=function(){return c((function t(){a(this,t)}),null,[{key:"checkForValue",value:function(t){if(void 0===t)throw new Error("only use translation methods with .bind")}},{key:"toArrayBuffer",value:function(){throw new Error("toArrayBuffer has not been implemented")}},{key:"fromArrayBuffer",value:function(){throw new Error("fromArrayBuffer has not been implemented")}}])}();function At(t,e,r){return e=p(e),l(t,Bt()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function Bt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bt=function(){return!!t})()}const Dt=function(t){function e(){return a(this,e),At(this,e,arguments)}return m(e,t),c(e,null,[{key:"toArrayBuffer",value:function(){e.checkForValue(this.value),this.value=new Uint8Array(this.value).buffer}},{key:"fromArrayBuffer",value:function(){e.checkForValue(this.value),this.value=Array.prototype.slice.call(new Uint8Array(this.value))}}])}(Et);function Rt(t,e,r){return e=p(e),l(t,It()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function It(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(It=function(){return!!t})()}const Pt=function(t){function e(){return a(this,e),Rt(this,e,arguments)}return m(e,t),c(e,null,[{key:"toArrayBuffer",value:function(){e.checkForValue(this.value),this.value=st.isBigNumber(this.value)?O.strToArrayBuffer(this.value.toFixed()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){e.checkForValue(this.value);try{this.value=new st(O.arrayBufferToStr(this.value))}catch(t){this.value=new st(NaN)}}}])}(Et);function Tt(t,e,r){return e=p(e),l(t,Ut()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function Ut(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ut=function(){return!!t})()}const Ft=function(t){function e(){return a(this,e),Tt(this,e,arguments)}return m(e,t),c(e,null,[{key:"toArrayBuffer",value:function(){var t=this;if(e.checkForValue(this.value),!U())return new Promise((function(e,r){O.readFile(t.value).then((function(e){return t.value=e.buffer})).then(e).catch(r)}));this.value=O.readFileSync(this.value)}},{key:"fromArrayBuffer",value:function(){e.checkForValue(this.value),this.value=new File(this.value,"unknown")}}])}(Et);function Ct(t,e,r){return e=p(e),l(t,Ot()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function Ot(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ot=function(){return!!t})()}const Lt=function(t){function e(){return a(this,e),Ct(this,e,arguments)}return m(e,t),c(e,null,[{key:"toArrayBuffer",value:function(){e.checkForValue(this.value),this.value=this.value?O.strToArrayBuffer(this.value):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){e.checkForValue(this.value),this.value=this.value?O.arrayBufferToStr(this.value):""}}])}(Et);function Nt(t,e,r){return e=p(e),l(t,zt()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function zt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zt=function(){return!!t})()}const qt=function(t){function e(){return a(this,e),Nt(this,e,arguments)}return m(e,t),c(e,null,[{key:"toArrayBuffer",value:function(){e.checkForValue(this.value),this.value=this.value?O.strToArrayBuffer(O.unescapeHtml(O.stripHtmlTags(this.value,!0))):new ArrayBuffer}}])}(Lt);function jt(t,e,r){return e=p(e),l(t,Kt()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kt=function(){return!!t})()}const Zt=function(t){function e(){return a(this,e),jt(this,e,arguments)}return m(e,t),c(e,null,[{key:"toArrayBuffer",value:function(){e.checkForValue(this.value),this.value=void 0!==this.value?O.strToArrayBuffer(JSON.stringify(this.value,null,4)):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){e.checkForValue(this.value),this.value=JSON.parse(O.arrayBufferToStr(this.value))}}])}(Et);function Ht(t,e,r){return e=p(e),l(t,Gt()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function Gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gt=function(){return!!t})()}const Vt=function(t){function e(){return a(this,e),Ht(this,e,arguments)}return m(e,t),c(e,null,[{key:"toArrayBuffer",value:(n=s(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.checkForValue(this.value),!U()){t.next=5;break}this.value=this.value.map((function(t){return Uint8Array.from(t.data)})),t.next=8;break;case 5:return t.next=7,e.concatenateTypedArraysWithTypedElements.apply(e,g(this.value));case 7:this.value=t.sent;case 8:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"fromArrayBuffer",value:function(){e.checkForValue(this.value),this.value=[new File(this.value,"unknown")]}},{key:"concatenateTypedArraysWithTypedElements",value:(r=s(_().mark((function t(){var e,r,n,i,o,s,a,u,f,h,c,l,p,d=arguments;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=0,r=d.length,n=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(a(this,t),this.value=new ArrayBuffer(0),this.type=t.ARRAY_BUFFER,e&&Object.prototype.hasOwnProperty.call(e,"value")&&Object.prototype.hasOwnProperty.call(e,"type"))this.set(e.value,e.type);else if(e&&null!==r)this.set(e,r);else if(e){var n=t.typeEnum(e.constructor.name);this.set(e,n)}}return c(t,[{key:"get",value:function(e){var r=this;return"string"==typeof e&&(e=t.typeEnum(e)),this.type!==e?U()?(this._translate(e),this.value):new Promise((function(t,n){r._translate(e).then((function(){t(r.value)})).catch(n)})):this.value}},{key:"set",value:function(e,r){if("string"==typeof r&&(r=t.typeEnum(r)),v().debug("Dish type: "+t.enumLookup(r)),this.value=e,this.type=r,!this.valid()){var n=O.truncate(JSON.stringify(this.value),25);throw new z(`Data is not a valid ${t.enumLookup(r)}: ${n}`)}}},{key:"presentAs",value:function(t){return this.clone().get(t)}},{key:"detectDishType",value:function(){var t=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(ht);if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t&&t.length>1))return[];var r=[],n={};for(var i in ht)e.includes(i)&&(n[i]=ht[i]);for(var o in n)n[o].forEach((function(e){xt(e.signature,t)&&r.push(e)}));return r}(new Uint8Array(this.value.slice(0,2048)));return t.length&&t[0].mime&&"text/plain"===t[0].mime?t[0].mime:null}},{key:"getTitle",value:(e=s(_().mark((function e(r){var n,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="",e.t0=this.type,e.next=e.t0===t.FILE?4:e.t0===t.LIST_FILE?6:e.t0===t.JSON?8:e.t0===t.NUMBER||e.t0===t.BIG_NUMBER?10:e.t0===t.ARRAY_BUFFER||e.t0===t.BYTE_ARRAY?12:15;break;case 4:return n=this.value.name,e.abrupt("break",26);case 6:return n=`${this.value.length} file(s)`,e.abrupt("break",26);case 8:return n="application/json",e.abrupt("break",26);case 10:return n=this.value.toString(),e.abrupt("break",26);case 12:if(null===(n=this.detectDishType())){e.next=15;break}return e.abrupt("break",26);case 15:return e.prev=15,(i=this.clone()).value=i.value.slice(0,256),e.next=20,i.get(t.STRING);case 20:n=e.sent,e.next=26;break;case 23:e.prev=23,e.t1=e.catch(15),v().error(`${t.enumLookup(this.type)} cannot be sliced. ${e.t1}`);case 26:return e.abrupt("return",n.slice(0,r));case 27:case"end":return e.stop()}}),e,this,[[15,23]])}))),function(t){return e.apply(this,arguments)})},{key:"valid",value:function(){switch(this.type){case t.BYTE_ARRAY:if(!(this.value instanceof Uint8Array||this.value instanceof Array))return!1;for(var e=0;e255)return!1;return!0;case t.STRING:case t.HTML:return"string"==typeof this.value;case t.NUMBER:return"number"==typeof this.value;case t.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case t.BIG_NUMBER:if(st.isBigNumber(this.value))return!0;if(Object.keys(this.value).sort().equals(["c","e","s"])){var r=new st;return r.c=this.value.c,r.e=this.value.e,r.s=this.value.s,this.value=r,!0}return!1;case t.JSON:return!0;case t.FILE:return this.value instanceof File;case t.LIST_FILE:return this.value instanceof Array&&this.value.reduce((function(t,e){return t&&e instanceof File}),!0);default:return!1}}},{key:"size",get:function(){switch(this.type){case t.BYTE_ARRAY:case t.STRING:case t.HTML:return this.value.length;case t.NUMBER:case t.BIG_NUMBER:return this.value.toString().length;case t.ARRAY_BUFFER:return this.value.byteLength;case t.JSON:return JSON.stringify(this.value).length;case t.FILE:return this.value.size;case t.LIST_FILE:return this.value.reduce((function(t,e){return t+e.size}),0);default:return-1}}},{key:"clone",value:function(){var e=new t;switch(this.type){case t.STRING:case t.HTML:case t.NUMBER:case t.BIG_NUMBER:e.set(this.value,this.type);break;case t.BYTE_ARRAY:case t.JSON:e.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case t.ARRAY_BUFFER:e.set(this.value.slice(0),this.type);break;case t.FILE:e.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case t.LIST_FILE:e.set(this.value.map((function(t){return new File([t],t.name,{type:t.type,lastModified:t.lastModified})})),this.type);break;default:throw new z("Cannot clone Dish, unknown type")}return e}},{key:"_translate",value:function(e){var r=this;if(v().debug(`Translating Dish from ${t.enumLookup(this.type)} to ${t.enumLookup(e)}`),!U())return new Promise((function(n,i){r._toArrayBuffer().then((function(){return r.type=t.ARRAY_BUFFER})).then((function(){r._fromArrayBuffer(e),n()})).catch(i)}));this._toArrayBuffer(),this.type=t.ARRAY_BUFFER,this._fromArrayBuffer(e)}},{key:"_toArrayBuffer",value:function(){var e=this,r={browser:{[t.STRING]:function(){return Promise.resolve(Lt.toArrayBuffer.bind(e)())},[t.NUMBER]:function(){return Promise.resolve(Yt.toArrayBuffer.bind(e)())},[t.HTML]:function(){return Promise.resolve(qt.toArrayBuffer.bind(e)())},[t.ARRAY_BUFFER]:function(){return Promise.resolve()},[t.BIG_NUMBER]:function(){return Promise.resolve(Pt.toArrayBuffer.bind(e)())},[t.JSON]:function(){return Promise.resolve(Zt.toArrayBuffer.bind(e)())},[t.FILE]:function(){return Ft.toArrayBuffer.bind(e)()},[t.LIST_FILE]:function(){return Promise.resolve(Vt.toArrayBuffer.bind(e)())},[t.BYTE_ARRAY]:function(){return Promise.resolve(Dt.toArrayBuffer.bind(e)())}},node:{[t.STRING]:function(){return Lt.toArrayBuffer.bind(e)()},[t.NUMBER]:function(){return Yt.toArrayBuffer.bind(e)()},[t.HTML]:function(){return qt.toArrayBuffer.bind(e)()},[t.ARRAY_BUFFER]:function(){},[t.BIG_NUMBER]:function(){return Pt.toArrayBuffer.bind(e)()},[t.JSON]:function(){return Zt.toArrayBuffer.bind(e)()},[t.FILE]:function(){return Ft.toArrayBuffer.bind(e)()},[t.LIST_FILE]:function(){return Vt.toArrayBuffer.bind(e)()},[t.BYTE_ARRAY]:function(){return Dt.toArrayBuffer.bind(e)()}}};try{return r[U()?"node":"browser"][this.type]()}catch(e){throw new z(`Error translating from ${t.enumLookup(this.type)} to ArrayBuffer: ${e}`)}}},{key:"_fromArrayBuffer",value:function(e){var r=this,n={[t.STRING]:function(){return Lt.fromArrayBuffer.bind(r)()},[t.NUMBER]:function(){return Yt.fromArrayBuffer.bind(r)()},[t.HTML]:function(){return qt.fromArrayBuffer.bind(r)()},[t.ARRAY_BUFFER]:function(){},[t.BIG_NUMBER]:function(){return Pt.fromArrayBuffer.bind(r)()},[t.JSON]:function(){return Zt.fromArrayBuffer.bind(r)()},[t.FILE]:function(){return Ft.fromArrayBuffer.bind(r)()},[t.LIST_FILE]:function(){return Vt.fromArrayBuffer.bind(r)()},[t.BYTE_ARRAY]:function(){return Dt.fromArrayBuffer.bind(r)()}};try{n[e](),this.type=e}catch(r){throw new z(`Error translating from ArrayBuffer to ${t.enumLookup(e)}: ${r}`)}}}],[{key:"typeEnum",value:function(e){switch(e.toLowerCase()){case"bytearray":case"byte array":return t.BYTE_ARRAY;case"string":return t.STRING;case"number":return t.NUMBER;case"html":return t.HTML;case"arraybuffer":case"array buffer":return t.ARRAY_BUFFER;case"bignumber":case"big number":return t.BIG_NUMBER;case"json":case"object":return t.JSON;case"file":return t.FILE;case"list":return t.LIST_FILE;default:throw new z("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(e){switch(e){case t.BYTE_ARRAY:return"byteArray";case t.STRING:return"string";case t.NUMBER:return"number";case t.HTML:return"html";case t.ARRAY_BUFFER:return"ArrayBuffer";case t.BIG_NUMBER:return"BigNumber";case t.JSON:return"JSON";case t.FILE:return"File";case t.LIST_FILE:return"List";default:throw new z("Invalid data type enum. No matching type.")}}}]);var e}();Xt.BYTE_ARRAY=0,Xt.STRING=1,Xt.NUMBER=2,Xt.HTML=3,Xt.ARRAY_BUFFER=4,Xt.BIG_NUMBER=5,Xt.JSON=6,Xt.FILE=7,Xt.LIST_FILE=8;const Jt=Xt,Qt=function(){function t(e){a(this,t),this.name="",this.type="",this._value=null,this.disabled=!1,this.hint="",this.rows=0,this.toggleValues=[],this.target=null,this.defaultIndex=0,this.maxLength=null,this.min=null,this.max=null,this.step=1,e&&this._parseConfig(e)}return c(t,[{key:"_parseConfig",value:function(t){this.name=t.name,this.type=t.type,this.defaultValue=t.value,this.disabled=!!t.disabled,this.hint=t.hint||!1,this.rows=t.rows||!1,this.toggleValues=t.toggleValues,this.target=void 0!==t.target?t.target:null,this.defaultIndex=void 0!==t.defaultIndex?t.defaultIndex:0,this.maxLength=t.maxLength||null,this.min=t.min,this.max=t.max,this.step=t.step}},{key:"config",get:function(){return this._value}},{key:"value",get:function(){return this._value},set:function(e){this._value=t.prepare(e,this.type)}}],[{key:"prepare",value:function(t,e){var r;switch(e){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return O.parseEscapedChars(t);case"byteArray":return"string"==typeof t?B(t=t.replace(/\s+/g,"")):t;case"number":if(null===t)return t;if(r=parseFloat(t),isNaN(r))throw"Invalid ingredient value. Not a number: "+O.truncate(t.toString(),10);return r;default:return t}}}])}();var te=function(){return c((function t(){a(this,t),this._inputType=-1,this._outputType=-1,this._presentType=-1,this._breakpoint=!1,this._disabled=!1,this._flowControl=!1,this._manualBake=!1,this._ingList=[],this.name="",this.module="",this.description="",this.infoURL=null}),[{key:"run",value:function(t,e){return t}},{key:"highlight",value:function(t,e){return!1}},{key:"highlightReverse",value:function(t,e){return!1}},{key:"present",value:function(t,e){return t}},{key:"inputType",get:function(){return Jt.enumLookup(this._inputType)},set:function(t){this._inputType=Jt.typeEnum(t)}},{key:"outputType",get:function(){return Jt.enumLookup(this._outputType)},set:function(t){this._outputType=Jt.typeEnum(t),this._presentType<0&&(this._presentType=this._outputType)}},{key:"presentType",get:function(){return Jt.enumLookup(this._presentType)},set:function(t){this._presentType=Jt.typeEnum(t)}},{key:"args",get:function(){return this._ingList.map((function(t){var e={name:t.name,type:t.type,value:t.defaultValue};return t.toggleValues&&(e.toggleValues=t.toggleValues),t.hint&&(e.hint=t.hint),t.rows&&(e.rows=t.rows),t.disabled&&(e.disabled=t.disabled),t.target&&(e.target=t.target),t.defaultIndex&&(e.defaultIndex=t.defaultIndex),t.maxLength&&(e.maxLength=t.maxLength),"number"==typeof t.min&&(e.min=t.min),"number"==typeof t.max&&(e.max=t.max),t.step&&(e.step=t.step),e}))},set:function(t){var e=this;t.forEach((function(t){var r=new Qt(t);e.addIngredient(r)}))}},{key:"config",get:function(){return{op:this.name,args:this._ingList.map((function(t){return t.config}))}}},{key:"addIngredient",value:function(t){this._ingList.push(t)}},{key:"ingValues",get:function(){return this._ingList.map((function(t){return t.value}))},set:function(t){var e=this;t.forEach((function(t,r){e._ingList[r].value=t}))}},{key:"breakpoint",get:function(){return this._breakpoint},set:function(t){this._breakpoint=!!t}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=!!t}},{key:"flowControl",get:function(){return this._flowControl},set:function(t){this._flowControl=!!t}},{key:"manualBake",get:function(){return this._manualBake},set:function(t){this._manualBake=!!t}}])}();const ee=te;var re=n(23374),ne=n.n(re),ie="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__";function oe(t){if("function"!=typeof t)throw new TypeError("Argument to promisify must be a function");var e=t[ie],r=oe.Promise||Promise;if("function"!=typeof r)throw new Error("No Promise implementation found; do you need a polyfill?");return function(){for(var n=arguments.length,i=Array(n),o=0;o{i.push((function(t){if(t)return n(t);for(var i=arguments.length,o=Array(1{var n=e[r];n&&(a[n]=t)})),r(a)})),t.apply(this,i)}))}}oe.argumentNames="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__",oe.Promise=void 0;var se=t.default?t.default.promisify:oe,ae=ne().ASP({progress_hook:function(t){var e="";switch(t.what){case"guess":e="Guessing a prime";break;case"fermat":e="Factoring prime using Fermat's factorization method";break;case"mr":e="Performing Miller-Rabin primality test";break;case"passed_mr":e="Passed Miller-Rabin primality test";break;case"failed_mr":e="Failed Miller-Rabin primality test";break;case"found":e="Prime found";break;default:e=`Stage: ${t.what}`}C()&&self.sendStatusMessage(e)}});function ue(t){return{1024:1024,2048:1024,4096:2048,256:256,384:256}[t]}function fe(t,e){return he.apply(this,arguments)}function he(){return(he=s(_().mark((function t(e,r){var n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,se(ne().KeyManager.import_from_armored_pgp)({armored:e,opts:{no_check_keys:!0}});case 3:if(!(n=t.sent).is_pgp_locked()){t.next=11;break}if(!r){t.next=10;break}return t.next=8,se(n.unlock_pgp.bind(n))({passphrase:r});case 8:t.next=11;break;case 10:throw new S("Did not provide passphrase with locked private key.");case 11:return t.abrupt("return",n);case 14:throw t.prev=14,t.t0=t.catch(0),new S(`Could not import private key: ${t.t0}`);case 17:case"end":return t.stop()}}),t,null,[[0,14]])})))).apply(this,arguments)}function ce(t){return le.apply(this,arguments)}function le(){return(le=s(_().mark((function t(e){var r;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,se(ne().KeyManager.import_from_armored_pgp)({armored:e,opts:{no_check_keys:!0}});case 3:return r=t.sent,t.abrupt("return",r);case 7:throw t.prev=7,t.t0=t.catch(0),new S(`Could not import public key: ${t.t0}`);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))).apply(this,arguments)}function pe(t,e,r){return e=p(e),l(t,de()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function de(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(de=function(){return!!t})()}var me=t.default?t.default.promisify:oe;const ye=function(t){function e(){var t;return a(this,e),(t=pe(this,e)).name="Generate PGP Key Pair",t.module="PGP",t.description="Generates a new public/private PGP key pair. Supports RSA and Eliptic Curve (EC) keys.

WARNING: Cryptographic operations in CyberChef should not be relied upon to provide security in any situation. No guarantee is offered for their correctness. We advise you not to use keys generated from CyberChef in operational contexts.",t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Key type",type:"option",value:["RSA-1024","RSA-2048","RSA-4096","ECC-256","ECC-384","ECC-521"]},{name:"Password (optional)",type:"string",value:""},{name:"Name (optional)",type:"string",value:""},{name:"Email (optional)",type:"string",value:""}],t}return m(e,t),c(e,[{key:"run",value:(r=s(_().mark((function t(e,r){var n,o,a,u,f,h,c,l,p,d;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r[0].split("-"),o=i(n,2),a=o[0],u=o[1],f=r[1],h=r[2],c=r[3],l="",a=a.toLowerCase(),u=parseInt(u,10),h&&(l+=h),c&&(l+=` <${c}>`),p=ne().const.openpgp.certify_keys,p|=ne().const.openpgp.sign_data,p|=ne().const.openpgp.auth,p|=ne().const.openpgp.encrypt_comm,p|=ne().const.openpgp.encrypt_storage,d={userid:l,ecc:"ecc"===a,primary:{nbits:u,flags:p,expire_in:0},subkeys:[{nbits:ue(u),flags:ne().const.openpgp.sign_data,expire_in:252288e3},{nbits:ue(u),flags:ne().const.openpgp.encrypt_comm|ne().const.openpgp.encrypt_storage,expire_in:63072e3}],asp:ae},t.abrupt("return",new Promise(function(){var t=s(_().mark((function t(e,r){var n,i,o,s,a;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,me(ne().KeyManager.generate)(d);case 3:return n=t.sent,t.next=6,me(n.sign.bind(n))({});case 6:return i=n,o={},f&&(o.passphrase=f),t.next=10,me(i.export_pgp_private.bind(i))(o);case 10:return s=t.sent,t.next=13,me(i.export_pgp_public.bind(i))({});case 13:a=t.sent,e(s+"\n"+a.trim()),t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),r(`Error whilst generating key pair: ${t.t0}`);case 20:case"end":return t.stop()}}),t,null,[[0,17]])})));return function(e,r){return t.apply(this,arguments)}}()));case 14:case"end":return t.stop()}}),t)}))),function(t,e){return r.apply(this,arguments)})}]);var r}(ee);function _e(t,e,r){return e=p(e),l(t,ge()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function ge(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ge=function(){return!!t})()}var be=t.default?t.default.promisify:oe;const ve=function(t){function e(){var t;return a(this,e),(t=_e(this,e)).name="PGP Decrypt",t.module="PGP",t.description=["Input: the ASCII-armoured PGP message you want to decrypt.","

","Arguments: the ASCII-armoured PGP private key of the recipient, ","(and the private key password if necessary).","

","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","

","This function uses the Keybase implementation of PGP."].join("\n"),t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Private key of recipient",type:"text",value:""},{name:"Private key passphrase",type:"string",value:""}],t}return m(e,t),c(e,[{key:"run",value:(r=s(_().mark((function t(e,r){var n,o,s,a,u,f,h;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e,o=i(r,2),s=o[0],a=o[1],u=new(ne().keyring.KeyRing),s){t.next=3;break}throw new S("Enter the private key of the recipient.");case 3:return t.next=5,fe(s,a);case 5:return h=t.sent,u.add_key_manager(h),t.prev=7,t.next=10,be(ne().unbox)({armored:n,keyfetch:u,asp:ae});case 10:f=t.sent,t.next=16;break;case 13:throw t.prev=13,t.t0=t.catch(7),new S(`Couldn't decrypt message with provided private key: ${t.t0}`);case 16:return t.abrupt("return",f.toString());case 17:case"end":return t.stop()}}),t,null,[[7,13]])}))),function(t,e){return r.apply(this,arguments)})}]);var r}(ee);function we(t,e,r){return e=p(e),l(t,ke()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function ke(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ke=function(){return!!t})()}var Me=t.default?t.default.promisify:oe;const xe=function(t){function e(){var t;return a(this,e),(t=we(this,e)).name="PGP Decrypt and Verify",t.module="PGP",t.description=["Input: the ASCII-armoured encrypted PGP message you want to verify.","

","Arguments: the ASCII-armoured PGP public key of the signer, ","the ASCII-armoured private key of the recipient (and the private key password if necessary).","

","This operation uses PGP to decrypt and verify an encrypted digital signature.","

","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","

","This function uses the Keybase implementation of PGP."].join("\n"),t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Public key of signer",type:"text",value:""},{name:"Private key of recipient",type:"text",value:""},{name:"Private key password",type:"string",value:""}],t}return m(e,t),c(e,[{key:"run",value:(r=s(_().mark((function t(e,r){var n,o,s,a,u,f,h,c,l,p,d,m,y;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e,o=i(r,3),s=o[0],a=o[1],u=o[2],f=new(ne().keyring.KeyRing),s){t.next=3;break}throw new S("Enter the public key of the signer.");case 3:if(a){t.next=5;break}throw new S("Enter the private key of the recipient.");case 5:return t.next=7,fe(a,u);case 7:return c=t.sent,t.next=10,ce(s);case 10:return l=t.sent,f.add_key_manager(c),f.add_key_manager(l),t.prev=13,t.next=16,Me(ne().unbox)({armored:n,keyfetch:f,asp:ae});case 16:if(h=t.sent,!(p=h[0].get_data_signer())){t.next=32;break}if(!(d=p.get_key_manager())){t.next=29;break}return m=d.get_userids_mark_primary()[0].components,y="Signed by ",(m.email||m.username||m.comment)&&(m.username&&(y+=`${m.username} `),m.comment&&(y+=`(${m.comment}) `),m.email&&(y+=`<${m.email}>`),y+="\n"),y+=[`PGP key ID: ${d.get_pgp_short_key_id()}`,`PGP fingerprint: ${d.get_pgp_fingerprint().toString("hex")}`,`Signed on ${new Date(1e3*p.sig.when_generated()).toUTCString()}`,"----------------------------------\n"].join("\n"),y+=h.toString(),t.abrupt("return",y.trim());case 29:throw new S("Could not identify a key manager.");case 30:t.next=33;break;case 32:throw new S("The data does not appear to be signed.");case 33:t.next=38;break;case 35:throw t.prev=35,t.t0=t.catch(13),new S(`Couldn't verify message: ${t.t0}`);case 38:case"end":return t.stop()}}),t,null,[[13,35]])}))),function(t,e){return r.apply(this,arguments)})}]);var r}(ee);function Se(t,e,r){return e=p(e),l(t,Ee()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function Ee(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ee=function(){return!!t})()}var Ae=t.default?t.default.promisify:oe;const Be=function(t){function e(){var t;return a(this,e),(t=Se(this,e)).name="PGP Encrypt",t.module="PGP",t.description=["Input: the message you want to encrypt.","

","Arguments: the ASCII-armoured PGP public key of the recipient.","

","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","

","This function uses the Keybase implementation of PGP."].join("\n"),t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Public key of recipient",type:"text",value:""}],t}return m(e,t),c(e,[{key:"run",value:(r=s(_().mark((function t(e,r){var n,i,o,s;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e,i=r[0]){t.next=3;break}throw new S("Enter the public key of the recipient.");case 3:return t.next=5,ce(i);case 5:return s=t.sent,t.prev=6,t.next=9,Ae(ne().box)({msg:n,encrypt_for:s,asp:ae});case 9:o=t.sent,t.next=15;break;case 12:throw t.prev=12,t.t0=t.catch(6),new S(`Couldn't encrypt message with provided public key: ${t.t0}`);case 15:return t.abrupt("return",o.toString());case 16:case"end":return t.stop()}}),t,null,[[6,12]])}))),function(t,e){return r.apply(this,arguments)})}]);var r}(ee);function De(t,e,r){return e=p(e),l(t,Re()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function Re(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Re=function(){return!!t})()}var Ie=t.default?t.default.promisify:oe;const Pe=function(t){function e(){var t;return a(this,e),(t=De(this,e)).name="PGP Encrypt and Sign",t.module="PGP",t.description=["Input: the cleartext you want to sign.","

","Arguments: the ASCII-armoured private key of the signer (plus the private key password if necessary)","and the ASCII-armoured PGP public key of the recipient.","

","This operation uses PGP to produce an encrypted digital signature.","

","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","

","This function uses the Keybase implementation of PGP."].join("\n"),t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Private key of signer",type:"text",value:""},{name:"Private key passphrase",type:"string",value:""},{name:"Public key of recipient",type:"text",value:""}],t}return m(e,t),c(e,[{key:"run",value:(r=s(_().mark((function t(e,r){var n,o,s,a,u,f,h,c;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e,o=i(r,3),s=o[0],a=o[1],u=o[2],s){t.next=3;break}throw new S("Enter the private key of the signer.");case 3:if(u){t.next=5;break}throw new S("Enter the public key of the recipient.");case 5:return t.next=7,fe(s,a);case 7:return h=t.sent,t.next=10,ce(u);case 10:return c=t.sent,t.prev=11,t.next=14,Ie(ne().box)({msg:n,encrypt_for:c,sign_with:h,asp:ae});case 14:f=t.sent,t.next=20;break;case 17:throw t.prev=17,t.t0=t.catch(11),new S(`Couldn't sign message: ${t.t0}`);case 20:return t.abrupt("return",f);case 21:case"end":return t.stop()}}),t,null,[[11,17]])}))),function(t,e){return r.apply(this,arguments)})}]);var r}(ee);function Te(t,e,r){return e=p(e),l(t,Ue()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function Ue(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ue=function(){return!!t})()}var Fe=t.default?t.default.promisify:oe;const Ce=function(t){function e(){var t;return a(this,e),(t=Te(this,e)).name="PGP Verify",t.module="PGP",t.description=["Input: the ASCII-armoured encrypted PGP message you want to verify.","

","Argument: the ASCII-armoured PGP public key of the signer","

","This operation uses PGP to decrypt a clearsigned message.","

","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","

","This function uses the Keybase implementation of PGP."].join("\n"),t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Public key of signer",type:"text",value:""}],t}return m(e,t),c(e,[{key:"run",value:(r=s(_().mark((function t(e,r){var n,o,s,a,u,f,h,c,l,p;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e,o=i(r,1),s=o[0],a=new(ne().keyring.KeyRing),s){t.next=3;break}throw new S("Enter the public key of the signer.");case 3:return t.next=5,ce(s);case 5:return f=t.sent,a.add_key_manager(f),t.prev=7,t.next=10,Fe(ne().unbox)({armored:n,keyfetch:a,asp:ae});case 10:if(u=t.sent,!(h=u[0].get_data_signer())){t.next=26;break}if(!(c=h.get_key_manager())){t.next=23;break}return l=c.get_userids_mark_primary()[0].components,p="Signed by ",(l.email||l.username||l.comment)&&(l.username&&(p+=`${l.username} `),l.comment&&(p+=`(${l.comment}) `),l.email&&(p+=`<${l.email}>`),p+="\n"),p+=[`PGP key ID: ${c.get_pgp_short_key_id()}`,`PGP fingerprint: ${c.get_pgp_fingerprint().toString("hex")}`,`Signed on ${new Date(1e3*h.sig.when_generated()).toUTCString()}`,"----------------------------------\n"].join("\n"),p+=u.toString(),t.abrupt("return",p.trim());case 23:throw new S("Could not identify a key manager.");case 24:t.next=27;break;case 26:throw new S("The data does not appear to be signed.");case 27:t.next=32;break;case 29:throw t.prev=29,t.t0=t.catch(7),new S(`Couldn't verify message: ${t.t0}`);case 32:case"end":return t.stop()}}),t,null,[[7,29]])}))),function(t,e){return r.apply(this,arguments)})}]);var r}(ee);("undefined"==typeof self?{}:self.OpModules||{}).PGP={"Generate PGP Key Pair":ye,"PGP Decrypt":ve,"PGP Decrypt and Verify":xe,"PGP Encrypt":Be,"PGP Encrypt and Sign":Pe,"PGP Verify":Ce}})()})();