(function(){var e={7160:function(e,t,r){var i=t;i.bignum=r(711);i.define=r(495).define;i.base=r(853);i.constants=r(7335);i.decoders=r(6701);i.encoders=r(3418)},495:function(e,t,r){var i=r(7160);var n=r(3782);var a=t;a.define=function define(e,t){return new Entity(e,t)};function Entity(e,t){this.name=e;this.body=t;this.decoders={};this.encoders={}}Entity.prototype._createNamed=function createNamed(e){var t;try{t=r(6144).runInThisContext("(function "+this.name+"(entity) {\n"+" this._initNamed(entity);\n"+"})")}catch(e){t=function(e){this._initNamed(e)}}n(t,e);t.prototype._initNamed=function initnamed(t){e.call(this,t)};return new t(this)};Entity.prototype._getDecoder=function _getDecoder(e){e=e||"der";if(!this.decoders.hasOwnProperty(e))this.decoders[e]=this._createNamed(i.decoders[e]);return this.decoders[e]};Entity.prototype.decode=function decode(e,t,r){return this._getDecoder(t).decode(e,r)};Entity.prototype._getEncoder=function _getEncoder(e){e=e||"der";if(!this.encoders.hasOwnProperty(e))this.encoders[e]=this._createNamed(i.encoders[e]);return this.encoders[e]};Entity.prototype.encode=function encode(e,t,r){return this._getEncoder(t).encode(e,r)}},6483:function(e,t,r){var i=r(3782);var n=r(853).Reporter;var a=r(4300).Buffer;function DecoderBuffer(e,t){n.call(this,t);if(!a.isBuffer(e)){this.error("Input not Buffer");return}this.base=e;this.offset=0;this.length=e.length}i(DecoderBuffer,n);t.C=DecoderBuffer;DecoderBuffer.prototype.save=function save(){return{offset:this.offset,reporter:n.prototype.save.call(this)}};DecoderBuffer.prototype.restore=function restore(e){var t=new DecoderBuffer(this.base);t.offset=e.offset;t.length=this.offset;this.offset=e.offset;n.prototype.restore.call(this,e.reporter);return t};DecoderBuffer.prototype.isEmpty=function isEmpty(){return this.offset===this.length};DecoderBuffer.prototype.readUInt8=function readUInt8(e){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,true);else return this.error(e||"DecoderBuffer overrun")};DecoderBuffer.prototype.skip=function skip(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new DecoderBuffer(this.base);r._reporterState=this._reporterState;r.offset=this.offset;r.length=this.offset+e;this.offset+=e;return r};DecoderBuffer.prototype.raw=function raw(e){return this.base.slice(e?e.offset:this.offset,this.length)};function EncoderBuffer(e,t){if(Array.isArray(e)){this.length=0;this.value=e.map((function(e){if(!(e instanceof EncoderBuffer))e=new EncoderBuffer(e,t);this.length+=e.length;return e}),this)}else if(typeof e==="number"){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e;this.length=1}else if(typeof e==="string"){this.value=e;this.length=a.byteLength(e)}else if(a.isBuffer(e)){this.value=e;this.length=e.length}else{return t.error("Unsupported type: "+typeof e)}}t.R=EncoderBuffer;EncoderBuffer.prototype.join=function join(e,t){if(!e)e=new a(this.length);if(!t)t=0;if(this.length===0)return e;if(Array.isArray(this.value)){this.value.forEach((function(r){r.join(e,t);t+=r.length}))}else{if(typeof this.value==="number")e[t]=this.value;else if(typeof this.value==="string")e.write(this.value,t);else if(a.isBuffer(this.value))this.value.copy(e,t);t+=this.length}return e}},853:function(e,t,r){var i=t;i.Reporter=r(1293).b;i.DecoderBuffer=r(6483).C;i.EncoderBuffer=r(6483).R;i.Node=r(9374)},9374:function(e,t,r){var i=r(853).Reporter;var n=r(853).EncoderBuffer;var a=r(853).DecoderBuffer;var s=r(3523);var o=["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"];var h=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);var u=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Node(e,t){var r={};this._baseState=r;r.enc=e;r.parent=t||null;r.children=null;r.tag=null;r.args=null;r.reverseArgs=null;r.choice=null;r.optional=false;r.any=false;r.obj=false;r.use=null;r.useDecoder=null;r.key=null;r["default"]=null;r.explicit=null;r.implicit=null;r.contains=null;if(!r.parent){r.children=[];this._wrap()}}e.exports=Node;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function clone(){var e=this._baseState;var t={};d.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);r._baseState=t;return r};Node.prototype._wrap=function wrap(){var e=this._baseState;h.forEach((function(t){this[t]=function _wrappedMethod(){var r=new this.constructor(this);e.children.push(r);return r[t].apply(r,arguments)}}),this)};Node.prototype._init=function init(e){var t=this._baseState;s(t.parent===null);e.call(this);t.children=t.children.filter((function(e){return e._baseState.parent===this}),this);s.equal(t.children.length,1,"Root node can have only one child")};Node.prototype._useArgs=function useArgs(e){var t=this._baseState;var r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this);if(r.length!==0){s(t.children===null);t.children=r;r.forEach((function(e){e._baseState.parent=this}),this)}if(e.length!==0){s(t.args===null);t.args=e;t.reverseArgs=e.map((function(e){if(typeof e!=="object"||e.constructor!==Object)return e;var t={};Object.keys(e).forEach((function(r){if(r==(r|0))r|=0;var i=e[r];t[i]=r}));return t}))}};u.forEach((function(e){Node.prototype[e]=function _overrided(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}));o.forEach((function(e){Node.prototype[e]=function _tagMethod(){var t=this._baseState;var r=Array.prototype.slice.call(arguments);s(t.tag===null);t.tag=e;this._useArgs(r);return this}}));Node.prototype.use=function use(e){s(e);var t=this._baseState;s(t.use===null);t.use=e;return this};Node.prototype.optional=function optional(){var e=this._baseState;e.optional=true;return this};Node.prototype.def=function def(e){var t=this._baseState;s(t["default"]===null);t["default"]=e;t.optional=true;return this};Node.prototype.explicit=function explicit(e){var t=this._baseState;s(t.explicit===null&&t.implicit===null);t.explicit=e;return this};Node.prototype.implicit=function implicit(e){var t=this._baseState;s(t.explicit===null&&t.implicit===null);t.implicit=e;return this};Node.prototype.obj=function obj(){var e=this._baseState;var t=Array.prototype.slice.call(arguments);e.obj=true;if(t.length!==0)this._useArgs(t);return this};Node.prototype.key=function key(e){var t=this._baseState;s(t.key===null);t.key=e;return this};Node.prototype.any=function any(){var e=this._baseState;e.any=true;return this};Node.prototype.choice=function choice(e){var t=this._baseState;s(t.choice===null);t.choice=e;this._useArgs(Object.keys(e).map((function(t){return e[t]})));return this};Node.prototype.contains=function contains(e){var t=this._baseState;s(t.use===null);t.contains=e;return this};Node.prototype._decode=function decode(e,t){var r=this._baseState;if(r.parent===null)return e.wrapResult(r.children[0]._decode(e,t));var i=r["default"];var n=true;var s=null;if(r.key!==null)s=e.enterKey(r.key);if(r.optional){var o=null;if(r.explicit!==null)o=r.explicit;else if(r.implicit!==null)o=r.implicit;else if(r.tag!==null)o=r.tag;if(o===null&&!r.any){var h=e.save();try{if(r.choice===null)this._decodeGeneric(r.tag,e,t);else this._decodeChoice(e,t);n=true}catch(e){n=false}e.restore(h)}else{n=this._peekTag(e,o,r.any);if(e.isError(n))return n}}var u;if(r.obj&&n)u=e.enterObject();if(n){if(r.explicit!==null){var d=this._decodeTag(e,r.explicit);if(e.isError(d))return d;e=d}var c=e.offset;if(r.use===null&&r.choice===null){if(r.any)var h=e.save();var l=this._decodeTag(e,r.implicit!==null?r.implicit:r.tag,r.any);if(e.isError(l))return l;if(r.any)i=e.raw(h);else e=l}if(t&&t.track&&r.tag!==null)t.track(e.path(),c,e.length,"tagged");if(t&&t.track&&r.tag!==null)t.track(e.path(),e.offset,e.length,"content");if(r.any)i=i;else if(r.choice===null)i=this._decodeGeneric(r.tag,e,t);else i=this._decodeChoice(e,t);if(e.isError(i))return i;if(!r.any&&r.choice===null&&r.children!==null){r.children.forEach((function decodeChildren(r){r._decode(e,t)}))}if(r.contains&&(r.tag==="octstr"||r.tag==="bitstr")){var p=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(p,t)}}if(r.obj&&n)i=e.leaveObject(u);if(r.key!==null&&(i!==null||n===true))e.leaveKey(s,r.key,i);else if(s!==null)e.exitKey(s);return i};Node.prototype._decodeGeneric=function decodeGeneric(e,t,r){var i=this._baseState;if(e==="seq"||e==="set")return null;if(e==="seqof"||e==="setof")return this._decodeList(t,e,i.args[0],r);else if(/str$/.test(e))return this._decodeStr(t,e,r);else if(e==="objid"&&i.args)return this._decodeObjid(t,i.args[0],i.args[1],r);else if(e==="objid")return this._decodeObjid(t,null,null,r);else if(e==="gentime"||e==="utctime")return this._decodeTime(t,e,r);else if(e==="null_")return this._decodeNull(t,r);else if(e==="bool")return this._decodeBool(t,r);else if(e==="objDesc")return this._decodeStr(t,e,r);else if(e==="int"||e==="enum")return this._decodeInt(t,i.args&&i.args[0],r);if(i.use!==null){return this._getUse(i.use,t._reporterState.obj)._decode(t,r)}else{return t.error("unknown tag: "+e)}};Node.prototype._getUse=function _getUse(e,t){var r=this._baseState;r.useDecoder=this._use(e,t);s(r.useDecoder._baseState.parent===null);r.useDecoder=r.useDecoder._baseState.children[0];if(r.implicit!==r.useDecoder._baseState.implicit){r.useDecoder=r.useDecoder.clone();r.useDecoder._baseState.implicit=r.implicit}return r.useDecoder};Node.prototype._decodeChoice=function decodeChoice(e,t){var r=this._baseState;var i=null;var n=false;Object.keys(r.choice).some((function(a){var s=e.save();var o=r.choice[a];try{var h=o._decode(e,t);if(e.isError(h))return false;i={type:a,value:h};n=true}catch(t){e.restore(s);return false}return true}),this);if(!n)return e.error("Choice not matched");return i};Node.prototype._createEncoderBuffer=function createEncoderBuffer(e){return new n(e,this.reporter)};Node.prototype._encode=function encode(e,t,r){var i=this._baseState;if(i["default"]!==null&&i["default"]===e)return;var n=this._encodeValue(e,t,r);if(n===undefined)return;if(this._skipDefault(n,t,r))return;return n};Node.prototype._encodeValue=function encode(e,t,r){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(e,t||new i);var a=null;this.reporter=t;if(n.optional&&e===undefined){if(n["default"]!==null)e=n["default"];else return}var s=null;var o=false;if(n.any){a=this._createEncoderBuffer(e)}else if(n.choice){a=this._encodeChoice(e,t)}else if(n.contains){s=this._getUse(n.contains,r)._encode(e,t);o=true}else if(n.children){s=n.children.map((function(r){if(r._baseState.tag==="null_")return r._encode(null,t,e);if(r._baseState.key===null)return t.error("Child should have a key");var i=t.enterKey(r._baseState.key);if(typeof e!=="object")return t.error("Child expected, but input is not object");var n=r._encode(e[r._baseState.key],t,e);t.leaveKey(i);return n}),this).filter((function(e){return e}));s=this._createEncoderBuffer(s)}else{if(n.tag==="seqof"||n.tag==="setof"){if(!(n.args&&n.args.length===1))return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var h=this.clone();h._baseState.implicit=null;s=this._createEncoderBuffer(e.map((function(r){var i=this._baseState;return this._getUse(i.args[0],e)._encode(r,t)}),h))}else if(n.use!==null){a=this._getUse(n.use,r)._encode(e,t)}else{s=this._encodePrimitive(n.tag,e);o=true}}var a;if(!n.any&&n.choice===null){var u=n.implicit!==null?n.implicit:n.tag;var d=n.implicit===null?"universal":"context";if(u===null){if(n.use===null)t.error("Tag could be omitted only for .use()")}else{if(n.use===null)a=this._encodeComposite(u,o,d,s)}}if(n.explicit!==null)a=this._encodeComposite(n.explicit,false,"context",a);return a};Node.prototype._encodeChoice=function encodeChoice(e,t){var r=this._baseState;var i=r.choice[e.type];if(!i){s(false,e.type+" not found in "+JSON.stringify(Object.keys(r.choice)))}return i._encode(e.value,t)};Node.prototype._encodePrimitive=function encodePrimitive(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);else if(e==="objid"&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);else if(e==="objid")return this._encodeObjid(t,null,null);else if(e==="gentime"||e==="utctime")return this._encodeTime(t,e);else if(e==="null_")return this._encodeNull();else if(e==="int"||e==="enum")return this._encodeInt(t,r.args&&r.reverseArgs[0]);else if(e==="bool")return this._encodeBool(t);else if(e==="objDesc")return this._encodeStr(t,e);else throw new Error("Unsupported tag: "+e)};Node.prototype._isNumstr=function isNumstr(e){return/^[0-9 ]*$/.test(e)};Node.prototype._isPrintstr=function isPrintstr(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},1293:function(e,t,r){var i=r(3782);function Reporter(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}t.b=Reporter;Reporter.prototype.isError=function isError(e){return e instanceof ReporterError};Reporter.prototype.save=function save(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Reporter.prototype.restore=function restore(e){var t=this._reporterState;t.obj=e.obj;t.path=t.path.slice(0,e.pathLen)};Reporter.prototype.enterKey=function enterKey(e){return this._reporterState.path.push(e)};Reporter.prototype.exitKey=function exitKey(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)};Reporter.prototype.leaveKey=function leaveKey(e,t,r){var i=this._reporterState;this.exitKey(e);if(i.obj!==null)i.obj[t]=r};Reporter.prototype.path=function path(){return this._reporterState.path.join("/")};Reporter.prototype.enterObject=function enterObject(){var e=this._reporterState;var t=e.obj;e.obj={};return t};Reporter.prototype.leaveObject=function leaveObject(e){var t=this._reporterState;var r=t.obj;t.obj=e;return r};Reporter.prototype.error=function error(e){var t;var r=this._reporterState;var i=e instanceof ReporterError;if(i){t=e}else{t=new ReporterError(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack)}if(!r.options.partial)throw t;if(!i)r.errors.push(t);return t};Reporter.prototype.wrapResult=function wrapResult(e){var t=this._reporterState;if(!t.options.partial)return e;return{result:this.isError(e)?null:e,errors:t.errors}};function ReporterError(e,t){this.path=e;this.rethrow(t)}i(ReporterError,Error);ReporterError.prototype.rethrow=function rethrow(e){this.message=e+" at: "+(this.path||"(shallow)");if(Error.captureStackTrace)Error.captureStackTrace(this,ReporterError);if(!this.stack){try{throw new Error(this.message)}catch(e){this.stack=e.stack}}return this}},9791:function(e,t,r){var i=r(7335);t.tagClass={0:"universal",1:"application",2:"context",3:"private"};t.tagClassByName=i._reverse(t.tagClass);t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};t.tagByName=i._reverse(t.tag)},7335:function(e,t,r){var i=t;i._reverse=function reverse(e){var t={};Object.keys(e).forEach((function(r){if((r|0)==r)r=r|0;var i=e[r];t[i]=r}));return t};i.der=r(9791)},2259:function(e,t,r){var i=r(3782);var n=r(7160);var a=n.base;var s=n.bignum;var o=n.constants.der;function DERDecoder(e){this.enc="der";this.name=e.name;this.entity=e;this.tree=new DERNode;this.tree._init(e.body)}e.exports=DERDecoder;DERDecoder.prototype.decode=function decode(e,t){if(!(e instanceof a.DecoderBuffer))e=new a.DecoderBuffer(e,t);return this.tree._decode(e,t)};function DERNode(e){a.Node.call(this,"der",e)}i(DERNode,a.Node);DERNode.prototype._peekTag=function peekTag(e,t,r){if(e.isEmpty())return false;var i=e.save();var n=derDecodeTag(e,'Failed to peek tag: "'+t+'"');if(e.isError(n))return n;e.restore(i);return n.tag===t||n.tagStr===t||n.tagStr+"of"===t||r};DERNode.prototype._decodeTag=function decodeTag(e,t,r){var i=derDecodeTag(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;var n=derDecodeLen(e,i.primitive,'Failed to get length of "'+t+'"');if(e.isError(n))return n;if(!r&&i.tag!==t&&i.tagStr!==t&&i.tagStr+"of"!==t){return e.error('Failed to match tag: "'+t+'"')}if(i.primitive||n!==null)return e.skip(n,'Failed to match body of: "'+t+'"');var a=e.save();var s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');if(e.isError(s))return s;n=e.offset-a.offset;e.restore(a);return e.skip(n,'Failed to match body of: "'+t+'"')};DERNode.prototype._skipUntilEnd=function skipUntilEnd(e,t){while(true){var r=derDecodeTag(e,t);if(e.isError(r))return r;var i=derDecodeLen(e,r.primitive,t);if(e.isError(i))return i;var n;if(r.primitive||i!==null)n=e.skip(i);else n=this._skipUntilEnd(e,t);if(e.isError(n))return n;if(r.tagStr==="end")break}};DERNode.prototype._decodeList=function decodeList(e,t,r,i){var n=[];while(!e.isEmpty()){var a=this._peekTag(e,"end");if(e.isError(a))return a;var s=r.decode(e,"der",i);if(e.isError(s)&&a)break;n.push(s)}return n};DERNode.prototype._decodeStr=function decodeStr(e,t){if(t==="bitstr"){var r=e.readUInt8();if(e.isError(r))return r;return{unused:r,data:e.raw()}}else if(t==="bmpstr"){var i=e.raw();if(i.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");var n="";for(var a=0;a>6];var n=(r&32)===0;if((r&31)===31){var a=r;r=0;while((a&128)===128){a=e.readUInt8(t);if(e.isError(a))return a;r<<=7;r|=a&127}}else{r&=31}var s=o.tag[r];return{cls:i,primitive:n,tag:r,tagStr:s}}function derDecodeLen(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&i===128)return null;if((i&128)===0){return i}var n=i&127;if(n>4)return e.error("length octect is too long");i=0;for(var a=0;a=256;h>>=8)o++;var s=new n(1+1+o);s[0]=a;s[1]=128|o;for(var h=1+o,u=i.length;u>0;h--,u>>=8)s[h]=u&255;return this._createEncoderBuffer([s,i])};DERNode.prototype._encodeStr=function encodeStr(e,t){if(t==="bitstr"){return this._createEncoderBuffer([e.unused|0,e.data])}else if(t==="bmpstr"){var r=new n(e.length*2);for(var i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}var a=0;for(var i=0;i=128;s>>=7)a++}var o=new n(a);var h=o.length-1;for(var i=e.length-1;i>=0;i--){var s=e[i];o[h--]=s&127;while((s>>=7)>0)o[h--]=128|s&127}return this._createEncoderBuffer(o)};function two(e){if(e<10)return"0"+e;else return e}DERNode.prototype._encodeTime=function encodeTime(e,t){var r;var i=new Date(e);if(t==="gentime"){r=[two(i.getFullYear()),two(i.getUTCMonth()+1),two(i.getUTCDate()),two(i.getUTCHours()),two(i.getUTCMinutes()),two(i.getUTCSeconds()),"Z"].join("")}else if(t==="utctime"){r=[two(i.getFullYear()%100),two(i.getUTCMonth()+1),two(i.getUTCDate()),two(i.getUTCHours()),two(i.getUTCMinutes()),two(i.getUTCSeconds()),"Z"].join("")}else{this.reporter.error("Encoding "+t+" time is not supported yet")}return this._encodeStr(r,"octstr")};DERNode.prototype._encodeNull=function encodeNull(){return this._createEncoderBuffer("")};DERNode.prototype._encodeInt=function encodeInt(e,t){if(typeof e==="string"){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e)){return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e))}e=t[e]}if(typeof e!=="number"&&!n.isBuffer(e)){var r=e.toArray();if(!e.sign&&r[0]&128){r.unshift(0)}e=new n(r)}if(n.isBuffer(e)){var i=e.length;if(e.length===0)i++;var a=new n(i);e.copy(a);if(e.length===0)a[0]=0;return this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);var i=1;for(var s=e;s>=256;s>>=8)i++;var a=new Array(i);for(var s=a.length-1;s>=0;s--){a[s]=e&255;e>>=8}if(a[0]&128){a.unshift(0)}return this._createEncoderBuffer(new n(a))};DERNode.prototype._encodeBool=function encodeBool(e){return this._createEncoderBuffer(e?255:0)};DERNode.prototype._use=function use(e,t){if(typeof e==="function")e=e(t);return e._getEncoder("der").tree};DERNode.prototype._skipDefault=function skipDefault(e,t,r){var i=this._baseState;var n;if(i["default"]===null)return false;var a=e.join();if(i.defaultBuffer===undefined)i.defaultBuffer=this._encodeValue(i["default"],t,r).join();if(a.length!==i.defaultBuffer.length)return false;for(n=0;n=31)return i.error("Multi-octet tag encoding unsupported");if(!t)n|=32;n|=o.tagClassByName[r||"universal"]<<6;return n}},3418:function(e,t,r){var i=t;i.der=r(7804);i.pem=r(1564)},1564:function(e,t,r){var i=r(3782);var n=r(7804);function PEMEncoder(e){n.call(this,e);this.enc="pem"}i(PEMEncoder,n);e.exports=PEMEncoder;PEMEncoder.prototype.encode=function encode(e,t){var r=n.prototype.encode.call(this,e);var i=r.toString("base64");var a=["-----BEGIN "+t.label+"-----"];for(var s=0;s0)return e;return t};BN.min=function min(e,t){if(e.cmp(t)<0)return e;return t};BN.prototype._init=function init(e,t,r){if(typeof e==="number"){return this._initNumber(e,t,r)}if(typeof e==="object"){return this._initArray(e,t,r)}if(t==="hex"){t=16}assert(t===(t|0)&&t>=2&&t<=36);e=e.toString().replace(/\s+/g,"");var i=0;if(e[0]==="-"){i++}if(t===16){this._parseHex(e,i)}else{this._parseBase(e,t,i)}if(e[0]==="-"){this.negative=1}this.strip();if(r!=="le")return;this._initArray(this.toArray(),t,r)};BN.prototype._initNumber=function _initNumber(e,t,r){if(e<0){this.negative=1;e=-e}if(e<67108864){this.words=[e&67108863];this.length=1}else if(e<4503599627370496){this.words=[e&67108863,e/67108864&67108863];this.length=2}else{assert(e<9007199254740992);this.words=[e&67108863,e/67108864&67108863,1];this.length=3}if(r!=="le")return;this._initArray(this.toArray(),t,r)};BN.prototype._initArray=function _initArray(e,t,r){assert(typeof e.length==="number");if(e.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(e.length/3);this.words=new Array(this.length);for(var i=0;i=0;i-=3){a=e[i]|e[i-1]<<8|e[i-2]<<16;this.words[n]|=a<>>26-s&67108863;s+=24;if(s>=26){s-=26;n++}}}else if(r==="le"){for(i=0,n=0;i>>26-s&67108863;s+=24;if(s>=26){s-=26;n++}}}return this.strip()};function parseHex(e,t,r){var i=0;var n=Math.min(e.length,r);for(var a=t;a=49&&s<=54){i|=s-49+10}else if(s>=17&&s<=22){i|=s-17+10}else{i|=s&15}}return i}BN.prototype._parseHex=function _parseHex(e,t){this.length=Math.ceil((e.length-t)/6);this.words=new Array(this.length);for(var r=0;r=t;r-=6){n=parseHex(e,r,r+6);this.words[i]|=n<>>26-a&4194303;a+=24;if(a>=26){a-=26;i++}}if(r+6!==t){n=parseHex(e,t,r+6);this.words[i]|=n<>>26-a&4194303}this.strip()};function parseBase(e,t,r,i){var n=0;var a=Math.min(e.length,r);for(var s=t;s=49){n+=o-49+10}else if(o>=17){n+=o-17+10}else{n+=o}}return n}BN.prototype._parseBase=function _parseBase(e,t,r){this.words=[0];this.length=1;for(var i=0,n=1;n<=67108863;n*=t){i++}i--;n=n/t|0;var a=e.length-r;var s=a%i;var o=Math.min(a,a-s)+r;var h=0;for(var u=r;u1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};BN.prototype.inspect=function inspect(){return(this.red?""};var n=["","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"];var a=[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];var s=[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];BN.prototype.toString=function toString(e,t){e=e||10;t=t|0||1;var r;if(e===16||e==="hex"){r="";var i=0;var o=0;for(var h=0;h>>24-i&16777215;if(o!==0||h!==this.length-1){r=n[6-d.length]+d+r}else{r=d+r}i+=2;if(i>=26){i-=26;h--}}if(o!==0){r=o.toString(16)+r}while(r.length%t!==0){r="0"+r}if(this.negative!==0){r="-"+r}return r}if(e===(e|0)&&e>=2&&e<=36){var c=a[e];var l=s[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var v=p.modn(l).toString(e);p=p.idivn(l);if(!p.isZero()){r=n[c-v.length]+v+r}else{r=v+r}}if(this.isZero()){r="0"+r}while(r.length%t!==0){r="0"+r}if(this.negative!==0){r="-"+r}return r}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var e=this.words[0];if(this.length===2){e+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){e+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-e:e};BN.prototype.toJSON=function toJSON(){return this.toString(16)};BN.prototype.toBuffer=function toBuffer(e,t){assert(typeof i!=="undefined");return this.toArrayLike(i,e,t)};BN.prototype.toArray=function toArray(e,t){return this.toArrayLike(Array,e,t)};BN.prototype.toArrayLike=function toArrayLike(e,t,r){var i=this.byteLength();var n=r||Math.max(1,i);assert(i<=n,"byte array longer than desired length");assert(n>0,"Requested array length <= 0");this.strip();var a=t==="le";var s=new e(n);var o,h;var u=this.clone();if(!a){for(h=0;h=4096){r+=13;t>>>=13}if(t>=64){r+=7;t>>>=7}if(t>=8){r+=4;t>>>=4}if(t>=2){r+=2;t>>>=2}return r+t}}BN.prototype._zeroBits=function _zeroBits(e){if(e===0)return 26;var t=e;var r=0;if((t&8191)===0){r+=13;t>>>=13}if((t&127)===0){r+=7;t>>>=7}if((t&15)===0){r+=4;t>>>=4}if((t&3)===0){r+=2;t>>>=2}if((t&1)===0){r++}return r};BN.prototype.bitLength=function bitLength(){var e=this.words[this.length-1];var t=this._countBits(e);return(this.length-1)*26+t};function toBitArray(e){var t=new Array(e.bitLength());for(var r=0;r>>n}return t}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var e=0;for(var t=0;te.length)return this.clone().ior(e);return e.clone().ior(this)};BN.prototype.uor=function uor(e){if(this.length>e.length)return this.clone().iuor(e);return e.clone().iuor(this)};BN.prototype.iuand=function iuand(e){var t;if(this.length>e.length){t=e}else{t=this}for(var r=0;re.length)return this.clone().iand(e);return e.clone().iand(this)};BN.prototype.uand=function uand(e){if(this.length>e.length)return this.clone().iuand(e);return e.clone().iuand(this)};BN.prototype.iuxor=function iuxor(e){var t;var r;if(this.length>e.length){t=this;r=e}else{t=e;r=this}for(var i=0;ie.length)return this.clone().ixor(e);return e.clone().ixor(this)};BN.prototype.uxor=function uxor(e){if(this.length>e.length)return this.clone().iuxor(e);return e.clone().iuxor(this)};BN.prototype.inotn=function inotn(e){assert(typeof e==="number"&&e>=0);var t=Math.ceil(e/26)|0;var r=e%26;this._expand(t);if(r>0){t--}for(var i=0;i0){this.words[i]=~this.words[i]&67108863>>26-r}return this.strip()};BN.prototype.notn=function notn(e){return this.clone().inotn(e)};BN.prototype.setn=function setn(e,t){assert(typeof e==="number"&&e>=0);var r=e/26|0;var i=e%26;this._expand(r+1);if(t){this.words[r]=this.words[r]|1<e.length){r=this;i=e}else{r=e;i=this}var n=0;for(var a=0;a>>26}for(;n!==0&&a>>26}this.length=r.length;if(n!==0){this.words[this.length]=n;this.length++}else if(r!==this){for(;ae.length)return this.clone().iadd(e);return e.clone().iadd(this)};BN.prototype.isub=function isub(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);e.negative=1;return t._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(e);this.negative=1;return this._normSign()}var r=this.cmp(e);if(r===0){this.negative=0;this.length=1;this.words[0]=0;return this}var i,n;if(r>0){i=this;n=e}else{i=e;n=this}var a=0;for(var s=0;s>26;this.words[s]=t&67108863}for(;a!==0&&s>26;this.words[s]=t&67108863}if(a===0&&s>>26;var c=h&67108863;var l=Math.min(u,t.length-1);for(var p=Math.max(0,u-e.length+1);p<=l;p++){var v=u-p|0;n=e.words[v]|0;a=t.words[p]|0;s=n*a+c;d+=s/67108864|0;c=s&67108863}r.words[u]=c|0;h=d|0}if(h!==0){r.words[u]=h|0}else{r.length--}return r.strip()}var o=function comb10MulTo(e,t,r){var i=e.words;var n=t.words;var a=r.words;var s=0;var o;var h;var u;var d=i[0]|0;var c=d&8191;var l=d>>>13;var p=i[1]|0;var v=p&8191;var b=p>>>13;var m=i[2]|0;var y=m&8191;var g=m>>>13;var _=i[3]|0;var w=_&8191;var M=_>>>13;var B=i[4]|0;var E=B&8191;var k=B>>>13;var A=i[5]|0;var N=A&8191;var P=A>>>13;var x=i[6]|0;var I=x&8191;var C=x>>>13;var D=i[7]|0;var T=D&8191;var j=D>>>13;var q=i[8]|0;var O=q&8191;var H=q>>>13;var L=i[9]|0;var z=L&8191;var F=L>>>13;var U=n[0]|0;var W=U&8191;var V=U>>>13;var G=n[1]|0;var J=G&8191;var Z=G>>>13;var X=n[2]|0;var Y=X&8191;var $=X>>>13;var Q=n[3]|0;var ee=Q&8191;var te=Q>>>13;var re=n[4]|0;var ie=re&8191;var ne=re>>>13;var ae=n[5]|0;var fe=ae&8191;var se=ae>>>13;var oe=n[6]|0;var he=oe&8191;var ue=oe>>>13;var de=n[7]|0;var ce=de&8191;var le=de>>>13;var pe=n[8]|0;var ve=pe&8191;var be=pe>>>13;var me=n[9]|0;var ye=me&8191;var ge=me>>>13;r.negative=e.negative^t.negative;r.length=19;o=Math.imul(c,W);h=Math.imul(c,V);h=h+Math.imul(l,W)|0;u=Math.imul(l,V);var _e=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(_e>>>26)|0;_e&=67108863;o=Math.imul(v,W);h=Math.imul(v,V);h=h+Math.imul(b,W)|0;u=Math.imul(b,V);o=o+Math.imul(c,J)|0;h=h+Math.imul(c,Z)|0;h=h+Math.imul(l,J)|0;u=u+Math.imul(l,Z)|0;var we=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(we>>>26)|0;we&=67108863;o=Math.imul(y,W);h=Math.imul(y,V);h=h+Math.imul(g,W)|0;u=Math.imul(g,V);o=o+Math.imul(v,J)|0;h=h+Math.imul(v,Z)|0;h=h+Math.imul(b,J)|0;u=u+Math.imul(b,Z)|0;o=o+Math.imul(c,Y)|0;h=h+Math.imul(c,$)|0;h=h+Math.imul(l,Y)|0;u=u+Math.imul(l,$)|0;var Me=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Me>>>26)|0;Me&=67108863;o=Math.imul(w,W);h=Math.imul(w,V);h=h+Math.imul(M,W)|0;u=Math.imul(M,V);o=o+Math.imul(y,J)|0;h=h+Math.imul(y,Z)|0;h=h+Math.imul(g,J)|0;u=u+Math.imul(g,Z)|0;o=o+Math.imul(v,Y)|0;h=h+Math.imul(v,$)|0;h=h+Math.imul(b,Y)|0;u=u+Math.imul(b,$)|0;o=o+Math.imul(c,ee)|0;h=h+Math.imul(c,te)|0;h=h+Math.imul(l,ee)|0;u=u+Math.imul(l,te)|0;var Se=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Se>>>26)|0;Se&=67108863;o=Math.imul(E,W);h=Math.imul(E,V);h=h+Math.imul(k,W)|0;u=Math.imul(k,V);o=o+Math.imul(w,J)|0;h=h+Math.imul(w,Z)|0;h=h+Math.imul(M,J)|0;u=u+Math.imul(M,Z)|0;o=o+Math.imul(y,Y)|0;h=h+Math.imul(y,$)|0;h=h+Math.imul(g,Y)|0;u=u+Math.imul(g,$)|0;o=o+Math.imul(v,ee)|0;h=h+Math.imul(v,te)|0;h=h+Math.imul(b,ee)|0;u=u+Math.imul(b,te)|0;o=o+Math.imul(c,ie)|0;h=h+Math.imul(c,ne)|0;h=h+Math.imul(l,ie)|0;u=u+Math.imul(l,ne)|0;var Be=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Be>>>26)|0;Be&=67108863;o=Math.imul(N,W);h=Math.imul(N,V);h=h+Math.imul(P,W)|0;u=Math.imul(P,V);o=o+Math.imul(E,J)|0;h=h+Math.imul(E,Z)|0;h=h+Math.imul(k,J)|0;u=u+Math.imul(k,Z)|0;o=o+Math.imul(w,Y)|0;h=h+Math.imul(w,$)|0;h=h+Math.imul(M,Y)|0;u=u+Math.imul(M,$)|0;o=o+Math.imul(y,ee)|0;h=h+Math.imul(y,te)|0;h=h+Math.imul(g,ee)|0;u=u+Math.imul(g,te)|0;o=o+Math.imul(v,ie)|0;h=h+Math.imul(v,ne)|0;h=h+Math.imul(b,ie)|0;u=u+Math.imul(b,ne)|0;o=o+Math.imul(c,fe)|0;h=h+Math.imul(c,se)|0;h=h+Math.imul(l,fe)|0;u=u+Math.imul(l,se)|0;var Ee=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ee>>>26)|0;Ee&=67108863;o=Math.imul(I,W);h=Math.imul(I,V);h=h+Math.imul(C,W)|0;u=Math.imul(C,V);o=o+Math.imul(N,J)|0;h=h+Math.imul(N,Z)|0;h=h+Math.imul(P,J)|0;u=u+Math.imul(P,Z)|0;o=o+Math.imul(E,Y)|0;h=h+Math.imul(E,$)|0;h=h+Math.imul(k,Y)|0;u=u+Math.imul(k,$)|0;o=o+Math.imul(w,ee)|0;h=h+Math.imul(w,te)|0;h=h+Math.imul(M,ee)|0;u=u+Math.imul(M,te)|0;o=o+Math.imul(y,ie)|0;h=h+Math.imul(y,ne)|0;h=h+Math.imul(g,ie)|0;u=u+Math.imul(g,ne)|0;o=o+Math.imul(v,fe)|0;h=h+Math.imul(v,se)|0;h=h+Math.imul(b,fe)|0;u=u+Math.imul(b,se)|0;o=o+Math.imul(c,he)|0;h=h+Math.imul(c,ue)|0;h=h+Math.imul(l,he)|0;u=u+Math.imul(l,ue)|0;var ke=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(ke>>>26)|0;ke&=67108863;o=Math.imul(T,W);h=Math.imul(T,V);h=h+Math.imul(j,W)|0;u=Math.imul(j,V);o=o+Math.imul(I,J)|0;h=h+Math.imul(I,Z)|0;h=h+Math.imul(C,J)|0;u=u+Math.imul(C,Z)|0;o=o+Math.imul(N,Y)|0;h=h+Math.imul(N,$)|0;h=h+Math.imul(P,Y)|0;u=u+Math.imul(P,$)|0;o=o+Math.imul(E,ee)|0;h=h+Math.imul(E,te)|0;h=h+Math.imul(k,ee)|0;u=u+Math.imul(k,te)|0;o=o+Math.imul(w,ie)|0;h=h+Math.imul(w,ne)|0;h=h+Math.imul(M,ie)|0;u=u+Math.imul(M,ne)|0;o=o+Math.imul(y,fe)|0;h=h+Math.imul(y,se)|0;h=h+Math.imul(g,fe)|0;u=u+Math.imul(g,se)|0;o=o+Math.imul(v,he)|0;h=h+Math.imul(v,ue)|0;h=h+Math.imul(b,he)|0;u=u+Math.imul(b,ue)|0;o=o+Math.imul(c,ce)|0;h=h+Math.imul(c,le)|0;h=h+Math.imul(l,ce)|0;u=u+Math.imul(l,le)|0;var Ae=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ae>>>26)|0;Ae&=67108863;o=Math.imul(O,W);h=Math.imul(O,V);h=h+Math.imul(H,W)|0;u=Math.imul(H,V);o=o+Math.imul(T,J)|0;h=h+Math.imul(T,Z)|0;h=h+Math.imul(j,J)|0;u=u+Math.imul(j,Z)|0;o=o+Math.imul(I,Y)|0;h=h+Math.imul(I,$)|0;h=h+Math.imul(C,Y)|0;u=u+Math.imul(C,$)|0;o=o+Math.imul(N,ee)|0;h=h+Math.imul(N,te)|0;h=h+Math.imul(P,ee)|0;u=u+Math.imul(P,te)|0;o=o+Math.imul(E,ie)|0;h=h+Math.imul(E,ne)|0;h=h+Math.imul(k,ie)|0;u=u+Math.imul(k,ne)|0;o=o+Math.imul(w,fe)|0;h=h+Math.imul(w,se)|0;h=h+Math.imul(M,fe)|0;u=u+Math.imul(M,se)|0;o=o+Math.imul(y,he)|0;h=h+Math.imul(y,ue)|0;h=h+Math.imul(g,he)|0;u=u+Math.imul(g,ue)|0;o=o+Math.imul(v,ce)|0;h=h+Math.imul(v,le)|0;h=h+Math.imul(b,ce)|0;u=u+Math.imul(b,le)|0;o=o+Math.imul(c,ve)|0;h=h+Math.imul(c,be)|0;h=h+Math.imul(l,ve)|0;u=u+Math.imul(l,be)|0;var Ne=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ne>>>26)|0;Ne&=67108863;o=Math.imul(z,W);h=Math.imul(z,V);h=h+Math.imul(F,W)|0;u=Math.imul(F,V);o=o+Math.imul(O,J)|0;h=h+Math.imul(O,Z)|0;h=h+Math.imul(H,J)|0;u=u+Math.imul(H,Z)|0;o=o+Math.imul(T,Y)|0;h=h+Math.imul(T,$)|0;h=h+Math.imul(j,Y)|0;u=u+Math.imul(j,$)|0;o=o+Math.imul(I,ee)|0;h=h+Math.imul(I,te)|0;h=h+Math.imul(C,ee)|0;u=u+Math.imul(C,te)|0;o=o+Math.imul(N,ie)|0;h=h+Math.imul(N,ne)|0;h=h+Math.imul(P,ie)|0;u=u+Math.imul(P,ne)|0;o=o+Math.imul(E,fe)|0;h=h+Math.imul(E,se)|0;h=h+Math.imul(k,fe)|0;u=u+Math.imul(k,se)|0;o=o+Math.imul(w,he)|0;h=h+Math.imul(w,ue)|0;h=h+Math.imul(M,he)|0;u=u+Math.imul(M,ue)|0;o=o+Math.imul(y,ce)|0;h=h+Math.imul(y,le)|0;h=h+Math.imul(g,ce)|0;u=u+Math.imul(g,le)|0;o=o+Math.imul(v,ve)|0;h=h+Math.imul(v,be)|0;h=h+Math.imul(b,ve)|0;u=u+Math.imul(b,be)|0;o=o+Math.imul(c,ye)|0;h=h+Math.imul(c,ge)|0;h=h+Math.imul(l,ye)|0;u=u+Math.imul(l,ge)|0;var Re=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Re>>>26)|0;Re&=67108863;o=Math.imul(z,J);h=Math.imul(z,Z);h=h+Math.imul(F,J)|0;u=Math.imul(F,Z);o=o+Math.imul(O,Y)|0;h=h+Math.imul(O,$)|0;h=h+Math.imul(H,Y)|0;u=u+Math.imul(H,$)|0;o=o+Math.imul(T,ee)|0;h=h+Math.imul(T,te)|0;h=h+Math.imul(j,ee)|0;u=u+Math.imul(j,te)|0;o=o+Math.imul(I,ie)|0;h=h+Math.imul(I,ne)|0;h=h+Math.imul(C,ie)|0;u=u+Math.imul(C,ne)|0;o=o+Math.imul(N,fe)|0;h=h+Math.imul(N,se)|0;h=h+Math.imul(P,fe)|0;u=u+Math.imul(P,se)|0;o=o+Math.imul(E,he)|0;h=h+Math.imul(E,ue)|0;h=h+Math.imul(k,he)|0;u=u+Math.imul(k,ue)|0;o=o+Math.imul(w,ce)|0;h=h+Math.imul(w,le)|0;h=h+Math.imul(M,ce)|0;u=u+Math.imul(M,le)|0;o=o+Math.imul(y,ve)|0;h=h+Math.imul(y,be)|0;h=h+Math.imul(g,ve)|0;u=u+Math.imul(g,be)|0;o=o+Math.imul(v,ye)|0;h=h+Math.imul(v,ge)|0;h=h+Math.imul(b,ye)|0;u=u+Math.imul(b,ge)|0;var Pe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Pe>>>26)|0;Pe&=67108863;o=Math.imul(z,Y);h=Math.imul(z,$);h=h+Math.imul(F,Y)|0;u=Math.imul(F,$);o=o+Math.imul(O,ee)|0;h=h+Math.imul(O,te)|0;h=h+Math.imul(H,ee)|0;u=u+Math.imul(H,te)|0;o=o+Math.imul(T,ie)|0;h=h+Math.imul(T,ne)|0;h=h+Math.imul(j,ie)|0;u=u+Math.imul(j,ne)|0;o=o+Math.imul(I,fe)|0;h=h+Math.imul(I,se)|0;h=h+Math.imul(C,fe)|0;u=u+Math.imul(C,se)|0;o=o+Math.imul(N,he)|0;h=h+Math.imul(N,ue)|0;h=h+Math.imul(P,he)|0;u=u+Math.imul(P,ue)|0;o=o+Math.imul(E,ce)|0;h=h+Math.imul(E,le)|0;h=h+Math.imul(k,ce)|0;u=u+Math.imul(k,le)|0;o=o+Math.imul(w,ve)|0;h=h+Math.imul(w,be)|0;h=h+Math.imul(M,ve)|0;u=u+Math.imul(M,be)|0;o=o+Math.imul(y,ye)|0;h=h+Math.imul(y,ge)|0;h=h+Math.imul(g,ye)|0;u=u+Math.imul(g,ge)|0;var xe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(xe>>>26)|0;xe&=67108863;o=Math.imul(z,ee);h=Math.imul(z,te);h=h+Math.imul(F,ee)|0;u=Math.imul(F,te);o=o+Math.imul(O,ie)|0;h=h+Math.imul(O,ne)|0;h=h+Math.imul(H,ie)|0;u=u+Math.imul(H,ne)|0;o=o+Math.imul(T,fe)|0;h=h+Math.imul(T,se)|0;h=h+Math.imul(j,fe)|0;u=u+Math.imul(j,se)|0;o=o+Math.imul(I,he)|0;h=h+Math.imul(I,ue)|0;h=h+Math.imul(C,he)|0;u=u+Math.imul(C,ue)|0;o=o+Math.imul(N,ce)|0;h=h+Math.imul(N,le)|0;h=h+Math.imul(P,ce)|0;u=u+Math.imul(P,le)|0;o=o+Math.imul(E,ve)|0;h=h+Math.imul(E,be)|0;h=h+Math.imul(k,ve)|0;u=u+Math.imul(k,be)|0;o=o+Math.imul(w,ye)|0;h=h+Math.imul(w,ge)|0;h=h+Math.imul(M,ye)|0;u=u+Math.imul(M,ge)|0;var Ie=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ie>>>26)|0;Ie&=67108863;o=Math.imul(z,ie);h=Math.imul(z,ne);h=h+Math.imul(F,ie)|0;u=Math.imul(F,ne);o=o+Math.imul(O,fe)|0;h=h+Math.imul(O,se)|0;h=h+Math.imul(H,fe)|0;u=u+Math.imul(H,se)|0;o=o+Math.imul(T,he)|0;h=h+Math.imul(T,ue)|0;h=h+Math.imul(j,he)|0;u=u+Math.imul(j,ue)|0;o=o+Math.imul(I,ce)|0;h=h+Math.imul(I,le)|0;h=h+Math.imul(C,ce)|0;u=u+Math.imul(C,le)|0;o=o+Math.imul(N,ve)|0;h=h+Math.imul(N,be)|0;h=h+Math.imul(P,ve)|0;u=u+Math.imul(P,be)|0;o=o+Math.imul(E,ye)|0;h=h+Math.imul(E,ge)|0;h=h+Math.imul(k,ye)|0;u=u+Math.imul(k,ge)|0;var Ce=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ce>>>26)|0;Ce&=67108863;o=Math.imul(z,fe);h=Math.imul(z,se);h=h+Math.imul(F,fe)|0;u=Math.imul(F,se);o=o+Math.imul(O,he)|0;h=h+Math.imul(O,ue)|0;h=h+Math.imul(H,he)|0;u=u+Math.imul(H,ue)|0;o=o+Math.imul(T,ce)|0;h=h+Math.imul(T,le)|0;h=h+Math.imul(j,ce)|0;u=u+Math.imul(j,le)|0;o=o+Math.imul(I,ve)|0;h=h+Math.imul(I,be)|0;h=h+Math.imul(C,ve)|0;u=u+Math.imul(C,be)|0;o=o+Math.imul(N,ye)|0;h=h+Math.imul(N,ge)|0;h=h+Math.imul(P,ye)|0;u=u+Math.imul(P,ge)|0;var De=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(De>>>26)|0;De&=67108863;o=Math.imul(z,he);h=Math.imul(z,ue);h=h+Math.imul(F,he)|0;u=Math.imul(F,ue);o=o+Math.imul(O,ce)|0;h=h+Math.imul(O,le)|0;h=h+Math.imul(H,ce)|0;u=u+Math.imul(H,le)|0;o=o+Math.imul(T,ve)|0;h=h+Math.imul(T,be)|0;h=h+Math.imul(j,ve)|0;u=u+Math.imul(j,be)|0;o=o+Math.imul(I,ye)|0;h=h+Math.imul(I,ge)|0;h=h+Math.imul(C,ye)|0;u=u+Math.imul(C,ge)|0;var Te=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Te>>>26)|0;Te&=67108863;o=Math.imul(z,ce);h=Math.imul(z,le);h=h+Math.imul(F,ce)|0;u=Math.imul(F,le);o=o+Math.imul(O,ve)|0;h=h+Math.imul(O,be)|0;h=h+Math.imul(H,ve)|0;u=u+Math.imul(H,be)|0;o=o+Math.imul(T,ye)|0;h=h+Math.imul(T,ge)|0;h=h+Math.imul(j,ye)|0;u=u+Math.imul(j,ge)|0;var je=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(je>>>26)|0;je&=67108863;o=Math.imul(z,ve);h=Math.imul(z,be);h=h+Math.imul(F,ve)|0;u=Math.imul(F,be);o=o+Math.imul(O,ye)|0;h=h+Math.imul(O,ge)|0;h=h+Math.imul(H,ye)|0;u=u+Math.imul(H,ge)|0;var qe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(qe>>>26)|0;qe&=67108863;o=Math.imul(z,ye);h=Math.imul(z,ge);h=h+Math.imul(F,ye)|0;u=Math.imul(F,ge);var Oe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Oe>>>26)|0;Oe&=67108863;a[0]=_e;a[1]=we;a[2]=Me;a[3]=Se;a[4]=Be;a[5]=Ee;a[6]=ke;a[7]=Ae;a[8]=Ne;a[9]=Re;a[10]=Pe;a[11]=xe;a[12]=Ie;a[13]=Ce;a[14]=De;a[15]=Te;a[16]=je;a[17]=qe;a[18]=Oe;if(s!==0){a[19]=s;r.length++}return r};if(!Math.imul){o=smallMulTo}function bigMulTo(e,t,r){r.negative=t.negative^e.negative;r.length=e.length+t.length;var i=0;var n=0;for(var a=0;a>>26)|0;n+=s>>>26;s&=67108863}r.words[a]=o;i=s;s=n}if(i!==0){r.words[a]=i}else{r.length--}return r.strip()}function jumboMulTo(e,t,r){var i=new FFTM;return i.mulp(e,t,r)}BN.prototype.mulTo=function mulTo(e,t){var r;var i=this.length+e.length;if(this.length===10&&e.length===10){r=o(this,e,t)}else if(i<63){r=smallMulTo(this,e,t)}else if(i<1024){r=bigMulTo(this,e,t)}else{r=jumboMulTo(this,e,t)}return r};function FFTM(e,t){this.x=e;this.y=t}FFTM.prototype.makeRBT=function makeRBT(e){var t=new Array(e);var r=BN.prototype._countBits(e)-1;for(var i=0;i>=1}return i};FFTM.prototype.permute=function permute(e,t,r,i,n,a){for(var s=0;s>>1){n++}return 1<>>13;r[2*a+1]=n&8191;n=n>>>13}for(a=2*t;a>=26;t+=i/67108864|0;t+=n>>>26;this.words[r]=n&67108863}if(t!==0){this.words[r]=t;this.length++}return this};BN.prototype.muln=function muln(e){return this.clone().imuln(e)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(e){var t=toBitArray(e);if(t.length===0)return new BN(1);var r=this;for(var i=0;i=0);var t=e%26;var r=(e-t)/26;var i=67108863>>>26-t<<26-t;var n;if(t!==0){var a=0;for(n=0;n>>26-t}if(a){this.words[n]=a;this.length++}}if(r!==0){for(n=this.length-1;n>=0;n--){this.words[n+r]=this.words[n]}for(n=0;n=0);var i;if(t){i=(t-t%26)/26}else{i=0}var n=e%26;var a=Math.min((e-n)/26,this.length);var s=67108863^67108863>>>n<a){this.length-=a;for(h=0;h=0&&(u!==0||h>=i);h--){var d=this.words[h]|0;this.words[h]=u<<26-n|d>>>n;u=d&s}if(o&&u!==0){o.words[o.length++]=u}if(this.length===0){this.words[0]=0;this.length=1}return this.strip()};BN.prototype.ishrn=function ishrn(e,t,r){assert(this.negative===0);return this.iushrn(e,t,r)};BN.prototype.shln=function shln(e){return this.clone().ishln(e)};BN.prototype.ushln=function ushln(e){return this.clone().iushln(e)};BN.prototype.shrn=function shrn(e){return this.clone().ishrn(e)};BN.prototype.ushrn=function ushrn(e){return this.clone().iushrn(e)};BN.prototype.testn=function testn(e){assert(typeof e==="number"&&e>=0);var t=e%26;var r=(e-t)/26;var i=1<=0);var t=e%26;var r=(e-t)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=r){return this}if(t!==0){r++}this.length=Math.min(r,this.length);if(t!==0){var i=67108863^67108863>>>t<=67108864;t++){this.words[t]-=67108864;if(t===this.length-1){this.words[t+1]=1}else{this.words[t+1]++}}this.length=Math.max(this.length,t+1);return this};BN.prototype.isubn=function isubn(e){assert(typeof e==="number");assert(e<67108864);if(e<0)return this.iaddn(-e);if(this.negative!==0){this.negative=0;this.iaddn(e);this.negative=1;return this}this.words[0]-=e;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var t=0;t>26)-(o/67108864|0);this.words[n+r]=a&67108863}for(;n>26;this.words[n+r]=a&67108863}if(s===0)return this.strip();assert(s===-1);s=0;for(n=0;n>26;this.words[n]=a&67108863}this.negative=1;return this.strip()};BN.prototype._wordDiv=function _wordDiv(e,t){var r=this.length-e.length;var i=this.clone();var n=e;var a=n.words[n.length-1]|0;var s=this._countBits(a);r=26-s;if(r!==0){n=n.ushln(r);i.iushln(r);a=n.words[n.length-1]|0}var o=i.length-n.length;var h;if(t!=="mod"){h=new BN(null);h.length=o+1;h.words=new Array(h.length);for(var u=0;u=0;c--){var l=(i.words[n.length+c]|0)*67108864+(i.words[n.length+c-1]|0);l=Math.min(l/a|0,67108863);i._ishlnsubmul(n,l,c);while(i.negative!==0){l--;i.negative=0;i._ishlnsubmul(n,1,c);if(!i.isZero()){i.negative^=1}}if(h){h.words[c]=l}}if(h){h.strip()}i.strip();if(t!=="div"&&r!==0){i.iushrn(r)}return{div:h||null,mod:i}};BN.prototype.divmod=function divmod(e,t,r){assert(!e.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var i,n,a;if(this.negative!==0&&e.negative===0){a=this.neg().divmod(e,t);if(t!=="mod"){i=a.div.neg()}if(t!=="div"){n=a.mod.neg();if(r&&n.negative!==0){n.iadd(e)}}return{div:i,mod:n}}if(this.negative===0&&e.negative!==0){a=this.divmod(e.neg(),t);if(t!=="mod"){i=a.div.neg()}return{div:i,mod:a.mod}}if((this.negative&e.negative)!==0){a=this.neg().divmod(e.neg(),t);if(t!=="div"){n=a.mod.neg();if(r&&n.negative!==0){n.isub(e)}}return{div:a.div,mod:n}}if(e.length>this.length||this.cmp(e)<0){return{div:new BN(0),mod:this}}if(e.length===1){if(t==="div"){return{div:this.divn(e.words[0]),mod:null}}if(t==="mod"){return{div:null,mod:new BN(this.modn(e.words[0]))}}return{div:this.divn(e.words[0]),mod:new BN(this.modn(e.words[0]))}}return this._wordDiv(e,t)};BN.prototype.div=function div(e){return this.divmod(e,"div",false).div};BN.prototype.mod=function mod(e){return this.divmod(e,"mod",false).mod};BN.prototype.umod=function umod(e){return this.divmod(e,"mod",true).mod};BN.prototype.divRound=function divRound(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=t.div.negative!==0?t.mod.isub(e):t.mod;var i=e.ushrn(1);var n=e.andln(1);var a=r.cmp(i);if(a<0||n===1&&a===0)return t.div;return t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)};BN.prototype.modn=function modn(e){assert(e<=67108863);var t=(1<<26)%e;var r=0;for(var i=this.length-1;i>=0;i--){r=(t*r+(this.words[i]|0))%e}return r};BN.prototype.idivn=function idivn(e){assert(e<=67108863);var t=0;for(var r=this.length-1;r>=0;r--){var i=(this.words[r]|0)+t*67108864;this.words[r]=i/e|0;t=i%e}return this.strip()};BN.prototype.divn=function divn(e){return this.clone().idivn(e)};BN.prototype.egcd=function egcd(e){assert(e.negative===0);assert(!e.isZero());var t=this;var r=e.clone();if(t.negative!==0){t=t.umod(e)}else{t=t.clone()}var i=new BN(1);var n=new BN(0);var a=new BN(0);var s=new BN(1);var o=0;while(t.isEven()&&r.isEven()){t.iushrn(1);r.iushrn(1);++o}var h=r.clone();var u=t.clone();while(!t.isZero()){for(var d=0,c=1;(t.words[0]&c)===0&&d<26;++d,c<<=1);if(d>0){t.iushrn(d);while(d-- >0){if(i.isOdd()||n.isOdd()){i.iadd(h);n.isub(u)}i.iushrn(1);n.iushrn(1)}}for(var l=0,p=1;(r.words[0]&p)===0&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0){if(a.isOdd()||s.isOdd()){a.iadd(h);s.isub(u)}a.iushrn(1);s.iushrn(1)}}if(t.cmp(r)>=0){t.isub(r);i.isub(a);n.isub(s)}else{r.isub(t);a.isub(i);s.isub(n)}}return{a:a,b:s,gcd:r.iushln(o)}};BN.prototype._invmp=function _invmp(e){assert(e.negative===0);assert(!e.isZero());var t=this;var r=e.clone();if(t.negative!==0){t=t.umod(e)}else{t=t.clone()}var i=new BN(1);var n=new BN(0);var a=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var s=0,o=1;(t.words[0]&o)===0&&s<26;++s,o<<=1);if(s>0){t.iushrn(s);while(s-- >0){if(i.isOdd()){i.iadd(a)}i.iushrn(1)}}for(var h=0,u=1;(r.words[0]&u)===0&&h<26;++h,u<<=1);if(h>0){r.iushrn(h);while(h-- >0){if(n.isOdd()){n.iadd(a)}n.iushrn(1)}}if(t.cmp(r)>=0){t.isub(r);i.isub(n)}else{r.isub(t);n.isub(i)}}var d;if(t.cmpn(1)===0){d=i}else{d=n}if(d.cmpn(0)<0){d.iadd(e)}return d};BN.prototype.gcd=function gcd(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone();var r=e.clone();t.negative=0;r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++){t.iushrn(1);r.iushrn(1)}do{while(t.isEven()){t.iushrn(1)}while(r.isEven()){r.iushrn(1)}var n=t.cmp(r);if(n<0){var a=t;t=r;r=a}else if(n===0||r.cmpn(1)===0){break}t.isub(r)}while(true);return r.iushln(i)};BN.prototype.invm=function invm(e){return this.egcd(e).a.umod(e)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(e){return this.words[0]&e};BN.prototype.bincn=function bincn(e){assert(typeof e==="number");var t=e%26;var r=(e-t)/26;var i=1<>>26;s&=67108863;this.words[a]=s}if(n!==0){this.words[a]=n;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this.strip();var r;if(this.length>1){r=1}else{if(t){e=-e}assert(e<=67108863,"Number is too big");var i=this.words[0]|0;r=i===e?0:ie.length)return 1;if(this.length=0;r--){var i=this.words[r]|0;var n=e.words[r]|0;if(i===n)continue;if(in){t=1}break}return t};BN.prototype.gtn=function gtn(e){return this.cmpn(e)===1};BN.prototype.gt=function gt(e){return this.cmp(e)===1};BN.prototype.gten=function gten(e){return this.cmpn(e)>=0};BN.prototype.gte=function gte(e){return this.cmp(e)>=0};BN.prototype.ltn=function ltn(e){return this.cmpn(e)===-1};BN.prototype.lt=function lt(e){return this.cmp(e)===-1};BN.prototype.lten=function lten(e){return this.cmpn(e)<=0};BN.prototype.lte=function lte(e){return this.cmp(e)<=0};BN.prototype.eqn=function eqn(e){return this.cmpn(e)===0};BN.prototype.eq=function eq(e){return this.cmp(e)===0};BN.red=function red(e){return new Red(e)};BN.prototype.toRed=function toRed(e){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return e.convertTo(this)._forceRed(e)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(e){this.red=e;return this};BN.prototype.forceRed=function forceRed(e){assert(!this.red,"Already a number in reduction context");return this._forceRed(e)};BN.prototype.redAdd=function redAdd(e){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,e)};BN.prototype.redIAdd=function redIAdd(e){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,e)};BN.prototype.redSub=function redSub(e){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,e)};BN.prototype.redISub=function redISub(e){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,e)};BN.prototype.redShl=function redShl(e){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,e)};BN.prototype.redMul=function redMul(e){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,e);return this.red.mul(this,e)};BN.prototype.redIMul=function redIMul(e){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,e);return this.red.imul(this,e)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(e){assert(this.red&&!e.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,e)};var h={k256:null,p224:null,p192:null,p25519:null};function MPrime(e,t){this.name=e;this.p=new BN(t,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var e=new BN(null);e.words=new Array(Math.ceil(this.n/13));return e};MPrime.prototype.ireduce=function ireduce(e){var t=e;var r;do{this.split(t,this.tmp);t=this.imulK(t);t=t.iadd(this.tmp);r=t.bitLength()}while(r>this.n);var i=r0){t.isub(this.p)}else{if(t.strip!==undefined){t.strip()}else{t._strip()}}return t};MPrime.prototype.split=function split(e,t){e.iushrn(this.n,0,t)};MPrime.prototype.imulK=function imulK(e){return e.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(e,t){var r=4194303;var i=Math.min(e.length,9);for(var n=0;n>>22;a=s}a>>>=22;e.words[n-10]=a;if(a===0&&e.length>10){e.length-=10}else{e.length-=9}};K256.prototype.imulK=function imulK(e){e.words[e.length]=0;e.words[e.length+1]=0;e.length+=2;var t=0;for(var r=0;r>>=26;e.words[r]=n;t=i}if(t!==0){e.words[e.length++]=t}return e};BN._prime=function prime(e){if(h[e])return h[e];var prime;if(e==="k256"){prime=new K256}else if(e==="p224"){prime=new P224}else if(e==="p192"){prime=new P192}else if(e==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+e)}h[e]=prime;return prime};function Red(e){if(typeof e==="string"){var t=BN._prime(e);this.m=t.p;this.prime=t}else{assert(e.gtn(1),"modulus must be greater than 1");this.m=e;this.prime=null}}Red.prototype._verify1=function _verify1(e){assert(e.negative===0,"red works only with positives");assert(e.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(e,t){assert((e.negative|t.negative)===0,"red works only with positives");assert(e.red&&e.red===t.red,"red works only with red numbers")};Red.prototype.imod=function imod(e){if(this.prime)return this.prime.ireduce(e)._forceRed(this);return e.umod(this.m)._forceRed(this)};Red.prototype.neg=function neg(e){if(e.isZero()){return e.clone()}return this.m.sub(e)._forceRed(this)};Red.prototype.add=function add(e,t){this._verify2(e,t);var r=e.add(t);if(r.cmp(this.m)>=0){r.isub(this.m)}return r._forceRed(this)};Red.prototype.iadd=function iadd(e,t){this._verify2(e,t);var r=e.iadd(t);if(r.cmp(this.m)>=0){r.isub(this.m)}return r};Red.prototype.sub=function sub(e,t){this._verify2(e,t);var r=e.sub(t);if(r.cmpn(0)<0){r.iadd(this.m)}return r._forceRed(this)};Red.prototype.isub=function isub(e,t){this._verify2(e,t);var r=e.isub(t);if(r.cmpn(0)<0){r.iadd(this.m)}return r};Red.prototype.shl=function shl(e,t){this._verify1(e);return this.imod(e.ushln(t))};Red.prototype.imul=function imul(e,t){this._verify2(e,t);return this.imod(e.imul(t))};Red.prototype.mul=function mul(e,t){this._verify2(e,t);return this.imod(e.mul(t))};Red.prototype.isqr=function isqr(e){return this.imul(e,e.clone())};Red.prototype.sqr=function sqr(e){return this.mul(e,e)};Red.prototype.sqrt=function sqrt(e){if(e.isZero())return e.clone();var t=this.m.andln(3);assert(t%2===1);if(t===3){var r=this.m.add(new BN(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1);var n=0;while(!i.isZero()&&i.andln(1)===0){n++;i.iushrn(1)}assert(!i.isZero());var a=new BN(1).toRed(this);var s=a.redNeg();var o=this.m.subn(1).iushrn(1);var h=this.m.bitLength();h=new BN(2*h*h).toRed(this);while(this.pow(h,o).cmp(s)!==0){h.redIAdd(s)}var u=this.pow(h,i);var d=this.pow(e,i.addn(1).iushrn(1));var c=this.pow(e,i);var l=n;while(c.cmp(a)!==0){var p=c;for(var v=0;p.cmp(a)!==0;v++){p=p.redSqr()}assert(v=0;n--){var u=t.words[n];for(var d=h-1;d>=0;d--){var c=u>>d&1;if(a!==i[0]){a=this.sqr(a)}if(c===0&&s===0){o=0;continue}s<<=1;s|=c;o++;if(o!==r&&(n!==0||d!==0))continue;a=this.mul(a,i[s]);o=0;s=0}h=26}return a};Red.prototype.convertTo=function convertTo(e){var t=e.umod(this.m);return t===e?t.clone():t};Red.prototype.convertFrom=function convertFrom(e){var t=e.clone();t.red=null;return t};BN.mont=function mont(e){return new Mont(e)};function Mont(e){Red.call(this,e);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new BN(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)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(e){return this.imod(e.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(e){var t=this.imod(e.mul(this.rinv));t.red=null;return t};Mont.prototype.imul=function imul(e,t){if(e.isZero()||t.isZero()){e.words[0]=0;e.length=1;return e}var r=e.imul(t);var i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var n=r.isub(i).iushrn(this.shift);var a=n;if(n.cmp(this.m)>=0){a=n.isub(this.m)}else if(n.cmpn(0)<0){a=n.iadd(this.m)}return a._forceRed(this)};Mont.prototype.mul=function mul(e,t){if(e.isZero()||t.isZero())return new BN(0)._forceRed(this);var r=e.mul(t);var i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var n=r.isub(i).iushrn(this.shift);var a=n;if(n.cmp(this.m)>=0){a=n.isub(this.m)}else if(n.cmpn(0)<0){a=n.iadd(this.m)}return a._forceRed(this)};Mont.prototype.invm=function invm(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(false||e,this)},1670:function(e,t,r){e=r.nmd(e);(function(e,t){"use strict";function assert(e,t){if(!e)throw new Error(t||"Assertion failed")}function inherits(e,t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}function BN(e,t,r){if(BN.isBN(e)){return e}this.negative=0;this.words=null;this.length=0;this.red=null;if(e!==null){if(t==="le"||t==="be"){r=t;t=10}this._init(e||0,t||10,r||"be")}}if(typeof e==="object"){e.exports=BN}else{t.BN=BN}BN.BN=BN;BN.wordSize=26;var i;try{i=r(4300).Buffer}catch(e){}BN.isBN=function isBN(e){if(e instanceof BN){return true}return e!==null&&typeof e==="object"&&e.constructor.wordSize===BN.wordSize&&Array.isArray(e.words)};BN.max=function max(e,t){if(e.cmp(t)>0)return e;return t};BN.min=function min(e,t){if(e.cmp(t)<0)return e;return t};BN.prototype._init=function init(e,t,r){if(typeof e==="number"){return this._initNumber(e,t,r)}if(typeof e==="object"){return this._initArray(e,t,r)}if(t==="hex"){t=16}assert(t===(t|0)&&t>=2&&t<=36);e=e.toString().replace(/\s+/g,"");var i=0;if(e[0]==="-"){i++}if(t===16){this._parseHex(e,i)}else{this._parseBase(e,t,i)}if(e[0]==="-"){this.negative=1}this._strip();if(r!=="le")return;this._initArray(this.toArray(),t,r)};BN.prototype._initNumber=function _initNumber(e,t,r){if(e<0){this.negative=1;e=-e}if(e<67108864){this.words=[e&67108863];this.length=1}else if(e<4503599627370496){this.words=[e&67108863,e/67108864&67108863];this.length=2}else{assert(e<9007199254740992);this.words=[e&67108863,e/67108864&67108863,1];this.length=3}if(r!=="le")return;this._initArray(this.toArray(),t,r)};BN.prototype._initArray=function _initArray(e,t,r){assert(typeof e.length==="number");if(e.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(e.length/3);this.words=new Array(this.length);for(var i=0;i=0;i-=3){a=e[i]|e[i-1]<<8|e[i-2]<<16;this.words[n]|=a<>>26-s&67108863;s+=24;if(s>=26){s-=26;n++}}}else if(r==="le"){for(i=0,n=0;i>>26-s&67108863;s+=24;if(s>=26){s-=26;n++}}}return this._strip()};function parseHex(e,t,r){var i=0;var n=Math.min(e.length,r);var a=0;for(var s=t;s=49&&o<=54){h=o-49+10}else if(o>=17&&o<=22){h=o-17+10}else{h=o}i|=h;a|=h}assert(!(a&240),"Invalid character in "+e);return i}BN.prototype._parseHex=function _parseHex(e,t){this.length=Math.ceil((e.length-t)/6);this.words=new Array(this.length);for(var r=0;r=t;r-=6){n=parseHex(e,r,r+6);this.words[i]|=n<>>26-a&4194303;a+=24;if(a>=26){a-=26;i++}}if(r+6!==t){n=parseHex(e,t,r+6);this.words[i]|=n<>>26-a&4194303}this._strip()};function parseBase(e,t,r,i){var n=0;var a=0;var s=Math.min(e.length,r);for(var o=t;o=49){a=h-49+10}else if(h>=17){a=h-17+10}else{a=h}assert(h>=0&&a1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};if(typeof Symbol!=="undefined"&&typeof Symbol.for==="function"){BN.prototype[Symbol.for("nodejs.util.inspect.custom")]=inspect}else{BN.prototype.inspect=inspect}function inspect(){return(this.red?""}var n=["","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"];var a=[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];var s=[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];BN.prototype.toString=function toString(e,t){e=e||10;t=t|0||1;var r;if(e===16||e==="hex"){r="";var i=0;var o=0;for(var h=0;h>>24-i&16777215;if(o!==0||h!==this.length-1){r=n[6-d.length]+d+r}else{r=d+r}i+=2;if(i>=26){i-=26;h--}}if(o!==0){r=o.toString(16)+r}while(r.length%t!==0){r="0"+r}if(this.negative!==0){r="-"+r}return r}if(e===(e|0)&&e>=2&&e<=36){var c=a[e];var l=s[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var v=p.modrn(l).toString(e);p=p.idivn(l);if(!p.isZero()){r=n[c-v.length]+v+r}else{r=v+r}}if(this.isZero()){r="0"+r}while(r.length%t!==0){r="0"+r}if(this.negative!==0){r="-"+r}return r}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var e=this.words[0];if(this.length===2){e+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){e+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-e:e};BN.prototype.toJSON=function toJSON(){return this.toString(16,2)};if(i){BN.prototype.toBuffer=function toBuffer(e,t){return this.toArrayLike(i,e,t)}}BN.prototype.toArray=function toArray(e,t){return this.toArrayLike(Array,e,t)};var o=function allocate(e,t){if(e.allocUnsafe){return e.allocUnsafe(t)}return new e(t)};BN.prototype.toArrayLike=function toArrayLike(e,t,r){this._strip();var i=this.byteLength();var n=r||Math.max(1,i);assert(i<=n,"byte array longer than desired length");assert(n>0,"Requested array length <= 0");var a=o(e,n);var s=t==="le"?"LE":"BE";this["_toArrayLike"+s](a,i);return a};BN.prototype._toArrayLikeLE=function _toArrayLikeLE(e,t){var r=0;var i=0;for(var n=0,a=0;n>8&255}if(r>16&255}if(a===6){if(r>24&255}i=0;a=0}else{i=s>>>24;a+=2}}if(r=0){e[r--]=s>>8&255}if(r>=0){e[r--]=s>>16&255}if(a===6){if(r>=0){e[r--]=s>>24&255}i=0;a=0}else{i=s>>>24;a+=2}}if(r>=0){e[r--]=i;while(r>=0){e[r--]=0}}};if(Math.clz32){BN.prototype._countBits=function _countBits(e){return 32-Math.clz32(e)}}else{BN.prototype._countBits=function _countBits(e){var t=e;var r=0;if(t>=4096){r+=13;t>>>=13}if(t>=64){r+=7;t>>>=7}if(t>=8){r+=4;t>>>=4}if(t>=2){r+=2;t>>>=2}return r+t}}BN.prototype._zeroBits=function _zeroBits(e){if(e===0)return 26;var t=e;var r=0;if((t&8191)===0){r+=13;t>>>=13}if((t&127)===0){r+=7;t>>>=7}if((t&15)===0){r+=4;t>>>=4}if((t&3)===0){r+=2;t>>>=2}if((t&1)===0){r++}return r};BN.prototype.bitLength=function bitLength(){var e=this.words[this.length-1];var t=this._countBits(e);return(this.length-1)*26+t};function toBitArray(e){var t=new Array(e.bitLength());for(var r=0;r>>n&1}return t}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var e=0;for(var t=0;te.length)return this.clone().ior(e);return e.clone().ior(this)};BN.prototype.uor=function uor(e){if(this.length>e.length)return this.clone().iuor(e);return e.clone().iuor(this)};BN.prototype.iuand=function iuand(e){var t;if(this.length>e.length){t=e}else{t=this}for(var r=0;re.length)return this.clone().iand(e);return e.clone().iand(this)};BN.prototype.uand=function uand(e){if(this.length>e.length)return this.clone().iuand(e);return e.clone().iuand(this)};BN.prototype.iuxor=function iuxor(e){var t;var r;if(this.length>e.length){t=this;r=e}else{t=e;r=this}for(var i=0;ie.length)return this.clone().ixor(e);return e.clone().ixor(this)};BN.prototype.uxor=function uxor(e){if(this.length>e.length)return this.clone().iuxor(e);return e.clone().iuxor(this)};BN.prototype.inotn=function inotn(e){assert(typeof e==="number"&&e>=0);var t=Math.ceil(e/26)|0;var r=e%26;this._expand(t);if(r>0){t--}for(var i=0;i0){this.words[i]=~this.words[i]&67108863>>26-r}return this._strip()};BN.prototype.notn=function notn(e){return this.clone().inotn(e)};BN.prototype.setn=function setn(e,t){assert(typeof e==="number"&&e>=0);var r=e/26|0;var i=e%26;this._expand(r+1);if(t){this.words[r]=this.words[r]|1<e.length){r=this;i=e}else{r=e;i=this}var n=0;for(var a=0;a>>26}for(;n!==0&&a>>26}this.length=r.length;if(n!==0){this.words[this.length]=n;this.length++}else if(r!==this){for(;ae.length)return this.clone().iadd(e);return e.clone().iadd(this)};BN.prototype.isub=function isub(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);e.negative=1;return t._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(e);this.negative=1;return this._normSign()}var r=this.cmp(e);if(r===0){this.negative=0;this.length=1;this.words[0]=0;return this}var i,n;if(r>0){i=this;n=e}else{i=e;n=this}var a=0;for(var s=0;s>26;this.words[s]=t&67108863}for(;a!==0&&s>26;this.words[s]=t&67108863}if(a===0&&s>>26;var c=h&67108863;var l=Math.min(u,t.length-1);for(var p=Math.max(0,u-e.length+1);p<=l;p++){var v=u-p|0;n=e.words[v]|0;a=t.words[p]|0;s=n*a+c;d+=s/67108864|0;c=s&67108863}r.words[u]=c|0;h=d|0}if(h!==0){r.words[u]=h|0}else{r.length--}return r._strip()}var h=function comb10MulTo(e,t,r){var i=e.words;var n=t.words;var a=r.words;var s=0;var o;var h;var u;var d=i[0]|0;var c=d&8191;var l=d>>>13;var p=i[1]|0;var v=p&8191;var b=p>>>13;var m=i[2]|0;var y=m&8191;var g=m>>>13;var _=i[3]|0;var w=_&8191;var M=_>>>13;var B=i[4]|0;var E=B&8191;var k=B>>>13;var A=i[5]|0;var N=A&8191;var P=A>>>13;var x=i[6]|0;var I=x&8191;var C=x>>>13;var D=i[7]|0;var T=D&8191;var j=D>>>13;var q=i[8]|0;var O=q&8191;var H=q>>>13;var L=i[9]|0;var z=L&8191;var F=L>>>13;var U=n[0]|0;var W=U&8191;var V=U>>>13;var G=n[1]|0;var J=G&8191;var Z=G>>>13;var X=n[2]|0;var Y=X&8191;var $=X>>>13;var Q=n[3]|0;var ee=Q&8191;var te=Q>>>13;var re=n[4]|0;var ie=re&8191;var ne=re>>>13;var ae=n[5]|0;var fe=ae&8191;var se=ae>>>13;var oe=n[6]|0;var he=oe&8191;var ue=oe>>>13;var de=n[7]|0;var ce=de&8191;var le=de>>>13;var pe=n[8]|0;var ve=pe&8191;var be=pe>>>13;var me=n[9]|0;var ye=me&8191;var ge=me>>>13;r.negative=e.negative^t.negative;r.length=19;o=Math.imul(c,W);h=Math.imul(c,V);h=h+Math.imul(l,W)|0;u=Math.imul(l,V);var _e=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(_e>>>26)|0;_e&=67108863;o=Math.imul(v,W);h=Math.imul(v,V);h=h+Math.imul(b,W)|0;u=Math.imul(b,V);o=o+Math.imul(c,J)|0;h=h+Math.imul(c,Z)|0;h=h+Math.imul(l,J)|0;u=u+Math.imul(l,Z)|0;var we=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(we>>>26)|0;we&=67108863;o=Math.imul(y,W);h=Math.imul(y,V);h=h+Math.imul(g,W)|0;u=Math.imul(g,V);o=o+Math.imul(v,J)|0;h=h+Math.imul(v,Z)|0;h=h+Math.imul(b,J)|0;u=u+Math.imul(b,Z)|0;o=o+Math.imul(c,Y)|0;h=h+Math.imul(c,$)|0;h=h+Math.imul(l,Y)|0;u=u+Math.imul(l,$)|0;var Me=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Me>>>26)|0;Me&=67108863;o=Math.imul(w,W);h=Math.imul(w,V);h=h+Math.imul(M,W)|0;u=Math.imul(M,V);o=o+Math.imul(y,J)|0;h=h+Math.imul(y,Z)|0;h=h+Math.imul(g,J)|0;u=u+Math.imul(g,Z)|0;o=o+Math.imul(v,Y)|0;h=h+Math.imul(v,$)|0;h=h+Math.imul(b,Y)|0;u=u+Math.imul(b,$)|0;o=o+Math.imul(c,ee)|0;h=h+Math.imul(c,te)|0;h=h+Math.imul(l,ee)|0;u=u+Math.imul(l,te)|0;var Se=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Se>>>26)|0;Se&=67108863;o=Math.imul(E,W);h=Math.imul(E,V);h=h+Math.imul(k,W)|0;u=Math.imul(k,V);o=o+Math.imul(w,J)|0;h=h+Math.imul(w,Z)|0;h=h+Math.imul(M,J)|0;u=u+Math.imul(M,Z)|0;o=o+Math.imul(y,Y)|0;h=h+Math.imul(y,$)|0;h=h+Math.imul(g,Y)|0;u=u+Math.imul(g,$)|0;o=o+Math.imul(v,ee)|0;h=h+Math.imul(v,te)|0;h=h+Math.imul(b,ee)|0;u=u+Math.imul(b,te)|0;o=o+Math.imul(c,ie)|0;h=h+Math.imul(c,ne)|0;h=h+Math.imul(l,ie)|0;u=u+Math.imul(l,ne)|0;var Be=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Be>>>26)|0;Be&=67108863;o=Math.imul(N,W);h=Math.imul(N,V);h=h+Math.imul(P,W)|0;u=Math.imul(P,V);o=o+Math.imul(E,J)|0;h=h+Math.imul(E,Z)|0;h=h+Math.imul(k,J)|0;u=u+Math.imul(k,Z)|0;o=o+Math.imul(w,Y)|0;h=h+Math.imul(w,$)|0;h=h+Math.imul(M,Y)|0;u=u+Math.imul(M,$)|0;o=o+Math.imul(y,ee)|0;h=h+Math.imul(y,te)|0;h=h+Math.imul(g,ee)|0;u=u+Math.imul(g,te)|0;o=o+Math.imul(v,ie)|0;h=h+Math.imul(v,ne)|0;h=h+Math.imul(b,ie)|0;u=u+Math.imul(b,ne)|0;o=o+Math.imul(c,fe)|0;h=h+Math.imul(c,se)|0;h=h+Math.imul(l,fe)|0;u=u+Math.imul(l,se)|0;var Ee=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ee>>>26)|0;Ee&=67108863;o=Math.imul(I,W);h=Math.imul(I,V);h=h+Math.imul(C,W)|0;u=Math.imul(C,V);o=o+Math.imul(N,J)|0;h=h+Math.imul(N,Z)|0;h=h+Math.imul(P,J)|0;u=u+Math.imul(P,Z)|0;o=o+Math.imul(E,Y)|0;h=h+Math.imul(E,$)|0;h=h+Math.imul(k,Y)|0;u=u+Math.imul(k,$)|0;o=o+Math.imul(w,ee)|0;h=h+Math.imul(w,te)|0;h=h+Math.imul(M,ee)|0;u=u+Math.imul(M,te)|0;o=o+Math.imul(y,ie)|0;h=h+Math.imul(y,ne)|0;h=h+Math.imul(g,ie)|0;u=u+Math.imul(g,ne)|0;o=o+Math.imul(v,fe)|0;h=h+Math.imul(v,se)|0;h=h+Math.imul(b,fe)|0;u=u+Math.imul(b,se)|0;o=o+Math.imul(c,he)|0;h=h+Math.imul(c,ue)|0;h=h+Math.imul(l,he)|0;u=u+Math.imul(l,ue)|0;var ke=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(ke>>>26)|0;ke&=67108863;o=Math.imul(T,W);h=Math.imul(T,V);h=h+Math.imul(j,W)|0;u=Math.imul(j,V);o=o+Math.imul(I,J)|0;h=h+Math.imul(I,Z)|0;h=h+Math.imul(C,J)|0;u=u+Math.imul(C,Z)|0;o=o+Math.imul(N,Y)|0;h=h+Math.imul(N,$)|0;h=h+Math.imul(P,Y)|0;u=u+Math.imul(P,$)|0;o=o+Math.imul(E,ee)|0;h=h+Math.imul(E,te)|0;h=h+Math.imul(k,ee)|0;u=u+Math.imul(k,te)|0;o=o+Math.imul(w,ie)|0;h=h+Math.imul(w,ne)|0;h=h+Math.imul(M,ie)|0;u=u+Math.imul(M,ne)|0;o=o+Math.imul(y,fe)|0;h=h+Math.imul(y,se)|0;h=h+Math.imul(g,fe)|0;u=u+Math.imul(g,se)|0;o=o+Math.imul(v,he)|0;h=h+Math.imul(v,ue)|0;h=h+Math.imul(b,he)|0;u=u+Math.imul(b,ue)|0;o=o+Math.imul(c,ce)|0;h=h+Math.imul(c,le)|0;h=h+Math.imul(l,ce)|0;u=u+Math.imul(l,le)|0;var Ae=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ae>>>26)|0;Ae&=67108863;o=Math.imul(O,W);h=Math.imul(O,V);h=h+Math.imul(H,W)|0;u=Math.imul(H,V);o=o+Math.imul(T,J)|0;h=h+Math.imul(T,Z)|0;h=h+Math.imul(j,J)|0;u=u+Math.imul(j,Z)|0;o=o+Math.imul(I,Y)|0;h=h+Math.imul(I,$)|0;h=h+Math.imul(C,Y)|0;u=u+Math.imul(C,$)|0;o=o+Math.imul(N,ee)|0;h=h+Math.imul(N,te)|0;h=h+Math.imul(P,ee)|0;u=u+Math.imul(P,te)|0;o=o+Math.imul(E,ie)|0;h=h+Math.imul(E,ne)|0;h=h+Math.imul(k,ie)|0;u=u+Math.imul(k,ne)|0;o=o+Math.imul(w,fe)|0;h=h+Math.imul(w,se)|0;h=h+Math.imul(M,fe)|0;u=u+Math.imul(M,se)|0;o=o+Math.imul(y,he)|0;h=h+Math.imul(y,ue)|0;h=h+Math.imul(g,he)|0;u=u+Math.imul(g,ue)|0;o=o+Math.imul(v,ce)|0;h=h+Math.imul(v,le)|0;h=h+Math.imul(b,ce)|0;u=u+Math.imul(b,le)|0;o=o+Math.imul(c,ve)|0;h=h+Math.imul(c,be)|0;h=h+Math.imul(l,ve)|0;u=u+Math.imul(l,be)|0;var Ne=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ne>>>26)|0;Ne&=67108863;o=Math.imul(z,W);h=Math.imul(z,V);h=h+Math.imul(F,W)|0;u=Math.imul(F,V);o=o+Math.imul(O,J)|0;h=h+Math.imul(O,Z)|0;h=h+Math.imul(H,J)|0;u=u+Math.imul(H,Z)|0;o=o+Math.imul(T,Y)|0;h=h+Math.imul(T,$)|0;h=h+Math.imul(j,Y)|0;u=u+Math.imul(j,$)|0;o=o+Math.imul(I,ee)|0;h=h+Math.imul(I,te)|0;h=h+Math.imul(C,ee)|0;u=u+Math.imul(C,te)|0;o=o+Math.imul(N,ie)|0;h=h+Math.imul(N,ne)|0;h=h+Math.imul(P,ie)|0;u=u+Math.imul(P,ne)|0;o=o+Math.imul(E,fe)|0;h=h+Math.imul(E,se)|0;h=h+Math.imul(k,fe)|0;u=u+Math.imul(k,se)|0;o=o+Math.imul(w,he)|0;h=h+Math.imul(w,ue)|0;h=h+Math.imul(M,he)|0;u=u+Math.imul(M,ue)|0;o=o+Math.imul(y,ce)|0;h=h+Math.imul(y,le)|0;h=h+Math.imul(g,ce)|0;u=u+Math.imul(g,le)|0;o=o+Math.imul(v,ve)|0;h=h+Math.imul(v,be)|0;h=h+Math.imul(b,ve)|0;u=u+Math.imul(b,be)|0;o=o+Math.imul(c,ye)|0;h=h+Math.imul(c,ge)|0;h=h+Math.imul(l,ye)|0;u=u+Math.imul(l,ge)|0;var Re=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Re>>>26)|0;Re&=67108863;o=Math.imul(z,J);h=Math.imul(z,Z);h=h+Math.imul(F,J)|0;u=Math.imul(F,Z);o=o+Math.imul(O,Y)|0;h=h+Math.imul(O,$)|0;h=h+Math.imul(H,Y)|0;u=u+Math.imul(H,$)|0;o=o+Math.imul(T,ee)|0;h=h+Math.imul(T,te)|0;h=h+Math.imul(j,ee)|0;u=u+Math.imul(j,te)|0;o=o+Math.imul(I,ie)|0;h=h+Math.imul(I,ne)|0;h=h+Math.imul(C,ie)|0;u=u+Math.imul(C,ne)|0;o=o+Math.imul(N,fe)|0;h=h+Math.imul(N,se)|0;h=h+Math.imul(P,fe)|0;u=u+Math.imul(P,se)|0;o=o+Math.imul(E,he)|0;h=h+Math.imul(E,ue)|0;h=h+Math.imul(k,he)|0;u=u+Math.imul(k,ue)|0;o=o+Math.imul(w,ce)|0;h=h+Math.imul(w,le)|0;h=h+Math.imul(M,ce)|0;u=u+Math.imul(M,le)|0;o=o+Math.imul(y,ve)|0;h=h+Math.imul(y,be)|0;h=h+Math.imul(g,ve)|0;u=u+Math.imul(g,be)|0;o=o+Math.imul(v,ye)|0;h=h+Math.imul(v,ge)|0;h=h+Math.imul(b,ye)|0;u=u+Math.imul(b,ge)|0;var Pe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Pe>>>26)|0;Pe&=67108863;o=Math.imul(z,Y);h=Math.imul(z,$);h=h+Math.imul(F,Y)|0;u=Math.imul(F,$);o=o+Math.imul(O,ee)|0;h=h+Math.imul(O,te)|0;h=h+Math.imul(H,ee)|0;u=u+Math.imul(H,te)|0;o=o+Math.imul(T,ie)|0;h=h+Math.imul(T,ne)|0;h=h+Math.imul(j,ie)|0;u=u+Math.imul(j,ne)|0;o=o+Math.imul(I,fe)|0;h=h+Math.imul(I,se)|0;h=h+Math.imul(C,fe)|0;u=u+Math.imul(C,se)|0;o=o+Math.imul(N,he)|0;h=h+Math.imul(N,ue)|0;h=h+Math.imul(P,he)|0;u=u+Math.imul(P,ue)|0;o=o+Math.imul(E,ce)|0;h=h+Math.imul(E,le)|0;h=h+Math.imul(k,ce)|0;u=u+Math.imul(k,le)|0;o=o+Math.imul(w,ve)|0;h=h+Math.imul(w,be)|0;h=h+Math.imul(M,ve)|0;u=u+Math.imul(M,be)|0;o=o+Math.imul(y,ye)|0;h=h+Math.imul(y,ge)|0;h=h+Math.imul(g,ye)|0;u=u+Math.imul(g,ge)|0;var xe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(xe>>>26)|0;xe&=67108863;o=Math.imul(z,ee);h=Math.imul(z,te);h=h+Math.imul(F,ee)|0;u=Math.imul(F,te);o=o+Math.imul(O,ie)|0;h=h+Math.imul(O,ne)|0;h=h+Math.imul(H,ie)|0;u=u+Math.imul(H,ne)|0;o=o+Math.imul(T,fe)|0;h=h+Math.imul(T,se)|0;h=h+Math.imul(j,fe)|0;u=u+Math.imul(j,se)|0;o=o+Math.imul(I,he)|0;h=h+Math.imul(I,ue)|0;h=h+Math.imul(C,he)|0;u=u+Math.imul(C,ue)|0;o=o+Math.imul(N,ce)|0;h=h+Math.imul(N,le)|0;h=h+Math.imul(P,ce)|0;u=u+Math.imul(P,le)|0;o=o+Math.imul(E,ve)|0;h=h+Math.imul(E,be)|0;h=h+Math.imul(k,ve)|0;u=u+Math.imul(k,be)|0;o=o+Math.imul(w,ye)|0;h=h+Math.imul(w,ge)|0;h=h+Math.imul(M,ye)|0;u=u+Math.imul(M,ge)|0;var Ie=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ie>>>26)|0;Ie&=67108863;o=Math.imul(z,ie);h=Math.imul(z,ne);h=h+Math.imul(F,ie)|0;u=Math.imul(F,ne);o=o+Math.imul(O,fe)|0;h=h+Math.imul(O,se)|0;h=h+Math.imul(H,fe)|0;u=u+Math.imul(H,se)|0;o=o+Math.imul(T,he)|0;h=h+Math.imul(T,ue)|0;h=h+Math.imul(j,he)|0;u=u+Math.imul(j,ue)|0;o=o+Math.imul(I,ce)|0;h=h+Math.imul(I,le)|0;h=h+Math.imul(C,ce)|0;u=u+Math.imul(C,le)|0;o=o+Math.imul(N,ve)|0;h=h+Math.imul(N,be)|0;h=h+Math.imul(P,ve)|0;u=u+Math.imul(P,be)|0;o=o+Math.imul(E,ye)|0;h=h+Math.imul(E,ge)|0;h=h+Math.imul(k,ye)|0;u=u+Math.imul(k,ge)|0;var Ce=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ce>>>26)|0;Ce&=67108863;o=Math.imul(z,fe);h=Math.imul(z,se);h=h+Math.imul(F,fe)|0;u=Math.imul(F,se);o=o+Math.imul(O,he)|0;h=h+Math.imul(O,ue)|0;h=h+Math.imul(H,he)|0;u=u+Math.imul(H,ue)|0;o=o+Math.imul(T,ce)|0;h=h+Math.imul(T,le)|0;h=h+Math.imul(j,ce)|0;u=u+Math.imul(j,le)|0;o=o+Math.imul(I,ve)|0;h=h+Math.imul(I,be)|0;h=h+Math.imul(C,ve)|0;u=u+Math.imul(C,be)|0;o=o+Math.imul(N,ye)|0;h=h+Math.imul(N,ge)|0;h=h+Math.imul(P,ye)|0;u=u+Math.imul(P,ge)|0;var De=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(De>>>26)|0;De&=67108863;o=Math.imul(z,he);h=Math.imul(z,ue);h=h+Math.imul(F,he)|0;u=Math.imul(F,ue);o=o+Math.imul(O,ce)|0;h=h+Math.imul(O,le)|0;h=h+Math.imul(H,ce)|0;u=u+Math.imul(H,le)|0;o=o+Math.imul(T,ve)|0;h=h+Math.imul(T,be)|0;h=h+Math.imul(j,ve)|0;u=u+Math.imul(j,be)|0;o=o+Math.imul(I,ye)|0;h=h+Math.imul(I,ge)|0;h=h+Math.imul(C,ye)|0;u=u+Math.imul(C,ge)|0;var Te=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Te>>>26)|0;Te&=67108863;o=Math.imul(z,ce);h=Math.imul(z,le);h=h+Math.imul(F,ce)|0;u=Math.imul(F,le);o=o+Math.imul(O,ve)|0;h=h+Math.imul(O,be)|0;h=h+Math.imul(H,ve)|0;u=u+Math.imul(H,be)|0;o=o+Math.imul(T,ye)|0;h=h+Math.imul(T,ge)|0;h=h+Math.imul(j,ye)|0;u=u+Math.imul(j,ge)|0;var je=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(je>>>26)|0;je&=67108863;o=Math.imul(z,ve);h=Math.imul(z,be);h=h+Math.imul(F,ve)|0;u=Math.imul(F,be);o=o+Math.imul(O,ye)|0;h=h+Math.imul(O,ge)|0;h=h+Math.imul(H,ye)|0;u=u+Math.imul(H,ge)|0;var qe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(qe>>>26)|0;qe&=67108863;o=Math.imul(z,ye);h=Math.imul(z,ge);h=h+Math.imul(F,ye)|0;u=Math.imul(F,ge);var Oe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Oe>>>26)|0;Oe&=67108863;a[0]=_e;a[1]=we;a[2]=Me;a[3]=Se;a[4]=Be;a[5]=Ee;a[6]=ke;a[7]=Ae;a[8]=Ne;a[9]=Re;a[10]=Pe;a[11]=xe;a[12]=Ie;a[13]=Ce;a[14]=De;a[15]=Te;a[16]=je;a[17]=qe;a[18]=Oe;if(s!==0){a[19]=s;r.length++}return r};if(!Math.imul){h=smallMulTo}function bigMulTo(e,t,r){r.negative=t.negative^e.negative;r.length=e.length+t.length;var i=0;var n=0;for(var a=0;a>>26)|0;n+=s>>>26;s&=67108863}r.words[a]=o;i=s;s=n}if(i!==0){r.words[a]=i}else{r.length--}return r._strip()}function jumboMulTo(e,t,r){return bigMulTo(e,t,r)}BN.prototype.mulTo=function mulTo(e,t){var r;var i=this.length+e.length;if(this.length===10&&e.length===10){r=h(this,e,t)}else if(i<63){r=smallMulTo(this,e,t)}else if(i<1024){r=bigMulTo(this,e,t)}else{r=jumboMulTo(this,e,t)}return r};function FFTM(e,t){this.x=e;this.y=t}FFTM.prototype.makeRBT=function makeRBT(e){var t=new Array(e);var r=BN.prototype._countBits(e)-1;for(var i=0;i>=1}return i};FFTM.prototype.permute=function permute(e,t,r,i,n,a){for(var s=0;s>>1){n++}return 1<>>13;r[2*a+1]=n&8191;n=n>>>13}for(a=2*t;a>=26;r+=n/67108864|0;r+=a>>>26;this.words[i]=a&67108863}if(r!==0){this.words[i]=r;this.length++}return t?this.ineg():this};BN.prototype.muln=function muln(e){return this.clone().imuln(e)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(e){var t=toBitArray(e);if(t.length===0)return new BN(1);var r=this;for(var i=0;i=0);var t=e%26;var r=(e-t)/26;var i=67108863>>>26-t<<26-t;var n;if(t!==0){var a=0;for(n=0;n>>26-t}if(a){this.words[n]=a;this.length++}}if(r!==0){for(n=this.length-1;n>=0;n--){this.words[n+r]=this.words[n]}for(n=0;n=0);var i;if(t){i=(t-t%26)/26}else{i=0}var n=e%26;var a=Math.min((e-n)/26,this.length);var s=67108863^67108863>>>n<a){this.length-=a;for(h=0;h=0&&(u!==0||h>=i);h--){var d=this.words[h]|0;this.words[h]=u<<26-n|d>>>n;u=d&s}if(o&&u!==0){o.words[o.length++]=u}if(this.length===0){this.words[0]=0;this.length=1}return this._strip()};BN.prototype.ishrn=function ishrn(e,t,r){assert(this.negative===0);return this.iushrn(e,t,r)};BN.prototype.shln=function shln(e){return this.clone().ishln(e)};BN.prototype.ushln=function ushln(e){return this.clone().iushln(e)};BN.prototype.shrn=function shrn(e){return this.clone().ishrn(e)};BN.prototype.ushrn=function ushrn(e){return this.clone().iushrn(e)};BN.prototype.testn=function testn(e){assert(typeof e==="number"&&e>=0);var t=e%26;var r=(e-t)/26;var i=1<=0);var t=e%26;var r=(e-t)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=r){return this}if(t!==0){r++}this.length=Math.min(r,this.length);if(t!==0){var i=67108863^67108863>>>t<=67108864;t++){this.words[t]-=67108864;if(t===this.length-1){this.words[t+1]=1}else{this.words[t+1]++}}this.length=Math.max(this.length,t+1);return this};BN.prototype.isubn=function isubn(e){assert(typeof e==="number");assert(e<67108864);if(e<0)return this.iaddn(-e);if(this.negative!==0){this.negative=0;this.iaddn(e);this.negative=1;return this}this.words[0]-=e;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var t=0;t>26)-(o/67108864|0);this.words[n+r]=a&67108863}for(;n>26;this.words[n+r]=a&67108863}if(s===0)return this._strip();assert(s===-1);s=0;for(n=0;n>26;this.words[n]=a&67108863}this.negative=1;return this._strip()};BN.prototype._wordDiv=function _wordDiv(e,t){var r=this.length-e.length;var i=this.clone();var n=e;var a=n.words[n.length-1]|0;var s=this._countBits(a);r=26-s;if(r!==0){n=n.ushln(r);i.iushln(r);a=n.words[n.length-1]|0}var o=i.length-n.length;var h;if(t!=="mod"){h=new BN(null);h.length=o+1;h.words=new Array(h.length);for(var u=0;u=0;c--){var l=(i.words[n.length+c]|0)*67108864+(i.words[n.length+c-1]|0);l=Math.min(l/a|0,67108863);i._ishlnsubmul(n,l,c);while(i.negative!==0){l--;i.negative=0;i._ishlnsubmul(n,1,c);if(!i.isZero()){i.negative^=1}}if(h){h.words[c]=l}}if(h){h._strip()}i._strip();if(t!=="div"&&r!==0){i.iushrn(r)}return{div:h||null,mod:i}};BN.prototype.divmod=function divmod(e,t,r){assert(!e.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var i,n,a;if(this.negative!==0&&e.negative===0){a=this.neg().divmod(e,t);if(t!=="mod"){i=a.div.neg()}if(t!=="div"){n=a.mod.neg();if(r&&n.negative!==0){n.iadd(e)}}return{div:i,mod:n}}if(this.negative===0&&e.negative!==0){a=this.divmod(e.neg(),t);if(t!=="mod"){i=a.div.neg()}return{div:i,mod:a.mod}}if((this.negative&e.negative)!==0){a=this.neg().divmod(e.neg(),t);if(t!=="div"){n=a.mod.neg();if(r&&n.negative!==0){n.isub(e)}}return{div:a.div,mod:n}}if(e.length>this.length||this.cmp(e)<0){return{div:new BN(0),mod:this}}if(e.length===1){if(t==="div"){return{div:this.divn(e.words[0]),mod:null}}if(t==="mod"){return{div:null,mod:new BN(this.modrn(e.words[0]))}}return{div:this.divn(e.words[0]),mod:new BN(this.modrn(e.words[0]))}}return this._wordDiv(e,t)};BN.prototype.div=function div(e){return this.divmod(e,"div",false).div};BN.prototype.mod=function mod(e){return this.divmod(e,"mod",false).mod};BN.prototype.umod=function umod(e){return this.divmod(e,"mod",true).mod};BN.prototype.divRound=function divRound(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=t.div.negative!==0?t.mod.isub(e):t.mod;var i=e.ushrn(1);var n=e.andln(1);var a=r.cmp(i);if(a<0||n===1&&a===0)return t.div;return t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)};BN.prototype.modrn=function modrn(e){var t=e<0;if(t)e=-e;assert(e<=67108863);var r=(1<<26)%e;var i=0;for(var n=this.length-1;n>=0;n--){i=(r*i+(this.words[n]|0))%e}return t?-i:i};BN.prototype.modn=function modn(e){return this.modrn(e)};BN.prototype.idivn=function idivn(e){var t=e<0;if(t)e=-e;assert(e<=67108863);var r=0;for(var i=this.length-1;i>=0;i--){var n=(this.words[i]|0)+r*67108864;this.words[i]=n/e|0;r=n%e}this._strip();return t?this.ineg():this};BN.prototype.divn=function divn(e){return this.clone().idivn(e)};BN.prototype.egcd=function egcd(e){assert(e.negative===0);assert(!e.isZero());var t=this;var r=e.clone();if(t.negative!==0){t=t.umod(e)}else{t=t.clone()}var i=new BN(1);var n=new BN(0);var a=new BN(0);var s=new BN(1);var o=0;while(t.isEven()&&r.isEven()){t.iushrn(1);r.iushrn(1);++o}var h=r.clone();var u=t.clone();while(!t.isZero()){for(var d=0,c=1;(t.words[0]&c)===0&&d<26;++d,c<<=1);if(d>0){t.iushrn(d);while(d-- >0){if(i.isOdd()||n.isOdd()){i.iadd(h);n.isub(u)}i.iushrn(1);n.iushrn(1)}}for(var l=0,p=1;(r.words[0]&p)===0&&l<26;++l,p<<=1);if(l>0){r.iushrn(l);while(l-- >0){if(a.isOdd()||s.isOdd()){a.iadd(h);s.isub(u)}a.iushrn(1);s.iushrn(1)}}if(t.cmp(r)>=0){t.isub(r);i.isub(a);n.isub(s)}else{r.isub(t);a.isub(i);s.isub(n)}}return{a:a,b:s,gcd:r.iushln(o)}};BN.prototype._invmp=function _invmp(e){assert(e.negative===0);assert(!e.isZero());var t=this;var r=e.clone();if(t.negative!==0){t=t.umod(e)}else{t=t.clone()}var i=new BN(1);var n=new BN(0);var a=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var s=0,o=1;(t.words[0]&o)===0&&s<26;++s,o<<=1);if(s>0){t.iushrn(s);while(s-- >0){if(i.isOdd()){i.iadd(a)}i.iushrn(1)}}for(var h=0,u=1;(r.words[0]&u)===0&&h<26;++h,u<<=1);if(h>0){r.iushrn(h);while(h-- >0){if(n.isOdd()){n.iadd(a)}n.iushrn(1)}}if(t.cmp(r)>=0){t.isub(r);i.isub(n)}else{r.isub(t);n.isub(i)}}var d;if(t.cmpn(1)===0){d=i}else{d=n}if(d.cmpn(0)<0){d.iadd(e)}return d};BN.prototype.gcd=function gcd(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone();var r=e.clone();t.negative=0;r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++){t.iushrn(1);r.iushrn(1)}do{while(t.isEven()){t.iushrn(1)}while(r.isEven()){r.iushrn(1)}var n=t.cmp(r);if(n<0){var a=t;t=r;r=a}else if(n===0||r.cmpn(1)===0){break}t.isub(r)}while(true);return r.iushln(i)};BN.prototype.invm=function invm(e){return this.egcd(e).a.umod(e)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(e){return this.words[0]&e};BN.prototype.bincn=function bincn(e){assert(typeof e==="number");var t=e%26;var r=(e-t)/26;var i=1<>>26;s&=67108863;this.words[a]=s}if(n!==0){this.words[a]=n;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this._strip();var r;if(this.length>1){r=1}else{if(t){e=-e}assert(e<=67108863,"Number is too big");var i=this.words[0]|0;r=i===e?0:ie.length)return 1;if(this.length=0;r--){var i=this.words[r]|0;var n=e.words[r]|0;if(i===n)continue;if(in){t=1}break}return t};BN.prototype.gtn=function gtn(e){return this.cmpn(e)===1};BN.prototype.gt=function gt(e){return this.cmp(e)===1};BN.prototype.gten=function gten(e){return this.cmpn(e)>=0};BN.prototype.gte=function gte(e){return this.cmp(e)>=0};BN.prototype.ltn=function ltn(e){return this.cmpn(e)===-1};BN.prototype.lt=function lt(e){return this.cmp(e)===-1};BN.prototype.lten=function lten(e){return this.cmpn(e)<=0};BN.prototype.lte=function lte(e){return this.cmp(e)<=0};BN.prototype.eqn=function eqn(e){return this.cmpn(e)===0};BN.prototype.eq=function eq(e){return this.cmp(e)===0};BN.red=function red(e){return new Red(e)};BN.prototype.toRed=function toRed(e){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return e.convertTo(this)._forceRed(e)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(e){this.red=e;return this};BN.prototype.forceRed=function forceRed(e){assert(!this.red,"Already a number in reduction context");return this._forceRed(e)};BN.prototype.redAdd=function redAdd(e){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,e)};BN.prototype.redIAdd=function redIAdd(e){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,e)};BN.prototype.redSub=function redSub(e){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,e)};BN.prototype.redISub=function redISub(e){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,e)};BN.prototype.redShl=function redShl(e){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,e)};BN.prototype.redMul=function redMul(e){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,e);return this.red.mul(this,e)};BN.prototype.redIMul=function redIMul(e){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,e);return this.red.imul(this,e)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(e){assert(this.red&&!e.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,e)};var u={k256:null,p224:null,p192:null,p25519:null};function MPrime(e,t){this.name=e;this.p=new BN(t,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var e=new BN(null);e.words=new Array(Math.ceil(this.n/13));return e};MPrime.prototype.ireduce=function ireduce(e){var t=e;var r;do{this.split(t,this.tmp);t=this.imulK(t);t=t.iadd(this.tmp);r=t.bitLength()}while(r>this.n);var i=r0){t.isub(this.p)}else{if(t.strip!==undefined){t.strip()}else{t._strip()}}return t};MPrime.prototype.split=function split(e,t){e.iushrn(this.n,0,t)};MPrime.prototype.imulK=function imulK(e){return e.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(e,t){var r=4194303;var i=Math.min(e.length,9);for(var n=0;n>>22;a=s}a>>>=22;e.words[n-10]=a;if(a===0&&e.length>10){e.length-=10}else{e.length-=9}};K256.prototype.imulK=function imulK(e){e.words[e.length]=0;e.words[e.length+1]=0;e.length+=2;var t=0;for(var r=0;r>>=26;e.words[r]=n;t=i}if(t!==0){e.words[e.length++]=t}return e};BN._prime=function prime(e){if(u[e])return u[e];var prime;if(e==="k256"){prime=new K256}else if(e==="p224"){prime=new P224}else if(e==="p192"){prime=new P192}else if(e==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+e)}u[e]=prime;return prime};function Red(e){if(typeof e==="string"){var t=BN._prime(e);this.m=t.p;this.prime=t}else{assert(e.gtn(1),"modulus must be greater than 1");this.m=e;this.prime=null}}Red.prototype._verify1=function _verify1(e){assert(e.negative===0,"red works only with positives");assert(e.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(e,t){assert((e.negative|t.negative)===0,"red works only with positives");assert(e.red&&e.red===t.red,"red works only with red numbers")};Red.prototype.imod=function imod(e){if(this.prime)return this.prime.ireduce(e)._forceRed(this);move(e,e.umod(this.m)._forceRed(this));return e};Red.prototype.neg=function neg(e){if(e.isZero()){return e.clone()}return this.m.sub(e)._forceRed(this)};Red.prototype.add=function add(e,t){this._verify2(e,t);var r=e.add(t);if(r.cmp(this.m)>=0){r.isub(this.m)}return r._forceRed(this)};Red.prototype.iadd=function iadd(e,t){this._verify2(e,t);var r=e.iadd(t);if(r.cmp(this.m)>=0){r.isub(this.m)}return r};Red.prototype.sub=function sub(e,t){this._verify2(e,t);var r=e.sub(t);if(r.cmpn(0)<0){r.iadd(this.m)}return r._forceRed(this)};Red.prototype.isub=function isub(e,t){this._verify2(e,t);var r=e.isub(t);if(r.cmpn(0)<0){r.iadd(this.m)}return r};Red.prototype.shl=function shl(e,t){this._verify1(e);return this.imod(e.ushln(t))};Red.prototype.imul=function imul(e,t){this._verify2(e,t);return this.imod(e.imul(t))};Red.prototype.mul=function mul(e,t){this._verify2(e,t);return this.imod(e.mul(t))};Red.prototype.isqr=function isqr(e){return this.imul(e,e.clone())};Red.prototype.sqr=function sqr(e){return this.mul(e,e)};Red.prototype.sqrt=function sqrt(e){if(e.isZero())return e.clone();var t=this.m.andln(3);assert(t%2===1);if(t===3){var r=this.m.add(new BN(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1);var n=0;while(!i.isZero()&&i.andln(1)===0){n++;i.iushrn(1)}assert(!i.isZero());var a=new BN(1).toRed(this);var s=a.redNeg();var o=this.m.subn(1).iushrn(1);var h=this.m.bitLength();h=new BN(2*h*h).toRed(this);while(this.pow(h,o).cmp(s)!==0){h.redIAdd(s)}var u=this.pow(h,i);var d=this.pow(e,i.addn(1).iushrn(1));var c=this.pow(e,i);var l=n;while(c.cmp(a)!==0){var p=c;for(var v=0;p.cmp(a)!==0;v++){p=p.redSqr()}assert(v=0;n--){var u=t.words[n];for(var d=h-1;d>=0;d--){var c=u>>d&1;if(a!==i[0]){a=this.sqr(a)}if(c===0&&s===0){o=0;continue}s<<=1;s|=c;o++;if(o!==r&&(n!==0||d!==0))continue;a=this.mul(a,i[s]);o=0;s=0}h=26}return a};Red.prototype.convertTo=function convertTo(e){var t=e.umod(this.m);return t===e?t.clone():t};Red.prototype.convertFrom=function convertFrom(e){var t=e.clone();t.red=null;return t};BN.mont=function mont(e){return new Mont(e)};function Mont(e){Red.call(this,e);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new BN(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)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(e){return this.imod(e.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(e){var t=this.imod(e.mul(this.rinv));t.red=null;return t};Mont.prototype.imul=function imul(e,t){if(e.isZero()||t.isZero()){e.words[0]=0;e.length=1;return e}var r=e.imul(t);var i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var n=r.isub(i).iushrn(this.shift);var a=n;if(n.cmp(this.m)>=0){a=n.isub(this.m)}else if(n.cmpn(0)<0){a=n.iadd(this.m)}return a._forceRed(this)};Mont.prototype.mul=function mul(e,t){if(e.isZero()||t.isZero())return new BN(0)._forceRed(this);var r=e.mul(t);var i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var n=r.isub(i).iushrn(this.shift);var a=n;if(n.cmp(this.m)>=0){a=n.isub(this.m)}else if(n.cmpn(0)<0){a=n.iadd(this.m)}return a._forceRed(this)};Mont.prototype.invm=function invm(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(false||e,this)},3500:function(e,t,r){var i;e.exports=function rand(e){if(!i)i=new Rand(null);return i.generate(e)};function Rand(e){this.rand=e}e.exports.Rand=Rand;Rand.prototype.generate=function generate(e){return this._rand(e)};Rand.prototype._rand=function _rand(e){if(this.rand.getBytes)return this.rand.getBytes(e);var t=new Uint8Array(e);for(var r=0;r>>24]^s[d>>>16&255]^o[c>>>8&255]^h[l&255]^t[y++];v=a[d>>>24]^s[c>>>16&255]^o[l>>>8&255]^h[u&255]^t[y++];b=a[c>>>24]^s[l>>>16&255]^o[u>>>8&255]^h[d&255]^t[y++];m=a[l>>>24]^s[u>>>16&255]^o[d>>>8&255]^h[c&255]^t[y++];u=p;d=v;c=b;l=m}p=(i[u>>>24]<<24|i[d>>>16&255]<<16|i[c>>>8&255]<<8|i[l&255])^t[y++];v=(i[d>>>24]<<24|i[c>>>16&255]<<16|i[l>>>8&255]<<8|i[u&255])^t[y++];b=(i[c>>>24]<<24|i[l>>>16&255]<<16|i[u>>>8&255]<<8|i[d&255])^t[y++];m=(i[l>>>24]<<24|i[u>>>16&255]<<16|i[d>>>8&255]<<8|i[c&255])^t[y++];p=p>>>0;v=v>>>0;b=b>>>0;m=m>>>0;return[p,v,b,m]}var n=[0,1,2,4,8,16,32,64,128,27,54];var a=function(){var e=new Array(256);for(var t=0;t<256;t++){if(t<128){e[t]=t<<1}else{e[t]=t<<1^283}}var r=[];var i=[];var n=[[],[],[],[]];var a=[[],[],[],[]];var s=0;var o=0;for(var h=0;h<256;++h){var u=o^o<<1^o<<2^o<<3^o<<4;u=u>>>8^u&255^99;r[s]=u;i[u]=s;var d=e[s];var c=e[d];var l=e[c];var p=e[u]*257^u*16843008;n[0][s]=p<<24|p>>>8;n[1][s]=p<<16|p>>>16;n[2][s]=p<<8|p>>>24;n[3][s]=p;p=l*16843009^c*65537^d*257^s*16843008;a[0][u]=p<<24|p>>>8;a[1][u]=p<<16|p>>>16;a[2][u]=p<<8|p>>>24;a[3][u]=p;if(s===0){s=o=1}else{s=d^e[e[e[l^d]]];o^=e[e[o]]}}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}}();function AES(e){this._key=asUInt32Array(e);this._reset()}AES.blockSize=4*4;AES.keySize=256/8;AES.prototype.blockSize=AES.blockSize;AES.prototype.keySize=AES.keySize;AES.prototype._reset=function(){var e=this._key;var t=e.length;var r=t+6;var i=(r+1)*4;var s=[];for(var o=0;o>>24;h=a.SBOX[h>>>24]<<24|a.SBOX[h>>>16&255]<<16|a.SBOX[h>>>8&255]<<8|a.SBOX[h&255];h^=n[o/t|0]<<24}else if(t>6&&o%t===4){h=a.SBOX[h>>>24]<<24|a.SBOX[h>>>16&255]<<16|a.SBOX[h>>>8&255]<<8|a.SBOX[h&255]}s[o]=s[o-t]^h}var u=[];for(var d=0;d>>24]]^a.INV_SUB_MIX[1][a.SBOX[l>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[l>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[l&255]]}}this._nRounds=r;this._keySchedule=s;this._invKeySchedule=u};AES.prototype.encryptBlockRaw=function(e){e=asUInt32Array(e);return cryptBlock(e,this._keySchedule,a.SUB_MIX,a.SBOX,this._nRounds)};AES.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e);var r=i.allocUnsafe(16);r.writeUInt32BE(t[0],0);r.writeUInt32BE(t[1],4);r.writeUInt32BE(t[2],8);r.writeUInt32BE(t[3],12);return r};AES.prototype.decryptBlock=function(e){e=asUInt32Array(e);var t=e[1];e[1]=e[3];e[3]=t;var r=cryptBlock(e,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX,this._nRounds);var n=i.allocUnsafe(16);n.writeUInt32BE(r[0],0);n.writeUInt32BE(r[3],4);n.writeUInt32BE(r[2],8);n.writeUInt32BE(r[1],12);return n};AES.prototype.scrub=function(){scrubVec(this._keySchedule);scrubVec(this._invKeySchedule);scrubVec(this._key)};e.exports.AES=AES},6624:function(e,t,r){var i=r(1387);var n=r(6911).Buffer;var a=r(1043);var s=r(3782);var o=r(7225);var h=r(4734);var u=r(598);function xorTest(e,t){var r=0;if(e.length!==t.length)r++;var i=Math.min(e.length,t.length);for(var n=0;n16){t=this.cache.slice(0,16);this.cache=this.cache.slice(16);return t}}else{if(this.cache.length>=16){t=this.cache.slice(0,16);this.cache=this.cache.slice(16);return t}}return null};Splitter.prototype.flush=function(){if(this.cache.length)return this.cache};function unpad(e){var t=e[15];if(t<1||t>16){throw new Error("unable to decrypt data")}var r=-1;while(++r15){var e=this.cache.slice(0,16);this.cache=this.cache.slice(16);return e}return null};Splitter.prototype.flush=function(){var e=16-this.cache.length;var t=a.allocUnsafe(e);var r=-1;while(++r>>0,0);t.writeUInt32BE(e[1]>>>0,4);t.writeUInt32BE(e[2]>>>0,8);t.writeUInt32BE(e[3]>>>0,12);return t}function GHASH(e){this.h=e;this.state=i.alloc(16,0);this.cache=i.allocUnsafe(0)}GHASH.prototype.ghash=function(e){var t=-1;while(++t0;r--){e[r]=e[r]>>>1|(e[r-1]&1)<<31}e[0]=e[0]>>>1;if(n){e[0]=e[0]^225<<24}}this.state=fromArray(t)};GHASH.prototype.update=function(e){this.cache=i.concat([this.cache,e]);var t;while(this.cache.length>=16){t=this.cache.slice(0,16);this.cache=this.cache.slice(16);this.ghash(t)}};GHASH.prototype.final=function(e,t){if(this.cache.length){this.ghash(i.concat([this.cache,n],16))}this.ghash(fromArray([0,e,0,t]));return this.state};e.exports=GHASH},598:function(e){function incr32(e){var t=e.length;var r;while(t--){r=e.readUInt8(t);if(r===255){e.writeUInt8(0,t)}else{r++;e.writeUInt8(r,t);break}}}e.exports=incr32},9825:function(e,t,r){var i=r(4734);t.encrypt=function(e,t){var r=i(t,e._prev);e._prev=e._cipher.encryptBlock(r);return e._prev};t.decrypt=function(e,t){var r=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return i(n,r)}},321:function(e,t,r){var i=r(6911).Buffer;var n=r(4734);function encryptStart(e,t,r){var a=t.length;var s=n(t,e._cache);e._cache=e._cache.slice(a);e._prev=i.concat([e._prev,r?t:s]);return s}t.encrypt=function(e,t,r){var n=i.allocUnsafe(0);var a;while(t.length){if(e._cache.length===0){e._cache=e._cipher.encryptBlock(e._prev);e._prev=i.allocUnsafe(0)}if(e._cache.length<=t.length){a=e._cache.length;n=i.concat([n,encryptStart(e,t.slice(0,a),r)]);t=t.slice(a)}else{n=i.concat([n,encryptStart(e,t,r)]);break}}return n}},3147:function(e,t,r){var i=r(6911).Buffer;function encryptByte(e,t,r){var i;var n=-1;var a=8;var s=0;var o,h;while(++n>n%8;e._prev=shiftIn(e._prev,r?o:h)}return s}function shiftIn(e,t){var r=e.length;var n=-1;var a=i.allocUnsafe(e.length);e=i.concat([e,i.from([t])]);while(++n>7}return a}t.encrypt=function(e,t,r){var n=t.length;var a=i.allocUnsafe(n);var s=-1;while(++s=0||!r.umod(e.prime1)||!r.umod(e.prime2)){r=new i(n(t))}return r}},9276:function(e,t,r){e.exports=r(2908)},4078:function(e,t,r){var i=r(6911).Buffer;var n=r(9739);var a=r(3726);var s=r(3782);var o=r(9807);var h=r(4013);var u=r(2908);Object.keys(u).forEach((function(e){u[e].id=i.from(u[e].id,"hex");u[e.toLowerCase()]=u[e]}));function Sign(e){a.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash;this._hash=n(t.hash);this._tag=t.id;this._signType=t.sign}s(Sign,a.Writable);Sign.prototype._write=function _write(e,t,r){this._hash.update(e);r()};Sign.prototype.update=function update(e,t){if(typeof e==="string")e=i.from(e,t);this._hash.update(e);return this};Sign.prototype.sign=function signMethod(e,t){this.end();var r=this._hash.digest();var i=o(r,e,this._hashType,this._signType,this._tag);return t?i.toString(t):i};function Verify(e){a.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash);this._tag=t.id;this._signType=t.sign}s(Verify,a.Writable);Verify.prototype._write=function _write(e,t,r){this._hash.update(e);r()};Verify.prototype.update=function update(e,t){if(typeof e==="string")e=i.from(e,t);this._hash.update(e);return this};Verify.prototype.verify=function verifyMethod(e,t,r){if(typeof t==="string")t=i.from(t,r);this.end();var n=this._hash.digest();return h(t,n,e,this._signType,this._tag)};function createSign(e){return new Sign(e)}function createVerify(e){return new Verify(e)}e.exports={Sign:createSign,Verify:createVerify,createSign:createSign,createVerify:createVerify}},9807:function(e,t,r){var i=r(6911).Buffer;var n=r(4873);var a=r(7166);var s=r(949).ec;var o=r(1670);var h=r(9902);var u=r(9267);function sign(e,t,r,n,s){var o=h(t);if(o.curve){if(n!=="ecdsa"&&n!=="ecdsa/rsa")throw new Error("wrong private key type");return ecSign(e,o)}else if(o.type==="dsa"){if(n!=="dsa")throw new Error("wrong private key type");return dsaSign(e,o,r)}else{if(n!=="rsa"&&n!=="ecdsa/rsa")throw new Error("wrong private key type")}e=i.concat([s,e]);var u=o.modulus.byteLength();var d=[0,1];while(e.length+d.length+10)r.ishrn(i);return r}function bits2octets(e,t){e=bits2int(e,t);e=e.mod(t);var r=i.from(e.toArray());if(r.length=t)throw new Error("invalid sig")}e.exports=verify},4734:function(e){e.exports=function xor(e,t){var r=Math.min(e.length,t.length);var i=new Buffer(r);for(var n=0;nr){var i=e==="rmd160"?new h:u(e);t=i.update(t).digest()}else if(t.lengtho){t=e(t)}else if(t.length0;i--){t+=this._buffer(e,t);r+=this._flushBuffer(n,r)}t+=this._buffer(e,t);return n};Cipher.prototype.final=function final(e){var t;if(e)t=this.update(e);var r;if(this.type==="encrypt")r=this._finalEncrypt();else r=this._finalDecrypt();if(t)return t.concat(r);else return r};Cipher.prototype._pad=function _pad(e,t){if(t===0)return false;while(t>>1];r=a.r28shl(r,h);n=a.r28shl(n,h);a.pc2(r,n,e.keys,s)}};DES.prototype._update=function _update(e,t,r,i){var n=this._desState;var s=a.readUInt32BE(e,t);var o=a.readUInt32BE(e,t+4);a.ip(s,o,n.tmp,0);s=n.tmp[0];o=n.tmp[1];if(this.type==="encrypt")this._encrypt(n,s,o,n.tmp,0);else this._decrypt(n,s,o,n.tmp,0);s=n.tmp[0];o=n.tmp[1];a.writeUInt32BE(r,s,i);a.writeUInt32BE(r,o,i+4)};DES.prototype._pad=function _pad(e,t){var r=e.length-t;for(var i=t;i>>0;s=p}a.rip(o,s,i,n)};DES.prototype._decrypt=function _decrypt(e,t,r,i,n){var s=r;var o=t;for(var h=e.keys.length-2;h>=0;h-=2){var u=e.keys[h];var d=e.keys[h+1];a.expand(s,e.tmp,0);u^=e.tmp[0];d^=e.tmp[1];var c=a.substitute(u,d);var l=a.permute(c);var p=s;s=(o^l)>>>0;o=p}a.rip(s,o,i,n)}},6159:function(e,t,r){"use strict";var i=r(3523);var n=r(3782);var a=r(9876);var s=r(1016);function EDEState(e,t){i.equal(t.length,24,"Invalid key length");var r=t.slice(0,8);var n=t.slice(8,16);var a=t.slice(16,24);if(e==="encrypt"){this.ciphers=[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:a})]}else{this.ciphers=[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:r})]}}function EDE(e){a.call(this,e);var t=new EDEState(this.type,this.options.key);this._edeState=t}n(EDE,a);e.exports=EDE;EDE.create=function create(e){return new EDE(e)};EDE.prototype._update=function _update(e,t,r,i){var n=this._edeState;n.ciphers[0]._update(e,t,r,i);n.ciphers[1]._update(r,i,r,i);n.ciphers[2]._update(r,i,r,i)};EDE.prototype._pad=s.prototype._pad;EDE.prototype._unpad=s.prototype._unpad},5334:function(e,t){"use strict";t.readUInt32BE=function readUInt32BE(e,t){var r=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return r>>>0};t.writeUInt32BE=function writeUInt32BE(e,t,r){e[0+r]=t>>>24;e[1+r]=t>>>16&255;e[2+r]=t>>>8&255;e[3+r]=t&255};t.ip=function ip(e,t,r,i){var n=0;var a=0;for(var s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8){n<<=1;n|=t>>>o+s&1}for(var o=0;o<=24;o+=8){n<<=1;n|=e>>>o+s&1}}for(var s=6;s>=0;s-=2){for(var o=1;o<=25;o+=8){a<<=1;a|=t>>>o+s&1}for(var o=1;o<=25;o+=8){a<<=1;a|=e>>>o+s&1}}r[i+0]=n>>>0;r[i+1]=a>>>0};t.rip=function rip(e,t,r,i){var n=0;var a=0;for(var s=0;s<4;s++){for(var o=24;o>=0;o-=8){n<<=1;n|=t>>>o+s&1;n<<=1;n|=e>>>o+s&1}}for(var s=4;s<8;s++){for(var o=24;o>=0;o-=8){a<<=1;a|=t>>>o+s&1;a<<=1;a|=e>>>o+s&1}}r[i+0]=n>>>0;r[i+1]=a>>>0};t.pc1=function pc1(e,t,r,i){var n=0;var a=0;for(var s=7;s>=5;s--){for(var o=0;o<=24;o+=8){n<<=1;n|=t>>o+s&1}for(var o=0;o<=24;o+=8){n<<=1;n|=e>>o+s&1}}for(var o=0;o<=24;o+=8){n<<=1;n|=t>>o+s&1}for(var s=1;s<=3;s++){for(var o=0;o<=24;o+=8){a<<=1;a|=t>>o+s&1}for(var o=0;o<=24;o+=8){a<<=1;a|=e>>o+s&1}}for(var o=0;o<=24;o+=8){a<<=1;a|=e>>o+s&1}r[i+0]=n>>>0;r[i+1]=a>>>0};t.r28shl=function r28shl(e,t){return e<>>28-t};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];t.pc2=function pc2(e,t,i,n){var a=0;var s=0;var o=r.length>>>1;for(var h=0;h>>r[h]&1}for(var h=o;h>>r[h]&1}i[n+0]=a>>>0;i[n+1]=s>>>0};t.expand=function expand(e,t,r){var i=0;var n=0;i=(e&1)<<5|e>>>27;for(var a=23;a>=15;a-=4){i<<=6;i|=e>>>a&63}for(var a=11;a>=3;a-=4){n|=e>>>a&63;n<<=6}n|=(e&31)<<1|e>>>31;t[r+0]=i>>>0;t[r+1]=n>>>0};var i=[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];t.substitute=function substitute(e,t){var r=0;for(var n=0;n<4;n++){var a=e>>>18-n*6&63;var s=i[n*64+a];r<<=4;r|=s}for(var n=0;n<4;n++){var a=t>>>18-n*6&63;var s=i[4*64+n*64+a];r<<=4;r|=s}return r>>>0};var n=[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];t.permute=function permute(e){var t=0;for(var r=0;r>>n[r]&1}return t>>>0};t.padSplit=function padSplit(e,t,r){var i=e.toString(2);while(i.lengthe){r.ishrn(1)}if(r.isEven()){r.iadd(h)}if(!r.testn(1)){r.iadd(u)}if(!t.cmp(u)){while(r.mod(a).cmp(m)){r.iadd(y)}}else if(!t.cmp(d)){while(r.mod(p).cmp(v)){r.iadd(y)}}s=r.shrn(1);if(simpleSieve(s)&&simpleSieve(r)&&fermatTest(s)&&fermatTest(r)&&o.test(s)&&o.test(r)){return r}}}},949:function(e,t,r){"use strict";var i=t;i.version=r(2531).i8;i.utils=r(4401);i.rand=r(3500);i.curve=r(9359);i.curves=r(6226);i.ec=r(4088);i.eddsa=r(8511)},2727:function(e,t,r){"use strict";var i=r(711);var n=r(4401);var a=n.getNAF;var s=n.getJSF;var o=n.assert;function BaseCurve(e,t){this.type=e;this.p=new i(t.p,16);this.red=t.prime?i.red(t.prime):i.mont(this.p);this.zero=new i(0).toRed(this.red);this.one=new i(1).toRed(this.red);this.two=new i(2).toRed(this.red);this.n=t.n&&new i(t.n,16);this.g=t.g&&this.pointFromJSON(t.g,t.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);if(!r||r.cmpn(100)>0){this.redN=null}else{this._maxwellTrick=true;this.redN=this.n.toRed(this.red)}}e.exports=BaseCurve;BaseCurve.prototype.point=function point(){throw new Error("Not implemented")};BaseCurve.prototype.validate=function validate(){throw new Error("Not implemented")};BaseCurve.prototype._fixedNafMul=function _fixedNafMul(e,t){o(e.precomputed);var r=e._getDoubles();var i=a(t,1,this._bitLength);var n=(1<=h;t--)u=(u<<1)+i[t];s.push(u)}var d=this.jpoint(null,null,null);var c=this.jpoint(null,null,null);for(var l=n;l>0;l--){for(var h=0;h=0;u--){for(var t=0;u>=0&&s[u]===0;u--)t++;if(u>=0)t++;h=h.dblp(t);if(u<0)break;var d=s[u];o(d!==0);if(e.type==="affine"){if(d>0)h=h.mixedAdd(n[d-1>>1]);else h=h.mixedAdd(n[-d-1>>1].neg())}else{if(d>0)h=h.add(n[d-1>>1]);else h=h.add(n[-d-1>>1].neg())}}return e.type==="affine"?h.toP():h};BaseCurve.prototype._wnafMulAdd=function _wnafMulAdd(e,t,r,i,n){var o=this._wnafT1;var h=this._wnafT2;var u=this._wnafT3;var d=0;for(var c=0;c=1;c-=2){var v=c-1;var b=c;if(o[v]!==1||o[b]!==1){u[v]=a(r[v],o[v],this._bitLength);u[b]=a(r[b],o[b],this._bitLength);d=Math.max(u[v].length,d);d=Math.max(u[b].length,d);continue}var m=[t[v],null,null,t[b]];if(t[v].y.cmp(t[b].y)===0){m[1]=t[v].add(t[b]);m[2]=t[v].toJ().mixedAdd(t[b].neg())}else if(t[v].y.cmp(t[b].y.redNeg())===0){m[1]=t[v].toJ().mixedAdd(t[b]);m[2]=t[v].add(t[b].neg())}else{m[1]=t[v].toJ().mixedAdd(t[b]);m[2]=t[v].toJ().mixedAdd(t[b].neg())}var y=[-3,-1,-5,-7,0,7,5,1,3];var g=s(r[v],r[b]);d=Math.max(g[0].length,d);u[v]=new Array(d);u[b]=new Array(d);for(var _=0;_=0;c--){var k=0;while(c>=0){var A=true;for(var _=0;_=0)k++;B=B.dblp(k);if(c<0)break;for(var _=0;_0)l=h[_][N-1>>1];else if(N<0)l=h[_][-N-1>>1].neg();if(l.type==="affine")B=B.mixedAdd(l);else B=B.add(l)}}for(var c=0;c=Math.ceil((e.bitLength()+1)/t.step)};BasePoint.prototype._getDoubles=function _getDoubles(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var r=[this];var i=this;for(var n=0;n";return""};Point.prototype.isInfinity=function isInfinity(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Point.prototype._extDbl=function _extDbl(){var e=this.x.redSqr();var t=this.y.redSqr();var r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e);var n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t);var a=i.redAdd(t);var s=a.redSub(r);var o=i.redSub(t);var h=n.redMul(s);var u=a.redMul(o);var d=n.redMul(o);var c=s.redMul(a);return this.curve.point(h,u,c,d)};Point.prototype._projDbl=function _projDbl(){var e=this.x.redAdd(this.y).redSqr();var t=this.x.redSqr();var r=this.y.redSqr();var i;var n;var a;if(this.curve.twisted){var s=this.curve._mulA(t);var o=s.redAdd(r);if(this.zOne){i=e.redSub(t).redSub(r).redMul(o.redSub(this.curve.two));n=o.redMul(s.redSub(r));a=o.redSqr().redSub(o).redSub(o)}else{var h=this.z.redSqr();var u=o.redSub(h).redISub(h);i=e.redSub(t).redISub(r).redMul(u);n=o.redMul(s.redSub(r));a=o.redMul(u)}}else{var s=t.redAdd(r);var h=this.curve._mulC(this.z).redSqr();var u=s.redSub(h).redSub(h);i=this.curve._mulC(e.redISub(s)).redMul(u);n=this.curve._mulC(s).redMul(t.redISub(r));a=s.redMul(u)}return this.curve.point(i,n,a)};Point.prototype.dbl=function dbl(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()};Point.prototype._extAdd=function _extAdd(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x));var r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x));var i=this.t.redMul(this.curve.dd).redMul(e.t);var n=this.z.redMul(e.z.redAdd(e.z));var a=r.redSub(t);var s=n.redSub(i);var o=n.redAdd(i);var h=r.redAdd(t);var u=a.redMul(s);var d=o.redMul(h);var c=a.redMul(h);var l=s.redMul(o);return this.curve.point(u,d,l,c)};Point.prototype._projAdd=function _projAdd(e){var t=this.z.redMul(e.z);var r=t.redSqr();var i=this.x.redMul(e.x);var n=this.y.redMul(e.y);var a=this.curve.d.redMul(i).redMul(n);var s=r.redSub(a);var o=r.redAdd(a);var h=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(n);var u=t.redMul(s).redMul(h);var d;var c;if(this.curve.twisted){d=t.redMul(o).redMul(n.redSub(this.curve._mulA(i)));c=s.redMul(o)}else{d=t.redMul(o).redMul(n.redSub(i));c=this.curve._mulC(s).redMul(o)}return this.curve.point(u,d,c)};Point.prototype.add=function add(e){if(this.isInfinity())return e;if(e.isInfinity())return this;if(this.curve.extended)return this._extAdd(e);else return this._projAdd(e)};Point.prototype.mul=function mul(e){if(this._hasDoubles(e))return this.curve._fixedNafMul(this,e);else return this.curve._wnafMul(this,e)};Point.prototype.mulAdd=function mulAdd(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,false)};Point.prototype.jmulAdd=function jmulAdd(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,true)};Point.prototype.normalize=function normalize(){if(this.zOne)return this;var e=this.z.redInvm();this.x=this.x.redMul(e);this.y=this.y.redMul(e);if(this.t)this.t=this.t.redMul(e);this.z=this.curve.one;this.zOne=true;return this};Point.prototype.neg=function neg(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Point.prototype.getX=function getX(){this.normalize();return this.x.fromRed()};Point.prototype.getY=function getY(){this.normalize();return this.y.fromRed()};Point.prototype.eq=function eq(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};Point.prototype.eqXToP=function eqXToP(e){var t=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(t)===0)return true;var r=e.clone();var i=this.curve.redN.redMul(this.z);for(;;){r.iadd(this.curve.n);if(r.cmp(this.curve.p)>=0)return false;t.redIAdd(i);if(this.x.cmp(t)===0)return true}};Point.prototype.toP=Point.prototype.normalize;Point.prototype.mixedAdd=Point.prototype.add},9359:function(e,t,r){"use strict";var i=t;i.base=r(2727);i.short=r(4720);i.mont=r(6653);i.edwards=r(2705)},6653:function(e,t,r){"use strict";var i=r(711);var n=r(3782);var a=r(2727);var s=r(4401);function MontCurve(e){a.call(this,"mont",e);this.a=new i(e.a,16).toRed(this.red);this.b=new i(e.b,16).toRed(this.red);this.i4=new i(4).toRed(this.red).redInvm();this.two=new i(2).toRed(this.red);this.a24=this.i4.redMul(this.a.redAdd(this.two))}n(MontCurve,a);e.exports=MontCurve;MontCurve.prototype.validate=function validate(e){var t=e.normalize().x;var r=t.redSqr();var i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);var n=i.redSqrt();return n.redSqr().cmp(i)===0};function Point(e,t,r){a.BasePoint.call(this,e,"projective");if(t===null&&r===null){this.x=this.curve.one;this.z=this.curve.zero}else{this.x=new i(t,16);this.z=new i(r,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red)}}n(Point,a.BasePoint);MontCurve.prototype.decodePoint=function decodePoint(e,t){return this.point(s.toArray(e,t),1)};MontCurve.prototype.point=function point(e,t){return new Point(this,e,t)};MontCurve.prototype.pointFromJSON=function pointFromJSON(e){return Point.fromJSON(this,e)};Point.prototype.precompute=function precompute(){};Point.prototype._encode=function _encode(){return this.getX().toArray("be",this.curve.p.byteLength())};Point.fromJSON=function fromJSON(e,t){return new Point(e,t[0],t[1]||e.one)};Point.prototype.inspect=function inspect(){if(this.isInfinity())return"";return""};Point.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0};Point.prototype.dbl=function dbl(){var e=this.x.redAdd(this.z);var t=e.redSqr();var r=this.x.redSub(this.z);var i=r.redSqr();var n=t.redSub(i);var a=t.redMul(i);var s=n.redMul(i.redAdd(this.curve.a24.redMul(n)));return this.curve.point(a,s)};Point.prototype.add=function add(){throw new Error("Not supported on Montgomery curve")};Point.prototype.diffAdd=function diffAdd(e,t){var r=this.x.redAdd(this.z);var i=this.x.redSub(this.z);var n=e.x.redAdd(e.z);var a=e.x.redSub(e.z);var s=a.redMul(r);var o=n.redMul(i);var h=t.z.redMul(s.redAdd(o).redSqr());var u=t.x.redMul(s.redISub(o).redSqr());return this.curve.point(h,u)};Point.prototype.mul=function mul(e){var t=e.clone();var r=this;var i=this.curve.point(null,null);var n=this;for(var a=[];t.cmpn(0)!==0;t.iushrn(1))a.push(t.andln(1));for(var s=a.length-1;s>=0;s--){if(a[s]===0){r=r.diffAdd(i,n);i=i.dbl()}else{i=r.diffAdd(i,n);r=r.dbl()}}return i};Point.prototype.mulAdd=function mulAdd(){throw new Error("Not supported on Montgomery curve")};Point.prototype.jumlAdd=function jumlAdd(){throw new Error("Not supported on Montgomery curve")};Point.prototype.eq=function eq(e){return this.getX().cmp(e.getX())===0};Point.prototype.normalize=function normalize(){this.x=this.x.redMul(this.z.redInvm());this.z=this.curve.one;return this};Point.prototype.getX=function getX(){this.normalize();return this.x.fromRed()}},4720:function(e,t,r){"use strict";var i=r(4401);var n=r(711);var a=r(3782);var s=r(2727);var o=i.assert;function ShortCurve(e){s.call(this,"short",e);this.a=new n(e.a,16).toRed(this.red);this.b=new n(e.b,16).toRed(this.red);this.tinv=this.two.redInvm();this.zeroA=this.a.fromRed().cmpn(0)===0;this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0;this.endo=this._getEndomorphism(e);this._endoWnafT1=new Array(4);this._endoWnafT2=new Array(4)}a(ShortCurve,s);e.exports=ShortCurve;ShortCurve.prototype._getEndomorphism=function _getEndomorphism(e){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var t;var r;if(e.beta){t=new n(e.beta,16).toRed(this.red)}else{var i=this._getEndoRoots(this.p);t=i[0].cmp(i[1])<0?i[0]:i[1];t=t.toRed(this.red)}if(e.lambda){r=new n(e.lambda,16)}else{var a=this._getEndoRoots(this.n);if(this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))===0){r=a[0]}else{r=a[1];o(this.g.mul(r).x.cmp(this.g.x.redMul(t))===0)}}var s;if(e.basis){s=e.basis.map((function(e){return{a:new n(e.a,16),b:new n(e.b,16)}}))}else{s=this._getEndoBasis(r)}return{beta:t,lambda:r,basis:s}};ShortCurve.prototype._getEndoRoots=function _getEndoRoots(e){var t=e===this.p?this.red:n.mont(e);var r=new n(2).toRed(t).redInvm();var i=r.redNeg();var a=new n(3).toRed(t).redNeg().redSqrt().redMul(r);var s=i.redAdd(a).fromRed();var o=i.redSub(a).fromRed();return[s,o]};ShortCurve.prototype._getEndoBasis=function _getEndoBasis(e){var t=this.n.ushrn(Math.floor(this.n.bitLength()/2));var r=e;var i=this.n.clone();var a=new n(1);var s=new n(0);var o=new n(0);var h=new n(1);var u;var d;var c;var l;var p;var v;var b;var m=0;var y;var g;while(r.cmpn(0)!==0){var _=i.div(r);y=i.sub(_.mul(r));g=o.sub(_.mul(a));var w=h.sub(_.mul(s));if(!c&&y.cmp(t)<0){u=b.neg();d=a;c=y.neg();l=g}else if(c&&++m===2){break}b=y;i=r;r=y;o=a;a=g;h=s;s=w}p=y.neg();v=g;var M=c.sqr().add(l.sqr());var B=p.sqr().add(v.sqr());if(B.cmp(M)>=0){p=u;v=d}if(c.negative){c=c.neg();l=l.neg()}if(p.negative){p=p.neg();v=v.neg()}return[{a:c,b:l},{a:p,b:v}]};ShortCurve.prototype._endoSplit=function _endoSplit(e){var t=this.endo.basis;var r=t[0];var i=t[1];var n=i.b.mul(e).divRound(this.n);var a=r.b.neg().mul(e).divRound(this.n);var s=n.mul(r.a);var o=a.mul(i.a);var h=n.mul(r.b);var u=a.mul(i.b);var d=e.sub(s).sub(o);var c=h.add(u).neg();return{k1:d,k2:c}};ShortCurve.prototype.pointFromX=function pointFromX(e,t){e=new n(e,16);if(!e.red)e=e.toRed(this.red);var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b);var i=r.redSqrt();if(i.redSqr().redSub(r).cmp(this.zero)!==0)throw new Error("invalid point");var a=i.fromRed().isOdd();if(t&&!a||!t&&a)i=i.redNeg();return this.point(e,i)};ShortCurve.prototype.validate=function validate(e){if(e.inf)return true;var t=e.x;var r=e.y;var i=this.a.redMul(t);var n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return r.redSqr().redISub(n).cmpn(0)===0};ShortCurve.prototype._endoWnafMulAdd=function _endoWnafMulAdd(e,t,r){var i=this._endoWnafT1;var n=this._endoWnafT2;for(var a=0;a";return""};Point.prototype.isInfinity=function isInfinity(){return this.inf};Point.prototype.add=function add(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);if(t.cmpn(0)!==0)t=t.redMul(this.x.redSub(e.x).redInvm());var r=t.redSqr().redISub(this.x).redISub(e.x);var i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)};Point.prototype.dbl=function dbl(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a;var r=this.x.redSqr();var i=e.redInvm();var n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i);var a=n.redSqr().redISub(this.x.redAdd(this.x));var s=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)};Point.prototype.getX=function getX(){return this.x.fromRed()};Point.prototype.getY=function getY(){return this.y.fromRed()};Point.prototype.mul=function mul(e){e=new n(e,16);if(this.isInfinity())return this;else if(this._hasDoubles(e))return this.curve._fixedNafMul(this,e);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[e]);else return this.curve._wnafMul(this,e)};Point.prototype.mulAdd=function mulAdd(e,t,r){var i=[this,t];var n=[e,r];if(this.curve.endo)return this.curve._endoWnafMulAdd(i,n);else return this.curve._wnafMulAdd(1,i,n,2)};Point.prototype.jmulAdd=function jmulAdd(e,t,r){var i=[this,t];var n=[e,r];if(this.curve.endo)return this.curve._endoWnafMulAdd(i,n,true);else return this.curve._wnafMulAdd(1,i,n,2,true)};Point.prototype.eq=function eq(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Point.prototype.neg=function neg(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed;var negate=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(negate)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(negate)}}}return t};Point.prototype.toJ=function toJ(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function JPoint(e,t,r,i){s.BasePoint.call(this,e,"jacobian");if(t===null&&r===null&&i===null){this.x=this.curve.one;this.y=this.curve.one;this.z=new n(0)}else{this.x=new n(t,16);this.y=new n(r,16);this.z=new n(i,16)}if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}a(JPoint,s.BasePoint);ShortCurve.prototype.jpoint=function jpoint(e,t,r){return new JPoint(this,e,t,r)};JPoint.prototype.toP=function toP(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm();var t=e.redSqr();var r=this.x.redMul(t);var i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)};JPoint.prototype.neg=function neg(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};JPoint.prototype.add=function add(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr();var r=this.z.redSqr();var i=this.x.redMul(t);var n=e.x.redMul(r);var a=this.y.redMul(t.redMul(e.z));var s=e.y.redMul(r.redMul(this.z));var o=i.redSub(n);var h=a.redSub(s);if(o.cmpn(0)===0){if(h.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var u=o.redSqr();var d=u.redMul(o);var c=i.redMul(u);var l=h.redSqr().redIAdd(d).redISub(c).redISub(c);var p=h.redMul(c.redISub(l)).redISub(a.redMul(d));var v=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(l,p,v)};JPoint.prototype.mixedAdd=function mixedAdd(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr();var r=this.x;var i=e.x.redMul(t);var n=this.y;var a=e.y.redMul(t).redMul(this.z);var s=r.redSub(i);var o=n.redSub(a);if(s.cmpn(0)===0){if(o.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var h=s.redSqr();var u=h.redMul(s);var d=r.redMul(h);var c=o.redSqr().redIAdd(u).redISub(d).redISub(d);var l=o.redMul(d.redISub(c)).redISub(n.redMul(u));var p=this.z.redMul(s);return this.curve.jpoint(c,l,p)};JPoint.prototype.dblp=function dblp(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var t=this;for(var r=0;r=0)return false;r.redIAdd(n);if(this.x.cmp(r)===0)return true}};JPoint.prototype.inspect=function inspect(){if(this.isInfinity())return"";return""};JPoint.prototype.isInfinity=function isInfinity(){return this.z.cmpn(0)===0}},6226:function(e,t,r){"use strict";var i=t;var n=r(7028);var a=r(9359);var s=r(4401);var o=s.assert;function PresetCurve(e){if(e.type==="short")this.curve=new a.short(e);else if(e.type==="edwards")this.curve=new a.edwards(e);else this.curve=new a.mont(e);this.g=this.curve.g;this.n=this.curve.n;this.hash=e.hash;o(this.g.validate(),"Invalid curve");o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}i.PresetCurve=PresetCurve;function defineCurve(e,t){Object.defineProperty(i,e,{configurable:true,enumerable:true,get:function(){var r=new PresetCurve(t);Object.defineProperty(i,e,{configurable:true,enumerable:true,value:r});return r}})}defineCurve("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:n.sha256,gRed:false,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});defineCurve("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:n.sha256,gRed:false,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});defineCurve("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:n.sha256,gRed:false,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});defineCurve("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:n.sha384,gRed:false,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"]});defineCurve("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:n.sha512,gRed:false,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"]});defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:false,g:["9"]});defineCurve("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:n.sha256,gRed:false,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var h;try{h=r(9702)}catch(e){h=undefined}defineCurve("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:n.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:false,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",h]})},4088:function(e,t,r){"use strict";var i=r(711);var n=r(4910);var a=r(4401);var s=r(6226);var o=r(3500);var h=a.assert;var u=r(4724);var d=r(7526);function EC(e){if(!(this instanceof EC))return new EC(e);if(typeof e==="string"){h(s.hasOwnProperty(e),"Unknown curve "+e);e=s[e]}if(e instanceof s.PresetCurve)e={curve:e};this.curve=e.curve.curve;this.n=this.curve.n;this.nh=this.n.ushrn(1);this.g=this.curve.g;this.g=e.curve.g;this.g.precompute(e.curve.n.bitLength()+1);this.hash=e.hash||e.curve.hash}e.exports=EC;EC.prototype.keyPair=function keyPair(e){return new u(this,e)};EC.prototype.keyFromPrivate=function keyFromPrivate(e,t){return u.fromPrivate(this,e,t)};EC.prototype.keyFromPublic=function keyFromPublic(e,t){return u.fromPublic(this,e,t)};EC.prototype.genKeyPair=function genKeyPair(e){if(!e)e={};var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()});var r=this.n.byteLength();var a=this.n.sub(new i(2));do{var s=new i(t.generate(r));if(s.cmp(a)>0)continue;s.iaddn(1);return this.keyFromPrivate(s)}while(true)};EC.prototype._truncateToN=function truncateToN(e,t){var r=e.byteLength()*8-this.n.bitLength();if(r>0)e=e.ushrn(r);if(!t&&e.cmp(this.n)>=0)return e.sub(this.n);else return e};EC.prototype.sign=function sign(e,t,r,a){if(typeof r==="object"){a=r;r=null}if(!a)a={};t=this.keyFromPrivate(t,r);e=this._truncateToN(new i(e,16));var s=this.n.byteLength();var o=t.getPrivate().toArray("be",s);var h=e.toArray("be",s);var u=new n({hash:this.hash,entropy:o,nonce:h,pers:a.pers,persEnc:a.persEnc||"utf8"});var c=this.n.sub(new i(1));for(var l=0;true;l++){var p=a.k?a.k(l):new i(u.generate(this.n.byteLength()));p=this._truncateToN(p,true);if(p.cmpn(1)<=0||p.cmp(c)>=0)continue;var v=this.g.mul(p);if(v.isInfinity())continue;var b=v.getX();var m=b.umod(this.n);if(m.cmpn(0)===0)continue;var y=p.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));y=y.umod(this.n);if(y.cmpn(0)===0)continue;var g=(v.getY().isOdd()?1:0)|(b.cmp(m)!==0?2:0);if(a.canonical&&y.cmp(this.nh)>0){y=this.n.sub(y);g^=1}return new d({r:m,s:y,recoveryParam:g})}};EC.prototype.verify=function verify(e,t,r,n){e=this._truncateToN(new i(e,16));r=this.keyFromPublic(r,n);t=new d(t,"hex");var a=t.r;var s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return false;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return false;var o=s.invm(this.n);var h=o.mul(e).umod(this.n);var u=o.mul(a).umod(this.n);if(!this.curve._maxwellTrick){var c=this.g.mulAdd(h,r.getPublic(),u);if(c.isInfinity())return false;return c.getX().umod(this.n).cmp(a)===0}var c=this.g.jmulAdd(h,r.getPublic(),u);if(c.isInfinity())return false;return c.eqXToP(a)};EC.prototype.recoverPubKey=function(e,t,r,n){h((3&r)===r,"The recovery param is more than two bits");t=new d(t,n);var a=this.n;var s=new i(e);var o=t.r;var u=t.s;var c=r&1;var l=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");if(l)o=this.curve.pointFromX(o.add(this.curve.n),c);else o=this.curve.pointFromX(o,c);var p=t.r.invm(a);var v=a.sub(s).mul(p).umod(a);var b=u.mul(p).umod(a);return this.g.mulAdd(v,o,b)};EC.prototype.getKeyRecoveryParam=function(e,t,r,i){t=new d(t,i);if(t.recoveryParam!==null)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch(e){continue}if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},4724:function(e,t,r){"use strict";var i=r(711);var n=r(4401);var a=n.assert;function KeyPair(e,t){this.ec=e;this.priv=null;this.pub=null;if(t.priv)this._importPrivate(t.priv,t.privEnc);if(t.pub)this._importPublic(t.pub,t.pubEnc)}e.exports=KeyPair;KeyPair.fromPublic=function fromPublic(e,t,r){if(t instanceof KeyPair)return t;return new KeyPair(e,{pub:t,pubEnc:r})};KeyPair.fromPrivate=function fromPrivate(e,t,r){if(t instanceof KeyPair)return t;return new KeyPair(e,{priv:t,privEnc:r})};KeyPair.prototype.validate=function validate(){var e=this.getPublic();if(e.isInfinity())return{result:false,reason:"Invalid public key"};if(!e.validate())return{result:false,reason:"Public key is not a point"};if(!e.mul(this.ec.curve.n).isInfinity())return{result:false,reason:"Public key * N != O"};return{result:true,reason:null}};KeyPair.prototype.getPublic=function getPublic(e,t){if(typeof e==="string"){t=e;e=null}if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!t)return this.pub;return this.pub.encode(t,e)};KeyPair.prototype.getPrivate=function getPrivate(e){if(e==="hex")return this.priv.toString(16,2);else return this.priv};KeyPair.prototype._importPrivate=function _importPrivate(e,t){this.priv=new i(e,t||16);this.priv=this.priv.umod(this.ec.curve.n)};KeyPair.prototype._importPublic=function _importPublic(e,t){if(e.x||e.y){if(this.ec.curve.type==="mont"){a(e.x,"Need x coordinate")}else if(this.ec.curve.type==="short"||this.ec.curve.type==="edwards"){a(e.x&&e.y,"Need both x and y coordinate")}this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)};KeyPair.prototype.derive=function derive(e){return e.mul(this.priv).getX()};KeyPair.prototype.sign=function sign(e,t,r){return this.ec.sign(e,this,t,r)};KeyPair.prototype.verify=function verify(e,t){return this.ec.verify(e,t,this)};KeyPair.prototype.inspect=function inspect(){return""}},7526:function(e,t,r){"use strict";var i=r(711);var n=r(4401);var a=n.assert;function Signature(e,t){if(e instanceof Signature)return e;if(this._importDER(e,t))return;a(e.r&&e.s,"Signature without r or s");this.r=new i(e.r,16);this.s=new i(e.s,16);if(e.recoveryParam===undefined)this.recoveryParam=null;else this.recoveryParam=e.recoveryParam}e.exports=Signature;function Position(){this.place=0}function getLength(e,t){var r=e[t.place++];if(!(r&128)){return r}var i=r&15;if(i===0||i>4){return false}var n=0;for(var a=0,s=t.place;a>>=0}if(n<=127){return false}t.place=s;return n}function rmPadding(e){var t=0;var r=e.length-1;while(!e[t]&&!(e[t+1]&128)&&t>>3);e.push(r|128);while(--r){e.push(t>>>(r<<3)&255)}e.push(t)}Signature.prototype.toDER=function toDER(e){var t=this.r.toArray();var r=this.s.toArray();if(t[0]&128)t=[0].concat(t);if(r[0]&128)r=[0].concat(r);t=rmPadding(t);r=rmPadding(r);while(!r[0]&&!(r[1]&128)){r=r.slice(1)}var i=[2];constructLength(i,t.length);i=i.concat(t);i.push(2);constructLength(i,r.length);var a=i.concat(r);var s=[48];constructLength(s,a.length);s=s.concat(a);return n.encode(s,e)}},8511:function(e,t,r){"use strict";var i=r(7028);var n=r(6226);var a=r(4401);var s=a.assert;var o=a.parseBytes;var h=r(9917);var u=r(9314);function EDDSA(e){s(e==="ed25519","only tested with ed25519 so far");if(!(this instanceof EDDSA))return new EDDSA(e);var e=n[e].curve;this.curve=e;this.g=e.g;this.g.precompute(e.n.bitLength()+1);this.pointClass=e.point().constructor;this.encodingLength=Math.ceil(e.n.bitLength()/8);this.hash=i.sha512}e.exports=EDDSA;EDDSA.prototype.sign=function sign(e,t){e=o(e);var r=this.keyFromSecret(t);var i=this.hashInt(r.messagePrefix(),e);var n=this.g.mul(i);var a=this.encodePoint(n);var s=this.hashInt(a,r.pubBytes(),e).mul(r.priv());var h=i.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:h,Rencoded:a})};EDDSA.prototype.verify=function verify(e,t,r){e=o(e);t=this.makeSignature(t);var i=this.keyFromPublic(r);var n=this.hashInt(t.Rencoded(),i.pubBytes(),e);var a=this.g.mul(t.S());var s=t.R().add(i.pub().mul(n));return s.eq(a)};EDDSA.prototype.hashInt=function hashInt(){var e=this.hash();for(var t=0;t(n>>1)-1)o=(n>>1)-h;else o=h;a.isubn(o)}else{o=0}i[s]=o;a.iushrn(1)}return i}i.getNAF=getNAF;function getJSF(e,t){var r=[[],[]];e=e.clone();t=t.clone();var i=0;var n=0;while(e.cmpn(-i)>0||t.cmpn(-n)>0){var a=e.andln(3)+i&3;var s=t.andln(3)+n&3;if(a===3)a=-1;if(s===3)s=-1;var o;if((a&1)===0){o=0}else{var h=e.andln(7)+i&7;if((h===3||h===5)&&s===2)o=-a;else o=a}r[0].push(o);var u;if((s&1)===0){u=0}else{var h=t.andln(7)+n&7;if((h===3||h===5)&&a===2)u=-s;else u=s}r[1].push(u);if(2*i===o+1)i=1-i;if(2*n===u+1)n=1-n;e.iushrn(1);t.iushrn(1)}return r}i.getJSF=getJSF;function cachedProperty(e,t,r){var i="_"+t;e.prototype[t]=function cachedProperty(){return this[i]!==undefined?this[i]:this[i]=r.call(this)}}i.cachedProperty=cachedProperty;function parseBytes(e){return typeof e==="string"?i.toArray(e,"hex"):e}i.parseBytes=parseBytes;function intFromLE(e){return new n(e,"hex","le")}i.intFromLE=intFromLE},8368:function(e,t,r){var i=r(6911).Buffer;var n=r(3533);function EVP_BytesToKey(e,t,r,a){if(!i.isBuffer(e))e=i.from(e,"binary");if(t){if(!i.isBuffer(t))t=i.from(t,"binary");if(t.length!==8)throw new RangeError("salt should be Buffer with 8 byte length")}var s=r/8;var o=i.alloc(s);var h=i.alloc(a||0);var u=i.alloc(0);while(s>0||a>0){var d=new n;d.update(u);d.update(e);if(t)d.update(t);u=d.digest();var c=0;if(s>0){var l=o.length-s;c=Math.min(s,u.length);u.copy(o,l,0,c);s-=c}if(c0){var p=h.length-a;var v=Math.min(a,u.length-c);u.copy(h,p,c,c+v);a-=v}}u.fill(0);return{key:o,iv:h}}e.exports=EVP_BytesToKey},9029:function(e,t,r){"use strict";var i=r(6911).Buffer;var n=r(3726).Transform;var a=r(3782);function throwIfNotStringOrBuffer(e,t){if(!i.isBuffer(e)&&typeof e!=="string"){throw new TypeError(t+" must be a string or a buffer")}}function HashBase(e){n.call(this);this._block=i.allocUnsafe(e);this._blockSize=e;this._blockOffset=0;this._length=[0,0,0,0];this._finalized=false}a(HashBase,n);HashBase.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(e){i=e}r(i)};HashBase.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)};HashBase.prototype.update=function(e,t){throwIfNotStringOrBuffer(e,"Data");if(this._finalized)throw new Error("Digest already called");if(!i.isBuffer(e))e=i.from(e,t);var r=this._block;var n=0;while(this._blockOffset+e.length-n>=this._blockSize){for(var a=this._blockOffset;a0;++s){this._length[s]+=o;o=this._length[s]/4294967296|0;if(o>0)this._length[s]-=4294967296*o}return this};HashBase.prototype._update=function(){throw new Error("_update is not implemented")};HashBase.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=true;var t=this._digest();if(e!==undefined)t=t.toString(e);this._block.fill(0);this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t};HashBase.prototype._digest=function(){throw new Error("_digest is not implemented")};e.exports=HashBase},7028:function(e,t,r){var i=t;i.utils=r(263);i.common=r(1330);i.sha=r(301);i.ripemd=r(3079);i.hmac=r(3092);i.sha1=i.sha.sha1;i.sha256=i.sha.sha256;i.sha224=i.sha.sha224;i.sha384=i.sha.sha384;i.sha512=i.sha.sha512;i.ripemd160=i.ripemd.ripemd160},1330:function(e,t,r){"use strict";var i=r(263);var n=r(3523);function BlockHash(){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}t.BlockHash=BlockHash;BlockHash.prototype.update=function update(e,t){e=i.toArray(e,t);if(!this.pending)this.pending=e;else this.pending=this.pending.concat(e);this.pendingTotal+=e.length;if(this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length);if(this.pending.length===0)this.pending=null;e=i.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255;i[n++]=e>>>16&255;i[n++]=e>>>8&255;i[n++]=e&255}else{i[n++]=e&255;i[n++]=e>>>8&255;i[n++]=e>>>16&255;i[n++]=e>>>24&255;i[n++]=0;i[n++]=0;i[n++]=0;i[n++]=0;for(a=8;athis.blockSize)e=(new this.Hash).update(e).digest();n(e.length<=this.blockSize);for(var t=e.length;t>>3}t.g0_256=g0_256;function g1_256(e){return n(e,17)^n(e,19)^e>>>10}t.g1_256=g1_256},263:function(e,t,r){"use strict";var i=r(3523);var n=r(3782);t.inherits=n;function isSurrogatePair(e,t){if((e.charCodeAt(t)&64512)!==55296){return false}if(t<0||t+1>=e.length){return false}return(e.charCodeAt(t+1)&64512)===56320}function toArray(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e==="string"){if(!t){var i=0;for(var n=0;n>6|192;r[i++]=a&63|128}else if(isSurrogatePair(e,n)){a=65536+((a&1023)<<10)+(e.charCodeAt(++n)&1023);r[i++]=a>>18|240;r[i++]=a>>12&63|128;r[i++]=a>>6&63|128;r[i++]=a&63|128}else{r[i++]=a>>12|224;r[i++]=a>>6&63|128;r[i++]=a&63|128}}}else if(t==="hex"){e=e.replace(/[^a-z0-9]+/gi,"");if(e.length%2!==0)e="0"+e;for(n=0;n>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}t.htonl=htonl;function toHex32(e,t){var r="";for(var i=0;i>>0}return s}t.join32=join32;function split32(e,t){var r=new Array(e.length*4);for(var i=0,n=0;i>>24;r[n+1]=a>>>16&255;r[n+2]=a>>>8&255;r[n+3]=a&255}else{r[n+3]=a>>>24;r[n+2]=a>>>16&255;r[n+1]=a>>>8&255;r[n]=a&255}}return r}t.split32=split32;function rotr32(e,t){return e>>>t|e<<32-t}t.rotr32=rotr32;function rotl32(e,t){return e<>>32-t}t.rotl32=rotl32;function sum32(e,t){return e+t>>>0}t.sum32=sum32;function sum32_3(e,t,r){return e+t+r>>>0}t.sum32_3=sum32_3;function sum32_4(e,t,r,i){return e+t+r+i>>>0}t.sum32_4=sum32_4;function sum32_5(e,t,r,i,n){return e+t+r+i+n>>>0}t.sum32_5=sum32_5;function sum64(e,t,r,i){var n=e[t];var a=e[t+1];var s=i+a>>>0;var o=(s>>0;e[t+1]=s}t.sum64=sum64;function sum64_hi(e,t,r,i){var n=t+i>>>0;var a=(n>>0}t.sum64_hi=sum64_hi;function sum64_lo(e,t,r,i){var n=t+i;return n>>>0}t.sum64_lo=sum64_lo;function sum64_4_hi(e,t,r,i,n,a,s,o){var h=0;var u=t;u=u+i>>>0;h+=u>>0;h+=u>>0;h+=u>>0}t.sum64_4_hi=sum64_4_hi;function sum64_4_lo(e,t,r,i,n,a,s,o){var h=t+i+a+o;return h>>>0}t.sum64_4_lo=sum64_4_lo;function sum64_5_hi(e,t,r,i,n,a,s,o,h,u){var d=0;var c=t;c=c+i>>>0;d+=c>>0;d+=c>>0;d+=c>>0;d+=c>>0}t.sum64_5_hi=sum64_5_hi;function sum64_5_lo(e,t,r,i,n,a,s,o,h,u){var d=t+i+a+o+u;return d>>>0}t.sum64_5_lo=sum64_5_lo;function rotr64_hi(e,t,r){var i=t<<32-r|e>>>r;return i>>>0}t.rotr64_hi=rotr64_hi;function rotr64_lo(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}t.rotr64_lo=rotr64_lo;function shr64_hi(e,t,r){return e>>>r}t.shr64_hi=shr64_hi;function shr64_lo(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}t.shr64_lo=shr64_lo},4910:function(e,t,r){"use strict";var i=r(7028);var n=r(6545);var a=r(3523);function HmacDRBG(e){if(!(this instanceof HmacDRBG))return new HmacDRBG(e);this.hash=e.hash;this.predResist=!!e.predResist;this.outLen=this.hash.outSize;this.minEntropy=e.minEntropy||this.hash.hmacStrength;this._reseed=null;this.reseedInterval=null;this.K=null;this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex");var r=n.toArray(e.nonce,e.nonceEnc||"hex");var i=n.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._init(t,r,i)}e.exports=HmacDRBG;HmacDRBG.prototype._init=function init(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8);this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._update(e.concat(r||[]));this._reseed=1};HmacDRBG.prototype.generate=function generate(e,t,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");if(typeof t!=="string"){i=r;r=t;t=null}if(r){r=n.toArray(r,i||"hex");this._update(r)}var a=[];while(a.length56){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 e=a.allocUnsafe(16);e.writeInt32LE(this._a,0);e.writeInt32LE(this._b,4);e.writeInt32LE(this._c,8);e.writeInt32LE(this._d,12);return e};function rotl(e,t){return e<>>32-t}function fnF(e,t,r,i,n,a,s){return rotl(e+(t&r|~t&i)+n+a|0,s)+t|0}function fnG(e,t,r,i,n,a,s){return rotl(e+(t&i|r&~i)+n+a|0,s)+t|0}function fnH(e,t,r,i,n,a,s){return rotl(e+(t^r^i)+n+a|0,s)+t|0}function fnI(e,t,r,i,n,a,s){return rotl(e+(r^(t|~i))+n+a|0,s)+t|0}e.exports=MD5},1354:function(e,t,r){var i=r(711);var n=r(3500);function MillerRabin(e){this.rand=e||new n.Rand}e.exports=MillerRabin;MillerRabin.create=function create(e){return new MillerRabin(e)};MillerRabin.prototype._randbelow=function _randbelow(e){var t=e.bitLength();var r=Math.ceil(t/8);do{var n=new i(this.rand.generate(r))}while(n.cmp(e)>=0);return n};MillerRabin.prototype._randrange=function _randrange(e,t){var r=t.sub(e);return e.add(this._randbelow(r))};MillerRabin.prototype.test=function test(e,t,r){var n=e.bitLength();var a=i.mont(e);var s=new i(1).toRed(a);if(!t)t=Math.max(1,n/48|0);var o=e.subn(1);for(var h=0;!o.testn(h);h++){}var u=e.shrn(h);var d=o.toRed(a);var c=true;for(;t>0;t--){var l=this._randrange(new i(2),o);if(r)r(l);var p=l.toRed(a).redPow(u);if(p.cmp(s)===0||p.cmp(d)===0)continue;for(var v=1;v0;t--){var d=this._randrange(new i(2),s);var c=e.gcd(d);if(c.cmpn(1)!==0)return c;var l=d.toRed(n).redPow(h);if(l.cmp(a)===0||l.cmp(u)===0)continue;for(var p=1;p>8;var s=n&255;if(a)r.push(a,s);else r.push(s)}}return r}r.toArray=toArray;function zero2(e){if(e.length===1)return"0"+e;else return e}r.zero2=zero2;function toHex(e){var t="";for(var r=0;r=6?"utf-8":"binary"}else{t="utf-8"}e.exports=t},5349:function(e){var t=Math.pow(2,30)-1;e.exports=function(e,r){if(typeof e!=="number"){throw new TypeError("Iterations not a number")}if(e<0){throw new TypeError("Bad iterations")}if(typeof r!=="number"){throw new TypeError("Key length not a number")}if(r<0||r>t||r!==r){throw new TypeError("Bad key length")}}},2127:function(e,t,r){var i={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};var n=r(4873);var a=r(6911).Buffer;var s=r(5349);var o=r(7007);var h=r(5407);function pbkdf2(e,t,r,u,d){s(r,u);e=h(e,o,"Password");t=h(t,o,"Salt");d=d||"sha1";var c=a.allocUnsafe(u);var l=a.allocUnsafe(t.length+4);t.copy(l,0,0,t.length);var p=0;var v=i[d];var b=Math.ceil(u/v);for(var m=1;m<=b;m++){l.writeUInt32BE(m,t.length);var y=n(d,e).update(l).digest();var g=y;for(var _=1;_h||new s(t).cmp(a.modulus)>=0){throw new Error("decryption error")}var c;if(r){c=u(new s(t),a)}else{c=o(t,a)}var l=d.alloc(h-c.length);c=d.concat([l,c],h);if(n===4){return oaep(a,c)}else if(n===1){return pkcs1(a,c,r)}else if(n===3){return c}else{throw new Error("unknown padding")}};function oaep(e,t){var r=e.modulus.byteLength();var i=h("sha1").update(d.alloc(0)).digest();var s=i.length;if(t[0]!==0){throw new Error("decryption error")}var o=t.slice(1,s+1);var u=t.slice(s+1);var c=a(o,n(u,s));var l=a(u,n(c,r-s-1));if(compare(i,l.slice(0,s))){throw new Error("decryption error")}var p=s;while(l[p]===0){p++}if(l[p++]!==1){throw new Error("decryption error")}return l.slice(p)}function pkcs1(e,t,r){var i=t.slice(0,2);var n=2;var a=0;while(t[n++]!==0){if(n>=t.length){a++;break}}var s=t.slice(2,n-1);if(i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r){a++}if(s.length<8){a++}if(a){throw new Error("decryption error")}return t.slice(n)}function compare(e,t){e=d.from(e);t=d.from(t);var r=0;var i=e.length;if(e.length!==t.length){r++;i=Math.min(e.length,t.length)}var n=-1;while(++n=0){throw new Error("data too long for modulus")}}else{throw new Error("unknown padding")}if(r){return d(s,a)}else{return u(s,a)}};function oaep(e,t){var r=e.modulus.byteLength();var i=t.length;var u=a("sha1").update(c.alloc(0)).digest();var d=u.length;var l=2*d;if(i>r-l-2){throw new Error("message too long")}var p=c.alloc(r-i-l-2);var v=r-d-1;var b=n(d);var m=o(c.concat([u,p,c.alloc(1,1),t],v),s(b,v));var y=o(b,s(m,d));return new h(c.concat([c.alloc(1),y,m],r))}function pkcs1(e,t,r){var i=t.length;var n=e.modulus.byteLength();if(i>n-11){throw new Error("message too long")}var a;if(r){a=c.alloc(n-i-3,255)}else{a=nonZero(n-i-3)}return new h(c.concat([c.from([0,r?1:2]),a,c.alloc(1),t],n))}function nonZero(e){var t=c.allocUnsafe(e);var r=0;var i=n(e*2);var a=0;var s;while(rn)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(e);if(e>0){if(e>i){for(var o=0;oh||e<0){throw new TypeError("offset must be a uint32")}if(e>s||e>t){throw new RangeError("offset out of range")}}function assertSize(e,t,r){if(typeof e!=="number"||e!==e){throw new TypeError("size must be a number")}if(e>h||e<0){throw new TypeError("size must be a uint32")}if(e+t>r||e>s){throw new RangeError("buffer too small")}}if(o&&o.getRandomValues||!process.browser){t.randomFill=randomFill;t.randomFillSync=randomFillSync}else{t.randomFill=oldBrowser;t.randomFillSync=oldBrowser}function randomFill(e,t,r,i){if(!a.isBuffer(e)&&!(e instanceof global.Uint8Array)){throw new TypeError('"buf" argument must be a Buffer or Uint8Array')}if(typeof t==="function"){i=t;t=0;r=e.length}else if(typeof r==="function"){i=r;r=e.length-t}else if(typeof i!=="function"){throw new TypeError('"cb" argument must be a function')}assertOffset(t,e.length);assertSize(r,t,e.length);return actualFill(e,t,r,i)}function actualFill(e,t,r,i){if(process.browser){var a=e.buffer;var s=new Uint8Array(a,t,r);o.getRandomValues(s);if(i){process.nextTick((function(){i(null,e)}));return}return e}if(i){n(r,(function(r,n){if(r){return i(r)}n.copy(e,t);i(null,e)}));return}var h=n(r);h.copy(e,t);return e}function randomFillSync(e,t,r){if(typeof t==="undefined"){t=0}if(!a.isBuffer(e)&&!(e instanceof global.Uint8Array)){throw new TypeError('"buf" argument must be a Buffer or Uint8Array')}assertOffset(t,e.length);if(r===undefined)r=e.length-t;assertSize(r,t,e.length);return actualFill(e,t,r)}},4646:function(e){"use strict";const t={};function createErrorType(e,r,i){if(!i){i=Error}function getMessage(e,t,i){if(typeof r==="string"){return r}else{return r(e,t,i)}}class NodeError extends i{constructor(e,t,r){super(getMessage(e,t,r))}}NodeError.prototype.name=i.name;NodeError.prototype.code=e;t[e]=NodeError}function oneOf(e,t){if(Array.isArray(e)){const r=e.length;e=e.map((e=>String(e)));if(r>2){return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]}else if(r===2){return`one of ${t} ${e[0]} or ${e[1]}`}else{return`of ${t} ${e[0]}`}}else{return`of ${t} ${String(e)}`}}function startsWith(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function endsWith(e,t,r){if(r===undefined||r>e.length){r=e.length}return e.substring(r-t.length,r)===t}function includes(e,t,r){if(typeof r!=="number"){r=0}if(r+t.length>e.length){return false}else{return e.indexOf(t,r)!==-1}}createErrorType("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError);createErrorType("ERR_INVALID_ARG_TYPE",(function(e,t,r){let i;if(typeof t==="string"&&startsWith(t,"not ")){i="must not be";t=t.replace(/^not /,"")}else{i="must be"}let n;if(endsWith(e," argument")){n=`The ${e} ${i} ${oneOf(t,"type")}`}else{const r=includes(e,".")?"property":"argument";n=`The "${e}" ${r} ${i} ${oneOf(t,"type")}`}n+=`. Received type ${typeof r}`;return n}),TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"}));createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"}));createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");e.exports.q=t},2403:function(e,t,r){"use strict";var i=Object.keys||function(e){var t=[];for(var r in e){t.push(r)}return t};e.exports=Duplex;var n=r(1709);var a=r(7337);r(3782)(Duplex,n);{var s=i(a.prototype);for(var o=0;o0){if(typeof t!=="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==o.prototype){t=_uint8ArrayToBuffer(t)}if(i){if(a.endEmitted)E(e,new _);else addChunk(e,a,t,true)}else if(a.ended){E(e,new y)}else if(a.destroyed){return false}else{a.reading=false;if(a.decoder&&!r){t=a.decoder.write(t);if(a.objectMode||t.length!==0)addChunk(e,a,t,false);else maybeReadMore(e,a)}else{addChunk(e,a,t,false)}}}else if(!i){a.reading=false;maybeReadMore(e,a)}}return!a.ended&&(a.length=A){e=A}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){d("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){d("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var i=t.needReadable;d("need readable",i);if(t.length===0||t.length-e0)n=fromList(e,t);else n=null;if(n===null){t.needReadable=t.length<=t.highWaterMark;e=0}else{t.length-=e;t.awaitDrain=0}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(n!==null)this.emit("data",n);return n};function onEofChunk(e,t){d("onEofChunk");if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;if(t.sync){emitReadable(e)}else{t.needReadable=false;if(!t.emittedReadable){t.emittedReadable=true;emitReadable_(e)}}}function emitReadable(e){var t=e._readableState;d("emitReadable",t.needReadable,t.emittedReadable);t.needReadable=false;if(!t.emittedReadable){d("emitReadable",t.flowing);t.emittedReadable=true;process.nextTick(emitReadable_,e)}}function emitReadable_(e){var t=e._readableState;d("emitReadable_",t.destroyed,t.length,t.ended);if(!t.destroyed&&(t.length||t.ended)){e.emit("readable");t.emittedReadable=false}t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark;flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;process.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){while(!t.reading&&!t.ended&&(t.length1&&indexOf(i.pipes,e)!==-1)&&!h){d("false write response, pause",i.awaitDrain);i.awaitDrain++}r.pause()}}function onerror(t){d("onerror",t);unpipe();e.removeListener("error",onerror);if(a(e,"error")===0)E(e,t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){d("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){d("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!i.flowing){d("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function pipeOnDrainFunctionResult(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&a(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var i=t.pipes;var n=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var a=0;a0;if(i.flowing!==false)this.resume()}else if(e==="readable"){if(!i.endEmitted&&!i.readableListening){i.readableListening=i.needReadable=true;i.flowing=false;i.emittedReadable=false;d("on readable",i.length,i.reading);if(i.length){emitReadable(this)}else if(!i.reading){process.nextTick(nReadingNextTick,this)}}}return r};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);if(e==="readable"){process.nextTick(updateReadableListening,this)}return r};Readable.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===undefined){process.nextTick(updateReadableListening,this)}return t};function updateReadableListening(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0;if(t.resumeScheduled&&!t.paused){t.flowing=true}else if(e.listenerCount("data")>0){e.resume()}}function nReadingNextTick(e){d("readable nexttick read 0");e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;if(!e.flowing){d("resume");e.flowing=!e.readableListening;resume(this,e)}e.paused=false;return this};function resume(e,t){if(!t.resumeScheduled){t.resumeScheduled=true;process.nextTick(resume_,e,t)}}function resume_(e,t){d("resume",t.reading);if(!t.reading){e.read(0)}t.resumeScheduled=false;e.emit("resume");flow(e);if(t.flowing&&!t.reading)e.read(0)}Readable.prototype.pause=function(){d("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){d("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function flow(e){var t=e._readableState;d("flow",t.flowing);while(t.flowing&&e.read()!==null){}}Readable.prototype.wrap=function(e){var t=this;var r=this._readableState;var i=false;e.on("end",(function(){d("wrapped end");if(r.decoder&&!r.ended){var e=r.decoder.end();if(e&&e.length)t.push(e)}t.push(null)}));e.on("data",(function(n){d("wrapped data");if(r.decoder)n=r.decoder.write(n);if(r.objectMode&&(n===null||n===undefined))return;else if(!r.objectMode&&(!n||!n.length))return;var a=t.push(n);if(!a){i=true;e.pause()}}));for(var n in e){if(this[n]===undefined&&typeof e[n]==="function"){this[n]=function methodWrap(t){return function methodWrapReturnFunction(){return e[t].apply(e,arguments)}}(n)}}for(var a=0;a=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=t.buffer.consume(e,t.decoder)}return r}function endReadable(e){var t=e._readableState;d("endReadable",t.endEmitted);if(!t.endEmitted){t.ended=true;process.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){d("endReadableNT",e.endEmitted,e.length);if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end");if(e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished){t.destroy()}}}}if(typeof Symbol==="function"){Readable.from=function(e,t){if(B===undefined){B=r(9727)}return B(Readable,e,t)}}function indexOf(e,t){for(var r=0,i=e.length;r-1))throw new _(e);this._writableState.defaultEncoding=e;return this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=s.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,i,n,a){if(!r){var s=decodeChunk(t,i,n);if(i!==s){r=true;n="buffer";i=s}}var o=t.objectMode?1:i.length;t.length+=o;var h=t.length0)this.tail.next=t;else this.head=t;this.tail=t;++this.length}},{key:"unshift",value:function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length}},{key:"shift",value:function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0}},{key:"join",value:function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r}},{key:"concat",value:function concat(e){if(this.length===0)return n.alloc(0);var t=n.allocUnsafe(e>>>0);var r=this.head;var i=0;while(r){copyBuffer(r.data,t,i);i+=r.data.length;r=r.next}return t}},{key:"consume",value:function consume(e,t){var r;if(en.length?n.length:e;if(a===n.length)i+=n;else i+=n.slice(0,e);e-=a;if(e===0){if(a===n.length){++r;if(t.next)this.head=t.next;else this.head=this.tail=null}else{this.head=t;t.data=n.slice(a)}break}++r}this.length-=r;return i}},{key:"_getBuffer",value:function _getBuffer(e){var t=n.allocUnsafe(e);var r=this.head;var i=1;r.data.copy(t);e-=r.data.length;while(r=r.next){var a=r.data;var s=e>a.length?a.length:e;a.copy(t,t.length-e,0,s);e-=s;if(e===0){if(s===a.length){++i;if(r.next)this.head=r.next;else this.head=this.tail=null}else{this.head=r;r.data=a.slice(s)}break}++i}this.length-=i;return t}},{key:o,value:function value(e,t){return s(this,_objectSpread({},t,{depth:0,customInspect:false}))}}]);return BufferList}()},7025:function(e){"use strict";function destroy(e,t){var r=this;var i=this._readableState&&this._readableState.destroyed;var n=this._writableState&&this._writableState.destroyed;if(i||n){if(t){t(e)}else if(e){if(!this._writableState){process.nextTick(emitErrorNT,this,e)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,e)}}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,(function(e){if(!t&&e){if(!r._writableState){process.nextTick(emitErrorAndCloseNT,r,e)}else if(!r._writableState.errorEmitted){r._writableState.errorEmitted=true;process.nextTick(emitErrorAndCloseNT,r,e)}else{process.nextTick(emitCloseNT,r)}}else if(t){process.nextTick(emitCloseNT,r);t(e)}else{process.nextTick(emitCloseNT,r)}}));return this}function emitErrorAndCloseNT(e,t){emitErrorNT(e,t);emitCloseNT(e)}function emitCloseNT(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,t){e.emit("error",t)}function errorOrDestroy(e,t){var r=e._readableState;var i=e._writableState;if(r&&r.autoDestroy||i&&i.autoDestroy)e.destroy(t);else e.emit("error",t)}e.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}},9698:function(e,t,r){"use strict";var i=r(4646).q.ERR_STREAM_PREMATURE_CLOSE;function once(e){var t=false;return function(){if(t)return;t=true;for(var r=arguments.length,i=new Array(r),n=0;n0;return destroyer(e,a,o,(function(e){if(!n)n=e;if(e)s.forEach(call);if(a)return;s.forEach(call);i(n)}))}));return t.reduce(pipe)}e.exports=pipeline},6776:function(e,t,r){"use strict";var i=r(4646).q.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function getHighWaterMark(e,t,r,n){var a=highWaterMarkFrom(t,n,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var s=n?r:"highWaterMark";throw new i(s,a)}return Math.floor(a)}return e.objectMode?16:16*1024}e.exports={getHighWaterMark:getHighWaterMark}},4678:function(e,t,r){e.exports=r(2781)},3726:function(e,t,r){var i=r(2781);if(process.env.READABLE_STREAM==="disable"&&i){e.exports=i.Readable;Object.assign(e.exports,i);e.exports.Stream=i}else{t=e.exports=r(1709);t.Stream=i||t;t.Readable=t;t.Writable=r(7337);t.Duplex=r(2403);t.Transform=r(1170);t.PassThrough=r(7889);t.finished=r(9698);t.pipeline=r(8442)}},3225:function(e,t,r){"use strict";var i=r(4300).Buffer;var n=r(3782);var a=r(9029);var s=new Array(16);var o=[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];var h=[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];var u=[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];var d=[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];var c=[0,1518500249,1859775393,2400959708,2840853838];var l=[1352829926,1548603684,1836072691,2053994217,0];function RIPEMD160(){a.call(this,64);this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520}n(RIPEMD160,a);RIPEMD160.prototype._update=function(){var e=s;for(var t=0;t<16;++t)e[t]=this._block.readInt32LE(t*4);var r=this._a|0;var i=this._b|0;var n=this._c|0;var a=this._d|0;var p=this._e|0;var v=this._a|0;var b=this._b|0;var m=this._c|0;var y=this._d|0;var g=this._e|0;for(var _=0;_<80;_+=1){var w;var M;if(_<16){w=fn1(r,i,n,a,p,e[o[_]],c[0],u[_]);M=fn5(v,b,m,y,g,e[h[_]],l[0],d[_])}else if(_<32){w=fn2(r,i,n,a,p,e[o[_]],c[1],u[_]);M=fn4(v,b,m,y,g,e[h[_]],l[1],d[_])}else if(_<48){w=fn3(r,i,n,a,p,e[o[_]],c[2],u[_]);M=fn3(v,b,m,y,g,e[h[_]],l[2],d[_])}else if(_<64){w=fn4(r,i,n,a,p,e[o[_]],c[3],u[_]);M=fn2(v,b,m,y,g,e[h[_]],l[3],d[_])}else{w=fn5(r,i,n,a,p,e[o[_]],c[4],u[_]);M=fn1(v,b,m,y,g,e[h[_]],l[4],d[_])}r=p;p=a;a=rotl(n,10);n=i;i=w;v=g;g=y;y=rotl(m,10);m=b;b=M}var B=this._b+n+y|0;this._b=this._c+a+g|0;this._c=this._d+p+v|0;this._d=this._e+r+b|0;this._e=this._a+i+m|0;this._a=B};RIPEMD160.prototype._digest=function(){this._block[this._blockOffset++]=128;if(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 e=i.alloc?i.alloc(20):new i(20);e.writeInt32LE(this._a,0);e.writeInt32LE(this._b,4);e.writeInt32LE(this._c,8);e.writeInt32LE(this._d,12);e.writeInt32LE(this._e,16);return e};function rotl(e,t){return e<>>32-t}function fn1(e,t,r,i,n,a,s,o){return rotl(e+(t^r^i)+a+s|0,o)+n|0}function fn2(e,t,r,i,n,a,s,o){return rotl(e+(t&r|~t&i)+a+s|0,o)+n|0}function fn3(e,t,r,i,n,a,s,o){return rotl(e+((t|~r)^i)+a+s|0,o)+n|0}function fn4(e,t,r,i,n,a,s,o){return rotl(e+(t&i|r&~i)+a+s|0,o)+n|0}function fn5(e,t,r,i,n,a,s,o){return rotl(e+(t^(r|~i))+a+s|0,o)+n|0}e.exports=RIPEMD160},5055:function(e,t,r){var i=r(4300);var n=i.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=i}else{copyProps(i,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return n(e,t,r)}SafeBuffer.prototype=Object.create(n.prototype);copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var i=n(e);if(t!==undefined){if(typeof r==="string"){i.fill(t,r)}else{i.fill(t)}}else{i.fill(0)}return i};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i.SlowBuffer(e)}},6911:function(e,t,r){ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ var i=r(4300);var n=i.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=i}else{copyProps(i,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return n(e,t,r)}SafeBuffer.prototype=Object.create(n.prototype);copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var i=n(e);if(t!==undefined){if(typeof r==="string"){i.fill(t,r)}else{i.fill(t)}}else{i.fill(0)}return i};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i.SlowBuffer(e)}},2858:function(e,t,r){var i=r(6911).Buffer;function Hash(e,t){this._block=i.alloc(e);this._finalSize=t;this._blockSize=e;this._len=0}Hash.prototype.update=function(e,t){if(typeof e==="string"){t=t||"utf8";e=i.from(e,t)}var r=this._block;var n=this._blockSize;var a=e.length;var s=this._len;for(var o=0;o=this._finalSize){this._update(this._block);this._block.fill(0)}var r=this._len*8;if(r<=4294967295){this._block.writeUInt32BE(r,this._blockSize-4)}else{var i=(r&4294967295)>>>0;var n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8);this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a};Hash.prototype._update=function(){throw new Error("_update must be implemented by subclass")};e.exports=Hash},4371:function(e,t,r){var i=e.exports=function SHA(e){e=e.toLowerCase();var t=i[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};i.sha=r(4018);i.sha1=r(4179);i.sha224=r(532);i.sha256=r(1843);i.sha384=r(7455);i.sha512=r(9934)},4018:function(e,t,r){var i=r(3782);var n=r(2858);var a=r(6911).Buffer;var s=[1518500249,1859775393,2400959708|0,3395469782|0];var o=new Array(80);function Sha(){this.init();this._w=o;n.call(this,64,56)}i(Sha,n);Sha.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function rotl5(e){return e<<5|e>>>27}function rotl30(e){return e<<30|e>>>2}function ft(e,t,r,i){if(e===0)return t&r|~t&i;if(e===2)return t&r|t&i|r&i;return t^r^i}Sha.prototype._update=function(e){var t=this._w;var r=this._a|0;var i=this._b|0;var n=this._c|0;var a=this._d|0;var o=this._e|0;for(var h=0;h<16;++h)t[h]=e.readInt32BE(h*4);for(;h<80;++h)t[h]=t[h-3]^t[h-8]^t[h-14]^t[h-16];for(var u=0;u<80;++u){var d=~~(u/20);var c=rotl5(r)+ft(d,i,n,a)+o+t[u]+s[d]|0;o=a;a=n;n=rotl30(i);i=r;r=c}this._a=r+this._a|0;this._b=i+this._b|0;this._c=n+this._c|0;this._d=a+this._d|0;this._e=o+this._e|0};Sha.prototype._hash=function(){var e=a.allocUnsafe(20);e.writeInt32BE(this._a|0,0);e.writeInt32BE(this._b|0,4);e.writeInt32BE(this._c|0,8);e.writeInt32BE(this._d|0,12);e.writeInt32BE(this._e|0,16);return e};e.exports=Sha},4179:function(e,t,r){var i=r(3782);var n=r(2858);var a=r(6911).Buffer;var s=[1518500249,1859775393,2400959708|0,3395469782|0];var o=new Array(80);function Sha1(){this.init();this._w=o;n.call(this,64,56)}i(Sha1,n);Sha1.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};function rotl1(e){return e<<1|e>>>31}function rotl5(e){return e<<5|e>>>27}function rotl30(e){return e<<30|e>>>2}function ft(e,t,r,i){if(e===0)return t&r|~t&i;if(e===2)return t&r|t&i|r&i;return t^r^i}Sha1.prototype._update=function(e){var t=this._w;var r=this._a|0;var i=this._b|0;var n=this._c|0;var a=this._d|0;var o=this._e|0;for(var h=0;h<16;++h)t[h]=e.readInt32BE(h*4);for(;h<80;++h)t[h]=rotl1(t[h-3]^t[h-8]^t[h-14]^t[h-16]);for(var u=0;u<80;++u){var d=~~(u/20);var c=rotl5(r)+ft(d,i,n,a)+o+t[u]+s[d]|0;o=a;a=n;n=rotl30(i);i=r;r=c}this._a=r+this._a|0;this._b=i+this._b|0;this._c=n+this._c|0;this._d=a+this._d|0;this._e=o+this._e|0};Sha1.prototype._hash=function(){var e=a.allocUnsafe(20);e.writeInt32BE(this._a|0,0);e.writeInt32BE(this._b|0,4);e.writeInt32BE(this._c|0,8);e.writeInt32BE(this._d|0,12);e.writeInt32BE(this._e|0,16);return e};e.exports=Sha1},532:function(e,t,r){var i=r(3782);var n=r(1843);var a=r(2858);var s=r(6911).Buffer;var o=new Array(64);function Sha224(){this.init();this._w=o;a.call(this,64,56)}i(Sha224,n);Sha224.prototype.init=function(){this._a=3238371032;this._b=914150663;this._c=812702999;this._d=4144912697;this._e=4290775857;this._f=1750603025;this._g=1694076839;this._h=3204075428;return this};Sha224.prototype._hash=function(){var e=s.allocUnsafe(28);e.writeInt32BE(this._a,0);e.writeInt32BE(this._b,4);e.writeInt32BE(this._c,8);e.writeInt32BE(this._d,12);e.writeInt32BE(this._e,16);e.writeInt32BE(this._f,20);e.writeInt32BE(this._g,24);return e};e.exports=Sha224},1843:function(e,t,r){var i=r(3782);var n=r(2858);var a=r(6911).Buffer;var 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];var o=new Array(64);function Sha256(){this.init();this._w=o;n.call(this,64,56)}i(Sha256,n);Sha256.prototype.init=function(){this._a=1779033703;this._b=3144134277;this._c=1013904242;this._d=2773480762;this._e=1359893119;this._f=2600822924;this._g=528734635;this._h=1541459225;return this};function ch(e,t,r){return r^e&(t^r)}function maj(e,t,r){return e&t|r&(e|t)}function sigma0(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function sigma1(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function gamma0(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function gamma1(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Sha256.prototype._update=function(e){var t=this._w;var r=this._a|0;var i=this._b|0;var n=this._c|0;var a=this._d|0;var o=this._e|0;var h=this._f|0;var u=this._g|0;var d=this._h|0;for(var c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<64;++c)t[c]=gamma1(t[c-2])+t[c-7]+gamma0(t[c-15])+t[c-16]|0;for(var l=0;l<64;++l){var p=d+sigma1(o)+ch(o,h,u)+s[l]+t[l]|0;var v=sigma0(r)+maj(r,i,n)|0;d=u;u=h;h=o;o=a+p|0;a=n;n=i;i=r;r=p+v|0}this._a=r+this._a|0;this._b=i+this._b|0;this._c=n+this._c|0;this._d=a+this._d|0;this._e=o+this._e|0;this._f=h+this._f|0;this._g=u+this._g|0;this._h=d+this._h|0};Sha256.prototype._hash=function(){var e=a.allocUnsafe(32);e.writeInt32BE(this._a,0);e.writeInt32BE(this._b,4);e.writeInt32BE(this._c,8);e.writeInt32BE(this._d,12);e.writeInt32BE(this._e,16);e.writeInt32BE(this._f,20);e.writeInt32BE(this._g,24);e.writeInt32BE(this._h,28);return e};e.exports=Sha256},7455:function(e,t,r){var i=r(3782);var n=r(9934);var a=r(2858);var s=r(6911).Buffer;var o=new Array(160);function Sha384(){this.init();this._w=o;a.call(this,128,112)}i(Sha384,n);Sha384.prototype.init=function(){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;return this};Sha384.prototype._hash=function(){var e=s.allocUnsafe(48);function writeInt64BE(t,r,i){e.writeInt32BE(t,i);e.writeInt32BE(r,i+4)}writeInt64BE(this._ah,this._al,0);writeInt64BE(this._bh,this._bl,8);writeInt64BE(this._ch,this._cl,16);writeInt64BE(this._dh,this._dl,24);writeInt64BE(this._eh,this._el,32);writeInt64BE(this._fh,this._fl,40);return e};e.exports=Sha384},9934:function(e,t,r){var i=r(3782);var n=r(2858);var a=r(6911).Buffer;var 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];var o=new Array(160);function Sha512(){this.init();this._w=o;n.call(this,128,112)}i(Sha512,n);Sha512.prototype.init=function(){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;return this};function Ch(e,t,r){return r^e&(t^r)}function maj(e,t,r){return e&t|r&(e|t)}function sigma0(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function sigma1(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function Gamma0(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function Gamma0l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function Gamma1(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function Gamma1l(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function getCarry(e,t){return e>>>0>>0?1:0}Sha512.prototype._update=function(e){var t=this._w;var r=this._ah|0;var i=this._bh|0;var n=this._ch|0;var a=this._dh|0;var o=this._eh|0;var h=this._fh|0;var u=this._gh|0;var d=this._hh|0;var c=this._al|0;var l=this._bl|0;var p=this._cl|0;var v=this._dl|0;var b=this._el|0;var m=this._fl|0;var y=this._gl|0;var g=this._hl|0;for(var _=0;_<32;_+=2){t[_]=e.readInt32BE(_*4);t[_+1]=e.readInt32BE(_*4+4)}for(;_<160;_+=2){var w=t[_-15*2];var M=t[_-15*2+1];var B=Gamma0(w,M);var E=Gamma0l(M,w);w=t[_-2*2];M=t[_-2*2+1];var k=Gamma1(w,M);var A=Gamma1l(M,w);var N=t[_-7*2];var P=t[_-7*2+1];var x=t[_-16*2];var I=t[_-16*2+1];var C=E+P|0;var D=B+N+getCarry(C,E)|0;C=C+A|0;D=D+k+getCarry(C,A)|0;C=C+I|0;D=D+x+getCarry(C,I)|0;t[_]=D;t[_+1]=C}for(var T=0;T<160;T+=2){D=t[T];C=t[T+1];var j=maj(r,i,n);var q=maj(c,l,p);var O=sigma0(r,c);var H=sigma0(c,r);var L=sigma1(o,b);var z=sigma1(b,o);var F=s[T];var U=s[T+1];var W=Ch(o,h,u);var V=Ch(b,m,y);var G=g+z|0;var J=d+L+getCarry(G,g)|0;G=G+V|0;J=J+W+getCarry(G,V)|0;G=G+U|0;J=J+F+getCarry(G,U)|0;G=G+C|0;J=J+D+getCarry(G,C)|0;var Z=H+q|0;var X=O+j+getCarry(Z,H)|0;d=u;g=y;u=h;y=m;h=o;m=b;b=v+G|0;o=a+J+getCarry(b,v)|0;a=n;v=p;n=i;p=l;i=r;l=c;c=G+Z|0;r=J+X+getCarry(c,G)|0}this._al=this._al+c|0;this._bl=this._bl+l|0;this._cl=this._cl+p|0;this._dl=this._dl+v|0;this._el=this._el+b|0;this._fl=this._fl+m|0;this._gl=this._gl+y|0;this._hl=this._hl+g|0;this._ah=this._ah+r+getCarry(this._al,c)|0;this._bh=this._bh+i+getCarry(this._bl,l)|0;this._ch=this._ch+n+getCarry(this._cl,p)|0;this._dh=this._dh+a+getCarry(this._dl,v)|0;this._eh=this._eh+o+getCarry(this._el,b)|0;this._fh=this._fh+h+getCarry(this._fl,m)|0;this._gh=this._gh+u+getCarry(this._gl,y)|0;this._hh=this._hh+d+getCarry(this._hl,g)|0};Sha512.prototype._hash=function(){var e=a.allocUnsafe(64);function writeInt64BE(t,r,i){e.writeInt32BE(t,i);e.writeInt32BE(r,i+4)}writeInt64BE(this._ah,this._al,0);writeInt64BE(this._bh,this._bl,8);writeInt64BE(this._ch,this._cl,16);writeInt64BE(this._dh,this._dl,24);writeInt64BE(this._eh,this._el,32);writeInt64BE(this._fh,this._fl,40);writeInt64BE(this._gh,this._gl,48);writeInt64BE(this._hh,this._hl,56);return e};e.exports=Sha512},3704:function(e,t,r){"use strict";var i=r(5055).Buffer;var n=i.isEncoding||function(e){e=""+e;switch(e&&e.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 true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var t;while(true){switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(i.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}t.s=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=i.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var r;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var i=t.length-1;if(i=0){if(n>0)e.lastNeed=n-1;return n}if(--i=0){if(n>0)e.lastNeed=n-2;return n}if(--i=0){if(n>0){if(n===2)n=0;else e.lastNeed=n-3}return n}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,i);return e.toString("utf8",t,i)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},6769:function(e){e.exports=deprecate;function deprecate(e,t){if(config("noDeprecation")){return e}var r=false;function deprecated(){if(!r){if(config("throwDeprecation")){throw new Error(t)}else if(config("traceDeprecation")){console.trace(t)}else{console.warn(t)}r=true}return e.apply(this,arguments)}return deprecated}function config(e){try{if(!global.localStorage)return false}catch(e){return false}var t=global.localStorage[e];if(null==t)return false;return String(t).toLowerCase()==="true"}},4300:function(e){"use strict";e.exports=require("buffer")},6113:function(e){"use strict";e.exports=require("crypto")},2361:function(e){"use strict";e.exports=require("events")},2781:function(e){"use strict";e.exports=require("stream")},1576:function(e){"use strict";e.exports=require("string_decoder")},3837:function(e){"use strict";e.exports=require("util")},6144:function(e){"use strict";e.exports=require("vm")},5866:function(e){"use strict";e.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"}}')},2908:function(e){"use strict";e.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"}}')},9267:function(e){"use strict";e.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"}')},7992:function(e){"use strict";e.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"}}')},2531:function(e){"use strict";e.exports={i8:"6.5.3"}},2510:function(e){"use strict";e.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"}')}};var t={};function __nccwpck_require__(r){var i=t[r];if(i!==undefined){return i.exports}var n=t[r]={id:r,loaded:false,exports:{}};var a=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);a=false}finally{if(a)delete t[r]}n.loaded=true;return n.exports}!function(){__nccwpck_require__.nmd=function(e){e.paths=[];if(!e.children)e.children=[];return e}}();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};!function(){"use strict";var e=r;e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=__nccwpck_require__(7223);e.createHash=e.Hash=__nccwpck_require__(9739);e.createHmac=e.Hmac=__nccwpck_require__(4873);var t=__nccwpck_require__(9276);var i=Object.keys(t);var n=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return n};var a=__nccwpck_require__(4978);e.pbkdf2=a.pbkdf2;e.pbkdf2Sync=a.pbkdf2Sync;var s=__nccwpck_require__(8996);e.Cipher=s.Cipher;e.createCipher=s.createCipher;e.Cipheriv=s.Cipheriv;e.createCipheriv=s.createCipheriv;e.Decipher=s.Decipher;e.createDecipher=s.createDecipher;e.Decipheriv=s.Decipheriv;e.createDecipheriv=s.createDecipheriv;e.getCiphers=s.getCiphers;e.listCiphers=s.listCiphers;var o=__nccwpck_require__(6587);e.DiffieHellmanGroup=o.DiffieHellmanGroup;e.createDiffieHellmanGroup=o.createDiffieHellmanGroup;e.getDiffieHellman=o.getDiffieHellman;e.createDiffieHellman=o.createDiffieHellman;e.DiffieHellman=o.DiffieHellman;var h=__nccwpck_require__(4078);e.createSign=h.createSign;e.Sign=h.Sign;e.createVerify=h.createVerify;e.Verify=h.Verify;e.createECDH=__nccwpck_require__(9942);var u=__nccwpck_require__(9783);e.publicEncrypt=u.publicEncrypt;e.privateEncrypt=u.privateEncrypt;e.publicDecrypt=u.publicDecrypt;e.privateDecrypt=u.privateDecrypt;var d=__nccwpck_require__(6445);e.randomFill=d.randomFill;e.randomFillSync=d.randomFillSync;e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))};e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}();module.exports=r})();