mubot-server
Version:
A server for mubot
2 lines • 453 kB
JavaScript
(function e(t,r,i){function n(s,f){if(!r[s]){if(!t[s]){var o=typeof require=="function"&&require;if(!f&&o)return o(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[s]={exports:{}};t[s][0].call(u.exports,function(e){var r=t[s][1][e];return n(r?r:e)},u,u.exports,e,t,r,i)}return r[s].exports}var a=typeof require=="function"&&require;for(var s=0;s<i.length;s++)n(i[s]);return n})({1:[function(e,t,r){var i=r;i.bignum=e("bn.js");i.define=e("./asn1/api").define;i.base=e("./asn1/base");i.constants=e("./asn1/constants");i.decoders=e("./asn1/decoders");i.encoders=e("./asn1/encoders")},{"./asn1/api":2,"./asn1/base":4,"./asn1/constants":8,"./asn1/decoders":10,"./asn1/encoders":13,"bn.js":16}],2:[function(e,t,r){var i=e("../asn1");var n=e("inherits");var a=r;a.define=function s(e,t){return new f(e,t)};function f(e,t){this.name=e;this.body=t;this.decoders={};this.encoders={}}f.prototype._createNamed=function o(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n"+" this._initNamed(entity);\n"+"})")}catch(i){r=function(e){this._initNamed(e)}}n(r,t);r.prototype._initNamed=function a(e){t.call(this,e)};return new r(this)};f.prototype._getDecoder=function c(e){e=e||"der";if(!this.decoders.hasOwnProperty(e))this.decoders[e]=this._createNamed(i.decoders[e]);return this.decoders[e]};f.prototype.decode=function u(e,t,r){return this._getDecoder(t).decode(e,r)};f.prototype._getEncoder=function h(e){e=e||"der";if(!this.encoders.hasOwnProperty(e))this.encoders[e]=this._createNamed(i.encoders[e]);return this.encoders[e]};f.prototype.encode=function l(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":1,inherits:99,vm:151}],3:[function(e,t,r){var i=e("inherits");var n=e("../base").Reporter;var a=e("buffer").Buffer;function s(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(s,n);r.DecoderBuffer=s;s.prototype.save=function f(){return{offset:this.offset,reporter:n.prototype.save.call(this)}};s.prototype.restore=function o(e){var t=new s(this.base);t.offset=e.offset;t.length=this.offset;this.offset=e.offset;n.prototype.restore.call(this,e.reporter);return t};s.prototype.isEmpty=function c(){return this.offset===this.length};s.prototype.readUInt8=function u(e){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,true);else return this.error(e||"DecoderBuffer overrun")};s.prototype.skip=function h(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new s(this.base);r._reporterState=this._reporterState;r.offset=this.offset;r.length=this.offset+e;this.offset+=e;return r};s.prototype.raw=function l(e){return this.base.slice(e?e.offset:this.offset,this.length)};function d(e,t){if(Array.isArray(e)){this.length=0;this.value=e.map(function(e){if(!(e instanceof d))e=new d(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)}}r.EncoderBuffer=d;d.prototype.join=function p(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}},{"../base":4,buffer:45,inherits:99}],4:[function(e,t,r){var i=r;i.Reporter=e("./reporter").Reporter;i.DecoderBuffer=e("./buffer").DecoderBuffer;i.EncoderBuffer=e("./buffer").EncoderBuffer;i.Node=e("./node")},{"./buffer":3,"./node":5,"./reporter":6}],5:[function(e,t,r){var i=e("../base").Reporter;var n=e("../base").EncoderBuffer;var a=e("../base").DecoderBuffer;var s=e("minimalistic-assert");var f=["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 o=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(f);var c=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function u(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()}}t.exports=u;var h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function l(){var e=this._baseState;var t={};h.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);r._baseState=t;return r};u.prototype._wrap=function d(){var e=this._baseState;o.forEach(function(t){this[t]=function r(){var r=new this.constructor(this);e.children.push(r);return r[t].apply(r,arguments)}},this)};u.prototype._init=function p(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")};u.prototype._useArgs=function v(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})}};c.forEach(function(e){u.prototype[e]=function t(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}});f.forEach(function(e){u.prototype[e]=function t(){var t=this._baseState;var r=Array.prototype.slice.call(arguments);s(t.tag===null);t.tag=e;this._useArgs(r);return this}});u.prototype.use=function b(e){s(e);var t=this._baseState;s(t.use===null);t.use=e;return this};u.prototype.optional=function y(){var e=this._baseState;e.optional=true;return this};u.prototype.def=function m(e){var t=this._baseState;s(t["default"]===null);t["default"]=e;t.optional=true;return this};u.prototype.explicit=function _(e){var t=this._baseState;s(t.explicit===null&&t.implicit===null);t.explicit=e;return this};u.prototype.implicit=function g(e){var t=this._baseState;s(t.explicit===null&&t.implicit===null);t.implicit=e;return this};u.prototype.obj=function w(){var e=this._baseState;var t=Array.prototype.slice.call(arguments);e.obj=true;if(t.length!==0)this._useArgs(t);return this};u.prototype.key=function E(e){var t=this._baseState;s(t.key===null);t.key=e;return this};u.prototype.any=function S(){var e=this._baseState;e.any=true;return this};u.prototype.choice=function k(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};u.prototype.contains=function A(e){var t=this._baseState;s(t.use===null);t.contains=e;return this};u.prototype._decode=function M(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 f=null;if(r.explicit!==null)f=r.explicit;else if(r.implicit!==null)f=r.implicit;else if(r.tag!==null)f=r.tag;if(f===null&&!r.any){var o=e.save();try{if(r.choice===null)this._decodeGeneric(r.tag,e,t);else this._decodeChoice(e,t);n=true}catch(c){n=false}e.restore(o)}else{n=this._peekTag(e,f,r.any);if(e.isError(n))return n}}var u;if(r.obj&&n)u=e.enterObject();if(n){if(r.explicit!==null){var h=this._decodeTag(e,r.explicit);if(e.isError(h))return h;e=h}var l=e.offset;if(r.use===null&&r.choice===null){if(r.any)var o=e.save();var d=this._decodeTag(e,r.implicit!==null?r.implicit:r.tag,r.any);if(e.isError(d))return d;if(r.any)i=e.raw(o);else e=d}if(t&&t.track&&r.tag!==null)t.track(e.path(),l,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 p(r){r._decode(e,t)})}if(r.contains&&(r.tag==="octstr"||r.tag==="bitstr")){var v=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(v,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};u.prototype._decodeGeneric=function I(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)}};u.prototype._getUse=function C(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};u.prototype._decodeChoice=function j(e,t){var r=this._baseState;var i=null;var n=false;Object.keys(r.choice).some(function(a){var s=e.save();var f=r.choice[a];try{var o=f._decode(e,t);if(e.isError(o))return false;i={type:a,value:o};n=true}catch(c){e.restore(s);return false}return true},this);if(!n)return e.error("Choice not matched");return i};u.prototype._createEncoderBuffer=function x(e){return new n(e,this.reporter)};u.prototype._encode=function T(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};u.prototype._encodeValue=function T(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 f=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);f=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 o=this.clone();o._baseState.implicit=null;s=this._createEncoderBuffer(e.map(function(r){var i=this._baseState;return this._getUse(i.args[0],e)._encode(r,t)},o))}else if(n.use!==null){a=this._getUse(n.use,r)._encode(e,t)}else{s=this._encodePrimitive(n.tag,e);f=true}}var a;if(!n.any&&n.choice===null){var c=n.implicit!==null?n.implicit:n.tag;var u=n.implicit===null?"universal":"context";if(c===null){if(n.use===null)t.error("Tag could be ommited only for .use()")}else{if(n.use===null)a=this._encodeComposite(c,f,u,s)}}if(n.explicit!==null)a=this._encodeComposite(n.explicit,false,"context",a);return a};u.prototype._encodeChoice=function B(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)};u.prototype._encodePrimitive=function P(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)};u.prototype._isNumstr=function R(e){return/^[0-9 ]*$/.test(e)};u.prototype._isPrintstr=function L(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":4,"minimalistic-assert":103}],6:[function(e,t,r){var i=e("inherits");function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}r.Reporter=n;n.prototype.isError=function a(e){return e instanceof b};n.prototype.save=function s(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};n.prototype.restore=function f(e){var t=this._reporterState;t.obj=e.obj;t.path=t.path.slice(0,e.pathLen)};n.prototype.enterKey=function o(e){return this._reporterState.path.push(e)};n.prototype.exitKey=function c(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)};n.prototype.leaveKey=function u(e,t,r){var i=this._reporterState;this.exitKey(e);if(i.obj!==null)i.obj[t]=r};n.prototype.path=function h(){return this._reporterState.path.join("/")};n.prototype.enterObject=function l(){var e=this._reporterState;var t=e.obj;e.obj={};return t};n.prototype.leaveObject=function d(e){var t=this._reporterState;var r=t.obj;t.obj=e;return r};n.prototype.error=function p(e){var t;var r=this._reporterState;var i=e instanceof b;if(i){t=e}else{t=new b(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};n.prototype.wrapResult=function v(e){var t=this._reporterState;if(!t.options.partial)return e;return{result:this.isError(e)?null:e,errors:t.errors}};function b(e,t){this.path=e;this.rethrow(t)}i(b,Error);b.prototype.rethrow=function y(e){this.message=e+" at: "+(this.path||"(shallow)");if(Error.captureStackTrace)Error.captureStackTrace(this,b);if(!this.stack){try{throw new Error(this.message)}catch(t){this.stack=t.stack}}return this}},{inherits:99}],7:[function(e,t,r){var i=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"};r.tagClassByName=i._reverse(r.tagClass);r.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"};r.tagByName=i._reverse(r.tag)},{"../constants":8}],8:[function(e,t,r){var i=r;i._reverse=function n(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=e("./der")},{"./der":7}],9:[function(e,t,r){var i=e("inherits");var n=e("../../asn1");var a=n.base;var s=n.bignum;var f=n.constants.der;function o(e){this.enc="der";this.name=e.name;this.entity=e;this.tree=new u;this.tree._init(e.body)}t.exports=o;o.prototype.decode=function c(e,t){if(!(e instanceof a.DecoderBuffer))e=new a.DecoderBuffer(e,t);return this.tree._decode(e,t)};function u(e){a.Node.call(this,"der",e)}i(u,a.Node);u.prototype._peekTag=function h(e,t,r){if(e.isEmpty())return false;var i=e.save();var n=E(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};u.prototype._decodeTag=function l(e,t,r){var i=E(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;var n=S(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+'"')};u.prototype._skipUntilEnd=function d(e,t){while(true){var r=E(e,t);if(e.isError(r))return r;var i=S(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}};u.prototype._decodeList=function p(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};u.prototype._decodeStr=function v(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<i.length/2;a++){n+=String.fromCharCode(i.readUInt16BE(a*2))}return n}else if(t==="numstr"){var s=e.raw().toString("ascii");if(!this._isNumstr(s)){return e.error("Decoding of string type: "+"numstr unsupported characters")}return s}else if(t==="octstr"){return e.raw()}else if(t==="objDesc"){return e.raw()}else if(t==="printstr"){var f=e.raw().toString("ascii");if(!this._isPrintstr(f)){return e.error("Decoding of string type: "+"printstr unsupported characters")}return f}else if(/str$/.test(t)){return e.raw().toString()}else{return e.error("Decoding of string type: "+t+" unsupported")}};u.prototype._decodeObjid=function b(e,t,r){var i;var n=[];var a=0;while(!e.isEmpty()){var s=e.readUInt8();a<<=7;a|=s&127;if((s&128)===0){n.push(a);a=0}}if(s&128)n.push(a);var f=n[0]/40|0;var o=n[0]%40;if(r)i=n;else i=[f,o].concat(n.slice(1));if(t){var c=t[i.join(" ")];if(c===undefined)c=t[i.join(".")];if(c!==undefined)i=c}return i};u.prototype._decodeTime=function y(e,t){var r=e.raw().toString();if(t==="gentime"){var i=r.slice(0,4)|0;var n=r.slice(4,6)|0;var a=r.slice(6,8)|0;var s=r.slice(8,10)|0;var f=r.slice(10,12)|0;var o=r.slice(12,14)|0}else if(t==="utctime"){var i=r.slice(0,2)|0;var n=r.slice(2,4)|0;var a=r.slice(4,6)|0;var s=r.slice(6,8)|0;var f=r.slice(8,10)|0;var o=r.slice(10,12)|0;if(i<70)i=2e3+i;else i=1900+i}else{return e.error("Decoding "+t+" time is not supported yet")}return Date.UTC(i,n-1,a,s,f,o,0)};u.prototype._decodeNull=function m(e){return null};u.prototype._decodeBool=function _(e){var t=e.readUInt8();if(e.isError(t))return t;else return t!==0};u.prototype._decodeInt=function g(e,t){var r=e.raw();var i=new s(r);if(t)i=t[i.toString(10)]||i;return i};u.prototype._use=function w(e,t){if(typeof e==="function")e=e(t);return e._getDecoder("der").tree};function E(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=f.tagClass[r>>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=f.tag[r];return{cls:i,primitive:n,tag:r,tagStr:s}}function S(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<n;a++){i<<=8;var s=e.readUInt8(r);if(e.isError(s))return s;i|=s}return i}},{"../../asn1":1,inherits:99}],10:[function(e,t,r){var i=r;i.der=e("./der");i.pem=e("./pem")},{"./der":9,"./pem":11}],11:[function(e,t,r){var i=e("inherits");var n=e("buffer").Buffer;var a=e("./der");function s(e){a.call(this,e);this.enc="pem"}i(s,a);t.exports=s;s.prototype.decode=function f(e,t){var r=e.toString().split(/[\r\n]+/g);var i=t.label.toUpperCase();var s=/^-----(BEGIN|END) ([^-]+)-----$/;var f=-1;var o=-1;for(var c=0;c<r.length;c++){var u=r[c].match(s);if(u===null)continue;if(u[2]!==i)continue;if(f===-1){if(u[1]!=="BEGIN")break;f=c}else{if(u[1]!=="END")break;o=c;break}}if(f===-1||o===-1)throw new Error("PEM section not found for: "+i);var h=r.slice(f+1,o).join("");h.replace(/[^a-z0-9\+\/=]+/gi,"");var l=new n(h,"base64");return a.prototype.decode.call(this,l,t)}},{"./der":9,buffer:45,inherits:99}],12:[function(e,t,r){var i=e("inherits");var n=e("buffer").Buffer;var a=e("../../asn1");var s=a.base;var f=a.constants.der;function o(e){this.enc="der";this.name=e.name;this.entity=e;this.tree=new u;this.tree._init(e.body)}t.exports=o;o.prototype.encode=function c(e,t){return this.tree._encode(e,t).join()};function u(e){s.Node.call(this,"der",e)}i(u,s.Node);u.prototype._encodeComposite=function h(e,t,r,i){var a=w(e,t,r,this.reporter);if(i.length<128){var s=new n(2);s[0]=a;s[1]=i.length;return this._createEncoderBuffer([s,i])}var f=1;for(var o=i.length;o>=256;o>>=8)f++;var s=new n(1+1+f);s[0]=a;s[1]=128|f;for(var o=1+f,c=i.length;c>0;o--,c>>=8)s[o]=c&255;return this._createEncoderBuffer([s,i])};u.prototype._encodeStr=function l(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<e.length;i++){r.writeUInt16BE(e.charCodeAt(i),i*2)}return this._createEncoderBuffer(r)}else if(t==="numstr"){if(!this._isNumstr(e)){return this.reporter.error("Encoding of string type: numstr supports "+"only digits and space")}return this._createEncoderBuffer(e)}else if(t==="printstr"){if(!this._isPrintstr(e)){return this.reporter.error("Encoding of string type: printstr supports "+"only latin upper and lower case letters, "+"digits, space, apostrophe, left and rigth "+"parenthesis, plus sign, comma, hyphen, "+"dot, slash, colon, equal sign, "+"question mark")}return this._createEncoderBuffer(e)}else if(/str$/.test(t)){return this._createEncoderBuffer(e)}else if(t==="objDesc"){return this._createEncoderBuffer(e)}else{return this.reporter.error("Encoding of string type: "+t+" unsupported")}};u.prototype._encodeObjid=function d(e,t,r){if(typeof e==="string"){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var i=0;i<e.length;i++)e[i]|=0}else if(Array.isArray(e)){e=e.slice();for(var i=0;i<e.length;i++)e[i]|=0}if(!Array.isArray(e)){return this.reporter.error("objid() should be either array or string, "+"got: "+JSON.stringify(e))}if(!r){if(e[1]>=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<e.length;i++){var s=e[i];for(a++;s>=128;s>>=7)a++}var f=new n(a);var o=f.length-1;for(var i=e.length-1;i>=0;i--){var s=e[i];f[o--]=s&127;while((s>>=7)>0)f[o--]=128|s&127}return this._createEncoderBuffer(f)};function p(e){if(e<10)return"0"+e;else return e}u.prototype._encodeTime=function v(e,t){var r;var i=new Date(e);if(t==="gentime"){r=[p(i.getFullYear()),p(i.getUTCMonth()+1),p(i.getUTCDate()),p(i.getUTCHours()),p(i.getUTCMinutes()),p(i.getUTCSeconds()),"Z"].join("")}else if(t==="utctime"){r=[p(i.getFullYear()%100),p(i.getUTCMonth()+1),p(i.getUTCDate()),p(i.getUTCHours()),p(i.getUTCMinutes()),p(i.getUTCSeconds()),"Z"].join("")}else{this.reporter.error("Encoding "+t+" time is not supported yet")}return this._encodeStr(r,"octstr")};u.prototype._encodeNull=function b(){return this._createEncoderBuffer("")};u.prototype._encodeInt=function y(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))};u.prototype._encodeBool=function m(e){return this._createEncoderBuffer(e?255:0)};u.prototype._use=function _(e,t){if(typeof e==="function")e=e(t);return e._getEncoder("der").tree};u.prototype._skipDefault=function g(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<a.length;n++)if(a[n]!==i.defaultBuffer[n])return false;return true};function w(e,t,r,i){var n;if(e==="seqof")e="seq";else if(e==="setof")e="set";if(f.tagByName.hasOwnProperty(e))n=f.tagByName[e];else if(typeof e==="number"&&(e|0)===e)n=e;else return i.error("Unknown tag: "+e);if(n>=31)return i.error("Multi-octet tag encoding unsupported");if(!t)n|=32;n|=f.tagClassByName[r||"universal"]<<6;return n}},{"../../asn1":1,buffer:45,inherits:99}],13:[function(e,t,r){var i=r;i.der=e("./der");i.pem=e("./pem")},{"./der":12,"./pem":14}],14:[function(e,t,r){var i=e("inherits");var n=e("./der");function a(e){n.call(this,e);this.enc="pem"}i(a,n);t.exports=a;a.prototype.encode=function s(e,t){var r=n.prototype.encode.call(this,e);var i=r.toString("base64");var a=["-----BEGIN "+t.label+"-----"];for(var s=0;s<i.length;s+=64)a.push(i.slice(s,s+64));a.push("-----END "+t.label+"-----");return a.join("\n")}},{"./der":12,inherits:99}],15:[function(e,t,r){"use strict";r.byteLength=u;r.toByteArray=h;r.fromByteArray=p;var i=[];var n=[];var a=typeof Uint8Array!=="undefined"?Uint8Array:Array;var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var f=0,o=s.length;f<o;++f){i[f]=s[f];n[s.charCodeAt(f)]=f}n["-".charCodeAt(0)]=62;n["_".charCodeAt(0)]=63;function c(e){var t=e.length;if(t%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}return e[t-2]==="="?2:e[t-1]==="="?1:0}function u(e){return e.length*3/4-c(e)}function h(e){var t,r,i,s,f;var o=e.length;s=c(e);f=new a(o*3/4-s);r=s>0?o-4:o;var u=0;for(t=0;t<r;t+=4){i=n[e.charCodeAt(t)]<<18|n[e.charCodeAt(t+1)]<<12|n[e.charCodeAt(t+2)]<<6|n[e.charCodeAt(t+3)];f[u++]=i>>16&255;f[u++]=i>>8&255;f[u++]=i&255}if(s===2){i=n[e.charCodeAt(t)]<<2|n[e.charCodeAt(t+1)]>>4;f[u++]=i&255}else if(s===1){i=n[e.charCodeAt(t)]<<10|n[e.charCodeAt(t+1)]<<4|n[e.charCodeAt(t+2)]>>2;f[u++]=i>>8&255;f[u++]=i&255}return f}function l(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[e&63]}function d(e,t,r){var i;var n=[];for(var a=t;a<r;a+=3){i=(e[a]<<16)+(e[a+1]<<8)+e[a+2];n.push(l(i))}return n.join("")}function p(e){var t;var r=e.length;var n=r%3;var a="";var s=[];var f=16383;for(var o=0,c=r-n;o<c;o+=f){s.push(d(e,o,o+f>c?c:o+f))}if(n===1){t=e[r-1];a+=i[t>>2];a+=i[t<<4&63];a+="=="}else if(n===2){t=(e[r-2]<<8)+e[r-1];a+=i[t>>10];a+=i[t>>4&63];a+=i[t<<2&63];a+="="}s.push(a);return s.join("")}},{}],16:[function(e,t,r){(function(t,r){"use strict";function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}function a(e,t,r){if(a.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 t==="object"){t.exports=a}else{r.BN=a}a.BN=a;a.wordSize=26;var s;try{s=e("buf"+"fer").Buffer}catch(f){}a.isBN=function o(e){if(e instanceof a){return true}return e!==null&&typeof e==="object"&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)};a.max=function c(e,t){if(e.cmp(t)>0)return e;return t};a.min=function u(e,t){if(e.cmp(t)<0)return e;return t};a.prototype._init=function h(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}i(t===(t|0)&&t>=2&&t<=36);e=e.toString().replace(/\s+/g,"");var n=0;if(e[0]==="-"){n++}if(t===16){this._parseHex(e,n)}else{this._parseBase(e,t,n)}if(e[0]==="-"){this.negative=1}this.strip();if(r!=="le")return;this._initArray(this.toArray(),t,r)};a.prototype._initNumber=function l(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{i(e<9007199254740992);this.words=[e&67108863,e/67108864&67108863,1];this.length=3}if(r!=="le")return;this._initArray(this.toArray(),t,r)};a.prototype._initArray=function d(e,t,r){i(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 n=0;n<this.length;n++){this.words[n]=0}var a,s;var f=0;if(r==="be"){for(n=e.length-1,a=0;n>=0;n-=3){s=e[n]|e[n-1]<<8|e[n-2]<<16;this.words[a]|=s<<f&67108863;this.words[a+1]=s>>>26-f&67108863;f+=24;if(f>=26){f-=26;a++}}}else if(r==="le"){for(n=0,a=0;n<e.length;n+=3){s=e[n]|e[n+1]<<8|e[n+2]<<16;this.words[a]|=s<<f&67108863;this.words[a+1]=s>>>26-f&67108863;f+=24;if(f>=26){f-=26;a++}}}return this.strip()};function p(e,t,r){var i=0;var n=Math.min(e.length,r);for(var a=t;a<n;a++){var s=e.charCodeAt(a)-48;i<<=4;if(s>=49&&s<=54){i|=s-49+10}else if(s>=17&&s<=22){i|=s-17+10}else{i|=s&15}}return i}a.prototype._parseHex=function v(e,t){this.length=Math.ceil((e.length-t)/6);this.words=new Array(this.length);for(var r=0;r<this.length;r++){this.words[r]=0}var i,n;var a=0;for(r=e.length-6,i=0;r>=t;r-=6){n=p(e,r,r+6);this.words[i]|=n<<a&67108863;this.words[i+1]|=n>>>26-a&4194303;a+=24;if(a>=26){a-=26;i++}}if(r+6!==t){n=p(e,t,r+6);this.words[i]|=n<<a&67108863;this.words[i+1]|=n>>>26-a&4194303}this.strip()};function b(e,t,r,i){var n=0;var a=Math.min(e.length,r);for(var s=t;s<a;s++){var f=e.charCodeAt(s)-48;n*=i;if(f>=49){n+=f-49+10}else if(f>=17){n+=f-17+10}else{n+=f}}return n}a.prototype._parseBase=function y(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 f=Math.min(a,a-s)+r;var o=0;for(var c=r;c<f;c+=i){o=b(e,c,c+i,t);this.imuln(n);if(this.words[0]+o<67108864){this.words[0]+=o}else{this._iaddn(o)}}if(s!==0){var u=1;o=b(e,c,e.length,t);for(c=0;c<s;c++){u*=t}this.imuln(u);if(this.words[0]+o<67108864){this.words[0]+=o}else{this._iaddn(o)}}};a.prototype.copy=function m(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++){e.words[t]=this.words[t]}e.length=this.length;e.negative=this.negative;e.red=this.red};a.prototype.clone=function _(){var e=new a(null);this.copy(e);return e};a.prototype._expand=function g(e){while(this.length<e){this.words[this.length++]=0}return this};a.prototype.strip=function w(){while(this.length>1&&this.words[this.length-1]===0){this.length--}return this._normSign()};a.prototype._normSign=function E(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};a.prototype.inspect=function S(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var k=["","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 M=[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];a.prototype.toString=function I(e,t){e=e||10;t=t|0||1;var r;if(e===16||e==="hex"){r="";var n=0;var a=0;for(var s=0;s<this.length;s++){var f=this.words[s];var o=((f<<n|a)&16777215).toString(16);a=f>>>24-n&16777215;if(a!==0||s!==this.length-1){r=k[6-o.length]+o+r}else{r=o+r}n+=2;if(n>=26){n-=26;s--}}if(a!==0){r=a.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 u=M[e];r="";var h=this.clone();h.negative=0;while(!h.isZero()){var l=h.modn(u).toString(e);h=h.idivn(u);if(!h.isZero()){r=k[c-l.length]+l+r}else{r=l+r}}if(this.isZero()){r="0"+r}while(r.length%t!==0){r="0"+r}if(this.negative!==0){r="-"+r}return r}i(false,"Base should be between 2 and 36")};a.prototype.toNumber=function C(){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){i(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-e:e};a.prototype.toJSON=function j(){return this.toString(16)};a.prototype.toBuffer=function x(e,t){i(typeof s!=="undefined");return this.toArrayLike(s,e,t)};a.prototype.toArray=function T(e,t){return this.toArrayLike(Array,e,t)};a.prototype.toArrayLike=function B(e,t,r){var n=this.byteLength();var a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length");i(a>0,"Requested array length <= 0");this.strip();var s=t==="le";var f=new e(a);var o,c;var u=this.clone();if(!s){for(c=0;c<a-n;c++){f[c]=0}for(c=0;!u.isZero();c++){o=u.andln(255);u.iushrn(8);f[a-c-1]=o}}else{for(c=0;!u.isZero();c++){o=u.andln(255);u.iushrn(8);f[c]=o}for(;c<a;c++){f[c]=0}}return f};if(Math.clz32){a.prototype._countBits=function P(e){return 32-Math.clz32(e)}}else{a.prototype._countBits=function P(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}}a.prototype._zeroBits=function R(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};a.prototype.bitLength=function L(){var e=this.words[this.length-1];var t=this._countBits(e);return(this.length-1)*26+t};function N(e){var t=new Array(e.bitLength());for(var r=0;r<t.length;r++){var i=r/26|0;var n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}a.prototype.zeroBits=function D(){if(this.isZero())return 0;var e=0;for(var t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);e+=r;if(r!==26)break}return e};a.prototype.byteLength=function O(){return Math.ceil(this.bitLength()/8)};a.prototype.toTwos=function F(e){if(this.negative!==0){return this.abs().inotn(e).iaddn(1)}return this.clone()};a.prototype.fromTwos=function U(e){if(this.testn(e-1)){return this.notn(e).iaddn(1).ineg()}return this.clone()};a.prototype.isNeg=function q(){return this.negative!==0};a.prototype.neg=function V(){return this.clone().ineg()};a.prototype.ineg=function z(){if(!this.isZero()){this.negative^=1}return this};a.prototype.iuor=function K(e){while(this.length<e.length){this.words[this.length++]=0}for(var t=0;t<e.length;t++){this.words[t]=this.words[t]|e.words[t]}return this.strip()};a.prototype.ior=function H(e){i((this.negative|e.negative)===0);return this.iuor(e)};a.prototype.or=function Y(e){if(this.length>e.length)return this.clone().ior(e);return e.clone().ior(this)};a.prototype.uor=function G(e){if(this.length>e.length)return this.clone().iuor(e);return e.clone().iuor(this)};a.prototype.iuand=function W(e){var t;if(this.length>e.length){t=e}else{t=this}for(var r=0;r<t.length;r++){this.words[r]=this.words[r]&e.words[r]}this.length=t.length;return this.strip()};a.prototype.iand=function X(e){i((this.negative|e.negative)===0);return this.iuand(e)};a.prototype.and=function Z(e){if(this.length>e.length)return this.clone().iand(e);return e.clone().iand(this)};a.prototype.uand=function $(e){if(this.length>e.length)return this.clone().iuand(e);return e.clone().iuand(this)};a.prototype.iuxor=function J(e){var t;var r;if(this.length>e.length){t=this;r=e}else{t=e;r=this}for(var i=0;i<r.length;i++){this.words[i]=t.words[i]^r.words[i]}if(this!==t){for(;i<t.length;i++){this.words[i]=t.words[i]}}this.length=t.length;return this.strip()};a.prototype.ixor=function Q(e){i((this.negative|e.negative)===0);return this.iuxor(e)};a.prototype.xor=function et(e){if(this.length>e.length)return this.clone().ixor(e);return e.clone().ixor(this)};a.prototype.uxor=function tt(e){if(this.length>e.length)return this.clone().iuxor(e);return e.clone().iuxor(this)};a.prototype.inotn=function rt(e){i(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 n=0;n<t;n++){this.words[n]=~this.words[n]&67108863}if(r>0){this.words[n]=~this.words[n]&67108863>>26-r}return this.strip()};a.prototype.notn=function it(e){return this.clone().inotn(e)};a.prototype.setn=function nt(e,t){i(typeof e==="number"&&e>=0);var r=e/26|0;var n=e%26;this._expand(r+1);if(t){this.words[r]=this.words[r]|1<<n}else{this.words[r]=this.words[r]&~(1<<n)}return this.strip()};a.prototype.iadd=function at(e){var t;if(this.negative!==0&&e.negative===0){this.negative=0;t=this.isub(e);this.negative^=1;return this._normSign()}else if(this.negative===0&&e.negative!==0){e.negative=0;t=this.isub(e);e.negative=1;return t._normSign()}var r,i;if(this.length>e.length){r=this;i=e}else{r=e;i=this}var n=0;for(var a=0;a<i.length;a++){t=(r.words[a]|0)+(i.words[a]|0)+n;this.words[a]=t&67108863;n=t>>>26}for(;n!==0&&a<r.length;a++){t=(r.words[a]|0)+n;this.words[a]=t&67108863;n=t>>>26}this.length=r.length;if(n!==0){this.words[this.length]=n;this.length++}else if(r!==this){for(;a<r.length;a++){this.words[a]=r.words[a]}}return this};a.prototype.add=function st(e){var t;if(e.negative!==0&&this.negative===0){e.negative=0;t=this.sub(e);e.negative^=1;return t}else if(e.negative===0&&this.negative!==0){this.negative=0;t=e.sub(this);this.negative=1;return t}if(this.length>e.length)return this.clone().iadd(e);return e.clone().iadd(this)};a.prototype.isub=function ft(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<n.length;s++){t=(i.words[s]|0)-(n.words[s]|0)+a;a=t>>26;this.words[s]=t&67108863}for(;a!==0&&s<i.length;s++){t=(i.words[s]|0)+a;a=t>>26;this.words[s]=t&67108863}if(a===0&&s<i.length&&i!==this){for(;s<i.length;s++){this.words[s]=i.words[s]}}this.length=Math.max(this.length,s);if(i!==this){this.negative=1}return this.strip()};a.prototype.sub=function ot(e){return this.clone().isub(e)};function ct(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i;i=i-1|0;var n=e.words[0]|0;var a=t.words[0]|0;var s=n*a;var f=s&67108863;var o=s/67108864|0;r.words[0]=f;for(var c=1;c<i;c++){var u=o>>>26;var h=o&67108863;var l=Math.min(c,t.length-1);for(var d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;n=e.words[p]|0;a=t.words[d]|0;s=n*a+h;u+=s/67108864|0;h=s&67108863}r.words[c]=h|0;o=u|0}if(o!==0){r.words[c]=o|0}else{r.length--}return r.strip()}var ut=function ut(e,t,r){var i=e.words;var n=t.words;var a=r.words;var s=0;var f;var o;var c;var u=i[0]|0;var h=u&8191;var l=u>>>13;var d=i[1]|0;var p=d&8191;var v=d>>>13;var b=i[2]|0;var y=b&8191;var m=b>>>13;var _=i[3]|0;var g=_&8191;var w=_>>>13;var E=i[4]|0;var S=E&8191;var k=E>>>13;var A=i[5]|0;var M=A&8191;var I=A>>>13;var C=i[6]|0;var j=C&8191;var x=C>>>13;var T=i[7]|0;var B=T&8191;var P=T>>>13;var R=i[8]|0;var L=R&8191;var N=R>>>13;var D=i[9]|0;var O=D&8191;var F=D>>>13;var U=n[0]|0;var q=U&8191;var V=U>>>13;var z=n[1]|0;var K=z&8191;var H=z>>>13;var Y=n[2]|0;var G=Y&8191;var W=Y>>>13;var X=n[3]|0;var Z=X&8191;var $=X>>>13;var J=n[4]|0;var Q=J&8191;var et=J>>>13;var tt=n[5]|0;var rt=tt&8191;var it=tt>>>13;var nt=n[6]|0;var at=nt&8191;var st=nt>>>13;var ft=n[7]|0;var ot=ft&8191;var ct=ft>>>13;var ut=n[8]|0;var ht=ut&8191;var lt=ut>>>13;var dt=n[9]|0;var pt=dt&8191;var vt=dt>>>13;r.negative=e.negative^t.negative;r.length=19;f=Math.imul(h,q);o=Math.imul(h,V);o=o+Math.imul(l,q)|0;c=Math.imul(l,V);var bt=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(bt>>>26)|0;bt&=67108863;f=Math.imul(p,q);o=Math.imul(p,V);o=o+Math.imul(v,q)|0;c=Math.imul(v,V);f=f+Math.imul(h,K)|0;o=o+Math.imul(h,H)|0;o=o+Math.imul(l,K)|0;c=c+Math.imul(l,H)|0;var yt=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(yt>>>26)|0;yt&=67108863;f=Math.imul(y,q);o=Math.imul(y,V);o=o+Math.imul(m,q)|0;c=Math.imul(m,V);f=f+Math.imul(p,K)|0;o=o+Math.imul(p,H)|0;o=o+Math.imul(v,K)|0;c=c+Math.imul(v,H)|0;f=f+Math.imul(h,G)|0;o=o+Math.imul(h,W)|0;o=o+Math.imul(l,G)|0;c=c+Math.imul(l,W)|0;var mt=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(mt>>>26)|0;mt&=67108863;f=Math.imul(g,q);o=Math.imul(g,V);o=o+Math.imul(w,q)|0;c=Math.imul(w,V);f=f+Math.imul(y,K)|0;o=o+Math.imul(y,H)|0;o=o+Math.imul(m,K)|0;c=c+Math.imul(m,H)|0;f=f+Math.imul(p,G)|0;o=o+Math.imul(p,W)|0;o=o+Math.imul(v,G)|0;c=c+Math.imul(v,W)|0;f=f+Math.imul(h,Z)|0;o=o+Math.imul(h,$)|0;o=o+Math.imul(l,Z)|0;c=c+Math.imul(l,$)|0;var _t=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(_t>>>26)|0;_t&=67108863;f=Math.imul(S,q);o=Math.imul(S,V);o=o+Math.imul(k,q)|0;c=Math.imul(k,V);f=f+Math.imul(g,K)|0;o=o+Math.imul(g,H)|0;o=o+Math.imul(w,K)|0;c=c+Math.imul(w,H)|0;f=f+Math.imul(y,G)|0;o=o+Math.imul(y,W)|0;o=o+Math.imul(m,G)|0;c=c+Math.imul(m,W)|0;f=f+Math.imul(p,Z)|0;o=o+Math.imul(p,$)|0;o=o+Math.imul(v,Z)|0;c=c+Math.imul(v,$)|0;f=f+Math.imul(h,Q)|0;o=o+Math.imul(h,et)|0;o=o+Math.imul(l,Q)|0;c=c+Math.imul(l,et)|0;var gt=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(gt>>>26)|0;gt&=67108863;f=Math.imul(M,q);o=Math.imul(M,V);o=o+Math.imul(I,q)|0;c=Math.imul(I,V);f=f+Math.imul(S,K)|0;o=o+Math.imul(S,H)|0;o=o+Math.imul(k,K)|0;c=c+Math.imul(k,H)|0;f=f+Math.imul(g,G)|0;o=o+Math.imul(g,W)|0;o=o+Math.imul(w,G)|0;c=c+Math.imul(w,W)|0;f=f+Math.imul(y,Z)|0;o=o+Math.imul(y,$)|0;o=o+Math.imul(m,Z)|0;c=c+Math.imul(m,$)|0;f=f+Math.imul(p,Q)|0;o=o+Math.imul(p,et)|0;o=o+Math.imul(v,Q)|0;c=c+Math.imul(v,et)|0;f=f+Math.imul(h,rt)|0;o=o+Math.imul(h,it)|0;o=o+Math.imul(l,rt)|0;c=c+Math.imul(l,it)|0;var wt=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(wt>>>26)|0;wt&=67108863;f=Math.imul(j,q);o=Math.imul(j,V);o=o+Math.imul(x,q)|0;c=Math.imul(x,V);f=f+Math.imul(M,K)|0;o=o+Math.imul(M,H)|0;o=o+Math.imul(I,K)|0;c=c+Math.imul(I,H)|0;f=f+Math.imul(S,G)|0;o=o+Math.imul(S,W)|0;o=o+Math.imul(k,G)|0;c=c+Math.imul(k,W)|0;f=f+Math.imul(g,Z)|0;o=o+Math.imul(g,$)|0;o=o+Math.imul(w,Z)|0;c=c+Math.imul(w,$)|0;f=f+Math.imul(y,Q)|0;o=o+Math.imul(y,et)|0;o=o+Math.imul(m,Q)|0;c=c+Math.imul(m,et)|0;f=f+Math.imul(p,rt)|0;o=o+Math.imul(p,it)|0;o=o+Math.imul(v,rt)|0;c=c+Math.imul(v,it)|0;f=f+Math.imul(h,at)|0;o=o+Math.imul(h,st)|0;o=o+Math.imul(l,at)|0;c=c+Math.imul(l,st)|0;var Et=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(Et>>>26)|0;Et&=67108863;f=Math.imul(B,q);o=Math.imul(B,V);o=o+Math.imul(P,q)|0;c=Math.imul(P,V);f=f+Math.imul(j,K)|0;o=o+Math.imul(j,H)|0;o=o+Math.imul(x,K)|0;c=c+Math.imul(x,H)|0;f=f+Math.imul(M,G)|0;o=o+Math.imul(M,W)|0;o=o+Math.imul(I,G)|0;c=c+Math.imul(I,W)|0;f=f+Math.imul(S,Z)|0;o=o+Math.imul(S,$)|0;o=o+Math.imul(k,Z)|0;c=c+Math.imul(k,$)|0;f=f+Math.imul(g,Q)|0;o=o+Math.imul(g,et)|0;o=o+Math.imul(w,Q)|0;c=c+Math.imul(w,et)|0;f=f+Math.imul(y,rt)|0;o=o+Math.imul(y,it)|0;o=o+Math.imul(m,rt)|0;c=c+Math.imul(m,it)|0;f=f+Math.imul(p,at)|0;o=o+Math.imul(p,st)|0;o=o+Math.imul(v,at)|0;c=c+Math.imul(v,st)|0;f=f+Math.imul(h,ot)|0;o=o+Math.imul(h,ct)|0;o=o+Math.imul(l,ot)|0;c=c+Math.imul(l,ct)|0;var St=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(St>>>26)|0;St&=67108863;f=Math.imul(L,q);o=Math.imul(L,V);o=o+Math.imul(N,q)|0;c=Math.imul(N,V);f=f+Math.imul(B,K)|0;o=o+Math.imul(B,H)|0;o=o+Math.imul(P,K)|0;c=c+Math.imul(P,H)|0;f=f+Math.imul(j,G)|0;o=o+Math.imul(j,W)|0;o=o+Math.imul(x,G)|0;c=c+Math.imul(x,W)|0;f=f+Math.imul(M,Z)|0;o=o+Math.imul(M,$)|0;o=o+Math.imul(I,Z)|0;c=c+Math.imul(I,$)|0;f=f+Math.imul(S,Q)|0;o=o+Math.imul(S,et)|0;o=o+Math.imul(k,Q)|0;c=c+Math.imul(k,et)|0;f=f+Math.imul(g,rt)|0;o=o+Math.imul(g,it)|0;o=o+Math.imul(w,rt)|0;c=c+Math.imul(w,it)|0;f=f+Math.imul(y,at)|0;o=o+Math.imul(y,st)|0;o=o+Math.imul(m,at)|0;c=c+Math.imul(m,st)|0;f=f+Math.imul(p,ot)|0;o=o+Math.imul(p,ct)|0;o=o+Math.imul(v,ot)|0;c=c+Math.imul(v,ct)|0;f=f+Math.imul(h,ht)|0;o=o+Math.imul(h,lt)|0;o=o+Math.imul(l,ht)|0;c=c+Math.imul(l,lt)|0;var kt=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(kt>>>26)|0;kt&=67108863;f=Math.imul(O,q);o=Math.imul(O,V);o=o+Math.imul(F,q)|0;c=Math.imul(F,V);f=f+Math.imul(L,K)|0;o=o+Math.imul(L,H)|0;o=o+Math.imul(N,K)|0;c=c+Math.imul(N,H)|0;f=f+Math.imul(B,G)|0;o=o+Math.imul(B,W)|0;o=o+Math.imul(P,G)|0;c=c+Math.imul(P,W)|0;f=f+Math.imul(j,Z)|0;o=o+Math.imul(j,$)|0;o=o+Math.imul(x,Z)|0;c=c+Math.imul(x,$)|0;f=f+Math.imul(M,Q)|0;o=o+Math.imul(M,et)|0;o=o+Math.imul(I,Q)|0;c=c+Math.imul(I,et)|0;f=f+Math.imul(S,rt)|0;o=o+Math.imul(S,it)|0;o=o+Math.imul(k,rt)|0;c=c+Math.imul(k,it)|0;f=f+Math.imul(g,at)|0;o=o+Math.imul(g,st)|0;o=o+Math.imul(w,at)|0;c=c+Math.imul(w,st)|0;f=f+Math.imul(y,ot)|0;o=o+Math.imul(y,ct)|0;o=o+Math.imul(m,ot)|0;c=c+Math.imul(m,ct)|0;f=f+Math.imul(p,ht)|0;o=o+Math.imul(p,lt)|0;o=o+Math.imul(v,ht)|0;c=c+Math.imul(v,lt)|0;f=f+Math.imul(h,pt)|0;o=o+Math.imul(h,vt)|0;o=o+Math.imul(l,pt)|0;c=c+Math.imul(l,vt)|0;var At=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(At>>>26)|0;At&=67108863;f=Math.imul(O,K);o=Math.imul(O,H);o=o+Math.imul(F,K)|0;c=Math.imul(F,H);f=f+Math.imul(L,G)|0;o=o+Math.imul(L,W)|0;o=o+Math.imul(N,G)|0;c=c+Math.imul(N,W)|0;f=f+Math.imul(B,Z)|0;o=o+Math.imul(B,$)|0;o=o+Math.imul(P,Z)|0;c=c+Math.imul(P,$)|0;f=f+Math.imul(j,Q)|0;o=o+Math.imul(j,et)|0;o=o+Math.imul(x,Q)|0;c=c+Math.imul(x,et)|0;f=f+Math.imul(M,rt)|0;o=o+Math.imul(M,it)|0;o=o+Math.imul(I,rt)|0;c=c+Math.imul(I,it)|0;f=f+Math.imul(S,at)|0;o=o+Math.imul(S,st)|0;o=o+Math.imul(k,at)|0;c=c+Math.imul(k,st)|0;f=f+Math.imul(g,ot)|0;o=o+Math.imul(g,ct)|0;o=o+Math.imul(w,ot)|0;c=c+Math.imul(w,ct)|0;f=f+Math.imul(y,ht)|0;o=o+Math.imul(y,lt)|0;o=o+Math.imul(m,ht)|0;c=c+Math.imul(m,lt)|0;f=f+Math.imul(p,pt)|0;o=o+Math.imul(p,vt)|0;o=o+Math.imul(v,pt)|0;c=c+Math.imul(v,vt)|0;var Mt=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(Mt>>>26)|0;Mt&=67108863;f=Math.imul(O,G);o=Math.imul(O,W);o=o+Math.imul(F,G)|0;c=Math.imul(F,W);f=f+Math.imul(L,Z)|0;o=o+Math.imul(L,$)|0;o=o+Math.imul(N,Z)|0;c=c+Math.imul(N,$)|0;f=f+Math.imul(B,Q)|0;o=o+Math.imul(B,et)|0;o=o+Math.imul(P,Q)|0;c=c+Math.imul(P,et)|0;f=f+Math.imul(j,rt)|0;o=o+Math.imul(j,it)|0;o=o+Math.imul(x,rt)|0;c=c+Math.imul(x,it)|0;f=f+Math.imul(M,at)|0;o=o+Math.imul(M,st)|0;o=o+Math.imul(I,at)|0;c=c+Math.imul(I,st)|0;f=f+Math.imul(S,ot)|0;o=o+Math.imul(S,ct)|0;o=o+Math.imul(k,ot)|0;c=c+Math.imul(k,ct)|0;f=f+Math.imul(g,ht)|0;o=o+Math.imul(g,lt)|0;o=o+Math.imul(w,ht)|0;c=c+Math.imul(w,lt)|0;f=f+Math.imul(y,pt)|0;o=o+Math.imul(y,vt)|0;o=o+Math.imul(m,pt)|0;c=c+Math.imul(m,vt)|0;var It=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(It>>>26)|0;It&=67108863;f=Math.imul(O,Z);o=Math.imul(O,$);o=o+Math.imul(F,Z)|0;c=Math.imul(F,$);f=f+Math.imul(L,Q)|0;o=o+Math.imul(L,et)|0;o=o+Math.imul(N,Q)|0;c=c+Math.imul(N,et)|0;f=f+Math.imul(B,rt)|0;o=o+Math.imul(B,it)|0;o=o+Math.imul(P,rt)|0;c=c+Math.imul(P,it)|0;f=f+Math.imul(j,at)|0;o=o+Math.imul(j,st)|0;o=o+Math.imul(x,at)|0;c=c+Math.imul(x,st)|0;f=f+Math.imul(M,ot)|0;o=o+Math.imul(M,ct)|0;o=o+Math.imul(I,ot)|0;c=c+Math.imul(I,ct)|0;f=f+Math.imul(S,ht)|0;o=o+Math.imul(S,lt)|0;o=o+Math.imul(k,ht)|0;c=c+Math.imul(k,lt)|0;f=f+Math.imul(g,pt)|0;o=o+Math.imul(g,vt)|0;o=o+Math.imul(w,pt)|0;c=c+Math.imul(w,vt)|0;var Ct=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(Ct>>>26)|0;Ct&=67108863;f=Math.imul(O,Q);o=Math.imul(O,et);o=o+Math.imul(F,Q)|0;c=Math.imul(F,et);f=f+Math.imul(L,rt)|0;o=o+Math.imul(L,it)|0;o=o+Math.imul(N,rt)|0;c=c+Math.imul(N,it)|0;f=f+Math.imul(B,at)|0;o=o+Math.imul(B,st)|0;o=o+Math.imul(P,at)|0;c=c+Math.imul(P,st)|0;f=f+Math.imul(j,ot)|0;o=o+Math.imul(j,ct)|0;o=o+Math.imul(x,ot)|0;c=c+Math.imul(x,ct)|0;f=f+Math.imul(M,ht)|0;o=o+Math.imul(M,lt)|0;o=o+Math.imul(I,ht)|0;c=c+Math.imul(I,lt)|0;f=f+Math.imul(S,pt)|0;o=o+Math.imul(S,vt)|0;o=o+Math.imul(k,pt)|0;c=c+Math.imul(k,vt)|0;var jt=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(jt>>>26)|0;jt&=67108863;f=Math.imul(O,rt);o=Math.imul(O,it);o=o+Math.imul(F,rt)|0;c=Math.imul(F,it);f=f+Math.imul(L,at)|0;o=o+Math.imul(L,st)|0;o=o+Math.imul(N,at)|0;c=c+Math.imul(N,st)|0;f=f+Math.imul(B,ot)|0;o=o+Math.imul(B,ct)|0;o=o+Math.imul(P,ot)|0;c=c+Math.imul(P,ct)|0;f=f+Math.imul(j,ht)|0;o=o+Math.imul(j,lt)|0;o=o+Math.imul(x,ht)|0;c=c+Math.imul(x,lt)|0;f=f+Math.imul(M,pt)|0;o=o+Math.imul(M,vt)|0;o=o+Math.imul(I,pt)|0;c=c+Math.imul(I,vt)|0;var xt=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(xt>>>26)|0;xt&=67108863;f=Math.imul(O,at);o=Math.imul(O,st);o=o+Math.imul(F,at)|0;c=Math.imul(F,st);f=f+Math.imul(L,ot)|0;o=o+Math.imul(L,ct)|0;o=o+Math.imul(N,ot)|0;c=c+Math.imul(N,ct)|0;f=f+Math.imul(B,ht)|0;o=o+Math.imul(B,lt)|0;o=o+Math.imul(P,ht)|0;c=c+Math.imul(P,lt)|0;f=f+Math.imul(j,pt)|0;o=o+Math.imul(j,vt)|0;o=o+Math.imul(x,pt)|0;c=c+Math.imul(x,vt)|0;var Tt=(s+f|0)+((o&8191)<<13)|0;s=(c+(o>>>13)|0)+(Tt>>>26)|0;Tt&=67108863;f=Math.imul(O,ot);o=Math.imul(O,ct);o=o+Math.imul(F,ot)|0;c=Math.imul(F,ct);f=f+Math.imul(L,ht)|0;o=o+Math.imul(L,lt)|0;o=o+Math.imul(N,ht)|0;c=c+Math.imul(N,lt)|0;f=f+Math.imul(B,pt)|0;o=o+Math.imul(B,vt)|0;o=o+Math.imul(P,pt)|