github.com/cnotch/ipchub@v1.1.0/demos/flv265/h265.min.js (about)

     1  !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.h265js=e()}}(function(){var define,module,exports;return function(){function e(t,r,i){function n(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var c=r[o]={exports:{}};t[o][0].call(c.exports,function(e){return n(t[o][1][e]||e)},c,c.exports,e,t,r,i)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)n(i[o]);return n}return e}()({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){function i(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}var n=e("../asn1"),a=e("inherits");r.define=function(e,t){return new i(e,t)},i.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n  this._initNamed(entity);\n})")}catch(e){r=function(e){this._initNamed(e)}}return a(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},i.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},i.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},i.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},i.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":1,inherits:104,vm:163}],3:[function(e,t,r){function i(e,t){if(o.call(this,t),!s.isBuffer(e))return void this.error("Input not Buffer");this.base=e,this.offset=0,this.length=e.length}function n(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof n||(e=new n(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}var a=e("inherits"),o=e("../base").Reporter,s=e("buffer").Buffer;a(i,o),r.DecoderBuffer=i,i.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},i.prototype.restore=function(e){var t=new i(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},i.prototype.isEmpty=function(){return this.offset===this.length},i.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},i.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new i(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},i.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=n,n.prototype.join=function(e,t){return e||(e=new s(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":4,buffer:48,inherits:104}],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){function i(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=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var n=e("../base").Reporter,a=e("../base").EncoderBuffer,o=e("../base").DecoderBuffer,s=e("minimalistic-assert"),u=["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"],f=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u),c=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];t.exports=i;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];i.prototype.clone=function(){var e=this._baseState,t={};d.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},i.prototype._wrap=function(){var e=this._baseState;f.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},i.prototype._init=function(e){var t=this._baseState;s(null===t.parent),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")},i.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0);var i=e[r];t[i]=r}),t}))},c.forEach(function(e){i.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),u.forEach(function(e){i.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}}),i.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},i.prototype.optional=function(){return this._baseState.optional=!0,this},i.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},i.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},i.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},i.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},i.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},i.prototype.any=function(){return this._baseState.any=!0,this},i.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},i.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},i.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var i=r.default,n=!0,a=null;if(null!==r.key&&(a=e.enterKey(r.key)),r.optional){var s=null;if(null!==r.explicit?s=r.explicit:null!==r.implicit?s=r.implicit:null!==r.tag&&(s=r.tag),null!==s||r.any){if(n=this._peekTag(e,s,r.any),e.isError(n))return n}else{var u=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),n=!0}catch(e){n=!1}e.restore(u)}}var f;if(r.obj&&n&&(f=e.enterObject()),n){if(null!==r.explicit){var c=this._decodeTag(e,r.explicit);if(e.isError(c))return c;e=c}var d=e.offset;if(null===r.use&&null===r.choice){if(r.any)var u=e.save();var l=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(l))return l;r.any?i=e.raw(u):e=l}if(t&&t.track&&null!==r.tag&&t.track(e.path(),d,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var h=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(h,t)}}return r.obj&&n&&(i=e.leaveObject(f)),null===r.key||null===i&&!0!==n?null!==a&&e.exitKey(a):e.leaveKey(a,r.key,i),i},i.prototype._decodeGeneric=function(e,t,r){var i=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,i.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&i.args?this._decodeObjid(t,i.args[0],i.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},i.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},i.prototype._decodeChoice=function(e,t){var r=this._baseState,i=null,n=!1;return Object.keys(r.choice).some(function(a){var o=e.save(),s=r.choice[a];try{var u=s._decode(e,t);if(e.isError(u))return!1;i={type:a,value:u},n=!0}catch(t){return e.restore(o),!1}return!0},this),n?i:e.error("Choice not matched")},i.prototype._createEncoderBuffer=function(e){return new a(e,this.reporter)},i.prototype._encode=function(e,t,r){var i=this._baseState;if(null===i.default||i.default!==e){var n=this._encodeValue(e,t,r);if(void 0!==n&&!this._skipDefault(n,t,r))return n}},i.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var a=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var o=null,s=!1;if(i.any)a=this._createEncoderBuffer(e);else if(i.choice)a=this._encodeChoice(e,t);else if(i.contains)o=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)o=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var i=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var n=r._encode(e[r._baseState.key],t,e);return t.leaveKey(i),n},this).filter(function(e){return e}),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,o=this._createEncoderBuffer(e.map(function(r){var i=this._baseState;return this._getUse(i.args[0],e)._encode(r,t)},u))}else null!==i.use?a=this._getUse(i.use,r)._encode(e,t):(o=this._encodePrimitive(i.tag,e),s=!0);var a;if(!i.any&&null===i.choice){var f=null!==i.implicit?i.implicit:i.tag,c=null===i.implicit?"universal":"context";null===f?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(a=this._encodeComposite(f,s,c,o))}return null!==i.explicit&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a},i.prototype._encodeChoice=function(e,t){var r=this._baseState,i=r.choice[e.type];return i||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(e.value,t)},i.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},i.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},i.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":4,"minimalistic-assert":108}],6:[function(e,t,r){function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function n(e,t){this.path=e,this.rethrow(t)}var a=e("inherits");r.Reporter=i,i.prototype.isError=function(e){return e instanceof n},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var i=this._reporterState;this.exitKey(e),null!==i.obj&&(i.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,i=e instanceof n;if(t=i?e:new n(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return i||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},a(n,Error),n.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,n),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:104}],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(e){var t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);var i=e[r];t[i]=r}),t},i.der=e("./der")},{"./der":7}],9:[function(e,t,r){function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new n,this.tree._init(e.body)}function n(e){f.Node.call(this,"der",e)}function a(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=d.tagClass[r>>6],n=0==(32&r);if(31==(31&r)){var a=r;for(r=0;128==(128&a);){if(a=e.readUInt8(t),e.isError(a))return a;r<<=7,r|=127&a}}else r&=31;return{cls:i,primitive:n,tag:r,tagStr:d.tag[r]}}function o(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&128===i)return null;if(0==(128&i))return i;var n=127&i;if(n>4)return e.error("length octect is too long");i=0;for(var a=0;a<n;a++){i<<=8;var o=e.readUInt8(r);if(e.isError(o))return o;i|=o}return i}var s=e("inherits"),u=e("../../asn1"),f=u.base,c=u.bignum,d=u.constants.der;t.exports=i,i.prototype.decode=function(e,t){return e instanceof f.DecoderBuffer||(e=new f.DecoderBuffer(e,t)),this.tree._decode(e,t)},s(n,f.Node),n.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var i=e.save(),n=a(e,'Failed to peek tag: "'+t+'"');return e.isError(n)?n:(e.restore(i),n.tag===t||n.tagStr===t||n.tagStr+"of"===t||r)},n.prototype._decodeTag=function(e,t,r){var i=a(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;var n=o(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||null!==n)return e.skip(n,'Failed to match body of: "'+t+'"');var s=e.save(),u=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(u)?u:(n=e.offset-s.offset,e.restore(s),e.skip(n,'Failed to match body of: "'+t+'"'))},n.prototype._skipUntilEnd=function(e,t){for(;;){var r=a(e,t);if(e.isError(r))return r;var i=o(e,r.primitive,t);if(e.isError(i))return i;var n;if(n=r.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(n))return n;if("end"===r.tagStr)break}},n.prototype._decodeList=function(e,t,r,i){for(var n=[];!e.isEmpty();){var a=this._peekTag(e,"end");if(e.isError(a))return a;var o=r.decode(e,"der",i);if(e.isError(o)&&a)break;n.push(o)}return n},n.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var i=e.raw();if(i.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var n="",a=0;a<i.length/2;a++)n+=String.fromCharCode(i.readUInt16BE(2*a));return n}if("numstr"===t){var o=e.raw().toString("ascii");return this._isNumstr(o)?o:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var s=e.raw().toString("ascii");return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},n.prototype._decodeObjid=function(e,t,r){for(var i,n=[],a=0;!e.isEmpty();){var o=e.readUInt8();a<<=7,a|=127&o,0==(128&o)&&(n.push(a),a=0)}128&o&&n.push(a);var s=n[0]/40|0,u=n[0]%40;if(i=r?n:[s,u].concat(n.slice(1)),t){var f=t[i.join(" ")];void 0===f&&(f=t[i.join(".")]),void 0!==f&&(i=f)}return i},n.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var i=0|r.slice(0,4),n=0|r.slice(4,6),a=0|r.slice(6,8),o=0|r.slice(8,10),s=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");var i=0|r.slice(0,2),n=0|r.slice(2,4),a=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),u=0|r.slice(10,12);i=i<70?2e3+i:1900+i}return Date.UTC(i,n-1,a,o,s,u,0)},n.prototype._decodeNull=function(e){return null},n.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},n.prototype._decodeInt=function(e,t){var r=e.raw(),i=new c(r);return t&&(i=t[i.toString(10)]||i),i},n.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},{"../../asn1":1,inherits:104}],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){function i(e){o.call(this,e),this.enc="pem"}var n=e("inherits"),a=e("buffer").Buffer,o=e("./der");n(i,o),t.exports=i,i.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),i=t.label.toUpperCase(),n=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,u=-1,f=0;f<r.length;f++){var c=r[f].match(n);if(null!==c&&c[2]===i){if(-1!==s){if("END"!==c[1])break;u=f;break}if("BEGIN"!==c[1])break;s=f}}if(-1===s||-1===u)throw new Error("PEM section not found for: "+i);var d=r.slice(s+1,u).join("");d.replace(/[^a-z0-9\+\/=]+/gi,"");var l=new a(d,"base64");return o.prototype.decode.call(this,l,t)}},{"./der":9,buffer:48,inherits:104}],12:[function(e,t,r){function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new n,this.tree._init(e.body)}function n(e){c.Node.call(this,"der",e)}function a(e){return e<10?"0"+e:e}function o(e,t,r,i){var n;if("seqof"===e?e="seq":"setof"===e&&(e="set"),d.tagByName.hasOwnProperty(e))n=d.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return i.error("Unknown tag: "+e);n=e}return n>=31?i.error("Multi-octet tag encoding unsupported"):(t||(n|=32),n|=d.tagClassByName[r||"universal"]<<6)}var s=e("inherits"),u=e("buffer").Buffer,f=e("../../asn1"),c=f.base,d=f.constants.der;t.exports=i,i.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},s(n,c.Node),n.prototype._encodeComposite=function(e,t,r,i){var n=o(e,t,r,this.reporter);if(i.length<128){var a=new u(2);return a[0]=n,a[1]=i.length,this._createEncoderBuffer([a,i])}for(var s=1,f=i.length;f>=256;f>>=8)s++;var a=new u(2+s);a[0]=n,a[1]=128|s;for(var f=1+s,c=i.length;c>0;f--,c>>=8)a[f]=255&c;return this._createEncoderBuffer([a,i])},n.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new u(2*e.length),i=0;i<e.length;i++)r.writeUInt16BE(e.charCodeAt(i),2*i);return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)?this._createEncoderBuffer(e):"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},n.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){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,40*e[0]+e[1])}for(var n=0,i=0;i<e.length;i++){var a=e[i];for(n++;a>=128;a>>=7)n++}for(var o=new u(n),s=o.length-1,i=e.length-1;i>=0;i--){var a=e[i];for(o[s--]=127&a;(a>>=7)>0;)o[s--]=128|127&a}return this._createEncoderBuffer(o)},n.prototype._encodeTime=function(e,t){var r,i=new Date(e);return"gentime"===t?r=[a(i.getFullYear()),a(i.getUTCMonth()+1),a(i.getUTCDate()),a(i.getUTCHours()),a(i.getUTCMinutes()),a(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[a(i.getFullYear()%100),a(i.getUTCMonth()+1),a(i.getUTCDate()),a(i.getUTCHours()),a(i.getUTCMinutes()),a(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},n.prototype._encodeNull=function(){return this._createEncoderBuffer("")},n.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!u.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new u(r)}if(u.isBuffer(e)){var i=e.length;0===e.length&&i++;var n=new u(i);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var i=1,a=e;a>=256;a>>=8)i++;for(var n=new Array(i),a=n.length-1;a>=0;a--)n[a]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(new u(n))},n.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},n.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},n.prototype._skipDefault=function(e,t,r){var i,n=this._baseState;if(null===n.default)return!1;var a=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),a.length!==n.defaultBuffer.length)return!1;for(i=0;i<a.length;i++)if(a[i]!==n.defaultBuffer[i])return!1;return!0}},{"../../asn1":1,buffer:48,inherits:104}],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){function i(e){a.call(this,e),this.enc="pem"}var n=e("inherits"),a=e("./der");n(i,a),t.exports=i,i.prototype.encode=function(e,t){for(var r=a.prototype.encode.call(this,e),i=r.toString("base64"),n=["-----BEGIN "+t.label+"-----"],o=0;o<i.length;o+=64)n.push(i.slice(o,o+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},{"./der":12,inherits:104}],15:[function(e,t,r){"use strict";function i(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function n(e){var t=i(e),r=t[0],n=t[1];return 3*(r+n)/4-n}function a(e,t,r){return 3*(t+r)/4-r}function o(e){for(var t,r=i(e),n=r[0],o=r[1],s=new l(a(e,n,o)),u=0,f=o>0?n-4:n,c=0;c<f;c+=4)t=d[e.charCodeAt(c)]<<18|d[e.charCodeAt(c+1)]<<12|d[e.charCodeAt(c+2)]<<6|d[e.charCodeAt(c+3)],s[u++]=t>>16&255,s[u++]=t>>8&255,s[u++]=255&t;return 2===o&&(t=d[e.charCodeAt(c)]<<2|d[e.charCodeAt(c+1)]>>4,s[u++]=255&t),1===o&&(t=d[e.charCodeAt(c)]<<10|d[e.charCodeAt(c+1)]<<4|d[e.charCodeAt(c+2)]>>2,s[u++]=t>>8&255,s[u++]=255&t),s}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function u(e,t,r){for(var i,n=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),n.push(s(i));return n.join("")}function f(e){for(var t,r=e.length,i=r%3,n=[],a=0,o=r-i;a<o;a+=16383)n.push(u(e,a,a+16383>o?o:a+16383));return 1===i?(t=e[r-1],n.push(c[t>>2]+c[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],n.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),n.join("")}r.byteLength=n,r.toByteArray=o,r.fromByteArray=f;for(var c=[],d=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,m=h.length;p<m;++p)c[p]=h[p],d[h.charCodeAt(p)]=p;d["-".charCodeAt(0)]=62,d["_".charCodeAt(0)]=63},{}],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,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}function o(e,t,r){for(var i=0,n=Math.min(e.length,r),a=t;a<n;a++){var o=e.charCodeAt(a)-48;i<<=4,i|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return i}function s(e,t,r,i){for(var n=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;n*=i,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}function u(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}function f(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=0|e.words[0],a=0|t.words[0],o=n*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var f=1;f<i;f++){for(var c=u>>>26,d=67108863&u,l=Math.min(f,t.length-1),h=Math.max(0,f-e.length+1);h<=l;h++){var p=f-h|0;n=0|e.words[p],a=0|t.words[h],o=n*a+d,c+=o/67108864|0,d=67108863&o}r.words[f]=0|d,u=0|c}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}function c(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,a=0;a<r.length-1;a++){var o=n;n=0;for(var s=67108863&i,u=Math.min(a,t.length-1),f=Math.max(0,a-e.length+1);f<=u;f++){var c=a-f,d=0|e.words[c],l=0|t.words[f],h=d*l,p=67108863&h;o=o+(h/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0,n+=o>>>26,o&=67108863}r.words[a]=s,i=o,o=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}function d(e,t,r){return(new l).mulp(e,t,r)}function l(e,t){this.x=e,this.y=t}function h(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){h.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){h.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){h.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function b(){h.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}"object"==typeof t?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var g;try{g=e("buffer").Buffer}catch(e){}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var n=0;"-"===e[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,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,o,s=0;if("be"===r)for(n=e.length-1,a=0;n>=0;n-=3)o=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(n=0,a=0;n<e.length;n+=3)o=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(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,a=0;for(r=e.length-6,i=0;r>=t;r-=6)n=o(e,r,r+6),this.words[i]|=n<<a&67108863,this.words[i+1]|=n>>>26-a&4194303,(a+=24)>=26&&(a-=26,i++);r+6!==t&&(n=o(e,t,r+6),this.words[i]|=n<<a&67108863,this.words[i+1]|=n>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(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;for(var a=e.length-r,o=a%i,u=Math.min(a,a-o)+r,f=0,c=r;c<u;c+=i)f=s(e,c,c+i,t),this.imuln(n),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==o){var d=1;for(f=s(e,c,e.length,t),c=0;c<o;c++)d*=t;this.imuln(d),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},a.prototype.copy=function(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);return this.copy(e),e},a.prototype._expand=function(e){
     2  for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var w=["","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"],E=[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],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];a.prototype.toString=function(e,t){e=e||10,t=0|t||1;var r;if(16===e||"hex"===e){r="";for(var n=0,a=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<n|a)).toString(16);a=s>>>24-n&16777215,r=0!==a||o!==this.length-1?w[6-u.length]+u+r:u+r,n+=2,n>=26&&(n-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var f=E[e],c=S[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var l=d.modn(c).toString(e);d=d.idivn(c),r=d.isZero()?l+r:w[f-l.length]+l+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return i(void 0!==g),this.toArrayLike(g,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),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 o,s,u="le"===t,f=new e(a),c=this.clone();if(u){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),f[s]=o;for(;s<a;s++)f[s]=0}else{for(s=0;s<a-n;s++)f[s]=0;for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),f[a-s-1]=o}return f},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;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(e){return i(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return i(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(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];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return i(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(e){var t;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();var r,i;this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,a=0;a<i.length;a++)t=(0|r.words[a])+(0|i.words[a])+n,this.words[a]=67108863&t,n=t>>>26;for(;0!==n&&a<r.length;a++)t=(0|r.words[a])+n,this.words[a]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)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(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var i,n;r>0?(i=this,n=e):(i=e,n=this);for(var a=0,o=0;o<n.length;o++)t=(0|i.words[o])-(0|n.words[o])+a,a=t>>26,this.words[o]=67108863&t;for(;0!==a&&o<i.length;o++)t=(0|i.words[o])+a,a=t>>26,this.words[o]=67108863&t;if(0===a&&o<i.length&&i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this.length=Math.max(this.length,o),i!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var k=function(e,t,r){var i,n,a,o=e.words,s=t.words,u=r.words,f=0,c=0|o[0],d=8191&c,l=c>>>13,h=0|o[1],p=8191&h,m=h>>>13,_=0|o[2],b=8191&_,y=_>>>13,v=0|o[3],g=8191&v,w=v>>>13,E=0|o[4],S=8191&E,k=E>>>13,T=0|o[5],A=8191&T,R=T>>>13,I=0|o[6],M=8191&I,O=I>>>13,x=0|o[7],D=8191&x,L=x>>>13,N=0|o[8],C=8191&N,P=N>>>13,B=0|o[9],U=8191&B,j=B>>>13,F=0|s[0],G=8191&F,z=F>>>13,X=0|s[1],H=8191&X,V=X>>>13,Y=0|s[2],q=8191&Y,W=Y>>>13,K=0|s[3],Q=8191&K,Z=K>>>13,J=0|s[4],$=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ie=te>>>13,ne=0|s[6],ae=8191&ne,oe=ne>>>13,se=0|s[7],ue=8191&se,fe=se>>>13,ce=0|s[8],de=8191&ce,le=ce>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19,i=Math.imul(d,G),n=Math.imul(d,z),n=n+Math.imul(l,G)|0,a=Math.imul(l,z);var _e=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(p,G),n=Math.imul(p,z),n=n+Math.imul(m,G)|0,a=Math.imul(m,z),i=i+Math.imul(d,H)|0,n=n+Math.imul(d,V)|0,n=n+Math.imul(l,H)|0,a=a+Math.imul(l,V)|0;var be=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(b,G),n=Math.imul(b,z),n=n+Math.imul(y,G)|0,a=Math.imul(y,z),i=i+Math.imul(p,H)|0,n=n+Math.imul(p,V)|0,n=n+Math.imul(m,H)|0,a=a+Math.imul(m,V)|0,i=i+Math.imul(d,q)|0,n=n+Math.imul(d,W)|0,n=n+Math.imul(l,q)|0,a=a+Math.imul(l,W)|0;var ye=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(g,G),n=Math.imul(g,z),n=n+Math.imul(w,G)|0,a=Math.imul(w,z),i=i+Math.imul(b,H)|0,n=n+Math.imul(b,V)|0,n=n+Math.imul(y,H)|0,a=a+Math.imul(y,V)|0,i=i+Math.imul(p,q)|0,n=n+Math.imul(p,W)|0,n=n+Math.imul(m,q)|0,a=a+Math.imul(m,W)|0,i=i+Math.imul(d,Q)|0,n=n+Math.imul(d,Z)|0,n=n+Math.imul(l,Q)|0,a=a+Math.imul(l,Z)|0;var ve=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(S,G),n=Math.imul(S,z),n=n+Math.imul(k,G)|0,a=Math.imul(k,z),i=i+Math.imul(g,H)|0,n=n+Math.imul(g,V)|0,n=n+Math.imul(w,H)|0,a=a+Math.imul(w,V)|0,i=i+Math.imul(b,q)|0,n=n+Math.imul(b,W)|0,n=n+Math.imul(y,q)|0,a=a+Math.imul(y,W)|0,i=i+Math.imul(p,Q)|0,n=n+Math.imul(p,Z)|0,n=n+Math.imul(m,Q)|0,a=a+Math.imul(m,Z)|0,i=i+Math.imul(d,$)|0,n=n+Math.imul(d,ee)|0,n=n+Math.imul(l,$)|0,a=a+Math.imul(l,ee)|0;var ge=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(A,G),n=Math.imul(A,z),n=n+Math.imul(R,G)|0,a=Math.imul(R,z),i=i+Math.imul(S,H)|0,n=n+Math.imul(S,V)|0,n=n+Math.imul(k,H)|0,a=a+Math.imul(k,V)|0,i=i+Math.imul(g,q)|0,n=n+Math.imul(g,W)|0,n=n+Math.imul(w,q)|0,a=a+Math.imul(w,W)|0,i=i+Math.imul(b,Q)|0,n=n+Math.imul(b,Z)|0,n=n+Math.imul(y,Q)|0,a=a+Math.imul(y,Z)|0,i=i+Math.imul(p,$)|0,n=n+Math.imul(p,ee)|0,n=n+Math.imul(m,$)|0,a=a+Math.imul(m,ee)|0,i=i+Math.imul(d,re)|0,n=n+Math.imul(d,ie)|0,n=n+Math.imul(l,re)|0,a=a+Math.imul(l,ie)|0;var we=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(M,G),n=Math.imul(M,z),n=n+Math.imul(O,G)|0,a=Math.imul(O,z),i=i+Math.imul(A,H)|0,n=n+Math.imul(A,V)|0,n=n+Math.imul(R,H)|0,a=a+Math.imul(R,V)|0,i=i+Math.imul(S,q)|0,n=n+Math.imul(S,W)|0,n=n+Math.imul(k,q)|0,a=a+Math.imul(k,W)|0,i=i+Math.imul(g,Q)|0,n=n+Math.imul(g,Z)|0,n=n+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,i=i+Math.imul(b,$)|0,n=n+Math.imul(b,ee)|0,n=n+Math.imul(y,$)|0,a=a+Math.imul(y,ee)|0,i=i+Math.imul(p,re)|0,n=n+Math.imul(p,ie)|0,n=n+Math.imul(m,re)|0,a=a+Math.imul(m,ie)|0,i=i+Math.imul(d,ae)|0,n=n+Math.imul(d,oe)|0,n=n+Math.imul(l,ae)|0,a=a+Math.imul(l,oe)|0;var Ee=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(D,G),n=Math.imul(D,z),n=n+Math.imul(L,G)|0,a=Math.imul(L,z),i=i+Math.imul(M,H)|0,n=n+Math.imul(M,V)|0,n=n+Math.imul(O,H)|0,a=a+Math.imul(O,V)|0,i=i+Math.imul(A,q)|0,n=n+Math.imul(A,W)|0,n=n+Math.imul(R,q)|0,a=a+Math.imul(R,W)|0,i=i+Math.imul(S,Q)|0,n=n+Math.imul(S,Z)|0,n=n+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,i=i+Math.imul(g,$)|0,n=n+Math.imul(g,ee)|0,n=n+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,i=i+Math.imul(b,re)|0,n=n+Math.imul(b,ie)|0,n=n+Math.imul(y,re)|0,a=a+Math.imul(y,ie)|0,i=i+Math.imul(p,ae)|0,n=n+Math.imul(p,oe)|0,n=n+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,i=i+Math.imul(d,ue)|0,n=n+Math.imul(d,fe)|0,n=n+Math.imul(l,ue)|0,a=a+Math.imul(l,fe)|0;var Se=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(C,G),n=Math.imul(C,z),n=n+Math.imul(P,G)|0,a=Math.imul(P,z),i=i+Math.imul(D,H)|0,n=n+Math.imul(D,V)|0,n=n+Math.imul(L,H)|0,a=a+Math.imul(L,V)|0,i=i+Math.imul(M,q)|0,n=n+Math.imul(M,W)|0,n=n+Math.imul(O,q)|0,a=a+Math.imul(O,W)|0,i=i+Math.imul(A,Q)|0,n=n+Math.imul(A,Z)|0,n=n+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,i=i+Math.imul(S,$)|0,n=n+Math.imul(S,ee)|0,n=n+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,i=i+Math.imul(g,re)|0,n=n+Math.imul(g,ie)|0,n=n+Math.imul(w,re)|0,a=a+Math.imul(w,ie)|0,i=i+Math.imul(b,ae)|0,n=n+Math.imul(b,oe)|0,n=n+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,i=i+Math.imul(p,ue)|0,n=n+Math.imul(p,fe)|0,n=n+Math.imul(m,ue)|0,a=a+Math.imul(m,fe)|0,i=i+Math.imul(d,de)|0,n=n+Math.imul(d,le)|0,n=n+Math.imul(l,de)|0,a=a+Math.imul(l,le)|0;var ke=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(U,G),n=Math.imul(U,z),n=n+Math.imul(j,G)|0,a=Math.imul(j,z),i=i+Math.imul(C,H)|0,n=n+Math.imul(C,V)|0,n=n+Math.imul(P,H)|0,a=a+Math.imul(P,V)|0,i=i+Math.imul(D,q)|0,n=n+Math.imul(D,W)|0,n=n+Math.imul(L,q)|0,a=a+Math.imul(L,W)|0,i=i+Math.imul(M,Q)|0,n=n+Math.imul(M,Z)|0,n=n+Math.imul(O,Q)|0,a=a+Math.imul(O,Z)|0,i=i+Math.imul(A,$)|0,n=n+Math.imul(A,ee)|0,n=n+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,i=i+Math.imul(S,re)|0,n=n+Math.imul(S,ie)|0,n=n+Math.imul(k,re)|0,a=a+Math.imul(k,ie)|0,i=i+Math.imul(g,ae)|0,n=n+Math.imul(g,oe)|0,n=n+Math.imul(w,ae)|0,a=a+Math.imul(w,oe)|0,i=i+Math.imul(b,ue)|0,n=n+Math.imul(b,fe)|0,n=n+Math.imul(y,ue)|0,a=a+Math.imul(y,fe)|0,i=i+Math.imul(p,de)|0,n=n+Math.imul(p,le)|0,n=n+Math.imul(m,de)|0,a=a+Math.imul(m,le)|0,i=i+Math.imul(d,pe)|0,n=n+Math.imul(d,me)|0,n=n+Math.imul(l,pe)|0,a=a+Math.imul(l,me)|0;var Te=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(U,H),n=Math.imul(U,V),n=n+Math.imul(j,H)|0,a=Math.imul(j,V),i=i+Math.imul(C,q)|0,n=n+Math.imul(C,W)|0,n=n+Math.imul(P,q)|0,a=a+Math.imul(P,W)|0,i=i+Math.imul(D,Q)|0,n=n+Math.imul(D,Z)|0,n=n+Math.imul(L,Q)|0,a=a+Math.imul(L,Z)|0,i=i+Math.imul(M,$)|0,n=n+Math.imul(M,ee)|0,n=n+Math.imul(O,$)|0,a=a+Math.imul(O,ee)|0,i=i+Math.imul(A,re)|0,n=n+Math.imul(A,ie)|0,n=n+Math.imul(R,re)|0,a=a+Math.imul(R,ie)|0,i=i+Math.imul(S,ae)|0,n=n+Math.imul(S,oe)|0,n=n+Math.imul(k,ae)|0,a=a+Math.imul(k,oe)|0,i=i+Math.imul(g,ue)|0,n=n+Math.imul(g,fe)|0,n=n+Math.imul(w,ue)|0,a=a+Math.imul(w,fe)|0,i=i+Math.imul(b,de)|0,n=n+Math.imul(b,le)|0,n=n+Math.imul(y,de)|0,a=a+Math.imul(y,le)|0,i=i+Math.imul(p,pe)|0,n=n+Math.imul(p,me)|0,n=n+Math.imul(m,pe)|0,a=a+Math.imul(m,me)|0;var Ae=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(U,q),n=Math.imul(U,W),n=n+Math.imul(j,q)|0,a=Math.imul(j,W),i=i+Math.imul(C,Q)|0,n=n+Math.imul(C,Z)|0,n=n+Math.imul(P,Q)|0,a=a+Math.imul(P,Z)|0,i=i+Math.imul(D,$)|0,n=n+Math.imul(D,ee)|0,n=n+Math.imul(L,$)|0,a=a+Math.imul(L,ee)|0,i=i+Math.imul(M,re)|0,n=n+Math.imul(M,ie)|0,n=n+Math.imul(O,re)|0,a=a+Math.imul(O,ie)|0,i=i+Math.imul(A,ae)|0,n=n+Math.imul(A,oe)|0,n=n+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,i=i+Math.imul(S,ue)|0,n=n+Math.imul(S,fe)|0,n=n+Math.imul(k,ue)|0,a=a+Math.imul(k,fe)|0,i=i+Math.imul(g,de)|0,n=n+Math.imul(g,le)|0,n=n+Math.imul(w,de)|0,a=a+Math.imul(w,le)|0,i=i+Math.imul(b,pe)|0,n=n+Math.imul(b,me)|0,n=n+Math.imul(y,pe)|0,a=a+Math.imul(y,me)|0;var Re=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul(U,Q),n=Math.imul(U,Z),n=n+Math.imul(j,Q)|0,a=Math.imul(j,Z),i=i+Math.imul(C,$)|0,n=n+Math.imul(C,ee)|0,n=n+Math.imul(P,$)|0,a=a+Math.imul(P,ee)|0,i=i+Math.imul(D,re)|0,n=n+Math.imul(D,ie)|0,n=n+Math.imul(L,re)|0,a=a+Math.imul(L,ie)|0,i=i+Math.imul(M,ae)|0,n=n+Math.imul(M,oe)|0,n=n+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,i=i+Math.imul(A,ue)|0,n=n+Math.imul(A,fe)|0,n=n+Math.imul(R,ue)|0,a=a+Math.imul(R,fe)|0,i=i+Math.imul(S,de)|0,n=n+Math.imul(S,le)|0,n=n+Math.imul(k,de)|0,a=a+Math.imul(k,le)|0,i=i+Math.imul(g,pe)|0,n=n+Math.imul(g,me)|0,n=n+Math.imul(w,pe)|0,a=a+Math.imul(w,me)|0;var Ie=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(U,$),n=Math.imul(U,ee),n=n+Math.imul(j,$)|0,a=Math.imul(j,ee),i=i+Math.imul(C,re)|0,n=n+Math.imul(C,ie)|0,n=n+Math.imul(P,re)|0,a=a+Math.imul(P,ie)|0,i=i+Math.imul(D,ae)|0,n=n+Math.imul(D,oe)|0,n=n+Math.imul(L,ae)|0,a=a+Math.imul(L,oe)|0,i=i+Math.imul(M,ue)|0,n=n+Math.imul(M,fe)|0,n=n+Math.imul(O,ue)|0,a=a+Math.imul(O,fe)|0,i=i+Math.imul(A,de)|0,n=n+Math.imul(A,le)|0,n=n+Math.imul(R,de)|0,a=a+Math.imul(R,le)|0,i=i+Math.imul(S,pe)|0,n=n+Math.imul(S,me)|0,n=n+Math.imul(k,pe)|0,a=a+Math.imul(k,me)|0;var Me=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(U,re),n=Math.imul(U,ie),n=n+Math.imul(j,re)|0,a=Math.imul(j,ie),i=i+Math.imul(C,ae)|0,n=n+Math.imul(C,oe)|0,n=n+Math.imul(P,ae)|0,a=a+Math.imul(P,oe)|0,i=i+Math.imul(D,ue)|0,n=n+Math.imul(D,fe)|0,n=n+Math.imul(L,ue)|0,a=a+Math.imul(L,fe)|0,i=i+Math.imul(M,de)|0,n=n+Math.imul(M,le)|0,n=n+Math.imul(O,de)|0,a=a+Math.imul(O,le)|0,i=i+Math.imul(A,pe)|0,n=n+Math.imul(A,me)|0,n=n+Math.imul(R,pe)|0,a=a+Math.imul(R,me)|0;var Oe=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul(U,ae),n=Math.imul(U,oe),n=n+Math.imul(j,ae)|0,a=Math.imul(j,oe),i=i+Math.imul(C,ue)|0,n=n+Math.imul(C,fe)|0,n=n+Math.imul(P,ue)|0,a=a+Math.imul(P,fe)|0,i=i+Math.imul(D,de)|0,n=n+Math.imul(D,le)|0,n=n+Math.imul(L,de)|0,a=a+Math.imul(L,le)|0,i=i+Math.imul(M,pe)|0,n=n+Math.imul(M,me)|0,n=n+Math.imul(O,pe)|0,a=a+Math.imul(O,me)|0;var xe=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(U,ue),n=Math.imul(U,fe),n=n+Math.imul(j,ue)|0,a=Math.imul(j,fe),i=i+Math.imul(C,de)|0,n=n+Math.imul(C,le)|0,n=n+Math.imul(P,de)|0,a=a+Math.imul(P,le)|0,i=i+Math.imul(D,pe)|0,n=n+Math.imul(D,me)|0,n=n+Math.imul(L,pe)|0,a=a+Math.imul(L,me)|0;var De=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(U,de),n=Math.imul(U,le),n=n+Math.imul(j,de)|0,a=Math.imul(j,le),i=i+Math.imul(C,pe)|0,n=n+Math.imul(C,me)|0,n=n+Math.imul(P,pe)|0,a=a+Math.imul(P,me)|0;var Le=(f+i|0)+((8191&n)<<13)|0;f=(a+(n>>>13)|0)+(Le>>>26)|0,Le&=67108863,i=Math.imul(U,pe),n=Math.imul(U,me),n=n+Math.imul(j,pe)|0,a=Math.imul(j,me);var Ne=(f+i|0)+((8191&n)<<13)|0;return f=(a+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=_e,u[1]=be,u[2]=ye,u[3]=ve,u[4]=ge,u[5]=we,u[6]=Ee,u[7]=Se,u[8]=ke,u[9]=Te,u[10]=Ae,u[11]=Re,u[12]=Ie,u[13]=Me,u[14]=Oe,u[15]=xe,u[16]=De,u[17]=Le,u[18]=Ne,0!==f&&(u[19]=f,r.length++),r};Math.imul||(k=f),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?k(this,e,t):r<63?f(this,e,t):r<1024?c(this,e,t):d(this,e,t)},l.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},l.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},l.prototype.permute=function(e,t,r,i,n,a){for(var o=0;o<a;o++)i[o]=t[e[o]],n[o]=r[e[o]]},l.prototype.transform=function(e,t,r,i,n,a){this.permute(a,e,t,r,i,n);for(var o=1;o<n;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),f=Math.sin(2*Math.PI/s),c=0;c<n;c+=s)for(var d=u,l=f,h=0;h<o;h++){var p=r[c+h],m=i[c+h],_=r[c+h+o],b=i[c+h+o],y=d*_-l*b;b=d*b+l*_,_=y,r[c+h]=p+_,i[c+h]=m+b,r[c+h+o]=p-_,i[c+h+o]=m-b,h!==s&&(y=u*d-f*l,l=u*l+f*d,d=y)}},l.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},l.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},l.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},l.prototype.convert13b=function(e,t,r,n){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<n;++o)r[o]=0;i(0===a),i(0==(-8192&a))},l.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},l.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),a=this.stub(i),o=new Array(i),s=new Array(i),u=new Array(i),f=new Array(i),c=new Array(i),d=new Array(i),l=r.words;l.length=i,this.convert13b(e.words,e.length,o,i),this.convert13b(t.words,t.length,f,i),this.transform(o,a,s,u,i,n),this.transform(f,a,c,d,i,n);for(var h=0;h<i;h++){var p=s[h]*c[h]-u[h]*d[h];u[h]=s[h]*d[h]+u[h]*c[h],s[h]=p}return this.conjugate(s,u,i),this.transform(s,u,l,a,i,n),this.conjugate(l,a,i),this.normalize13b(l,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),d(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864);for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,a=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=u(e);if(0===t.length)return new a(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var n=r.sqr();i<t.length;i++,n=n.sqr())0!==t[i]&&(r=r.mul(n));return r},a.prototype.iushln=function(e){i("number"==typeof e&&e>=0);var t,r=e%26,n=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,u=(0|this.words[t])-s<<r;this.words[t]=u|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){i("number"==typeof e&&e>=0);var n;n=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,u=r;if(n-=o,n=Math.max(0,n),u){for(var f=0;f<o;f++)u.words[f]=this.words[f];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,f=0;f<this.length;f++)this.words[f]=this.words[f+o];else this.words[0]=0,this.length=1;var c=0;for(f=this.length-1;f>=0&&(0!==c||f>=n);f--){var d=0|this.words[f];this.words[f]=c<<26-a|d>>>a,c=d&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<<t;return!(this.length<=r)&&!!(this.words[r]&n)},a.prototype.imaskn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var n,a=e.length+r;this._expand(a);var o,s=0;for(n=0;n<e.length;n++){o=(0|this.words[n+r])+s;var u=(0|e.words[n])*t;o-=67108863&u,s=(o>>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)o=(0|this.words[n+r])+s,s=o>>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n<this.length;n++)o=-(0|this.words[n])+s,s=o>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,i=this.clone(),n=e,o=0|n.words[n.length-1];0!==(r=26-this._countBits(o))&&(n=n.ushln(r),i.iushln(r),o=0|n.words[n.length-1]);var s,u=i.length-n.length;if("mod"!==t){s=new a(null),s.length=u+1,s.words=new Array(s.length);for(var f=0;f<s.length;f++)s.words[f]=0}var c=i.clone()._ishlnsubmul(n,1,u);0===c.negative&&(i=c,s&&(s.words[u]=1));for(var d=u-1;d>=0;d--){var l=67108864*(0|i.words[n.length+d])+(0|i.words[n.length+d-1]);for(l=Math.min(l/o|0,67108863),i._ishlnsubmul(n,l,d);0!==i.negative;)l--,i.negative=0,i._ishlnsubmul(n,1,d),i.isZero()||(i.negative^=1);s&&(s.words[d]=l)}return s&&s.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},a.prototype.divmod=function(e,t,r){if(i(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var n,o,s;return 0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},a.prototype.idivn=function(e){i(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t;this.words[r]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),o=new a(0),s=new a(0),u=new a(1),f=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++f;for(var c=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(c),o.isub(d)),n.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(d)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(s),o.isub(u)):(r.isub(t),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:r.iushln(f)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),o=new a(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)n.isOdd()&&n.iadd(s),n.iushrn(1);for(var c=0,d=1;0==(r.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(o)):(r.isub(t),o.isub(n))}var l;return l=0===t.cmpn(1)?n:o,l.cmpn(0)<0&&l.iadd(e),l},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var a=t;t=r,r=a}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var a=n,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(this.length>1)r=1;else{t&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];r=n===e?0:n<e?-1:1}return 0!==this.negative?0|-r:r},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new y(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){
     3  return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var T={k256:null,p224:null,p192:null,p25519:null};h.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},h.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):r.strip(),r},h.prototype.split=function(e,t){e.iushrn(this.n,0,t)},h.prototype.imulK=function(e){return e.imul(this.k)},n(p,h),p.prototype.split=function(e,t){for(var r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var n=e.words[9];for(t.words[t.length++]=4194303&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(4194303&a)<<4|n>>>22,n=a}n>>>=22,e.words[i-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},p.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(m,h),n(_,h),n(b,h),b.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(T[e])return T[e];var t;if("k256"===e)t=new p;else if("p224"===e)t=new m;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new b}return T[e]=t,t},y.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},y.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},y.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},y.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},y.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},y.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},y.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);i(!n.isZero());var s=new a(1).toRed(this),u=s.redNeg(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,f).cmp(u);)c.redIAdd(u);for(var d=this.pow(c,n),l=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),p=o;0!==h.cmp(s);){for(var m=h,_=0;0!==m.cmp(s);_++)m=m.redSqr();i(_<p);var b=this.pow(d,new a(1).iushln(p-_-1));l=l.redMul(b),d=b.redSqr(),h=h.redMul(d),p=_}return l},y.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},y.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var n=r[0],o=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var f=t.words[i],c=u-1;c>=0;c--){var d=f>>c&1;n!==r[0]&&(n=this.sqr(n)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===i&&0===c)&&(n=this.mul(n,r[o]),s=0,o=0)):s=0}u=26}return n},y.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},y.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new v(e)},n(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},v.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},v.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:18}],17:[function(e,t,r){function i(e){this.rand=e}var n;if(t.exports=function(e){return n||(n=new i(null)),n.generate(e)},t.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=e("crypto");if("function"!=typeof a.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return a.randomBytes(e)}}catch(e){}},{crypto:18}],18:[function(e,t,r){},{}],19:[function(e,t,r){function i(e){s.isBuffer(e)||(e=s.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function n(e){for(;0<e.length;e++)e[0]=0}function a(e,t,r,i,n){for(var a,o,s,u,f=r[0],c=r[1],d=r[2],l=r[3],h=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],_=e[3]^t[3],b=4,y=1;y<n;y++)a=f[h>>>24]^c[p>>>16&255]^d[m>>>8&255]^l[255&_]^t[b++],o=f[p>>>24]^c[m>>>16&255]^d[_>>>8&255]^l[255&h]^t[b++],s=f[m>>>24]^c[_>>>16&255]^d[h>>>8&255]^l[255&p]^t[b++],u=f[_>>>24]^c[h>>>16&255]^d[p>>>8&255]^l[255&m]^t[b++],h=a,p=o,m=s,_=u;return a=(i[h>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&_])^t[b++],o=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[_>>>8&255]<<8|i[255&h])^t[b++],s=(i[m>>>24]<<24|i[_>>>16&255]<<16|i[h>>>8&255]<<8|i[255&p])^t[b++],u=(i[_>>>24]<<24|i[h>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^t[b++],a>>>=0,o>>>=0,s>>>=0,u>>>=0,[a,o,s,u]}function o(e){this._key=i(e),this._reset()}var s=e("safe-buffer").Buffer,u=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],a=[[],[],[],[]],o=0,s=0,u=0;u<256;++u){var f=s^s<<1^s<<2^s<<3^s<<4;f=f>>>8^255&f^99,r[o]=f,i[f]=o;var c=e[o],d=e[c],l=e[d],h=257*e[f]^16843008*f;n[0][o]=h<<24|h>>>8,n[1][o]=h<<16|h>>>16,n[2][o]=h<<8|h>>>24,n[3][o]=h,h=16843009*l^65537*d^257*c^16843008*o,a[0][f]=h<<24|h>>>8,a[1][f]=h<<16|h>>>16,a[2][f]=h<<8|h>>>24,a[3][f]=h,0===o?o=s=1:(o=c^e[e[e[l^c]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}}();o.blockSize=16,o.keySize=32,o.prototype.blockSize=o.blockSize,o.prototype.keySize=o.keySize,o.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=4*(r+1),n=[],a=0;a<t;a++)n[a]=e[a];for(a=t;a<i;a++){var o=n[a-1];a%t==0?(o=o<<8|o>>>24,o=f.SBOX[o>>>24]<<24|f.SBOX[o>>>16&255]<<16|f.SBOX[o>>>8&255]<<8|f.SBOX[255&o],o^=u[a/t|0]<<24):t>6&&a%t==4&&(o=f.SBOX[o>>>24]<<24|f.SBOX[o>>>16&255]<<16|f.SBOX[o>>>8&255]<<8|f.SBOX[255&o]),n[a]=n[a-t]^o}for(var s=[],c=0;c<i;c++){var d=i-c,l=n[d-(c%4?0:4)];s[c]=c<4||d<=4?l:f.INV_SUB_MIX[0][f.SBOX[l>>>24]]^f.INV_SUB_MIX[1][f.SBOX[l>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[l>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&l]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=s},o.prototype.encryptBlockRaw=function(e){return e=i(e),a(e,this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},o.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=s.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},o.prototype.decryptBlock=function(e){e=i(e);var t=e[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),n=s.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n},o.prototype.scrub=function(){n(this._keySchedule),n(this._invKeySchedule),n(this._key)},t.exports.AES=o},{"safe-buffer":132}],20:[function(e,t,r){function i(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=0;n<i;++n)r+=e[n]^t[n];return r}function n(e,t,r){if(12===t.length)return e._finID=s.concat([t,s.from([0,0,0,1])]),s.concat([t,s.from([0,0,0,2])]);var i=new c(r),n=t.length,a=n%16;i.update(t),a&&(a=16-a,i.update(s.alloc(a,0))),i.update(s.alloc(8,0));var o=8*n,u=s.alloc(8);u.writeUIntBE(o,0,8),i.update(u),e._finID=i.state;var f=s.from(e._finID);return l(f),f}function a(e,t,r,i){u.call(this);var a=s.alloc(4,0);this._cipher=new o.AES(t);var f=this._cipher.encryptBlock(a);this._ghash=new c(f),r=n(this,r,f),this._prev=s.from(r),this._cache=s.allocUnsafe(0),this._secCache=s.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}var o=e("./aes"),s=e("safe-buffer").Buffer,u=e("cipher-base"),f=e("inherits"),c=e("./ghash"),d=e("buffer-xor"),l=e("./incr32");f(a,u),a.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=s.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},a.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=d(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&i(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},a.prototype.getAuthTag=function(){if(this._decrypt||!s.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},a.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},a.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},t.exports=a},{"./aes":19,"./ghash":24,"./incr32":25,"buffer-xor":47,"cipher-base":50,inherits:104,"safe-buffer":132}],21:[function(e,t,r){function i(){return Object.keys(o)}var n=e("./encrypter"),a=e("./decrypter"),o=e("./modes/list.json");r.createCipher=r.Cipher=n.createCipher,r.createCipheriv=r.Cipheriv=n.createCipheriv,r.createDecipher=r.Decipher=a.createDecipher,r.createDecipheriv=r.Decipheriv=a.createDecipheriv,r.listCiphers=r.getCiphers=i},{"./decrypter":22,"./encrypter":23,"./modes/list.json":33}],22:[function(e,t,r){function i(e,t,r){l.call(this),this._cache=new n,this._last=void 0,this._cipher=new h.AES(t),this._prev=f.from(r),this._mode=e,this._autopadding=!0}function n(){this.cache=f.allocUnsafe(0)}function a(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}function o(e,t,r){var n=c[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=f.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=f.from(t)),t.length!==n.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===n.type?new d(n.module,t,r,!0):"auth"===n.type?new u(n.module,t,r,!0):new i(n.module,t,r)}function s(e,t){var r=c[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=p(t,!1,r.key,r.iv);return o(e,i.key,i.iv)}var u=e("./authCipher"),f=e("safe-buffer").Buffer,c=e("./modes"),d=e("./streamCipher"),l=e("cipher-base"),h=e("./aes"),p=e("evp_bytestokey");e("inherits")(i,l),i.prototype._update=function(e){this._cache.add(e);for(var t,r,i=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),i.push(r);return f.concat(i)},i.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return a(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},n.prototype.add=function(e){this.cache=f.concat([this.cache,e])},n.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},n.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=s,r.createDecipheriv=o},{"./aes":19,"./authCipher":20,"./modes":32,"./streamCipher":35,"cipher-base":50,evp_bytestokey:86,inherits:104,"safe-buffer":132}],23:[function(e,t,r){function i(e,t,r){d.call(this),this._cache=new n,this._cipher=new l.AES(t),this._prev=f.from(r),this._mode=e,this._autopadding=!0}function n(){this.cache=f.allocUnsafe(0)}function a(e,t,r){var n=s[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=f.from(t)),t.length!==n.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=f.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===n.type?new c(n.module,t,r):"auth"===n.type?new u(n.module,t,r):new i(n.module,t,r)}function o(e,t){var r=s[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=h(t,!1,r.key,r.iv);return a(e,i.key,i.iv)}var s=e("./modes"),u=e("./authCipher"),f=e("safe-buffer").Buffer,c=e("./streamCipher"),d=e("cipher-base"),l=e("./aes"),h=e("evp_bytestokey");e("inherits")(i,d),i.prototype._update=function(e){this._cache.add(e);for(var t,r,i=[];t=this._cache.get();)r=this._mode.encrypt(this,t),i.push(r);return f.concat(i)};var p=f.alloc(16,16);i.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(p))throw this._cipher.scrub(),new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},n.prototype.add=function(e){this.cache=f.concat([this.cache,e])},n.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},n.prototype.flush=function(){for(var e=16-this.cache.length,t=f.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return f.concat([this.cache,t])},r.createCipheriv=a,r.createCipher=o},{"./aes":19,"./authCipher":20,"./modes":32,"./streamCipher":35,"cipher-base":50,evp_bytestokey:86,inherits:104,"safe-buffer":132}],24:[function(e,t,r){function i(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function n(e){var t=o.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=o.alloc(16,0),this.cache=o.allocUnsafe(0)}var o=e("safe-buffer").Buffer,s=o.alloc(16,0);a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},a.prototype._multiply=function(){for(var e,t,r,a=i(this.h),o=[0,0,0,0],s=-1;++s<128;){for(t=0!=(this.state[~~(s/8)]&1<<7-s%8),t&&(o[0]^=a[0],o[1]^=a[1],o[2]^=a[2],o[3]^=a[3]),r=0!=(1&a[3]),e=3;e>0;e--)a[e]=a[e]>>>1|(1&a[e-1])<<31;a[0]=a[0]>>>1,r&&(a[0]=a[0]^225<<24)}this.state=n(o)},a.prototype.update=function(e){this.cache=o.concat([this.cache,e]);for(var t;this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(o.concat([this.cache,s],16)),this.ghash(n([0,e,0,t])),this.state},t.exports=a},{"safe-buffer":132}],25:[function(e,t,r){function i(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}t.exports=i},{}],26:[function(e,t,r){var i=e("buffer-xor");r.encrypt=function(e,t){var r=i(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return i(n,r)}},{"buffer-xor":47}],27:[function(e,t,r){function i(e,t,r){var i=t.length,o=a(t,e._cache);return e._cache=e._cache.slice(i),e._prev=n.concat([e._prev,r?t:o]),o}var n=e("safe-buffer").Buffer,a=e("buffer-xor");r.encrypt=function(e,t,r){for(var a,o=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){o=n.concat([o,i(e,t,r)]);break}a=e._cache.length,o=n.concat([o,i(e,t.slice(0,a),r)]),t=t.slice(a)}return o}},{"buffer-xor":47,"safe-buffer":132}],28:[function(e,t,r){function i(e,t,r){for(var i,a,o,s=-1,u=0;++s<8;)i=e._cipher.encryptBlock(e._prev),a=t&1<<7-s?128:0,o=i[0]^a,u+=(128&o)>>s%8,e._prev=n(e._prev,r?a:o);return u}function n(e,t){var r=e.length,i=-1,n=a.allocUnsafe(e.length);for(e=a.concat([e,a.from([t])]);++i<r;)n[i]=e[i]<<1|e[i+1]>>7;return n}var a=e("safe-buffer").Buffer;r.encrypt=function(e,t,r){for(var n=t.length,o=a.allocUnsafe(n),s=-1;++s<n;)o[s]=i(e,t[s],r);return o}},{"safe-buffer":132}],29:[function(e,t,r){function i(e,t,r){var i=e._cipher.encryptBlock(e._prev),a=i[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:a])]),a}var n=e("safe-buffer").Buffer;r.encrypt=function(e,t,r){for(var a=t.length,o=n.allocUnsafe(a),s=-1;++s<a;)o[s]=i(e,t[s],r);return o}},{"safe-buffer":132}],30:[function(e,t,r){function i(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}var n=e("buffer-xor"),a=e("safe-buffer").Buffer,o=e("../incr32");r.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=a.concat([e._cache,a.allocUnsafe(16*r)]);for(var s=0;s<r;s++){var u=i(e),f=o+16*s;e._cache.writeUInt32BE(u[0],f+0),e._cache.writeUInt32BE(u[1],f+4),e._cache.writeUInt32BE(u[2],f+8),e._cache.writeUInt32BE(u[3],f+12)}var c=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,c)}},{"../incr32":25,"buffer-xor":47,"safe-buffer":132}],31:[function(e,t,r){r.encrypt=function(e,t){return e._cipher.encryptBlock(t)},r.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},{}],32:[function(e,t,r){var i={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")},n=e("./list.json");for(var a in n)n[a].module=i[n[a].mode];t.exports=n},{"./cbc":26,"./cfb":27,"./cfb1":28,"./cfb8":29,"./ctr":30,"./ecb":31,"./list.json":33,"./ofb":34}],33:[function(e,t,r){t.exports={"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"}}},{}],34:[function(e,t,r){(function(t){function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}var n=e("buffer-xor");r.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var a=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,a)}}).call(this,e("buffer").Buffer)},{buffer:48,"buffer-xor":47}],35:[function(e,t,r){function i(e,t,r,i){o.call(this),this._cipher=new n.AES(t),this._prev=a.from(r),this._cache=a.allocUnsafe(0),this._secCache=a.allocUnsafe(0),this._decrypt=i,this._mode=e}var n=e("./aes"),a=e("safe-buffer").Buffer,o=e("cipher-base");e("inherits")(i,o),i.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},i.prototype._final=function(){this._cipher.scrub()},t.exports=i},{"./aes":19,"cipher-base":50,inherits:104,"safe-buffer":132}],36:[function(e,t,r){function i(e,t){e=e.toLowerCase();var r,i;if(c[e])r=c[e].key,i=c[e].iv;else{if(!d[e])throw new TypeError("invalid suite type");r=8*d[e].key,i=d[e].iv}var n=l(t,!1,r,i);return a(e,n.key,n.iv)}function n(e,t){e=e.toLowerCase();var r,i;if(c[e])r=c[e].key,i=c[e].iv;else{if(!d[e])throw new TypeError("invalid suite type");r=8*d[e].key,i=d[e].iv}var n=l(t,!1,r,i);return o(e,n.key,n.iv)}function a(e,t,r){if(e=e.toLowerCase(),c[e])return f.createCipheriv(e,t,r);if(d[e])return new u({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function o(e,t,r){if(e=e.toLowerCase(),c[e])return f.createDecipheriv(e,t,r);if(d[e])return new u({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}function s(){return Object.keys(d).concat(f.getCiphers())}var u=e("browserify-des"),f=e("browserify-aes/browser"),c=e("browserify-aes/modes"),d=e("browserify-des/modes"),l=e("evp_bytestokey");r.createCipher=r.Cipher=i,r.createCipheriv=r.Cipheriv=a,r.createDecipher=r.Decipher=n,r.createDecipheriv=r.Decipheriv=o,r.listCiphers=r.getCiphers=s},{"browserify-aes/browser":21,"browserify-aes/modes":32,"browserify-des":37,"browserify-des/modes":38,evp_bytestokey:86}],37:[function(e,t,r){(function(r){function i(e){n.call(this);var t,i=e.mode.toLowerCase(),a=s[i];t=e.decrypt?"decrypt":"encrypt";var o=e.key;"des-ede"!==i&&"des-ede-cbc"!==i||(o=r.concat([o,o.slice(0,8)]));var u=e.iv;this._des=a.create({key:o,iv:u,type:t})}var n=e("cipher-base"),a=e("des.js"),o=e("inherits"),s={"des-ede3-cbc":a.CBC.instantiate(a.EDE),"des-ede3":a.EDE,"des-ede-cbc":a.CBC.instantiate(a.EDE),"des-ede":a.EDE,"des-cbc":a.CBC.instantiate(a.DES),"des-ecb":a.DES};s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],t.exports=i,o(i,n),i.prototype._update=function(e){return new r(this._des.update(e))},i.prototype._final=function(){return new r(this._des.final())}}).call(this,e("buffer").Buffer)},{buffer:48,"cipher-base":50,"des.js":58,inherits:104}],38:[function(e,t,r){r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}},{}],39:[function(e,t,r){(function(r){function i(e){var t=a(e);return{blinder:t.toRed(o.mont(e.modulus)).redPow(new o(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}function n(e,t){var n=i(t),a=t.modulus.byteLength(),s=(o.mont(t.modulus),new o(e).mul(n.blinder).umod(t.modulus)),u=s.toRed(o.mont(t.prime1)),f=s.toRed(o.mont(t.prime2)),c=t.coefficient,d=t.prime1,l=t.prime2,h=u.redPow(t.exponent1),p=f.redPow(t.exponent2);h=h.fromRed(),p=p.fromRed();var m=h.isub(p).imul(c).umod(d);return m.imul(l),p.iadd(m),new r(p.imul(n.unblinder).umod(t.modulus).toArray(!1,a))}function a(e){for(var t=e.modulus.byteLength(),r=new o(s(t));r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new o(s(t));return r}var o=e("bn.js"),s=e("randombytes");t.exports=n,n.getr=a}).call(this,e("buffer").Buffer)},{"bn.js":16,buffer:48,randombytes:129}],40:[function(e,t,r){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":41}],41:[function(e,t,r){t.exports={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"}}},{}],42:[function(e,t,r){t.exports={"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"}},{}],43:[function(e,t,r){(function(r){function i(e){u.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function n(e){u.Writable.call(this);var t=l[e];if(!t)throw new Error("Unknown message digest");this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function a(e){return new i(e)}function o(e){return new n(e)}var s=e("create-hash"),u=e("stream"),f=e("inherits"),c=e("./sign"),d=e("./verify"),l=e("./algorithms.json");Object.keys(l).forEach(function(e){l[e].id=new r(l[e].id,"hex"),l[e.toLowerCase()]=l[e]}),f(i,u.Writable),i.prototype._write=function(e,t,r){this._hash.update(e),r()},i.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},i.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),i=c(r,e,this._hashType,this._signType,this._tag);return t?i.toString(t):i},f(n,u.Writable),n.prototype._write=function(e,t,r){this._hash.update(e),r()},n.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},n.prototype.verify=function(e,t,i){"string"==typeof t&&(t=new r(t,i)),this.end();var n=this._hash.digest();return d(t,n,e,this._signType,this._tag)},t.exports={Sign:a,Verify:o,createSign:a,createVerify:o}}).call(this,e("buffer").Buffer)},{"./algorithms.json":41,"./sign":44,"./verify":45,buffer:48,"create-hash":53,inherits:104,stream:141}],44:[function(e,t,r){(function(r){function i(e,t,i,o,s){var u=_(t);if(u.curve){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");return n(e,u)}if("dsa"===u.type){if("dsa"!==o)throw new Error("wrong private key type");return a(e,u,i)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");e=r.concat([s,e]);for(var f=u.modulus.byteLength(),c=[0,1];e.length+c.length+1<f;)c.push(255);c.push(0);for(var d=-1;++d<e.length;)c.push(e[d]);return h(c,u)}function n(e,t){var i=b[t.curve.join(".")];if(!i)throw new Error("unknown curve "+t.curve.join("."));var n=new p(i),a=n.keyFromPrivate(t.privateKey),o=a.sign(e);return new r(o.toDER())}function a(e,t,r){for(var i,n=t.params.priv_key,a=t.params.p,f=t.params.q,l=t.params.g,h=new m(0),p=u(e,f).mod(f),_=!1,b=s(n,f,e,r);!1===_;)i=c(f,b,r),h=d(l,i,a,f),_=i.invm(f).imul(p.add(n.mul(h))).mod(f),0===_.cmpn(0)&&(_=!1,h=new m(0));return o(h,_)}function o(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var i=e.length+t.length+4,n=[48,i,2,e.length];return n=n.concat(e,[2,t.length],t),new r(n)}function s(e,t,i,n){if(e=new r(e.toArray()),e.length<t.byteLength()){var a=new r(t.byteLength()-e.length);a.fill(0),e=r.concat([a,e])}var o=i.length,s=f(i,t),u=new r(o);u.fill(1);var c=new r(o);return c.fill(0),c=l(n,c).update(u).update(new r([0])).update(e).update(s).digest(),u=l(n,c).update(u).digest(),c=l(n,c).update(u).update(new r([1])).update(e).update(s).digest(),u=l(n,c).update(u).digest(),{k:c,v:u}}function u(e,t){var r=new m(e),i=(e.length<<3)-t.bitLength();return i>0&&r.ishrn(i),r}function f(e,t){e=u(e,t),e=e.mod(t);var i=new r(e.toArray());if(i.length<t.byteLength()){var n=new r(t.byteLength()-i.length);n.fill(0),i=r.concat([n,i])}return i}function c(e,t,i){var n,a;do{for(n=new r(0);8*n.length<e.bitLength();)t.v=l(i,t.k).update(t.v).digest(),n=r.concat([n,t.v]);a=u(n,e),t.k=l(i,t.k).update(t.v).update(new r([0])).digest(),t.v=l(i,t.k).update(t.v).digest()}while(-1!==a.cmp(e));return a}function d(e,t,r,i){return e.toRed(m.mont(r)).redPow(t).fromRed().mod(i)}var l=e("create-hmac"),h=e("browserify-rsa"),p=e("elliptic").ec,m=e("bn.js"),_=e("parse-asn1"),b=e("./curves.json");t.exports=i,t.exports.getKey=s,t.exports.makeKey=c}).call(this,e("buffer").Buffer)},{"./curves.json":42,"bn.js":16,"browserify-rsa":39,buffer:48,"create-hmac":55,elliptic:68,"parse-asn1":114}],45:[function(e,t,r){(function(r){function i(e,t,i,o,u){var c=f(i);if("ec"===c.type){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");return n(e,t,c)}if("dsa"===c.type){if("dsa"!==o)throw new Error("wrong public key type");return a(e,t,c)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");t=r.concat([u,t])
     4  ;for(var d=c.modulus.byteLength(),l=[1],h=0;t.length+l.length+2<d;)l.push(255),h++;l.push(0);for(var p=-1;++p<t.length;)l.push(t[p]);l=new r(l);var m=s.mont(c.modulus);e=new s(e).toRed(m),e=e.redPow(new s(c.publicExponent)),e=new r(e.fromRed().toArray());var _=h<8?1:0;for(d=Math.min(e.length,l.length),e.length!==l.length&&(_=1),p=-1;++p<d;)_|=e[p]^l[p];return 0===_}function n(e,t,r){var i=c[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var n=new u(i),a=r.data.subjectPrivateKey.data;return n.verify(t,e,a)}function a(e,t,r){var i=r.data.p,n=r.data.q,a=r.data.g,u=r.data.pub_key,c=f.signature.decode(e,"der"),d=c.s,l=c.r;o(d,n),o(l,n);var h=s.mont(i),p=d.invm(n);return 0===a.toRed(h).redPow(new s(t).mul(p).mod(n)).fromRed().mul(u.toRed(h).redPow(l.mul(p).mod(n)).fromRed()).mod(i).mod(n).cmp(l)}function o(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}var s=e("bn.js"),u=e("elliptic").ec,f=e("parse-asn1"),c=e("./curves.json");t.exports=i}).call(this,e("buffer").Buffer)},{"./curves.json":42,"bn.js":16,buffer:48,elliptic:68,"parse-asn1":114}],46:[function(e,t,r){arguments[4][18][0].apply(r,arguments)},{dup:18}],47:[function(e,t,r){(function(e){t.exports=function(t,r){for(var i=Math.min(t.length,r.length),n=new e(i),a=0;a<i;++a)n[a]=t[a]^r[a];return n}}).call(this,e("buffer").Buffer)},{buffer:48}],48:[function(e,t,r){(function(t){"use strict";function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function n(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,r){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return o(this,e,t,r)}function o(e,t,r,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?l(e,t,r,i):"string"==typeof t?c(e,t,r):h(e,t)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t,r,i){return s(t),t<=0?n(e,t):void 0!==r?"string"==typeof i?n(e,t).fill(r,i):n(e,t).fill(r):n(e,t)}function f(e,t){if(s(t),e=n(e,t<0?0:0|p(t)),!a.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function c(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!a.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|_(t,r);e=n(e,i);var o=e.write(t,r);return o!==i&&(e=e.slice(0,o)),e}function d(e,t){var r=t.length<0?0:0|p(t.length);e=n(e,r);for(var i=0;i<r;i+=1)e[i]=255&t[i];return e}function l(e,t,r,i){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,r):new Uint8Array(t,r,i),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=d(e,t),e}function h(e,t){if(a.isBuffer(t)){var r=0|p(t.length);return e=n(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||K(t.length)?n(e,0):d(e,t);if("Buffer"===t.type&&J(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function _(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return H(e).length;t=(""+t).toLowerCase(),i=!0}}function b(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return x(this,t,r);case"base64":return R(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function y(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function v(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=a.from(t,i)),a.isBuffer(t))return 0===t.length?-1:g(e,t,r,i,n);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,i,n){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,u=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}var f;if(n){var c=-1;for(f=r;f<s;f++)if(a(e,f)===a(t,-1===c?0:f-c)){if(-1===c&&(c=f),f-c+1===u)return c*o}else-1!==c&&(f-=f-c),c=-1}else for(r+u>s&&(r=s-u),f=r;f>=0;f--){for(var d=!0,l=0;l<u;l++)if(a(e,f+l)!==a(t,l)){d=!1;break}if(d)return f}return-1}function w(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");i>a/2&&(i=a/2);for(var o=0;o<i;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function E(e,t,r,i){return W(H(t,e.length-r),e,r,i)}function S(e,t,r,i){return W(V(t),e,r,i)}function k(e,t,r,i){return S(e,t,r,i)}function T(e,t,r,i){return W(q(t),e,r,i)}function A(e,t,r,i){return W(Y(t,e.length-r),e,r,i)}function R(e,t,r){return 0===t&&r===e.length?Q.fromByteArray(e):Q.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n<r;){var a=e[n],o=null,s=a>239?4:a>223?3:a>191?2:1;if(n+s<=r){var u,f,c,d;switch(s){case 1:a<128&&(o=a);break;case 2:u=e[n+1],128==(192&u)&&(d=(31&a)<<6|63&u)>127&&(o=d);break;case 3:u=e[n+1],f=e[n+2],128==(192&u)&&128==(192&f)&&(d=(15&a)<<12|(63&u)<<6|63&f)>2047&&(d<55296||d>57343)&&(o=d);break;case 4:u=e[n+1],f=e[n+2],c=e[n+3],128==(192&u)&&128==(192&f)&&128==(192&c)&&(d=(15&a)<<18|(63&u)<<12|(63&f)<<6|63&c)>65535&&d<1114112&&(o=d)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),n+=s}return M(i)}function M(e){var t=e.length;if(t<=$)return String.fromCharCode.apply(String,e);for(var r="",i=0;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=$));return r}function O(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function x(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function D(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var n="",a=t;a<r;++a)n+=X(e[a]);return n}function L(e,t,r){for(var i=e.slice(t,r),n="",a=0;a<i.length;a+=2)n+=String.fromCharCode(i[a]+256*i[a+1]);return n}function N(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,i,n,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function P(e,t,r,i){t<0&&(t=65535+t+1);for(var n=0,a=Math.min(e.length-r,2);n<a;++n)e[r+n]=(t&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function B(e,t,r,i){t<0&&(t=4294967295+t+1);for(var n=0,a=Math.min(e.length-r,4);n<a;++n)e[r+n]=t>>>8*(i?n:3-n)&255}function U(e,t,r,i,n,a){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,i,n){return n||U(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,i,23,4),r+4}function F(e,t,r,i,n){return n||U(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,i,52,8),r+8}function G(e){if(e=z(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function X(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(e,t){t=t||1/0;for(var r,i=e.length,n=null,a=[],o=0;o<i;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function V(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function Y(e,t){for(var r,i,n,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),i=r>>8,n=r%256,a.push(n),a.push(i);return a}function q(e){return Q.toByteArray(G(e))}function W(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function K(e){return e!==e}var Q=e("base64-js"),Z=e("ieee754"),J=e("isarray");r.Buffer=a,r.SlowBuffer=m,r.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),r.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,r){return o(null,e,t,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,r){return u(null,e,t,r)},a.allocUnsafe=function(e){return f(null,e)},a.allocUnsafeSlow=function(e){return f(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,i=t.length,n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!J(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var i=a.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var o=e[r];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n),n+=o.length}return i},a.byteLength=_,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):b.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,r,i,n){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;for(var o=n-i,s=r-t,u=Math.min(o,s),f=this.slice(i,n),c=e.slice(t,r),d=0;d<u;++d)if(f[d]!==c[d]){o=f[d],s=c[d];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},a.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return k(this,e,t,r);case"base64":return T(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=a.prototype;else{var n=t-e;i=new a(n,void 0);for(var o=0;o<n;++o)i[o]=this[o+e]}return i},a.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var i=this[e],n=1,a=0;++a<t&&(n*=256);)i+=this[e+a]*n;return i},a.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},a.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var i=this[e],n=1,a=0;++a<t&&(n*=256);)i+=this[e+a]*n;return n*=128,i>=n&&(i-=Math.pow(2,8*t)),i},a.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var i=t,n=1,a=this[e+--i];i>0&&(n*=256);)a+=this[e+--i]*n;return n*=128,a>=n&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,i){if(e=+e,t|=0,r|=0,!i){C(this,e,t,r,Math.pow(2,8*r)-1,0)}var n=1,a=0;for(this[t]=255&e;++a<r&&(n*=256);)this[t+a]=e/n&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,i){if(e=+e,t|=0,r|=0,!i){C(this,e,t,r,Math.pow(2,8*r)-1,0)}var n=r-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);var n,o=i-r;if(this===e&&r<t&&t<i)for(n=o-1;n>=0;--n)e[n+t]=this[n+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)e[n+t]=this[n+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},a.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=a.isBuffer(e)?e:H(new a(e,i).toString()),u=s.length;for(o=0;o<r-t;++o)this[o+t]=s[o%u]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":15,ieee754:102,isarray:49}],49:[function(e,t,r){var i={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},{}],50:[function(e,t,r){function i(e){a.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}var n=e("safe-buffer").Buffer,a=e("stream").Transform,o=e("string_decoder").StringDecoder;e("inherits")(i,a),i.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},i.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},i.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},i.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var i=this._decoder.write(e);return r&&(i+=this._decoder.end()),i},t.exports=i},{inherits:104,"safe-buffer":132,stream:141,string_decoder:157}],51:[function(e,t,r){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===_(e)}function i(e){return"boolean"==typeof e}function n(e){return null===e}function a(e){return null==e}function o(e){return"number"==typeof e}function s(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function f(e){return void 0===e}function c(e){return"[object RegExp]"===_(e)}function d(e){return"object"==typeof e&&null!==e}function l(e){return"[object Date]"===_(e)}function h(e){return"[object Error]"===_(e)||e instanceof Error}function p(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function _(e){return Object.prototype.toString.call(e)}r.isArray=t,r.isBoolean=i,r.isNull=n,r.isNullOrUndefined=a,r.isNumber=o,r.isString=s,r.isSymbol=u,r.isUndefined=f,r.isRegExp=c,r.isObject=d,r.isDate=l,r.isError=h,r.isFunction=p,r.isPrimitive=m,r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":105}],52:[function(e,t,r){(function(r){function i(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new a.ec(this.curveType.name),this.keys=void 0}function n(e,t,i){Array.isArray(e)||(e=e.toArray());var n=new r(e);if(i&&n.length<i){var a=new r(i-n.length);a.fill(0),n=r.concat([a,n])}return t?n.toString(t):n}var a=e("elliptic"),o=e("bn.js");t.exports=function(e){return new i(e)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,i.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},i.prototype.computeSecret=function(e,t,i){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),n(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),i,this.curveType.byteLength)},i.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),n(r,e)},i.prototype.getPrivateKey=function(e){return n(this.keys.getPrivate(),e)},i.prototype.setPublicKey=function(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this.keys._importPublic(e),this},i.prototype.setPrivateKey=function(e,t){t=t||"utf8",r.isBuffer(e)||(e=new r(e,t));var i=new o(e);return i=i.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(i),this}}).call(this,e("buffer").Buffer)},{"bn.js":16,buffer:48,elliptic:68}],53:[function(e,t,r){"use strict";function i(e){u.call(this,"digest"),this._hash=e}var n=e("inherits"),a=e("md5.js"),o=e("ripemd160"),s=e("sha.js"),u=e("cipher-base");n(i,u),i.prototype._update=function(e){this._hash.update(e)},i.prototype._final=function(){return this._hash.digest()},t.exports=function(e){return e=e.toLowerCase(),"md5"===e?new a:"rmd160"===e||"ripemd160"===e?new o:new i(s(e))}},{"cipher-base":50,inherits:104,"md5.js":106,ripemd160:131,"sha.js":134}],54:[function(e,t,r){var i=e("md5.js");t.exports=function(e){return(new i).update(e).digest()}},{"md5.js":106}],55:[function(e,t,r){"use strict";function i(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;if(this._alg=e,this._key=t,t.length>r){t=("rmd160"===e?new f:c(e)).update(t).digest()}else t.length<r&&(t=s.concat([t,d],r));for(var i=this._ipad=s.allocUnsafe(r),n=this._opad=s.allocUnsafe(r),a=0;a<r;a++)i[a]=54^t[a],n[a]=92^t[a];this._hash="rmd160"===e?new f:c(e),this._hash.update(i)}var n=e("inherits"),a=e("./legacy"),o=e("cipher-base"),s=e("safe-buffer").Buffer,u=e("create-hash/md5"),f=e("ripemd160"),c=e("sha.js"),d=s.alloc(128);n(i,o),i.prototype._update=function(e){this._hash.update(e)},i.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new f:c(this._alg)).update(this._opad).update(e).digest()},t.exports=function(e,t){return e=e.toLowerCase(),"rmd160"===e||"ripemd160"===e?new i("rmd160",t):"md5"===e?new a(u,t):new i(e,t)}},{"./legacy":56,"cipher-base":50,"create-hash/md5":54,inherits:104,ripemd160:131,"safe-buffer":132,"sha.js":134}],56:[function(e,t,r){"use strict";function i(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t)),this._alg=e,this._key=t,t.length>u?t=e(t):t.length<u&&(t=a.concat([t,s],u));for(var r=this._ipad=a.allocUnsafe(u),i=this._opad=a.allocUnsafe(u),n=0;n<u;n++)r[n]=54^t[n],i[n]=92^t[n];this._hash=[r]}var n=e("inherits"),a=e("safe-buffer").Buffer,o=e("cipher-base"),s=a.alloc(128),u=64;n(i,o),i.prototype._update=function(e){this._hash.push(e)},i.prototype._final=function(){var e=this._alg(a.concat(this._hash));return this._alg(a.concat([this._opad,e]))},t.exports=i},{"cipher-base":50,inherits:104,"safe-buffer":132}],57:[function(e,t,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var i=e("browserify-sign/algos"),n=Object.keys(i),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);r.getHashes=function(){return a};var o=e("pbkdf2");r.pbkdf2=o.pbkdf2,r.pbkdf2Sync=o.pbkdf2Sync;var s=e("browserify-cipher");r.Cipher=s.Cipher,r.createCipher=s.createCipher,r.Cipheriv=s.Cipheriv,r.createCipheriv=s.createCipheriv,r.Decipher=s.Decipher,r.createDecipher=s.createDecipher,r.Decipheriv=s.Decipheriv,r.createDecipheriv=s.createDecipheriv,r.getCiphers=s.getCiphers,r.listCiphers=s.listCiphers;var u=e("diffie-hellman");r.DiffieHellmanGroup=u.DiffieHellmanGroup,r.createDiffieHellmanGroup=u.createDiffieHellmanGroup,r.getDiffieHellman=u.getDiffieHellman,r.createDiffieHellman=u.createDiffieHellman,r.DiffieHellman=u.DiffieHellman;var f=e("browserify-sign");r.createSign=f.createSign,r.Sign=f.Sign,r.createVerify=f.createVerify,r.Verify=f.Verify,r.createECDH=e("create-ecdh");var c=e("public-encrypt");r.publicEncrypt=c.publicEncrypt,r.privateEncrypt=c.privateEncrypt,r.publicDecrypt=c.publicDecrypt,r.privateDecrypt=c.privateDecrypt;var d=e("randomfill");r.randomFill=d.randomFill,r.randomFillSync=d.randomFillSync,r.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},r.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}},{"browserify-cipher":36,"browserify-sign":43,"browserify-sign/algos":40,"create-ecdh":52,"create-hash":53,"create-hmac":55,"diffie-hellman":64,pbkdf2:116,"public-encrypt":123,randombytes:129,randomfill:130}],58:[function(e,t,r){"use strict";r.utils=e("./des/utils"),r.Cipher=e("./des/cipher"),r.DES=e("./des/des"),r.CBC=e("./des/cbc"),r.EDE=e("./des/ede")},{"./des/cbc":59,"./des/cipher":60,"./des/des":61,"./des/ede":62,"./des/utils":63}],59:[function(e,t,r){"use strict";function i(e){a.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}function n(e){function t(t){e.call(this,t),this._cbcInit()}o(t,e);for(var r=Object.keys(s),i=0;i<r.length;i++){var n=r[i];t.prototype[n]=s[n]}return t.create=function(e){return new t(e)},t}var a=e("minimalistic-assert"),o=e("inherits"),s={};r.instantiate=n,s._cbcInit=function(){var e=new i(this.options.iv);this._cbcState=e},s._update=function(e,t,r,i){var n=this._cbcState,a=this.constructor.super_.prototype,o=n.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)o[s]^=e[t+s];a._update.call(this,o,0,r,i);for(var s=0;s<this.blockSize;s++)o[s]=r[i+s]}else{a._update.call(this,e,t,r,i);for(var s=0;s<this.blockSize;s++)r[i+s]^=o[s];for(var s=0;s<this.blockSize;s++)o[s]=e[t+s]}}},{inherits:104,"minimalistic-assert":108}],60:[function(e,t,r){"use strict";function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}var n=e("minimalistic-assert");t.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),i=0;i<r;i++)this.buffer[this.bufferOff+i]=e[t+i];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){
     5  var t=0,r=0,i=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(i*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(n,r)));for(var a=e.length-(e.length-t)%this.blockSize;t<a;t+=this.blockSize)this._update(e,t,n,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return n},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,i=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(i*this.blockSize);i>0;i--)t+=this._buffer(e,t),r+=this._flushBuffer(n,r);return t+=this._buffer(e,t),n},i.prototype.final=function(e){var t;e&&(t=this.update(e));var r;return r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},{"minimalistic-assert":108}],61:[function(e,t,r){"use strict";function i(){this.tmp=new Array(2),this.keys=null}function n(e){f.call(this,e);var t=new i;this._desState=t,this.deriveKeys(t,e.key)}var a=e("minimalistic-assert"),o=e("inherits"),s=e("../des"),u=s.utils,f=s.Cipher;o(n,f),t.exports=n,n.create=function(e){return new n(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];n.prototype.deriveKeys=function(e,t){e.keys=new Array(32),a.equal(t.length,this.blockSize,"Invalid key length");var r=u.readUInt32BE(t,0),i=u.readUInt32BE(t,4);u.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var n=0;n<e.keys.length;n+=2){var o=c[n>>>1];r=u.r28shl(r,o),i=u.r28shl(i,o),u.pc2(r,i,e.keys,n)}},n.prototype._update=function(e,t,r,i){var n=this._desState,a=u.readUInt32BE(e,t),o=u.readUInt32BE(e,t+4);u.ip(a,o,n.tmp,0),a=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,a,o,n.tmp,0):this._decrypt(n,a,o,n.tmp,0),a=n.tmp[0],o=n.tmp[1],u.writeUInt32BE(r,a,i),u.writeUInt32BE(r,o,i+4)},n.prototype._pad=function(e,t){for(var r=e.length-t,i=t;i<e.length;i++)e[i]=r;return!0},n.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)a.equal(e[r],t);return e.slice(0,e.length-t)},n.prototype._encrypt=function(e,t,r,i,n){for(var a=t,o=r,s=0;s<e.keys.length;s+=2){var f=e.keys[s],c=e.keys[s+1];u.expand(o,e.tmp,0),f^=e.tmp[0],c^=e.tmp[1];var d=u.substitute(f,c),l=u.permute(d),h=o;o=(a^l)>>>0,a=h}u.rip(o,a,i,n)},n.prototype._decrypt=function(e,t,r,i,n){for(var a=r,o=t,s=e.keys.length-2;s>=0;s-=2){var f=e.keys[s],c=e.keys[s+1];u.expand(a,e.tmp,0),f^=e.tmp[0],c^=e.tmp[1];var d=u.substitute(f,c),l=u.permute(d),h=a;a=(o^l)>>>0,o=h}u.rip(a,o,i,n)}},{"../des":58,inherits:104,"minimalistic-assert":108}],62:[function(e,t,r){"use strict";function i(e,t){a.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),n=t.slice(16,24);this.ciphers="encrypt"===e?[f.create({type:"encrypt",key:r}),f.create({type:"decrypt",key:i}),f.create({type:"encrypt",key:n})]:[f.create({type:"decrypt",key:n}),f.create({type:"encrypt",key:i}),f.create({type:"decrypt",key:r})]}function n(e){u.call(this,e);var t=new i(this.type,this.options.key);this._edeState=t}var a=e("minimalistic-assert"),o=e("inherits"),s=e("../des"),u=s.Cipher,f=s.DES;o(n,u),t.exports=n,n.create=function(e){return new n(e)},n.prototype._update=function(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)},n.prototype._pad=f.prototype._pad,n.prototype._unpad=f.prototype._unpad},{"../des":58,inherits:104,"minimalistic-assert":108}],63:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,i){for(var n=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>>s+o&1;for(var s=0;s<=24;s+=8)n<<=1,n|=e>>>s+o&1}for(var o=6;o>=0;o-=2){for(var s=1;s<=25;s+=8)a<<=1,a|=t>>>s+o&1;for(var s=1;s<=25;s+=8)a<<=1,a|=e>>>s+o&1}r[i+0]=n>>>0,r[i+1]=a>>>0},r.rip=function(e,t,r,i){for(var n=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)n<<=1,n|=t>>>s+o&1,n<<=1,n|=e>>>s+o&1;for(var o=4;o<8;o++)for(var s=24;s>=0;s-=8)a<<=1,a|=t>>>s+o&1,a<<=1,a|=e>>>s+o&1;r[i+0]=n>>>0,r[i+1]=a>>>0},r.pc1=function(e,t,r,i){for(var n=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>s+o&1;for(var s=0;s<=24;s+=8)n<<=1,n|=e>>s+o&1}for(var s=0;s<=24;s+=8)n<<=1,n|=t>>s+o&1;for(var o=1;o<=3;o++){for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1}for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1;r[i+0]=n>>>0,r[i+1]=a>>>0},r.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var i=[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];r.pc2=function(e,t,r,n){for(var a=0,o=0,s=i.length>>>1,u=0;u<s;u++)a<<=1,a|=e>>>i[u]&1;for(var u=s;u<i.length;u++)o<<=1,o|=t>>>i[u]&1;r[n+0]=a>>>0,r[n+1]=o>>>0},r.expand=function(e,t,r){var i=0,n=0;i=(1&e)<<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|=(31&e)<<1|e>>>31,t[r+0]=i>>>0,t[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,i=0;i<4;i++){var a=e>>>18-6*i&63,o=n[64*i+a];r<<=4,r|=o}for(var i=0;i<4;i++){var a=t>>>18-6*i&63,o=n[256+64*i+a];r<<=4,r|=o}return r>>>0};var a=[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];r.permute=function(e){for(var t=0,r=0;r<a.length;r++)t<<=1,t|=e>>>a[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var i=e.toString(2);i.length<t;)i="0"+i;for(var n=[],a=0;a<t;a+=r)n.push(i.slice(a,a+r));return n.join(" ")}},{}],64:[function(e,t,r){(function(t){function i(e){var r=new t(o[e].prime,"hex"),i=new t(o[e].gen,"hex");return new s(r,i)}function n(e,r,i,o){return t.isBuffer(r)||void 0===u[r]?n(e,"binary",r,i):(r=r||"binary",o=o||"binary",i=i||new t([2]),t.isBuffer(i)||(i=new t(i,o)),"number"==typeof e?new s(a(e,i),i,!0):(t.isBuffer(e)||(e=new t(e,r)),new s(e,i,!0)))}var a=e("./lib/generatePrime"),o=e("./lib/primes.json"),s=e("./lib/dh"),u={binary:!0,hex:!0,base64:!0};r.DiffieHellmanGroup=r.createDiffieHellmanGroup=r.getDiffieHellman=i,r.createDiffieHellman=r.DiffieHellman=n}).call(this,e("buffer").Buffer)},{"./lib/dh":65,"./lib/generatePrime":66,"./lib/primes.json":67,buffer:48}],65:[function(e,t,r){(function(r){function i(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this._pub=new u(e),this}function n(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this._priv=new u(e),this}function a(e,t){var r=t.toString("hex"),i=[r,e.toString(16)].join("_");if(i in y)return y[i];var n=0;if(e.isEven()||!_.simpleSieve||!_.fermatTest(e)||!c.test(e))return n+=1,n+="02"===r||"05"===r?8:4,y[i]=n,n;c.test(e.shrn(1))||(n+=2);var a;switch(r){case"02":e.mod(d).cmp(l)&&(n+=8);break;case"05":a=e.mod(h),a.cmp(p)&&a.cmp(m)&&(n+=8);break;default:n+=4}return y[i]=n,n}function o(e,t,r){this.setGenerator(t),this.__prime=new u(e),this._prime=u.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=i,this.setPrivateKey=n):this._primeCode=8}function s(e,t){var i=new r(e.toArray());return t?i.toString(t):i}var u=e("bn.js"),f=e("miller-rabin"),c=new f,d=new u(24),l=new u(11),h=new u(10),p=new u(3),m=new u(7),_=e("./generatePrime"),b=e("randombytes");t.exports=o;var y={};Object.defineProperty(o.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=a(this.__prime,this.__gen)),this._primeCode}}),o.prototype.generateKeys=function(){return this._priv||(this._priv=new u(b(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},o.prototype.computeSecret=function(e){e=new u(e),e=e.toRed(this._prime);var t=e.redPow(this._priv).fromRed(),i=new r(t.toArray()),n=this.getPrime();if(i.length<n.length){var a=new r(n.length-i.length);a.fill(0),i=r.concat([a,i])}return i},o.prototype.getPublicKey=function(e){return s(this._pub,e)},o.prototype.getPrivateKey=function(e){return s(this._priv,e)},o.prototype.getPrime=function(e){return s(this.__prime,e)},o.prototype.getGenerator=function(e){return s(this._gen,e)},o.prototype.setGenerator=function(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this.__gen=e,this._gen=new u(e),this}}).call(this,e("buffer").Buffer)},{"./generatePrime":66,"bn.js":16,buffer:48,"miller-rabin":107,randombytes:129}],66:[function(e,t,r){function i(){if(null!==v)return v;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var i=Math.ceil(Math.sqrt(r)),n=0;n<t&&e[n]<=i&&r%e[n]!=0;n++);t!==n&&e[n]<=i||(e[t++]=r)}return v=e,e}function n(e){for(var t=i(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function a(e){var t=u.mont(e);return 0===h.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function o(e,t){if(e<16)return new u(2===t||5===t?[140,123]:[140,39]);t=new u(t);for(var r,i;;){for(r=new u(s(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(l),r.testn(1)||r.iadd(h),t.cmp(h)){if(!t.cmp(p))for(;r.mod(m).cmp(_);)r.iadd(y)}else for(;r.mod(f).cmp(b);)r.iadd(y);if(i=r.shrn(1),n(i)&&n(r)&&a(i)&&a(r)&&d.test(i)&&d.test(r))return r}}var s=e("randombytes");t.exports=o,o.simpleSieve=n,o.fermatTest=a;var u=e("bn.js"),f=new u(24),c=e("miller-rabin"),d=new c,l=new u(1),h=new u(2),p=new u(5),m=(new u(16),new u(8),new u(10)),_=new u(3),b=(new u(7),new u(11)),y=new u(4),v=(new u(12),null)},{"bn.js":16,"miller-rabin":107,randombytes:129}],67:[function(e,t,r){t.exports={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"}}},{}],68:[function(e,t,r){"use strict";var i=r;i.version=e("../package.json").version,i.utils=e("./elliptic/utils"),i.rand=e("brorand"),i.curve=e("./elliptic/curve"),i.curves=e("./elliptic/curves"),i.ec=e("./elliptic/ec"),i.eddsa=e("./elliptic/eddsa")},{"../package.json":83,"./elliptic/curve":71,"./elliptic/curves":74,"./elliptic/ec":75,"./elliptic/eddsa":78,"./elliptic/utils":82,brorand:17}],69:[function(e,t,r){"use strict";function i(e,t){this.type=e,this.p=new a(t.p,16),this.red=t.prime?a.red(t.prime):a.mont(this.p),this.zero=new a(0).toRed(this.red),this.one=new a(1).toRed(this.red),this.two=new a(2).toRed(this.red),this.n=t.n&&new a(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);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function n(e,t){this.curve=e,this.type=t,this.precomputed=null}var a=e("bn.js"),o=e("../../elliptic"),s=o.utils,u=s.getNAF,f=s.getJSF,c=s.assert;t.exports=i,i.prototype.point=function(){throw new Error("Not implemented")},i.prototype.validate=function(){throw new Error("Not implemented")},i.prototype._fixedNafMul=function(e,t){c(e.precomputed);var r=e._getDoubles(),i=u(t,1),n=(1<<r.step+1)-(r.step%2==0?2:1);n/=3;for(var a=[],o=0;o<i.length;o+=r.step){for(var s=0,t=o+r.step-1;t>=o;t--)s=(s<<1)+i[t];a.push(s)}for(var f=this.jpoint(null,null,null),d=this.jpoint(null,null,null),l=n;l>0;l--){for(var o=0;o<a.length;o++){var s=a[o];s===l?d=d.mixedAdd(r.points[o]):s===-l&&(d=d.mixedAdd(r.points[o].neg()))}f=f.add(d)}return f.toP()},i.prototype._wnafMul=function(e,t){var r=4,i=e._getNAFPoints(r);r=i.wnd;for(var n=i.points,a=u(t,r),o=this.jpoint(null,null,null),s=a.length-1;s>=0;s--){for(var t=0;s>=0&&0===a[s];s--)t++;if(s>=0&&t++,o=o.dblp(t),s<0)break;var f=a[s];c(0!==f),o="affine"===e.type?f>0?o.mixedAdd(n[f-1>>1]):o.mixedAdd(n[-f-1>>1].neg()):f>0?o.add(n[f-1>>1]):o.add(n[-f-1>>1].neg())}return"affine"===e.type?o.toP():o},i.prototype._wnafMulAdd=function(e,t,r,i,n){for(var a=this._wnafT1,o=this._wnafT2,s=this._wnafT3,c=0,d=0;d<i;d++){var l=t[d],h=l._getNAFPoints(e);a[d]=h.wnd,o[d]=h.points}for(var d=i-1;d>=1;d-=2){var p=d-1,m=d;if(1===a[p]&&1===a[m]){var _=[t[p],null,null,t[m]];0===t[p].y.cmp(t[m].y)?(_[1]=t[p].add(t[m]),_[2]=t[p].toJ().mixedAdd(t[m].neg())):0===t[p].y.cmp(t[m].y.redNeg())?(_[1]=t[p].toJ().mixedAdd(t[m]),_[2]=t[p].add(t[m].neg())):(_[1]=t[p].toJ().mixedAdd(t[m]),_[2]=t[p].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=f(r[p],r[m]);c=Math.max(y[0].length,c),s[p]=new Array(c),s[m]=new Array(c);for(var v=0;v<c;v++){var g=0|y[0][v],w=0|y[1][v];s[p][v]=b[3*(g+1)+(w+1)],s[m][v]=0,o[p]=_}}else s[p]=u(r[p],a[p]),s[m]=u(r[m],a[m]),c=Math.max(s[p].length,c),c=Math.max(s[m].length,c)}for(var E=this.jpoint(null,null,null),S=this._wnafT4,d=c;d>=0;d--){for(var k=0;d>=0;){for(var T=!0,v=0;v<i;v++)S[v]=0|s[v][d],0!==S[v]&&(T=!1);if(!T)break;k++,d--}if(d>=0&&k++,E=E.dblp(k),d<0)break;for(var v=0;v<i;v++){var l,A=S[v];0!==A&&(A>0?l=o[v][A-1>>1]:A<0&&(l=o[v][-A-1>>1].neg()),E="affine"===l.type?E.mixedAdd(l):E.add(l))}}for(var d=0;d<i;d++)o[d]=null;return n?E:E.toP()},i.BasePoint=n,n.prototype.eq=function(){throw new Error("Not implemented")},n.prototype.validate=function(){return this.curve.validate(this)},i.prototype.decodePoint=function(e,t){e=s.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r){6===e[0]?c(e[e.length-1]%2==0):7===e[0]&&c(e[e.length-1]%2==1);return this.point(e.slice(1,1+r),e.slice(1+r,1+2*r))}if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},n.prototype.encodeCompressed=function(e){return this.encode(e,!0)},n.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},n.prototype.encode=function(e,t){return s.encode(this._encode(t),e)},n.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},n.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},n.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<t;n+=e){for(var a=0;a<e;a++)i=i.dbl();r.push(i)}return{step:e,points:r}},n.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)t[n]=t[n-1].add(i);return{wnd:e,points:t}},n.prototype._getBeta=function(){return null},n.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},{"../../elliptic":68,"bn.js":16}],70:[function(e,t,r){"use strict";function i(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,f.call(this,"edwards",e),this.a=new s(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new s(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new s(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),c(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function n(e,t,r,i,n){f.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new s(t,16),this.y=new s(r,16),this.z=i?new s(i,16):this.curve.one,this.t=n&&new s(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}var a=e("../curve"),o=e("../../elliptic"),s=e("bn.js"),u=e("inherits"),f=a.base,c=o.utils.assert;u(i,f),t.exports=i,i.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},i.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},i.prototype.jpoint=function(e,t,r,i){return this.point(e,t,r,i)},i.prototype.pointFromX=function(e,t){e=new s(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),n=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=i.redMul(n.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=o.fromRed().isOdd();return(t&&!u||!t&&u)&&(o=o.redNeg()),this.point(e,o)},i.prototype.pointFromY=function(e,t){e=new s(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.one),n=r.redMul(this.d).redAdd(this.one),a=i.redMul(n.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},i.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),i=t.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===i.cmp(n)},u(n,f.BasePoint),i.prototype.pointFromJSON=function(e){return n.fromJSON(this,e)},i.prototype.point=function(e,t,r,i){return new n(this,e,t,r,i)},n.fromJSON=function(e,t){return new n(e,t[0],t[1],t[2])},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},n.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=i.redAdd(t),o=a.redSub(r),s=i.redSub(t),u=n.redMul(o),f=a.redMul(s),c=n.redMul(s),d=o.redMul(a);return this.curve.point(u,f,d,c)},n.prototype._projDbl=function(){var e,t,r,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=this.curve._mulA(n),s=o.redAdd(a);if(this.zOne)e=i.redSub(n).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(o.redSub(a)),r=s.redSqr().redSub(s).redSub(s);else{var u=this.z.redSqr(),f=s.redSub(u).redISub(u);e=i.redSub(n).redISub(a).redMul(f),t=s.redMul(o.redSub(a)),r=s.redMul(f)}}else{var o=n.redAdd(a),u=this.curve._mulC(this.c.redMul(this.z)).redSqr(),f=o.redSub(u).redSub(u);e=this.curve._mulC(i.redISub(o)).redMul(f),t=this.curve._mulC(o).redMul(n.redISub(a)),r=o.redMul(f)}return this.curve.point(e,t,r)},n.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},n.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=n.redSub(i),s=n.redAdd(i),u=r.redAdd(t),f=a.redMul(o),c=s.redMul(u),d=a.redMul(u),l=o.redMul(s);return this.curve.point(f,c,l,d)},n.prototype._projAdd=function(e){var t,r,i=this.z.redMul(e.z),n=i.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),u=n.redSub(s),f=n.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),d=i.redMul(u).redMul(c);return this.curve.twisted?(t=i.redMul(f).redMul(o.redSub(this.curve._mulA(a))),r=u.redMul(f)):(t=i.redMul(f).redMul(o.redSub(a)),r=this.curve._mulC(u).redMul(f)),this.curve.point(d,t,r)},n.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},n.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},n.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},n.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},n.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},n.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},n.prototype.getX=function(){return this.normalize(),this.x.fromRed()},n.prototype.getY=function(){return this.normalize(),this.y.fromRed()},n.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},n.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}return!1},n.prototype.toP=n.prototype.normalize,n.prototype.mixedAdd=n.prototype.add},{"../../elliptic":68,"../curve":71,"bn.js":16,inherits:104}],71:[function(e,t,r){"use strict";var i=r;i.base=e("./base"),i.short=e("./short"),i.mont=e("./mont"),i.edwards=e("./edwards")},{"./base":69,"./edwards":70,"./mont":72,"./short":73}],72:[function(e,t,r){"use strict";function i(e){u.call(this,"mont",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.i4=new o(4).toRed(this.red).redInvm(),this.two=new o(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function n(e,t,r){u.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new o(t,16),this.z=new o(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var a=e("../curve"),o=e("bn.js"),s=e("inherits"),u=a.base,f=e("../../elliptic"),c=f.utils;s(i,u),t.exports=i,i.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},s(n,u.BasePoint),i.prototype.decodePoint=function(e,t){return this.point(c.toArray(e,t),1)},i.prototype.point=function(e,t){return new n(this,e,t)},i.prototype.pointFromJSON=function(e){return n.fromJSON(this,e)},n.prototype.precompute=function(){},n.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},n.fromJSON=function(e,t){return new n(e,t[0],t[1]||e.one)},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},n.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),i=r.redSqr(),n=t.redSub(i),a=t.redMul(i),o=n.redMul(i.redAdd(this.curve.a24.redMul(n)));return this.curve.point(a,o)},n.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z),o=a.redMul(r),s=n.redMul(i),u=t.z.redMul(o.redAdd(s).redSqr()),f=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(u,f)},n.prototype.mul=function(e){for(var t=e.clone(),r=this,i=this.curve.point(null,null),n=this,a=[];0!==t.cmpn(0);t.iushrn(1))a.push(t.andln(1));for(var o=a.length-1;o>=0;o--)0===a[o]?(r=r.diffAdd(i,n),i=i.dbl()):(i=r.diffAdd(i,n),r=r.dbl());return i},n.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},n.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},n.prototype.getX=function(){
     6  return this.normalize(),this.x.fromRed()}},{"../../elliptic":68,"../curve":71,"bn.js":16,inherits:104}],73:[function(e,t,r){"use strict";function i(e){c.call(this,"short",e),this.a=new u(e.a,16).toRed(this.red),this.b=new u(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function n(e,t,r,i){c.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new u(t,16),this.y=new u(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function a(e,t,r,i){c.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new u(0)):(this.x=new u(t,16),this.y=new u(r,16),this.z=new u(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var o=e("../curve"),s=e("../../elliptic"),u=e("bn.js"),f=e("inherits"),c=o.base,d=s.utils.assert;f(i,c),t.exports=i,i.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new u(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 u(e.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(t))?r=n[0]:(r=n[1],d(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}var a;return a=e.basis?e.basis.map(function(e){return{a:new u(e.a,16),b:new u(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:a}}},i.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:u.mont(e),r=new u(2).toRed(t).redInvm(),i=r.redNeg(),n=new u(3).toRed(t).redNeg().redSqrt().redMul(r);return[i.redAdd(n).fromRed(),i.redSub(n).fromRed()]},i.prototype._getEndoBasis=function(e){for(var t,r,i,n,a,o,s,f,c,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new u(1),m=new u(0),_=new u(0),b=new u(1),y=0;0!==l.cmpn(0);){var v=h.div(l);f=h.sub(v.mul(l)),c=_.sub(v.mul(p));var g=b.sub(v.mul(m));if(!i&&f.cmp(d)<0)t=s.neg(),r=p,i=f.neg(),n=c;else if(i&&2==++y)break;s=f,h=l,l=f,_=p,p=c,b=m,m=g}a=f.neg(),o=c;var w=i.sqr().add(n.sqr());return a.sqr().add(o.sqr()).cmp(w)>=0&&(a=t,o=r),i.negative&&(i=i.neg(),n=n.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:i,b:n},{a:a,b:o}]},i.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],n=i.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=n.mul(r.a),s=a.mul(i.a),u=n.mul(r.b),f=a.mul(i.b);return{k1:e.sub(o).sub(s),k2:u.add(f).neg()}},i.prototype.pointFromX=function(e,t){e=new u(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var n=i.fromRed().isOdd();return(t&&!n||!t&&n)&&(i=i.redNeg()),this.point(e,i)},i.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},i.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(t[a]),s=e[a],u=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),u=u.neg(!0)),i[2*a]=s,i[2*a+1]=u,n[2*a]=o.k1,n[2*a+1]=o.k2}for(var f=this._wnafMulAdd(1,i,n,2*a,r),c=0;c<2*a;c++)i[c]=null,n[c]=null;return f},f(n,c.BasePoint),i.prototype.point=function(e,t,r){return new n(this,e,t,r)},i.prototype.pointFromJSON=function(e,t){return n.fromJSON(this,e,t)},n.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return t}},n.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},n.fromJSON=function(e,t,r){function i(t){return e.point(t[0],t[1],r)}"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;var a=t[2];return n.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[n].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[n].concat(a.naf.points.map(i))}},n},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return this.inf},n.prototype.add=function(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(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},n.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),i=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),a=n.redSqr().redISub(this.x.redAdd(this.x)),o=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},n.prototype.getX=function(){return this.x.fromRed()},n.prototype.getY=function(){return this.y.fromRed()},n.prototype.mul=function(e){return e=new u(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},n.prototype.mulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},n.prototype.jmulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},n.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},n.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t},n.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},f(a,c.BasePoint),i.prototype.jpoint=function(e,t,r){return new a(this,e,t,r)},a.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)},a.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},a.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=i.redSub(n),u=a.redSub(o);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=s.redSqr(),c=f.redMul(s),d=i.redMul(f),l=u.redSqr().redIAdd(c).redISub(d).redISub(d),h=u.redMul(d.redISub(l)).redISub(a.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},a.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(i),s=n.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),f=u.redMul(o),c=r.redMul(u),d=s.redSqr().redIAdd(f).redISub(c).redISub(c),l=s.redMul(c.redISub(d)).redISub(n.redMul(f)),h=this.z.redMul(o);return this.curve.jpoint(d,l,h)},a.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}for(var i=this.curve.a,n=this.curve.tinv,a=this.x,o=this.y,s=this.z,u=s.redSqr().redSqr(),f=o.redAdd(o),r=0;r<e;r++){var c=a.redSqr(),d=f.redSqr(),l=d.redSqr(),h=c.redAdd(c).redIAdd(c).redIAdd(i.redMul(u)),p=a.redMul(d),m=h.redSqr().redISub(p.redAdd(p)),_=p.redISub(m),b=h.redMul(_);b=b.redIAdd(b).redISub(l);var y=f.redMul(s);r+1<e&&(u=u.redMul(l)),a=m,s=y,f=b}return this.curve.jpoint(a,f.redMul(n),s)},a.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},a.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(i).redISub(a);o=o.redIAdd(o);var s=i.redAdd(i).redIAdd(i),u=s.redSqr().redISub(o).redISub(o),f=a.redIAdd(a);f=f.redIAdd(f),f=f.redIAdd(f),e=u,t=s.redMul(o.redISub(u)).redISub(f),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),d=this.y.redSqr(),l=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(c).redISub(l);h=h.redIAdd(h);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),_=l.redIAdd(l);_=_.redIAdd(_),_=_.redIAdd(_),e=m.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(_),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(e,t,r)},a.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),o=this.x.redAdd(n).redSqr().redISub(i).redISub(a);o=o.redIAdd(o);var s=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),u=s.redSqr().redISub(o).redISub(o);e=u;var f=a.redIAdd(a);f=f.redIAdd(f),f=f.redIAdd(f),t=s.redMul(o.redISub(u)).redISub(f),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),d=this.y.redSqr(),l=this.x.redMul(d),h=this.x.redSub(c).redMul(this.x.redAdd(c));h=h.redAdd(h).redIAdd(h);var p=l.redIAdd(l);p=p.redIAdd(p);var m=p.redAdd(p);e=h.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(c);var _=d.redSqr();_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_),t=h.redMul(p.redISub(e)).redISub(_)}return this.curve.jpoint(e,t,r)},a.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),a=t.redSqr(),o=r.redSqr(),s=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(n)),u=t.redAdd(t);u=u.redIAdd(u);var f=u.redMul(o),c=s.redSqr().redISub(f.redAdd(f)),d=f.redISub(c),l=o.redSqr();l=l.redIAdd(l),l=l.redIAdd(l),l=l.redIAdd(l);var h=s.redMul(d).redISub(l),p=r.redAdd(r).redMul(i);return this.curve.jpoint(c,h,p)},a.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),i=t.redSqr(),n=e.redAdd(e).redIAdd(e),a=n.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(i);o=o.redIAdd(o),o=o.redAdd(o).redIAdd(o),o=o.redISub(a);var s=o.redSqr(),u=i.redIAdd(i);u=u.redIAdd(u),u=u.redIAdd(u),u=u.redIAdd(u);var f=n.redIAdd(o).redSqr().redISub(a).redISub(s).redISub(u),c=t.redMul(f);c=c.redIAdd(c),c=c.redIAdd(c);var d=this.x.redMul(s).redISub(c);d=d.redIAdd(d),d=d.redIAdd(d);var l=this.y.redMul(f.redMul(u.redISub(f)).redISub(o.redMul(s)));l=l.redIAdd(l),l=l.redIAdd(l),l=l.redIAdd(l);var h=this.z.redAdd(o).redSqr().redISub(r).redISub(s);return this.curve.jpoint(d,l,h)},a.prototype.mul=function(e,t){return e=new u(e,t),this.curve._wnafMul(this,e)},a.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var i=t.redMul(this.z),n=r.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(i)).cmpn(0)},a.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var i=e.clone(),n=this.curve.redN.redMul(t);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}return!1},a.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":68,"../curve":71,"bn.js":16,inherits:104}],74:[function(e,t,r){"use strict";function i(e){"short"===e.type?this.curve=new s.curve.short(e):"edwards"===e.type?this.curve=new s.curve.edwards(e):this.curve=new s.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,u(this.g.validate(),"Invalid curve"),u(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function n(e,t){Object.defineProperty(a,e,{configurable:!0,enumerable:!0,get:function(){var r=new i(t);return Object.defineProperty(a,e,{configurable:!0,enumerable:!0,value:r}),r}})}var a=r,o=e("hash.js"),s=e("../elliptic"),u=s.utils.assert;a.PresetCurve=i,n("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),n("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),n("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),n("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),n("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),n("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),n("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var f;try{f=e("./precomputed/secp256k1")}catch(e){f=void 0}n("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",f]})},{"../elliptic":68,"./precomputed/secp256k1":81,"hash.js":89}],75:[function(e,t,r){"use strict";function i(e){if(!(this instanceof i))return new i(e);"string"==typeof e&&(u(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.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}var n=e("bn.js"),a=e("hmac-drbg"),o=e("../../elliptic"),s=o.utils,u=s.assert,f=e("./key"),c=e("./signature");t.exports=i,i.prototype.keyPair=function(e){return new f(this,e)},i.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},i.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},i.prototype.genKeyPair=function(e){e||(e={});for(var t=new a({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}},i.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},i.prototype.sign=function(e,t,r,i){"object"==typeof r&&(i=r,r=null),i||(i={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),u=e.toArray("be",o),f=new a({hash:this.hash,entropy:s,nonce:u,pers:i.pers,persEnc:i.persEnc||"utf8"}),d=this.n.sub(new n(1)),l=0;!0;l++){var h=i.k?i.k(l):new n(f.generate(this.n.byteLength()));if(h=this._truncateToN(h,!0),!(h.cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var m=p.getX(),_=m.umod(this.n);if(0!==_.cmpn(0)){var b=h.invm(this.n).mul(_.mul(t.getPrivate()).iadd(e));if(b=b.umod(this.n),0!==b.cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==m.cmp(_)?2:0);return i.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),y^=1),new c({r:_,s:b,recoveryParam:y})}}}}}},i.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i),t=new c(t,"hex");var a=t.r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s=o.invm(this.n),u=s.mul(e).umod(this.n),f=s.mul(a).umod(this.n);if(!this.curve._maxwellTrick){var d=this.g.mulAdd(u,r.getPublic(),f);return!d.isInfinity()&&0===d.getX().umod(this.n).cmp(a)}var d=this.g.jmulAdd(u,r.getPublic(),f);return!d.isInfinity()&&d.eqXToP(a)},i.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new c(t,i);var a=this.n,o=new n(e),s=t.r,f=t.s,d=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var h=t.r.invm(a),p=a.sub(o).mul(h).umod(a),m=f.mul(h).umod(a);return this.g.mulAdd(p,s,m)},i.prototype.getKeyRecoveryParam=function(e,t,r,i){if(t=new c(t,i),null!==t.recoveryParam)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")}},{"../../elliptic":68,"./key":76,"./signature":77,"bn.js":16,"hmac-drbg":101}],76:[function(e,t,r){"use strict";function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var n=e("bn.js"),a=e("../../elliptic"),o=a.utils,s=o.assert;t.exports=i,i.fromPublic=function(e,t,r){return t instanceof i?t:new i(e,{pub:t,pubEnc:r})},i.fromPrivate=function(e,t,r){return t instanceof i?t:new i(e,{priv:t,privEnc:r})},i.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},i.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?s(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||s(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},i.prototype.derive=function(e){return e.mul(this.priv).getX()},i.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},i.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},i.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../../elliptic":68,"bn.js":16}],77:[function(e,t,r){"use strict";function i(e,t){if(e instanceof i)return e;this._importDER(e,t)||(d(e.r&&e.s,"Signature without r or s"),this.r=new u(e.r,16),this.s=new u(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function n(){this.place=0}function a(e,t){var r=e[t.place++];if(!(128&r))return r;for(var i=15&r,n=0,a=0,o=t.place;a<i;a++,o++)n<<=8,n|=e[o];return t.place=o,n}function o(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function s(e,t){if(t<128)return void e.push(t);var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}var u=e("bn.js"),f=e("../../elliptic"),c=f.utils,d=c.assert;t.exports=i,i.prototype._importDER=function(e,t){e=c.toArray(e,t);var r=new n;if(48!==e[r.place++])return!1;if(a(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=a(e,r),o=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var s=a(e,r);if(e.length!==s+r.place)return!1;var f=e.slice(r.place,s+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===f[0]&&128&f[1]&&(f=f.slice(1)),this.r=new u(o),this.s=new u(f),this.recoveryParam=null,!0},i.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=o(t),r=o(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];s(i,t.length),i=i.concat(t),i.push(2),s(i,r.length);var n=i.concat(r),a=[48];return s(a,n.length),a=a.concat(n),c.encode(a,e)}},{"../../elliptic":68,"bn.js":16}],78:[function(e,t,r){"use strict";function i(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof i))return new i(e);var e=a.curves[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=n.sha512}var n=e("hash.js"),a=e("../../elliptic"),o=a.utils,s=o.assert,u=o.parseBytes,f=e("./key"),c=e("./signature");t.exports=i,i.prototype.sign=function(e,t){e=u(e);var r=this.keyFromSecret(t),i=this.hashInt(r.messagePrefix(),e),n=this.g.mul(i),a=this.encodePoint(n),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),s=i.add(o).umod(this.curve.n);return this.makeSignature({R:n,S:s,Rencoded:a})},i.prototype.verify=function(e,t,r){e=u(e),t=this.makeSignature(t);var i=this.keyFromPublic(r),n=this.hashInt(t.Rencoded(),i.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(i.pub().mul(n)).eq(a)},i.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},i.prototype.keyFromPublic=function(e){return f.fromPublic(this,e)},i.prototype.keyFromSecret=function(e){return f.fromSecret(this,e)},i.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},i.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},i.prototype.decodePoint=function(e){e=o.parseBytes(e);var t=e.length-1,r=e.slice(0,t).concat(-129&e[t]),i=0!=(128&e[t]),n=o.intFromLE(r);return this.curve.pointFromY(n,i)},i.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},i.prototype.decodeInt=function(e){return o.intFromLE(e)},i.prototype.isPoint=function(e){return e instanceof this.pointClass}},{"../../elliptic":68,"./key":79,"./signature":80,"hash.js":89}],79:[function(e,t,r){"use strict";function i(e,t){this.eddsa=e,this._secret=s(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=s(t.pub)}var n=e("../../elliptic"),a=n.utils,o=a.assert,s=a.parseBytes,u=a.cachedProperty;i.fromPublic=function(e,t){return t instanceof i?t:new i(e,{pub:t})},i.fromSecret=function(e,t){return t instanceof i?t:new i(e,{secret:t})},i.prototype.secret=function(){return this._secret},u(i,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),u(i,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),u(i,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,i=t.slice(0,e.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i}),u(i,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),u(i,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),u(i,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),i.prototype.sign=function(e){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},i.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},i.prototype.getSecret=function(e){return o(this._secret,"KeyPair is public only"),a.encode(this.secret(),e)},i.prototype.getPublic=function(e){return a.encode(this.pubBytes(),e)},t.exports=i},{"../../elliptic":68}],80:[function(e,t,r){"use strict";function i(e,t){this.eddsa=e,"object"!=typeof t&&(t=f(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),s(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}var n=e("bn.js"),a=e("../../elliptic"),o=a.utils,s=o.assert,u=o.cachedProperty,f=o.parseBytes;u(i,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),u(i,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),u(i,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),u(i,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),i.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},i.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},t.exports=i},{"../../elliptic":68,"bn.js":16}],81:[function(e,t,r){t.exports={doubles:{step:4,
     7  points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],82:[function(e,t,r){"use strict";function i(e,t){for(var r=[],i=1<<t+1,n=e.clone();n.cmpn(1)>=0;){var a;if(n.isOdd()){var o=n.andln(i-1);a=o>(i>>1)-1?(i>>1)-o:o,n.isubn(a)}else a=0;r.push(a);for(var s=0!==n.cmpn(0)&&0===n.andln(i-1)?t+1:1,u=1;u<s;u++)r.push(0);n.iushrn(s)}return r}function n(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i=0,n=0;e.cmpn(-i)>0||t.cmpn(-n)>0;){var a=e.andln(3)+i&3,o=t.andln(3)+n&3;3===a&&(a=-1),3===o&&(o=-1);var s;if(0==(1&a))s=0;else{var u=e.andln(7)+i&7;s=3!==u&&5!==u||2!==o?a:-a}r[0].push(s);var f;if(0==(1&o))f=0;else{var u=t.andln(7)+n&7;f=3!==u&&5!==u||2!==a?o:-o}r[1].push(f),2*i===s+1&&(i=1-i),2*n===f+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return r}function a(e,t,r){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}}function o(e){return"string"==typeof e?u.toArray(e,"hex"):e}function s(e){return new f(e,"hex","le")}var u=r,f=e("bn.js"),c=e("minimalistic-assert"),d=e("minimalistic-crypto-utils");u.assert=c,u.toArray=d.toArray,u.zero2=d.zero2,u.toHex=d.toHex,u.encode=d.encode,u.getNAF=i,u.getJSF=n,u.cachedProperty=a,u.parseBytes=o,u.intFromLE=s},{"bn.js":16,"minimalistic-assert":108,"minimalistic-crypto-utils":109}],83:[function(e,t,r){t.exports={_from:"elliptic@^6.0.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.0.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.0.0",saveSpec:null,fetchSpec:"^6.0.0"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_spec:"elliptic@^6.0.0",_where:"/Users/shane/workspace/h265-web-player/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],84:[function(e,t,r){(function(i,n){!function(e,i){"object"==typeof r&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):e.ES6Promise=i()}(this,function(){"use strict";function t(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function r(e){return"function"==typeof e}function a(e){z=e}function o(e){X=e}function s(){return void 0!==G?function(){G(f)}:u()}function u(){var e=setTimeout;return function(){return e(f,1)}}function f(){for(var e=0;e<F;e+=2){(0,K[e])(K[e+1]),K[e]=void 0,K[e+1]=void 0}F=0}function c(e,t){var r=this,i=new this.constructor(l);void 0===i[Z]&&O(i);var n=r._state;if(n){var a=arguments[n-1];X(function(){return R(n,i,a,r._result)})}else k(r,i,e,t);return i}function d(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(l);return g(r,e),r}function l(){}function h(){return new TypeError("You cannot resolve a promise with itself")}function p(){return new TypeError("A promises callback cannot return that same promise.")}function m(e){try{return e.then}catch(e){return te.error=e,te}}function _(e,t,r,i){try{e.call(t,r,i)}catch(e){return e}}function b(e,t,r){X(function(e){var i=!1,n=_(r,t,function(r){i||(i=!0,t!==r?g(e,r):E(e,r))},function(t){i||(i=!0,S(e,t))},"Settle: "+(e._label||" unknown promise"));!i&&n&&(i=!0,S(e,n))},e)}function y(e,t){t._state===$?E(e,t._result):t._state===ee?S(e,t._result):k(t,void 0,function(t){return g(e,t)},function(t){return S(e,t)})}function v(e,t,i){t.constructor===e.constructor&&i===c&&t.constructor.resolve===d?y(e,t):i===te?(S(e,te.error),te.error=null):void 0===i?E(e,t):r(i)?b(e,t,i):E(e,t)}function g(e,r){e===r?S(e,h()):t(r)?v(e,r,m(r)):E(e,r)}function w(e){e._onerror&&e._onerror(e._result),T(e)}function E(e,t){e._state===J&&(e._result=t,e._state=$,0!==e._subscribers.length&&X(T,e))}function S(e,t){e._state===J&&(e._state=ee,e._result=t,X(w,e))}function k(e,t,r,i){var n=e._subscribers,a=n.length;e._onerror=null,n[a]=t,n[a+$]=r,n[a+ee]=i,0===a&&e._state&&X(T,e)}function T(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var i=void 0,n=void 0,a=e._result,o=0;o<t.length;o+=3)i=t[o],n=t[o+r],i?R(r,i,n,a):n(a);e._subscribers.length=0}}function A(e,t){try{return e(t)}catch(e){return te.error=e,te}}function R(e,t,i,n){var a=r(i),o=void 0,s=void 0,u=void 0,f=void 0;if(a){if(o=A(i,n),o===te?(f=!0,s=o.error,o.error=null):u=!0,t===o)return void S(t,p())}else o=n,u=!0;t._state!==J||(a&&u?g(t,o):f?S(t,s):e===$?E(t,o):e===ee&&S(t,o))}function I(e,t){try{t(function(t){g(e,t)},function(t){S(e,t)})}catch(t){S(e,t)}}function M(){return re++}function O(e){e[Z]=re++,e._state=void 0,e._result=void 0,e._subscribers=[]}function x(){return new Error("Array Methods must be provided an Array")}function D(e){return new ie(this,e).promise}function L(e){
     8  var t=this;return new t(j(e)?function(r,i){for(var n=e.length,a=0;a<n;a++)t.resolve(e[a]).then(r,i)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function N(e){var t=this,r=new t(l);return S(r,e),r}function C(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function P(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function B(){var e=void 0;if(void 0!==n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=ne}var U=void 0;U=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var j=U,F=0,G=void 0,z=void 0,X=function(e,t){K[F]=e,K[F+1]=t,2===(F+=2)&&(z?z(f):Q())},H="undefined"!=typeof window?window:void 0,V=H||{},Y=V.MutationObserver||V.WebKitMutationObserver,q="undefined"==typeof self&&void 0!==i&&"[object process]"==={}.toString.call(i),W="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,K=new Array(1e3),Q=void 0;Q=q?function(){return function(){return i.nextTick(f)}}():Y?function(){var e=0,t=new Y(f),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}():W?function(){var e=new MessageChannel;return e.port1.onmessage=f,function(){return e.port2.postMessage(0)}}():void 0===H&&"function"==typeof e?function(){try{var e=Function("return this")().require("vertx");return G=e.runOnLoop||e.runOnContext,s()}catch(e){return u()}}():u();var Z=Math.random().toString(36).substring(2),J=void 0,$=1,ee=2,te={error:null},re=0,ie=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(l),this.promise[Z]||O(this.promise),j(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&E(this.promise,this._result))):S(this.promise,x())}return e.prototype._enumerate=function(e){for(var t=0;this._state===J&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,i=r.resolve;if(i===d){var n=m(e);if(n===c&&e._state!==J)this._settledAt(e._state,t,e._result);else if("function"!=typeof n)this._remaining--,this._result[t]=e;else if(r===ne){var a=new r(l);v(a,e,n),this._willSettleAt(a,t)}else this._willSettleAt(new r(function(t){return t(e)}),t)}else this._willSettleAt(i(e),t)},e.prototype._settledAt=function(e,t,r){var i=this.promise;i._state===J&&(this._remaining--,e===ee?S(i,r):this._result[t]=r),0===this._remaining&&E(i,this._result)},e.prototype._willSettleAt=function(e,t){var r=this;k(e,void 0,function(e){return r._settledAt($,t,e)},function(e){return r._settledAt(ee,t,e)})},e}(),ne=function(){function e(t){this[Z]=M(),this._result=this._state=void 0,this._subscribers=[],l!==t&&("function"!=typeof t&&C(),this instanceof e?I(this,t):P())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var t=this,r=t.constructor;return t.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})})},e}();return ne.prototype.then=c,ne.all=D,ne.race=L,ne.resolve=d,ne.reject=N,ne._setScheduler=a,ne._setAsap=o,ne._asap=X,ne.polyfill=B,ne.Promise=ne,ne})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:122}],85:[function(e,t,r){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function a(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,r,i,a,u,f;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(r=this._events[e],s(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(o(r))for(a=Array.prototype.slice.call(arguments,1),f=r.slice(),i=f.length,u=0;u<i;u++)f[u].apply(this,a);return!0},i.prototype.addListener=function(e,t){var r;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(r=s(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},i.prototype.removeListener=function(e,t){var r,i,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,i=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){i=s;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],86:[function(e,t,r){function i(e,t,r,i){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=r/8,s=n.alloc(o),u=n.alloc(i||0),f=n.alloc(0);o>0||i>0;){var c=new a;c.update(f),c.update(e),t&&c.update(t),f=c.digest();var d=0;if(o>0){var l=s.length-o;d=Math.min(o,f.length),f.copy(s,l,0,d),o-=d}if(d<f.length&&i>0){var h=u.length-i,p=Math.min(i,f.length-d);f.copy(u,h,d,d+p),i-=p}}return f.fill(0),{key:s,iv:u}}var n=e("safe-buffer").Buffer,a=e("md5.js");t.exports=i},{"md5.js":106,"safe-buffer":132}],87:[function(e,t,r){var i=i||function(e){"use strict";if(!(void 0===e||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=e.document,r=function(){return e.URL||e.webkitURL||e},i=t.createElementNS("http://www.w3.org/1999/xhtml","a"),n="download"in i,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},o=/constructor/i.test(e.HTMLElement)||e.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},f=function(e){var t=function(){"string"==typeof e?r().revokeObjectURL(e):e.remove()};setTimeout(t,4e4)},c=function(e,t,r){t=[].concat(t);for(var i=t.length;i--;){var n=e["on"+t[i]];if("function"==typeof n)try{n.call(e,r||e)}catch(e){u(e)}}},d=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},l=function(t,u,l){l||(t=d(t));var h,p=this,m=t.type,_="application/octet-stream"===m,b=function(){c(p,"writestart progress write writeend".split(" "))};if(p.readyState=p.INIT,n)return h=r().createObjectURL(t),void setTimeout(function(){i.href=h,i.download=u,a(i),b(),f(h),p.readyState=p.DONE});!function(){if((s||_&&o)&&e.FileReader){var i=new FileReader;return i.onloadend=function(){var t=s?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");e.open(t,"_blank")||(e.location.href=t),t=void 0,p.readyState=p.DONE,b()},i.readAsDataURL(t),void(p.readyState=p.INIT)}if(h||(h=r().createObjectURL(t)),_)e.location.href=h;else{e.open(h,"_blank")||(e.location.href=h)}p.readyState=p.DONE,b(),f(h)}()},h=l.prototype,p=function(e,t,r){return new l(e,t||e.name||"download",r)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,r){return t=t||e.name||"download",r||(e=d(e)),navigator.msSaveOrOpenBlob(e,t)}:(h.abort=function(){},h.readyState=h.INIT=0,h.WRITING=1,h.DONE=2,h.error=h.onwritestart=h.onprogress=h.onwrite=h.onabort=h.onerror=h.onwriteend=null,p)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);void 0!==t&&t.exports?t.exports.saveAs=i:void 0!==define&&null!==define&&null!==define.amd&&define("FileSaver.js",function(){return i})},{}],88:[function(e,t,r){"use strict";function i(e,t){if(!a.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}function n(e){o.call(this),this._block=a.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var a=e("safe-buffer").Buffer,o=e("stream").Transform;e("inherits")(n,o),n.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(e){i=e}r(i)},n.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},n.prototype.update=function(e,t){if(i(e,"Data"),this._finalized)throw new Error("Digest already called");a.isBuffer(e)||(e=a.from(e,t));for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[n++];this._update(),this._blockOffset=0}for(;n<e.length;)r[this._blockOffset++]=e[n++];for(var s=0,u=8*e.length;u>0;++s)this._length[s]+=u,(u=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*u);return this},n.prototype._update=function(){throw new Error("_update is not implemented")},n.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},n.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=n},{inherits:104,"safe-buffer":132,stream:141}],89:[function(e,t,r){var i=r;i.utils=e("./hash/utils"),i.common=e("./hash/common"),i.sha=e("./hash/sha"),i.ripemd=e("./hash/ripemd"),i.hmac=e("./hash/hmac"),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},{"./hash/common":90,"./hash/hmac":91,"./hash/ripemd":92,"./hash/sha":93,"./hash/utils":100}],90:[function(e,t,r){"use strict";function i(){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}var n=e("./utils"),a=e("minimalistic-assert");r.BlockHash=i,i.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},i.prototype.digest=function(e){return this.update(this._pad()),a(null===this.pending),this._digest(e)},i.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=e>>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,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,a=8;a<this.padLength;a++)i[n++]=0;return i}},{"./utils":100,"minimalistic-assert":108}],91:[function(e,t,r){"use strict";function i(e,t,r){if(!(this instanceof i))return new i(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}var n=e("./utils"),a=e("minimalistic-assert");t.exports=i,i.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),a(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},i.prototype.update=function(e,t){return this.inner.update(e,t),this},i.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},{"./utils":100,"minimalistic-assert":108}],92:[function(e,t,r){"use strict";function i(){if(!(this instanceof i))return new i;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function n(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function a(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function o(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var s=e("./utils"),u=e("./common"),f=s.rotl32,c=s.sum32,d=s.sum32_3,l=s.sum32_4,h=u.BlockHash;s.inherits(i,h),r.ripemd160=i,i.blockSize=512,i.outSize=160,i.hmacStrength=192,i.padLength=64,i.prototype._update=function(e,t){for(var r=this.h[0],i=this.h[1],s=this.h[2],u=this.h[3],h=this.h[4],y=r,v=i,g=s,w=u,E=h,S=0;S<80;S++){var k=c(f(l(r,n(S,i,s,u),e[p[S]+t],a(S)),_[S]),h);r=h,h=u,u=f(s,10),s=i,i=k,k=c(f(l(y,n(79-S,v,g,w),e[m[S]+t],o(S)),b[S]),E),y=E,E=w,w=f(g,10),g=v,v=k}k=d(this.h[1],s,w),this.h[1]=d(this.h[2],u,E),this.h[2]=d(this.h[3],h,y),this.h[3]=d(this.h[4],r,v),this.h[4]=d(this.h[0],i,g),this.h[0]=k},i.prototype._digest=function(e){return"hex"===e?s.toHex32(this.h,"little"):s.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],_=[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],b=[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]},{"./common":90,"./utils":100}],93:[function(e,t,r){"use strict";r.sha1=e("./sha/1"),r.sha224=e("./sha/224"),r.sha256=e("./sha/256"),r.sha384=e("./sha/384"),r.sha512=e("./sha/512")},{"./sha/1":94,"./sha/224":95,"./sha/256":96,"./sha/384":97,"./sha/512":98}],94:[function(e,t,r){"use strict";function i(){if(!(this instanceof i))return new i;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}var n=e("../utils"),a=e("../common"),o=e("./common"),s=n.rotl32,u=n.sum32,f=n.sum32_5,c=o.ft_1,d=a.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];n.inherits(i,d),t.exports=i,i.blockSize=512,i.outSize=160,i.hmacStrength=80,i.padLength=64,i.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=s(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0],a=this.h[1],o=this.h[2],d=this.h[3],h=this.h[4];for(i=0;i<r.length;i++){var p=~~(i/20),m=f(s(n,5),c(p,a,o,d),h,r[i],l[p]);h=d,d=o,o=s(a,30),a=n,n=m}this.h[0]=u(this.h[0],n),this.h[1]=u(this.h[1],a),this.h[2]=u(this.h[2],o),this.h[3]=u(this.h[3],d),this.h[4]=u(this.h[4],h)},i.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":90,"../utils":100,"./common":99}],95:[function(e,t,r){"use strict";function i(){if(!(this instanceof i))return new i;a.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}var n=e("../utils"),a=e("./256");n.inherits(i,a),t.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},{"../utils":100,"./256":96}],96:[function(e,t,r){"use strict";function i(){if(!(this instanceof i))return new i;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}var n=e("../utils"),a=e("../common"),o=e("./common"),s=e("minimalistic-assert"),u=n.sum32,f=n.sum32_4,c=n.sum32_5,d=o.ch32,l=o.maj32,h=o.s0_256,p=o.s1_256,m=o.g0_256,_=o.g1_256,b=a.BlockHash,y=[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];n.inherits(i,b),t.exports=i,i.blockSize=512,i.outSize=256,i.hmacStrength=192,i.padLength=64,i.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=f(_(r[i-2]),r[i-7],m(r[i-15]),r[i-16]);var n=this.h[0],a=this.h[1],o=this.h[2],b=this.h[3],y=this.h[4],v=this.h[5],g=this.h[6],w=this.h[7];for(s(this.k.length===r.length),i=0;i<r.length;i++){var E=c(w,p(y),d(y,v,g),this.k[i],r[i]),S=u(h(n),l(n,a,o));w=g,g=v,v=y,y=u(b,E),b=o,o=a,a=n,n=u(E,S)}this.h[0]=u(this.h[0],n),this.h[1]=u(this.h[1],a),this.h[2]=u(this.h[2],o),this.h[3]=u(this.h[3],b),this.h[4]=u(this.h[4],y),this.h[5]=u(this.h[5],v),this.h[6]=u(this.h[6],g),this.h[7]=u(this.h[7],w)},i.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":90,"../utils":100,"./common":99,"minimalistic-assert":108}],97:[function(e,t,r){"use strict";function i(){if(!(this instanceof i))return new i;a.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}var n=e("../utils"),a=e("./512");n.inherits(i,a),t.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},{"../utils":100,"./512":98}],98:[function(e,t,r){"use strict";function i(){if(!(this instanceof i))return new i;O.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=x,this.W=new Array(160)}function n(e,t,r,i,n){var a=e&r^~e&n;return a<0&&(a+=4294967296),a}function a(e,t,r,i,n,a){var o=t&i^~t&a;return o<0&&(o+=4294967296),o}function o(e,t,r,i,n){var a=e&r^e&n^r&n;return a<0&&(a+=4294967296),a}function s(e,t,r,i,n,a){var o=t&i^t&a^i&a;return o<0&&(o+=4294967296),o}function u(e,t){var r=v(e,t,28),i=v(t,e,2),n=v(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function f(e,t){var r=g(e,t,28),i=g(t,e,2),n=g(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function c(e,t){var r=v(e,t,14),i=v(e,t,18),n=v(t,e,9),a=r^i^n;return a<0&&(a+=4294967296),a}function d(e,t){var r=g(e,t,14),i=g(e,t,18),n=g(t,e,9),a=r^i^n;return a<0&&(a+=4294967296),a}function l(e,t){var r=v(e,t,1),i=v(e,t,8),n=w(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function h(e,t){var r=g(e,t,1),i=g(e,t,8),n=E(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function p(e,t){var r=v(e,t,19),i=v(t,e,29),n=w(e,t,6),a=r^i^n;return a<0&&(a+=4294967296),a}function m(e,t){var r=g(e,t,19),i=g(t,e,29),n=E(e,t,6),a=r^i^n;return a<0&&(a+=4294967296),a}var _=e("../utils"),b=e("../common"),y=e("minimalistic-assert"),v=_.rotr64_hi,g=_.rotr64_lo,w=_.shr64_hi,E=_.shr64_lo,S=_.sum64,k=_.sum64_hi,T=_.sum64_lo,A=_.sum64_4_hi,R=_.sum64_4_lo,I=_.sum64_5_hi,M=_.sum64_5_lo,O=b.BlockHash,x=[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];_.inherits(i,O),t.exports=i,i.blockSize=1024,i.outSize=512,i.hmacStrength=192,i.padLength=128,i.prototype._prepareBlock=function(e,t){for(var r=this.W,i=0;i<32;i++)r[i]=e[t+i];for(;i<r.length;i+=2){var n=p(r[i-4],r[i-3]),a=m(r[i-4],r[i-3]),o=r[i-14],s=r[i-13],u=l(r[i-30],r[i-29]),f=h(r[i-30],r[i-29]),c=r[i-32],d=r[i-31];r[i]=A(n,a,o,s,u,f,c,d),r[i+1]=R(n,a,o,s,u,f,c,d)}},i.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],l=this.h[1],h=this.h[2],p=this.h[3],m=this.h[4],_=this.h[5],b=this.h[6],v=this.h[7],g=this.h[8],w=this.h[9],E=this.h[10],A=this.h[11],R=this.h[12],O=this.h[13],x=this.h[14],D=this.h[15];y(this.k.length===r.length);for(var L=0;L<r.length;L+=2){var N=x,C=D,P=c(g,w),B=d(g,w),U=n(g,w,E,A,R),j=a(g,w,E,A,R,O),F=this.k[L],G=this.k[L+1],z=r[L],X=r[L+1],H=I(N,C,P,B,U,j,F,G,z,X),V=M(N,C,P,B,U,j,F,G,z,X);N=u(i,l),C=f(i,l),P=o(i,l,h,p,m),B=s(i,l,h,p,m,_);var Y=k(N,C,P,B),q=T(N,C,P,B);x=R,D=O,R=E,O=A,E=g,A=w,g=k(b,v,H,V),w=T(v,v,H,V),b=m,v=_,m=h,_=p,h=i,p=l,i=k(H,V,Y,q),l=T(H,V,Y,q)}S(this.h,0,i,l),S(this.h,2,h,p),S(this.h,4,m,_),S(this.h,6,b,v),S(this.h,8,g,w),S(this.h,10,E,A),S(this.h,12,R,O),S(this.h,14,x,D)},i.prototype._digest=function(e){return"hex"===e?_.toHex32(this.h,"big"):_.split32(this.h,"big")}},{"../common":90,"../utils":100,"minimalistic-assert":108}],99:[function(e,t,r){"use strict";function i(e,t,r,i){return 0===e?n(t,r,i):1===e||3===e?o(t,r,i):2===e?a(t,r,i):void 0}function n(e,t,r){return e&t^~e&r}function a(e,t,r){return e&t^e&r^t&r}function o(e,t,r){return e^t^r}function s(e){return l(e,2)^l(e,13)^l(e,22)}function u(e){return l(e,6)^l(e,11)^l(e,25)}function f(e){return l(e,7)^l(e,18)^e>>>3}function c(e){return l(e,17)^l(e,19)^e>>>10}var d=e("../utils"),l=d.rotr32;r.ft_1=i,r.ch32=n,r.maj32=a,r.p32=o,r.s0_256=s,r.s1_256=u,r.g0_256=f,r.g1_256=c},{"../utils":100}],100:[function(e,t,r){"use strict";function i(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for(e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var i=0;i<e.length;i++){var n=e.charCodeAt(i),a=n>>8,o=255&n;a?r.push(a,o):r.push(o)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r}function n(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];"little"===t&&(n=a(n)),r+=u(n.toString(16))}return r}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}function f(e,t,r,i){var n=r-t;I(n%4==0);for(var a=new Array(n/4),o=0,s=t;o<a.length;o++,s+=4){var u;u="big"===i?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],a[o]=u>>>0}return a}function c(e,t){for(var r=new Array(4*e.length),i=0,n=0;i<e.length;i++,n+=4){var a=e[i];"big"===t?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=255&a):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=255&a)}return r}function d(e,t){return e>>>t|e<<32-t}function l(e,t){return e<<t|e>>>32-t}function h(e,t){return e+t>>>0}function p(e,t,r){return e+t+r>>>0}function m(e,t,r,i){return e+t+r+i>>>0}function _(e,t,r,i,n){return e+t+r+i+n>>>0}function b(e,t,r,i){var n=e[t],a=e[t+1],o=i+a>>>0,s=(o<i?1:0)+r+n;e[t]=s>>>0,e[t+1]=o}function y(e,t,r,i){return(t+i>>>0<t?1:0)+e+r>>>0}function v(e,t,r,i){return t+i>>>0}function g(e,t,r,i,n,a,o,s){var u=0,f=t;return f=f+i>>>0,u+=f<t?1:0,f=f+a>>>0,u+=f<a?1:0,f=f+s>>>0,u+=f<s?1:0,e+r+n+o+u>>>0}function w(e,t,r,i,n,a,o,s){return t+i+a+s>>>0}function E(e,t,r,i,n,a,o,s,u,f){var c=0,d=t;return d=d+i>>>0,c+=d<t?1:0,d=d+a>>>0,c+=d<a?1:0,d=d+s>>>0,c+=d<s?1:0,d=d+f>>>0,c+=d<f?1:0,e+r+n+o+u+c>>>0}function S(e,t,r,i,n,a,o,s,u,f){return t+i+a+s+f>>>0}function k(e,t,r){return(t<<32-r|e>>>r)>>>0}function T(e,t,r){return(e<<32-r|t>>>r)>>>0}function A(e,t,r){return e>>>r}function R(e,t,r){return(e<<32-r|t>>>r)>>>0}var I=e("minimalistic-assert"),M=e("inherits");r.inherits=M,r.toArray=i,r.toHex=n,r.htonl=a,r.toHex32=o,r.zero2=s,r.zero8=u,r.join32=f,r.split32=c,r.rotr32=d,r.rotl32=l,r.sum32=h,r.sum32_3=p,r.sum32_4=m,r.sum32_5=_,r.sum64=b,r.sum64_hi=y,r.sum64_lo=v,r.sum64_4_hi=g,r.sum64_4_lo=w,r.sum64_5_hi=E,r.sum64_5_lo=S,r.rotr64_hi=k,r.rotr64_lo=T,r.shr64_hi=A,r.shr64_lo=R},{inherits:104,"minimalistic-assert":108}],101:[function(e,t,r){"use strict";function i(e){if(!(this instanceof i))return new i(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=a.toArray(e.entropy,e.entropyEnc||"hex"),r=a.toArray(e.nonce,e.nonceEnc||"hex"),n=a.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var n=e("hash.js"),a=e("minimalistic-crypto-utils"),o=e("minimalistic-assert");t.exports=i,i.prototype._init=function(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.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},i.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},i.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},i.prototype.reseed=function(e,t,r,i){"string"!=typeof t&&(i=r,r=t,t=null),e=a.toArray(e,t),r=a.toArray(r,i),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},i.prototype.generate=function(e,t,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=a.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length<e;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var o=n.slice(0,e);return this._update(r),this._reseed++,a.encode(o,t)}},{"hash.js":89,"minimalistic-assert":108,"minimalistic-crypto-utils":109}],102:[function(e,t,r){r.read=function(e,t,r,i,n){var a,o,s=8*n-i-1,u=(1<<s)-1,f=u>>1,c=-7,d=r?n-1:0,l=r?-1:1,h=e[t+d];for(d+=l,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=l,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=i;c>0;o=256*o+e[t+d],d+=l,c-=8);if(0===a)a=1-f;else{if(a===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,i),a-=f}return(h?-1:1)*o*Math.pow(2,a-i)},r.write=function(e,t,r,i,n,a){var o,s,u,f=8*a-n-1,c=(1<<f)-1,d=c>>1,l=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:a-1,p=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+d>=1?l/u:l*Math.pow(2,1-d),t*u>=2&&(o++,u/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*u-1)*Math.pow(2,n),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,n),o=0));n>=8;e[r+h]=255&s,h+=p,s/=256,n-=8);for(o=o<<n|s,f+=n;f>0;e[r+h]=255&o,h+=p,o/=256,f-=8);e[r+h-p]|=128*m}},{}],103:[function(e,t,r){var i=[].indexOf;t.exports=function(e,t){if(i)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},{}],104:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],105:[function(e,t,r){function i(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function n(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&i(e.slice(0,0))}t.exports=function(e){return null!=e&&(i(e)||n(e)||!!e._isBuffer)}},{}],106:[function(e,t,r){(function(r){"use strict";function i(){c.call(this,64),
     9  this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function n(e,t){return e<<t|e>>>32-t}function a(e,t,r,i,a,o,s){return n(e+(t&r|~t&i)+a+o|0,s)+t|0}function o(e,t,r,i,a,o,s){return n(e+(t&i|r&~i)+a+o|0,s)+t|0}function s(e,t,r,i,a,o,s){return n(e+(t^r^i)+a+o|0,s)+t|0}function u(e,t,r,i,a,o,s){return n(e+(r^(t|~i))+a+o|0,s)+t|0}var f=e("inherits"),c=e("hash-base"),d=new Array(16);f(i,c),i.prototype._update=function(){for(var e=d,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,i=this._b,n=this._c,f=this._d;r=a(r,i,n,f,e[0],3614090360,7),f=a(f,r,i,n,e[1],3905402710,12),n=a(n,f,r,i,e[2],606105819,17),i=a(i,n,f,r,e[3],3250441966,22),r=a(r,i,n,f,e[4],4118548399,7),f=a(f,r,i,n,e[5],1200080426,12),n=a(n,f,r,i,e[6],2821735955,17),i=a(i,n,f,r,e[7],4249261313,22),r=a(r,i,n,f,e[8],1770035416,7),f=a(f,r,i,n,e[9],2336552879,12),n=a(n,f,r,i,e[10],4294925233,17),i=a(i,n,f,r,e[11],2304563134,22),r=a(r,i,n,f,e[12],1804603682,7),f=a(f,r,i,n,e[13],4254626195,12),n=a(n,f,r,i,e[14],2792965006,17),i=a(i,n,f,r,e[15],1236535329,22),r=o(r,i,n,f,e[1],4129170786,5),f=o(f,r,i,n,e[6],3225465664,9),n=o(n,f,r,i,e[11],643717713,14),i=o(i,n,f,r,e[0],3921069994,20),r=o(r,i,n,f,e[5],3593408605,5),f=o(f,r,i,n,e[10],38016083,9),n=o(n,f,r,i,e[15],3634488961,14),i=o(i,n,f,r,e[4],3889429448,20),r=o(r,i,n,f,e[9],568446438,5),f=o(f,r,i,n,e[14],3275163606,9),n=o(n,f,r,i,e[3],4107603335,14),i=o(i,n,f,r,e[8],1163531501,20),r=o(r,i,n,f,e[13],2850285829,5),f=o(f,r,i,n,e[2],4243563512,9),n=o(n,f,r,i,e[7],1735328473,14),i=o(i,n,f,r,e[12],2368359562,20),r=s(r,i,n,f,e[5],4294588738,4),f=s(f,r,i,n,e[8],2272392833,11),n=s(n,f,r,i,e[11],1839030562,16),i=s(i,n,f,r,e[14],4259657740,23),r=s(r,i,n,f,e[1],2763975236,4),f=s(f,r,i,n,e[4],1272893353,11),n=s(n,f,r,i,e[7],4139469664,16),i=s(i,n,f,r,e[10],3200236656,23),r=s(r,i,n,f,e[13],681279174,4),f=s(f,r,i,n,e[0],3936430074,11),n=s(n,f,r,i,e[3],3572445317,16),i=s(i,n,f,r,e[6],76029189,23),r=s(r,i,n,f,e[9],3654602809,4),f=s(f,r,i,n,e[12],3873151461,11),n=s(n,f,r,i,e[15],530742520,16),i=s(i,n,f,r,e[2],3299628645,23),r=u(r,i,n,f,e[0],4096336452,6),f=u(f,r,i,n,e[7],1126891415,10),n=u(n,f,r,i,e[14],2878612391,15),i=u(i,n,f,r,e[5],4237533241,21),r=u(r,i,n,f,e[12],1700485571,6),f=u(f,r,i,n,e[3],2399980690,10),n=u(n,f,r,i,e[10],4293915773,15),i=u(i,n,f,r,e[1],2240044497,21),r=u(r,i,n,f,e[8],1873313359,6),f=u(f,r,i,n,e[15],4264355552,10),n=u(n,f,r,i,e[6],2734768916,15),i=u(i,n,f,r,e[13],1309151649,21),r=u(r,i,n,f,e[4],4149444226,6),f=u(f,r,i,n,e[11],3174756917,10),n=u(n,f,r,i,e[2],718787259,15),i=u(i,n,f,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+f|0},i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new r(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=i}).call(this,e("buffer").Buffer)},{buffer:48,"hash-base":88,inherits:104}],107:[function(e,t,r){function i(e){this.rand=e||new a.Rand}var n=e("bn.js"),a=e("brorand");t.exports=i,i.create=function(e){return new i(e)},i.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},i.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},i.prototype.test=function(e,t,r){var i=e.bitLength(),a=n.mont(e),o=new n(1).toRed(a);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var f=e.shrn(u),c=s.toRed(a);t>0;t--){var d=this._randrange(new n(2),s);r&&r(d);var l=d.toRed(a).redPow(f);if(0!==l.cmp(o)&&0!==l.cmp(c)){for(var h=1;h<u;h++){if(l=l.redSqr(),0===l.cmp(o))return!1;if(0===l.cmp(c))break}if(h===u)return!1}}return!0},i.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),a=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var o=e.subn(1),s=0;!o.testn(s);s++);for(var u=e.shrn(s),f=o.toRed(i);t>0;t--){var c=this._randrange(new n(2),o),d=e.gcd(c);if(0!==d.cmpn(1))return d;var l=c.toRed(i).redPow(u);if(0!==l.cmp(a)&&0!==l.cmp(f)){for(var h=1;h<s;h++){if(l=l.redSqr(),0===l.cmp(a))return l.fromRed().subn(1).gcd(e);if(0===l.cmp(f))break}if(h===s)return l=l.redSqr(),l.fromRed().subn(1).gcd(e)}}return!1}},{"bn.js":16,brorand:17}],108:[function(e,t,r){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}t.exports=i,i.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],109:[function(e,t,r){"use strict";function i(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var i=0;i<e.length;i++)r[i]=0|e[i];return r}if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!=0&&(e="0"+e);for(var i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var i=0;i<e.length;i++){var n=e.charCodeAt(i),a=n>>8,o=255&n;a?r.push(a,o):r.push(o)}return r}function n(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}var o=r;o.toArray=i,o.zero2=n,o.toHex=a,o.encode=function(e,t){return"hex"===t?a(e):e}},{}],110:[function(e,t,r){t.exports={"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"}},{}],111:[function(e,t,r){"use strict";var i=e("asn1.js");r.certificate=e("./certificate");var n=i.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});r.RSAPrivateKey=n;var a=i.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=a;var o=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});r.PublicKey=o;var s=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),u=i.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});r.PrivateKey=u;var f=i.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=f;var c=i.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});r.DSAPrivateKey=c,r.DSAparam=i.define("DSAparam",function(){this.int()});var d=i.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=d;var l=i.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=i.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":112,"asn1.js":1}],112:[function(e,t,r){"use strict";var i=e("asn1.js"),n=i.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),a=i.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),s=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),u=i.define("RelativeDistinguishedName",function(){this.setof(a)}),f=i.define("RDNSequence",function(){this.seqof(u)}),c=i.define("Name",function(){this.choice({rdnSequence:this.use(f)})}),d=i.define("Validity",function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))}),l=i.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),h=i.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(c),this.key("validity").use(d),this.key("subject").use(c),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())}),p=i.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});t.exports=p},{"asn1.js":1}],113:[function(e,t,r){(function(r){var i=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,n=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,o=e("evp_bytestokey"),s=e("browserify-aes");t.exports=function(e,t){var u,f=e.toString(),c=f.match(i);if(c){var d="aes"+c[1],l=new r(c[2],"hex"),h=new r(c[3].replace(/[\r\n]/g,""),"base64"),p=o(t,l.slice(0,8),parseInt(c[1],10)).key,m=[],_=s.createDecipheriv(d,p,l);m.push(_.update(h)),m.push(_.final()),u=r.concat(m)}else{var b=f.match(a);u=new r(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:f.match(n)[1],data:u}}}).call(this,e("buffer").Buffer)},{"browserify-aes":21,buffer:48,evp_bytestokey:86}],114:[function(e,t,r){(function(r){function i(e){var t;"object"!=typeof e||r.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new r(e));var i,o,u=s(e,t),f=u.tag,c=u.data;switch(f){case"CERTIFICATE":o=a.certificate.decode(c,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(o||(o=a.PublicKey.decode(c,"der")),i=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPublicKey.decode(o.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return o.subjectPrivateKey=o.subjectPublicKey,{type:"ec",data:o};case"1.2.840.10040.4.1":return o.algorithm.params.pub_key=a.DSAparam.decode(o.subjectPublicKey.data,"der"),{type:"dsa",data:o.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+f);case"ENCRYPTED PRIVATE KEY":c=a.EncryptedPrivateKey.decode(c,"der"),c=n(c,t);case"PRIVATE KEY":switch(o=a.PrivateKey.decode(c,"der"),i=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPrivateKey.decode(o.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:o.algorithm.curve,privateKey:a.ECPrivateKey.decode(o.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return o.algorithm.params.priv_key=a.DSAparam.decode(o.subjectPrivateKey,"der"),{type:"dsa",params:o.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+f);case"RSA PUBLIC KEY":return a.RSAPublicKey.decode(c,"der");case"RSA PRIVATE KEY":return a.RSAPrivateKey.decode(c,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:a.DSAPrivateKey.decode(c,"der")};case"EC PRIVATE KEY":return c=a.ECPrivateKey.decode(c,"der"),{curve:c.parameters.value,privateKey:c.privateKey};default:throw new Error("unknown key type "+f)}}function n(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=o[e.algorithm.decrypt.cipher.algo.join(".")],s=e.algorithm.decrypt.cipher.iv,c=e.subjectPrivateKey,d=parseInt(a.split("-")[1],10)/8,l=f.pbkdf2Sync(t,i,n,d),h=u.createDecipheriv(a,l,s),p=[];return p.push(h.update(c)),p.push(h.final()),r.concat(p)}var a=e("./asn1"),o=e("./aesid.json"),s=e("./fixProc"),u=e("browserify-aes"),f=e("pbkdf2");t.exports=i,i.signature=a.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":110,"./asn1":111,"./fixProc":113,"browserify-aes":21,buffer:48,pbkdf2:116}],115:[function(e,t,r){(function(e){function t(e,t){for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var r=[],i=0;i<e.length;i++)t(e[i],i,e)&&r.push(e[i]);return r}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(e){return n.exec(e).slice(1)};r.resolve=function(){for(var r="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,n="/"===o.charAt(0))}return r=t(i(r.split("/"),function(e){return!!e}),!n).join("/"),(n?"/":"")+r||"."},r.normalize=function(e){var n=r.isAbsolute(e),a="/"===o(e,-1);return e=t(i(e.split("/"),function(e){return!!e}),!n).join("/"),e||n||(e="."),e&&a&&(e+="/"),(n?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(i(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function i(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var n=i(e.split("/")),a=i(t.split("/")),o=Math.min(n.length,a.length),s=o,u=0;u<o;u++)if(n[u]!==a[u]){s=u;break}for(var f=[],u=s;u<n.length;u++)f.push("..");return f=f.concat(a.slice(s)),f.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){var t=a(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},r.basename=function(e,t){var r=a(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){return a(e)[3]};var o="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:122}],116:[function(e,t,r){r.pbkdf2=e("./lib/async"),r.pbkdf2Sync=e("./lib/sync")},{"./lib/async":117,"./lib/sync":120}],117:[function(e,t,r){(function(r,i){function n(e){if(i.process&&!i.process.browser)return Promise.resolve(!1);if(!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(void 0!==p[e])return p[e];s=s||d.alloc(8);var t=a(s,s,10,128,e).then(function(){return!0}).catch(function(){return!1});return p[e]=t,t}function a(e,t,r,i,n){return l.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return l.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:n}},e,i<<3)}).then(function(e){return d.from(e)})}function o(e,t){e.then(function(e){r.nextTick(function(){t(null,e)})},function(e){r.nextTick(function(){t(e)})})}var s,u=e("./precondition"),f=e("./default-encoding"),c=e("./sync"),d=e("safe-buffer").Buffer,l=i.crypto&&i.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},p=[];t.exports=function(e,t,s,l,p,m){"function"==typeof p&&(m=p,p=void 0),p=p||"sha1";var _=h[p.toLowerCase()];if(!_||"function"!=typeof i.Promise)return r.nextTick(function(){var r;try{r=c(e,t,s,l,p)}catch(e){return m(e)}m(null,r)});if(u(e,t,s,l),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");d.isBuffer(e)||(e=d.from(e,f)),d.isBuffer(t)||(t=d.from(t,f)),o(n(_).then(function(r){return r?a(e,t,s,l,_):c(e,t,s,l,p)}),m)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":118,"./precondition":119,"./sync":120,_process:122,"safe-buffer":132}],118:[function(e,t,r){(function(e){var r;if(e.browser)r="utf-8";else{r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}t.exports=r}).call(this,e("_process"))},{_process:122}],119:[function(e,t,r){(function(e){function r(t,r){if("string"!=typeof t&&!e.isBuffer(t))throw new TypeError(r+" must be a buffer or string")}var i=Math.pow(2,30)-1;t.exports=function(e,t,n,a){if(r(e,"Password"),r(t,"Salt"),"number"!=typeof n)throw new TypeError("Iterations not a number");if(n<0)throw new TypeError("Bad iterations");if("number"!=typeof a)throw new TypeError("Key length not a number");if(a<0||a>i||a!==a)throw new TypeError("Bad key length")}}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":105}],120:[function(e,t,r){function i(e,t,r){var i=n(e),a="sha512"===e||"sha384"===e?128:64;t.length>a?t=i(t):t.length<a&&(t=d.concat([t,l],a));for(var o=d.allocUnsafe(a+h[e]),s=d.allocUnsafe(a+h[e]),u=0;u<a;u++)o[u]=54^t[u],s[u]=92^t[u];var f=d.allocUnsafe(a+r+4);o.copy(f,0,0,a),this.ipad1=f,this.ipad2=o,this.opad=s,this.alg=e,this.blocksize=a,this.hash=i,this.size=h[e]}function n(e){function t(t){return u(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?s:"md5"===e?o:t}function a(e,t,r,n,a){f(e,t,r,n),d.isBuffer(e)||(e=d.from(e,c)),d.isBuffer(t)||(t=d.from(t,c)),a=a||"sha1";var o=new i(a,e,t.length),s=d.allocUnsafe(n),u=d.allocUnsafe(t.length+4);t.copy(u,0,0,t.length);for(var l=0,p=h[a],m=Math.ceil(n/p),_=1;_<=m;_++){u.writeUInt32BE(_,t.length);for(var b=o.run(u,o.ipad1),y=b,v=1;v<r;v++){y=o.run(y,o.ipad2);for(var g=0;g<p;g++)b[g]^=y[g]}b.copy(s,l),l+=p}return s}var o=e("create-hash/md5"),s=e("ripemd160"),u=e("sha.js"),f=e("./precondition"),c=e("./default-encoding"),d=e("safe-buffer").Buffer,l=d.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};i.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=a},{"./default-encoding":118,"./precondition":119,"create-hash/md5":54,ripemd160:131,"safe-buffer":132,"sha.js":134}],121:[function(e,t,r){(function(e){"use strict";function r(t,r,i,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,i)});case 4:return e.nextTick(function(){t.call(null,r,i,n)});default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return e.nextTick(function(){t.apply(null,a)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:r}:t.exports=e}).call(this,e("_process"))},{_process:122}],122:[function(e,t,r){function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function a(e){if(d===setTimeout)return setTimeout(e,0);if((d===i||!d)&&setTimeout)return d=setTimeout,setTimeout(e,0);try{return d(e,0)}catch(t){try{return d.call(null,e,0)}catch(t){return d.call(this,e,0)}}}function o(e){if(l===clearTimeout)return clearTimeout(e);if((l===n||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function s(){_&&p&&(_=!1,p.length?m=p.concat(m):b=-1,m.length&&u())}function u(){if(!_){var e=a(s);_=!0;for(var t=m.length;t;){for(p=m,m=[];++b<t;)p&&p[b].run();b=-1,t=m.length}p=null,_=!1,o(e)}}function f(e,t){this.fun=e,this.array=t}function c(){}var d,l,h=t.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:i}catch(e){d=i}try{l="function"==typeof clearTimeout?clearTimeout:n}catch(e){l=n}}();var p,m=[],_=!1,b=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];m.push(new f(e,t)),1!==m.length||_||a(u)},f.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],123:[function(e,t,r){r.publicEncrypt=e("./publicEncrypt"),r.privateDecrypt=e("./privateDecrypt"),r.privateEncrypt=function(e,t){return r.publicEncrypt(e,t,!0)},r.publicDecrypt=function(e,t){return r.privateDecrypt(e,t,!0)}},{"./privateDecrypt":125,"./publicEncrypt":126}],124:[function(e,t,r){(function(r){function i(e){var t=new r(4);return t.writeUInt32BE(e,0),t}var n=e("create-hash");t.exports=function(e,t){for(var a,o=new r(""),s=0;o.length<t;)a=i(s++),o=r.concat([o,n("sha1").update(e).update(a).digest()]);return o.slice(0,t)}}).call(this,e("buffer").Buffer)},{buffer:48,"create-hash":53}],125:[function(e,t,r){(function(r){function i(e,t){var i=(e.modulus,e.modulus.byteLength()),n=(t.length,d("sha1").update(new r("")).digest()),o=n.length;if(0!==t[0])throw new Error("decryption error");var f=t.slice(1,o+1),c=t.slice(o+1),l=u(f,s(c,o)),h=u(c,s(l,i-o-1));if(a(n,h.slice(0,o)))throw new Error("decryption error");for(var p=o;0===h[p];)p++;if(1!==h[p++])throw new Error("decryption error");return h.slice(p)}function n(e,t,r){for(var i=t.slice(0,2),n=2,a=0;0!==t[n++];)if(n>=t.length){a++;break}var o=t.slice(2,n-1);t.slice(n-1,n);if(("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&a++,o.length<8&&a++,a)throw new Error("decryption error");return t.slice(n)}function a(e,t){e=new r(e),t=new r(t);var i=0,n=e.length;e.length!==t.length&&(i++,n=Math.min(e.length,t.length));for(var a=-1;++a<n;)i+=e[a]^t[a];return i}var o=e("parse-asn1"),s=e("./mgf"),u=e("./xor"),f=e("bn.js"),c=e("browserify-rsa"),d=e("create-hash"),l=e("./withPublic");t.exports=function(e,t,a){var s;s=e.padding?e.padding:a?1:4;var u=o(e),d=u.modulus.byteLength();if(t.length>d||new f(t).cmp(u.modulus)>=0)throw new Error("decryption error");var h;h=a?l(new f(t),u):c(t,u);var p=new r(d-h.length);if(p.fill(0),h=r.concat([p,h],d),4===s)return i(u,h);if(1===s)return n(u,h,a);if(3===s)return h;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":124,"./withPublic":127,"./xor":128,"bn.js":16,"browserify-rsa":39,buffer:48,"create-hash":53,"parse-asn1":114}],126:[function(e,t,r){(function(r){function i(e,t){var i=e.modulus.byteLength(),n=t.length,a=u("sha1").update(new r("")).digest(),o=a.length,l=2*o;if(n>i-l-2)throw new Error("message too long");var h=new r(i-n-l-2);h.fill(0);var p=i-o-1,m=s(o),_=c(r.concat([a,h,new r([1]),t],p),f(m,p)),b=c(m,f(_,o));return new d(r.concat([new r([0]),b,_],i))}function n(e,t,i){var n=t.length,o=e.modulus.byteLength();if(n>o-11)throw new Error("message too long");var s;return i?(s=new r(o-n-3),s.fill(255)):s=a(o-n-3),new d(r.concat([new r([0,i?1:2]),s,new r([0]),t],o))}function a(e,t){for(var i,n=new r(e),a=0,o=s(2*e),u=0;a<e;)u===o.length&&(o=s(2*e),u=0),(i=o[u++])&&(n[a++]=i);return n}var o=e("parse-asn1"),s=e("randombytes"),u=e("create-hash"),f=e("./mgf"),c=e("./xor"),d=e("bn.js"),l=e("./withPublic"),h=e("browserify-rsa");t.exports=function(e,t,r){var a;a=e.padding?e.padding:r?1:4;var s,u=o(e);if(4===a)s=i(u,t);else if(1===a)s=n(u,t,r);else{if(3!==a)throw new Error("unknown padding");if(s=new d(t),s.cmp(u.modulus)>=0)throw new Error("data too long for modulus")}return r?h(s,u):l(s,u)}}).call(this,e("buffer").Buffer)},{"./mgf":124,"./withPublic":127,"./xor":128,"bn.js":16,"browserify-rsa":39,buffer:48,"create-hash":53,"parse-asn1":114,randombytes:129}],127:[function(e,t,r){(function(r){function i(e,t){return new r(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}var n=e("bn.js");t.exports=i}).call(this,e("buffer").Buffer)},{"bn.js":16,buffer:48}],128:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,i=-1;++i<r;)e[i]^=t[i];return e}},{}],129:[function(e,t,r){(function(r,i){"use strict";function n(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}function a(e,t){if(e>65536)throw new Error("requested too many random bytes");var n=new i.Uint8Array(e);e>0&&s.getRandomValues(n);var a=o.from(n.buffer);return"function"==typeof t?r.nextTick(function(){t(null,a)}):a}var o=e("safe-buffer").Buffer,s=i.crypto||i.msCrypto;s&&s.getRandomValues?t.exports=a:t.exports=n}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:122,"safe-buffer":132}],130:[function(e,t,r){(function(t,i){"use strict";function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}function a(e,t){if("number"!=typeof e||e!==e)throw new TypeError("offset must be a number");if(e>m||e<0)throw new TypeError("offset must be a uint32");if(e>h||e>t)throw new RangeError("offset out of range")}function o(e,t,r){if("number"!=typeof e||e!==e)throw new TypeError("size must be a number");if(e>m||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>h)throw new RangeError("buffer too small")}function s(e,t,r,n){if(!(l.isBuffer(e)||e instanceof i.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)n=t,t=0,r=e.length;else if("function"==typeof r)n=r,r=e.length-t;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return a(t,e.length),o(r,t,e.length),u(e,t,r,n)}function u(e,r,i,n){if(t.browser){var a=e.buffer,o=new Uint8Array(a,r,i);return p.getRandomValues(o),n?void t.nextTick(function(){n(null,e)}):e}return n?void d(i,function(t,i){if(t)return n(t);i.copy(e,r),n(null,e)}):(d(i).copy(e,r),e)}function f(e,t,r){if(void 0===t&&(t=0),!(l.isBuffer(e)||e instanceof i.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return a(t,e.length),void 0===r&&(r=e.length-t),o(r,t,e.length),u(e,t,r)}var c=e("safe-buffer"),d=e("randombytes"),l=c.Buffer,h=c.kMaxLength,p=i.crypto||i.msCrypto,m=Math.pow(2,32)-1;p&&p.getRandomValues||!t.browser?(r.randomFill=s,r.randomFillSync=f):(r.randomFill=n,r.randomFillSync=n)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:122,randombytes:129,"safe-buffer":132}],131:[function(e,t,r){"use strict";function i(){l.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function n(e,t){return e<<t|e>>>32-t}function a(e,t,r,i,a,o,s,u){return n(e+(t^r^i)+o+s|0,u)+a|0}function o(e,t,r,i,a,o,s,u){return n(e+(t&r|~t&i)+o+s|0,u)+a|0}function s(e,t,r,i,a,o,s,u){return n(e+((t|~r)^i)+o+s|0,u)+a|0}function u(e,t,r,i,a,o,s,u){return n(e+(t&i|r&~i)+o+s|0,u)+a|0}function f(e,t,r,i,a,o,s,u){return n(e+(t^(r|~i))+o+s|0,u)+a|0}var c=e("buffer").Buffer,d=e("inherits"),l=e("hash-base"),h=new Array(16),p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],_=[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],b=[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],y=[0,1518500249,1859775393,2400959708,2840853838],v=[1352829926,1548603684,1836072691,2053994217,0];d(i,l),i.prototype._update=function(){for(var e=h,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,i=0|this._b,c=0|this._c,d=0|this._d,l=0|this._e,g=0|this._a,w=0|this._b,E=0|this._c,S=0|this._d,k=0|this._e,T=0;T<80;T+=1){var A,R;T<16?(A=a(r,i,c,d,l,e[p[T]],y[0],_[T]),R=f(g,w,E,S,k,e[m[T]],v[0],b[T])):T<32?(A=o(r,i,c,d,l,e[p[T]],y[1],_[T]),R=u(g,w,E,S,k,e[m[T]],v[1],b[T])):T<48?(A=s(r,i,c,d,l,e[p[T]],y[2],_[T]),R=s(g,w,E,S,k,e[m[T]],v[2],b[T])):T<64?(A=u(r,i,c,d,l,e[p[T]],y[3],_[T]),R=o(g,w,E,S,k,e[m[T]],v[3],b[T])):(A=f(r,i,c,d,l,e[p[T]],y[4],_[T]),R=a(g,w,E,S,k,e[m[T]],v[4],b[T])),r=l,l=d,d=n(c,10),c=i,i=A,g=k,k=S,S=n(E,10),E=w,w=R}var I=this._b+c+S|0;this._b=this._c+d+k|0,this._c=this._d+l+g|0,this._d=this._e+r+w|0,this._e=this._a+i+E|0,this._a=I},i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=c.alloc?c.alloc(20):new c(20);return 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),e},t.exports=i},{buffer:48,"hash-base":88,inherits:104}],132:[function(e,t,r){function i(e,t){for(var r in e)t[r]=e[r]}function n(e,t,r){return o(e,t,r)}var a=e("buffer"),o=a.Buffer;o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=a:(i(a,r),r.Buffer=n),i(o,n),n.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},n.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=o(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},n.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},n.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a.SlowBuffer(e)}},{buffer:48}],133:[function(e,t,r){function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}var n=e("safe-buffer").Buffer;i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,a=e.length,o=this._len,s=0;s<a;){for(var u=o%i,f=Math.min(a-s,i-u),c=0;c<f;c++)r[u+c]=e[s+c];o+=f,s+=f,o%i==0&&this._update(r)}return this._len+=a,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,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},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":132}],134:[function(e,t,r){var r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=e("./sha"),
    10  r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":135,"./sha1":136,"./sha224":137,"./sha256":138,"./sha384":139,"./sha512":140}],135:[function(e,t,r){function i(){this.init(),this._w=d,u.call(this,64,56)}function n(e){return e<<5|e>>>27}function a(e){return e<<30|e>>>2}function o(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}var s=e("inherits"),u=e("./hash"),f=e("safe-buffer").Buffer,c=[1518500249,1859775393,-1894007588,-899497514],d=new Array(80);s(i,u),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var t=this._w,r=0|this._a,i=0|this._b,s=0|this._c,u=0|this._d,f=0|this._e,d=0;d<16;++d)t[d]=e.readInt32BE(4*d);for(;d<80;++d)t[d]=t[d-3]^t[d-8]^t[d-14]^t[d-16];for(var l=0;l<80;++l){var h=~~(l/20),p=n(r)+o(h,i,s,u)+f+t[l]+c[h]|0;f=u,u=s,s=a(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=u+this._d|0,this._e=f+this._e|0},i.prototype._hash=function(){var e=f.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=i},{"./hash":133,inherits:104,"safe-buffer":132}],136:[function(e,t,r){function i(){this.init(),this._w=l,f.call(this,64,56)}function n(e){return e<<1|e>>>31}function a(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function s(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}var u=e("inherits"),f=e("./hash"),c=e("safe-buffer").Buffer,d=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);u(i,f),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var t=this._w,r=0|this._a,i=0|this._b,u=0|this._c,f=0|this._d,c=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=n(t[l-3]^t[l-8]^t[l-14]^t[l-16]);for(var h=0;h<80;++h){var p=~~(h/20),m=a(r)+s(p,i,u,f)+c+t[h]+d[p]|0;c=f,f=u,u=o(i),i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=u+this._c|0,this._d=f+this._d|0,this._e=c+this._e|0},i.prototype._hash=function(){var e=c.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=i},{"./hash":133,inherits:104,"safe-buffer":132}],137:[function(e,t,r){function i(){this.init(),this._w=u,o.call(this,64,56)}var n=e("inherits"),a=e("./sha256"),o=e("./hash"),s=e("safe-buffer").Buffer,u=new Array(64);n(i,a),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var e=s.allocUnsafe(28);return 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},t.exports=i},{"./hash":133,"./sha256":138,inherits:104,"safe-buffer":132}],138:[function(e,t,r){function i(){this.init(),this._w=p,d.call(this,64,56)}function n(e,t,r){return r^e&(t^r)}function a(e,t,r){return e&t|r&(e|t)}function o(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function s(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function u(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function f(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var c=e("inherits"),d=e("./hash"),l=e("safe-buffer").Buffer,h=[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],p=new Array(64);c(i,d),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},i.prototype._update=function(e){for(var t=this._w,r=0|this._a,i=0|this._b,c=0|this._c,d=0|this._d,l=0|this._e,p=0|this._f,m=0|this._g,_=0|this._h,b=0;b<16;++b)t[b]=e.readInt32BE(4*b);for(;b<64;++b)t[b]=f(t[b-2])+t[b-7]+u(t[b-15])+t[b-16]|0;for(var y=0;y<64;++y){var v=_+s(l)+n(l,p,m)+h[y]+t[y]|0,g=o(r)+a(r,i,c)|0;_=m,m=p,p=l,l=d+v|0,d=c,c=i,i=r,r=v+g|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=l+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=_+this._h|0},i.prototype._hash=function(){var e=l.allocUnsafe(32);return 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),e},t.exports=i},{"./hash":133,inherits:104,"safe-buffer":132}],139:[function(e,t,r){function i(){this.init(),this._w=u,o.call(this,128,112)}var n=e("inherits"),a=e("./sha512"),o=e("./hash"),s=e("safe-buffer").Buffer,u=new Array(160);n(i,a),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}var t=s.allocUnsafe(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=i},{"./hash":133,"./sha512":140,inherits:104,"safe-buffer":132}],140:[function(e,t,r){function i(){this.init(),this._w=b,p.call(this,128,112)}function n(e,t,r){return r^e&(t^r)}function a(e,t,r){return e&t|r&(e|t)}function o(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function s(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function c(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function d(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function l(e,t){return e>>>0<t>>>0?1:0}var h=e("inherits"),p=e("./hash"),m=e("safe-buffer").Buffer,_=[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],b=new Array(160);h(i,p),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},i.prototype._update=function(e){for(var t=this._w,r=0|this._ah,i=0|this._bh,h=0|this._ch,p=0|this._dh,m=0|this._eh,b=0|this._fh,y=0|this._gh,v=0|this._hh,g=0|this._al,w=0|this._bl,E=0|this._cl,S=0|this._dl,k=0|this._el,T=0|this._fl,A=0|this._gl,R=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var M=t[I-30],O=t[I-30+1],x=u(M,O),D=f(O,M);M=t[I-4],O=t[I-4+1];var L=c(M,O),N=d(O,M),C=t[I-14],P=t[I-14+1],B=t[I-32],U=t[I-32+1],j=D+P|0,F=x+C+l(j,D)|0;j=j+N|0,F=F+L+l(j,N)|0,j=j+U|0,F=F+B+l(j,U)|0,t[I]=F,t[I+1]=j}for(var G=0;G<160;G+=2){F=t[G],j=t[G+1];var z=a(r,i,h),X=a(g,w,E),H=o(r,g),V=o(g,r),Y=s(m,k),q=s(k,m),W=_[G],K=_[G+1],Q=n(m,b,y),Z=n(k,T,A),J=R+q|0,$=v+Y+l(J,R)|0;J=J+Z|0,$=$+Q+l(J,Z)|0,J=J+K|0,$=$+W+l(J,K)|0,J=J+j|0,$=$+F+l(J,j)|0;var ee=V+X|0,te=H+z+l(ee,V)|0;v=y,R=A,y=b,A=T,b=m,T=k,k=S+J|0,m=p+$+l(k,S)|0,p=h,S=E,h=i,E=w,i=r,w=g,g=J+ee|0,r=$+te+l(g,J)|0}this._al=this._al+g|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+S|0,this._el=this._el+k|0,this._fl=this._fl+T|0,this._gl=this._gl+A|0,this._hl=this._hl+R|0,this._ah=this._ah+r+l(this._al,g)|0,this._bh=this._bh+i+l(this._bl,w)|0,this._ch=this._ch+h+l(this._cl,E)|0,this._dh=this._dh+p+l(this._dl,S)|0,this._eh=this._eh+m+l(this._el,k)|0,this._fh=this._fh+b+l(this._fl,T)|0,this._gh=this._gh+y+l(this._gl,A)|0,this._hh=this._hh+v+l(this._hl,R)|0},i.prototype._hash=function(){function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}var t=m.allocUnsafe(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=i},{"./hash":133,inherits:104,"safe-buffer":132}],141:[function(e,t,r){function i(){n.call(this)}t.exports=i;var n=e("events").EventEmitter;e("inherits")(i,n),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&f.pause&&f.pause()}function i(){f.readable&&f.resume&&f.resume()}function a(){c||(c=!0,e.end())}function o(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){f.removeListener("data",r),e.removeListener("drain",i),f.removeListener("end",a),f.removeListener("close",o),f.removeListener("error",s),e.removeListener("error",s),f.removeListener("end",u),f.removeListener("close",u),e.removeListener("close",u)}var f=this;f.on("data",r),e.on("drain",i),e._isStdio||t&&!1===t.end||(f.on("end",a),f.on("close",o));var c=!1;return f.on("error",s),e.on("error",s),f.on("end",u),f.on("close",u),e.on("close",u),e.emit("pipe",f),e}},{events:85,inherits:104,"readable-stream/duplex.js":143,"readable-stream/passthrough.js":152,"readable-stream/readable.js":153,"readable-stream/transform.js":154,"readable-stream/writable.js":155}],142:[function(e,t,r){arguments[4][49][0].apply(r,arguments)},{dup:49}],143:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":144}],144:[function(e,t,r){"use strict";function i(e){if(!(this instanceof i))return new i(e);f.call(this,e),c.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",n)}function n(){this.allowHalfOpen||this._writableState.ended||o.nextTick(a,this)}function a(e){e.end()}var o=e("process-nextick-args"),s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=i;var u=e("core-util-is");u.inherits=e("inherits");var f=e("./_stream_readable"),c=e("./_stream_writable");u.inherits(i,f);for(var d=s(c.prototype),l=0;l<d.length;l++){var h=d[l];i.prototype[h]||(i.prototype[h]=c.prototype[h])}Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(i.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),i.prototype._destroy=function(e,t){this.push(null),this.end(),o.nextTick(t,e)}},{"./_stream_readable":146,"./_stream_writable":148,"core-util-is":51,inherits:104,"process-nextick-args":121}],145:[function(e,t,r){"use strict";function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}t.exports=i;var n=e("./_stream_transform"),a=e("core-util-is");a.inherits=e("inherits"),a.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":147,"core-util-is":51,inherits:104}],146:[function(e,t,r){(function(r,i){"use strict";function n(e){return B.from(e)}function a(e){return B.isBuffer(e)||e instanceof U}function o(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?N(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function s(t,r){L=L||e("./_stream_duplex"),t=t||{};var i=r instanceof L;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,a=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(a||0===a)?a:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new X,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(z||(z=e("string_decoder/").StringDecoder),this.decoder=new z(t.encoding),this.encoding=t.encoding)}function u(t){if(L=L||e("./_stream_duplex"),!(this instanceof u))return new u(t);this._readableState=new s(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),P.call(this)}function f(e,t,r,i,a){var o=e._readableState;if(null===t)o.reading=!1,m(e,o);else{var s;a||(s=d(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===B.prototype||(t=n(t)),i?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):c(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?c(e,o,t,!1):y(e,o)):c(e,o,t,!1))):i||(o.reading=!1)}return l(o)}function c(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&_(e)),y(e,t)}function d(e,t){var r;return a(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function h(e){return e>=Y?e=Y:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function p(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=h(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function m(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,_(e)}}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(G("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?D.nextTick(b,e):b(e))}function b(e){G("emit readable"),e.emit("readable"),k(e)}function y(e,t){t.readingMore||(t.readingMore=!0,D.nextTick(v,e,t))}function v(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(G("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;G("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&C(e,"data")&&(t.flowing=!0,k(e))}}function w(e){G("readable nexttick read 0"),e.read(0)}function E(e,t){t.resumeScheduled||(t.resumeScheduled=!0,D.nextTick(S,e,t))}function S(e,t){t.reading||(G("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),k(e),t.flowing&&!t.reading&&e.read(0)}function k(e){var t=e._readableState;for(G("flow",t.flowing);t.flowing&&null!==e.read(););}function T(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=A(e,t.buffer,t.decoder),r}function A(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):i=e===t.head.data.length?t.shift():r?R(e,t):I(e,t),i}function R(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),0===(e-=o)){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function I(e,t){var r=B.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++n}return t.length-=n,r}function M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,D.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function x(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}var D=e("process-nextick-args");t.exports=u;var L,N=e("isarray");u.ReadableState=s;var C=(e("events").EventEmitter,function(e,t){return e.listeners(t).length}),P=e("./internal/streams/stream"),B=e("safe-buffer").Buffer,U=i.Uint8Array||function(){},j=e("core-util-is");j.inherits=e("inherits");var F=e("util"),G=void 0;G=F&&F.debuglog?F.debuglog("stream"):function(){};var z,X=e("./internal/streams/BufferList"),H=e("./internal/streams/destroy");j.inherits(u,P);var V=["error","close","destroy","pause","resume"];Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),u.prototype.destroy=H.destroy,u.prototype._undestroy=H.undestroy,u.prototype._destroy=function(e,t){this.push(null),t(e)},u.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&(t=t||i.defaultEncoding,t!==i.encoding&&(e=B.from(e,t),t=""),r=!0),f(this,e,t,!1,r)},u.prototype.unshift=function(e){return f(this,e,null,!0,!1)},u.prototype.isPaused=function(){return!1===this._readableState.flowing},u.prototype.setEncoding=function(t){return z||(z=e("string_decoder/").StringDecoder),this._readableState.decoder=new z(t),this._readableState.encoding=t,this};var Y=8388608;u.prototype.read=function(e){G("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return G("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):_(this),null;if(0===(e=p(e,t))&&t.ended)return 0===t.length&&M(this),null;var i=t.needReadable;G("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,G("length less than watermark",i)),t.ended||t.reading?(i=!1,G("reading or ended",i)):i&&(G("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=p(r,t)));var n;return n=e>0?T(e,t):null,null===n?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&M(this)),null!==n&&this.emit("data",n),n},u.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},u.prototype.pipe=function(e,t){function i(e,t){G("onunpipe"),e===l&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,a())}function n(){G("onend"),e.end()}function a(){G("cleanup"),e.removeListener("close",f),e.removeListener("finish",c),e.removeListener("drain",_),e.removeListener("error",u),e.removeListener("unpipe",i),l.removeListener("end",n),l.removeListener("end",d),l.removeListener("data",s),b=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||_()}function s(t){G("ondata"),y=!1,!1!==e.write(t)||y||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&-1!==x(h.pipes,e))&&!b&&(G("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,y=!0),l.pause())}function u(t){G("onerror",t),d(),e.removeListener("error",u),0===C(e,"error")&&e.emit("error",t)}function f(){e.removeListener("finish",c),d()}function c(){G("onfinish"),e.removeListener("close",f),d()}function d(){G("unpipe"),l.unpipe(e)}var l=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,G("pipe count=%d opts=%j",h.pipesCount,t);var p=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,m=p?n:d;h.endEmitted?D.nextTick(m):l.once("end",m),e.on("unpipe",i);var _=g(l);e.on("drain",_);var b=!1,y=!1;return l.on("data",s),o(e,"error",u),e.once("close",f),e.once("finish",c),e.emit("pipe",l),h.flowing||(G("pipe resume"),l.resume()),e},u.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,r);return this}var o=x(t.pipes,e);return-1===o?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},u.prototype.on=function(e,t){var r=P.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&_(this):D.nextTick(w,this))}return r},u.prototype.addListener=u.prototype.on,u.prototype.resume=function(){var e=this._readableState;return e.flowing||(G("resume"),e.flowing=!0,E(this,e)),this},u.prototype.pause=function(){return G("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(G("pause"),this._readableState.flowing=!1,this.emit("pause")),this},u.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(G("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(n){if(G("wrapped data"),r.decoder&&(n=r.decoder.write(n)),(!r.objectMode||null!==n&&void 0!==n)&&(r.objectMode||n&&n.length)){t.push(n)||(i=!0,e.pause())}});for(var n in e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var a=0;a<V.length;a++)e.on(V[a],this.emit.bind(this,V[a]));return this._read=function(t){G("wrapped _read",t),i&&(i=!1,e.resume())},this},Object.defineProperty(u.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),u._fromList=T}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":144,"./internal/streams/BufferList":149,"./internal/streams/destroy":150,"./internal/streams/stream":151,_process:122,"core-util-is":51,events:85,inherits:104,isarray:142,"process-nextick-args":121,"safe-buffer":132,"string_decoder/":156,util:18}],147:[function(e,t,r){"use strict";function i(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function n(e){if(!(this instanceof n))return new n(e);s.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,r){o(e,t,r)}):o(this,null,null)}function o(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=n;var s=e("./_stream_duplex"),u=e("core-util-is");u.inherits=e("inherits"),u.inherits(n,s),n.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},n.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},n.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},n.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},n.prototype._destroy=function(e,t){var r=this;s.prototype._destroy.call(this,e,function(e){t(e),r.emit("close")})}},{"./_stream_duplex":144,"core-util-is":51,inherits:104}],148:[function(e,t,r){(function(r,i,n){"use strict";function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){R(t,e)}}function o(e){return N.from(e)}function s(e){return N.isBuffer(e)||e instanceof C}function u(){}function f(t,r){M=M||e("./_stream_duplex"),t=t||{};var i=r instanceof M;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,o=t.writableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var u=!1===t.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){y(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function c(t){if(M=M||e("./_stream_duplex"),!(B.call(c,this)||this instanceof M))return new c(t);this._writableState=new f(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),L.call(this)}function d(e,t){var r=new Error("write after end");e.emit("error",r),I.nextTick(t,r)}function l(e,t,r,i){var n=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),I.nextTick(i,a),n=!1),n}function h(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=N.from(t,r)),t}function p(e,t,r,i,n,a){if(!r){var o=h(t,i,n);i!==o&&(r=!0,n="buffer",i=o)}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,s,i,n,a);return u}function m(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function _(e,t,r,i,n){--t.pendingcb,r?(I.nextTick(n,i),I.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),T(e,t))}function b(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function y(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(b(r),t)_(e,r,i,t,n);else{var a=E(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),i?O(v,e,r,a,n):v(e,r,a,n)}}function v(e,t,r,i){r||g(e,t),t.pendingcb--,i(),T(e,t)}function g(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)n[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;n.allBuffers=u,m(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,c=r.encoding,d=r.callback;if(m(e,t,!1,t.objectMode?1:f.length,f,c,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),T(e,t)})}function k(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,I.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function T(e,t){var r=E(t);return r&&(k(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}function A(e,t,r){t.ending=!0,T(e,t),r&&(t.finished?I.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function R(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}var I=e("process-nextick-args");t.exports=c;var M,O=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?n:I.nextTick;c.WritableState=f;var x=e("core-util-is");x.inherits=e("inherits");var D={deprecate:e("util-deprecate")},L=e("./internal/streams/stream"),N=e("safe-buffer").Buffer,C=i.Uint8Array||function(){},P=e("./internal/streams/destroy");x.inherits(c,L),
    11  f.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(f.prototype,"buffer",{get:D.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var B;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(c,Symbol.hasInstance,{value:function(e){return!!B.call(this,e)||this===c&&(e&&e._writableState instanceof f)}})):B=function(e){return e instanceof this},c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},c.prototype.write=function(e,t,r){var i=this._writableState,n=!1,a=!i.objectMode&&s(e);return a&&!N.isBuffer(e)&&(e=o(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=u),i.ended?d(this,r):(a||l(this,i,e,r))&&(i.pendingcb++,n=p(this,i,a,e,t,r)),n},c.prototype.cork=function(){this._writableState.corked++},c.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||w(this,e))},c.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),c.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},c.prototype._writev=null,c.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||A(this,i,r)},Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),c.prototype.destroy=P.destroy,c.prototype._undestroy=P.undestroy,c.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{"./_stream_duplex":144,"./internal/streams/destroy":150,"./internal/streams/stream":151,_process:122,"core-util-is":51,inherits:104,"process-nextick-args":121,"safe-buffer":132,timers:158,"util-deprecate":159}],149:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t,r){e.copy(t,r)}var a=e("safe-buffer").Buffer,o=e("util");t.exports=function(){function e(){i(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return a.alloc(0);if(1===this.length)return this.head.data;for(var t=a.allocUnsafe(e>>>0),r=this.head,i=0;r;)n(r.data,t,i),i+=r.data.length,r=r.next;return t},e}(),o&&o.inspect&&o.inspect.custom&&(t.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":132,util:18}],150:[function(e,t,r){"use strict";function i(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||o.nextTick(a,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(o.nextTick(a,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)}),this)}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function a(e,t){e.emit("error",t)}var o=e("process-nextick-args");t.exports={destroy:i,undestroy:n}},{"process-nextick-args":121}],151:[function(e,t,r){t.exports=e("events").EventEmitter},{events:85}],152:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":153}],153:[function(e,t,r){r=t.exports=e("./lib/_stream_readable.js"),r.Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":144,"./lib/_stream_passthrough.js":145,"./lib/_stream_readable.js":146,"./lib/_stream_transform.js":147,"./lib/_stream_writable.js":148}],154:[function(e,t,r){t.exports=e("./readable").Transform},{"./readable":153}],155:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":148}],156:[function(e,t,r){"use strict";function i(e){if(!e)return"utf8";for(var t;;)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=!0}}function n(e){var t=i(e);if("string"!=typeof t&&(y.isEncoding===v||!v(e)))throw new Error("Unknown encoding: "+e);return t||e}function a(e){this.encoding=n(e);var t;switch(this.encoding){case"utf16le":this.text=l,this.end=h,t=4;break;case"utf8":this.fillLast=f,t=4;break;case"base64":this.text=p,this.end=m,t=3;break;default:return this.write=_,void(this.end=b)}this.lastNeed=0,this.lastTotal=0,this.lastChar=y.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,r){var i=t.length-1;if(i<r)return 0;var n=o(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||-2===n?0:(n=o(t[i]))>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||-2===n?0:(n=o(t[i]),n>=0?(n>0&&(2===n?n=0:e.lastNeed=n-3),n):0)}function u(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}function f(e){var t=this.lastTotal-this.lastNeed,r=u(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){var r=s(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function l(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)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(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 p(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function _(e){return e.toString(this.encoding)}function b(e){return e&&e.length?this.write(e):""}var y=e("safe-buffer").Buffer,v=y.isEncoding||function(e){switch((e=""+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!0;default:return!1}};r.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},a.prototype.end=d,a.prototype.text=c,a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":132}],157:[function(e,t,r){function i(e){if(e&&!u(e))throw new Error("Unknown encoding: "+e)}function n(e){return e.toString(this.encoding)}function a(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function o(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=e("buffer").Buffer,u=s.isEncoding||function(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!0;default:return!1}},f=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),i(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=n)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};f.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";e=e.slice(r,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=t.charCodeAt(t.length-1);if(!(i>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived),t+=e.toString(this.encoding,0,n);var n=t.length-1,i=t.charCodeAt(n);if(i>=55296&&i<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,n)}return t},f.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},f.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,i=this.charBuffer,n=this.encoding;t+=i.slice(0,r).toString(n)}return t}},{buffer:48}],158:[function(e,t,r){(function(t,i){function n(e,t){this._id=e,this._clearFn=t}var a=e("process/browser.js").nextTick,o=Function.prototype.apply,s=Array.prototype.slice,u={},f=0;r.setTimeout=function(){return new n(o.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new n(o.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r.setImmediate="function"==typeof t?t:function(e){var t=f++,i=!(arguments.length<2)&&s.call(arguments,1);return u[t]=!0,a(function(){u[t]&&(i?e.apply(null,i):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof i?i:function(e){delete u[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":122,timers:158}],159:[function(e,t,r){(function(e){function r(e,t){function r(){if(!n){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}if(i("noDeprecation"))return e;var n=!1;return r}function i(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],160:[function(e,t,r){arguments[4][104][0].apply(r,arguments)},{dup:104}],161:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],162:[function(e,t,r){(function(t,i){function n(e,t){var i={seen:[],stylize:o};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),m(t)?i.showHidden=t:t&&r._extend(i,t),w(i.showHidden)&&(i.showHidden=!1),w(i.depth)&&(i.depth=2),w(i.colors)&&(i.colors=!1),w(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=a),u(i,e,i.depth)}function a(e,t){var r=n.styles[t];return r?"["+n.colors[r][0]+"m"+e+"["+n.colors[r][1]+"m":e}function o(e,t){return e}function s(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,t,i){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(i,e);return v(n)||(n=u(e,n,i)),n}var a=f(e,t);if(a)return a;var o=Object.keys(t),m=s(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),T(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(t);if(0===o.length){if(A(t)){var _=t.name?": "+t.name:"";return e.stylize("[Function"+_+"]","special")}if(E(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(k(t))return e.stylize(Date.prototype.toString.call(t),"date");if(T(t))return c(t)}var b="",y=!1,g=["{","}"];if(p(t)&&(y=!0,g=["[","]"]),A(t)){b=" [Function"+(t.name?": "+t.name:"")+"]"}if(E(t)&&(b=" "+RegExp.prototype.toString.call(t)),k(t)&&(b=" "+Date.prototype.toUTCString.call(t)),T(t)&&(b=" "+c(t)),0===o.length&&(!y||0==t.length))return g[0]+b+g[1];if(i<0)return E(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var w;return w=y?d(e,t,i,m,o):o.map(function(r){return l(e,t,i,m,r,y)}),e.seen.pop(),h(w,b,g)}function f(e,t){if(w(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):_(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,i,n){for(var a=[],o=0,s=t.length;o<s;++o)x(t,String(o))?a.push(l(e,t,r,i,String(o),!0)):a.push("");return n.forEach(function(n){n.match(/^\d+$/)||a.push(l(e,t,r,i,n,!0))}),a}function l(e,t,r,i,n,a){var o,s,f;if(f=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]},f.get?s=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(s=e.stylize("[Setter]","special")),x(i,n)||(o="["+n+"]"),s||(e.seen.indexOf(f.value)<0?(s=_(r)?u(e,f.value,null):u(e,f.value,r-1),s.indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return"   "+e}).join("\n"))):s=e.stylize("[Circular]","special")),w(o)){if(a&&n.match(/^\d+$/))return s;o=JSON.stringify(""+n),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e,t,r){var i=0;return e.reduce(function(e,t){return i++,t.indexOf("\n")>=0&&i++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function _(e){return null===e}function b(e){return null==e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function g(e){return"symbol"==typeof e}function w(e){return void 0===e}function E(e){return S(e)&&"[object RegExp]"===I(e)}function S(e){return"object"==typeof e&&null!==e}function k(e){return S(e)&&"[object Date]"===I(e)}function T(e){return S(e)&&("[object Error]"===I(e)||e instanceof Error)}function A(e){return"function"==typeof e}function R(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function I(e){return Object.prototype.toString.call(e)}function M(e){return e<10?"0"+e.toString(10):e.toString(10)}function O(){var e=new Date,t=[M(e.getHours()),M(e.getMinutes()),M(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var D=/%[sdj%]/g;r.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(n(arguments[r]));return t.join(" ")}for(var r=1,i=arguments,a=i.length,o=String(e).replace(D,function(e){if("%%"===e)return"%";if(r>=a)return e;switch(e){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return e}}),s=i[r];r<a;s=i[++r])_(s)||!S(s)?o+=" "+s:o+=" "+n(s);return o},r.deprecate=function(e,n){function a(){if(!o){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),o=!0}return e.apply(this,arguments)}if(w(i.process))return function(){return r.deprecate(e,n).apply(this,arguments)};if(!0===t.noDeprecation)return e;var o=!1;return a};var L,N={};r.debuglog=function(e){if(w(L)&&(L=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!N[e])if(new RegExp("\\b"+e+"\\b","i").test(L)){var i=t.pid;N[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,i,t)}}else N[e]=function(){};return N[e]},r.inspect=n,n.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=m,r.isNull=_,r.isNullOrUndefined=b,r.isNumber=y,r.isString=v,r.isSymbol=g,r.isUndefined=w,r.isRegExp=E,r.isObject=S,r.isDate=k,r.isError=T,r.isFunction=A,r.isPrimitive=R,r.isBuffer=e("./support/isBuffer");var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",O(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!S(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":161,_process:122,inherits:160}],163:[function(_dereq_,module,exports){function Context(){}var indexOf=_dereq_("indexof"),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(e),function(t){r[t]=e[t]}),forEach(globals,function(t){e[t]&&(r[t]=e[t])});var a=Object_keys(r),o=i.call(r,this.code);return forEach(Object_keys(r),function(t){(t in e||-1===indexOf(a,t))&&(e[t]=r[t])}),forEach(globals,function(t){t in e||defineProp(e,t,r[t])}),document.body.removeChild(t),o},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return forEach(Object_keys(t),function(r){e[r]=t[r]}),r},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}}),exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),function(r){t[r]=e[r]}),t}},{indexof:103}],164:[function(e,t,r){var i=arguments[3],n=arguments[4],a=arguments[5],o=JSON.stringify;t.exports=function(e,t){function r(e){_[e]=!0;for(var t in n[e][1]){var i=n[e][1][t];_[i]||r(i)}}for(var s,u=Object.keys(a),f=0,c=u.length;f<c;f++){var d=u[f],l=a[d].exports;if(l===e||l&&l.default===e){s=d;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var h={},f=0,c=u.length;f<c;f++){var d=u[f];h[d]=d}n[s]=["function(require,module,exports){"+e+"(self); }",h]}var p=Math.floor(Math.pow(16,8)*Math.random()).toString(16),m={};m[s]=s,n[p]=["function(require,module,exports){var f = require("+o(s)+");(f.default ? f.default : f)(self);}",m];var _={};r(p);var b="("+i+")({"+Object.keys(_).map(function(e){return o(e)+":["+n[e][0]+","+o(n[e][1])+"]"}).join(",")+"},{},["+o(p)+"])",y=window.URL||window.webkitURL||window.mozURL||window.msURL,v=new Blob([b],{type:"text/javascript"});if(t&&t.bare)return v;var g=y.createObjectURL(v),w=new Worker(g);return w.objectURL=g,w}},{}],165:[function(e,t,r){"use strict";function i(){return Object.assign({},n)}Object.defineProperty(r,"__esModule",{value:!0}),r.createDefaultConfig=i;var n=r.defaultConfig={enableWorker:!0,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,enableRender:!0,maxLength4ToBeDecodeQueue:1807,maxLength4ToBeRenderQueue:180,wasmFilePath:"https://ks3-cn-beijing.ksyun.com/ksplayer/h265/huajiao_test/libqydecoder.wasm",enableSkipFrame:!1,enableYUVrender:!0,timeToDecideWaiting:500,bufferTime:500,decodingCapacityInadequateTimes:5,token:"81b0ee1ec71d00ef84f4cd5bc449aa05"}},{}],166:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=e("../utils/logger.js"),s=i(o),u=e("../utils/logging-control.js"),f=i(u),c=e("./decoding-worker.js"),d=i(c),l=e("./decoding-events.js"),h=i(l),p=e("events"),m=i(p),_=e("../utils/mocktimeline"),b=i(_),y=e("./transmuxing-events.js"),v=i(y),g=e("./YUVCanvas"),w=i(g),E=e("../player/player-events"),S=e("../player/player-errors.js"),k=function(){function t(r,i,a,o,u,c){if(n(this,t),this.TAG="AVSyncRender",this._emitter=new m.default,this.playerEmitter=u,this.player=c,this._config=i,this._audioElement=o,this._audioElement.addEventListener("pause",this.pause.bind(this)),this._audioElement.addEventListener("play",this.resume.bind(this)),this.canvas=r,this._canvasWidth=0,this._config.enableYUVrender||(this.ctx=r.getContext("2d")),this.status_cb=null,this.error_cb=null,this.ratio=null,this.filters=!1,this._reset(),this.decodetimes=0,this.convertimes=0,this.samplesCount=0,this.toBeRenderQueue=[],this._running=!1,this.playing=!1,this.count_timeToDecideWaiting=0,this.waitingStartTime=0,this.waitingEndTime=0,i.enableWorker&&"undefined"!=typeof Worker)try{var l=e("webworkify");this._worker=l(d.default),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[i]},[a.port2]),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},f.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:f.default.getConfig()})}catch(e){s.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing")}window.startTime=new Date}return a(t,[{key:"setMediaInfo",value:function(e){this._mediaInfo=e}},{key:"onNoAudioTrack",value:function(){this._mocktimeline=new b.default(this._audioElement)}},{key:"setImageCallback",value:function(e){this._display_image(e),void 0!==e&&e.free()}},{key:"destroy",value:function(){this._isPausing=!0,this._worker&&this._worker.postMessage({cmd:"pause"}),this._config.isLive&&this.toBeRenderQueue.splice(0,this.toBeRenderQueue.length),this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),f.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this.ctx&&(this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height)),this._emitter.removeAllListeners(),this._emitter=null,this.toBeRenderQueue=[]}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"_reset",value:function(){this.run=null,this.frames=0,this.skipedFrames=0,this.image_data=null,this.running=!1,this.pending_image_data=null}},{key:"_set_status",value:function(){this.status_cb&&this.status_cb.apply(this.status_cb,arguments)}},{key:"set_error_callback",value:function(e){this.error_cb=e}},{key:"_set_error",value:function(e,t){this.error_cb&&this.error_cb(e,t)}},{key:"stop",value:function(){this._set_status("stopped"),this._reset()}},{key:"_statistics",value:function(){if(this.run){!this.playing&&this.playerEmitter&&(this.playerEmitter.emit(E.PlayerEvents.PLAYING,this.player),this.playing=!0),this.frames+=1;var e=new Date-this.run;if(e>1e3&&this.frames%30==0){var t=(.001*e).toFixed(1),r=((this.frames+this.skipedFrames)/t).toFixed(1);this.playerEmitter&&this.playerEmitter.emit(E.PlayerEvents.RENDERFPS,{renderFps:r,renderFps_duration:parseFloat(t),renderFps_frame_count:this.frames}),this.skipedFrames,s.default.v(this.TAG,"渲染fps: "+r+"\tduration: "+t+" s\tframe count: "+this.frames)}}else{this.run=new Date;var i=this.run.getTime()-window.startTime;!this.playing&&this.playerEmitter&&(this.playerEmitter.emit(E.PlayerEvents.PLAYING,this.player,{timeToStartRender:i}),this.playing=!0),s.default.v(this.TAG,"首屏时间(ms): "+i),this._set_status("playing")}}},{key:"_display_image",value:function(e,t){var r=e.width,i=e.height,n=e.pts;if(this._config.enableYUVrender)window.requestAnimationFrame?window.requestAnimationFrame(function(){var a=1e3*this._audioElement.currentTime;this._mocktimeline&&this._mocktimeline.setCurrentTime(n/1e3),n<a?(this.renderFrameWebGL({data:new Uint8Array(e.buffer),width:r,height:i}),e=null,this._statistics(),t()):(this.toBeRenderQueue.unshift(e),setTimeout(function(){t()},0))}.bind(this)):console.warning("no requestAnimationFrame support");else{var a=null;a=new ImageData(new Uint8ClampedArray(e.buffer),r,i);var o=null;o=document.createElement("canvas"),o.width=r,o.height=i,o.style.display="none";o.getContext("2d").putImageData(a,0,0);var s=this.canvas.width/r;this._scaleRate!==s&&(this._scaleRate=s,this.canvas.height=this.canvas.width/(r/i),this.ctx.scale(this._scaleRate,this._scaleRate)),window.requestAnimationFrame?window.requestAnimationFrame(function(){var r=this,i=1e3*this._audioElement.currentTime;this._mocktimeline&&this._mocktimeline.setCurrentTime(n/1e3),n-16.7<i?(this.ctx.drawImage(o,0,0),this._statistics(),a=null,e=null,o=null,t()):setTimeout(function(){r.ctx.drawImage(o,0,0),r._statistics(),a=null,e=null,t()},n-i-16.7)}.bind(this)):(this.ctx.drawImage(o,0,0),this._statistics(),a=null,e=null,t())}}},{key:"_updateCanvasSize",value:function(e){this._webGLCanvas=!1,this._canvasWidth=e}},{key:"renderFrameWebGL",value:function(e){var t=e.width,r=e.height;if(!this._webGLCanvas)try{this._webGLCanvas=new w.default({canvas:this.canvas,width:t,height:r,canvasWidth:this._canvasWidth})}catch(e){}var i=t*r,n=t/2*(r/2);this._webGLCanvas.drawNextOutputPicture({yData:e.data.subarray(0,i),uData:e.data.subarray(i,i+n),vData:e.data.subarray(i+n,i+n+n)})}},{key:"_onLoggingConfigChanged",value:function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}},{key:"_onWorkerMessage",value:function(e){var t=this,r=e.data,i=r.data;if("destroyed"===r.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(r.msg){case h.default.DECODER_READY:this.playerEmitter&&(this.playerEmitter.emit(E.PlayerEvents.READY,this.player,{}),this.playerEmitter.emit(h.default.DECODER_READY));break;case v.default.SHOULD_REST:Promise.resolve().then(function(){t.playerEmitter.emit(v.default.SHOULD_REST)});break;case v.default.SHOULD_WORK:Promise.resolve().then(function(){t.playerEmitter.emit(v.default.SHOULD_WORK)});break;case h.default.DECODED_FRAME_ARRIVAL:this._onDecodedFrame(i);break;case h.default.SKIP_FRAMES:this.skipedFrames=i;break;case h.default.RENDER_RESUME:this.startRending();break;case h.default.STOPIO:this.playerEmitter&&this.playerEmitter.emit(E.PlayerEvents.STOPIO);break;case h.default.DECODINGCAPACITYINADEQUATE:this.playerEmitter&&this.playerEmitter.emit(E.PlayerEvents.RELOAD,this.player,{code:1001,info:"解码器解码能力不够"});break;case"logcat_callback":s.default.emitter.emit("log",i.type,i.logcat)}}},{key:"_onDecodedFrame",value:function(e){var t=this;if(this.toBeRenderQueue.length>this._config.maxLength4ToBeRenderQueue&&(this.decoderIsPaused||(this._worker.postMessage({cmd:"pause"}),this.decoderIsPaused=!0)),this.toBeRenderQueue.push(e),this.toBeRenderQueue.length>0){var r=this.toBeRenderQueue[this.toBeRenderQueue.length-1],i=1e3*this._audioElement.currentTime;r.pts>i+this._config.bufferTime&&(this._running||(this._audioElement&&this._audioElement.paused&&new Promise(function(e){t._audioElement.play().catch(function(e){var r={type:S.ErrorTypes.OTHER_ERROR,
    12  detail:S.ErrorDetails.OTHER_AUTOPLAYAUDIO_UNSUPPORTED,info:{code:-1e3,msg:e}};t.playerEmitter&&t.playerEmitter.emit(E.PlayerEvents.ERROR,t,r)})}),this._running=!0,this.render()))}}},{key:"startRending",value:function(){this._running=!0}},{key:"resume",value:function(){this._isPausing=!1,this._worker&&this._worker.postMessage({cmd:"resume"}),this.startRending()}},{key:"pause",value:function(){}},{key:"throwWaiting",value:function(){this.waitingEndTime-this.waitingStartTime>=this._config.timeToDecideWaiting&&!this.waiting&&(this.playing=!1,this.playerEmitter&&this.playerEmitter.emit(E.PlayerEvents.WAITING,this.player,{}),this.waiting=!0)}},{key:"render",value:function(){var e=this;if(!this._isPausing){if(0===this.toBeRenderQueue.length)this._audioElement&&!this._audioElement.paused&&this.count_timeToDecideWaiting>100&&(this.enterWaitStartT||(this.waitingStartTime=(new Date).getTime(),this.enterWaitStartT=!0),this._audioElement.pause()),setTimeout(function(){e.render(),e.count_timeToDecideWaiting=e.count_timeToDecideWaiting+10,e.waitingEndTime=(new Date).getTime(),e.throwWaiting()},10);else if(this._audioElement.paused){var t=this.toBeRenderQueue[this.toBeRenderQueue.length-1],r=1e3*this._audioElement.currentTime;t.pts>r+this._config.bufferTime?new Promise(function(t){e._audioElement.play().then(function(){e.enterWaitStartT=!1,e.waiting=!1;var t=e.toBeRenderQueue.shift();e.count_timeToDecideWaiting=0,e._display_image(t,e.render.bind(e)),t=null}).catch(function(t){var r={type:S.ErrorTypes.OTHER_ERROR,detail:S.ErrorDetails.OTHER_AUTOPLAYAUDIO_UNSUPPORTED,info:{code:-1e3,msg:t}};e.playerEmitter&&e.playerEmitter.emit(E.PlayerEvents.ERROR,e,r)})}):setTimeout(function(){e.render(),e.waitingEndTime=(new Date).getTime(),e.throwWaiting()},10)}else{var i=this.toBeRenderQueue.shift();this.count_timeToDecideWaiting=0,this._display_image(i,this.render.bind(this)),i=null}this._worker&&this.toBeRenderQueue.length<Math.max(this._config.maxLength4ToBeRenderQueue/10,3)&&this._worker.postMessage({cmd:"resume"})}}},{key:"set_status_callback",set:function(e){this.status_cb=e}}]),t}();r.default=k},{"../player/player-errors.js":200,"../player/player-events":201,"../utils/logger.js":207,"../utils/logging-control.js":208,"../utils/mocktimeline":209,"./YUVCanvas":167,"./decoding-events.js":169,"./decoding-worker.js":170,"./transmuxing-events.js":178,events:85,webworkify:164}],167:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=function(){function e(t){i(this,e),t=t||{},this.canvasElement=t.canvas||document.createElement("canvas"),this.contextOptions=t.contextOptions,this.type=t.type||"yuv420",this.customYUV444=t.customYUV444,this.conversionType=t.conversionType||"rec601",this.width=t.width||640,this.height=t.height||320,this.animationTime=t.animationTime||0,t.canvasWidth&&(this.canvasElement.width=t.canvasWidth);var r=this.canvasElement.width,n=this.canvasElement.height,a=this.width/this.height;a>=1?(this.canvasElement.width=r,this.canvasElement.height=this.canvasElement.width/a,n<this.canvasElement.height&&(this.canvasElement.height=n,this.canvasElement.width=n*a)):(this.canvasElement.height=n,this.canvasElement.width=this.canvasElement.height*a,r<this.canvasElement.width&&(this.canvasElement.width=r,this.canvasElement.height=r/a)),this.initContextGL(),this.contextGL&&(this.initProgram(),this.initBuffers(),this.initTextures()),"yuv420"===this.type?this.drawNextOuptutPictureGL=function(e){var t=this.contextGL,r=this.texturePosBuffer,i=this.uTexturePosBuffer,n=this.vTexturePosBuffer,a=this.yTextureRef,o=this.uTextureRef,s=this.vTextureRef,u=e.yData,f=e.uData,c=e.vData,d=this.width,l=this.height,h=e.yDataPerRow||d,p=e.yRowCnt||l,m=e.uDataPerRow||d/2,_=e.uRowCnt||l/2,b=e.vDataPerRow||m,y=e.vRowCnt||_;t.viewport(0,0,this.canvasElement.width,this.canvasElement.height);var v=l/p,g=d/h,w=new Float32Array([g,0,0,0,g,v,0,v]);t.bindBuffer(t.ARRAY_BUFFER,r),t.bufferData(t.ARRAY_BUFFER,w,t.DYNAMIC_DRAW),this.customYUV444?(v=l/_,g=d/m):(v=l/2/_,g=d/2/m);var E=new Float32Array([g,0,0,0,g,v,0,v]);t.bindBuffer(t.ARRAY_BUFFER,i),t.bufferData(t.ARRAY_BUFFER,E,t.DYNAMIC_DRAW),this.customYUV444?(v=l/y,g=d/b):(v=l/2/y,g=d/2/b);var S=new Float32Array([g,0,0,0,g,v,0,v]);t.bindBuffer(t.ARRAY_BUFFER,n),t.bufferData(t.ARRAY_BUFFER,S,t.DYNAMIC_DRAW),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,a),t.texImage2D(t.TEXTURE_2D,0,t.LUMINANCE,h,p,0,t.LUMINANCE,t.UNSIGNED_BYTE,u),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,o),t.texImage2D(t.TEXTURE_2D,0,t.LUMINANCE,m,_,0,t.LUMINANCE,t.UNSIGNED_BYTE,f),t.activeTexture(t.TEXTURE2),t.bindTexture(t.TEXTURE_2D,s),t.texImage2D(t.TEXTURE_2D,0,t.LUMINANCE,b,y,0,t.LUMINANCE,t.UNSIGNED_BYTE,c),t.drawArrays(t.TRIANGLE_STRIP,0,4)}:"yuv422"===this.type&&(this.drawNextOuptutPictureGL=function(e){var t=this.contextGL,r=this.texturePosBuffer,i=this.textureRef,n=e.data,a=this.width,o=this.height,s=e.dataPerRow||2*a,u=e.rowCnt||o;t.viewport(0,0,a,o);var f=o/u,c=a/(s/2),d=new Float32Array([c,0,0,0,c,f,0,f]);t.bindBuffer(t.ARRAY_BUFFER,r),t.bufferData(t.ARRAY_BUFFER,d,t.DYNAMIC_DRAW),t.uniform2f(t.getUniformLocation(this.shaderProgram,"resolution"),s,o),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.LUMINANCE,s,u,0,t.LUMINANCE,t.UNSIGNED_BYTE,n),t.drawArrays(t.TRIANGLE_STRIP,0,4)})}return n(e,[{key:"isWebGL",value:function(){return this.contextGL}},{key:"initContextGL",value:function(){for(var e=this.canvasElement,t=null,r=["webgl","experimental-webgl","moz-webgl","webkit-3d"],i=0;!t&&i<r.length;){var n=r[i];try{t=this.contextOptions?e.getContext(n,this.contextOptions):e.getContext(n)}catch(e){t=null}t&&"function"==typeof t.getParameter||(t=null),++i}this.contextGL=t}},{key:"initProgram",value:function(){var e=this.contextGL,t=void 0,r=void 0;"yuv420"===this.type?(t=["attribute vec4 vertexPos;","attribute vec4 texturePos;","attribute vec4 uTexturePos;","attribute vec4 vTexturePos;","varying vec2 textureCoord;","varying vec2 uTextureCoord;","varying vec2 vTextureCoord;","uniform mat4 u_scaleMatrix;","void main()","{","  gl_Position = vertexPos;","  textureCoord = texturePos.xy;","  uTextureCoord = uTexturePos.xy;","  vTextureCoord = vTexturePos.xy;","}"].join("\n"),r=["precision highp float;","varying highp vec2 textureCoord;","varying highp vec2 uTextureCoord;","varying highp vec2 vTextureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","uniform mat4 YUV2RGB;","void main(void) {","  highp float y = texture2D(ySampler,  textureCoord).r;","  highp float u = texture2D(uSampler,  uTextureCoord).r;","  highp float v = texture2D(vSampler,  vTextureCoord).r;","  gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n")):"yuv422"===this.type&&(t=["attribute vec4 vertexPos;","attribute vec4 texturePos;","varying vec2 textureCoord;","void main()","{","  gl_Position = vertexPos;","  textureCoord = texturePos.xy;","}"].join("\n"),r=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D sampler;","uniform highp vec2 resolution;","uniform mat4 YUV2RGB;","void main(void) {","  highp float texPixX = 1.0 / resolution.x;","  highp float logPixX = 2.0 / resolution.x;","  highp float logHalfPixX = 4.0 / resolution.x;","  highp float steps = floor(textureCoord.x / logPixX);","  highp float uvSteps = floor(textureCoord.x / logHalfPixX);","  highp float y = texture2D(sampler, vec2((logPixX * steps) + texPixX, textureCoord.y)).r;","  highp float u = texture2D(sampler, vec2((logHalfPixX * uvSteps), textureCoord.y)).r;","  highp float v = texture2D(sampler, vec2((logHalfPixX * uvSteps) + texPixX + texPixX, textureCoord.y)).r;","  gl_FragColor = vec4(y, u, v, 1.0) * YUV2RGB;","}"].join("\n"));var i=[];i="rec709"==this.conversionType?[1.16438,0,1.79274,-.97295,1.16438,-.21325,-.53291,.30148,1.16438,2.1124,0,-1.1334,0,0,0,1]:[1.16438,0,1.59603,-.87079,1.16438,-.39176,-.81297,.52959,1.16438,2.01723,0,-1.08139,0,0,0,1];var n=e.createShader(e.VERTEX_SHADER);e.shaderSource(n,t),e.compileShader(n),e.getShaderParameter(n,e.COMPILE_STATUS)||console.log("Vertex shader failed to compile: "+e.getShaderInfoLog(n));var a=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(a,r),e.compileShader(a),e.getShaderParameter(a,e.COMPILE_STATUS)||console.log("Fragment shader failed to compile: "+e.getShaderInfoLog(a));var o=e.createProgram();e.attachShader(o,n),e.attachShader(o,a),e.linkProgram(o),e.getProgramParameter(o,e.LINK_STATUS)||console.log("Program failed to compile: "+e.getProgramInfoLog(o)),e.useProgram(o);var s=e.getUniformLocation(o,"YUV2RGB");e.uniformMatrix4fv(s,!1,i),this.shaderProgram=o}},{key:"initBuffers",value:function(){var e=this.contextGL,t=this.shaderProgram,r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),e.STATIC_DRAW);var i=e.getAttribLocation(t,"vertexPos");if(e.enableVertexAttribArray(i),e.vertexAttribPointer(i,2,e.FLOAT,!1,0,0),this.animationTime){var n=this.animationTime,a=0;!function r(){a+=15;var i=1*a/n;a>=n?i=1:setTimeout(r,15);var o=-1*i,s=1*i,u=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,new Float32Array([s,s,o,s,s,o,o,o]),e.STATIC_DRAW);var f=e.getAttribLocation(t,"vertexPos");e.enableVertexAttribArray(f),e.vertexAttribPointer(f,2,e.FLOAT,!1,0,0);try{e.drawArrays(e.TRIANGLE_STRIP,0,4)}catch(e){console.log(e)}}()}var o=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var s=e.getAttribLocation(t,"texturePos");if(e.enableVertexAttribArray(s),e.vertexAttribPointer(s,2,e.FLOAT,!1,0,0),this.texturePosBuffer=o,"yuv420"===this.type){var u=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var f=e.getAttribLocation(t,"uTexturePos");e.enableVertexAttribArray(f),e.vertexAttribPointer(f,2,e.FLOAT,!1,0,0),this.uTexturePosBuffer=u;var c=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,c),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var d=e.getAttribLocation(t,"vTexturePos");e.enableVertexAttribArray(d),e.vertexAttribPointer(d,2,e.FLOAT,!1,0,0),this.vTexturePosBuffer=c}}},{key:"initTextures",value:function(){var e=this.contextGL,t=this.shaderProgram;if("yuv420"===this.type){var r=this.initTexture(),i=e.getUniformLocation(t,"ySampler");e.uniform1i(i,0),this.yTextureRef=r;var n=this.initTexture(),a=e.getUniformLocation(t,"uSampler");e.uniform1i(a,1),this.uTextureRef=n;var o=this.initTexture(),s=e.getUniformLocation(t,"vSampler");e.uniform1i(s,2),this.vTextureRef=o}else if("yuv422"===this.type){var u=this.initTexture(),f=e.getUniformLocation(t,"sampler");e.uniform1i(f,0),this.textureRef=u}}},{key:"initTexture",value:function(){var e=this.contextGL,t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),t}},{key:"drawNextOutputPicture",value:function(e,t,r,i){this.contextGL?this.drawNextOuptutPictureGL(e,t,r,i):this.drawNextOutputPictureRGBA(e,t,r,i)}},{key:"drawNextOutputPictureRGBA",value:function(e,t,r,i){var n=this.canvasElement,a=i,o=n.getContext("2d"),s=o.getImageData(0,0,e,t);s.data.set(a),null===r?o.putImageData(s,0,0):o.putImageData(s,-r.left,-r.top,0,0,r.width,r.height)}}]),e}();r.default=a},{}],168:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.ErrorTypes={DECODER_ERROR:"DecoderError"},r.ErrorDetails={DECODER_MEMORY_LEAK_ERROR:"DecoderMemoryLeakError",DECODER_MEMORY_ALLOCATION_ERROR:"DecoderMemoryAllocationError"},r.ErrorInfo={MEMORY_LEAK_INFO:"浏览器没有释放内存,造成内存越界无法正常播放,建议可以换成chrome(谷歌)、Firfox(火狐)、safari、Edge浏览器进行观看",memory_ALLOCATION_INFO:"解码器初始化无法分配浏览器内存,建议可以换成chrome(谷歌)、Firfox(火狐)、safari、Edge浏览器进行观看"}},{}],169:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={H265_NALUS_ARRIVAL:"h265_nalus_arrival",NEED_MORE_DATA:"need_more_data",DECODED_FRAME_ARRIVAL:"decoded_frame_arrival",SKIP_FRAMES:"skip_frames",DECODER_READY:"decoder_ready",RENDER_RESUME:"render_resume",STOPIO:"stopIO",ERROR:"error",DECODINGCAPACITYINADEQUATE:"decodingCapacityInadequate"};r.default=i},{}],170:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var n=e("../utils/logger.js"),a=(i(n),e("../utils/logging-control.js")),o=i(a),s=e("../utils/polyfill.js"),u=i(s),f=e("./decoding-events.js"),c=i(f),d=e("./transmuxing-events.js"),l=i(d),h=function(t){function r(e,t,r,i){m&&(m.toBeDecodeQueue.length<b.maxLength4ToBeDecodeQueue?(v=!1,m.toBeDecodeQueue.push({nalu:new Uint8Array(e),pts:t,isDroppable:r,naluType:i})):b.isLive||(m.toBeDecodeQueue.push({nalu:new Uint8Array(e),pts:t,isDroppable:r}),v||(v=!0,m._emitter.emit(c.default.SHOULD_REST))))}function i(){t.postMessage({msg:l.default.SHOULD_WORK})}function n(){t.postMessage({msg:l.default.SHOULD_REST})}function a(e){var r={msg:c.default.SKIP_FRAMES,data:e};t.postMessage(r)}function s(){t.postMessage({msg:c.default.RENDER_RESUME})}function f(e){t.postMessage({msg:c.default.STOPIO})}function d(){t.postMessage({msg:c.default.DECODINGCAPACITYINADEQUATE})}function h(e){var r=e.get_width(),i=e.get_height(),n=e.get_pts();if(b.enableYUVrender){var a=e.getYuvData();this.image_data={width:8*parseInt(r/8),height:i,pts:n,data:a}}else{this.image_data={width:r,height:i,pts:n,data:new Uint8ClampedArray(r*i*4)};for(var o=this.image_data.data,s=0;s<r*i;s++)o[4*s+3]=255;e.transcode(this.image_data)}void 0!==e&&e.free(),t.postMessage({msg:c.default.DECODED_FRAME_ARRIVAL,data:{width:this.image_data.width,height:i,pts:n,buffer:this.image_data.data.buffer}},[this.image_data.data.buffer])}function p(e,r){t.postMessage({msg:"logcat_callback",data:{type:e,logcat:r}})}var m=null,_=p.bind(this),b=null,y=null,v=!1,g=null;u.default.install(),t.addEventListener("message",function(u){switch(u.data.cmd){case"init":y=u.ports[0],y.onmessage=function(e){var t=e.data.cmd,i=null,n=null,a=null,o=null;switch(t){case l.default.H265_SEGMENT:i=e.data.param.data,n=e.data.param.pts,a=e.data.param.isDroppable,o=e.data.param.naluType,Promise.resolve().then(function(){r(i,n,a,o)})}"media_info"==e.data.msg&&Promise.resolve().then(function(){g=e.data.data,m.onReceiveMediaInfo(g)})},b=u.data.param[0];var p=e("../h265decode/h265decoder.js");try{p.compileWasmInterfaces(b.wasmFilePath,function(){m=new p.default(b),m.set_image_callback(h.bind(this)),m.on(c.default.NEED_MORE_DATA,i.bind(this)),m.on(c.default.SHOULD_REST,n.bind(this)),m.on(c.default.SKIP_FRAMES,a.bind(this)),m.on(c.default.RENDER_RESUME,s.bind(this)),m.on(c.default.STOPIO,f.bind(this)),m.on(c.default.DECODINGCAPACITYINADEQUATE,d.bind(this)),t.postMessage({msg:c.default.DECODER_READY})}.bind(this))}catch(u){console.log(u)}break;case"destroy":m&&(m.free(),m=null);break;case"start":m.start();break;case"stop":m&&m.free();break;case"pause":m&&m.pause();break;case"resume":m&&m.resume();break;case"logging_config":var v=u.data.param;o.default.applyConfig(v),!0===v.enableCallback?o.default.addLogListener(_):o.default.removeLogListener(_)}})};r.default=h},{"../h265decode/h265decoder.js":196,"../utils/logger.js":207,"../utils/logging-control.js":208,"../utils/polyfill.js":210,"./decoding-events.js":169,"./transmuxing-events.js":178}],171:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return void 0===e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":n(e)},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=e("../download/io-controller.js"),u=function(e){return e&&e.__esModule?e:{default:e}}(s),f=e("../config.js"),c=function(){function e(){i(this,e)}return o(e,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportMSEAACAudioPlayback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('audio/mp4; codecs="mp4a.40.2')}},{key:"supportNetworkStreamIO",value:function(){var e=new u.default({},(0,f.createDefaultConfig)()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t}},{key:"getNetworkLoaderTypeName",value:function(){var e=new u.default({},(0,f.createDefaultConfig)()),t=e.loaderType;return e.destroy(),t}},{key:"supportNativeMediaPlayback",value:function(t){void 0==e.videoElement&&(e.videoElement=window.document.createElement("video"));var r=e.videoElement.canPlayType(t);return"probably"===r||"maybe"==r}},{key:"supportWebWorker",value:function(){return!!window.Worker&&"undefined"!=typeof Worker}},{key:"supportWebAssembly",value:function(){if("object"===a(window.WebAssembly)&&"function"==typeof window.WebAssembly.instantiate){var e=new window.WebAssembly.Module(window.Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof window.WebAssembly.Module)return new window.WebAssembly.Instance(e)instanceof window.WebAssembly.Instance}return!1}},{key:"supportMediaSourceExtensions",value:function(){return!(!window.MediaSource||!window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E, mp4a.40.2"'))}},{key:"supportWebAudioAPI",value:function(){return!(!window.AudioContext&&!window.webkitAudioContext)}},{key:"supportWebGL",value:function(){try{if(window.WebGLRenderingContext){var e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(t&&t instanceof WebGLRenderingContext)return!0}return!1}catch(e){return!1}}},{key:"supportFetch",value:function(){return!!window.fetch}},{key:"supportStreamReadAPI",value:function(){return!!window.ReadableStream}},{key:"getFeatureList",value:function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1,webworker:!1,webassembly:!1,mediaSourceExtensions:!1,webAudioAPI:!1,webGL:!1,fetch:!1,streamReadAPI:!1};return t.mseFlvPlayback=e.supportMSEH264Playback(),t.networkStreamIO=e.supportNetworkStreamIO(),t.networkLoaderName=e.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=e.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t.mseAudioPlayback=e.supportMSEAACAudioPlayback(),t.webworker=e.supportWebWorker(),t.webassembly=e.supportWebAssembly(),t.mediaSourceExtensions=e.supportMediaSourceExtensions(),t.webAudioAPI=e.supportWebAudioAPI(),t.webGL=e.supportWebGL(),t.fetch=e.supportFetch(),t.streamReadAPI=e.supportStreamReadAPI(),t}}]),e}();r.default=c},{"../config.js":165,"../download/io-controller.js":187}],172:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=function(){function e(){i(this,e),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return n(e,[{key:"isComplete",value:function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,r=this._search(t.times,e);return{index:r,milliseconds:t.times[r],fileposition:t.filepositions[r]}}},{key:"_search",value:function(e,t){var r=0,i=e.length-1,n=0,a=0,o=i;for(t<e[0]&&(r=0,a=o+1);a<=o;){if((n=a+Math.floor((o-a)/2))===i||t>=e[n]&&t<e[n+1]){r=n;break}e[n]<t?a=n+1:o=n-1}return r}}]),e}();r.default=a},{}],173:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}();r.SampleInfo=function e(t,r,n,a,o){i(this,e),this.dts=t,this.pts=r,this.duration=n,this.originalDts=a,this.isSyncPoint=o,this.fileposition=null},r.MediaSegmentInfo=function(){function e(){i(this,e),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return n(e,[{key:"appendSyncPoint",value:function(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}]),e}(),r.IDRSampleList=function(){function e(){i(this,e),this._list=[]}return n(e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))}},{key:"getLastSyncPointBeforeDts",value:function(e){if(0==this._list.length)return null;var t=this._list,r=0,i=t.length-1,n=0,a=0,o=i;for(e<t[0].dts&&(r=0,a=o+1);a<=o;){if((n=a+Math.floor((o-a)/2))===i||e>=t[n].dts&&e<t[n+1].dts){r=n;break}t[n].dts<e?a=n+1:o=n-1}return this._list[r]}}]),e}(),r.MediaSegmentInfoList=function(){function e(t){i(this,e),this._type=t,this._list=[],this._lastAppendLocation=-1}return n(e,[{key:"isEmpty",value:function(){return 0===this._list.length}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(e){var t=this._list;if(0===t.length)return-2;var r=t.length-1,i=0,n=0,a=r,o=0;if(e<t[0].originalBeginDts)return o=-1;for(;n<=a;){if((i=n+Math.floor((a-n)/2))===r||e>t[i].lastSample.originalDts&&e<t[i+1].originalBeginDts){o=i;break}t[i].originalBeginDts<e?n=i+1:a=i-1}return o}},{key:"_searchNearestSegmentAfter",value:function(e){return this._searchNearestSegmentBefore(e)+1}},{key:"append",value:function(e){var t=this._list,r=e,i=this._lastAppendLocation,n=0;-1!==i&&i<t.length&&r.originalBeginDts>=t[i].lastSample.originalDts&&(i===t.length-1||i<t.length-1&&r.originalBeginDts<t[i+1].originalBeginDts)?n=i+1:t.length>0&&(n=this._searchNearestSegmentBefore(r.originalBeginDts)+1),this._lastAppendLocation=n,this._list.splice(n,0,r)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),r=this._list[t].syncPoints;0===r.length&&t>0;)t--,r=this._list[t].syncPoints;return r.length>0?r[r.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),e}()},{}],174:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=e("events"),s=i(o),u=e("../utils/logger.js"),f=i(u),c=e("../utils/browser.js"),d=i(c),l=e("./mse-events.js"),h=i(l),p=e("./media-segment-info.js"),m=e("../utils/exception.js"),_=function(){function e(t){n(this,e),this.TAG="MSEController",this._config=t,this._emitter=new s.default,this._config.isLive&&void 0==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new p.IDRSampleList}return a(e,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaSource)throw new m.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var r=this._pendingSegments[t];r.splice(0,r.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var i=this._sourceBuffers[t];i&&("closed"!==e.readyState&&(e.removeSourceBuffer(i),i.removeEventListener("error",this.e.onSourceBufferError),i.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)),this._mimeTypes[t]=null,this._sourceBuffers[t]=null)}if("open"===e.readyState)try{e.endOfStream()}catch(e){f.default.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var r=e,i=""+r.container;r.codec&&r.codec.length>0&&(i+=";codecs="+r.codec);var n=!1;if(this._lastInitSegments[r.type]=r,i!==this._mimeTypes[r.type]){if(this._mimeTypes[r.type])f.default.v(this.TAG,"Notice: "+r.type+" mimeType changed, origin: "+this._mimeTypes[r.type]+", target: "+i);else{n=!0;try{var a=this._sourceBuffers[r.type]=this._mediaSource.addSourceBuffer(i);a.addEventListener("error",this.e.onSourceBufferError),a.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return f.default.e(this.TAG,e.message),void this._emitter.emit(h.default.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[r.type]=i}t||this._pendingSegments[r.type].push(r),n||this._sourceBuffers[r.type]&&!this._sourceBuffers[r.type].updating&&this._doAppendSegments(),d.default.safari&&"audio/mpeg"===r.container&&r.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=r.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var r=this._sourceBuffers[t.type];!r||r.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var r=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{r.abort()}catch(e){f.default.e(this.TAG,e.message)}this._idrList.clear();var i=this._pendingSegments[t];if(i.splice(0,i.length),"closed"!==this._mediaSource.readyState){for(var n=0;n<r.buffered.length;n++){var a=r.buffered.start(n),o=r.buffered.end(n);this._pendingRemoveRanges[t].push({start:a,end:o})}if(r.updating||this._doRemoveRanges(),d.default.safari){var s=this._lastInitSegments[t];s&&(this._pendingSegments[t].push(s),r.updating||this._doAppendSegments())}}}}},{key:"endOfStream",value:function(){var e=this._mediaSource,t=this._sourceBuffers;if(!e||"open"!==e.readyState)return void(e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0));t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream())}},{key:"getNearestKeyframe",value:function(e){return this._idrList.getLastSyncPointBeforeDts(e)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var r=this._sourceBuffers[t];if(r){var i=r.buffered;if(i.length>=1&&e-i.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var r=this._sourceBuffers[t];if(r){for(var i=r.buffered,n=!1,a=0;a<i.length;a++){var o=i.start(a),s=i.end(a);if(o<=e&&e<s+3){if(e-o>=this._config.autoCleanupMaxBackwardDuration){n=!0;var u=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:o,end:u})}}else s<e&&(n=!0,this._pendingRemoveRanges[t].push({start:o,end:s}))}n&&!r.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var e=this._sourceBuffers
    13  ;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(e.video&&e.video.updating||e.audio&&e.audio.updating)){var t=this._mediaSource.duration,r=this._pendingMediaDuration;r>0&&(isNaN(t)||r>t)&&(f.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+r),this._mediaSource.duration=r),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],r=this._pendingRemoveRanges[e];r.length&&!t.updating;){var i=r.shift();t.remove(i.start,i.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var r=e[t].shift();if(r.timestampOffset){var i=this._sourceBuffers[t].timestampOffset,n=r.timestampOffset/1e3,a=Math.abs(i-n);a>.1&&(f.default.v(this.TAG,"Update MPEG audio timestampOffset from "+i+" to "+n),this._sourceBuffers[t].timestampOffset=n),delete r.timestampOffset}if(!r.data||0===r.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(r.data),this._isBufferFull=!1,"video"===t&&r.hasOwnProperty("info")&&this._idrList.appendArray(r.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(r),22===e.code?(this._isBufferFull||this._emitter.emit(h.default.BUFFER_FULL),this._isBufferFull=!0):(f.default.e(this.TAG,e.message),this._emitter.emit(h.default.ERROR,{code:e.code,msg:e.message}))}}}},{key:"_onSourceOpen",value:function(){if(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(h.default.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){f.default.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){f.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(h.default.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){f.default.e(this.TAG,"SourceBuffer Error: "+e)}}]),e}();r.default=_},{"../utils/browser.js":205,"../utils/exception.js":206,"../utils/logger.js":207,"./media-segment-info.js":173,"./mse-events.js":175,events:85}],175:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};r.default=i},{}],176:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=e("events"),s=i(o),u=e("../utils/logger.js"),f=i(u),c=e("../utils/logging-control.js"),d=i(c),l=e("./transmuxing-controller.js"),h=i(l),p=e("./transmuxing-events.js"),m=i(p),_=e("./transmuxing-worker.js"),b=i(_),y=e("./media-info.js"),v=i(y),g=function(){function t(r,i,a,o){if(n(this,t),this.TAG="Transmuxer",this._emitter=new s.default,this.player=o,i.enableWorker&&"undefined"!=typeof Worker)try{var u=e("webworkify");this._worker=u(b.default),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[r,i]},[a.port1]),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},d.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:d.default.getConfig()})}catch(e){f.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new h.default(r,i)}else this._controller=new h.default(r,i);if(this._controller){var c=this._controller;c.on(m.default.IO_ERROR,this._onIOError.bind(this)),c.on(m.default.DEMUX_ERROR,this._onDemuxError.bind(this)),c.on(m.default.INIT_SEGMENT,this._onInitSegment.bind(this)),c.on(m.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),c.on(m.default.H265_SEGMENT,this._onH265Segment.bind(this)),c.on(m.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),c.on(m.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),c.on(m.default.MEDIA_INFO,this._onMediaInfo.bind(this)),c.on(m.default.NO_AUDIO,this._onNoAudio.bind(this)),c.on(m.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),c.on(m.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return a(t,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),d.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(e,t){var r=this;Promise.resolve().then(function(){r._emitter.emit(m.default.INIT_SEGMENT,e,t)})}},{key:"_onMediaSegment",value:function(e,t){var r=this;Promise.resolve().then(function(){r._emitter.emit(m.default.MEDIA_SEGMENT,e,t)})}},{key:"_onH265Segment",value:function(e,t){var r=this;Promise.resolve().then(function(){r._emitter.emit(m.default.H265_SEGMENT,e,t)})}},{key:"_onLoadingComplete",value:function(){var e=this;Promise.resolve().then(function(){e._emitter.emit(m.default.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var e=this;Promise.resolve().then(function(){e._emitter.emit(m.default.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(m.default.MEDIA_INFO,e)})}},{key:"_onNoAudio",value:function(){var e=this;Promise.resolve().then(function(){e._emitter.emit(m.default.NO_AUDIO)})}},{key:"_onStatisticsInfo",value:function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(m.default.STATISTICS_INFO,e)})}},{key:"_onIOError",value:function(e,t){var r=this;Promise.resolve().then(function(){r._emitter.emit(m.default.IO_ERROR,e,t)})}},{key:"_onDemuxError",value:function(e,t){var r=this;Promise.resolve().then(function(){r._emitter.emit(m.default.DEMUX_ERROR,e,t)})}},{key:"_onRecommendSeekpoint",value:function(e){var t=this;Promise.resolve().then(function(){t._emitter.emit(m.default.RECOMMEND_SEEKPOINT,e)})}},{key:"_onLoggingConfigChanged",value:function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}},{key:"_onWorkerMessage",value:function(e){var t=e.data,r=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case m.default.INIT_SEGMENT:case m.default.MEDIA_SEGMENT:this._emitter.emit(t.msg,r.type,r.data);break;case m.default.LOADING_COMPLETE:case m.default.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case m.default.MEDIA_INFO:Object.setPrototypeOf(r,v.default.prototype),this._emitter.emit(t.msg,r);break;case m.default.NO_AUDIO:this._emitter.emit(t.msg);break;case m.default.STATISTICS_INFO:this._emitter.emit(t.msg,r);break;case m.default.IO_ERROR:case m.default.DEMUX_ERROR:this._emitter.emit(t.msg,r.type,r.info);break;case m.default.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,r);break;case m.default.LOADEDEND:this._emitter.emit(t.msg,this.player);break;case"logcat_callback":f.default.emitter.emit("log",r.type,r.logcat)}}}]),t}();r.default=g},{"../utils/logger.js":207,"../utils/logging-control.js":208,"./media-info.js":172,"./transmuxing-controller.js":177,"./transmuxing-events.js":178,"./transmuxing-worker.js":179,events:85,webworkify:164}],177:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=e("events"),s=i(o),u=e("../utils/logger.js"),f=i(u),c=e("../utils/browser.js"),d=i(c),l=e("./media-info.js"),h=i(l),p=e("../demux/flv-demuxer.js"),m=i(p),_=e("../remux/mp4-remuxer.js"),b=i(_),y=e("../demux/demux-errors.js"),v=i(y),g=e("../download/io-controller.js"),w=i(g),E=e("./transmuxing-events.js"),S=i(E),k=(e("../download/loader.js"),function(){function e(t,r){n(this,e),this.TAG="TransmuxingController",this._emitter=new s.default,this._config=r,t.segments||(t.segments=[{duration:t.duration,filesize:t.filesize,url:t.url}]),"boolean"!=typeof t.cors&&(t.cors=!0),"boolean"!=typeof t.withCredentials&&(t.withCredentials=!1),this._mediaDataSource=t,this._currentSegmentIndex=0;var i=0;this._mediaDataSource.segments.forEach(function(e){e.timestampBase=i,i+=e.duration,e.cors=t.cors,e.withCredentials=t.withCredentials,r.referrerPolicy&&(e.referrerPolicy=r.referrerPolicy)}),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return a(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(e,t){this._currentSegmentIndex=e;var r=this._mediaDataSource.segments[e],i=this._ioctl=new w.default(r,this._config,e,this._emitter);i.onError=this._onIOException.bind(this),i.onSeeked=this._onIOSeeked.bind(this),i.onComplete=this._onIOComplete.bind(this),i.onRedirect=this._onIORedirect.bind(this),i.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):i.onDataArrival=this._onInitChunkArrival.bind(this),i.open(t)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var r=this._mediaInfo.segments[t];if(void 0==r)this._pendingSeekTime=e;else{var i=r.getNearestKeyframe(e);this._remuxer.seek(i.milliseconds),this._ioctl.seek(i.fileposition),this._pendingResolveSeekPoint=i.milliseconds}}else{var n=this._mediaInfo.segments[t];if(void 0==n)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t);else{var a=n.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,a.fileposition),this._pendingResolveSeekPoint=a.milliseconds,this._reportSegmentMediaInfo(t)}}this._enableStatisticsReporter()}}},{key:"_searchSegmentIndexContains",value:function(e){for(var t=this._mediaDataSource.segments,r=t.length-1,i=0;i<t.length;i++)if(e<t[i].timestampBase){r=i-1;break}return r}},{key:"_onInitChunkArrival",value:function(e,t){var r=this,i=null,n=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,n=this._demuxer.parseChunks(e,t);else if((i=m.default.probe(e)).match){this._demuxer=new m.default(i,this._config,this._emitter),this._config.use265&&setTimeout(function(){r._demuxer._realHasAudio||r._demuxer._onNoAudioTrack()},4e3),this._remuxer||(this._remuxer=new b.default(this._config));var a=this._mediaDataSource;void 0==a.duration||isNaN(a.duration)||(this._demuxer.overridedDuration=a.duration),"boolean"==typeof a.hasAudio&&(this._demuxer.overridedHasAudio=a.hasAudio),"boolean"==typeof a.hasVideo&&(this._demuxer.overridedHasVideo=a.hasVideo),this._demuxer.timestampBase=a.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onNoAudioTrack=this._onNoAudioTrack.bind(this),this._config.use265&&(this._demuxer.onH265Segment=this._onH265SegmentArrival.bind(this)),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),n=this._demuxer.parseChunks(e,t)}else i=null,f.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){r._internalAbort()}),this._emitter.emit(S.default.DEMUX_ERROR,v.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),n=0;return n}},{key:"_onH265SegmentArrival",value:function(e,t){this._emitter.emit(S.default.H265_SEGMENT,e,t)}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,h.default.prototype));var r=Object.assign({},e);Object.setPrototypeOf(r,h.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=r,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then(function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)})}},{key:"_onNoAudioTrack",value:function(){this._emitter.emit(S.default.NO_AUDIO)}},{key:"_onMetaDataArrived",value:function(e){this._emitter.emit(S.default.METADATA_ARRIVED,e)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e,r=t+1;r<this._mediaDataSource.segments.length?(this._internalAbort(),this._loadSegment(r)):(this._emitter.emit(S.default.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(S.default.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(e,t){f.default.e(this.TAG,"IOException: type = "+e+", code = "+t.code+", msg = "+t.msg),this._emitter.emit(S.default.IO_ERROR,e,t),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(e,t){f.default.e(this.TAG,"DemuxException: type = "+e+", info = "+t),this._emitter.emit(S.default.DEMUX_ERROR,e,t)}},{key:"_onRemuxerInitSegmentArrival",value:function(e,t){this._emitter.emit(S.default.INIT_SEGMENT,e,t)}},{key:"_onRemuxerMediaSegmentArrival",value:function(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(S.default.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){var r=t.info.syncPoints,i=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,d.default.safari&&r.length>0&&r[0].originalDts===i&&(i=r[0].pts),this._emitter.emit(S.default.RECOMMEND_SEEKPOINT,i)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_recursiveObj",value:function(e){for(var t in e)"[object Object]"===Object.prototype.toString.call(e[t])?this._recursiveObj(e[t]):null!==e[t]&&""!=e[t]||delete e[t]}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],r=Object.assign({},t);r.duration=this._mediaInfo.duration,r.segmentCount=this._mediaInfo.segmentCount,delete r.segments,delete r.keyframesIndex,this._recursiveObj(r),this._emitter.emit(S.default.MEDIA_INFO,r)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(S.default.STATISTICS_INFO,e)}}]),e}());r.default=k},{"../demux/demux-errors.js":181,"../demux/flv-demuxer.js":183,"../download/io-controller.js":187,"../download/loader.js":188,"../remux/mp4-remuxer.js":204,"../utils/browser.js":205,"../utils/logger.js":207,"./media-info.js":172,"./transmuxing-events.js":178,events:85}],178:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",H265_SEGMENT:"h265_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint",SHOULD_REST:"should_rest",SHOULD_WORK:"should_work",NO_AUDIO:"no_audio",LOADEDEND:"loadedEnd",WARNING:"warning",DOWNLOADSPEED:"downloadSpeed"};r.default=i},{}],179:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var n=e("../utils/logger.js"),a=i(n),o=e("../utils/logging-control.js"),s=i(o),u=e("../utils/polyfill.js"),f=i(u),c=e("./transmuxing-controller.js"),d=i(c),l=e("./transmuxing-events.js"),h=i(l),p=function(e){function t(t,r){var i={msg:h.default.INIT_SEGMENT,data:{type:t,data:r}};e.postMessage(i,[r.data])}function r(t,r){var i={msg:h.default.MEDIA_SEGMENT,data:{type:t,data:r}};e.postMessage(i,[r.data])}function i(e,t){var r=this,i=(t.samples.length,t.samples[0].pts),n=t.samples[0].isDroppable;t.samples[0].units.forEach(function(t){var a=t.data.buffer.slice(t.data.byteOffset,t.data.byteOffset+t.data.length),o={cmd:h.default.H265_SEGMENT,param:{type:e,data:a,pts:i,isDroppable:n,naluType:t.naluType}};r._portToDecoder.postMessage(o,[a])}),t.samples=[]}function n(){var t={msg:h.default.LOADING_COMPLETE};e.postMessage(t)}function o(){var t={msg:h.default.RECOVERED_EARLY_EOF};e.postMessage(t)}function u(t){var r={msg:h.default.MEDIA_INFO,data:t};e.postMessage(r),this._portToDecoder.postMessage(r)}function c(){var t={msg:h.default.NO_AUDIO,data:null};e.postMessage(t)}function l(t){var r={msg:h.default.STATISTICS_INFO,data:t};e.postMessage(r)}function p(t,r){e.postMessage({msg:h.default.IO_ERROR,data:{type:t,info:r}})}function m(t,r){e.postMessage({msg:h.default.DEMUX_ERROR,data:{type:t,info:r}})}function _(t){e.postMessage({msg:h.default.RECOMMEND_SEEKPOINT,data:t})}function b(){e.postMessage({msg:h.default.LOADEDEND})}function y(t,r){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:r}})}var v=null,g=y.bind(this);f.default.install(),e.addEventListener("message",function(f){switch(f.data.cmd){case"init":v=new d.default(f.data.param[0],f.data.param[1]),v.on(h.default.IO_ERROR,p.bind(this)),v.on(h.default.DEMUX_ERROR,m.bind(this)),v.on(h.default.INIT_SEGMENT,t.bind(this)),v.on(h.default.MEDIA_SEGMENT,r.bind(this)),v.on(h.default.H265_SEGMENT,i.bind(this)),v.on(h.default.LOADING_COMPLETE,n.bind(this)),v.on(h.default.RECOVERED_EARLY_EOF,o.bind(this)),v.on(h.default.MEDIA_INFO,u.bind(this)),v.on(h.default.NO_AUDIO,c.bind(this)),v.on(h.default.STATISTICS_INFO,l.bind(this)),v.on(h.default.RECOMMEND_SEEKPOINT,_.bind(this)),v.on(h.default.LOADEDEND,b.bind(this)),this._portToDecoder=f.ports[0],this._portToDecoder.onmessage=function(e){switch(e.data.cmd){case h.default.SHOULD_REST:v.pause(),a.default.v(this.TAG,h.default.SHOULD_REST);break;case h.default.SHOULD_WORK:v.resume()}};break;case"destroy":v&&(v.destroy(),v=null),e.postMessage({msg:"destroyed"});break;case"start":v.start();break;case"stop":v.stop();break;case"seek":v.seek(f.data.param);break;case"pause":v.pause();break;case"resume":v.resume();break;case"logging_config":var y=f.data.param;s.default.applyConfig(y),!0===y.enableCallback?s.default.addLogListener(g):s.default.removeLogListener(g)}})};r.default=p},{"../utils/logger.js":207,"../utils/logging-control.js":208,"../utils/polyfill.js":210,"./transmuxing-controller.js":177,"./transmuxing-events.js":178}],180:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=e("../utils/logger.js"),s=i(o),u=e("../utils/utf8-conv.js"),f=i(u),c=e("../utils/exception.js"),d=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),l=function(){function e(){n(this,e)}return a(e,null,[{key:"parseScriptData",value:function(t,r,i){var n={};try{var a=e.parseValue(t,r,i),o=e.parseValue(t,r+a.size,i-a.size);n[a.data]=o.data}catch(e){s.default.e("AMF",e.toString())}return n}},{key:"parseObject",value:function(t,r,i){if(i<3)throw new c.IllegalStateException("Data not enough when parse ScriptDataObject");var n=e.parseString(t,r,i),a=e.parseValue(t,r+n.size,i-n.size),o=a.objectEnd;return{data:{name:n.data,value:a.data},size:n.size+a.size,objectEnd:o}}},{key:"parseVariable",value:function(t,r,i){return e.parseObject(t,r,i)}},{key:"parseString",value:function(e,t,r){if(r<2)throw new c.IllegalStateException("Data not enough when parse String");var i=new DataView(e,t,r),n=i.getUint16(0,!d),a=void 0;return a=n>0?(0,f.default)(new Uint8Array(e,t+2,n)):"",{data:a,size:2+n}}},{key:"parseLongString",value:function(e,t,r){if(r<4)throw new c.IllegalStateException("Data not enough when parse LongString");var i=new DataView(e,t,r),n=i.getUint32(0,!d),a=void 0;return a=n>0?(0,f.default)(new Uint8Array(e,t+4,n)):"",{data:a,size:4+n}}},{key:"parseDate",value:function(e,t,r){if(r<10)throw new c.IllegalStateException("Data size invalid when parse Date");var i=new DataView(e,t,r),n=i.getFloat64(0,!d);return n+=60*i.getInt16(8,!d)*1e3,{data:new Date(n),size:10}}},{key:"parseValue",value:function(t,r,i){if(i<1)throw new c.IllegalStateException("Data not enough when parse Value");var n=new DataView(t,r,i),a=1,o=n.getUint8(0),u=void 0,f=!1;try{switch(o){case 0:u=n.getFloat64(1,!d),a+=8;break;case 1:u=!!n.getUint8(1),a+=1;break;case 2:var l=e.parseString(t,r+1,i-1);u=l.data,a+=l.size;break;case 3:u={};var h=0;for(9==(16777215&n.getUint32(i-4,!d))&&(h=3);a<i-4;){var p=e.parseObject(t,r+a,i-a-h);if(p.objectEnd)break;u[p.data.name]=p.data.value,a+=p.size}if(a<=i-3){9===(16777215&n.getUint32(a-1,!d))&&(a+=3)}break;case 8:u={},a+=4;var m=0;for(9==(16777215&n.getUint32(i-4,!d))&&(m=3);a<i-8;){var _=e.parseVariable(t,r+a,i-a-m);if(_.objectEnd)break;u[_.data.name]=_.data.value,a+=_.size}if(a<=i-3){9===(16777215&n.getUint32(a-1,!d))&&(a+=3)}break;case 9:u=void 0,a=1,f=!0;break;case 10:u=[];var b=n.getUint32(1,!d);a+=4;for(var y=0;y<b;y++){var v=e.parseValue(t,r+a,i-a);u.push(v.data),a+=v.size}break;case 11:var g=e.parseDate(t,r+1,i-1);u=g.data,a+=g.size;break;case 12:var w=e.parseString(t,r+1,i-1);u=w.data,a+=w.size;break;default:a=i,s.default.w("AMF","Unsupported AMF value type "+o)}}catch(e){s.default.e("AMF",e.toString())}return{data:u,size:a,objectEnd:f}}}]),e}();r.default=l},{"../utils/exception.js":206,"../utils/logger.js":207,"../utils/utf8-conv.js":211}],181:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};r.default=i},{}],182:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=e("../utils/exception.js"),o=function(){function e(t){i(this,e),this.TAG="ExpGolomb",this._buffer=t,this._buffer_index=0,this._total_bytes=t.byteLength,this._total_bits=8*t.byteLength,this._current_word=0,this._current_word_bits_left=0}return n(e,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new a.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),r=new Uint8Array(4);r.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(r.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}},{key:"readBits",value:function(e){if(e>32)throw new a.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var r=this._current_word_bits_left?this._current_word:0;r>>>=32-this._current_word_bits_left;var i=e-this._current_word_bits_left;this._fillCurrentWord();var n=Math.min(i,this._current_word_bits_left),o=this._current_word>>>32-n;return this._current_word<<=n,this._current_word_bits_left-=n,r=r<<n|o}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var e=void 0;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}();r.default=o},{"../utils/exception.js":206}],183:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),f=e("events"),c=(i(f),e("../utils/logger.js")),d=i(c),l=e("./amf-parser.js"),h=i(l),p=e("./sps-parser.js"),m=i(p),_=e("./demux-errors.js"),b=i(_),y=e("../core/media-info.js"),v=i(y),g=e("../utils/exception.js"),w=e("./hevc-nalu-type-codes"),E=e("../core/transmuxing-events.js"),S=i(E),k=function(){function e(t,r,i){n(this,e),this.TAG="FLVDemuxer",this._config=r,this.transmuxingEmitter=i,this._onError=null,this._onMediaInfo=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=t.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=t.hasAudioTrack,this._hasVideo=t.hasVideoTrack,this._realHasAudio=!0,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new v.default,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._onH265Segment=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),this._fileCount=0,this._preVideoDts=0,this._preAudioDts=0,this._preVideoTimestamp=void 0,this._preAudioTimestamp=void 0,this.firstFrame=!1}return u(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._onH265Segment=null}},{key:"bindDataSource",
    14  value:function(e){return e.onDataArrival=this.parseChunks.bind(this),this}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new v.default}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched}},{key:"parseChunks",value:function(t,r){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new g.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var i=0,n=this._littleEndian;if(0===r){if(!(t.byteLength>13))return 0;i=e.probe(t).dataOffset}if(this._firstParse){this._firstParse=!1,r+i!==this._dataOffset&&d.default.w(this.TAG,"First time parsing but chunk byteStart invalid!");0!==new DataView(t,i).getUint32(0,!n)&&d.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4}for(;i<t.byteLength;){this._dispatch=!0;var a=new DataView(t,i);if(i+11+4>t.byteLength)break;var o=a.getUint8(0),s=16777215&a.getUint32(0,!n);if(i+11+s+4>t.byteLength)break;if(8===o||9===o||18===o){var u=a.getUint8(4),f=a.getUint8(5),c=a.getUint8(6),l=a.getUint8(7),h=c|f<<8|u<<16|l<<24;0!==(16777215&a.getUint32(7,!n))&&d.default.w(this.TAG,"Meet tag which has StreamID != 0!");var p=i+11;switch(o){case 8:this._realHasAudio=!0,this._parseAudioData(t,p,s,h);break;case 9:this._isH265codec=this._parseVideoData(t,p,s,h,r+i);break;case 18:this._parseScriptData(t,p,s),this._realHasAudio=!1}var m=a.getUint32(11+s,!n);m!==11+s&&d.default.w(this.TAG,"Invalid PrevTagSize "+m),i+=11+s+4}else d.default.w(this.TAG,"Unsupported tag type "+o+", skipped"),i+=11+s+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&(this._isH265codec?this._onDataAvailable(this._audioTrack):this._onDataAvailable(this._audioTrack,this._videoTrack)),i}},{key:"_parseScriptData",value:function(e,t,r){var i=h.default.parseScriptData(e,t,r);if(i.hasOwnProperty("onMetaData")){if(null==i.onMetaData||"object"!==s(i.onMetaData))return void d.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&d.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=i;var n=this._metadata.onMetaData;if("boolean"==typeof n.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=n.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof n.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=n.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof n.audiodatarate&&(this._mediaInfo.audioDataRate=n.audiodatarate),"number"==typeof n.videodatarate&&(this._mediaInfo.videoDataRate=n.videodatarate),"number"==typeof n.width&&(this._mediaInfo.width=n.width),"number"==typeof n.height&&(this._mediaInfo.height=n.height),"number"==typeof n.duration){if(!this._durationOverrided){var a=Math.floor(n.duration*this._timescale);this._duration=a,this._mediaInfo.duration=a}}else this._mediaInfo.duration=0;if("number"==typeof n.framerate){var o=Math.floor(1e3*n.framerate);if(o>0){var u=o/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=u,this._referenceFrameRate.fps_num=o,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=u}}if("object"===s(n.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var f=n.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(f),n.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=n,this._onMediaInfo(this._mediaInfo)}}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],r=[],i=1;i<e.times.length;i++){var n=this._timestampBase+Math.floor(1e3*e.times[i]);t.push(n),r.push(e.filepositions[i])}return{times:t,filepositions:r}}},{key:"_parseAudioData",value:function(e,t,r,i){if(r<=1)return void d.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){var n=(this._littleEndian,new DataView(e,t,r)),a=n.getUint8(0),o=a>>>4;if(2!==o&&10!==o)return void this._onError(b.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+o);var s=0,u=(12&a)>>>2;if(!(u>=0&&u<=4))return void this._onError(b.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+u);s=this._flvSoundRateTable[u];var f=1&a,c=this._audioMetadata,l=this._audioTrack;if(c||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),c=this._audioMetadata={},c.type="audio",c.id=l.id,c.timescale=this._timescale,c.duration=this._duration,c.audioSampleRate=s,c.channelCount=0===f?1:2),10===o){var h=this._parseAACAudioData(e,t+1,r-1);if(void 0==h)return;if(0===h.packetType){c.config&&d.default.w(this.TAG,"Found another AudioSpecificConfig!");var p=h.data;c.audioSampleRate=p.samplingRate,c.channelCount=p.channelCount,c.codec=p.codec,c.originalCodec=p.originalCodec,c.config=p.config,c.refSampleDuration=1024/c.audioSampleRate*c.timescale,this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",c);var m=this._mediaInfo;m.audioCodec=c.originalCodec,m.audioSampleRate=c.audioSampleRate,m.audioChannelCount=c.channelCount,m.hasVideo?null!=m.videoCodec&&(m.mimeType='video/x-flv; codecs="'+m.videoCodec+","+m.audioCodec+'"'):m.mimeType='video/x-flv; codecs="'+m.audioCodec+'"',m.isComplete()&&this._onMediaInfo(m)}else if(1===h.packetType){var _=this._timestampBase+i;_<this._preAudioDts&&(this.run1Timesflag||(console.log("parse audio aac preAudioDts:"+this._preAudioDts+"parse audio aac dts:"+_),this.run1Timesflag=!0),_=this._preAudioDts+_);var y=_;this._preAudioDts=_;var v={unit:h.data,dts:_,pts:y};l.samples.push(v),l.length+=h.data.length}else d.default.e(this.TAG,"Flv: Unsupported AAC data type "+h.packetType)}else if(2===o){if(!c.codec){var g=this._parseMP3AudioData(e,t+1,r-1,!0);if(void 0==g)return;c.audioSampleRate=g.samplingRate,c.channelCount=g.channelCount,c.codec=g.codec,c.originalCodec=g.originalCodec,c.refSampleDuration=1152/c.audioSampleRate*c.timescale,d.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",c);var w=this._mediaInfo;w.audioCodec=c.codec,w.audioSampleRate=c.audioSampleRate,w.audioChannelCount=c.channelCount,w.audioDataRate=g.bitRate,w.hasVideo?null!=w.videoCodec&&(w.mimeType='video/x-flv; codecs="'+w.videoCodec+","+w.audioCodec+'"'):w.mimeType='video/x-flv; codecs="'+w.audioCodec+'"',w.isComplete()&&this._onMediaInfo(w)}var E=this._parseMP3AudioData(e,t+1,r-1,!1);if(void 0==E)return;var S=this._timestampBase+i,k={unit:E,dts:S,pts:S};l.samples.push(k),l.length+=E.length}}}},{key:"_parseAACAudioData",value:function(e,t,r){if(r<=1)return void d.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");var i={},n=new Uint8Array(e,t,r);return i.packetType=n[0],0===n[0]?i.data=this._parseAACAudioSpecificConfig(e,t+1,r-1):i.data=n.subarray(1),i}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,r){var i=new Uint8Array(e,t,r),n=null,a=0,o=0,s=0,u=null;if(a=o=i[0]>>>3,(s=(7&i[0])<<1|i[1]>>>7)<0||s>=this._mpegSamplingRates.length)return void this._onError(b.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");var f=this._mpegSamplingRates[s],c=(120&i[1])>>>3;if(c<0||c>=8)return void this._onError(b.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration");5===a&&(u=(7&i[1])<<1|i[2]>>>7,i[2]);var d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?s>=6?(a=5,n=new Array(4),u=s-3):(a=2,n=new Array(2),u=s):-1!==d.indexOf("android")?(a=2,n=new Array(2),u=s):(a=5,u=s,n=new Array(4),s>=6?u=s-3:1===c&&(a=2,n=new Array(2),u=s)),n[0]=a<<3,n[0]|=(15&s)>>>1,n[1]=(15&s)<<7,n[1]|=(15&c)<<3,5===a&&(n[1]|=(15&u)>>>1,n[2]=(1&u)<<7,n[2]|=8,n[3]=0),{config:n,samplingRate:f,channelCount:c,codec:"mp4a.40."+a,originalCodec:"mp4a.40."+o}}},{key:"_parseMP3AudioData",value:function(e,t,r,i){if(r<4)return void d.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");var n=(this._littleEndian,new Uint8Array(e,t,r)),a=null;if(i){if(255!==n[0])return;var o=n[1]>>>3&3,s=(6&n[1])>>1,u=(240&n[2])>>>4,f=(12&n[2])>>>2,c=n[3]>>>6&3,l=3!==c?2:1,h=0,p=0;switch(o){case 0:h=this._mpegAudioV25SampleRateTable[f];break;case 2:h=this._mpegAudioV20SampleRateTable[f];break;case 3:h=this._mpegAudioV10SampleRateTable[f]}switch(s){case 1:34,u<this._mpegAudioL3BitRateTable.length&&(p=this._mpegAudioL3BitRateTable[u]);break;case 2:33,u<this._mpegAudioL2BitRateTable.length&&(p=this._mpegAudioL2BitRateTable[u]);break;case 3:32,u<this._mpegAudioL1BitRateTable.length&&(p=this._mpegAudioL1BitRateTable[u])}a={bitRate:p,samplingRate:h,channelCount:l,codec:"mp3",originalCodec:"mp3"}}else a=n;return a}},{key:"_parseVideoData",value:function(e,t,r,i,n){if(r<=1)return void d.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var a=new Uint8Array(e,t,r)[0],o=(240&a)>>>4,s=15&a;return 7!==s&&12!==s?void this._onError(b.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+s):7==s?(this._parseAVCVideoPacket(e,t+1,r-1,i,n,o),!1):12==s?(this._parseHEVCVideoPacket(e,t+1,r-1,i,n,o),!0):void 0}}},{key:"_parseHEVCVideoPacket",value:function(e,t,r,i){if(r<4)return void d.default.w(this.TAG,"Flv: Invalid HEVC packet, missing XXX or/and CompositionTime");var n=new DataView(e,t,r),a=n.getUint8(0),o=this._littleEndian,s=16777215&n.getUint32(0,!o);new Uint8Array(e,t+4,r-4);if(0===n.getUint8(4)&&0===n.getUint8(5)&&0===n.getUint8(6)&&1===n.getUint8(7))this._parseAnnexB(e,t+4,r-4,i,s,a);else if(0===a)this._parseHEVCDecoderConfigurationRecord(e,t+4,r-4,i,s,a);else if(1===a){if(this.firstFrame||(this.firstFrame=!0,this.transmuxingEmitter.emit(S.default.LOADEDEND)),this._videoTrack=this._parseH265NaluData(e,t+4,r-4,i,s,a),!this._onH265Segment)throw new g.IllegalStateException("FLVDemuxer: onH265Segment callback must be specified!");this._onH265Segment("video",this._videoTrack)}else if(2!==a)return void this._onError(b.default.FORMAT_ERROR,"Flv: Invalid video packet type "+a)}},{key:"_parseAnnexB",value:function(e,t,r,i,n,a){var o=new DataView(e,t,r);if(this.startCodePosArray=[],0===a){for(var s=0;s<r;s++)0===o.getUint8(s)&&0===o.getUint8(s+1)&&0===o.getUint8(s+2)&&1===o.getUint8(s+3)&&this.startCodePosArray.push(s);this._parseAnnexBDecoderConfigurationRecord(e,t,r)}else this.firstFrame||(this.firstFrame=!0,this.transmuxingEmitter.emit(S.default.LOADEDEND)),this.startCodePosArray.push(0);this._videoTrack=this._parseH265NaluData(e,t,r,i,n,a,"Annex-B"),this._onH265Segment("video",this._videoTrack)}},{key:"_parseAnnexBDecoderConfigurationRecord",value:function(e,t,r){if(r<23)return void d.default.w(this.TAG,"Flv: Invalid HEVCDecoderConfigurationRecord, lack of data!");var i=this._videoMetadata,n=this._videoTrack;i||(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),i=this._videoMetadata={},i.type="video",i.id=n.id,i.timescale=this._timescale,i.duration=this._duration,i.fps=this._mediaInfo.fps,i.width=this._mediaInfo.width,i.height=this._mediaInfo.height,i.videoDataRate=this._mediaInfo.videoDataRate,i.audioCodec=this._mediaInfo.audioCodec,i.level=this._mediaInfo.level,i.profile=this._mediaInfo.profile,i.framerate=this._mediaInfo.metadata.framerate),this._videoInitialMetadataDispatched=!0,this._dispatch=!1}},{key:"_parseHEVCDecoderConfigurationRecord",value:function(e,t,r,i,n,a){if(r<23)return void d.default.w(this.TAG,"Flv: Invalid HEVCDecoderConfigurationRecord, lack of data!");var o=this._videoMetadata,s=this._videoTrack;this._littleEndian;o||(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),o=this._videoMetadata={},o.type="video",o.id=s.id,o.timescale=this._timescale,o.duration=this._duration);var u=new DataView(e,t,r);u.getUint8(0),u.getUint8(1),u.getUint32(2);if(this._naluLengthSize=1+(3&u.getUint8(21)),3!==this._naluLengthSize&&4!==this._naluLengthSize)return void this._onError(b.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));var f=u.getUint8(22);if(0===f)return void this._onError(b.default.FORMAT_ERROR,"Flv: Invalid HEVCDecoderConfigurationRecord: No VPS,SPS & PPS");for(var c=23,l=0;l<f;l++){var h=63&u.getUint8(c);c+=1;var p=u.getUint16(c);c+=2;for(var m=0;m<p;m++){var _=u.getUint16(c);c+=2,c+_>r&&this._onError(b.default.FORMAT_ERROR,"Flv: Invalid HEVCDecoderConfigurationRecord: beyond dataSize");new Uint8Array(e,t+c,_);c+=_,32==h&&(this._videoTrack=this._parseH265NaluData(e,t+c-_,_,i,n,a),this._onH265Segment("video",this._videoTrack)),33==h&&(this._videoTrack=this._parseH265NaluData(e,t+c-_,_,i,n,a),this._onH265Segment("video",this._videoTrack)),34==h&&(this._videoTrack=this._parseH265NaluData(e,t+c-_,_,i,n,a),this._onH265Segment("video",this._videoTrack))}}this._isInitialMetadataDispatched()?this._dispatch&&this._audioTrack.length&&this._onDataAvailable(this._audioTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1}},{key:"_isNALDroppable",value:function(e,t){return!(1!=e||!this._isSublayerNonReference(t))}},{key:"_isSublayerNonReference",value:function(e){switch(e){case w.HEVCNaluType.NAL_UNIT_TRAIL_N:case w.HEVCNaluType.NAL_UNIT_TSA_N:case w.HEVCNaluType.NAL_UNIT_STSA_N:case w.HEVCNaluType.NAL_UNIT_RADL_N:case w.HEVCNaluType.NAL_UNIT_RASL_N:case w.HEVCNaluType.NAL_UNIT_RESERVED_VCL_N10:case w.HEVCNaluType.NAL_UNIT_RESERVED_VCL_N12:case w.HEVCNaluType.NAL_UNIT_RESERVED_VCL_N14:return!0;default:return!1}}},{key:"_parseH265NaluData",value:function(e,t,r,i,n,a){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=this._littleEndian,u=new DataView(e,t,r),f=[],c=0,l=0,h=this._timestampBase+i;h<this._preVideoDts&&(this.run1Timesflag||(console.log("preVideoDts:"+this._preVideoDts+" dts:"+h),this.run1Timesflag=!0),h=this._preVideoDts+h);var p=h+n;this._preVideoDts=h;var m=void 0;if("Annex-B"===o)for(var _=void 0,b=void 0,y=void 0,v=0,g=this.startCodePosArray.length;v<g;v++){_=t+this.startCodePosArray[v]+4,b=v!==g-1?t+this.startCodePosArray[v+1]-1:t+r-1,y=b-_+1;var w=new Uint8Array(e,_,y);m=(126&w[0])>>1,f.push({data:w,naluType:m}),c+=w.byteLength}else if(0==a){var E=new Uint8Array(e,t,r);m=(126&E[0])>>1,f.push({data:E,naluType:m}),c+=E.byteLength}else for(;l<r;){if(l+4>=r){d.default.w(this.TAG,"Malformed Nalu near timestamp "+h+", offset = "+l+", dataSize = "+r);break}var S=u.getUint32(l,!s);if(S>r-4)return void d.default.w(this.TAG,"Malformed Nalus near timestamp "+h+", NaluSize > DataSize!");var k=new Uint8Array(e,t+l+4,S);m=(126&k[0])>>1,f.push({data:k,naluType:m}),c+=k.byteLength,l+=4+S}if(f.length){var T=this._videoTrack,A={units:f,pts:p};this._isNALDroppable(f.length,m)?A.isDroppable=!0:A.isDroppable=!1,T.samples.push(A),"Annex-B"===o?T.length=c:T.length+=c}return this._videoTrack}},{key:"concatTypedArrays",value:function(e,t){var r=new e.constructor(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},{key:"concatBytes",value:function(e,t){var r=new Uint8Array(1);return r[0]=t,this.concatTypedArrays(e,r)}},{key:"_parseAVCVideoPacket",value:function(e,t,r,i,n,a){if(r<4)return void d.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");var o=this._littleEndian,s=new DataView(e,t,r),u=s.getUint8(0),f=16777215&s.getUint32(0,!o);if(0===u)this._parseAVCDecoderConfigurationRecord(e,t+4,r-4);else if(1===u)this._parseAVCVideoData(e,t+4,r-4,i,n,a,f);else if(2!==u)return void this._onError(b.default.FORMAT_ERROR,"Flv: Invalid video packet type "+u)}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,r){if(r<7)return void d.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");var i=this._videoMetadata,n=this._videoTrack,a=this._littleEndian,o=new DataView(e,t,r);i?void 0!==i.avcc&&d.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),i=this._videoMetadata={},i.type="video",i.id=n.id,i.timescale=this._timescale,i.duration=this._duration);var s=o.getUint8(0),u=o.getUint8(1);o.getUint8(2),o.getUint8(3);if(1!==s||0===u)return void this._onError(b.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");if(this._naluLengthSize=1+(3&o.getUint8(4)),3!==this._naluLengthSize&&4!==this._naluLengthSize)return void this._onError(b.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));var f=31&o.getUint8(5);if(0===f)return void this._onError(b.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");f>1&&d.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+f);for(var c=6,l=0;l<f;l++){var h=o.getUint16(c,!a);if(c+=2,0!==h){var p=new Uint8Array(e,t+c,h);c+=h;var _=m.default.parseSPS(p);if(0===l){i.codecWidth=_.codec_size.width,i.codecHeight=_.codec_size.height,i.presentWidth=_.present_size.width,i.presentHeight=_.present_size.height,i.profile=_.profile_string,i.level=_.level_string,i.bitDepth=_.bit_depth,i.chromaFormat=_.chroma_format,i.sarRatio=_.sar_ratio,i.frameRate=_.frame_rate,!1!==_.frame_rate.fixed&&0!==_.frame_rate.fps_num&&0!==_.frame_rate.fps_den||(i.frameRate=this._referenceFrameRate);var y=i.frameRate.fps_den,v=i.frameRate.fps_num;i.refSampleDuration=i.timescale*(y/v);for(var g=p.subarray(1,4),w="avc1.",E=0;E<3;E++){var S=g[E].toString(16);S.length<2&&(S="0"+S),w+=S}i.codec=w;var k=this._mediaInfo;k.width=i.codecWidth,k.height=i.codecHeight,k.fps=i.frameRate.fps,k.profile=i.profile,k.level=i.level,k.chromaFormat=_.chroma_format_string,k.sarNum=i.sarRatio.width,k.sarDen=i.sarRatio.height,k.videoCodec=w,k.hasAudio?null!=k.audioCodec&&(k.mimeType='video/x-flv; codecs="'+k.videoCodec+","+k.audioCodec+'"'):k.mimeType='video/x-flv; codecs="'+k.videoCodec+'"',k.isComplete()&&this._onMediaInfo(k)}}}var T=o.getUint8(c);if(0===T)return void this._onError(b.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");T>1&&d.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+T),c++;for(var A=0;A<T;A++){var R=o.getUint16(c,!a);c+=2,0!==R&&(c+=R)}i.avcc=new Uint8Array(r),i.avcc.set(new Uint8Array(e,t,r),0),d.default.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",i)}},{key:"_parseAVCVideoData",value:function(e,t,r,i,n,a,o){for(var s=this._littleEndian,u=new DataView(e,t,r),f=[],c=0,l=0,h=this._naluLengthSize,p=this._timestampBase+i,m=1===a;l<r;){if(l+4>=r){d.default.w(this.TAG,"Malformed Nalu near timestamp "+p+", offset = "+l+", dataSize = "+r);break}var _=u.getUint32(l,!s);if(3===h&&(_>>>=8),_>r-h)return void d.default.w(this.TAG,"Malformed Nalus near timestamp "+p+", NaluSize > DataSize!");var b=31&u.getUint8(l+h);5===b&&(m=!0);var y=new Uint8Array(e,t+l,h+_),v={type:b,data:y};f.push(v),c+=y.byteLength,l+=h+_}if(f.length){var g=this._videoTrack,w={units:f,length:c,isKeyframe:m,dts:p,cts:o,pts:p+o};m&&(w.fileposition=n),g.samples.push(w),g.length+=c}}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e}},{key:"onNoAudioTrack",get:function(){return this._onNoAudioTrack},set:function(e){this._onNoAudioTrack=e}},{key:"onH265Segment",get:function(){return this._onH265Segment},set:function(e){this._onH265Segment=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}},{key:"overridedDuration",get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}},{key:"overridedHasAudio",set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}},{key:"overridedHasVideo",set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),r={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return r;var i=(4&t[4])>>>2!=0,n=0!=(1&t[4]),o=a(t,5);return o<9?r:{match:!0,consumed:o,dataOffset:o,hasAudioTrack:i,hasVideoTrack:n}}}]),e}();r.default=k},{"../core/media-info.js":172,"../core/transmuxing-events.js":178,"../utils/exception.js":206,"../utils/logger.js":207,"./amf-parser.js":180,"./demux-errors.js":181,"./hevc-nalu-type-codes":184,"./sps-parser.js":185,events:85}],184:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.HEVCNaluType={NAL_UNIT_TRAIL_N:0,NAL_UNIT_TRAIL_R:1,NAL_UNIT_TSA_N:2,NAL_UNIT_TSA_R:3,NAL_UNIT_STSA_N:4,NAL_UNIT_RADL_N:6,NAL_UNIT_RASL_N:8,NAL_UNIT_RESERVED_VCL_N10:10,NAL_UNIT_RESERVED_VCL_N12:12,NAL_UNIT_RESERVED_VCL_N14:14,NAL_UNIT_VPS_NUT:32,NAL_UNIT_SPS_NUT:33,NAL_UNIT_PPS_NUT:34}},{}],185:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=e("./exp-golomb.js"),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(){function e(){i(this,e)}return n(e,null,[{key:"_ebsp2rbsp",value:function(e){for(var t=e,r=t.byteLength,i=new Uint8Array(r),n=0,a=0;a<r;a++)a>=2&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(i[n]=t[a],n++);return new Uint8Array(i.buffer,0,n)}},{key:"parseSPS",value:function(t){var r=e._ebsp2rbsp(t),i=new o.default(r);i.readByte();var n=i.readByte();i.readByte();var a=i.readByte();i.readUEG();var s=e.getProfileString(n),u=e.getLevelString(a),f=1,c=420,d=[0,420,422,444],l=8;if((100===n||110===n||122===n||244===n||44===n||83===n||86===n||118===n||128===n||138===n||144===n)&&(f=i.readUEG(),3===f&&i.readBits(1),f<=3&&(c=d[f]),l=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool()))for(var h=3!==f?8:12,p=0;p<h;p++)i.readBool()&&(p<6?e._skipScalingList(i,16):e._skipScalingList(i,64));i.readUEG();var m=i.readUEG();if(0===m)i.readUEG();else if(1===m){i.readBits(1),i.readSEG(),i.readSEG();for(var _=i.readUEG(),b=0;b<_;b++)i.readSEG()}i.readUEG(),i.readBits(1);var y=i.readUEG(),v=i.readUEG(),g=i.readBits(1);0===g&&i.readBits(1),i.readBits(1);var w=0,E=0,S=0,k=0;i.readBool()&&(w=i.readUEG(),E=i.readUEG(),S=i.readUEG(),k=i.readUEG());var T=1,A=1,R=0,I=!0,M=0,O=0;if(i.readBool()){if(i.readBool()){var x=i.readByte(),D=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],L=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];x>0&&x<16?(T=D[x-1],A=L[x-1]):255===x&&(T=i.readByte()<<8|i.readByte(),A=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){var N=i.readBits(32),C=i.readBits(32);I=i.readBool(),M=C,O=2*N,R=M/O}}var P=1;1===T&&1===A||(P=T/A);var B=0,U=0;if(0===f)B=1,U=2-g;else{var j=3===f?1:2,F=1===f?2:1;B=j,U=F*(2-g)}var G=16*(y+1),z=16*(v+1)*(2-g);G-=(w+E)*B,z-=(S+k)*U;var X=Math.ceil(G*P);return i.destroy(),i=null,{profile_string:s,level_string:u,bit_depth:l,chroma_format:c,chroma_format_string:e.getChromaFormatString(c),frame_rate:{fixed:I,fps:R,fps_den:O,fps_num:M},sar_ratio:{width:T,height:A},codec_size:{width:G,height:z},present_size:{width:X,height:z}}}},{key:"_skipScalingList",value:function(e,t){for(var r=8,i=8,n=0,a=0;a<t;a++)0!==i&&(n=e.readSEG(),i=(r+n+256)%256),r=0===i?r:i}},{key:"getProfileString",value:function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(e){return(e/10).toFixed(1)}},{key:"getChromaFormatString",value:function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),e}();r.default=s},{"./exp-golomb.js":182}],186:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":o(t))&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)},u=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,i)}if("value"in n)return n.value;var o=n.get;if(void 0!==o)return o.call(i)},f=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),c=e("../utils/browser.js"),d=function(e){return e&&e.__esModule?e:{default:e}}(c),l=e("./loader.js"),h=e("../utils/exception.js"),p=function(e){function t(e,r){i(this,t);var a=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"fetch-stream-loader"));return a.TAG="FetchStreamLoader",a._seekHandler=e,a._config=r,a._needStash=!0,a._requestAbort=!1,a._contentLength=null,a._receivedLength=0,a}return a(t,e),f(t,null,[{key:"isSupported",value:function(){try{var e=d.default.msedge&&d.default.version.minor>=15048,t=!d.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}}]),f(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var r=this;this._dataSource=e,this._range=t;var i=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(i=e.redirectedURL);var n=this._seekHandler.getConfig(i,t),a=new self.Headers;if("object"===s(n.headers)){var o=n.headers;for(var u in o)o.hasOwnProperty(u)&&a.append(u,o[u])}var f={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};!1===e.cors&&(f.mode="same-origin"),e.withCredentials&&(f.credentials="include"),e.referrerPolicy&&(f.referrerPolicy=e.referrerPolicy),this._status=l.LoaderStatus.kConnecting,self.fetch(n.url,f).then(function(e){if(r._requestAbort)return r._requestAbort=!1,void(r._status=l.LoaderStatus.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==n.url&&r._onURLRedirect){var t=r._seekHandler.removeURLParameters(e.url);r._onURLRedirect(t)}var i=e.headers.get("Content-Length");return null!=i&&(r._contentLength=parseInt(i),0!==r._contentLength&&r._onContentLengthKnown&&r._onContentLengthKnown(r._contentLength)),r._pump.call(r,e.body.getReader())}if(r._status=l.LoaderStatus.kError,!r._onError)throw new h.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);r._onError(l.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}).catch(function(e){if(r._status=l.LoaderStatus.kError,!r._onError)throw e;r._onError(l.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then(function(r){if(r.done)t._status=l.LoaderStatus.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(!0===t._requestAbort)return t._requestAbort=!1,t._status=l.LoaderStatus.kComplete,e.cancel();t._status=l.LoaderStatus.kBuffering;var i=r.value.buffer,n=t._range.from+t._receivedLength;t._receivedLength+=i.byteLength,t._onDataArrival&&t._onDataArrival(i,n,t._receivedLength),t._pump(e)}}).catch(function(e){if(11!==e.code||!d.default.msedge){t._status=l.LoaderStatus.kError;var r=0,i=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength<t._contentLength)?(r=l.LoaderErrors.EXCEPTION,i={code:e.code,msg:e.message}):(r=l.LoaderErrors.EARLY_EOF,i={code:e.code,msg:"Fetch stream meet Early-EOF"}),!t._onError)throw new h.RuntimeException(i.msg);t._onError(r,i)}})}}]),t}(l.BaseLoader);r.default=p},{"../utils/browser.js":205,"../utils/exception.js":206,"./loader.js":188}],187:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=e("../utils/logger.js"),s=i(o),u=e("./speed-sampler.js"),f=i(u),c=e("./loader.js"),d=e("./fetch-stream-loader.js"),l=i(d),h=e("./xhr-moz-chunked-loader.js"),p=i(h),m=e("./xhr-range-loader.js"),_=i(m),b=e("./websocket-loader.js"),y=i(b),v=e("./range-seek-handler.js"),g=i(v),w=e("./param-seek-handler.js"),E=i(w),S=e("../utils/exception.js"),k=e("../core/transmuxing-events.js"),T=i(k),A=function(){function e(t,r,i,a){n(this,e),this.TAG="IOController",this._config=r,this._extraData=i,this._transmuxingEmitter=a,this._stashInitialSize=393216,void 0!=r.stashInitialSize&&r.stashInitialSize>0&&(this._stashInitialSize=r.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===r.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new f.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return a(e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,
    15  this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new g.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",r=e.seekParamEnd||"bend";this._seekHandler=new E.default(t,r)}else{if("custom"!==e.seekType)throw new S.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new S.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(l.default.isSupported()&&!this._config.disableStreamLoader)this._loaderClass=l.default;else if(p.default.isSupported())this._loaderClass=p.default;else if(_.default.isSupported())this._loaderClass=_.default;else{if(!this._isWebSocketURL)throw new S.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=y.default}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,console.log(this.TAG," io-controller pause"),this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var r={from:e,to:-1};this._currentRange={from:r.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._config.isLive&&(r={from:0,to:-1}),this._loader.open(this._dataSource,r),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new S.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+1048576<e;)t*=2;if((t+=1048576)!==this._bufferSize){var r=new ArrayBuffer(t);if(this._stashUsed>0){var i=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(r,0,t).set(i,0)}this._stashBuffer=r,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,r=t.length-1,i=0,n=0,a=r;if(e<t[0])return t[0];for(;n<=a;){if((i=n+Math.floor((a-n)/2))===r||e>=t[i]&&e<t[i+1])return t[i];t[i]<e?n=i+1:a=i-1}}},{key:"_adjustStashSize",value:function(e){var t=0;(t=this._config.isLive?e:e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var r=1024*t+1048576;this._bufferSize<r&&this._expandBuffer(r),this._stashSize=1024*t}},{key:"_dispatchChunks",value:function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)}},{key:"_onURLRedirect",value:function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)}},{key:"_onContentLengthKnown",value:function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(e,t,r){if(!this._onDataArrival)throw new S.IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return void console.log("load stop because it paused");this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(e.byteLength);var i=this._speedSampler.lastSecondKBps;if(this._transmuxingEmitter.emit(T.default.DOWNLOADSPEED,i),0!==i){var n=this._normalizeSpeed(i);this._speedNormalized!==n&&(this._speedNormalized=n,this._adjustStashSize(n))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize){var a=new Uint8Array(this._stashBuffer,0,this._stashSize);a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var o=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var s=this._stashBuffer.slice(0,this._stashUsed),u=this._dispatchChunks(s,this._stashByteStart);if(u<s.byteLength){if(u>0){var f=new Uint8Array(s,u);o.set(f,0),this._stashUsed=f.byteLength,this._stashByteStart+=u}}else this._stashUsed=0,this._stashByteStart+=u;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),o=new Uint8Array(this._stashBuffer,0,this._bufferSize)),o.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var c=this._dispatchChunks(e,t);if(c<e.byteLength){var d=e.byteLength-c;d>this._bufferSize&&(this._expandBuffer(d),o=new Uint8Array(this._stashBuffer,0,this._bufferSize)),o.set(new Uint8Array(e,c),0),this._stashUsed+=d,this._stashByteStart=t+c}}}else if(0===this._stashUsed){var l=this._dispatchChunks(e,t);if(l<e.byteLength){var h=e.byteLength-l;h>this._bufferSize&&this._expandBuffer(h);var p=new Uint8Array(this._stashBuffer,0,this._bufferSize);p.set(new Uint8Array(e,l),0),this._stashUsed+=h,this._stashByteStart=t+l}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var m=new Uint8Array(this._stashBuffer,0,this._bufferSize);m.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var _=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(_<this._stashUsed&&_>0){var b=new Uint8Array(this._stashBuffer,_);m.set(b,0)}this._stashUsed-=_,this._stashByteStart+=_}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),r=this._dispatchChunks(t,this._stashByteStart),i=t.byteLength-r;if(r<t.byteLength){if(!e){if(r>0){var n=new Uint8Array(this._stashBuffer,0,this._bufferSize),a=new Uint8Array(t,r);n.set(a,0),this._stashUsed=a.byteLength,this._stashByteStart+=r}return 0}s.default.w(this.TAG,i+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,i}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(s.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=c.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case c.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var r=this._currentRange.to+1;return void(r<this._totalLength&&(s.default.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(r,!1)))}e=c.LoaderErrors.UNRECOVERABLE_EARLY_EOF;break;case c.LoaderErrors.UNRECOVERABLE_EARLY_EOF:case c.LoaderErrors.CONNECTING_TIMEOUT:case c.LoaderErrors.HTTP_STATUS_CODE_INVALID:case c.LoaderErrors.EXCEPTION:}if(!this._onError)throw new S.RuntimeException("IOException: "+t.msg);this._onError(e,t)}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(e){this._extraData=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(e){this._onSeeked=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(e){this._onRedirect=e}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||void 0!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===_.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}}]),e}();r.default=A},{"../core/transmuxing-events.js":178,"../utils/exception.js":206,"../utils/logger.js":207,"./fetch-stream-loader.js":186,"./loader.js":188,"./param-seek-handler.js":189,"./range-seek-handler.js":190,"./speed-sampler.js":191,"./websocket-loader.js":192,"./xhr-moz-chunked-loader.js":193,"./xhr-range-loader.js":194}],188:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0}),r.BaseLoader=r.LoaderErrors=r.LoaderStatus=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=e("../utils/exception.js"),o=r.LoaderStatus={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4};r.LoaderErrors={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},r.BaseLoader=function(){function e(t){i(this,e),this._type=t||"undefined",this._status=o.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return n(e,[{key:"destroy",value:function(){this._status=o.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===o.kConnecting||this._status===o.kBuffering}},{key:"open",value:function(e,t){throw new a.NotImplementedException("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new a.NotImplementedException("Unimplemented abstract function!")}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}}]),e}()},{"../utils/exception.js":206}],189:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=function(){function e(t,r){i(this,e),this._startName=t,this._endName=r}return n(e,[{key:"getConfig",value:function(e,t){var r=e;if(0!==t.from||-1!==t.to){var i=!0;-1===r.indexOf("?")&&(r+="?",i=!1),i&&(r+="&"),r+=this._startName+"="+t.from.toString(),-1!==t.to&&(r+="&"+this._endName+"="+t.to.toString())}return{url:r,headers:{}}}},{key:"removeURLParameters",value:function(e){var t=e.split("?")[0],r=void 0,i=e.indexOf("?");-1!==i&&(r=e.substring(i+1));var n="";if(void 0!=r&&r.length>0)for(var a=r.split("&"),o=0;o<a.length;o++){var s=a[o].split("="),u=o>0;s[0]!==this._startName&&s[0]!==this._endName&&(u&&(n+="&"),n+=a[o])}return 0===n.length?t:t+"?"+n}}]),e}();r.default=a},{}],190:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=function(){function e(t){i(this,e),this._zeroStart=t||!1}return n(e,[{key:"getConfig",value:function(e,t){var r={};if(0!==t.from||-1!==t.to){var i=void 0;i=-1!==t.to?"bytes="+t.from.toString()+"-"+t.to.toString():"bytes="+t.from.toString()+"-",r.Range=i}else this._zeroStart&&(r.Range="bytes=0-");return{url:e,headers:r}}},{key:"removeURLParameters",value:function(e){return e}}]),e}();r.default=a},{}],191:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=function(){function e(){i(this,e),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return n(e,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}();r.default=a},{}],192:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":o(t))&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0});var s=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,i)}if("value"in n)return n.value;var o=n.get;if(void 0!==o)return o.call(i)},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),f=e("../utils/logger.js"),c=(function(e){e&&e.__esModule}(f),e("./loader.js")),d=e("../utils/exception.js"),l=function(e){function t(){i(this,t);var e=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"websocket-loader"));return e.TAG="WebSocketLoader",e._needStash=!0,e._ws=null,e._requestAbort=!1,e._receivedLength=0,e}return a(t,e),u(t,null,[{key:"isSupported",value:function(){try{return void 0!==self.WebSocket}catch(e){return!1}}}]),u(t,[{key:"destroy",value:function(){this._ws&&this.abort(),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=c.LoaderStatus.kConnecting}catch(e){this._status=c.LoaderStatus.kError;var r={code:e.code,msg:e.message};if(!this._onError)throw new d.RuntimeException(r.msg);this._onError(c.LoaderErrors.EXCEPTION,r)}}},{key:"abort",value:function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=c.LoaderStatus.kComplete}},{key:"_onWebSocketOpen",value:function(e){this._status=c.LoaderStatus.kBuffering}},{key:"_onWebSocketClose",value:function(e){if(!0===this._requestAbort)return void(this._requestAbort=!1);this._status=c.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}},{key:"_onWebSocketMessage",value:function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var r=new FileReader;r.onload=function(){t._dispatchArrayBuffer(r.result)},r.readAsArrayBuffer(e.data)}else{this._status=c.LoaderStatus.kError;var i={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new d.RuntimeException(i.msg);this._onError(c.LoaderErrors.EXCEPTION,i)}}},{key:"_dispatchArrayBuffer",value:function(e){var t=e,r=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,r,this._receivedLength)}},{key:"_onWebSocketError",value:function(e){this._status=c.LoaderStatus.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new d.RuntimeException(t.msg);this._onError(c.LoaderErrors.EXCEPTION,t)}}]),t}(c.BaseLoader);r.default=l},{"../utils/exception.js":206,"../utils/logger.js":207,"./loader.js":188}],193:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":o(t))&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)},u=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,i)}if("value"in n)return n.value;var o=n.get;if(void 0!==o)return o.call(i)},f=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),c=e("../utils/logger.js"),d=function(e){return e&&e.__esModule?e:{default:e}}(c),l=e("./loader.js"),h=e("../utils/exception.js"),p=function(e){function t(e,r){i(this,t);var a=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-moz-chunked-loader"));return a.TAG="MozChunkedLoader",a._seekHandler=e,a._config=r,a._needStash=!0,a._xhr=null,a._requestAbort=!1,a._contentLength=null,a._receivedLength=0,a}return a(t,e),f(t,null,[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return d.default.w("MozChunkedLoader",e.message),!1}}}]),f(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t;var r=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(r=e.redirectedURL);var i=this._seekHandler.getConfig(r,t);this._requestURL=i.url;var n=this._xhr=new XMLHttpRequest;if(n.open("GET",i.url,!0),n.responseType="moz-chunked-arraybuffer",n.onreadystatechange=this._onReadyStateChange.bind(this),n.onprogress=this._onProgress.bind(this),n.onloadend=this._onLoadEnd.bind(this),n.onerror=this._onXhrError.bind(this),e.withCredentials&&n.withCredentials&&(n.withCredentials=!0),"object"===s(i.headers)){var a=i.headers;for(var o in a)a.hasOwnProperty(o)&&n.setRequestHeader(o,a[o])}this._status=l.LoaderStatus.kConnecting,n.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=l.LoaderStatus.kComplete}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var r=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(r)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=l.LoaderStatus.kError,!this._onError)throw new h.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(l.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=l.LoaderStatus.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==l.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,r,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){if(!0===this._requestAbort)return void(this._requestAbort=!1);this._status!==l.LoaderStatus.kError&&(this._status=l.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},{key:"_onXhrError",value:function(e){this._status=l.LoaderStatus.kError;var t=0,r=null;if(this._contentLength&&e.loaded<this._contentLength?(t=l.LoaderErrors.EARLY_EOF,r={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=l.LoaderErrors.EXCEPTION,r={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new h.RuntimeException(r.msg);this._onError(t,r)}}]),t}(l.BaseLoader);r.default=p},{"../utils/exception.js":206,"../utils/logger.js":207,"./loader.js":188}],194:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0});var u="function"==typeof Symbol&&"symbol"===s(Symbol.iterator)?function(e){return void 0===e?"undefined":s(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":s(e)},f=function e(t,r,i){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,i)}if("value"in n)return n.value;var o=n.get;if(void 0!==o)return o.call(i)},c=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),d=e("../utils/logger.js"),l=i(d),h=e("./speed-sampler.js"),p=i(h),m=e("./loader.js"),_=e("../utils/exception.js"),b=function(e){function t(e,r){n(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-range-loader"));return i.TAG="RangeLoader",i._seekHandler=e,i._config=r,i._needStash=!1,i._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],i._currentChunkSizeKB=384,i._currentSpeedNormalized=0,i._zeroSpeedChunkCount=0,i._xhr=null,i._speedSampler=new p.default,i._requestAbort=!1,i._waitForTotalLength=!1,i._totalLengthReceived=!1,i._currentRequestURL=null,i._currentRedirectedURL=null,i._currentRequestRange=null,i._totalLength=null,i._contentLength=null,i._receivedLength=0,i._lastTimeLoaded=0,i}return o(t,e),c(t,null,[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return l.default.w("RangeLoader",e.message),!1}}}]),c(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t,this._status=m.LoaderStatus.kConnecting;var r=!1;void 0!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(r=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||r?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))}},{key:"_openSubRange",value:function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,r=t+e;null!=this._contentLength&&r-this._range.from>=this._contentLength&&(r=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:r},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var r=e.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?r=this._currentRedirectedURL:void 0!=e.redirectedURL&&(r=e.redirectedURL));var i=this._seekHandler.getConfig(r,t);this._currentRequestURL=i.url;var n=this._xhr=new XMLHttpRequest;if(n.open("GET",i.url,!0),n.responseType="arraybuffer",n.onreadystatechange=this._onReadyStateChange.bind(this),n.onprogress=this._onProgress.bind(this),n.onload=this._onLoad.bind(this),n.onerror=this._onXhrError.bind(this),e.withCredentials&&n.withCredentials&&(n.withCredentials=!0),"object"===u(i.headers)){var a=i.headers;for(var o in a)a.hasOwnProperty(o)&&n.setRequestHeader(o,a[o])}n.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=m.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL){var r=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&r!==this._currentRedirectedURL&&(this._currentRedirectedURL=r,this._onURLRedirect&&this._onURLRedirect(r))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=m.LoaderStatus.kBuffering}else{if(this._status=m.LoaderStatus.kError,!this._onError)throw new _.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(m.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==m.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var r=e.total;this._internalAbort(),null!=r&0!==r&&(this._totalLength=r)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var i=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(i)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,r=t.length-1,i=0,n=0,a=r;if(e<t[0])return t[0];for(;n<=a;){if((i=n+Math.floor((a-n)/2))===r||e>=t[i]&&e<t[i+1])return t[i];t[i]<e?n=i+1:a=i-1}}},{key:"_onLoad",value:function(e){if(this._status!==m.LoaderStatus.kError){if(this._waitForTotalLength)return void(this._waitForTotalLength=!1);this._lastTimeLoaded=0;var t=this._speedSampler.lastSecondKBps;if(0===t&&++this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps),0!==t){var r=this._normalizeSpeed(t);this._currentSpeedNormalized!==r&&(this._currentSpeedNormalized=r,this._currentChunkSizeKB=r)}var i=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength;var a=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():a=!0,this._onDataArrival&&this._onDataArrival(i,n,this._receivedLength),a&&(this._status=m.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}}},{key:"_onXhrError",value:function(e){
    16  this._status=m.LoaderStatus.kError;var t=0,r=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=m.LoaderErrors.EARLY_EOF,r={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=m.LoaderErrors.EXCEPTION,r={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new _.RuntimeException(r.msg);this._onError(t,r)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}}]),t}(m.BaseLoader);r.default=b},{"../utils/exception.js":206,"../utils/logger.js":207,"./loader.js":188,"./speed-sampler.js":191}],195:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(){return U}function a(e,t,r){var i=e;if(j=e,F=t,G=r,null==i||"object"!==(void 0===i?"undefined":v(i)))throw new C.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!t.url)return void N.default.v("","请输入h265播放地址");if(!d())return void N.default.v("","不支持H265播放");switch(t.use265=!0,i.url=t.url,i.type=c(t.url),t.enableWorker=!0,i.type){case"flv":return o(i,t,r);default:return new I.default(i,t)}}function o(e,t,r){return U=new A.default(e,t),U.attachMediaElement(r.audioElement,r.canvas),U}function s(){navigator.userAgent.toLocaleLowerCase();if("mac"===B.default.platform)return"Safari"===u()?B.default.version.major>=11&&B.default.version.minor>=0&&1!==B.default.version.minor:"needCheck";if("windows"===B.default.platform){var e="Edge"===u()&&B.default.version.major>=16,t=B.default.firefox&&B.default.version.major>=52,r="Chrome"===u()&&B.default.version.major>=65;return!!(e||t||r)}}function u(){var e=navigator.userAgent.toLocaleLowerCase(),t=null;if(null!=e.match(/msie/)||null!=e.match(/trident/))t="IE";else if(null!=e.match(/edge/))t="Edge";else if(null!=e.match(/firefox/))t="火狐";else if(null!=e.match(/ubrowser/))t="UC";else if(null!=e.match(/opr/))t="欧朋";else if(null!=e.match(/bidubrowser/))t="百度";else if(null!=e.match(/metasr/))t="搜狗";else if(null!=e.match(/tencenttraveler/)||null!=e.match(/qqbrowse/))t="QQ";else if(null!=e.match(/maxthon/))t="遨游";else if(null!=e.match(/chrome/)){var r=f("type","application/vnd.chromium.remoting-viewer");t=r?"360":"Chrome"}else null!=e.match(/safari/)&&(t="Safari");return t}function f(e,t){var r=navigator.mimeTypes;for(var i in r)if(r[i][e]==t)return!0;return!1}function c(e){var t=e.split("?")[0];return t.substr(e.lastIndexOf("/")+1).lastIndexOf(".")>=0?t.substr(e.lastIndexOf(".")+1):"flv"}function d(){var e=k.default.supportMSEH264Playback(),t=k.default.supportWebAssembly(),r=k.default.supportWebGL(),i=k.default.supportMSEAACAudioPlayback();return"needCheck"===s()?!!(e&&t&&r&&i):!!s()}function l(){return k.default.supportMSEH264Playback()}function h(){return k.default.supportMSEAACAudioPlayback()}function p(){return k.default.getFeatureList()}function m(){return k.default.supportWebAssembly()}function _(){return k.default.supportWebGL()}function b(){return k.default.supportMediaSourceExtensions()}var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0});var v="function"==typeof Symbol&&"symbol"===y(Symbol.iterator)?function(e){return void 0===e?"undefined":y(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":y(e)},g=e("events"),w=(i(g),e("./utils/polyfill.js")),E=i(w),S=e("./core/features.js"),k=i(S),T=e("./player/flv-player.js"),A=i(T),R=e("./player/native-player.js"),I=i(R),M=e("./player/player-events.js"),O=e("./player/player-errors.js"),x=e("./utils/logging-control.js"),D=i(x),L=e("./utils/logger.js"),N=i(L),C=e("./utils/exception.js"),P=e("./utils/browser"),B=i(P);E.default.install();var U=void 0,j=void 0,F=void 0,G=void 0,z={};z.createPlayer=a,z.isSupported=l,z.audioIsSupported=h,z.getFeatureList=p,z.Events=M.PlayerEventsOutside,z.ErrorTypes=O.ErrorTypes,z.ErrorDetails=O.ErrorDetails,z.FlvPlayer=A.default,z.NativePlayer=I.default,z.LoggingControl=D.default,z.webAssemblyIsSupported=m,z.webGLIsSupported=_,z.MSEIsSupported=b,z.updatePlayer=n,z.isSupportH265=d,Object.defineProperty(z,"version",{enumerable:!0,get:function(){return"1.0.0"}}),r.default=z},{"./core/features.js":171,"./player/flv-player.js":198,"./player/native-player.js":199,"./player/player-errors.js":200,"./player/player-events.js":201,"./utils/browser":205,"./utils/exception.js":206,"./utils/logger.js":207,"./utils/logging-control.js":208,"./utils/polyfill.js":210,events:85}],196:[function(e,t,r){(function(i,n,a){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e){return wr.locateFile?wr.locateFile(e,Rr):Rr+e}function f(e){p(!Hr);var t=Xr;return Xr=Xr+e+15&-16,p(Xr<ci,"not enough memory for static allocation - increase TOTAL_MEMORY"),t}function c(e){p(Kr);var t=Ur[Kr>>2],r=t+e+15&-16;if(Ur[Kr>>2]=r,r>=ci){if(!F())return Ur[Kr>>2]=t,0}return t}function d(e,t){return t||(t=Dr),e=Math.ceil(e/t)*t}function l(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:if("*"===e[e.length-1])return 4;if("i"===e[0]){var t=parseInt(e.substr(1));return p(t%8==0),t/8}return 0}}function h(e){h.shown||(h.shown={}),h.shown[e]||(h.shown[e]=1,xr(e))}function p(e,t){e||or("Assertion failed: "+t)}function m(e){var t=wr["_"+e];return p(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function _(e,t,r,i,n){var a=m(e),o=[],s=0;if(p("array"!==t,'Return type should not be "array".'),i)for(var u=0;u<i.length;u++){var f=ei[r[u]];f?(0===s&&(s=_a()),o[u]=f(i[u])):o[u]=i[u]}var c=a.apply(null,o);return c=function(e){return"string"===t?E(e):"boolean"===t?Boolean(e):e}(c),0!==s&&ma(s),c}function b(e,t,r,i){return function(){return _(e,t,r,arguments,i)}}function y(e,t,r,i){switch(r=r||"i8","*"===r.charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":Nr[e>>0]=t;break;case"i16":Pr[e>>1]=t;break;case"i32":Ur[e>>2]=t;break;case"i64":tempI64=[t>>>0,(tempDouble=t,+yi(tempDouble)>=1?tempDouble>0?(0|wi(+gi(tempDouble/4294967296),4294967295))>>>0:~~+vi((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],Ur[e>>2]=tempI64[0],Ur[e+4>>2]=tempI64[1];break;case"float":Fr[e>>2]=t;break;case"double":Gr[e>>3]=t;break;default:or("invalid type for setValue: "+r)}}function v(e,t,r){switch(t=t||"i8","*"===t.charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return Nr[e>>0];case"i16":return Pr[e>>1];case"i32":case"i64":return Ur[e>>2];case"float":return Fr[e>>2];case"double":return Gr[e>>3];default:or("invalid type for getValue: "+t)}return null}function g(e,t,r,i){var n,a;"number"==typeof e?(n=!0,a=e):(n=!1,a=e.length);var o,s="string"==typeof t?t:null;if(o=r==ii?i:["function"==typeof la?la:f,pa,f,c][void 0===r?ri:r](Math.max(a,s?1:t.length)),n){var u;for(i=o,p(0==(3&o)),u=o+(-4&a);i<u;i+=4)Ur[i>>2]=0;for(u=o+a;i<u;)Nr[i++>>0]=0;return o}if("i8"===s)return e.subarray||e.slice?Cr.set(e,o):Cr.set(new Uint8Array(e),o),o;for(var d,h,m,_=0;_<a;){var b=e[_];d=s||t[_],0!==d?(p(d,"Must know what type to store in allocate!"),"i64"==d&&(d="i32"),y(o+_,b,d),m!==d&&(h=l(d),m=d),_+=h):_++}return o}function w(e){return Hr?_i?la(e):c(e):f(e)}function E(e,t){if(0===t||!e)return"";for(var r,i=0,n=0;;){if(p(e+n<ci),r=Cr[e+n>>0],i|=r,0==r&&!t)break;if(n++,t&&n==t)break}t||(t=n);var a="";if(i<128){for(var o;t>0;)o=String.fromCharCode.apply(String,Cr.subarray(e,e+Math.min(t,1024))),a=a?a+o:o,e+=1024,t-=1024;return a}return k(e)}function S(e,t){for(var r=t;e[r];)++r;if(r-t>16&&e.subarray&&ni)return ni.decode(e.subarray(t,r));for(var i,n,a,o,s,u,f="";;){if(!(i=e[t++]))return f;if(128&i)if(n=63&e[t++],192!=(224&i))if(a=63&e[t++],224==(240&i)?i=(15&i)<<12|n<<6|a:(o=63&e[t++],240==(248&i)?i=(7&i)<<18|n<<12|a<<6|o:(s=63&e[t++],248==(252&i)?i=(3&i)<<24|n<<18|a<<12|o<<6|s:(u=63&e[t++],i=(1&i)<<30|n<<24|a<<18|o<<12|s<<6|u))),i<65536)f+=String.fromCharCode(i);else{var c=i-65536;f+=String.fromCharCode(55296|c>>10,56320|1023&c)}else f+=String.fromCharCode((31&i)<<6|n);else f+=String.fromCharCode(i)}}function k(e){return S(Cr,e)}function T(e,t,r,i){if(!(i>0))return 0;for(var n=r,a=r+i-1,o=0;o<e.length;++o){var s=e.charCodeAt(o);if(s>=55296&&s<=57343){s=65536+((1023&s)<<10)|1023&e.charCodeAt(++o)}if(s<=127){if(r>=a)break;t[r++]=s}else if(s<=2047){if(r+1>=a)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else if(s<=2097151){if(r+3>=a)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}else if(s<=67108863){if(r+4>=a)break;t[r++]=248|s>>24,t[r++]=128|s>>18&63,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+5>=a)break;t[r++]=252|s>>30,t[r++]=128|s>>24&63,t[r++]=128|s>>18&63,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-n}function A(e,t,r){return p("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),T(e,Cr,t,r)}function R(e){for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++r)),i<=127?++t:t+=i<=2047?2:i<=65535?3:i<=2097151?4:i<=67108863?5:6}return t}function I(e){var t=R(e)+1,r=la(t);return r&&T(e,Nr,r,t),r}function M(e){return h("warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling"),e}function O(e){var t=/__Z[\w\d_]+/g;return e.replace(t,function(e){var t=M(e);return e===t?e:e+" ["+t+"]"})}function x(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function D(){var e=x();return wr.extraStackTrace&&(e+="\n"+wr.extraStackTrace()),O(e)}function L(e,t){return e%t>0&&(e+=t-e%t),e}function N(e){wr.buffer=Lr=e}function C(){wr.HEAP8=Nr=new Int8Array(Lr),wr.HEAP16=Pr=new Int16Array(Lr),wr.HEAP32=Ur=new Int32Array(Lr),wr.HEAPU8=Cr=new Uint8Array(Lr),wr.HEAPU16=Br=new Uint16Array(Lr),wr.HEAPU32=jr=new Uint32Array(Lr),wr.HEAPF32=Fr=new Float32Array(Lr),wr.HEAPF64=Gr=new Float64Array(Lr)}function P(){p(0==(3&qr)),jr[(qr>>2)-1]=34821223,jr[(qr>>2)-2]=2310721022}function B(){if(34821223==jr[(qr>>2)-1]&&2310721022==jr[(qr>>2)-2]||or("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+jr[(qr>>2)-2].toString(16)+" "+jr[(qr>>2)-1].toString(16)),1668509029!==Ur[0])throw"Runtime error: The application has corrupted its heap memory area (address zero)!"}function U(e){or("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(qr-_a()+e)+" bytes available!")}function j(){or("Cannot enlarge memory arrays. Either (1) compile with  -s TOTAL_MEMORY=X  with X higher than the current value "+ci+", (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 ")}function F(){p(Ur[Kr>>2]>ci);var e=wr.usingWasm?ai:oi,t=2147483648-e;if(Ur[Kr>>2]>t)return xr("Cannot enlarge memory, asked to go up to "+Ur[Kr>>2]+" bytes, but the limit is "+t+" bytes!"),!1;var r=ci;for(ci=Math.max(ci,si);ci<Ur[Kr>>2];)ci<=536870912?ci=L(2*ci,e):(ci=Math.min(L((3*ci+2147483648)/4,e),t))===r&&h("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+ci);var i=(Date.now(),wr.reallocBuffer(ci));return i&&i.byteLength==ci?(N(i),C(),wr.usingWasm||xr("Warning: Enlarging memory arrays, this is not fast! "+[r,ci]),!0):(xr("Failed to grow the heap from "+r+" bytes to "+ci+" bytes, not enough memory!"),i&&xr("Expected to get back a buffer of size "+ci+" bytes, but instead got back a buffer of size "+i.byteLength),ci=r,!1)}function G(){return ci}function z(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?wr.dynCall_v(r):wr.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}function X(){if(wr.preRun)for("function"==typeof wr.preRun&&(wr.preRun=[wr.preRun]);wr.preRun.length;)q(wr.preRun.shift());z(di)}function H(){B(),_i||(_i=!0,z(li))}function V(){B(),z(hi)}function Y(){if(B(),wr.postRun)for("function"==typeof wr.postRun&&(wr.postRun=[wr.postRun]);wr.postRun.length;)W(wr.postRun.shift());z(mi)}function q(e){di.unshift(e)}function W(e){mi.unshift(e)}function K(e,t){p(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),Nr.set(e,t)}function Q(e,t,r){for(var i=0;i<e.length;++i)p(e.charCodeAt(i)===e.charCodeAt(i)&255),Nr[t++>>0]=e.charCodeAt(i);r||(Nr[t>>0]=0)}function Z(e){for(var t=e;;){if(!Ti[e])return e;e=t+Math.random()}return e}function J(e){Ei++,wr.monitorRunDependencies&&wr.monitorRunDependencies(Ei),e?(p(!Ti[e]),Ti[e]=1,null===Si&&"undefined"!=typeof setInterval&&(Si=setInterval(function(){if(Zr)return clearInterval(Si),void(Si=null);var e=!1;for(var t in Ti)e||(e=!0,xr("still waiting on run dependencies:")),xr("dependency: "+t);e&&xr("(end of list)")},1e4))):xr("warning: run dependency added without ID")}function $(e){if(Ei--,wr.monitorRunDependencies&&wr.monitorRunDependencies(Ei),e?(p(Ti[e]),delete Ti[e]):xr("warning: run dependency removed without ID"),0==Ei&&(null!==Si&&(clearInterval(Si),Si=null),ki)){var t=ki;ki=null,t()}}function ee(e){return String.prototype.startsWith?e.startsWith(Ai):0===e.indexOf(Ai)}function te(e,t,r){function i(t){var r=e.buffer;t.byteLength<r.byteLength&&xr("the new buffer in mergeMemory is smaller than the previous one. in native wasm, we should grow memory here");var i=new Int8Array(r);new Int8Array(t).set(i),N(t),C()}function n(e){return e}function a(){try{if(e.wasmBinary)return new Uint8Array(e.wasmBinary);if(e.readBinary)return e.readBinary(c);throw"both async and sync fetching of the wasm failed"}catch(e){or(e)}}function o(){return e.wasmBinary||!Sr&&!kr||"function"!=typeof fetch?new Promise(function(e,t){e(a())}):fetch(c,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+c+"'";return e.arrayBuffer()}).catch(function(){return a()})}function s(t,n,a){function s(t,n){h=t.exports,h.memory&&i(h.memory),e.asm=h,e.usingWasm=!0,$("wasm-instantiate"),r()}function u(t){p(e===d,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),d=null,s(t.instance,t.module)}function f(e){o().then(function(e){return WebAssembly.instantiate(e,l)}).then(e).catch(function(e){xr("failed to asynchronously prepare wasm: "+e),or(e)})}if("object"!==("undefined"==typeof WebAssembly?"undefined":lr(WebAssembly)))return or("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead."),xr("no native wasm support detected"),!1;if(!(e.wasmMemory instanceof WebAssembly.Memory))return xr("no native wasm Memory in use"),!1;if(n.memory=e.wasmMemory,l.global={NaN:NaN,Infinity:1/0},l["global.Math"]=Math,l.env=n,J("wasm-instantiate"),e.instantiateWasm)try{return e.instantiateWasm(l,s)}catch(e){return xr("Module.instantiateWasm callback failed with error: "+e),!1}var d=e;return e.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||ee(c)||"function"!=typeof fetch?f(u):WebAssembly.instantiateStreaming(fetch(c,{credentials:"same-origin"}),l).then(u).catch(function(e){xr("wasm streaming compile failed: "+e),xr("falling back to ArrayBuffer instantiation"),f(u)}),{}}var f="libqydecoder.wast",c=t,d="libqydecoder.temp.asm.js";ee(f)||(f=u(f)),ee(c)||(c=u(c)),ee(d)||(d=u(d));var l={global:null,env:null,asm2wasm:Qr,parent:e},h=null;e.asmPreload=e.asm;var m=e.reallocBuffer,_=function(t){var r=e.usingWasm?ai:oi;t=L(t,r);var i=e.buffer,n=i.byteLength;if(e.usingWasm)try{return-1!==e.wasmMemory.grow((t-n)/65536)?e.buffer=e.wasmMemory.buffer:null}catch(e){return console.error("Module.reallocBuffer: Attempted to grow from "+n+" bytes to "+t+" bytes, but got error: "+e),null}};e.reallocBuffer=function(e){return"asmjs"===b?m(e):_(e)};var b="";e.asm=function(t,r,i){if(r=n(r),!r.table){var a=e.wasmTableSize;void 0===a&&(a=1024);var o=e.wasmMaxTableSize;"object"===("undefined"==typeof WebAssembly?"undefined":lr(WebAssembly))&&"function"==typeof WebAssembly.Table?r.table=void 0!==o?new WebAssembly.Table({initial:a,maximum:o,element:"anyfunc"}):new WebAssembly.Table({initial:a,element:"anyfunc"}):r.table=new Array(a),e.wasmTable=r.table}r.memoryBase||(r.memoryBase=e.STATIC_BASE),r.tableBase||(r.tableBase=0);var u;return u=s(t,r,i),p(u,"no binaryen method succeeded. consider enabling more options, like interpreting, if you want that: https://github.com/kripken/emscripten/wiki/WebAssembly#binaryen-methods"),u};e.asm}function re(e){var t,r;re.called?(r=Ur[e>>2],t=Ur[r>>2]):(re.called=!0,Ii.USER=Ii.LOGNAME="web_user",Ii.PATH="/",Ii.PWD="/",Ii.HOME="/home/web_user",Ii.LANG="C.UTF-8",Ii._=wr.thisProgram,t=w(1024),r=w(256),Ur[r>>2]=t,Ur[e>>2]=r);var i=[],n=0;for(var a in Ii)if("string"==typeof Ii[a]){var o=a+"="+Ii[a];i.push(o),n+=o.length}if(n>1024)throw new Error("Environment size exceeded TOTAL_ENV_SIZE!");for(var s=0;s<i.length;s++){var o=i[s];Q(o,t),Ur[r+4*s>>2]=t,t+=o.length+1}Ur[r+4*i.length>>2]=0}function ie(e){return la(e)}function ne(e){var t=Mi.infos[e];return t&&!t.caught&&(t.caught=!0,oa.uncaught_exception--),t&&(t.rethrown=!1),Mi.caught.push(e),Mi.addRef(Mi.deAdjust(e)),e}function ae(){throw Zr=!0,"Pure virtual function called!"}function oe(e){throw Mi.last||(Mi.last=e),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function se(){var e=Mi.last;if(!e)return 0|(ha(0),0);var t=Mi.infos[e],r=t.type;if(!r)return 0|(ha(0),e);var i=Array.prototype.slice.call(arguments);wr.___cxa_is_pointer_type(r);se.buffer||(se.buffer=la(4)),Ur[se.buffer>>2]=e,e=se.buffer;for(var n=0;n<i.length;n++)if(i[n]&&wr.___cxa_can_catch(i[n],r,e))return e=Ur[e>>2],t.adjusted=e,0|(ha(i[n]),e);return e=Ur[e>>2],0|(ha(r),e)}function ue(e,t,r){throw Mi.infos[e]={ptr:e,adjusted:e,type:t,destructor:r,refcount:0,caught:!1,rethrown:!1},Mi.last=e,"uncaught_exception"in oa?oa.uncaught_exception++:oa.uncaught_exception=1,e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function fe(){return!!oa.uncaught_exception}function ce(){}function de(){}function le(e){return wr.___errno_location?Ur[wr.___errno_location()>>2]=e:xr("failed to set errno from JS"),e}function he(e,t){return le(Oi.EPERM),-1}function pe(e,t){ji.varargs=t;try{var r=ji.getStreamFromFD(),i=(ji.get(),ji.get()),n=ji.get(),a=ji.get(),o=i;return Ui.llseek(r,o,a),Ur[n>>2]=r.position,r.getdents&&0===o&&0===a&&(r.getdents=null),0}catch(e){return void 0!==Ui&&e instanceof Ui.ErrnoError||or(e),-e.errno}}function me(e,t){ji.varargs=t;try{var r=ji.getStreamFromFD(),i=ji.get(),n=ji.get();return ji.doReadv(r,i,n)}catch(e){return void 0!==Ui&&e instanceof Ui.ErrnoError||or(e),-e.errno}}function _e(e,t){ji.varargs=t;try{var r=ji.getStreamFromFD(),i=ji.get(),n=ji.get();return ji.doWritev(r,i,n)}catch(e){return void 0!==Ui&&e instanceof Ui.ErrnoError||or(e),-e.errno}}function be(e,t){ji.varargs=t;try{var r=ji.getStreamFromFD();switch(ji.get()){case 0:var i=ji.get();if(i<0)return-Oi.EINVAL;var n;return n=Ui.open(r.path,r.flags,0,i),n.fd;case 1:case 2:return 0;case 3:return r.flags;case 4:var i=ji.get();return r.flags|=i,0;case 12:case 12:var i=ji.get();return Pr[i+0>>1]=2,0;case 13:case 14:case 13:case 14:return 0;case 16:case 8:return-Oi.EINVAL;case 9:return le(Oi.EINVAL),-1;default:return-Oi.EINVAL}}catch(e){return void 0!==Ui&&e instanceof Ui.ErrnoError||or(e),-e.errno}}function ye(e,t){ji.varargs=t;try{var r=ji.getStr(),i=ji.get(),n=ji.get();return Ui.open(r,i,n).fd}catch(e){return void 0!==Ui&&e instanceof Ui.ErrnoError||or(e),-e.errno}}function ve(e,t){ji.varargs=t;try{var r=ji.getStreamFromFD(),i=ji.get();switch(i){case 21509:case 21505:return r.tty?0:-Oi.ENOTTY;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return r.tty?0:-Oi.ENOTTY;case 21519:if(!r.tty)return-Oi.ENOTTY;var n=ji.get();return Ur[n>>2]=0,0;case 21520:return r.tty?-Oi.EINVAL:-Oi.ENOTTY;case 21531:var n=ji.get();return Ui.ioctl(r,i,n);case 21523:case 21524:return r.tty?0:-Oi.ENOTTY;default:or("bad ioctl syscall "+i)}}catch(e){return void 0!==Ui&&e instanceof Ui.ErrnoError||or(e),-e.errno}}function ge(e,t){ji.varargs=t;try{var r=ji.getStreamFromFD();return Ui.close(r),0}catch(e){return void 0!==Ui&&e instanceof Ui.ErrnoError||or(e),-e.errno}}function we(e,t){ji.varargs=t;try{var r=ji.get(),i=ji.get(),n=ji.mappings[r];if(!n)return 0;if(i===n.len){var a=Ui.getStream(n.fd);ji.doMsync(r,a,i,n.flags),Ui.munmap(a),ji.mappings[r]=null,n.allocated&&da(n.malloc)}return 0}catch(e){return void 0!==Ui&&e instanceof Ui.ErrnoError||or(e),-e.errno}}function Ee(){}function Se(){wr.abort()}function ke(e){return 0===e?0:(e=E(e),Ii.hasOwnProperty(e)?(ke.ret&&da(ke.ret),ke.ret=I(Ii[e]),ke.ret):0)}function Te(e){var t=Ae,r=t.LLVM_SAVEDSTACKS[e];t.LLVM_SAVEDSTACKS.splice(e,1),ma(r)}function Ae(){var e=Ae;return e.LLVM_SAVEDSTACKS||(e.LLVM_SAVEDSTACKS=[]),e.LLVM_SAVEDSTACKS.push(_a()),e.LLVM_SAVEDSTACKS.length-1}function Re(){or("trap!")}function Ie(){function e(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}if(!Ie.called){Ie.called=!0,Ur[ua()>>2]=60*(new Date).getTimezoneOffset();var t=new Date(2e3,0,1),r=new Date(2e3,6,1);Ur[sa()>>2]=Number(t.getTimezoneOffset()!=r.getTimezoneOffset());var i=e(t),n=e(r),a=g($e(i),"i8",ti),o=g($e(n),"i8",ti);r.getTimezoneOffset()<t.getTimezoneOffset()?(Ur[fa()>>2]=a,Ur[fa()+4>>2]=o):(Ur[fa()>>2]=o,Ur[fa()+4>>2]=a)}}function Me(e,t){Ie();var r=new Date(1e3*Ur[e>>2]);Ur[t>>2]=r.getSeconds(),Ur[t+4>>2]=r.getMinutes(),Ur[t+8>>2]=r.getHours(),Ur[t+12>>2]=r.getDate(),Ur[t+16>>2]=r.getMonth(),Ur[t+20>>2]=r.getFullYear()-1900,Ur[t+24>>2]=r.getDay();var i=new Date(r.getFullYear(),0,1),n=(r.getTime()-i.getTime())/864e5|0;Ur[t+28>>2]=n,Ur[t+36>>2]=-60*r.getTimezoneOffset();var a=new Date(2e3,6,1).getTimezoneOffset(),o=i.getTimezoneOffset(),s=0|(a!=o&&r.getTimezoneOffset()==Math.min(o,a));Ur[t+32>>2]=s;var u=Ur[fa()+(s?4:0)>>2];return Ur[t+40>>2]=u,t}function Oe(e){return Me(e,Fi)}function xe(e,t,r){return Cr.set(Cr.subarray(t,t+r),e),e}function De(e){Ie();var t=new Date(Ur[e+20>>2]+1900,Ur[e+16>>2],Ur[e+12>>2],Ur[e+8>>2],Ur[e+4>>2],Ur[e>>2],0),r=Ur[e+32>>2],i=t.getTimezoneOffset(),n=new Date(t.getFullYear(),0,1),a=new Date(2e3,6,1).getTimezoneOffset(),o=n.getTimezoneOffset(),s=Math.min(o,a);if(r<0)Ur[e+32>>2]=Number(a!=o&&s==i);else if(r>0!=(s==i)){var u=Math.max(o,a),f=r>0?s:u;t.setTime(t.getTime()+6e4*(f-i))}Ur[e+24>>2]=t.getDay();var c=(t.getTime()-n.getTime())/864e5|0;return Ur[e+28>>2]=c,t.getTime()/1e3|0}function Le(){return 0}function Ne(){return 0}function Ce(){return 0}function Pe(){return 11}function Be(e){return Gi[e]||0}function Ue(){}function je(e,t){return 0==e?Oi.EINVAL:(Ur[e>>2]=zi,Gi[zi]=0,zi++,0)}function Fe(){}function Ge(){}function ze(){}function Xe(){}function He(e,t){He.seen||(He.seen={}),e in He.seen||(wr.dynCall_v(t),He.seen[e]=1)}function Ve(e,t){return e in Gi?(Gi[e]=t,0):Oi.EINVAL}function Ye(e){return e%4==0&&(e%100!=0||e%400==0)}function qe(e,t){for(var r=0,i=0;i<=t;r+=e[i++]);return r}function We(e,t){for(var r=new Date(e.getTime());t>0;){var i=Ye(r.getFullYear()),n=r.getMonth(),a=(i?Xi:Hi)[n];if(!(t>a-r.getDate()))return r.setDate(r.getDate()+t),r;t-=a-r.getDate()+1,r.setDate(1),n<11?r.setMonth(n+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function Ke(e,t,r,i){function n(e,t,r){for(var i="number"==typeof e?e.toString():e||"";i.length<t;)i=r[0]+i;return i}function a(e,t){return n(e,t,"0")}function o(e,t){function r(e){return e<0?-1:e>0?1:0}var i;return 0===(i=r(e.getFullYear()-t.getFullYear()))&&0===(i=r(e.getMonth()-t.getMonth()))&&(i=r(e.getDate()-t.getDate())),i}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function u(e){var t=We(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),n=s(r),a=s(i);return o(n,t)<=0?o(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var f=Ur[i+40>>2],c={tm_sec:Ur[i>>2],tm_min:Ur[i+4>>2],tm_hour:Ur[i+8>>2],tm_mday:Ur[i+12>>2],tm_mon:Ur[i+16>>2],tm_year:Ur[i+20>>2],tm_wday:Ur[i+24>>2],tm_yday:Ur[i+28>>2],tm_isdst:Ur[i+32>>2],tm_gmtoff:Ur[i+36>>2],tm_zone:f?E(f):""},d=E(r),l={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S"};for(var h in l)d=d.replace(new RegExp(h,"g"),l[h]);var p=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=["January","February","March","April","May","June","July","August","September","October","November","December"],_={"%a":function(e){return p[e.tm_wday].substring(0,3)},"%A":function(e){return p[e.tm_wday]},"%b":function(e){return m[e.tm_mon].substring(0,3)},"%B":function(e){return m[e.tm_mon]},"%C":function(e){return a((e.tm_year+1900)/100|0,2)},"%d":function(e){return a(e.tm_mday,2)},"%e":function(e){return n(e.tm_mday,2," ")},"%g":function(e){return u(e).toString().substring(2)},"%G":function(e){return u(e)},"%H":function(e){return a(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),a(t,2)},"%j":function(e){return a(e.tm_mday+qe(Ye(e.tm_year+1900)?Xi:Hi,e.tm_mon-1),3)},"%m":function(e){return a(e.tm_mon+1,2)},"%M":function(e){return a(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return a(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return new Date(e.tm_year+1900,e.tm_mon+1,e.tm_mday,0,0,0,0).getDay()||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),r=0===t.getDay()?t:We(t,7-t.getDay()),i=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(o(r,i)<0){var n=qe(Ye(i.getFullYear())?Xi:Hi,i.getMonth()-1)-31,s=31-r.getDate(),u=s+n+i.getDate();return a(Math.ceil(u/7),2)}return 0===o(r,t)?"01":"00"},"%V":function(e){var t=new Date(e.tm_year+1900,0,4),r=new Date(e.tm_year+1901,0,4),i=s(t),n=s(r),u=We(new Date(e.tm_year+1900,0,1),e.tm_yday);if(o(u,i)<0)return"53";if(o(n,u)<=0)return"01";var f;return f=i.getFullYear()<e.tm_year+1900?e.tm_yday+32-i.getDate():e.tm_yday+1-i.getDate(),a(Math.ceil(f/7),2)},"%w":function(e){return new Date(e.tm_year+1900,e.tm_mon+1,e.tm_mday,0,0,0,0).getDay()},"%W":function(e){var t=new Date(e.tm_year,0,1),r=1===t.getDay()?t:We(t,0===t.getDay()?1:7-t.getDay()+1),i=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(o(r,i)<0){var n=qe(Ye(i.getFullYear())?Xi:Hi,i.getMonth()-1)-31,s=31-r.getDate(),u=s+n+i.getDate();return a(Math.ceil(u/7),2)}return 0===o(r,t)?"01":"00"},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=Math.abs(t)/60,t=t/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var h in _)d.indexOf(h)>=0&&(d=d.replace(new RegExp(h,"g"),_[h](c)));var b=$e(d,!1);return b.length>t?0:(K(b,e),b.length-1)}function Qe(e,t,r,i){return Ke(e,t,r,i)}function Ze(e){var t=Date.now()/1e3|0;return e&&(Ur[e>>2]=t),t}function Je(e){var t=e/1e3;if((Sr||kr)&&self.performance&&self.performance.now)for(var r=self.performance.now();self.performance.now()-r<t;);else for(var r=Date.now();Date.now()-r<t;);return 0}function $e(e,t,r){var i=r>0?r:R(e)+1,n=new Array(i),a=T(e,n,0,n.length);return t&&(n.length=a),n}function et(e){xr("Invalid function pointer called with signature 'ii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function tt(e){xr("Invalid function pointer called with signature 'iii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function rt(e){xr("Invalid function pointer called with signature 'iiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function it(e){xr("Invalid function pointer called with signature 'iiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function nt(e){xr("Invalid function pointer called with signature 'iiiiid'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function at(e){xr("Invalid function pointer called with signature 'iiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function ot(e){xr("Invalid function pointer called with signature 'iiiiiid'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function st(e){xr("Invalid function pointer called with signature 'iiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function ut(e){xr("Invalid function pointer called with signature 'iiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function ft(e){
    17  xr("Invalid function pointer called with signature 'iiiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function ct(e){xr("Invalid function pointer called with signature 'iiiiiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function dt(e){xr("Invalid function pointer called with signature 'iiiiij'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function lt(e){xr("Invalid function pointer called with signature 'iiiijii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function ht(e){xr("Invalid function pointer called with signature 'ji'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function pt(e){xr("Invalid function pointer called with signature 'jij'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function mt(e){xr("Invalid function pointer called with signature 'v'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function _t(e){xr("Invalid function pointer called with signature 'vi'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function bt(e){xr("Invalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function yt(e){xr("Invalid function pointer called with signature 'viii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function vt(e){xr("Invalid function pointer called with signature 'viiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function gt(e){xr("Invalid function pointer called with signature 'viiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function wt(e){xr("Invalid function pointer called with signature 'viiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function Et(e){xr("Invalid function pointer called with signature 'viiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function St(e){xr("Invalid function pointer called with signature 'viiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function kt(e){xr("Invalid function pointer called with signature 'viiiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function Tt(e){xr("Invalid function pointer called with signature 'viiiiiiiiii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function At(e){xr("Invalid function pointer called with signature 'viiij'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function Rt(e){xr("Invalid function pointer called with signature 'viijii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function It(e){xr("Invalid function pointer called with signature 'vij'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)"),xr("Build with ASSERTIONS=2 for more info."),or(e)}function Mt(e,t){var r=_a();try{return wr.dynCall_ii(e,t)}catch(e){if(ma(r),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Ot(e,t,r){var i=_a();try{return wr.dynCall_iii(e,t,r)}catch(e){if(ma(i),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function xt(e,t,r,i){var n=_a();try{return wr.dynCall_iiii(e,t,r,i)}catch(e){if(ma(n),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Dt(e,t,r,i,n){var a=_a();try{return wr.dynCall_iiiii(e,t,r,i,n)}catch(e){if(ma(a),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Lt(e,t,r,i,n,a){var o=_a();try{return wr.dynCall_iiiiid(e,t,r,i,n,a)}catch(e){if(ma(o),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Nt(e,t,r,i,n,a){var o=_a();try{return wr.dynCall_iiiiii(e,t,r,i,n,a)}catch(e){if(ma(o),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Ct(e,t,r,i,n,a,o){var s=_a();try{return wr.dynCall_iiiiiid(e,t,r,i,n,a,o)}catch(e){if(ma(s),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Pt(e,t,r,i,n,a,o){var s=_a();try{return wr.dynCall_iiiiiii(e,t,r,i,n,a,o)}catch(e){if(ma(s),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Bt(e,t,r,i,n,a,o,s){var u=_a();try{return wr.dynCall_iiiiiiii(e,t,r,i,n,a,o,s)}catch(e){if(ma(u),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Ut(e,t,r,i,n,a,o,s,u){var f=_a();try{return wr.dynCall_iiiiiiiii(e,t,r,i,n,a,o,s,u)}catch(e){if(ma(f),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function jt(e,t,r,i,n,a,o,s,u,f,c){var d=_a();try{return wr.dynCall_iiiiiiiiiii(e,t,r,i,n,a,o,s,u,f,c)}catch(e){if(ma(d),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Ft(e,t,r,i,n,a,o){var s=_a();try{return wr.dynCall_iiiiij(e,t,r,i,n,a,o)}catch(e){if(ma(s),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Gt(e,t,r,i,n,a,o,s){var u=_a();try{return wr.dynCall_iiiijii(e,t,r,i,n,a,o,s)}catch(e){if(ma(u),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function zt(e,t){var r=_a();try{return wr.dynCall_ji(e,t)}catch(e){if(ma(r),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Xt(e,t,r,i){var n=_a();try{return wr.dynCall_jij(e,t,r,i)}catch(e){if(ma(n),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Ht(e){var t=_a();try{wr.dynCall_v(e)}catch(e){if(ma(t),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Vt(e,t){var r=_a();try{wr.dynCall_vi(e,t)}catch(e){if(ma(r),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Yt(e,t,r){var i=_a();try{wr.dynCall_vii(e,t,r)}catch(e){if(ma(i),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function qt(e,t,r,i){var n=_a();try{wr.dynCall_viii(e,t,r,i)}catch(e){if(ma(n),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Wt(e,t,r,i,n){var a=_a();try{wr.dynCall_viiii(e,t,r,i,n)}catch(e){if(ma(a),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Kt(e,t,r,i,n,a){var o=_a();try{wr.dynCall_viiiii(e,t,r,i,n,a)}catch(e){if(ma(o),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Qt(e,t,r,i,n,a,o){var s=_a();try{wr.dynCall_viiiiii(e,t,r,i,n,a,o)}catch(e){if(ma(s),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Zt(e,t,r,i,n,a,o,s){var u=_a();try{wr.dynCall_viiiiiii(e,t,r,i,n,a,o,s)}catch(e){if(ma(u),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function Jt(e,t,r,i,n,a,o,s,u){var f=_a();try{wr.dynCall_viiiiiiii(e,t,r,i,n,a,o,s,u)}catch(e){if(ma(f),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function $t(e,t,r,i,n,a,o,s,u,f){var c=_a();try{wr.dynCall_viiiiiiiii(e,t,r,i,n,a,o,s,u,f)}catch(e){if(ma(c),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function er(e,t,r,i,n,a,o,s,u,f,c){var d=_a();try{wr.dynCall_viiiiiiiiii(e,t,r,i,n,a,o,s,u,f,c)}catch(e){if(ma(d),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function tr(e,t,r,i,n,a){var o=_a();try{wr.dynCall_viiij(e,t,r,i,n,a)}catch(e){if(ma(o),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function rr(e,t,r,i,n,a,o){var s=_a();try{wr.dynCall_viijii(e,t,r,i,n,a,o)}catch(e){if(ma(s),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function ir(e,t,r,i){var n=_a();try{wr.dynCall_vij(e,t,r,i)}catch(e){if(ma(n),"number"!=typeof e&&"longjmp"!==e)throw e;wr.setThrew(1,0)}}function nr(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function ar(e){function t(){wr.calledRun||(wr.calledRun=!0,Zr||(H(),V(),wr.onRuntimeInitialized&&wr.onRuntimeInitialized(),p(!wr._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),Y()))}e=e||wr.arguments,Ei>0||(P(),X(),Ei>0||wr.calledRun||(wr.setStatus?(wr.setStatus("Running..."),setTimeout(function(){setTimeout(function(){wr.setStatus("")},1),t()},1)):t(),B()))}function or(e){wr.onAbort&&wr.onAbort(e),void 0!==e?(Or(e),xr(e),e=JSON.stringify(e)):e="",Zr=!0,Jr=1;var t="abort("+e+") at "+D();throw ba&&ba.forEach(function(r){t=r(t,e)}),t}function sr(e,t,r,i,n,a,o,s,u,f,c,d,l){switch(l||(l=new Uint8ClampedArray(n*a*4)),e){case 0:console.log("Chroma format not implemented yet",e,f,c,d);break;case 1:8!==f||8!==c||8!==d?console.log("Chroma format not implemented yet",e,f,c,d):ur(t,r,i,n,a,o,s,u,f,c,d,l);break;case 2:case 3:console.log("Chroma format not implemented yet",e,f,c,d);break;default:console.log("Unsupported chroma format",e,f,c,d)}return l}function ur(e,t,r,i,n,a,o,s,u,f,c,d){for(var l,h,p,m,_,b=0,y=0,v=i>>1,g=v*n,w=0,E=0,S=0,k=0;k<g;k++)_=k<<1,m=b<<1,l=1.164*(e[w+m]-16),h=t[E+b]-128,p=r[S+b]-128,d[0+(_<<2)]=l+1.596*p,d[1+(_<<2)]=l-.813*p-.391*h,d[2+(_<<2)]=l+2.018*h,d[3+(_<<2)]=255,l=1.164*(e[w+m+1]-16),d[0+(_+1<<2)]=l+1.596*p,d[1+(_+1<<2)]=l-.813*p-.391*h,d[2+(_+1<<2)]=l+2.018*h,d[3+(_+1<<2)]=255,++b===v&&(b=0,y++,w+=a,E=(y>>1)*o,S=(y>>1)*s)}function fr(e,t){te(wr,e,t);var r=wr.asm(wr.asmGlobalArg,wr.asmLibraryArg,Lr);wr.asm=r}var cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0});var dr=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),lr="function"==typeof Symbol&&"symbol"===cr(Symbol.iterator)?function(e){return void 0===e?"undefined":cr(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":cr(e)};r.compileWasmInterfaces=fr;var hr,pr=e("events"),mr=o(pr),_r=e("../core/decoding-events.js"),br=o(_r),yr=e("../core/decoding-errors.js"),vr=e("../utils/logger.js"),gr=o(vr),wr=(e("../player/player-events.js"),void 0!==wr?wr:{}),wr={print:function(e){e=Array.prototype.slice.call(arguments).join(" "),console.log(e)},printErr:function(e){e=Array.prototype.slice.call(arguments).join(" "),console.error(e)},canvas:{},noInitialRun:!0},Er={};for(hr in wr)wr.hasOwnProperty(hr)&&(Er[hr]=wr[hr]);wr.arguments=[],wr.thisProgram="./this.program",wr.quit=function(e,t){throw t},wr.preRun=[],wr.postRun=[];var Sr=!1,kr=!1,Tr=!1,Ar=!1;if(Sr="object"===("undefined"==typeof window?"undefined":lr(window)),kr="function"==typeof importScripts,Tr="object"===(void 0===i?"undefined":lr(i))&&"function"==typeof e&&!Sr&&!kr,Ar=!Sr&&!Tr&&!kr,wr.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");p(void 0===wr.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),p(void 0===wr.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),p(void 0===wr.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),p(void 0===wr.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead");var Rr="";if(Tr){Rr=a+"/";var Ir,Mr;wr.read=function(t,r){var i;return Ir||(Ir=e("fs")),Mr||(Mr=e("path")),t=Mr.normalize(t),i=Ir.readFileSync(t),r?i:i.toString()},wr.readBinary=function(e){var t=wr.read(e,!0);return t.buffer||(t=new Uint8Array(t)),p(t.buffer),t},i.argv.length>1&&(wr.thisProgram=i.argv[1].replace(/\\/g,"/")),wr.arguments=i.argv.slice(2),void 0!==t&&(t.exports=wr),i.on("uncaughtException",function(e){if(!(e instanceof nr))throw e}),i.on("unhandledRejection",function(e,t){xr("node.js exiting due to unhandled promise rejection"),i.exit(1)}),wr.quit=function(e){i.exit(e)},wr.inspect=function(){return"[Emscripten Module object]"}}else if(Ar)"undefined"!=typeof read&&(wr.read=function(e){return read(e)}),wr.readBinary=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),p("object"===(void 0===t?"undefined":lr(t))),t)},"undefined"!=typeof scriptArgs?wr.arguments=scriptArgs:void 0!==arguments&&(wr.arguments=arguments),"function"==typeof quit&&(wr.quit=function(e){quit(e)});else{if(!Sr&&!kr)throw new Error("environment detection error");Sr?document.currentScript&&(Rr=document.currentScript.src):Rr=self.location.href,Rr=0!==Rr.indexOf("blob:")?Rr.split("/").slice(0,-1).join("/")+"/":"",wr.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},kr&&(wr.readBinary=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),wr.readAsync=function(e,t,r){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=function(){if(200==i.status||0==i.status&&i.response)return void t(i.response);r()},i.onerror=r,i.send(null)},wr.setWindowTitle=function(e){document.title=e}}var Or=wr.print||("undefined"!=typeof console?console.log.bind(console):"undefined"!=typeof print?print:null),xr=wr.printErr||("undefined"!=typeof printErr?printErr:"undefined"!=typeof console&&console.warn.bind(console)||Or);for(hr in Er)Er.hasOwnProperty(hr)&&(wr[hr]=Er[hr]);Er=void 0;var Dr=16;_a=ma=pa=ha=function(){or("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Lr,Nr,Cr,Pr,Br,Ur,jr,Fr,Gr,zr,Xr,Hr,Vr,Yr,qr,Wr,Kr,Qr={"f64-rem":function(e,t){return e%t},debugger:function(){}},Zr=(new Array(0),0),Jr=0,$r={stackSave:function(){_a()},stackRestore:function(){ma()},arrayToC:function(e){var t=pa(e.length);return K(e,t),t},stringToC:function(e){var t=0;if(null!==e&&void 0!==e&&0!==e){var r=1+(e.length<<2);t=pa(r),A(e,t,r)}return t}},ei={string:$r.stringToC,array:$r.arrayToC},ti=0,ri=2,ii=4,ni="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ai=("undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le"),65536),oi=16777216,si=16777216;zr=Xr=Vr=Yr=qr=Wr=Kr=0,Hr=!1,wr.reallocBuffer||(wr.reallocBuffer=function(e){var t;try{if(ArrayBuffer.transfer)t=ArrayBuffer.transfer(Lr,e);else{var r=Nr;t=new ArrayBuffer(e);new Int8Array(t).set(r)}}catch(e){return!1}return!!ca(t)&&t});var ui;try{ui=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),ui(new ArrayBuffer(4))}catch(e){ui=function(e){return e.byteLength}}var fi=wr.TOTAL_STACK||5242880,ci=wr.TOTAL_MEMORY||104857600;if(ci<fi&&xr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+ci+"! (TOTAL_STACK="+fi+")"),p("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),wr.buffer?(Lr=wr.buffer,p(Lr.byteLength===ci,"provided buffer should be "+ci+" bytes, but it is "+Lr.byteLength)):("object"===("undefined"==typeof WebAssembly?"undefined":lr(WebAssembly))&&"function"==typeof WebAssembly.Memory?(p(ci%ai==0),wr.wasmMemory=new WebAssembly.Memory({initial:ci/ai}),Lr=wr.wasmMemory.buffer):Lr=new ArrayBuffer(ci),p(Lr.byteLength===ci),wr.buffer=Lr),C(),Ur[0]=1668509029,Pr[1]=25459,115!==Cr[2]||99!==Cr[3])throw"Runtime error: expected the system to be little-endian!";var di=[],li=[],hi=[],pi=[],mi=[],_i=!1,bi=!1;p(Math.imul&&Math.fround&&Math.clz32&&Math.trunc,"this is a legacy browser, build with LEGACY_VM_SUPPORT");var yi=Math.abs,vi=(Math.cos,Math.sin,Math.tan,Math.acos,Math.asin,Math.atan,Math.atan2,Math.exp,Math.log,Math.sqrt,Math.ceil),gi=Math.floor,wi=(Math.pow,Math.imul,Math.fround,Math.round,Math.min),Ei=(Math.max,Math.clz32,Math.trunc,0),Si=null,ki=null,Ti={};wr.preloadedImages={},wr.preloadedAudios={};var Ai="data:application/octet-stream;base64,";zr=1024,Xr=zr+99520;wr.STATIC_BASE=zr,wr.STATIC_BUMP=99520;var Ri=Xr;Xr+=16,p(Ri%8==0);var Ii={},Mi={last:0,caught:[],infos:{},deAdjust:function(e){if(!e||Mi.infos[e])return e;for(var t in Mi.infos){var r=+t;if(Mi.infos[r].adjusted===e)return r}return e},addRef:function(e){if(e){Mi.infos[e].refcount++}},decRef:function(e){if(e){var t=Mi.infos[e];p(t.refcount>0),t.refcount--,0!==t.refcount||t.rethrown||(t.destructor&&wr.dynCall_vi(t.destructor,e),delete Mi.infos[e],___cxa_free_exception(e))}},clearRef:function(e){if(e){Mi.infos[e].refcount=0}}},Oi={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86},xi={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can   access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"},Di={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return e=Di.normalizeArray(e.split("/").filter(function(e){return!!e}),!t).join("/"),e||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=Di.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:function(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return Di.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return Di.normalize(e.join("/"))},join2:function(e,t){return Di.normalize(e+"/"+t)},resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:Ui.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t="/"===i.charAt(0)}return e=Di.normalizeArray(e.split("/").filter(function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."},relative:function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=Di.resolve(e).substr(1),t=Di.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),a=Math.min(i.length,n.length),o=a,s=0;s<a;s++)if(i[s]!==n[s]){o=s;break}for(var u=[],s=o;s<i.length;s++)u.push("..");return u=u.concat(n.slice(o)),u.join("/")}},Li={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){Li.ttys[e]={input:[],output:[],ops:t},Ui.registerDevice(e,Li.stream_ops)},stream_ops:{open:function(e){var t=Li.ttys[e.node.rdev];if(!t)throw new Ui.ErrnoError(Oi.ENODEV);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,i,n){if(!e.tty||!e.tty.ops.get_char)throw new Ui.ErrnoError(Oi.ENXIO);for(var a=0,o=0;o<i;o++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new Ui.ErrnoError(Oi.EIO)}if(void 0===s&&0===a)throw new Ui.ErrnoError(Oi.EAGAIN);if(null===s||void 0===s)break;a++,t[r+o]=s}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,i,n){if(!e.tty||!e.tty.ops.put_char)throw new Ui.ErrnoError(Oi.ENXIO);for(var a=0;a<i;a++)try{e.tty.ops.put_char(e.tty,t[r+a])}catch(e){throw new Ui.ErrnoError(Oi.EIO)}return i&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if(Tr){var r=new n(256),a=0,o="win32"!=i.platform,s=i.stdin.fd;if(o){var u=!1;try{s=Vi.openSync("/dev/stdin","r"),u=!0}catch(e){}}try{a=Vi.readSync(s,r,0,256,null)}catch(e){if(-1==e.toString().indexOf("EOF"))throw e;a=0}u&&Vi.closeSync(s),t=a>0?r.slice(0,a).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=$e(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(Or(S(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(Or(S(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(xr(S(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(xr(S(e.output,0)),e.output=[])}}},Ni={ops_table:null,mount:function(e){return Ni.createNode(null,"/",16895,0)},createNode:function(e,t,r,i){if(Ui.isBlkdev(r)||Ui.isFIFO(r))throw new Ui.ErrnoError(Oi.EPERM);Ni.ops_table||(Ni.ops_table={dir:{node:{getattr:Ni.node_ops.getattr,setattr:Ni.node_ops.setattr,lookup:Ni.node_ops.lookup,mknod:Ni.node_ops.mknod,rename:Ni.node_ops.rename,unlink:Ni.node_ops.unlink,rmdir:Ni.node_ops.rmdir,readdir:Ni.node_ops.readdir,symlink:Ni.node_ops.symlink},stream:{llseek:Ni.stream_ops.llseek}},file:{node:{getattr:Ni.node_ops.getattr,setattr:Ni.node_ops.setattr},stream:{llseek:Ni.stream_ops.llseek,read:Ni.stream_ops.read,write:Ni.stream_ops.write,allocate:Ni.stream_ops.allocate,mmap:Ni.stream_ops.mmap,msync:Ni.stream_ops.msync}},link:{node:{getattr:Ni.node_ops.getattr,setattr:Ni.node_ops.setattr,readlink:Ni.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Ni.node_ops.getattr,setattr:Ni.node_ops.setattr},stream:Ui.chrdev_stream_ops}});var n=Ui.createNode(e,t,r,i);return Ui.isDir(n.mode)?(n.node_ops=Ni.ops_table.dir.node,n.stream_ops=Ni.ops_table.dir.stream,n.contents={}):Ui.isFile(n.mode)?(n.node_ops=Ni.ops_table.file.node,n.stream_ops=Ni.ops_table.file.stream,n.usedBytes=0,n.contents=null):Ui.isLink(n.mode)?(n.node_ops=Ni.ops_table.link.node,n.stream_ops=Ni.ops_table.link.stream):Ui.isChrdev(n.mode)&&(n.node_ops=Ni.ops_table.chrdev.node,n.stream_ops=Ni.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n),n},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var t=[],r=0;r<e.usedBytes;++r)t.push(e.contents[r]);return t}return e.contents},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array},expandFileStorage:function(e,t){if(e.contents&&e.contents.subarray&&t>e.contents.length&&(e.contents=Ni.getFileDataAsRegularArray(e),
    18  e.usedBytes=e.contents.length),!e.contents||e.contents.subarray){var r=e.contents?e.contents.length:0;if(r>=t)return;t=Math.max(t,r*(r<1048576?2:1.125)|0),0!=r&&(t=Math.max(t,256));var i=e.contents;return e.contents=new Uint8Array(t),void(e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0))}for(!e.contents&&t>0&&(e.contents=[]);e.contents.length<t;)e.contents.push(0)},resizeFileStorage:function(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var r=e.contents;return e.contents=new Uint8Array(new ArrayBuffer(t)),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),void(e.usedBytes=t)}if(e.contents||(e.contents=[]),e.contents.length>t)e.contents.length=t;else for(;e.contents.length<t;)e.contents.push(0);e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=Ui.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Ui.isDir(e.mode)?t.size=4096:Ui.isFile(e.mode)?t.size=e.usedBytes:Ui.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&Ni.resizeFileStorage(e,t.size)},lookup:function(e,t){throw Ui.genericErrors[Oi.ENOENT]},mknod:function(e,t,r,i){return Ni.createNode(e,t,r,i)},rename:function(e,t,r){if(Ui.isDir(e.mode)){var i;try{i=Ui.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new Ui.ErrnoError(Oi.ENOTEMPTY)}delete e.parent.contents[e.name],e.name=r,t.contents[r]=e,e.parent=t},unlink:function(e,t){delete e.contents[t]},rmdir:function(e,t){var r=Ui.lookupNode(e,t);for(var i in r.contents)throw new Ui.ErrnoError(Oi.ENOTEMPTY);delete e.contents[t]},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var i=Ni.createNode(e,t,41471,0);return i.link=r,i},readlink:function(e){if(!Ui.isLink(e.mode))throw new Ui.ErrnoError(Oi.EINVAL);return e.link}},stream_ops:{read:function(e,t,r,i,n){var a=e.node.contents;if(n>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-n,i);if(p(o>=0),o>8&&a.subarray)t.set(a.subarray(n,n+o),r);else for(var s=0;s<o;s++)t[r+s]=a[n+s];return o},write:function(e,t,r,i,n,a){if(!i)return 0;var o=e.node;if(o.timestamp=Date.now(),t.subarray&&(!o.contents||o.contents.subarray)){if(a)return p(0===n,"canOwn must imply no weird position inside the file"),o.contents=t.subarray(r,r+i),o.usedBytes=i,i;if(0===o.usedBytes&&0===n)return o.contents=new Uint8Array(t.subarray(r,r+i)),o.usedBytes=i,i;if(n+i<=o.usedBytes)return o.contents.set(t.subarray(r,r+i),n),i}if(Ni.expandFileStorage(o,n+i),o.contents.subarray&&t.subarray)o.contents.set(t.subarray(r,r+i),n);else for(var s=0;s<i;s++)o.contents[n+s]=t[r+s];return o.usedBytes=Math.max(o.usedBytes,n+i),i},llseek:function(e,t,r){var i=t;if(1===r?i+=e.position:2===r&&Ui.isFile(e.node.mode)&&(i+=e.node.usedBytes),i<0)throw new Ui.ErrnoError(Oi.EINVAL);return i},allocate:function(e,t,r){Ni.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,i,n,a,o){if(!Ui.isFile(e.node.mode))throw new Ui.ErrnoError(Oi.ENODEV);var s,u,f=e.node.contents;if(2&o||f.buffer!==t&&f.buffer!==t.buffer){if((n>0||n+i<e.node.usedBytes)&&(f=f.subarray?f.subarray(n,n+i):Array.prototype.slice.call(f,n,n+i)),u=!0,!(s=la(i)))throw new Ui.ErrnoError(Oi.ENOMEM);t.set(f,s)}else u=!1,s=f.byteOffset;return{ptr:s,allocated:u}},msync:function(e,t,r,i,n){if(!Ui.isFile(e.node.mode))throw new Ui.ErrnoError(Oi.ENODEV);if(2&n)return 0;Ni.stream_ops.write(e,t,0,i,r,!1);return 0}}},Ci={dbs:{},indexedDB:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){if("undefined"!=typeof indexedDB)return indexedDB;var e=null;return"object"===("undefined"==typeof window?"undefined":lr(window))&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),p(e,"IDBFS used, but indexedDB not supported"),e}),DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(e){return Ni.mount.apply(null,arguments)},syncfs:function(e,t,r){Ci.getLocalSet(e,function(i,n){if(i)return r(i);Ci.getRemoteSet(e,function(e,i){if(e)return r(e);var a=t?i:n,o=t?n:i;Ci.reconcile(a,o,r)})})},getDB:function(e,t){var r=Ci.dbs[e];if(r)return t(null,r);var i;try{i=Ci.indexedDB().open(e,Ci.DB_VERSION)}catch(e){return t(e)}if(!i)return t("Unable to connect to IndexedDB");i.onupgradeneeded=function(e){var t,r=e.target.result,i=e.target.transaction;t=r.objectStoreNames.contains(Ci.DB_STORE_NAME)?i.objectStore(Ci.DB_STORE_NAME):r.createObjectStore(Ci.DB_STORE_NAME),t.indexNames.contains("timestamp")||t.createIndex("timestamp","timestamp",{unique:!1})},i.onsuccess=function(){r=i.result,Ci.dbs[e]=r,t(null,r)},i.onerror=function(e){t(this.error),e.preventDefault()}},getLocalSet:function(e,t){function r(e){return"."!==e&&".."!==e}function i(e){return function(t){return Di.join2(e,t)}}for(var n={},a=Ui.readdir(e.mountpoint).filter(r).map(i(e.mountpoint));a.length;){var o,s=a.pop();try{o=Ui.stat(s)}catch(e){return t(e)}Ui.isDir(o.mode)&&a.push.apply(a,Ui.readdir(s).filter(r).map(i(s))),n[s]={timestamp:o.mtime}}return t(null,{type:"local",entries:n})},getRemoteSet:function(e,t){var r={};Ci.getDB(e.mountpoint,function(e,i){if(e)return t(e);try{var n=i.transaction([Ci.DB_STORE_NAME],"readonly");n.onerror=function(e){t(this.error),e.preventDefault()};n.objectStore(Ci.DB_STORE_NAME).index("timestamp").openKeyCursor().onsuccess=function(e){var n=e.target.result;if(!n)return t(null,{type:"remote",db:i,entries:r});r[n.primaryKey]={timestamp:n.key},n.continue()}}catch(e){return t(e)}})},loadLocalEntry:function(e,t){var r,i;try{i=Ui.lookupPath(e).node,r=Ui.stat(e)}catch(e){return t(e)}return Ui.isDir(r.mode)?t(null,{timestamp:r.mtime,mode:r.mode}):Ui.isFile(r.mode)?(i.contents=Ni.getFileDataAsTypedArray(i),t(null,{timestamp:r.mtime,mode:r.mode,contents:i.contents})):t(new Error("node type not supported"))},storeLocalEntry:function(e,t,r){try{if(Ui.isDir(t.mode))Ui.mkdir(e,t.mode);else{if(!Ui.isFile(t.mode))return r(new Error("node type not supported"));Ui.writeFile(e,t.contents,{canOwn:!0})}Ui.chmod(e,t.mode),Ui.utime(e,t.timestamp,t.timestamp)}catch(e){return r(e)}r(null)},removeLocalEntry:function(e,t){try{var r=(Ui.lookupPath(e),Ui.stat(e));Ui.isDir(r.mode)?Ui.rmdir(e):Ui.isFile(r.mode)&&Ui.unlink(e)}catch(e){return t(e)}t(null)},loadRemoteEntry:function(e,t,r){var i=e.get(t);i.onsuccess=function(e){r(null,e.target.result)},i.onerror=function(e){r(this.error),e.preventDefault()}},storeRemoteEntry:function(e,t,r,i){var n=e.put(r,t);n.onsuccess=function(){i(null)},n.onerror=function(e){i(this.error),e.preventDefault()}},removeRemoteEntry:function(e,t,r){var i=e.delete(t);i.onsuccess=function(){r(null)},i.onerror=function(e){r(this.error),e.preventDefault()}},reconcile:function(e,t,r){function i(e){if(e){if(!i.errored)return i.errored=!0,r(e)}else if(++s>=n)return r(null)}var n=0,a=[];Object.keys(e.entries).forEach(function(r){var i=e.entries[r],o=t.entries[r];(!o||i.timestamp>o.timestamp)&&(a.push(r),n++)});var o=[];if(Object.keys(t.entries).forEach(function(r){t.entries[r];e.entries[r]||(o.push(r),n++)}),!n)return r(null);var s=0,u="remote"===e.type?e.db:t.db,f=u.transaction([Ci.DB_STORE_NAME],"readwrite"),c=f.objectStore(Ci.DB_STORE_NAME);f.onerror=function(e){i(this.error),e.preventDefault()},a.sort().forEach(function(e){"local"===t.type?Ci.loadRemoteEntry(c,e,function(t,r){if(t)return i(t);Ci.storeLocalEntry(e,r,i)}):Ci.loadLocalEntry(e,function(t,r){if(t)return i(t);Ci.storeRemoteEntry(c,e,r,i)})}),o.sort().reverse().forEach(function(e){"local"===t.type?Ci.removeLocalEntry(e,i):Ci.removeRemoteEntry(c,e,i)})}},Pi={isWindows:!1,staticInit:function(){Pi.isWindows=!!i.platform.match(/^win/);var e=i.binding("constants");e.fs&&(e=e.fs),Pi.flagsForNodeMap={1024:e.O_APPEND,64:e.O_CREAT,128:e.O_EXCL,0:e.O_RDONLY,2:e.O_RDWR,4096:e.O_SYNC,512:e.O_TRUNC,1:e.O_WRONLY}},bufferFrom:function(e){return n.alloc?n.from(e):new n(e)},mount:function(e){return p(Tr),Pi.createNode(null,"/",Pi.getMode(e.opts.root),0)},createNode:function(e,t,r,i){if(!Ui.isDir(r)&&!Ui.isFile(r)&&!Ui.isLink(r))throw new Ui.ErrnoError(Oi.EINVAL);var n=Ui.createNode(e,t,r);return n.node_ops=Pi.node_ops,n.stream_ops=Pi.stream_ops,n},getMode:function(e){var t;try{t=Vi.lstatSync(e),Pi.isWindows&&(t.mode=t.mode|(292&t.mode)>>2)}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}return t.mode},realPath:function(e){for(var t=[];e.parent!==e;)t.push(e.name),e=e.parent;return t.push(e.mount.opts.root),t.reverse(),Di.join.apply(null,t)},flagsForNode:function(e){e&=-2097153,e&=-2049,e&=-32769,e&=-524289;var t=0;for(var r in Pi.flagsForNodeMap)e&r&&(t|=Pi.flagsForNodeMap[r],e^=r);if(e)throw new Ui.ErrnoError(Oi.EINVAL);return t},node_ops:{getattr:function(e){var t,r=Pi.realPath(e);try{t=Vi.lstatSync(r)}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}return Pi.isWindows&&!t.blksize&&(t.blksize=4096),Pi.isWindows&&!t.blocks&&(t.blocks=(t.size+t.blksize-1)/t.blksize|0),{dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,size:t.size,atime:t.atime,mtime:t.mtime,ctime:t.ctime,blksize:t.blksize,blocks:t.blocks}},setattr:function(e,t){var r=Pi.realPath(e);try{if(void 0!==t.mode&&(Vi.chmodSync(r,t.mode),e.mode=t.mode),void 0!==t.timestamp){var i=new Date(t.timestamp);Vi.utimesSync(r,i,i)}void 0!==t.size&&Vi.truncateSync(r,t.size)}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}},lookup:function(e,t){var r=Di.join2(Pi.realPath(e),t),i=Pi.getMode(r);return Pi.createNode(e,t,i)},mknod:function(e,t,r,i){var n=Pi.createNode(e,t,r,i),a=Pi.realPath(n);try{Ui.isDir(n.mode)?Vi.mkdirSync(a,n.mode):Vi.writeFileSync(a,"",{mode:n.mode})}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}return n},rename:function(e,t,r){var i=Pi.realPath(e),n=Di.join2(Pi.realPath(t),r);try{Vi.renameSync(i,n)}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}},unlink:function(e,t){var r=Di.join2(Pi.realPath(e),t);try{Vi.unlinkSync(r)}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}},rmdir:function(e,t){var r=Di.join2(Pi.realPath(e),t);try{Vi.rmdirSync(r)}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}},readdir:function(e){var t=Pi.realPath(e);try{return Vi.readdirSync(t)}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}},symlink:function(e,t,r){var i=Di.join2(Pi.realPath(e),t);try{Vi.symlinkSync(r,i)}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}},readlink:function(e){var t=Pi.realPath(e);try{return t=Vi.readlinkSync(t),t=Yi.relative(Yi.resolve(e.mount.opts.root),t)}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}}},stream_ops:{open:function(e){var t=Pi.realPath(e.node);try{Ui.isFile(e.node.mode)&&(e.nfd=Vi.openSync(t,Pi.flagsForNode(e.flags)))}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}},close:function(e){try{Ui.isFile(e.node.mode)&&e.nfd&&Vi.closeSync(e.nfd)}catch(e){if(!e.code)throw e;throw new Ui.ErrnoError(Oi[e.code])}},read:function(e,t,r,i,n){if(0===i)return 0;try{return Vi.readSync(e.nfd,Pi.bufferFrom(t.buffer),r,i,n)}catch(e){throw new Ui.ErrnoError(Oi[e.code])}},write:function(e,t,r,i,n){try{return Vi.writeSync(e.nfd,Pi.bufferFrom(t.buffer),r,i,n)}catch(e){throw new Ui.ErrnoError(Oi[e.code])}},llseek:function(e,t,r){var i=t;if(1===r)i+=e.position;else if(2===r&&Ui.isFile(e.node.mode))try{var n=Vi.fstatSync(e.nfd);i+=n.size}catch(e){throw new Ui.ErrnoError(Oi[e.code])}if(i<0)throw new Ui.ErrnoError(Oi.EINVAL);return i}}},Bi={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(e){function t(e){for(var t=e.split("/"),r=i,a=0;a<t.length-1;a++){var o=t.slice(0,a+1).join("/");n[o]||(n[o]=Bi.createNode(r,t[a],Bi.DIR_MODE,0)),r=n[o]}return r}function r(e){var t=e.split("/");return t[t.length-1]}p(kr),Bi.reader||(Bi.reader=new FileReaderSync);var i=Bi.createNode(null,"/",Bi.DIR_MODE,0),n={};return Array.prototype.forEach.call(e.opts.files||[],function(e){Bi.createNode(t(e.name),r(e.name),Bi.FILE_MODE,0,e,e.lastModifiedDate)}),(e.opts.blobs||[]).forEach(function(e){Bi.createNode(t(e.name),r(e.name),Bi.FILE_MODE,0,e.data)}),(e.opts.packages||[]).forEach(function(e){e.metadata.files.forEach(function(i){var n=i.filename.substr(1);Bi.createNode(t(n),r(n),Bi.FILE_MODE,0,e.blob.slice(i.start,i.end))})}),i},createNode:function(e,t,r,i,n,a){var o=Ui.createNode(e,t,r);return o.mode=r,o.node_ops=Bi.node_ops,o.stream_ops=Bi.stream_ops,o.timestamp=(a||new Date).getTime(),p(Bi.FILE_MODE!==Bi.DIR_MODE),r===Bi.FILE_MODE?(o.size=n.size,o.contents=n):(o.size=4096,o.contents={}),e&&(e.contents[t]=o),o},node_ops:{getattr:function(e){return{dev:1,ino:void 0,mode:e.mode,nlink:1,uid:0,gid:0,rdev:void 0,size:e.size,atime:new Date(e.timestamp),mtime:new Date(e.timestamp),ctime:new Date(e.timestamp),blksize:4096,blocks:Math.ceil(e.size/4096)}},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp)},lookup:function(e,t){throw new Ui.ErrnoError(Oi.ENOENT)},mknod:function(e,t,r,i){throw new Ui.ErrnoError(Oi.EPERM)},rename:function(e,t,r){throw new Ui.ErrnoError(Oi.EPERM)},unlink:function(e,t){throw new Ui.ErrnoError(Oi.EPERM)},rmdir:function(e,t){throw new Ui.ErrnoError(Oi.EPERM)},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){throw new Ui.ErrnoError(Oi.EPERM)},readlink:function(e){throw new Ui.ErrnoError(Oi.EPERM)}},stream_ops:{read:function(e,t,r,i,n){if(n>=e.node.size)return 0;var a=e.node.contents.slice(n,n+i),o=Bi.reader.readAsArrayBuffer(a);return t.set(new Uint8Array(o),r),a.size},write:function(e,t,r,i,n){throw new Ui.ErrnoError(Oi.EIO)},llseek:function(e,t,r){var i=t;if(1===r?i+=e.position:2===r&&Ui.isFile(e.node.mode)&&(i+=e.node.size),i<0)throw new Ui.ErrnoError(Oi.EINVAL);return i}}};Xr+=16;Xr+=16;Xr+=16;var Ui={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e){if(!(e instanceof Ui.ErrnoError))throw e+" : "+D();return le(e.errno)},lookupPath:function(e,t){if(e=Di.resolve(Ui.cwd(),e),t=t||{},!e)return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var i in r)void 0===t[i]&&(t[i]=r[i]);if(t.recurse_count>8)throw new Ui.ErrnoError(Oi.ELOOP);for(var n=Di.normalizeArray(e.split("/").filter(function(e){return!!e}),!1),a=Ui.root,o="/",s=0;s<n.length;s++){var u=s===n.length-1;if(u&&t.parent)break;if(a=Ui.lookupNode(a,n[s]),o=Di.join2(o,n[s]),Ui.isMountpoint(a)&&(!u||u&&t.follow_mount)&&(a=a.mounted.root),!u||t.follow)for(var f=0;Ui.isLink(a.mode);){var c=Ui.readlink(o);o=Di.resolve(Di.dirname(o),c);var d=Ui.lookupPath(o,{recurse_count:t.recurse_count});if(a=d.node,f++>40)throw new Ui.ErrnoError(Oi.ELOOP)}}return{path:o,node:a}},getPath:function(e){for(var t;;){if(Ui.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%Ui.nameTable.length},hashAddNode:function(e){var t=Ui.hashName(e.parent.id,e.name);e.name_next=Ui.nameTable[t],Ui.nameTable[t]=e},hashRemoveNode:function(e){var t=Ui.hashName(e.parent.id,e.name);if(Ui.nameTable[t]===e)Ui.nameTable[t]=e.name_next;else for(var r=Ui.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:function(e,t){var r=Ui.mayLookup(e);if(r)throw new Ui.ErrnoError(r,e);for(var i=Ui.hashName(e.id,t),n=Ui.nameTable[i];n;n=n.name_next){var a=n.name;if(n.parent.id===e.id&&a===t)return n}return Ui.lookup(e,t)},createNode:function(e,t,r,i){if(!Ui.FSNode){Ui.FSNode=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ui.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Ui.FSNode.prototype={};Object.defineProperties(Ui.FSNode.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return Ui.isDir(this.mode)}},isDevice:{get:function(){return Ui.isChrdev(this.mode)}}})}var n=new Ui.FSNode(e,t,r,i);return Ui.hashAddNode(n),n},destroyNode:function(e){Ui.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(e){var t=Ui.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return Ui.ignorePermissions?0:(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:Oi.EACCES},mayLookup:function(e){var t=Ui.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:Oi.EACCES)},mayCreate:function(e,t){try{Ui.lookupNode(e,t);return Oi.EEXIST}catch(e){}return Ui.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var i;try{i=Ui.lookupNode(e,t)}catch(e){return e.errno}var n=Ui.nodePermissions(e,"wx");if(n)return n;if(r){if(!Ui.isDir(i.mode))return Oi.ENOTDIR;if(Ui.isRoot(i)||Ui.getPath(i)===Ui.cwd())return Oi.EBUSY}else if(Ui.isDir(i.mode))return Oi.EISDIR;return 0},mayOpen:function(e,t){return e?Ui.isLink(e.mode)?Oi.ELOOP:Ui.isDir(e.mode)&&("r"!==Ui.flagsToPermissionString(t)||512&t)?Oi.EISDIR:Ui.nodePermissions(e,Ui.flagsToPermissionString(t)):Oi.ENOENT},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||Ui.MAX_OPEN_FDS;for(var r=e;r<=t;r++)if(!Ui.streams[r])return r;throw new Ui.ErrnoError(Oi.EMFILE)},getStream:function(e){return Ui.streams[e]},createStream:function(e,t,r){Ui.FSStream||(Ui.FSStream=function(){},Ui.FSStream.prototype={},Object.defineProperties(Ui.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}));var i=new Ui.FSStream;for(var n in e)i[n]=e[n];e=i;var a=Ui.nextfd(t,r);return e.fd=a,Ui.streams[a]=e,e},closeStream:function(e){Ui.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=Ui.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new Ui.ErrnoError(Oi.ESPIPE)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){Ui.devices[e]={stream_ops:t}},getDevice:function(e){return Ui.devices[e]},getMounts:function(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs:function(e,t){function r(e){return p(Ui.syncFSRequests>0),Ui.syncFSRequests--,t(e)}function i(e){if(e){if(!i.errored)return i.errored=!0,r(e)}else++a>=n.length&&r(null)}"function"==typeof e&&(t=e,e=!1),++Ui.syncFSRequests>1&&console.log("warning: "+Ui.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var n=Ui.getMounts(Ui.root.mount),a=0;n.forEach(function(t){if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)})},mount:function(e,t,r){var i,n="/"===r,a=!r;if(n&&Ui.root)throw new Ui.ErrnoError(Oi.EBUSY);if(!n&&!a){var o=Ui.lookupPath(r,{follow_mount:!1});if(r=o.path,i=o.node,Ui.isMountpoint(i))throw new Ui.ErrnoError(Oi.EBUSY);if(!Ui.isDir(i.mode))throw new Ui.ErrnoError(Oi.ENOTDIR)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,n?Ui.root=u:i&&(i.mounted=s,i.mount&&i.mount.mounts.push(s)),u},unmount:function(e){var t=Ui.lookupPath(e,{follow_mount:!1});if(!Ui.isMountpoint(t.node))throw new Ui.ErrnoError(Oi.EINVAL);var r=t.node,i=r.mounted,n=Ui.getMounts(i);Object.keys(Ui.nameTable).forEach(function(e){for(var t=Ui.nameTable[e];t;){var r=t.name_next;-1!==n.indexOf(t.mount)&&Ui.destroyNode(t),t=r}}),r.mounted=null;var a=r.mount.mounts.indexOf(i);p(-1!==a),r.mount.mounts.splice(a,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,r){var i=Ui.lookupPath(e,{parent:!0}),n=i.node,a=Di.basename(e);if(!a||"."===a||".."===a)throw new Ui.ErrnoError(Oi.EINVAL);var o=Ui.mayCreate(n,a);if(o)throw new Ui.ErrnoError(o);if(!n.node_ops.mknod)throw new Ui.ErrnoError(Oi.EPERM);return n.node_ops.mknod(n,a,t,r)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Ui.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Ui.mknod(e,t,0)},mkdirTree:function(e,t){for(var r=e.split("/"),i="",n=0;n<r.length;++n)if(r[n]){i+="/"+r[n];try{Ui.mkdir(i,t)}catch(e){if(e.errno!=Oi.EEXIST)throw e}}},mkdev:function(e,t,r){return void 0===r&&(r=t,t=438),t|=8192,Ui.mknod(e,t,r)},symlink:function(e,t){if(!Di.resolve(e))throw new Ui.ErrnoError(Oi.ENOENT);var r=Ui.lookupPath(t,{parent:!0}),i=r.node;if(!i)throw new Ui.ErrnoError(Oi.ENOENT);var n=Di.basename(t),a=Ui.mayCreate(i,n);if(a)throw new Ui.ErrnoError(a);if(!i.node_ops.symlink)throw new Ui.ErrnoError(Oi.EPERM);return i.node_ops.symlink(i,n,e)},rename:function(e,t){var r,i,n,a=Di.dirname(e),o=Di.dirname(t),s=Di.basename(e),u=Di.basename(t);try{r=Ui.lookupPath(e,{parent:!0}),i=r.node,r=Ui.lookupPath(t,{parent:!0}),n=r.node}catch(e){throw new Ui.ErrnoError(Oi.EBUSY)}if(!i||!n)throw new Ui.ErrnoError(Oi.ENOENT);if(i.mount!==n.mount)throw new Ui.ErrnoError(Oi.EXDEV);var f=Ui.lookupNode(i,s),c=Di.relative(e,o);if("."!==c.charAt(0))throw new Ui.ErrnoError(Oi.EINVAL);if(c=Di.relative(t,a),"."!==c.charAt(0))throw new Ui.ErrnoError(Oi.ENOTEMPTY);var d;try{d=Ui.lookupNode(n,u)}catch(e){}if(f!==d){var l=Ui.isDir(f.mode),h=Ui.mayDelete(i,s,l);if(h)throw new Ui.ErrnoError(h);if(h=d?Ui.mayDelete(n,u,l):Ui.mayCreate(n,u))throw new Ui.ErrnoError(h);if(!i.node_ops.rename)throw new Ui.ErrnoError(Oi.EPERM);if(Ui.isMountpoint(f)||d&&Ui.isMountpoint(d))throw new Ui.ErrnoError(Oi.EBUSY);if(n!==i&&(h=Ui.nodePermissions(i,"w")))throw new Ui.ErrnoError(h);try{Ui.trackingDelegate.willMovePath&&Ui.trackingDelegate.willMovePath(e,t)}catch(r){console.log("FS.trackingDelegate['willMovePath']('"+e+"', '"+t+"') threw an exception: "+r.message)}Ui.hashRemoveNode(f);try{i.node_ops.rename(f,n,u)}catch(e){throw e}finally{Ui.hashAddNode(f)}try{Ui.trackingDelegate.onMovePath&&Ui.trackingDelegate.onMovePath(e,t)}catch(r){console.log("FS.trackingDelegate['onMovePath']('"+e+"', '"+t+"') threw an exception: "+r.message)}}},rmdir:function(e){var t=Ui.lookupPath(e,{parent:!0}),r=t.node,i=Di.basename(e),n=Ui.lookupNode(r,i),a=Ui.mayDelete(r,i,!0);if(a)throw new Ui.ErrnoError(a);if(!r.node_ops.rmdir)throw new Ui.ErrnoError(Oi.EPERM);if(Ui.isMountpoint(n))throw new Ui.ErrnoError(Oi.EBUSY);try{Ui.trackingDelegate.willDeletePath&&Ui.trackingDelegate.willDeletePath(e)}catch(t){console.log("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}r.node_ops.rmdir(r,i),Ui.destroyNode(n);try{Ui.trackingDelegate.onDeletePath&&Ui.trackingDelegate.onDeletePath(e)}catch(t){console.log("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}},readdir:function(e){var t=Ui.lookupPath(e,{follow:!0}),r=t.node;if(!r.node_ops.readdir)throw new Ui.ErrnoError(Oi.ENOTDIR);return r.node_ops.readdir(r)},unlink:function(e){var t=Ui.lookupPath(e,{parent:!0}),r=t.node,i=Di.basename(e),n=Ui.lookupNode(r,i),a=Ui.mayDelete(r,i,!1);if(a)throw new Ui.ErrnoError(a);if(!r.node_ops.unlink)throw new Ui.ErrnoError(Oi.EPERM);if(Ui.isMountpoint(n))throw new Ui.ErrnoError(Oi.EBUSY);try{Ui.trackingDelegate.willDeletePath&&Ui.trackingDelegate.willDeletePath(e)}catch(t){console.log("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}r.node_ops.unlink(r,i),Ui.destroyNode(n);try{Ui.trackingDelegate.onDeletePath&&Ui.trackingDelegate.onDeletePath(e)}catch(t){console.log("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}},readlink:function(e){var t=Ui.lookupPath(e),r=t.node;if(!r)throw new Ui.ErrnoError(Oi.ENOENT);if(!r.node_ops.readlink)throw new Ui.ErrnoError(Oi.EINVAL);return Di.resolve(Ui.getPath(r.parent),r.node_ops.readlink(r))},stat:function(e,t){var r=Ui.lookupPath(e,{follow:!t}),i=r.node;if(!i)throw new Ui.ErrnoError(Oi.ENOENT);if(!i.node_ops.getattr)throw new Ui.ErrnoError(Oi.EPERM);return i.node_ops.getattr(i)},lstat:function(e){return Ui.stat(e,!0)},chmod:function(e,t,r){var i;if("string"==typeof e){i=Ui.lookupPath(e,{follow:!r}).node}else i=e;if(!i.node_ops.setattr)throw new Ui.ErrnoError(Oi.EPERM);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod:function(e,t){Ui.chmod(e,t,!0)},fchmod:function(e,t){var r=Ui.getStream(e);if(!r)throw new Ui.ErrnoError(Oi.EBADF);Ui.chmod(r.node,t)},chown:function(e,t,r,i){var n;if("string"==typeof e){n=Ui.lookupPath(e,{follow:!i}).node}else n=e;if(!n.node_ops.setattr)throw new Ui.ErrnoError(Oi.EPERM);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown:function(e,t,r){Ui.chown(e,t,r,!0)},fchown:function(e,t,r){var i=Ui.getStream(e);if(!i)throw new Ui.ErrnoError(Oi.EBADF);Ui.chown(i.node,t,r)},truncate:function(e,t){if(t<0)throw new Ui.ErrnoError(Oi.EINVAL);var r;if("string"==typeof e){r=Ui.lookupPath(e,{follow:!0}).node}else r=e;if(!r.node_ops.setattr)throw new Ui.ErrnoError(Oi.EPERM);if(Ui.isDir(r.mode))throw new Ui.ErrnoError(Oi.EISDIR);if(!Ui.isFile(r.mode))throw new Ui.ErrnoError(Oi.EINVAL);var i=Ui.nodePermissions(r,"w");if(i)throw new Ui.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:function(e,t){var r=Ui.getStream(e);if(!r)throw new Ui.ErrnoError(Oi.EBADF);if(0==(2097155&r.flags))throw new Ui.ErrnoError(Oi.EINVAL);Ui.truncate(r.node,t)},utime:function(e,t,r){var i=Ui.lookupPath(e,{follow:!0}),n=i.node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:function(e,t,r,i,n){if(""===e)throw new Ui.ErrnoError(Oi.ENOENT);t="string"==typeof t?Ui.modeStringToFlags(t):t,r=void 0===r?438:r,r=64&t?4095&r|32768:0;var a;if("object"===(void 0===e?"undefined":lr(e)))a=e;else{e=Di.normalize(e);try{a=Ui.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(a){if(128&t)throw new Ui.ErrnoError(Oi.EEXIST)}else a=Ui.mknod(e,r,0),o=!0;if(!a)throw new Ui.ErrnoError(Oi.ENOENT);if(Ui.isChrdev(a.mode)&&(t&=-513),65536&t&&!Ui.isDir(a.mode))throw new Ui.ErrnoError(Oi.ENOTDIR);if(!o){var s=Ui.mayOpen(a,t);if(s)throw new Ui.ErrnoError(s)}512&t&&Ui.truncate(a,0),t&=-641;var u=Ui.createStream({node:a,path:Ui.getPath(a),flags:t,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},i,n);u.stream_ops.open&&u.stream_ops.open(u),!wr.logReadFiles||1&t||(Ui.readFiles||(Ui.readFiles={}),e in Ui.readFiles||(Ui.readFiles[e]=1,s("read file: "+e)));try{if(Ui.trackingDelegate.onOpenFile){var f=0;1!=(2097155&t)&&(f|=Ui.tracking.openFlags.READ),0!=(2097155&t)&&(f|=Ui.tracking.openFlags.WRITE),Ui.trackingDelegate.onOpenFile(e,f)}}catch(t){console.log("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+t.message)}return u},close:function(e){if(Ui.isClosed(e))throw new Ui.ErrnoError(Oi.EBADF);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ui.closeStream(e.fd)}e.fd=null},isClosed:function(e){return null===e.fd},llseek:function(e,t,r){if(Ui.isClosed(e))throw new Ui.ErrnoError(Oi.EBADF);if(!e.seekable||!e.stream_ops.llseek)throw new Ui.ErrnoError(Oi.ESPIPE);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:function(e,t,r,i,n){if(i<0||n<0)throw new Ui.ErrnoError(Oi.EINVAL);if(Ui.isClosed(e))throw new Ui.ErrnoError(Oi.EBADF);if(1==(2097155&e.flags))throw new Ui.ErrnoError(Oi.EBADF);if(Ui.isDir(e.node.mode))throw new Ui.ErrnoError(Oi.EISDIR);if(!e.stream_ops.read)throw new Ui.ErrnoError(Oi.EINVAL);var a=void 0!==n;if(a){if(!e.seekable)throw new Ui.ErrnoError(Oi.ESPIPE)}else n=e.position;var o=e.stream_ops.read(e,t,r,i,n);return a||(e.position+=o),o},write:function(e,t,r,i,n,a){if(i<0||n<0)throw new Ui.ErrnoError(Oi.EINVAL);if(Ui.isClosed(e))throw new Ui.ErrnoError(Oi.EBADF);if(0==(2097155&e.flags))throw new Ui.ErrnoError(Oi.EBADF);if(Ui.isDir(e.node.mode))throw new Ui.ErrnoError(Oi.EISDIR);if(!e.stream_ops.write)throw new Ui.ErrnoError(Oi.EINVAL);1024&e.flags&&Ui.llseek(e,0,2);var o=void 0!==n;if(o){if(!e.seekable)throw new Ui.ErrnoError(Oi.ESPIPE)}else n=e.position;var s=e.stream_ops.write(e,t,r,i,n,a);o||(e.position+=s);try{e.path&&Ui.trackingDelegate.onWriteToFile&&Ui.trackingDelegate.onWriteToFile(e.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return s},allocate:function(e,t,r){if(Ui.isClosed(e))throw new Ui.ErrnoError(Oi.EBADF);if(t<0||r<=0)throw new Ui.ErrnoError(Oi.EINVAL);if(0==(2097155&e.flags))throw new Ui.ErrnoError(Oi.EBADF);if(!Ui.isFile(e.node.mode)&&!Ui.isDir(e.node.mode))throw new Ui.ErrnoError(Oi.ENODEV);if(!e.stream_ops.allocate)throw new Ui.ErrnoError(Oi.EOPNOTSUPP);e.stream_ops.allocate(e,t,r)},mmap:function(e,t,r,i,n,a,o){if(1==(2097155&e.flags))throw new Ui.ErrnoError(Oi.EACCES);if(!e.stream_ops.mmap)throw new Ui.ErrnoError(Oi.ENODEV);return e.stream_ops.mmap(e,t,r,i,n,a,o)},msync:function(e,t,r,i,n){return e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,n):0},munmap:function(e){return 0},ioctl:function(e,t,r){if(!e.stream_ops.ioctl)throw new Ui.ErrnoError(Oi.ENOTTY);return e.stream_ops.ioctl(e,t,r)},readFile:function(e,t){if(t=t||{},t.flags=t.flags||"r",t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,i=Ui.open(e,t.flags),n=Ui.stat(e),a=n.size,o=new Uint8Array(a);return Ui.read(i,o,0,a,0),"utf8"===t.encoding?r=S(o,0):"binary"===t.encoding&&(r=o),Ui.close(i),r},writeFile:function(e,t,r){r=r||{},r.flags=r.flags||"w";var i=Ui.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(R(t)+1),a=T(t,n,0,n.length);Ui.write(i,n,0,a,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Ui.write(i,t,0,t.byteLength,void 0,r.canOwn)}Ui.close(i)},cwd:function(){return Ui.currentPath},chdir:function(e){var t=Ui.lookupPath(e,{follow:!0});if(null===t.node)throw new Ui.ErrnoError(Oi.ENOENT);if(!Ui.isDir(t.node.mode))throw new Ui.ErrnoError(Oi.ENOTDIR);var r=Ui.nodePermissions(t.node,"x");if(r)throw new Ui.ErrnoError(r);Ui.currentPath=t.path},createDefaultDirectories:function(){Ui.mkdir("/tmp"),Ui.mkdir("/home"),Ui.mkdir("/home/web_user")},createDefaultDevices:function(){Ui.mkdir("/dev"),Ui.registerDevice(Ui.makedev(1,3),{read:function(){return 0},write:function(e,t,r,i,n){return i}}),Ui.mkdev("/dev/null",Ui.makedev(1,3)),Li.register(Ui.makedev(5,0),Li.default_tty_ops),Li.register(Ui.makedev(6,0),Li.default_tty1_ops),Ui.mkdev("/dev/tty",Ui.makedev(5,0)),Ui.mkdev("/dev/tty1",Ui.makedev(6,0));var t;if("undefined"!=typeof crypto){var r=new Uint8Array(1);t=function(){return crypto.getRandomValues(r),r[0]}}else t=Tr?function(){return e("crypto").randomBytes(1)[0]}:function(){return 256*Math.random()|0};Ui.createDevice("/dev","random",t),Ui.createDevice("/dev","urandom",t),Ui.mkdir("/dev/shm"),Ui.mkdir("/dev/shm/tmp")},
    19  createSpecialDirectories:function(){Ui.mkdir("/proc"),Ui.mkdir("/proc/self"),Ui.mkdir("/proc/self/fd"),Ui.mount({mount:function(){var e=Ui.createNode("/proc/self","fd",16895,73);return e.node_ops={lookup:function(e,t){var r=+t,i=Ui.getStream(r);if(!i)throw new Ui.ErrnoError(Oi.EBADF);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return i.path}}};return n.parent=n,n}},e}},{},"/proc/self/fd")},createStandardStreams:function(){wr.stdin?Ui.createDevice("/dev","stdin",wr.stdin):Ui.symlink("/dev/tty","/dev/stdin"),wr.stdout?Ui.createDevice("/dev","stdout",null,wr.stdout):Ui.symlink("/dev/tty","/dev/stdout"),wr.stderr?Ui.createDevice("/dev","stderr",null,wr.stderr):Ui.symlink("/dev/tty1","/dev/stderr");var e=Ui.open("/dev/stdin","r");p(0===e.fd,"invalid handle for stdin ("+e.fd+")");var t=Ui.open("/dev/stdout","w");p(1===t.fd,"invalid handle for stdout ("+t.fd+")");var r=Ui.open("/dev/stderr","w");p(2===r.fd,"invalid handle for stderr ("+r.fd+")")},ensureErrnoError:function(){Ui.ErrnoError||(Ui.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e;for(var t in Oi)if(Oi[t]===e){this.code=t;break}},this.setErrno(e),this.message=xi[e],this.stack&&Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack&&(this.stack=O(this.stack))},Ui.ErrnoError.prototype=new Error,Ui.ErrnoError.prototype.constructor=Ui.ErrnoError,[Oi.ENOENT].forEach(function(e){Ui.genericErrors[e]=new Ui.ErrnoError(e),Ui.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:function(){Ui.ensureErrnoError(),Ui.nameTable=new Array(4096),Ui.mount(Ni,{},"/"),Ui.createDefaultDirectories(),Ui.createDefaultDevices(),Ui.createSpecialDirectories(),Ui.filesystems={MEMFS:Ni,IDBFS:Ci,NODEFS:Pi,WORKERFS:Bi}},init:function(e,t,r){p(!Ui.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),Ui.init.initialized=!0,Ui.ensureErrnoError(),wr.stdin=e||wr.stdin,wr.stdout=t||wr.stdout,wr.stderr=r||wr.stderr,Ui.createStandardStreams()},quit:function(){Ui.init.initialized=!1;var e=wr._fflush;e&&e(0);for(var t=0;t<Ui.streams.length;t++){var r=Ui.streams[t];r&&Ui.close(r)}},getMode:function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r},joinPath:function(e,t){var r=Di.join.apply(null,e);return t&&"/"==r[0]&&(r=r.substr(1)),r},absolutePath:function(e,t){return Di.resolve(t,e)},standardizePath:function(e){return Di.normalize(e)},findObject:function(e,t){var r=Ui.analyzePath(e,t);return r.exists?r.object:(le(r.error),null)},analyzePath:function(e,t){try{var r=Ui.lookupPath(e,{follow:!t});e=r.path}catch(e){}var i={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var r=Ui.lookupPath(e,{parent:!0});i.parentExists=!0,i.parentPath=r.path,i.parentObject=r.node,i.name=Di.basename(e),r=Ui.lookupPath(e,{follow:!t}),i.exists=!0,i.path=r.path,i.object=r.node,i.name=r.node.name,i.isRoot="/"===r.path}catch(e){i.error=e.errno}return i},createFolder:function(e,t,r,i){var n=Di.join2("string"==typeof e?e:Ui.getPath(e),t),a=Ui.getMode(r,i);return Ui.mkdir(n,a)},createPath:function(e,t,r,i){e="string"==typeof e?e:Ui.getPath(e);for(var n=t.split("/").reverse();n.length;){var a=n.pop();if(a){var o=Di.join2(e,a);try{Ui.mkdir(o)}catch(e){}e=o}}return o},createFile:function(e,t,r,i,n){var a=Di.join2("string"==typeof e?e:Ui.getPath(e),t),o=Ui.getMode(i,n);return Ui.create(a,o)},createDataFile:function(e,t,r,i,n,a){var o=t?Di.join2("string"==typeof e?e:Ui.getPath(e),t):e,s=Ui.getMode(i,n),u=Ui.create(o,s);if(r){if("string"==typeof r){for(var f=new Array(r.length),c=0,d=r.length;c<d;++c)f[c]=r.charCodeAt(c);r=f}Ui.chmod(u,146|s);var l=Ui.open(u,"w");Ui.write(l,r,0,r.length,0,a),Ui.close(l),Ui.chmod(u,s)}return u},createDevice:function(e,t,r,i){var n=Di.join2("string"==typeof e?e:Ui.getPath(e),t),a=Ui.getMode(!!r,!!i);Ui.createDevice.major||(Ui.createDevice.major=64);var o=Ui.makedev(Ui.createDevice.major++,0);return Ui.registerDevice(o,{open:function(e){e.seekable=!1},close:function(e){i&&i.buffer&&i.buffer.length&&i(10)},read:function(e,t,i,n,a){for(var o=0,s=0;s<n;s++){var u;try{u=r()}catch(e){throw new Ui.ErrnoError(Oi.EIO)}if(void 0===u&&0===o)throw new Ui.ErrnoError(Oi.EAGAIN);if(null===u||void 0===u)break;o++,t[i+s]=u}return o&&(e.node.timestamp=Date.now()),o},write:function(e,t,r,n,a){for(var o=0;o<n;o++)try{i(t[r+o])}catch(e){throw new Ui.ErrnoError(Oi.EIO)}return n&&(e.node.timestamp=Date.now()),o}}),Ui.mkdev(n,a,o)},createLink:function(e,t,r,i,n){var a=Di.join2("string"==typeof e?e:Ui.getPath(e),t);return Ui.symlink(r,a)},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;var t=!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!wr.read)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=$e(wr.read(e.url),!0),e.usedBytes=e.contents.length}catch(e){t=!1}return t||le(Oi.EIO),t},createLazyFile:function(e,t,r,i,n){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;n||(o=i);var s=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),i!==o&&n.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(n.responseType="arraybuffer"),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):$e(n.responseText||"",!0)},u=this;u.setDataGetter(function(e){var t=e*o,r=(e+1)*o-1;if(r=Math.min(r,i-1),void 0===u.chunks[e]&&(u.chunks[e]=s(t,r)),void 0===u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]}),!a&&i||(o=i=1,i=this.getter(0).length,o=i,console.log("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!kr)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new a;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:o}}else var s={isDevice:!1,url:r};var u=Ui.createFile(e,t,s,i,n);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var f={};return Object.keys(u.stream_ops).forEach(function(e){var t=u.stream_ops[e];f[e]=function(){if(!Ui.forceLoadFile(u))throw new Ui.ErrnoError(Oi.EIO);return t.apply(null,arguments)}}),f.read=function(e,t,r,i,n){if(!Ui.forceLoadFile(u))throw new Ui.ErrnoError(Oi.EIO);var a=e.node.contents;if(n>=a.length)return 0;var o=Math.min(a.length-n,i);if(p(o>=0),a.slice)for(var s=0;s<o;s++)t[r+s]=a[n+s];else for(var s=0;s<o;s++)t[r+s]=a.get(n+s);return o},u.stream_ops=f,u},createPreloadedFile:function(e,t,r,i,n,a,o,s,u,f){function c(r){function c(r){f&&f(),s||Ui.createDataFile(e,t,r,i,n,u),a&&a(),$(l)}var h=!1;wr.preloadPlugins.forEach(function(e){h||e.canHandle(d)&&(e.handle(r,d,c,function(){o&&o(),$(l)}),h=!0)}),h||c(r)}Browser.init();var d=t?Di.resolve(Di.join2(e,t)):e,l=Z("cp "+d);J(l),"string"==typeof r?Browser.asyncLoad(r,function(e){c(e)},o):c(r)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(e,t,r){t=t||function(){},r=r||function(){};var i=Ui.indexedDB();try{var n=i.open(Ui.DB_NAME(),Ui.DB_VERSION)}catch(e){return r(e)}n.onupgradeneeded=function(){console.log("creating db"),n.result.createObjectStore(Ui.DB_STORE_NAME)},n.onsuccess=function(){function i(){0==f?t():r()}var a=n.result,o=a.transaction([Ui.DB_STORE_NAME],"readwrite"),s=o.objectStore(Ui.DB_STORE_NAME),u=0,f=0,c=e.length;e.forEach(function(e){var t=s.put(Ui.analyzePath(e).object.contents,e);t.onsuccess=function(){++u+f==c&&i()},t.onerror=function(){f++,u+f==c&&i()}}),o.onerror=r},n.onerror=r},loadFilesFromDB:function(e,t,r){t=t||function(){},r=r||function(){};var i=Ui.indexedDB();try{var n=i.open(Ui.DB_NAME(),Ui.DB_VERSION)}catch(e){return r(e)}n.onupgradeneeded=r,n.onsuccess=function(){function i(){0==f?t():r()}var a=n.result;try{var o=a.transaction([Ui.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var s=o.objectStore(Ui.DB_STORE_NAME),u=0,f=0,c=e.length;e.forEach(function(e){var t=s.get(e);t.onsuccess=function(){Ui.analyzePath(e).exists&&Ui.unlink(e),Ui.createDataFile(Di.dirname(e),Di.basename(e),t.result,!0,!0,!0),++u+f==c&&i()},t.onerror=function(){f++,u+f==c&&i()}}),o.onerror=r},n.onerror=r}},ji={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(e,t){if("/"!==t[0]){var r;if(-100===e)r=Ui.cwd();else{var i=Ui.getStream(e);if(!i)throw new Ui.ErrnoError(Oi.EBADF);r=i.path}t=Di.join2(r,t)}return t},doStat:function(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&Di.normalize(t)!==Di.normalize(Ui.getPath(e.node)))return-Oi.ENOTDIR;throw e}return Ur[r>>2]=i.dev,Ur[r+4>>2]=0,Ur[r+8>>2]=i.ino,Ur[r+12>>2]=i.mode,Ur[r+16>>2]=i.nlink,Ur[r+20>>2]=i.uid,Ur[r+24>>2]=i.gid,Ur[r+28>>2]=i.rdev,Ur[r+32>>2]=0,Ur[r+36>>2]=i.size,Ur[r+40>>2]=4096,Ur[r+44>>2]=i.blocks,Ur[r+48>>2]=i.atime.getTime()/1e3|0,Ur[r+52>>2]=0,Ur[r+56>>2]=i.mtime.getTime()/1e3|0,Ur[r+60>>2]=0,Ur[r+64>>2]=i.ctime.getTime()/1e3|0,Ur[r+68>>2]=0,Ur[r+72>>2]=i.ino,0},doMsync:function(e,t,r,i){var n=new Uint8Array(Cr.subarray(e,e+r));Ui.msync(t,n,0,r,i)},doMkdir:function(e,t){return e=Di.normalize(e),"/"===e[e.length-1]&&(e=e.substr(0,e.length-1)),Ui.mkdir(e,t,0),0},doMknod:function(e,t,r){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-Oi.EINVAL}return Ui.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-Oi.EINVAL;var i=Ui.readlink(e),n=Math.min(r,R(i)),a=Nr[t+n];return A(i,t,r+1),Nr[t+n]=a,n},doAccess:function(e,t){if(-8&t)return-Oi.EINVAL;var r;r=Ui.lookupPath(e,{follow:!0}).node;var i="";return 4&t&&(i+="r"),2&t&&(i+="w"),1&t&&(i+="x"),i&&Ui.nodePermissions(r,i)?-Oi.EACCES:0},doDup:function(e,t,r){var i=Ui.getStream(r);return i&&Ui.close(i),Ui.open(e,t,0,r,r).fd},doReadv:function(e,t,r,i){for(var n=0,a=0;a<r;a++){var o=Ur[t+8*a>>2],s=Ur[t+(8*a+4)>>2],u=Ui.read(e,Nr,o,s,i);if(u<0)return-1;if(n+=u,u<s)break}return n},doWritev:function(e,t,r,i){for(var n=0,a=0;a<r;a++){var o=Ur[t+8*a>>2],s=Ur[t+(8*a+4)>>2],u=Ui.write(e,Nr,o,s,i);if(u<0)return-1;n+=u}return n},varargs:0,get:function(e){return ji.varargs+=4,Ur[ji.varargs-4>>2]},getStr:function(){return E(ji.get())},getStreamFromFD:function(){var e=Ui.getStream(ji.get());if(!e)throw new Ui.ErrnoError(Oi.EBADF);return e},getSocketFromFD:function(){var e=SOCKFS.getSocket(ji.get());if(!e)throw new Ui.ErrnoError(Oi.EBADF);return e},getSocketAddress:function(e){var t=ji.get(),r=ji.get();if(e&&0===t)return null;var i=__read_sockaddr(t,r);if(i.errno)throw new Ui.ErrnoError(i.errno);return i.addr=DNS.lookup_addr(i.addr)||i.addr,i},get64:function(){var e=ji.get(),t=ji.get();return p(e>=0?0===t:-1===t),e},getZero:function(){p(0===ji.get())}},Fi=Xr;Xr+=48;var Gi=(g($e("GMT"),"i8",ri),{}),zi=1,Xi=[31,29,31,30,31,30,31,31,30,31,30,31],Hi=[31,28,31,30,31,30,31,31,30,31,30,31];if(wr._usleep=Je,Ui.staticInit(),li.unshift(function(){wr.noFSInit||Ui.init.initialized||Ui.init()}),hi.push(function(){Ui.ignorePermissions=!1}),pi.push(function(){Ui.quit()}),li.unshift(function(){Li.init()}),pi.push(function(){Li.shutdown()}),Tr){var Vi=e("fs"),Yi=e("path");Pi.staticInit()}Kr=f(4),Vr=Yr=d(Xr),qr=Vr+fi,Wr=d(qr),Ur[Kr>>2]=Wr,Hr=!0,p(Wr<ci,"TOTAL_MEMORY not big enough for stack");wr.wasmTableSize=27136,wr.wasmMaxTableSize=27136,wr.asmGlobalArg={},wr.asmLibraryArg={abort:or,assert:p,enlargeMemory:F,getTotalMemory:G,abortOnCannotGrowMemory:j,abortStackOverflow:U,nullFunc_ii:et,nullFunc_iii:tt,nullFunc_iiii:rt,nullFunc_iiiii:it,nullFunc_iiiiid:nt,nullFunc_iiiiii:at,nullFunc_iiiiiid:ot,nullFunc_iiiiiii:st,nullFunc_iiiiiiii:ut,nullFunc_iiiiiiiii:ft,nullFunc_iiiiiiiiiii:ct,nullFunc_iiiiij:dt,nullFunc_iiiijii:lt,nullFunc_ji:ht,nullFunc_jij:pt,nullFunc_v:mt,nullFunc_vi:_t,nullFunc_vii:bt,nullFunc_viii:yt,nullFunc_viiii:vt,nullFunc_viiiii:gt,nullFunc_viiiiii:wt,nullFunc_viiiiiii:Et,nullFunc_viiiiiiii:St,nullFunc_viiiiiiiii:kt,nullFunc_viiiiiiiiii:Tt,nullFunc_viiij:At,nullFunc_viijii:Rt,nullFunc_vij:It,invoke_ii:Mt,invoke_iii:Ot,invoke_iiii:xt,invoke_iiiii:Dt,invoke_iiiiid:Lt,invoke_iiiiii:Nt,invoke_iiiiiid:Ct,invoke_iiiiiii:Pt,invoke_iiiiiiii:Bt,invoke_iiiiiiiii:Ut,invoke_iiiiiiiiiii:jt,invoke_iiiiij:Ft,invoke_iiiijii:Gt,invoke_ji:zt,invoke_jij:Xt,invoke_v:Ht,invoke_vi:Vt,invoke_vii:Yt,invoke_viii:qt,invoke_viiii:Wt,invoke_viiiii:Kt,invoke_viiiiii:Qt,invoke_viiiiiii:Zt,invoke_viiiiiiii:Jt,invoke_viiiiiiiii:$t,invoke_viiiiiiiiii:er,invoke_viiij:tr,invoke_viijii:rr,invoke_vij:ir,___buildEnvironment:re,___cxa_allocate_exception:ie,___cxa_begin_catch:ne,___cxa_find_matching_catch:se,___cxa_pure_virtual:ae,___cxa_throw:ue,___cxa_uncaught_exception:fe,___gxx_personality_v0:ce,___lock:de,___map_file:he,___resumeException:oe,___setErrNo:le,___syscall140:pe,___syscall145:me,___syscall146:_e,___syscall221:be,___syscall5:ye,___syscall54:ve,___syscall6:ge,___syscall91:we,___unlock:Ee,__addDays:We,__arraySum:qe,__isLeapYear:Ye,_abort:Se,_emscripten_memcpy_big:xe,_getenv:ke,_llvm_stackrestore:Te,_llvm_stacksave:Ae,_llvm_trap:Re,_localtime:Oe,_localtime_r:Me,_mktime:De,_pthread_cond_destroy:Le,_pthread_cond_init:Ne,_pthread_cond_wait:Ce,_pthread_create:Pe,_pthread_getspecific:Be,_pthread_join:Ue,_pthread_key_create:je,_pthread_mutex_destroy:Fe,_pthread_mutex_init:Ge,_pthread_mutexattr_init:ze,_pthread_mutexattr_settype:Xe,_pthread_once:He,_pthread_setspecific:Ve,_strftime:Ke,_strftime_l:Qe,_time:Ze,_tzset:Ie,_usleep:Je,DYNAMICTOP_PTR:Kr,tempDoublePtr:Ri,ABORT:Zr,STACKTOP:Yr,STACK_MAX:qr};var qi=wr,Wi=qi._QY265DecodeFlush;qi._QY265DecodeFlush=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Wi.apply(null,arguments)};var Ki=qi._QY265DecodeFrame;qi._QY265DecodeFrame=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ki.apply(null,arguments)};var Qi=qi._QY265DecodeFrameEnSkip;qi._QY265DecodeFrameEnSkip=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Qi.apply(null,arguments)};var Zi=qi._QY265DecoderCreate;qi._QY265DecoderCreate=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Zi.apply(null,arguments)};var Ji=qi._QY265DecoderDestroy;qi._QY265DecoderDestroy=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ji.apply(null,arguments)};var $i=qi._QY265DecoderGetDecodedFrame;qi._QY265DecoderGetDecodedFrame=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),$i.apply(null,arguments)};var en=qi._QY265DecoderGetDecodedFrameEm;qi._QY265DecoderGetDecodedFrameEm=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),en.apply(null,arguments)};var tn=qi._QY265DecoderGetFramePlane;qi._QY265DecoderGetFramePlane=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),tn.apply(null,arguments)};var rn=qi._QY265DecoderGetFrameValid;qi._QY265DecoderGetFrameValid=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),rn.apply(null,arguments)};var nn=qi._QY265DecoderReturnDecodedFrame;qi._QY265DecoderReturnDecodedFrame=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),nn.apply(null,arguments)};var an=qi._QY265DecoderSetDecConfig;qi._QY265DecoderSetDecConfig=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),an.apply(null,arguments)};var on=qi._QY265DecoderSetYUVPlane;qi._QY265DecoderSetYUVPlane=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),on.apply(null,arguments)};var sn=qi._QY265DumpVUIParameters;qi._QY265DumpVUIParameters=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),sn.apply(null,arguments)};var un=qi._QY265GetFrameHeight;qi._QY265GetFrameHeight=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),un.apply(null,arguments)};var fn=qi._QY265GetFramePts;qi._QY265GetFramePts=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),fn.apply(null,arguments)};var cn=qi._QY265GetFrameWidth;qi._QY265GetFrameWidth=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),cn.apply(null,arguments)};var dn=qi._QY265GetPixelBits;qi._QY265GetPixelBits=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),dn.apply(null,arguments)};var ln=qi.__GLOBAL__I_000101;qi.__GLOBAL__I_000101=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ln.apply(null,arguments)};var hn=qi.__GLOBAL__I_000260;qi.__GLOBAL__I_000260=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),hn.apply(null,arguments)};var pn=qi.__GLOBAL__I_000260_365;qi.__GLOBAL__I_000260_365=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),pn.apply(null,arguments)};var mn=qi.__GLOBAL__I_000261;qi.__GLOBAL__I_000261=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),mn.apply(null,arguments)};var _n=qi.__GLOBAL__I_000262;qi.__GLOBAL__I_000262=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),_n.apply(null,arguments)};var bn=qi.__GLOBAL__I_000263;qi.__GLOBAL__I_000263=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),bn.apply(null,arguments)};var yn=qi.__GLOBAL__I_000275;qi.__GLOBAL__I_000275=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),yn.apply(null,arguments)};var vn=qi.__GLOBAL__I_000276;qi.__GLOBAL__I_000276=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),vn.apply(null,arguments)};var gn=qi.__GLOBAL__I_000277;qi.__GLOBAL__I_000277=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),gn.apply(null,arguments)};var wn=qi.__GLOBAL__I_000300;qi.__GLOBAL__I_000300=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wn.apply(null,arguments)};var En=qi.__GLOBAL__I_000301;qi.__GLOBAL__I_000301=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),En.apply(null,arguments)};var Sn=qi.__GLOBAL__I_000310;qi.__GLOBAL__I_000310=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Sn.apply(null,arguments)};var kn=qi.__GLOBAL__I_000311;qi.__GLOBAL__I_000311=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),kn.apply(null,arguments)};var Tn=qi.__GLOBAL__sub_I_DecParameterSetReader_cpp;qi.__GLOBAL__sub_I_DecParameterSetReader_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Tn.apply(null,arguments)};var An=qi.__GLOBAL__sub_I_cpu_cpp;qi.__GLOBAL__sub_I_cpu_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),An.apply(null,arguments)};var Rn=qi.__GLOBAL__sub_I_cryptlib_cpp;qi.__GLOBAL__sub_I_cryptlib_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Rn.apply(null,arguments)};var In=qi.__GLOBAL__sub_I_ec2n_cpp;qi.__GLOBAL__sub_I_ec2n_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),In.apply(null,arguments)};var Mn=qi.__GLOBAL__sub_I_ecp_cpp;qi.__GLOBAL__sub_I_ecp_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Mn.apply(null,arguments)};var On=qi.__GLOBAL__sub_I_fipstest_cpp;qi.__GLOBAL__sub_I_fipstest_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),On.apply(null,arguments)};var xn=qi.__GLOBAL__sub_I_gf2n_cpp;qi.__GLOBAL__sub_I_gf2n_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),xn.apply(null,arguments)};var Dn=qi.__GLOBAL__sub_I_integer_cpp;qi.__GLOBAL__sub_I_integer_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Dn.apply(null,arguments)};var Ln=qi.__GLOBAL__sub_I_iostream_cpp;qi.__GLOBAL__sub_I_iostream_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ln.apply(null,arguments)};var Nn=qi.__GLOBAL__sub_I_test_cpp;qi.__GLOBAL__sub_I_test_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Nn.apply(null,arguments)};var Cn=qi.__ZSt18uncaught_exceptionv;qi.__ZSt18uncaught_exceptionv=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Cn.apply(null,arguments)};var Pn=qi.___cxa_can_catch;qi.___cxa_can_catch=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Pn.apply(null,arguments)};var Bn=qi.___cxa_is_pointer_type;qi.___cxa_is_pointer_type=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Bn.apply(null,arguments)};var Un=qi.___emscripten_environ_constructor;qi.___emscripten_environ_constructor=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Un.apply(null,arguments)};var jn=qi.___errno_location;qi.___errno_location=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),jn.apply(null,arguments)};var Fn=qi.__get_daylight;qi.__get_daylight=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Fn.apply(null,arguments)};var Gn=qi.__get_timezone;qi.__get_timezone=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Gn.apply(null,arguments)};var zn=qi.__get_tzname;qi.__get_tzname=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),zn.apply(null,arguments)};var Xn=qi._fflush;qi._fflush=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xn.apply(null,arguments)};var Hn=qi._free;qi._free=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Hn.apply(null,arguments)};var Vn=qi._llvm_bswap_i32;qi._llvm_bswap_i32=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Vn.apply(null,arguments)};var Yn=qi._malloc;qi._malloc=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Yn.apply(null,arguments)};var qn=qi._memmove;qi._memmove=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),qn.apply(null,arguments)};var Wn=qi._pthread_cond_broadcast;qi._pthread_cond_broadcast=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Wn.apply(null,arguments)};var Kn=qi._pthread_mutex_lock;qi._pthread_mutex_lock=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Kn.apply(null,arguments)};var Qn=qi._pthread_mutex_unlock;qi._pthread_mutex_unlock=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Qn.apply(null,arguments)};var Zn=qi._realloc;qi._realloc=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Zn.apply(null,arguments)};var Jn=qi._sbrk;qi._sbrk=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Jn.apply(null,arguments)};var $n=qi.establishStackSpace;qi.establishStackSpace=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),$n.apply(null,arguments)};var ea=qi.getTempRet0;qi.getTempRet0=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ea.apply(null,arguments)};var ta=qi.setTempRet0;qi.setTempRet0=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ta.apply(null,arguments)};var ra=qi.setThrew;qi.setThrew=function(){
    20  return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ra.apply(null,arguments)};var ia=qi.stackAlloc;qi.stackAlloc=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ia.apply(null,arguments)};var na=qi.stackRestore;qi.stackRestore=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),na.apply(null,arguments)};var aa=qi.stackSave;qi.stackSave=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),aa.apply(null,arguments)},wr.asm=qi;var oa=(wr._QY265DecodeFlush=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecodeFlush.apply(null,arguments)},wr._QY265DecodeFrame=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecodeFrame.apply(null,arguments)},wr._QY265DecodeFrameEnSkip=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecodeFrameEnSkip.apply(null,arguments)},wr._QY265DecoderCreate=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecoderCreate.apply(null,arguments)},wr._QY265DecoderDestroy=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecoderDestroy.apply(null,arguments)},wr._QY265DecoderGetDecodedFrame=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecoderGetDecodedFrame.apply(null,arguments)},wr._QY265DecoderGetDecodedFrameEm=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecoderGetDecodedFrameEm.apply(null,arguments)},wr._QY265DecoderGetFramePlane=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecoderGetFramePlane.apply(null,arguments)},wr._QY265DecoderGetFrameValid=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecoderGetFrameValid.apply(null,arguments)},wr._QY265DecoderReturnDecodedFrame=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecoderReturnDecodedFrame.apply(null,arguments)},wr._QY265DecoderSetDecConfig=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecoderSetDecConfig.apply(null,arguments)},wr._QY265DecoderSetYUVPlane=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DecoderSetYUVPlane.apply(null,arguments)},wr._QY265DumpVUIParameters=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265DumpVUIParameters.apply(null,arguments)},wr._QY265GetFrameHeight=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265GetFrameHeight.apply(null,arguments)},wr._QY265GetFramePts=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265GetFramePts.apply(null,arguments)},wr._QY265GetFrameWidth=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265GetFrameWidth.apply(null,arguments)},wr._QY265GetPixelBits=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._QY265GetPixelBits.apply(null,arguments)},wr.__GLOBAL__I_000101=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000101.apply(null,arguments)},wr.__GLOBAL__I_000260=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000260.apply(null,arguments)},wr.__GLOBAL__I_000260_365=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000260_365.apply(null,arguments)},wr.__GLOBAL__I_000261=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000261.apply(null,arguments)},wr.__GLOBAL__I_000262=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000262.apply(null,arguments)},wr.__GLOBAL__I_000263=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000263.apply(null,arguments)},wr.__GLOBAL__I_000275=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000275.apply(null,arguments)},wr.__GLOBAL__I_000276=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000276.apply(null,arguments)},wr.__GLOBAL__I_000277=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000277.apply(null,arguments)},wr.__GLOBAL__I_000300=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000300.apply(null,arguments)},wr.__GLOBAL__I_000301=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000301.apply(null,arguments)},wr.__GLOBAL__I_000310=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000310.apply(null,arguments)},wr.__GLOBAL__I_000311=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__I_000311.apply(null,arguments)},wr.__GLOBAL__sub_I_DecParameterSetReader_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__sub_I_DecParameterSetReader_cpp.apply(null,arguments)},wr.__GLOBAL__sub_I_cpu_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__sub_I_cpu_cpp.apply(null,arguments)},wr.__GLOBAL__sub_I_cryptlib_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__sub_I_cryptlib_cpp.apply(null,arguments)},wr.__GLOBAL__sub_I_ec2n_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__sub_I_ec2n_cpp.apply(null,arguments)},wr.__GLOBAL__sub_I_ecp_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__sub_I_ecp_cpp.apply(null,arguments)},wr.__GLOBAL__sub_I_fipstest_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__sub_I_fipstest_cpp.apply(null,arguments)},wr.__GLOBAL__sub_I_gf2n_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__sub_I_gf2n_cpp.apply(null,arguments)},wr.__GLOBAL__sub_I_integer_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__sub_I_integer_cpp.apply(null,arguments)},wr.__GLOBAL__sub_I_iostream_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__sub_I_iostream_cpp.apply(null,arguments)},wr.__GLOBAL__sub_I_test_cpp=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__GLOBAL__sub_I_test_cpp.apply(null,arguments)},wr.__ZSt18uncaught_exceptionv=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__ZSt18uncaught_exceptionv.apply(null,arguments)}),sa=(wr.___cxa_can_catch=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.___cxa_can_catch.apply(null,arguments)},wr.___cxa_is_pointer_type=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.___cxa_is_pointer_type.apply(null,arguments)},wr.___emscripten_environ_constructor=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.___emscripten_environ_constructor.apply(null,arguments)},wr.___errno_location=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.___errno_location.apply(null,arguments)},wr.__get_daylight=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__get_daylight.apply(null,arguments)}),ua=wr.__get_timezone=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__get_timezone.apply(null,arguments)},fa=wr.__get_tzname=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.__get_tzname.apply(null,arguments)},ca=wr._emscripten_replace_memory=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._emscripten_replace_memory.apply(null,arguments)},da=(wr._fflush=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._fflush.apply(null,arguments)},wr._free=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._free.apply(null,arguments)}),la=(wr._llvm_bswap_i32=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._llvm_bswap_i32.apply(null,arguments)},wr._malloc=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._malloc.apply(null,arguments)}),ha=(wr._memcpy=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._memcpy.apply(null,arguments)},wr._memmove=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._memmove.apply(null,arguments)},wr._memset=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._memset.apply(null,arguments)},wr._pthread_cond_broadcast=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._pthread_cond_broadcast.apply(null,arguments)},wr._pthread_mutex_lock=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._pthread_mutex_lock.apply(null,arguments)},wr._pthread_mutex_unlock=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._pthread_mutex_unlock.apply(null,arguments)},wr._realloc=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._realloc.apply(null,arguments)},wr._sbrk=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm._sbrk.apply(null,arguments)},wr.establishStackSpace=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.establishStackSpace.apply(null,arguments)},wr.getTempRet0=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.getTempRet0.apply(null,arguments)},wr.runPostSets=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.runPostSets.apply(null,arguments)},wr.setTempRet0=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.setTempRet0.apply(null,arguments)}),pa=(wr.setThrew=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.setThrew.apply(null,arguments)},wr.stackAlloc=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.stackAlloc.apply(null,arguments)}),ma=wr.stackRestore=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.stackRestore.apply(null,arguments)},_a=wr.stackSave=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.stackSave.apply(null,arguments)};wr.dynCall_ii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_ii.apply(null,arguments)},wr.dynCall_iii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iii.apply(null,arguments)},wr.dynCall_iiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iiii.apply(null,arguments)},wr.dynCall_iiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iiiii.apply(null,arguments)},wr.dynCall_iiiiid=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iiiiid.apply(null,arguments)},wr.dynCall_iiiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iiiiii.apply(null,arguments)},wr.dynCall_iiiiiid=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iiiiiid.apply(null,arguments)},wr.dynCall_iiiiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iiiiiii.apply(null,arguments)},wr.dynCall_iiiiiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iiiiiiii.apply(null,arguments)},wr.dynCall_iiiiiiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iiiiiiiii.apply(null,arguments)},wr.dynCall_iiiiiiiiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iiiiiiiiiii.apply(null,arguments)},wr.dynCall_iiiiij=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iiiiij.apply(null,arguments)},wr.dynCall_iiiijii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_iiiijii.apply(null,arguments)},wr.dynCall_ji=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_ji.apply(null,arguments)},wr.dynCall_jij=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_jij.apply(null,arguments)},wr.dynCall_v=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_v.apply(null,arguments)},wr.dynCall_vi=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_vi.apply(null,arguments)},wr.dynCall_vii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_vii.apply(null,arguments)},wr.dynCall_viii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_viii.apply(null,arguments)},wr.dynCall_viiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_viiii.apply(null,arguments)},wr.dynCall_viiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_viiiii.apply(null,arguments)},wr.dynCall_viiiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_viiiiii.apply(null,arguments)},wr.dynCall_viiiiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_viiiiiii.apply(null,arguments)},wr.dynCall_viiiiiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_viiiiiiii.apply(null,arguments)},wr.dynCall_viiiiiiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_viiiiiiiii.apply(null,arguments)},wr.dynCall_viiiiiiiiii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_viiiiiiiiii.apply(null,arguments)},wr.dynCall_viiij=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_viiij.apply(null,arguments)},wr.dynCall_viijii=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_viijii.apply(null,arguments)},wr.dynCall_vij=function(){return p(_i,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!bi,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wr.asm.dynCall_vij.apply(null,arguments)};wr.asm=qi,wr.intArrayFromString||(wr.intArrayFromString=function(){or("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.intArrayToString||(wr.intArrayToString=function(){or("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.ccall||(wr.ccall=function(){or("'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.cwrap||(wr.cwrap=function(){or("'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.setValue||(wr.setValue=function(){or("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.getValue||(wr.getValue=function(){or("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.allocate||(wr.allocate=function(){or("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.getMemory||(wr.getMemory=function(){or("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wr.Pointer_stringify||(wr.Pointer_stringify=function(){or("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.AsciiToString||(wr.AsciiToString=function(){or("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.stringToAscii||(wr.stringToAscii=function(){or("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.UTF8ArrayToString||(wr.UTF8ArrayToString=function(){or("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.UTF8ToString||(wr.UTF8ToString=function(){or("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.stringToUTF8Array||(wr.stringToUTF8Array=function(){or("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.stringToUTF8||(wr.stringToUTF8=function(){or("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.lengthBytesUTF8||(wr.lengthBytesUTF8=function(){or("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.UTF16ToString||(wr.UTF16ToString=function(){or("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.stringToUTF16||(wr.stringToUTF16=function(){or("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.lengthBytesUTF16||(wr.lengthBytesUTF16=function(){or("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.UTF32ToString||(wr.UTF32ToString=function(){or("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.stringToUTF32||(wr.stringToUTF32=function(){or("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.lengthBytesUTF32||(wr.lengthBytesUTF32=function(){or("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.allocateUTF8||(wr.allocateUTF8=function(){or("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.stackTrace||(wr.stackTrace=function(){or("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.addOnPreRun||(wr.addOnPreRun=function(){or("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.addOnInit||(wr.addOnInit=function(){or("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.addOnPreMain||(wr.addOnPreMain=function(){or("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.addOnExit||(wr.addOnExit=function(){or("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.addOnPostRun||(wr.addOnPostRun=function(){or("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.writeStringToMemory||(wr.writeStringToMemory=function(){or("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.writeArrayToMemory||(wr.writeArrayToMemory=function(){or("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.writeAsciiToMemory||(wr.writeAsciiToMemory=function(){or("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.addRunDependency||(wr.addRunDependency=function(){
    21  or("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wr.removeRunDependency||(wr.removeRunDependency=function(){or("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wr.ENV||(wr.ENV=function(){or("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.FS||(wr.FS=function(){or("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.FS_createFolder||(wr.FS_createFolder=function(){or("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wr.FS_createPath||(wr.FS_createPath=function(){or("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wr.FS_createDataFile||(wr.FS_createDataFile=function(){or("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wr.FS_createPreloadedFile||(wr.FS_createPreloadedFile=function(){or("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wr.FS_createLazyFile||(wr.FS_createLazyFile=function(){or("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wr.FS_createLink||(wr.FS_createLink=function(){or("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wr.FS_createDevice||(wr.FS_createDevice=function(){or("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wr.FS_unlink||(wr.FS_unlink=function(){or("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),wr.GL||(wr.GL=function(){or("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.staticAlloc||(wr.staticAlloc=function(){or("'staticAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.dynamicAlloc||(wr.dynamicAlloc=function(){or("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.warnOnce||(wr.warnOnce=function(){or("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.loadDynamicLibrary||(wr.loadDynamicLibrary=function(){or("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.loadWebAssemblyModule||(wr.loadWebAssemblyModule=function(){or("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.getLEB||(wr.getLEB=function(){or("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.getFunctionTables||(wr.getFunctionTables=function(){or("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.alignFunctionTables||(wr.alignFunctionTables=function(){or("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.registerFunctions||(wr.registerFunctions=function(){or("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.addFunction||(wr.addFunction=function(){or("'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.removeFunction||(wr.removeFunction=function(){or("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.getFuncWrapper||(wr.getFuncWrapper=function(){or("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.prettyPrint||(wr.prettyPrint=function(){or("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.makeBigInt||(wr.makeBigInt=function(){or("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.dynCall||(wr.dynCall=function(){or("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.getCompilerSetting||(wr.getCompilerSetting=function(){or("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.stackSave||(wr.stackSave=function(){or("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.stackRestore||(wr.stackRestore=function(){or("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.stackAlloc||(wr.stackAlloc=function(){or("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.establishStackSpace||(wr.establishStackSpace=function(){or("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.print||(wr.print=function(){or("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.printErr||(wr.printErr=function(){or("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),wr.ALLOC_NORMAL||Object.defineProperty(wr,"ALLOC_NORMAL",{get:function(){or("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wr.ALLOC_STACK||Object.defineProperty(wr,"ALLOC_STACK",{get:function(){or("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wr.ALLOC_STATIC||Object.defineProperty(wr,"ALLOC_STATIC",{get:function(){or("'ALLOC_STATIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wr.ALLOC_DYNAMIC||Object.defineProperty(wr,"ALLOC_DYNAMIC",{get:function(){or("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),wr.ALLOC_NONE||Object.defineProperty(wr,"ALLOC_NONE",{get:function(){or("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),nr.prototype=new Error,nr.prototype.constructor=nr;ki=function e(){wr.calledRun||ar(),wr.calledRun||(ki=e)},wr.run=ar;var ba=[];if(wr.abort=or,wr.preInit)for("function"==typeof wr.preInit&&(wr.preInit=[wr.preInit]);wr.preInit.length>0;)wr.preInit.pop()();wr.noExitRuntime=!0;var ya={QY_OK:0,QY_FAIL:2147483649,QY_OUTOFMEMORY:2147483650,QY_POINTER:2147483651,QY_NOTSUPPORTED:2147483652,QY_AUTH_INVALID:2147483653,QY_SEARCHING_ACCESS_POINT:1,QY_REF_PIC_NOT_FOUND:2147483655,QY_NEED_MORE_DATA:8,QY_BITSTREAM_ERROR:9,QY265DecoderCreate:b("QY265DecoderCreate","number",["number","string","number"]),QY265DecoderDestroy:b("QY265DecoderDestroy","number",["number"]),QY265DecoderSetDecConfig:b("QY265DecoderSetDecConfig","number",["number","number","number"]),QY265DecodeFrame:b("QY265DecodeFrame","number",["number","array","number","number","number"]),QY265DecodeFrameEnSkip:b("QY265DecodeFrameEnSkip","number",["number","array","number","number","number","number"]),QY265DecodeFlush:b("QY265DecodeFlush","number",["number","number","number"]),QY265DecoderGetDecodedFrame:b("QY265DecoderGetDecodedFrame","number",["number","number","number","number"]),QY265DecoderGetDecodedFrameEm:b("QY265DecoderGetDecodedFrameEm","number",["number","number","number"]),QY265DecoderReturnDecodedFrame:b("QY265DecoderReturnDecodedFrame","number",["number","number"]),QY265DecoderGetFramePlane:b("QY265DecoderGetFramePlane","number",["number","number","number"]),QY265DecoderGetFrameValid:b("QY265DecoderGetFrameValid","number",["number"]),QY265DumpVUIParameters:b("QY265DumpVUIParameters","number",["number","number","number"]),QY265GetFrameWidth:b("QY265GetFrameWidth","number",["number","number"]),QY265GetFrameHeight:b("QY265GetFrameHeight","number",["number","number"]),QY265GetFramePts:b("QY265GetFramePts","number",["number","number"]),QY265GetPixelBits:b("QY265GetPixelBits","number",["number","number"]),QY265DecoderSetYUVPlane:b("QY265DecoderSetYUVPlane","number",["number"])},va=function(){function e(t,r){s(this,e),this.decoder=t,this.img=r,this.width=null,this.height=null,this.pts=null}return dr(e,[{key:"free",value:function(){this.decoder=null,this.img=null,this.width=null,this.height=null,this.pts=null}},{key:"get_width",value:function(){return null===this.width&&(this.width=ya.QY265GetFrameWidth(this.img,0)),this.width}},{key:"get_height",value:function(){return null===this.height&&(this.height=ya.QY265GetFrameHeight(this.img,0)),this.height}},{key:"get_pts",value:function(){return null===this.pts&&(this.pts=ya.QY265GetFramePts(this.img,0)),this.pts}},{key:"transcode",value:function(e,t,r){var i=this.get_width(),n=this.get_height(),a=la(2),o=ya.QY265DecoderGetFramePlane(this.img,0,a),s=v(a,"i16"),u=ya.QY265DecoderGetFramePlane(this.img,1,a),f=v(a,"i16"),c=ya.QY265DecoderGetFramePlane(this.img,2,a),d=v(a,"i16");da(a),this.decoder.convert_yuv2rgb(1,o,u,c,i,n,s,f,d,8,8,8,e,t,r)}},{key:"getYuvData",value:function(){var e=this.get_height(),t=this.get_width();if(t%8!=0){t=8*parseInt(t/8);for(var r=la(2),i=ya.QY265DecoderGetFramePlane(this.img,0,r),n=v(r,"i16"),a=ya.QY265DecoderGetFramePlane(this.img,1,r),o=v(r,"i16"),s=ya.QY265DecoderGetFramePlane(this.img,2,r),u=v(r,"i16"),f=Cr.subarray(i,i+e*n),c=Cr.subarray(a,a+e*o),d=Cr.subarray(s,s+e*u),l=new Uint8Array(e*t+e/2*t/2*2),h=0;h<e;h++)l.set(f.subarray(h*n,h*n+t),t*h);for(var p=0;p<e/2;p++){var m=t*e+t/2*p;l.set(c.subarray(p*o,p*o+t/2),m)}for(var _=0;_<e/2;_++){var b=t*e*1.25+t/2*_;l.set(d.subarray(_*u,_*u+t/2),b)}return f=null,c=null,d=null,l}return this.getYuvDataNew(e,t)}},{key:"getYuvDataNew",value:function(e,t){var r=e||this.get_height(),i=t||this.get_width(),n=r*i*1.5,a=ya.QY265DecoderSetYUVPlane(this.img),o=Cr.subarray(a,a+n),s=new Uint8Array(o);return o=null,s}}]),e}(),ga=function(){function e(){s(this,e)}return dr(e,[{key:"destroy",value:function(){}},{key:"convert",value:function(e,t,r,i,n,a,o,s,u,f,c,d,l,h){sr(e,t,r,i,n,a,o,s,u,f,c,d,l.data),h&&h(l)}}]),e}(),wa=function(){function e(t){s(this,e),this.TAG="H265Decoder",this.config=t,this.enableRender=t.enableRender,this.image_callback=null,this.stop=!1,this.framecount=0,this.startTime=0,this.skippedframecount=0,this.innalucount=0,this.times=0,this.convertimes=0,this.ret=0,this.more=la(2),this.decStat_ret=la(4),this.decStat_get=la(4),this.decoder=ya.QY265DecoderCreate(null,this.config.token,this.ret),this.converter=new ga,this.toBeDecodeQueue=[],this._emitter=new mr.default,this._running=!1,this._isPausing=!1,this.naluTypeArray=[],this.start(),this.decoder_exception_count=0,this.decodingCapacityInadequateTimes=0}return dr(e,[{key:"free",value:function(){this.converter&&(this.converter.destroy(),this.converter=null),this._isPausing=!0,clearTimeout(this._resumeTimer),ya.QY265DecoderDestroy(this.decoder),this.decoder=null,da(this.more),this.more=null,da(this.decStat_ret),this.decStat_ret=null,da(this.decStat_get),this.decStat_get=null,this.toBeDecodeQueue=null,this._emitter.removeAllListeners(),this._emitter=null,this.framecount=0,this.innalucount=0}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"convert_yuv2rgb",value:function(e,t,r,i,n,a,o,s,u,f,c,d,l,h,p){var m=new Date;t=Cr.subarray(t,t+a*o),r=Cr.subarray(r,r+a*s),i=Cr.subarray(i,i+a*u),this.converter.convert(e,t,r,i,n,a,o,s,u,f,c,d,l,h,p);var _=new Date-m;this.convertimes+=_}},{key:"start",value:function(){this._running=!0,this.consumeData()}},{key:"pause",value:function(){this._isPausing=!0}},{key:"isPaused",value:function(){return this._isPausing}},{key:"onReceiveMediaInfo",value:function(e){this._mediaInfo=e}},{key:"resume",value:function(){this._running=!0,this._isPausing=!1,this.consumeData()}},{key:"consumeData",value:function(){var e=this;if(!this._isPausing&&this._running){var t=this.toBeDecodeQueue.shift();t&&t.nalu&&void 0!==t.pts?(this._decode(t),t=null):this._resumeTimer=setTimeout(function(){e._isPausing||e.resume()},10)}}},{key:"_decode",value:function(e,t){var r=this;try{this.decoder_exception_count=0,0==this.framecount&&(this.startTime=performance.now()),this.naluTypeArray.push(e.naluType);y(this.decStat_ret,0,"i32"),y(this.decStat_get,0,"i32"),this.previousFrameTimestamp=performance.now(),this.config.enableSkipFrame?ya.QY265DecodeFrameEnSkip(this.decoder,e.nalu,e.nalu.length,this.decStat_ret,e.pts,e.isDroppable?1:0):ya.QY265DecodeFrameEnSkip(this.decoder,e.nalu,e.nalu.length,this.decStat_ret,e.pts,0),this.innalucount++,this.config.enableSkipFrame&&e.isDroppable&&++this.skippedframecount%30==0&&this._emitter.emit(br.default.SKIP_FRAMES,this.skippedframecount);var i=v(this.decStat_ret,"i32");0!==i&&console.log("this.decStat_ret:",i);var n=1;do{var a=ya.QY265DecoderGetDecodedFrameEm(this.decoder,this.decStat_get,0);if(v(this.decStat_get,"i32")!==ya.QY_OK)break;n=ya.QY265DecoderGetFrameValid(a),v(this.decStat_get,"i32")===ya.QY_OK&&n&&(this.image_callback&&(this.enableRender?(this.framecount++,this.currentFrameTimestamp=performance.now(),this.currentFrameTimeConsuming=this.currentFrameTimestamp-this.previousFrameTimestamp,this.naluTypeArray=[],this.previousFrameTimestamp=this.currentFrameTimestamp,this.image_callback(new va(this,a))):this.image_callback(void 0)),ya.QY265DecoderReturnDecodedFrame(this.decoder,a))}while(v(this.decStat_get,"i32")===ya.QY_OK&&n);if(this.framecount>this._mediaInfo.fps){var o=performance.now()-this.startTime;if((this.framecount/(.001*o)).toFixed(1)<.8*this._mediaInfo.fps?this.decodingCapacityInadequateTimes++:this.decodingCapacityInadequateTimes=0,this.decodingCapacityInadequateTimes>=this.config.decodingCapacityInadequateTimes&&(this._emitter.emit(br.default.DECODINGCAPACITYINADEQUATE),this.decodingCapacityInadequateTimes=0),this.config.enableSkipFrame){((this.skippedframecount+this.framecount)/this.times*1e3).toFixed(1)}this.times=0,this.framecount=0}t&&t(v(this.decStat_ret,"i32")),this.consumeData()}catch(t){this.decoder_exception_count++,this.config.isLive?this.decoder_exception_count<100?(this.toBeDecodeQueue.unshift(e),setTimeout(function(){r.consumeData()},0)):(this._emitter.emit(br.default.STOPIO),this._emitter.emit(br.default.ERROR,yr.ErrorTypes.DECODER_ERROR,yr.ErrorDetails.DECODER_MEMORY_LEAK_ERROR,yr.ErrorInfo.MEMORY_LEAK_INFO),gr.default.v(this.TAG,"浏览器没有释放内存,造成内存越界无法正常播放,建议可以换成chrome(谷歌)、Firfox(火狐)、safari、Edge浏览器进行观看")):(this.toBeDecodeQueue.unshift(e),setTimeout(function(){r.consumeData()},0))}}},{key:"set_image_callback",value:function(e){this.image_callback=e}},{key:"flush",value:function(){this.stop=!0}}]),e}();r.default=wa}).call(this,e("_process"),e("buffer").Buffer,"/src/h265decode")},{"../core/decoding-errors.js":168,"../core/decoding-events.js":169,"../player/player-events.js":201,"../utils/logger.js":207,_process:122,buffer:48,crypto:57,events:85,fs:46,path:115}],197:[function(e,t,r){"use strict";t.exports=e("./h265.js").default},{"./h265.js":195}],198:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":a(e)},s=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),u=e("events"),f=i(u),c=e("../utils/logger.js"),d=i(c),l=e("../utils/browser.js"),h=i(l),p=e("./player-events.js"),m=e("../core/transmuxer.js"),_=i(m),b=e("../core/transmuxing-events.js"),y=i(b),v=e("../core/mse-controller.js"),g=i(v),w=e("../core/mse-events.js"),E=i(w),S=e("./player-errors.js"),k=e("../config.js"),T=e("../utils/exception.js"),A=e("../core/AVSyncRender.js"),R=i(A),I=e("../core/decoding-events"),M=i(I),O=(e("util"),e("file-saver/FileSaver"),function(){function e(t,r){var i=this;if(n(this,e),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new f.default,this._config=(0,k.createDefaultConfig)(),"object"===(void 0===r?"undefined":o(r))&&Object.assign(this._config,r),"flv"!==t.type.toLowerCase())throw new T.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");!0===t.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=t,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null,this._partOfStatisticsInfo=null,this._fpsInfo={renderFps:0,renderFps_duration:0,renderFps_frame_count:0},this.isPaused=!1;var a=h.default.chrome&&(h.default.version.major<50||50===h.default.version.major&&h.default.version.build<2661);this._alwaysSeekKeyframe=!!(a||h.default.msedge||h.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1),this.on(y.default.SHOULD_REST,function(){Promise.resolve().then(function(){i._transmuxer.pause(),console.log("TransmuxingEvents.SHOULD_REST")})}),this.on(y.default.SHOULD_WORK,function(){Promise.resolve().then(function(){i._transmuxer.resume(),console.log("TransmuxingEvents.SHOULD_WORK")})}),this.on(p.PlayerEvents.STOPIO,function(){i.pause(),i._transmuxer.pause(),i._transmuxer.close()}),this.on(p.PlayerEvents.RENDERFPS,function(e){i._fpsInfo=e}),this.on(M.default.ERROR,function(e,t,r){var n={type:e,detail:t,info:r};Promise.resolve().then(function(){i._emitter&&i._emitter.emit(p.PlayerEvents.ERROR,i,n)})}),window.addEventListener("offline",this.offlineHandler.bind(this))}return s(e,[{key:"offlineHandler",value:function(){var e=this,t=setInterval(function(){if(e._emitter){clearInterval(t),e.pause();var r={type:S.ErrorTypes.NETWORK_ERROR,detail:S.ErrorDetails.NETWORK_EXCEPTION,info:{code:-1,msg:"Failed to fetch"}};e._emitter.emit(p.PlayerEvents.ERROR,e,r)}},5)}},{key:"destroy",value:function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this._syncRender&&this._syncRender.destroy.bind(this._syncRender)(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var r=this;switch(e){case p.PlayerEvents.VOLUMECHANGE:this._mediaElement&&(this._mediaElement.onvolumechange=function(e){Promise.resolve().then(function(){r._emitter.emit(p.PlayerEvents.VOLUMECHANGE,r,{})})})}this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e,t){var r=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new g.default(this._config),this._msectl.on(E.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(E.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(E.default.SOURCE_OPEN,function(){r._mseSourceOpened=!0,r._hasPendingLoad&&(r._hasPendingLoad=!1,r.load())}),this._msectl.on(E.default.ERROR,function(e){var t={type:S.ErrorTypes.MEDIA_ERROR,detail:S.ErrorDetails.MEDIA_MSE_ERROR,info:e};r._emitter&&r._emitter.emit(p.PlayerEvents.ERROR,r,t)}),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}if(t){if(this._canvas=t,"undefined"==typeof MessageChannel)return void d.default.v(this.TAG,"Your Browser not support MessageChannel");this._channel=new MessageChannel,this._syncRender=new R.default(t,this._config,this._channel,this._mediaElement,this._emitter,this)}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var e=this;if(!this._mediaElement)throw new T.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new T.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened)return void(this._hasPendingLoad=!0);this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new _.default(this._mediaDataSource,this._config,this._channel,this),this._transmuxer.on(y.default.INIT_SEGMENT,function(t,r){e._msectl.appendInitSegment(r)}),this._transmuxer.on(y.default.MEDIA_SEGMENT,function(t,r){if(e._msectl.appendMediaSegment(r),e._config.lazyLoad&&!e._config.isLive){var i=e._mediaElement.currentTime;r.info.endDts>=1e3*(i+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(d.default.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}}),this._transmuxer.on(y.default.H265_SEGMENT,function(t,r){e._syncRender&&e._syncRender._onH265ChunkArrival(r)}),this._transmuxer.on(y.default.LOADING_COMPLETE,function(){e._msectl.endOfStream(),e._emitter&&e._emitter.emit(p.PlayerEvents.LOADING_COMPLETE)}),this._transmuxer.on(y.default.RECOVERED_EARLY_EOF,function(){e._emitter&&e._emitter.emit(p.PlayerEvents.RECOVERED_EARLY_EOF)}),this._transmuxer.on(y.default.IO_ERROR,function(t,r){var i={type:S.ErrorTypes.NETWORK_ERROR,detail:t,info:r};e._emitter&&e._emitter.emit(p.PlayerEvents.ERROR,e,i)}),this._transmuxer.on(y.default.DEMUX_ERROR,function(t,r){var i={type:S.ErrorTypes.MEDIA_ERROR,detail:t,info:{code:-1,msg:r}};e._emitter&&e._emitter.emit(p.PlayerEvents.ERROR,e,i)}),this._transmuxer.on(y.default.MEDIA_INFO,function(t){e._mediaInfo=t,e._emitter&&e._emitter.emit(p.PlayerEvents.MEDIAINFO,e,Object.assign({},t)),e._config.use265&&e._syncRender.setMediaInfo(t)}),this._transmuxer.on(y.default.NO_AUDIO,function(){e._syncRender.onNoAudioTrack()}),this._transmuxer.on(y.default.METADATA_ARRIVED,function(t){e._emitter&&e._emitter.emit(p.PlayerEvents.METADATA_ARRIVED,t)}),this._transmuxer.on(y.default.STATISTICS_INFO,function(t){e._partOfStatisticsInfo=e._fillStatisticsInfo(t),e._statisticsInfo=Object.assign({},e._partOfStatisticsInfo,e._fpsInfo),e.isPaused||e._emitter&&e._emitter.emit(p.PlayerEvents.STATISTICSINFO,e,e._statisticsInfo)}),this._transmuxer.on(y.default.RECOMMEND_SEEKPOINT,function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)}),this._transmuxer.on(y.default.LOADEDEND,function(){e._emitter&&e._emitter.emit(p.PlayerEvents.LOADEDEND,e,{})}),this._config.use265?this.on(M.default.DECODER_READY,function(){e._emitter&&e._emitter.emit(p.PlayerEvents.LOADSTART,e,{});try{e._transmuxer.open()}catch(e){}window.startTime=new Date}):this._transmuxer.open()}}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){var e=this;this._emitter&&this._emitter.emit(p.PlayerEvents.PLAY,this,{}),this._config.use265&&this._syncRender.resume(),new Promise(function(t){e._mediaElement.play().catch(function(t){var r={type:S.ErrorTypes.OTHER_ERROR,detail:S.ErrorDetails.OTHER_AUTOPLAYAUDIO_UNSUPPORTED,info:{code:-1e3,msg:t}};e._emitter&&e._emitter.emit(p.PlayerEvents.ERROR,e,r)})})}},{key:"pause",value:function(){this._emitter&&this._emitter.emit(p.PlayerEvents.PAUSE,this,{}),this.isPaused=!0,this._mediaElement.pause(),this._config.use265&&this._syncRender.pause()}},{key:"updateCanvasSize",value:function(e){this._syncRender._updateCanvasSize(e)}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,r=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var n=this._mediaElement.getVideoPlaybackQuality();r=n.totalVideoFrames,i=n.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(r=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=r,e.droppedFrames=i),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,r=0,i=0;i<e.length;i++){var n=e.start(i),a=e.end(i);if(n<=t&&t<a){n,r=a;break}}r>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(d.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){d.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){if(this._mediaElement){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,r=!1,i=0;i<t.length;i++){var n=t.start(i),a=t.end(i);if(e>=n&&e<a){e>=a-this._config.lazyLoadRecoverDuration&&(r=!0);break}}r&&(window.clearInterval(this._progressChecker),this._progressChecker=null,r&&(d.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,r=0;r<t.length;r++){var i=t.start(r),n=t.end(r);if(e>=i&&e<n)return!0}return!1}},{key:"_internalSeek",value:function(e){var t=this._isTimepointBuffered(e),r=!1,i=0;if(e<1&&this._mediaElement.buffered.length>0){var n=this._mediaElement.buffered.start(0);(n<1&&e<n||h.default.safari)&&(r=!0,i=h.default.safari?.1:n)}if(r)this._requestSetTime=!0,this._mediaElement.currentTime=i;else if(t){if(this._alwaysSeekKeyframe){var a=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=a?a.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(e){var t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){var r=t.buffered;r.length>0&&t.currentTime<r.start(0)&&(d.default.w(this.TAG,"Playback seems stuck at "+t.currentTime+", seek to "+r.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=r.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(e){var t=this._mediaElement.currentTime,r=this._mediaElement.buffered;if(this._requestSetTime)return void(this._requestSetTime=!1);if(t<1&&r.length>0){var i=r.start(0);if(i<1&&t<i||h.default.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=h.default.safari?.1:i)}if(this._isTimepointBuffered(t)){if(this._alwaysSeekKeyframe){var n=this._msectl.getNearestKeyframe(Math.floor(1e3*t));null!=n&&(this._requestSetTime=!0,this._mediaElement.currentTime=n.dts/1e3)}return void(null!=this._progressChecker&&this._checkProgressAndResume())}this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_onvCanPlay",value:function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(e){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(e){this._checkAndResumeStuckPlayback()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"use265",get:function(){return this._config.use265}},{key:"liveStatus",get:function(){return this._mediaDataSource.isLive}}]),e}());r.default=O},{"../config.js":165,"../core/AVSyncRender.js":166,"../core/decoding-events":169,"../core/mse-controller.js":174,"../core/mse-events.js":175,"../core/transmuxer.js":176,"../core/transmuxing-events.js":178,"../utils/browser.js":205,"../utils/exception.js":206,"../utils/logger.js":207,"./player-errors.js":200,"./player-events.js":201,events:85,"file-saver/FileSaver":87,util:162}],199:[function(e,t,r){"use strict";function i(e,t){
    22  if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return void 0===e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":n(e)},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=e("events"),u=function(e){return e&&e.__esModule?e:{default:e}}(s),f=e("./player-events.js"),c=e("../config.js"),d=e("../utils/exception.js"),l=function(){function e(t,r){if(i(this,e),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new u.default,this._config=(0,c.createDefaultConfig)(),"object"===(void 0===r?"undefined":a(r))&&Object.assign(this._config,r),"flv"===t.type.toLowerCase())throw new d.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(t.hasOwnProperty("segments"))throw new d.InvalidArgumentException("NativePlayer("+t.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=t,this._mediaElement=null}return o(e,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var r=this;e===f.PlayerEvents.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){r._emitter.emit(f.PlayerEvents.MEDIA_INFO,r.mediaInfo)}):e===f.PlayerEvents.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){r._emitter.emit(f.PlayerEvents.STATISTICS_INFO,r.statisticsInfo)}),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new d.IllegalStateException("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(f.PlayerEvents.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(f.PlayerEvents.STATISTICS_INFO,this.statisticsInfo)}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",t={mimeType:e+this._mediaDataSource.type};return this._mediaElement&&(t.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(t.width=this._mediaElement.videoWidth,t.height=this._mediaElement.videoHeight)),t}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,r=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var n=this._mediaElement.getVideoPlaybackQuality();r=n.totalVideoFrames,i=n.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(r=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=r,e.droppedFrames=i),e}}]),e}();r.default=l},{"../config.js":165,"../utils/exception.js":206,"./player-events.js":201,events:85}],200:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorDetails=r.ErrorTypes=void 0;var i=e("../download/loader.js"),n=e("../demux/demux-errors.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(n);r.ErrorTypes={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},r.ErrorDetails={NETWORK_EXCEPTION:i.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:i.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:i.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:i.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:a.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:a.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:a.default.CODEC_UNSUPPORTED,OTHER_AUTOPLAYAUDIO_UNSUPPORTED:"AudioAutoPlayUnsupported",OTHER_MEMORY_LEAK_ERROR:"DecoderMemoryLeakError"}},{"../demux/demux-errors.js":181,"../download/loader.js":188}],201:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.PlayerEventsOutside={READY:"ready",PAUSE:"pause",RELOAD:"reload",LOADSTART:"loadStart",MEDIAINFO:"mediaInfo",LOADEDEND:"loadedEnd",VOLUMECHANGE:"volumechange",ERROR:"_error",WAITING:"waiting",PLAYING:"playing",STATISTICSINFO:"statisticsInfo"},r.PlayerEvents={LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",STATISTICS_INFO:"statistics_info",STOPIO:"stopIO",RENDERFPS:"renderfps",READY:"ready",PAUSE:"pause",RELOAD:"reload",LOADSTART:"loadStart",MEDIAINFO:"mediaInfo",LOADEDEND:"loadedEnd",VOLUMECHANGE:"volumechange",ERROR:"_error",WAITING:"waiting",PLAYING:"playing",STATISTICSINFO:"statisticsInfo",WARNING:"warning"}},{}],202:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=function(){function e(){i(this,e)}return n(e,null,[{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),e}();r.default=a},{}],203:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=function(){function e(){i(this,e)}return n(e,null,[{key:"init",value:function(){e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var t in e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var r=e.constants={};r.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),r.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),r.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),r.STSC=r.STCO=r.STTS,r.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),r.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),r.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),r.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),r.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(e){for(var t=8,r=null,i=Array.prototype.slice.call(arguments,1),n=i.length,a=0;a<n;a++)t+=i[a].byteLength;r=new Uint8Array(t),r[0]=t>>>24&255,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r.set(e,4);for(var o=8,s=0;s<n;s++)r.set(i[s],o),o+=i[s].byteLength;return r}},{key:"generateInitSegment",value:function(t){var r=e.box(e.types.ftyp,e.constants.FTYP),i=e.moov(t),n=new Uint8Array(r.byteLength+i.byteLength);return n.set(r,0),n.set(i,r.byteLength),n}},{key:"moov",value:function(t){var r=e.mvhd(t.timescale,t.duration),i=e.trak(t),n=e.mvex(t);return e.box(e.types.moov,r,i,n)}},{key:"mvhd",value:function(t,r){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var r=t.id,i=t.duration,n=t.presentWidth,a=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>>8&255,255&n,0,0,a>>>8&255,255&a,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var r=t.timescale,i=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}},{key:"hdlr",value:function(t){var r=null;return r="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,r)}},{key:"minf",value:function(t){var r=null;return r="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,r,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var r=t.channelCount,i=t.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types[".mp3"],n)}},{key:"mp4a",value:function(t){var r=t.channelCount,i=t.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return e.box(e.types.mp4a,n,e.esds(t))}},{key:"esds",value:function(t){var r=t.config||[],i=r.length,n=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(r).concat([6,1,2]));return e.box(e.types.esds,n)}},{key:"avc1",value:function(t){var r=t.avcc,i=t.codecWidth,n=t.codecHeight,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,a,e.box(e.types.avcC,r))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var r=t.id,i=new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,i)}},{key:"moof",value:function(t,r){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,r))}},{key:"mfhd",value:function(t){var r=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,r)}},{key:"traf",value:function(t,r){var i=t.id,n=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),a=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),o=e.sdtp(t),s=e.trun(t,o.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,n,a,s,o)}},{key:"sdtp",value:function(t){for(var r=t.samples||[],i=r.length,n=new Uint8Array(4+i),a=0;a<i;a++){var o=r[a].flags;n[a+4]=o.isLeading<<6|o.dependsOn<<4|o.isDependedOn<<2|o.hasRedundancy}return e.box(e.types.sdtp,n)}},{key:"trun",value:function(t,r){var i=t.samples||[],n=i.length,a=12+16*n,o=new Uint8Array(a);r+=8+a,o.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0);for(var s=0;s<n;s++){var u=i[s].duration,f=i[s].size,c=i[s].flags,d=i[s].cts;o.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,f>>>24&255,f>>>16&255,f>>>8&255,255&f,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.isNonSync,0,0,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*s)}return e.box(e.types.trun,o)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();a.init(),r.default=a},{}],204:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=e("../utils/logger.js"),s=i(o),u=e("./mp4-generator.js"),f=i(u),c=e("./aac-silent.js"),d=i(c),l=e("../utils/browser.js"),h=i(l),p=e("../core/media-segment-info.js"),m=e("../utils/exception.js"),_=function(){function e(t){n(this,e),this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new p.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new p.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!h.default.chrome||!(h.default.version.major<50||50===h.default.version.major&&h.default.version.build<2661)),this._fillSilentAfterSeek=h.default.msedge||h.default.msie,this._mp3UseMpegAudio=!h.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return a(e,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(e){this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(e,t){if(!this._onMediaSegment)throw new m.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),t&&this._remuxVideo(t),this._remuxAudio(e)}},{key:"_onTrackMetadataReceived",value:function(e,t){var r=null,i="mp4",n=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(i="mpeg",n="",r=new Uint8Array):r=f.default.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,r=f.default.generateInitSegment(t)}if(!this._onInitSegment)throw new m.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:r.buffer,codec:n,container:e+"/"+i,mediaDuration:t.duration})}},{key:"_calculateDtsBase",value:function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t&&t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"_remuxAudio",value:function(e){if(null!=this._audioMeta){var t=e,r=t.samples,i=void 0,n=-1,a=-1,o=this._audioMeta.refSampleDuration,u="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,c=this._dtsBaseInited&&void 0===this._audioNextDts,l=!1;if(r&&0!==r.length){var m=0,_=null,b=0;u?(m=0,b=t.length):(m=8,b=8+t.length);var y=r[0].dts-this._dtsBase;if(this._audioNextDts)i=y-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())i=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(l=!0);else{var v=this._audioSegmentInfoList.getLastSampleBefore(y);if(null!=v){var g=y-(v.originalDts+v.duration);g<=3&&(g=0);var w=v.dts+v.duration+g;i=y-w}else i=0}if(l){var E=y-i,S=this._videoSegmentInfoList.getLastSegmentBefore(y);if(null!=S&&S.beginDts<E){var k=d.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(k){var T=S.beginDts,A=E-S.beginDts;s.default.v(this.TAG,"InsertPrefixSilentAudio: dts: "+T+", duration: "+A),r.unshift({unit:k,dts:T,pts:T}),b+=k.byteLength}}else l=!1}for(var R=[],I=0;I<r.length;I++){var M=r[I],O=M.unit,x=M.dts-this._dtsBase,D=x-i;-1===n&&(n=D);var L=0;if(I!==r.length-1){L=r[I+1].dts-this._dtsBase-i-D}else L=R.length>=1?R[R.length-1].duration:Math.floor(o);var N=!1,C=null;if(L>1.5*o&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!h.default.safari){N=!0;var P=Math.abs(L-o),B=Math.ceil(P/o),U=D+o;s.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\ndts: "+(D+L)+" ms, expected: "+(D+Math.round(o))+" ms, delta: "+Math.round(P)+" ms, generate: "+B+" frames");var j=d.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==j&&(s.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),j=O),C=[];for(var F=0;F<B;F++){var G=Math.round(U);if(C.length>0){var z=C[C.length-1];z.duration=G-z.dts}var X={dts:G,pts:G,cts:0,unit:j,size:j.byteLength,duration:0,originalDts:x,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};C.push(X),b+=O.byteLength,U+=o}var H=C[C.length-1];H.duration=D+L-H.dts,L=Math.round(o)}R.push({dts:D,pts:D,cts:0,unit:M.unit,size:M.unit.byteLength,duration:L,originalDts:x,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),N&&R.push.apply(R,C)}u?_=new Uint8Array(b):(_=new Uint8Array(b),_[0]=b>>>24&255,_[1]=b>>>16&255,_[2]=b>>>8&255,_[3]=255&b,_.set(f.default.types.mdat,4));for(var V=0;V<R.length;V++){var Y=R[V].unit;_.set(Y,m),m+=Y.byteLength}var q=R[R.length-1];a=q.dts+q.duration,this._audioNextDts=a;var W=new p.MediaSegmentInfo;W.beginDts=n,W.endDts=a,W.beginPts=n,W.endPts=a,W.originalBeginDts=R[0].originalDts,W.originalEndDts=q.originalDts+q.duration,W.firstSample=new p.SampleInfo(R[0].dts,R[0].pts,R[0].duration,R[0].originalDts,!1),W.lastSample=new p.SampleInfo(q.dts,q.pts,q.duration,q.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(W),t.samples=R,t.sequenceNumber++;var K=null;K=u?new Uint8Array:f.default.moof(t,n),t.samples=[],t.length=0;var Q={type:"audio",data:this._mergeBoxes(K,_).buffer,sampleCount:R.length,info:W};u&&c&&(Q.timestampOffset=n),this._onMediaSegment("audio",Q)}}}},{key:"_remuxVideo",value:function(e){if(null!=this._videoMeta){var t=e,r=t.samples,i=void 0,n=-1,a=-1,o=-1,s=-1;if(r&&0!==r.length){var u=8,c=8+e.length,d=new Uint8Array(c);d[0]=c>>>24&255,d[1]=c>>>16&255,d[2]=c>>>8&255,d[3]=255&c,d.set(f.default.types.mdat,4);var l=r[0].dts-this._dtsBase;if(this._videoNextDts)i=l-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())i=0;else{var h=this._videoSegmentInfoList.getLastSampleBefore(l);if(null!=h){var m=l-(h.originalDts+h.duration);m<=3&&(m=0);var _=h.dts+h.duration+m;i=l-_}else i=0}for(var b=new p.MediaSegmentInfo,y=[],v=0;v<r.length;v++){var g=r[v],w=g.dts-this._dtsBase,E=g.isKeyframe,S=w-i,k=g.cts,T=S+k;-1===n&&(n=S,o=T);var A=0;if(v!==r.length-1){A=r[v+1].dts-this._dtsBase-i-S}else A=y.length>=1?y[y.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(E){var R=new p.SampleInfo(S,T,A,g.dts,!0);R.fileposition=g.fileposition,b.appendSyncPoint(R)}y.push({dts:S,pts:T,cts:k,units:g.units,size:g.length,isKeyframe:E,duration:A,originalDts:w,flags:{isLeading:0,dependsOn:E?2:1,isDependedOn:E?1:0,hasRedundancy:0,isNonSync:E?0:1}})}for(var I=0;I<y.length;I++)for(var M=y[I].units;M.length;){var O=M.shift(),x=O.data;d.set(x,u),u+=x.byteLength}var D=y[y.length-1];if(a=D.dts+D.duration,s=D.pts+D.duration,this._videoNextDts=a,b.beginDts=n,b.endDts=a,b.beginPts=o,b.endPts=s,b.originalBeginDts=y[0].originalDts,b.originalEndDts=D.originalDts+D.duration,b.firstSample=new p.SampleInfo(y[0].dts,y[0].pts,y[0].duration,y[0].originalDts,y[0].isKeyframe),b.lastSample=new p.SampleInfo(D.dts,D.pts,D.duration,D.originalDts,D.isKeyframe),this._isLive||this._videoSegmentInfoList.append(b),t.samples=y,t.sequenceNumber++,this._forceFirstIDR){var L=y[0].flags;L.dependsOn=2,L.isNonSync=0}var N=f.default.moof(t,n);t.samples=[],t.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(N,d).buffer,sampleCount:y.length,info:b})}}}},{key:"_mergeBoxes",value:function(e,t){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(e,0),r.set(t,e.byteLength),r}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e}}]),e}();r.default=_},{"../core/media-segment-info.js":173,"../utils/browser.js":205,"../utils/exception.js":206,"../utils/logger.js":207,"./aac-silent.js":202,"./mp4-generator.js":203}],205:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],r=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],n={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:r[0]||""},a={};if(n.browser){a[n.browser]=!0;var o=n.majorVersion.split(".");a.version={major:parseInt(n.majorVersion,10),string:n.version},o.length>1&&(a.version.minor=parseInt(o[1],10)),o.length>2&&(a.version.build=parseInt(o[2],10))}n.platform&&(a[n.platform]=!0),(a.chrome||a.opr||a.safari)&&(a.webkit=!0),(a.rv||a.iemobile)&&(a.rv&&delete a.rv,n.browser="msie",a.msie=!0),a.edge&&(delete a.edge,n.browser="msedge",a.msedge=!0),a.opr&&(n.browser="opera",a.opera=!0),a.safari&&a.android&&(n.browser="android",a.android=!0),a.name=n.browser,a.platform=n.platform;for(var s in i)i.hasOwnProperty(s)&&delete i[s];Object.assign(i,a)}(),r.default=i},{}],206:[function(e,t,r){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":o(t))&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),u=r.RuntimeException=function(){function e(t){a(this,e),this._message=t}return s(e,[{key:"toString",value:function(){return this.name+": "+this.message}},{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}}]),e}();r.IllegalStateException=function(e){function t(e){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return n(t,e),s(t,[{key:"name",get:function(){return"IllegalStateException"}}]),t}(u),r.InvalidArgumentException=function(e){function t(e){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return n(t,e),s(t,[{key:"name",get:function(){return"InvalidArgumentException"}}]),t}(u),r.NotImplementedException=function(e){function t(e){return a(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return n(t,e),s(t,[{key:"name",get:function(){return"NotImplementedException"}}]),t}(u)},{}],207:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=e("events"),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(){function e(){i(this,e)}return n(e,null,[{key:"e",value:function(t,r){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+r;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",i),e.ENABLE_ERROR&&(console.error?console.error(i):console.warn?console.warn(i):console.log(i))}},{key:"i",value:function(t,r){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+r;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",i),e.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}},{key:"w",value:function(t,r){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+r;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",i),e.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}},{key:"d",value:function(t,r){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+r;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",i),e.ENABLE_DEBUG&&(console.debug?console.debug(i):console.log(i))}},{key:"v",value:function(t,r){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var i="["+t+"] > "+r;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",i),e.ENABLE_VERBOSE&&console.log(i)}}]),e}();s.GLOBAL_TAG="h265.js",s.FORCE_GLOBAL_TAG=!1,s.ENABLE_ERROR=!0,s.ENABLE_INFO=!0,s.ENABLE_WARN=!0,s.ENABLE_DEBUG=!0,s.ENABLE_VERBOSE=!0,s.ENABLE_CALLBACK=!1,s.emitter=new o.default,r.default=s},{events:85}],208:[function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=e("events"),s=i(o),u=e("./logger.js"),f=i(u),c=function(){function e(){n(this,e)}return a(e,null,[{key:"getConfig",value:function(){return{globalTag:f.default.GLOBAL_TAG,forceGlobalTag:f.default.FORCE_GLOBAL_TAG,enableVerbose:f.default.ENABLE_VERBOSE,enableDebug:f.default.ENABLE_DEBUG,enableInfo:f.default.ENABLE_INFO,enableWarn:f.default.ENABLE_WARN,enableError:f.default.ENABLE_ERROR,enableCallback:f.default.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(e){f.default.GLOBAL_TAG=e.globalTag,f.default.FORCE_GLOBAL_TAG=e.forceGlobalTag,f.default.ENABLE_VERBOSE=e.enableVerbose,f.default.ENABLE_DEBUG=e.enableDebug,f.default.ENABLE_INFO=e.enableInfo,f.default.ENABLE_WARN=e.enableWarn,f.default.ENABLE_ERROR=e.enableError,f.default.ENABLE_CALLBACK=e.enableCallback}},{key:"_notifyChange",value:function(){var t=e.emitter;if(t.listenerCount("change")>0){var r=e.getConfig();t.emit("change",r)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){f.default.emitter.addListener("log",t),f.default.emitter.listenerCount("log")>0&&(f.default.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){f.default.emitter.removeListener("log",t),
    23  0===f.default.emitter.listenerCount("log")&&(f.default.ENABLE_CALLBACK=!1,e._notifyChange())}},{key:"forceGlobalTag",get:function(){return f.default.FORCE_GLOBAL_TAG},set:function(t){f.default.FORCE_GLOBAL_TAG=t,e._notifyChange()}},{key:"globalTag",get:function(){return f.default.GLOBAL_TAG},set:function(t){f.default.GLOBAL_TAG=t,e._notifyChange()}},{key:"enableAll",get:function(){return f.default.ENABLE_VERBOSE&&f.default.ENABLE_DEBUG&&f.default.ENABLE_INFO&&f.default.ENABLE_WARN&&f.default.ENABLE_ERROR},set:function(t){f.default.ENABLE_VERBOSE=t,f.default.ENABLE_DEBUG=t,f.default.ENABLE_INFO=t,f.default.ENABLE_WARN=t,f.default.ENABLE_ERROR=t,e._notifyChange()}},{key:"enableDebug",get:function(){return f.default.ENABLE_DEBUG},set:function(t){f.default.ENABLE_DEBUG=t,e._notifyChange()}},{key:"enableVerbose",get:function(){return f.default.ENABLE_VERBOSE},set:function(t){f.default.ENABLE_VERBOSE=t,e._notifyChange()}},{key:"enableInfo",get:function(){return f.default.ENABLE_INFO},set:function(t){f.default.ENABLE_INFO=t,e._notifyChange()}},{key:"enableWarn",get:function(){return f.default.ENABLE_WARN},set:function(t){f.default.ENABLE_WARN=t,e._notifyChange()}},{key:"enableError",get:function(){return f.default.ENABLE_ERROR},set:function(t){f.default.ENABLE_ERROR=t,e._notifyChange()}}]),e}();c.emitter=new s.default,r.default=c},{"./logger.js":207,events:85}],209:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=function(){function e(t){var r=this;i(this,e),this._audioElement=t,this.setCurrentTime(0),this.timer=setInterval(function(){r._audioElement.currentTime+=.01},10)}return n(e,[{key:"setCurrentTime",value:function(e){this._audioElement.currentTime=e}},{key:"destroy",value:function(){this.timer.clearInterval()}}]),e}();r.default=a},{}],210:[function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=function(){function t(){i(this,t)}return n(t,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(void 0!==i&&null!==i)for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])}return t},"function"!=typeof self.Promise&&e("es6-promise").polyfill(),ArrayBuffer.transfer||(ArrayBuffer.transfer=function(e,t){function r(e,t,r,i,n){var a=Uint8Array;switch(e){case 8:a=Float64Array;break;case 4:a=Float32Array;break;case 2:a=Uint16Array;break;case 1:default:a=Uint8Array}for(var o=new a(t,i,Math.trunc(n/e)),s=new a(r,i,Math.trunc(n/e)),u=0;u<s.length;u++)s[u]=o[u];return{nextOffset:o.byteOffset+o.byteLength,leftBytes:t.byteLength-(o.byteOffset+o.byteLength)}}e=Object(e);var i=new ArrayBuffer(t);if(!(e instanceof ArrayBuffer&&i instanceof ArrayBuffer))throw new TypeError("Source and destination must be ArrayBuffer instances");if(i.byteLength>=e.byteLength){var n=0,a=e.byteLength;[8,4,2,1].forEach(function(t){if(a>=t){var o=r(t,e,i,n,a);n=o.nextOffset,a=o.leftBytes}})}return i})}}]),t}();a.install(),r.default=a},{"es6-promise":84}],211:[function(e,t,r){"use strict";function i(e,t,r){var i=e;if(t+r<i.length){for(;r--;)if(128!=(192&i[++t]))return!1;return!0}return!1}function n(e){for(var t=[],r=e,n=0,a=e.length;n<a;)if(r[n]<128)t.push(String.fromCharCode(r[n])),++n;else{if(r[n]<192);else if(r[n]<224){if(i(r,n,1)){var o=(31&r[n])<<6|63&r[n+1];if(o>=128){t.push(String.fromCharCode(65535&o)),n+=2;continue}}}else if(r[n]<240){if(i(r,n,2)){var s=(15&r[n])<<12|(63&r[n+1])<<6|63&r[n+2];if(s>=2048&&55296!=(63488&s)){t.push(String.fromCharCode(65535&s)),n+=3;continue}}}else if(r[n]<248&&i(r,n,3)){var u=(7&r[n])<<18|(63&r[n+1])<<12|(63&r[n+2])<<6|63&r[n+3];if(u>65536&&u<1114112){u-=65536,t.push(String.fromCharCode(u>>>10|55296)),t.push(String.fromCharCode(1023&u|56320)),n+=4;continue}}t.push(String.fromCharCode(65533)),++n}return t.join("")}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n},{}]},{},[197])(197)});