diff --git a/README.MD b/README.MD index 26d1ab20..a63ee965 100644 --- a/README.MD +++ b/README.MD @@ -1,4 +1,4 @@ -# h265web.js - 即将支持HDR10! +# h265web.js - 已支持HTTP-FLV 即将支持HDR10! 中文 | English @@ -20,8 +20,8 @@ | ---- | ---- | ---- | ---- | | HLS(LIVE) | MP4(VOD) | FLV(VOD) | MPEG2 TS(VOD) | | | | | | -| M3u8(VOD) | HDR10(BT2020) | HTTP FLV(LIVE) | G711A | -| | @TODO Support -
Before 2021/10/31 | @TODO Support -
Before 2021/10/31 | @TODO | +| M3u8(VOD) | HTTP FLV(LIVE) | G711A | HDR10(BT2020) | +| | | @TODO | @TODO Support -
Before 2021/10/31 |
@@ -118,6 +118,8 @@ - [3-其它](#3-其它) - [捐赠](#捐赠) + + - [FFmpeg支持265的HTTPFLV直播](#ffmpeg支持265的httpflv直播) - [FFmpeg转码265编码的视频](#ffmpeg转码265编码的视频) @@ -131,6 +133,9 @@ | 更新日志 | 内容 | | ---- | ---- | +| 时间 | 2021/10/09 - 凌晨 | +| - | 0.支持HTTP-FLV(HEVC) 直播播放 CodecID=12 | +| - | 0.MP4/FLV(VOD) 优化缓存区域外Seek速度性能 | | 时间 | 2021/09/27 - 晚 | | - | 0.M3u8/MpegTS 优化缓存区域外Seek速度性能 | | 时间 | 2021/09/25 - 凌晨 | @@ -236,7 +241,7 @@ | hls | 直播 | 是 | ---- | | H.265 | 点播 | 是 | ---- | | H.265 | 直播 | 是 | ---- | -| http-flv | 直播 | 否 | 待支持 | +| http-flv | 直播 | 是 | CodecID=12 | | flv | 点播 | 是 | 备用播放内核模式,不需要填写 | * 能力 @@ -395,6 +400,7 @@ var config = { | \+ core | Int | - | 否:默认0 | 0:默认播放内核
1:备用播放内核 | | \+ coreProbePart | Float32 | - | 否:默认1.0 | 探测Mp4媒体的属性,百分比 `0.0~1.0`,正常moov前置的文件都用0.1(10%)可以(只适用于备用播放内核) | | \+ ignoreAudio | Int | - | 否:默认0 | 0:带音频播放
1:忽略音频播放 | +| \+ probeSize | Int | - | 否:4096 | HTTP-FLV直播模式下的探测长度 | @@ -919,6 +925,12 @@ player.release();
+### FFmpeg支持265的HTTPFLV直播 ### + +* Github地址: https://github.com/numberwolf/FFmpeg-QuQi-H265-FLV-RTMP + +
+ ### FFmpeg转码265编码的视频 ### * mp4 diff --git a/README_EN.MD b/README_EN.MD index f916857d..2e11acbb 100644 --- a/README_EN.MD +++ b/README_EN.MD @@ -20,8 +20,8 @@ A hevc/h.265 web player, easy to play 1080P. `~^_^~ For love` if | | | | -| M3u8(VOD) | HDR10(BT2020) | HTTP FLV(LIVE) | G711A | -| | @TODO Support -
Before 2021/10/31 | @TODO Support -
Before 2021/10/31 | @TODO | +| M3u8(VOD) | HTTP FLV(LIVE) | G711A | HDR10(BT2020) | +| | | @TODO | @TODO Support -
Before 2021/10/31 | | h265web.js | mpeg.js `(ts demuxer)` | h265web.js's H.265 decoder | LICENSE | | ---- | ---- | ---- | ---- | @@ -118,8 +118,10 @@ Notice: - [3、Others](#3others) - [Donate](#donate) + + - [FFmpeg Support H265 Live Encode](#ffmpegsupporth265liveencode) - - [Transcode and get hevc media file by ffmpeg](#transcodeandget265codecfilebyffmpeg) + - [Transcode and get HEVC/H.265 media file by ffmpeg](#transcodeandget265codecfilebyffmpeg) - [Update Log](upldatelog) @@ -131,6 +133,9 @@ Notice: | Update | Content | | ---- | ---- | +| 时间 | 2021/10/09 - In the small hours | +| - | 0.Support HTTP-FLV(HEVC) LIVE, CodecID=12 | +| - | 0.MP4/FLV(VOD) performance optimizing of Seek operation(out of cache area) | | Time | 2021/09/27 - Evening | | - | 0.M3u8/MpegTS performance optimizing of Seek operation(out of cache area) | | Time | 2021/09/25 - In the small hours | @@ -234,7 +239,7 @@ Notice: | hls | Live | Y | ---- | | H.265 | Video on demand | Y | ---- | | H.265 | Live | Y | ---- | -| http-flv | Live | N | TODO | +| http-flv | Live | Y | CodecID=12 | | flv | Video on demand | Y | Bak player core mode | * Features @@ -390,6 +395,7 @@ let config = { | \+ coreProbePart | Float32 | - | N:Default is 1.0 | Probe Mp4 media info,interval: `0.0~1.0`, traditional mp4 file which moov box front of mdat box, use 0.1(10%) (only with Bak player core mode(beta)) | | \+ core | Int | - | N:Default 0 | 0:Default Core
1:Bak Core | | \+ ignoreAudio | Int | - | N:Default is 0 | 0:Play with audio
1:Without audio | +| \+ probeSize | Int | - | N:4096 | HTTP-FLV(LIVE) Mode's probe size, default is 4096 |
@@ -910,6 +916,12 @@ player.release();
+### FFmpegSupportH265LiveEncode ### + +* Github: https://github.com/numberwolf/FFmpeg-QuQi-H265-FLV-RTMP + +
+ ### TranscodeAndGet265CodecFileByFFmpeg ### * mp4 diff --git a/dist/h265webjs-v20210927.js b/dist/h265webjs-v20210927.js deleted file mode 100644 index 825abfc6..00000000 --- a/dist/h265webjs-v20210927.js +++ /dev/null @@ -1,17 +0,0 @@ -!function e(t,i,r){function n(s,o){if(!i[s]){if(!t[s]){var l="function"==typeof require&&require;if(!o&&l)return l(s,!0);if(a)return a(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var u=i[s]={exports:{}};t[s][0].call(u.exports,(function(e){return n(t[s][1][e]||e)}),u,u.exports,e,t,i,r)}return i[s].exports}for(var a="function"==typeof require&&require,s=0;s1&&(m=i.argv[1].replace(/\\/g,"/")),p=i.argv.slice(2),void 0!==t&&(t.exports=d),i.on("uncaughtException",(function(e){if(!(e instanceof Sa))throw e})),i.on("unhandledRejection",at),b=function(e){i.exit(e)},d.inspect=function(){return"[Emscripten Module object]"};else if(E)"undefined"!=typeof read&&(C=function(e){return read(e)}),S=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(X("object"===u(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?p=scriptArgs:void 0!==arguments&&(p=arguments),"function"==typeof quit&&(b=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print);else{if(!v&&!y)throw new Error("environment detection error");y?A=self.location.href:document.currentScript&&(A=document.currentScript.src),A=0!==A.indexOf("blob:")?A.substr(0,A.lastIndexOf("/")+1):"",C=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},y&&(S=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),function(e,t,i){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):i()},r.onerror=i,r.send(null)},function(e){document.title=e}}var M=d.print||console.log.bind(console),k=d.printErr||console.warn.bind(console);for(c in _)_.hasOwnProperty(c)&&(d[c]=_[c]);function P(e){X(Te);var t=pe[Te>>2],i=t+e+15&-16;return i>ei()&&at("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly"),pe[Te>>2]=i,t}function I(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 X(t%8==0,"getNativeTypeSize invalid bits "+t+", type "+e),t/8}return 0}}function R(e){R.shown||(R.shown={}),R.shown[e]||(R.shown[e]=1,k(e))}_=null,d.arguments&&(p=d.arguments),Object.getOwnPropertyDescriptor(d,"arguments")||Object.defineProperty(d,"arguments",{configurable:!0,get:function(){at("Module.arguments has been replaced with plain arguments_")}}),d.thisProgram&&(m=d.thisProgram),Object.getOwnPropertyDescriptor(d,"thisProgram")||Object.defineProperty(d,"thisProgram",{configurable:!0,get:function(){at("Module.thisProgram has been replaced with plain thisProgram")}}),d.quit&&(b=d.quit),Object.getOwnPropertyDescriptor(d,"quit")||Object.defineProperty(d,"quit",{configurable:!0,get:function(){at("Module.quit has been replaced with plain quit_")}}),X(void 0===d.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.read,"Module.read option was removed (modify read_ in JS)"),X(void 0===d.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),X(void 0===d.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),X(void 0===d.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),Object.getOwnPropertyDescriptor(d,"read")||Object.defineProperty(d,"read",{configurable:!0,get:function(){at("Module.read has been replaced with plain read_")}}),Object.getOwnPropertyDescriptor(d,"readAsync")||Object.defineProperty(d,"readAsync",{configurable:!0,get:function(){at("Module.readAsync has been replaced with plain readAsync")}}),Object.getOwnPropertyDescriptor(d,"readBinary")||Object.defineProperty(d,"readBinary",{configurable:!0,get:function(){at("Module.readBinary has been replaced with plain readBinary")}}),Ea=wa=ga=function(){at("cannot use the stack before compiled code is ready to run, and has provided stack access")};var U={"f64-rem":function(e,t){return e%t},debugger:function(){}},D=1,F=new Array(35);function O(e,t){X(void 0!==e);for(var i=0;i<35;i++)if(!F[i])return F[i]=e,D+i;throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."}var L,B,N,z=0,H=function(){return z};function V(e,t,i,r){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":ce[e>>0]=t;break;case"i16":de[e>>1]=t;break;case"i32":pe[e>>2]=t;break;case"i64":ft=[t>>>0,(lt=t,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[e>>2]=ft[0],pe[e+4>>2]=ft[1];break;case"float":be[e>>2]=t;break;case"double":ve[e>>3]=t;break;default:at("invalid type for setValue: "+i)}}d.wasmBinary&&(L=d.wasmBinary),Object.getOwnPropertyDescriptor(d,"wasmBinary")||Object.defineProperty(d,"wasmBinary",{configurable:!0,get:function(){at("Module.wasmBinary has been replaced with plain wasmBinary")}}),d.noExitRuntime&&(B=d.noExitRuntime),Object.getOwnPropertyDescriptor(d,"noExitRuntime")||Object.defineProperty(d,"noExitRuntime",{configurable:!0,get:function(){at("Module.noExitRuntime has been replaced with plain noExitRuntime")}}),"object"!==("undefined"==typeof WebAssembly?"undefined":u(WebAssembly))&&at("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Y=new WebAssembly.Table({initial:4416,element:"anyfunc"}),q=!1;function X(e,t){e||at("Assertion failed: "+t)}function W(e){var t=d["_"+e];return X(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function G(e,t,i,r,n){var a={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);ne(e,t=ga(i),i)}return t},array:function(e){var t=ga(e.length);return le(e,t),t}};var s=W(e),o=[],l=0;if(X("array"!==t,'Return type should not be "array".'),r)for(var f=0;f>2]=0;for(l=s+a;r>0]=0;return s}if("i8"===o)return e.subarray||e.slice?he.set(e,s):he.set(new Uint8Array(e),s),s;for(var f,u,c,h=0;h=r);)++n;if(n-t>16&&e.subarray&&ee)return ee.decode(e.subarray(t,n));for(var a="";t>10,56320|1023&f)}}else a+=String.fromCharCode((31&s)<<6|o)}else a+=String.fromCharCode(s)}return a}function ie(e,t){return e?te(he,e,t):""}function re(e,t,i,r){if(!(r>0))return 0;for(var n=i,a=i+r-1,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(o<=127){if(i>=a)break;t[i++]=o}else if(o<=2047){if(i+1>=a)break;t[i++]=192|o>>6,t[i++]=128|63&o}else if(o<=65535){if(i+2>=a)break;t[i++]=224|o>>12,t[i++]=128|o>>6&63,t[i++]=128|63&o}else{if(i+3>=a)break;o>=2097152&&R("Invalid Unicode code point 0x"+o.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[i++]=240|o>>18,t[i++]=128|o>>12&63,t[i++]=128|o>>6&63,t[i++]=128|63&o}}return t[i]=0,i-n}function ne(e,t,i){return X("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),re(e,he,t,i)}function ae(e){for(var t=0,i=0;i=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++i)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function se(e){var t=ae(e)+1,i=ya(t);return i&&re(e,ce,i,t),i}function oe(e){var t=ae(e)+1,i=ga(t);return re(e,ce,i,t),i}function le(e,t){X(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),ce.set(e,t)}function fe(e,t,i){for(var r=0;r>0]=e.charCodeAt(r);i||(ce[t>>0]=0)}var ue,ce,he,de,_e,pe,me,be,ve,ye=16384,ge=65536;function we(e,t){return e%t>0&&(e+=t-e%t),e}function Ee(e){ue=e,d.HEAP8=ce=new Int8Array(e),d.HEAP16=de=new Int16Array(e),d.HEAP32=pe=new Int32Array(e),d.HEAPU8=he=new Uint8Array(e),d.HEAPU16=_e=new Uint16Array(e),d.HEAPU32=me=new Uint32Array(e),d.HEAPF32=be=new Float32Array(e),d.HEAPF64=ve=new Float64Array(e)}var Ce=1127120,Se=637e4,je=637e4,Te=1126896;X(Ce%16==0,"stack must start aligned"),X(je%16==0,"heap must start aligned");var Ae=5242880;d.TOTAL_STACK&&X(Ae===d.TOTAL_STACK,"the stack size can no longer be determined at runtime");var xe=d.TOTAL_MEMORY||1073741824;function Me(){X(0==(3&Se)),me[(Se>>2)-1]=34821223,me[(Se>>2)-2]=2310721022,pe[0]=1668509029}function ke(){var e=me[(Se>>2)-1],t=me[(Se>>2)-2];34821223==e&&2310721022==t||at("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==pe[0]&&at("Runtime error: The application has corrupted its heap memory area (address zero)!")}function Pe(e){at("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(Se-Ea()+e)+" bytes available!")}function Ie(e,t){var i="";for(var r in kr){var n=kr[r];n[e]&&(i+='as sig "'+r+'" pointing to function '+n[e]+", ")}at("Invalid function pointer "+e+" called with signature '"+t+"'. 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). This pointer might make sense in another type signature: "+i)}function Re(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?d.dynCall_v(i):d.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}}Object.getOwnPropertyDescriptor(d,"TOTAL_MEMORY")||Object.defineProperty(d,"TOTAL_MEMORY",{configurable:!0,get:function(){at("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY")}}),X(xe>=Ae,"TOTAL_MEMORY should be larger than TOTAL_STACK, was "+xe+"! (TOTAL_STACK="+Ae+")"),X("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"),(N=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:xe/ge}))&&(ue=N.buffer),X((xe=ue.byteLength)%ge==0),Ee(ue),pe[Te>>2]=je,function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!"}();var Ue=[],De=[],Fe=[],Oe=[],Le=!1,Be=!1;function Ne(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)qe(d.preRun.shift());Re(Ue)}function ze(){ke(),X(!Le),Le=!0,d.noFSInit||Ut.init.initialized||Ut.init(),At.init(),Re(De)}function He(){ke(),Ut.ignorePermissions=!1,Re(Fe)}function Ve(){ke(),Be=!0}function Ye(){if(ke(),d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)Xe(d.postRun.shift());Re(Oe)}function qe(e){Ue.unshift(e)}function Xe(e){Oe.unshift(e)}X(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),X(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),X(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),X(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var We=Math.abs,Ge=Math.ceil,Ke=Math.floor,Qe=Math.min,Ze=Math.trunc,Je=0,$e=null,et=null,tt={};function it(e){for(var t=e;;){if(!tt[e])return e;e=t+Math.random()}return e}function rt(e){Je++,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(X(!tt[e]),tt[e]=1,null===$e&&"undefined"!=typeof setInterval&&($e=setInterval((function(){if(q)return clearInterval($e),void($e=null);var e=!1;for(var t in tt)e||(e=!0,k("still waiting on run dependencies:")),k("dependency: "+t);e&&k("(end of list)")}),1e4))):k("warning: run dependency added without ID")}function nt(e){if(Je--,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(X(tt[e]),delete tt[e]):k("warning: run dependency removed without ID"),0==Je&&(null!==$e&&(clearInterval($e),$e=null),et)){var t=et;et=null,t()}}function at(e){d.onAbort&&d.onAbort(e),M(e+=""),k(e),q=!0,1;throw"abort("+e+") at "+gt()}d.preloadedImages={},d.preloadedAudios={},h||qe((function(){"undefined"!=typeof SharedArrayBuffer&&(rt("pthreads"),PThread.allocateUnusedWorkers(5,(function(){nt("pthreads")})))}));var st="data:application/octet-stream;base64,";function ot(e){return String.prototype.startsWith?e.startsWith(st):0===e.indexOf(st)}var lt,ft,ut="missile-v20210925.wasm";function ct(){try{if(L)return new Uint8Array(L);if(S)return S(ut);throw"both async and sync fetching of the wasm failed"}catch(e){at(e)}}function ht(){return L||!v&&!y||"function"!=typeof fetch?new Promise((function(e,t){e(ct())})):fetch(ut,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ut+"'";return e.arrayBuffer()})).catch((function(){return ct()}))}function dt(){var e={env:ca,wasi_unstable:ca,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:U};function t(e,t){var i=e.exports;d.asm=i,nt("wasm-instantiate")}rt("wasm-instantiate");var i=d;function r(e){X(d===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance)}function n(t){return ht().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){k("failed to asynchronously prepare wasm: "+e),at(e)}))}if(d.instantiateWasm)try{return d.instantiateWasm(e,t)}catch(e){return k("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(L||"function"!=typeof WebAssembly.instantiateStreaming||ot(ut)||"function"!=typeof fetch)return n(r);fetch(ut,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){k("wasm streaming compile failed: "+e),k("falling back to ArrayBuffer instantiation"),n(r)}))}))}(),{}}ot(ut)||(ut=x(ut)),d.asm=dt;var _t=[function(){"undefined"!=typeof window?window.dispatchEvent(new CustomEvent("wasmLoaded")):r.onWASMLoaded&&r.onWASMLoaded()}];function pt(e){return _t[e]()}De.push({func:function(){_a()}});var mt=1127104;function bt(e){return R("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function vt(e){return e.replace(/\b__Z[\w\d_]+/g,(function(e){var t=bt(e);return e===t?e:t+" ["+e+"]"}))}function yt(){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 gt(){var e=yt();return d.extraStackTrace&&(e+="\n"+d.extraStackTrace()),vt(e)}X(mt%8==0);var wt={};function Et(e){var t,i;Et.called?(i=pe[e>>2],t=pe[i>>2]):(Et.called=!0,wt.USER="web_user",wt.LOGNAME="web_user",wt.PATH="/",wt.PWD="/",wt.HOME="/home/web_user",wt.LANG=("object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",wt._=m,t=$(1024),i=$(256),pe[i>>2]=t,pe[e>>2]=i);var r=[],n=0;for(var a in wt)if("string"==typeof wt[a]){var s=a+"="+wt[a];r.push(s),n+=s.length}if(n>1024)throw new Error("Environment size exceeded TOTAL_ENV_SIZE!");for(var o=0;o>2]=t,t+=s.length+1}pe[i+4*r.length>>2]=0}function Ct(){}function St(e){return d.___errno_location?pe[d.___errno_location()>>2]=e:k("failed to set errno from JS"),e}var jt={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i;i--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),i="/"===e.substr(-1);return(e=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&i&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=jt.splitPath(e),i=t[0],r=t[1];return i||r?(r&&(r=r.substr(0,r.length-1)),i+r):"."},basename:function(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return jt.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return jt.normalize(e.join("/"))},join2:function(e,t){return jt.normalize(e+"/"+t)}},Tt={resolve:function(){for(var e="",t=!1,i=arguments.length-1;i>=-1&&!t;i--){var r=i>=0?arguments[i]:Ut.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t="/"===r.charAt(0)}return(t?"/":"")+(e=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function i(e){for(var t=0;t=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=Tt.resolve(e).substr(1),t=Tt.resolve(t).substr(1);for(var r=i(e.split("/")),n=i(t.split("/")),a=Math.min(r.length,n.length),s=a,o=0;o0?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=Ni(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(M(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(M(te(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(k(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(k(te(e.output,0)),e.output=[])}}},xt={ops_table:null,mount:function(e){return xt.createNode(null,"/",16895,0)},createNode:function(e,t,i,r){if(Ut.isBlkdev(i)||Ut.isFIFO(i))throw new Ut.ErrnoError(63);xt.ops_table||(xt.ops_table={dir:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,lookup:xt.node_ops.lookup,mknod:xt.node_ops.mknod,rename:xt.node_ops.rename,unlink:xt.node_ops.unlink,rmdir:xt.node_ops.rmdir,readdir:xt.node_ops.readdir,symlink:xt.node_ops.symlink},stream:{llseek:xt.stream_ops.llseek}},file:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:{llseek:xt.stream_ops.llseek,read:xt.stream_ops.read,write:xt.stream_ops.write,allocate:xt.stream_ops.allocate,mmap:xt.stream_ops.mmap,msync:xt.stream_ops.msync}},link:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,readlink:xt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:Ut.chrdev_stream_ops}});var n=Ut.createNode(e,t,i,r);return Ut.isDir(n.mode)?(n.node_ops=xt.ops_table.dir.node,n.stream_ops=xt.ops_table.dir.stream,n.contents={}):Ut.isFile(n.mode)?(n.node_ops=xt.ops_table.file.node,n.stream_ops=xt.ops_table.file.stream,n.usedBytes=0,n.contents=null):Ut.isLink(n.mode)?(n.node_ops=xt.ops_table.link.node,n.stream_ops=xt.ops_table.link.stream):Ut.isChrdev(n.mode)&&(n.node_ops=xt.ops_table.chrdev.node,n.stream_ops=xt.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=[],i=0;i=t)){t=Math.max(t,i*(i<1048576?2:1.125)|0),0!=i&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),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 i=e.contents;return e.contents=new Uint8Array(new ArrayBuffer(t)),i&&e.contents.set(i.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=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-n,r);if(X(s>=0),s>8&&a.subarray)t.set(a.subarray(n,n+s),i);else for(var o=0;o0||n+rs.timestamp)&&(n.push(i),r++)}));var a=[];if(Object.keys(t.entries).forEach((function(i){t.entries[i];e.entries[i]||(a.push(i),r++)})),!r)return i(null);var s=!1,o=("remote"===e.type?e.db:t.db).transaction([Mt.DB_STORE_NAME],"readwrite"),l=o.objectStore(Mt.DB_STORE_NAME);function f(e){if(e&&!s)return s=!0,i(e)}o.onerror=function(e){f(this.error),e.preventDefault()},o.oncomplete=function(e){s||i(null)},n.sort().forEach((function(e){"local"===t.type?Mt.loadRemoteEntry(l,e,(function(t,i){if(t)return f(t);Mt.storeLocalEntry(e,i,f)})):Mt.loadLocalEntry(e,(function(t,i){if(t)return f(t);Mt.storeRemoteEntry(l,e,i,f)}))})),a.sort().reverse().forEach((function(e){"local"===t.type?Mt.removeLocalEntry(e,f):Mt.removeRemoteEntry(l,e,f)}))}},kt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Pt={isWindows:!1,staticInit:function(){Pt.isWindows=!!i.platform.match(/^win/);var e=i.binding("constants");e.fs&&(e=e.fs),Pt.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)},convertNodeCode:function(e){var t=e.code;return X(t in kt),kt[t]},mount:function(e){return X(w),Pt.createNode(null,"/",Pt.getMode(e.opts.root),0)},createNode:function(e,t,i,r){if(!Ut.isDir(i)&&!Ut.isFile(i)&&!Ut.isLink(i))throw new Ut.ErrnoError(28);var n=Ut.createNode(e,t,i);return n.node_ops=Pt.node_ops,n.stream_ops=Pt.stream_ops,n},getMode:function(e){var t;try{t=Li.lstatSync(e),Pt.isWindows&&(t.mode=t.mode|(292&t.mode)>>2)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}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(),jt.join.apply(null,t)},flagsForNode:function(e){e&=-2097153,e&=-2049,e&=-32769,e&=-524289;var t=0;for(var i in Pt.flagsForNodeMap)e&i&&(t|=Pt.flagsForNodeMap[i],e^=i);if(e)throw new Ut.ErrnoError(28);return t},node_ops:{getattr:function(e){var t,i=Pt.realPath(e);try{t=Li.lstatSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}return Pt.isWindows&&!t.blksize&&(t.blksize=4096),Pt.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 i=Pt.realPath(e);try{if(void 0!==t.mode&&(Li.chmodSync(i,t.mode),e.mode=t.mode),void 0!==t.timestamp){var r=new Date(t.timestamp);Li.utimesSync(i,r,r)}void 0!==t.size&&Li.truncateSync(i,t.size)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},lookup:function(e,t){var i=jt.join2(Pt.realPath(e),t),r=Pt.getMode(i);return Pt.createNode(e,t,r)},mknod:function(e,t,i,r){var n=Pt.createNode(e,t,i,r),a=Pt.realPath(n);try{Ut.isDir(n.mode)?Li.mkdirSync(a,n.mode):Li.writeFileSync(a,"",{mode:n.mode})}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}return n},rename:function(e,t,i){var r=Pt.realPath(e),n=jt.join2(Pt.realPath(t),i);try{Li.renameSync(r,n)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},unlink:function(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.unlinkSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},rmdir:function(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.rmdirSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},readdir:function(e){var t=Pt.realPath(e);try{return Li.readdirSync(t)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},symlink:function(e,t,i){var r=jt.join2(Pt.realPath(e),t);try{Li.symlinkSync(i,r)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},readlink:function(e){var t=Pt.realPath(e);try{return t=Li.readlinkSync(t),t=Bi.relative(Bi.resolve(e.mount.opts.root),t)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}}},stream_ops:{open:function(e){var t=Pt.realPath(e.node);try{Ut.isFile(e.node.mode)&&(e.nfd=Li.openSync(t,Pt.flagsForNode(e.flags)))}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},close:function(e){try{Ut.isFile(e.node.mode)&&e.nfd&&Li.closeSync(e.nfd)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},read:function(e,t,i,r,n){if(0===r)return 0;try{return Li.readSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n)}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},write:function(e,t,i,r,n){try{return Li.writeSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n)}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},llseek:function(e,t,i){var r=t;if(1===i)r+=e.position;else if(2===i&&Ut.isFile(e.node.mode))try{r+=Li.fstatSync(e.nfd).size}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}if(r<0)throw new Ut.ErrnoError(28);return r}}},It={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(e){X(y),It.reader||(It.reader=new FileReaderSync);var t=It.createNode(null,"/",It.DIR_MODE,0),i={};function r(e){for(var r=e.split("/"),n=t,a=0;a=e.node.size)return 0;var a=e.node.contents.slice(n,n+r),s=It.reader.readAsArrayBuffer(a);return t.set(new Uint8Array(s),i),a.size},write:function(e,t,i,r,n){throw new Ut.ErrnoError(29)},llseek:function(e,t,i){var r=t;if(1===i?r+=e.position:2===i&&Ut.isFile(e.node.mode)&&(r+=e.node.size),r<0)throw new Ut.ErrnoError(28);return r}}},Rt={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Ut={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 Ut.ErrnoError))throw e+" : "+gt();return St(e.errno)},lookupPath:function(e,t){if(t=t||{},!(e=Tt.resolve(Ut.cwd(),e)))return{path:"",node:null};var i={follow_mount:!0,recurse_count:0};for(var r in i)void 0===t[r]&&(t[r]=i[r]);if(t.recurse_count>8)throw new Ut.ErrnoError(32);for(var n=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),a=Ut.root,s="/",o=0;o40)throw new Ut.ErrnoError(32)}}return{path:s,node:a}},getPath:function(e){for(var t;;){if(Ut.isRoot(e)){var i=e.mount.mountpoint;return t?"/"!==i[i.length-1]?i+"/"+t:i+t:i}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var i=0,r=0;r>>0)%Ut.nameTable.length},hashAddNode:function(e){var t=Ut.hashName(e.parent.id,e.name);e.name_next=Ut.nameTable[t],Ut.nameTable[t]=e},hashRemoveNode:function(e){var t=Ut.hashName(e.parent.id,e.name);if(Ut.nameTable[t]===e)Ut.nameTable[t]=e.name_next;else for(var i=Ut.nameTable[t];i;){if(i.name_next===e){i.name_next=e.name_next;break}i=i.name_next}},lookupNode:function(e,t){var i=Ut.mayLookup(e);if(i)throw new Ut.ErrnoError(i,e);for(var r=Ut.hashName(e.id,t),n=Ut.nameTable[r];n;n=n.name_next){var a=n.name;if(n.parent.id===e.id&&a===t)return n}return Ut.lookup(e,t)},createNode:function(e,t,i,r){if(!Ut.FSNode){Ut.FSNode=function(e,t,i,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ut.nextInode++,this.name=t,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=r},Ut.FSNode.prototype={};Object.defineProperties(Ut.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 Ut.isDir(this.mode)}},isDevice:{get:function(){return Ut.isChrdev(this.mode)}}})}var n=new Ut.FSNode(e,t,i,r);return Ut.hashAddNode(n),n},destroyNode:function(e){Ut.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=Ut.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 Ut.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){var t=Ut.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{Ut.lookupNode(e,t);return 20}catch(e){}return Ut.nodePermissions(e,"wx")},mayDelete:function(e,t,i){var r;try{r=Ut.lookupNode(e,t)}catch(e){return e.errno}var n=Ut.nodePermissions(e,"wx");if(n)return n;if(i){if(!Ut.isDir(r.mode))return 54;if(Ut.isRoot(r)||Ut.getPath(r)===Ut.cwd())return 10}else if(Ut.isDir(r.mode))return 31;return 0},mayOpen:function(e,t){return e?Ut.isLink(e.mode)?32:Ut.isDir(e.mode)&&("r"!==Ut.flagsToPermissionString(t)||512&t)?31:Ut.nodePermissions(e,Ut.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||Ut.MAX_OPEN_FDS;for(var i=e;i<=t;i++)if(!Ut.streams[i])return i;throw new Ut.ErrnoError(33)},getStream:function(e){return Ut.streams[e]},createStream:function(e,t,i){Ut.FSStream||(Ut.FSStream=function(){},Ut.FSStream.prototype={},Object.defineProperties(Ut.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 r=new Ut.FSStream;for(var n in e)r[n]=e[n];e=r;var a=Ut.nextfd(t,i);return e.fd=a,Ut.streams[a]=e,e},closeStream:function(e){Ut.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=Ut.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new Ut.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){Ut.devices[e]={stream_ops:t}},getDevice:function(e){return Ut.devices[e]},getMounts:function(e){for(var t=[],i=[e];i.length;){var r=i.pop();t.push(r),i.push.apply(i,r.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),Ut.syncFSRequests++,Ut.syncFSRequests>1&&Ut.syncFSRequests;var i=Ut.getMounts(Ut.root.mount),r=0;function n(e){return X(Ut.syncFSRequests>0),Ut.syncFSRequests--,t(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,n(e));++r>=i.length&&n(null)}i.forEach((function(t){if(!t.type.syncfs)return a(null);t.type.syncfs(t,e,a)}))},mount:function(e,t,i){var r,n="/"===i,a=!i;if(n&&Ut.root)throw new Ut.ErrnoError(10);if(!n&&!a){var s=Ut.lookupPath(i,{follow_mount:!1});if(i=s.path,r=s.node,Ut.isMountpoint(r))throw new Ut.ErrnoError(10);if(!Ut.isDir(r.mode))throw new Ut.ErrnoError(54)}var o={type:e,opts:t,mountpoint:i,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,n?Ut.root=l:r&&(r.mounted=o,r.mount&&r.mount.mounts.push(o)),l},unmount:function(e){var t=Ut.lookupPath(e,{follow_mount:!1});if(!Ut.isMountpoint(t.node))throw new Ut.ErrnoError(28);var i=t.node,r=i.mounted,n=Ut.getMounts(r);Object.keys(Ut.nameTable).forEach((function(e){for(var t=Ut.nameTable[e];t;){var i=t.name_next;-1!==n.indexOf(t.mount)&&Ut.destroyNode(t),t=i}})),i.mounted=null;var a=i.mount.mounts.indexOf(r);X(-1!==a),i.mount.mounts.splice(a,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,i){var r=Ut.lookupPath(e,{parent:!0}).node,n=jt.basename(e);if(!n||"."===n||".."===n)throw new Ut.ErrnoError(28);var a=Ut.mayCreate(r,n);if(a)throw new Ut.ErrnoError(a);if(!r.node_ops.mknod)throw new Ut.ErrnoError(63);return r.node_ops.mknod(r,n,t,i)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Ut.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Ut.mknod(e,t,0)},mkdirTree:function(e,t){for(var i=e.split("/"),r="",n=0;nthis.length-1||e<0)){var t=e%this.chunkSize,i=e/this.chunkSize|0;return this.getter(i)[t]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,s=1048576;n||(s=r);var o=this;o.setDataGetter((function(e){var t=e*s,n=(e+1)*s-1;if(n=Math.min(n,r-1),void 0===o.chunks[e]&&(o.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",i,!1),r!==s&&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 "+i+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):Ni(n.responseText||"",!0)}(t,n)),void 0===o.chunks[e])throw new Error("doXHR failed!");return o.chunks[e]})),!a&&r||(s=r=1,r=this.getter(0).length,s=r),this._length=r,this._chunkSize=s,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!y)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var o={isDevice:!1,contents:s}}else o={isDevice:!1,url:i};var l=Ut.createFile(e,t,o,r,n);o.contents?l.contents=o.contents:o.url&&(l.contents=null,l.url=o.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var f={};return Object.keys(l.stream_ops).forEach((function(e){var t=l.stream_ops[e];f[e]=function(){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);return t.apply(null,arguments)}})),f.read=function(e,t,i,r,n){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);var a=e.node.contents;if(n>=a.length)return 0;var s=Math.min(a.length-n,r);if(X(s>=0),a.slice)for(var o=0;o>2]=r.dev,pe[i+4>>2]=0,pe[i+8>>2]=r.ino,pe[i+12>>2]=r.mode,pe[i+16>>2]=r.nlink,pe[i+20>>2]=r.uid,pe[i+24>>2]=r.gid,pe[i+28>>2]=r.rdev,pe[i+32>>2]=0,ft=[r.size>>>0,(lt=r.size,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+40>>2]=ft[0],pe[i+44>>2]=ft[1],pe[i+48>>2]=4096,pe[i+52>>2]=r.blocks,pe[i+56>>2]=r.atime.getTime()/1e3|0,pe[i+60>>2]=0,pe[i+64>>2]=r.mtime.getTime()/1e3|0,pe[i+68>>2]=0,pe[i+72>>2]=r.ctime.getTime()/1e3|0,pe[i+76>>2]=0,ft=[r.ino>>>0,(lt=r.ino,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+80>>2]=ft[0],pe[i+84>>2]=ft[1],0},doMsync:function(e,t,i,r){var n=new Uint8Array(he.subarray(e,e+i));Ut.msync(t,n,0,i,r)},doMkdir:function(e,t){return"/"===(e=jt.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),Ut.mkdir(e,t,0),0},doMknod:function(e,t,i){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Ut.mknod(e,t,i),0},doReadlink:function(e,t,i){if(i<=0)return-28;var r=Ut.readlink(e),n=Math.min(i,ae(r)),a=ce[t+n];return ne(r,t,i+1),ce[t+n]=a,n},doAccess:function(e,t){if(-8&t)return-28;var i;if(!(i=Ut.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&Ut.nodePermissions(i,r)?-2:0},doDup:function(e,t,i){var r=Ut.getStream(i);return r&&Ut.close(r),Ut.open(e,t,0,i,i).fd},doReadv:function(e,t,i,r){for(var n=0,a=0;a>2],o=pe[t+(8*a+4)>>2],l=Ut.read(e,ce,s,o,r);if(l<0)return-1;if(n+=l,l>2],o=pe[t+(8*a+4)>>2],l=Ut.write(e,ce,s,o,r);if(l<0)return-1;n+=l}return n},varargs:0,get:function(e){return Dt.varargs+=4,pe[Dt.varargs-4>>2]},getStr:function(){return ie(Dt.get())},getStreamFromFD:function(e){void 0===e&&(e=Dt.get());var t=Ut.getStream(e);if(!t)throw new Ut.ErrnoError(8);return t},get64:function(){var e=Dt.get(),t=Dt.get();return X(e>=0?0===t:-1===t),e},getZero:function(){X(0===Dt.get())}};function Ft(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD();switch(Dt.get()){case 0:return(r=Dt.get())<0?-28:Ut.open(i.path,i.flags,0,r).fd;case 1:case 2:return 0;case 3:return i.flags;case 4:var r=Dt.get();return i.flags|=r,0;case 12:r=Dt.get();return de[r+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return St(28),-1;default:return-28}}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Ot(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD(),r=Dt.get(),n=Dt.get();return Ut.read(i,ce,r,n)}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Lt(e,t){Dt.varargs=t;try{var i=Dt.getStr(),r=Dt.get(),n=Dt.get();return Ut.open(i,r,n).fd}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Bt(){}function Nt(e){try{var t=Dt.getStreamFromFD(e);return Ut.close(t),0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function zt(){return Nt.apply(null,arguments)}function Ht(e,t){try{var i=Dt.getStreamFromFD(e),r=i.tty?2:Ut.isDir(i.mode)?3:Ut.isLink(i.mode)?7:4;return ce[t>>0]=r,0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function Vt(){return Ht.apply(null,arguments)}function Yt(e,t,i,r,n){try{var a=Dt.getStreamFromFD(e),s=4294967296*i+(t>>>0);return s<=-9007199254740992||s>=9007199254740992?-61:(Ut.llseek(a,s,r),ft=[a.position>>>0,(lt=a.position,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[n>>2]=ft[0],pe[n+4>>2]=ft[1],a.getdents&&0===s&&0===r&&(a.getdents=null),0)}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function qt(){return Yt.apply(null,arguments)}function Xt(e,t,i,r){try{var n=Dt.getStreamFromFD(e),a=Dt.doWritev(n,t,i);return pe[r>>2]=a,0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function Wt(){return Xt.apply(null,arguments)}function Gt(e){delete ni.xhrs[e-1]}function Kt(){at()}function Qt(){return void 0===Qt.start&&(Qt.start=Date.now()),1e3*(Date.now()-Qt.start)|0}function Zt(){at()}function Jt(){return g||"undefined"!=typeof dateNow||"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now}function $t(e,t){var i;if(0===e)i=Date.now();else{if(1!==e||!Jt())return St(28),-1;i=Zt()}return pe[t>>2]=i/1e3|0,pe[t+4>>2]=i%1e3*1e3*1e3|0,0}function ei(){return ce.length}function ti(){return!y}function ii(e){try{return N.grow(e-ue.byteLength+65535>>16),Ee(N.buffer),1}catch(t){console.error("emscripten_realloc_buffer: Attempted to grow heap from "+ue.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function ri(e){var t=ei();X(e>t);if(e>2147418112)return k("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147418112 bytes!"),!1;for(var i=Math.max(t,16777216);i>2]=t,me[e+4>>2]=t/4294967296|0},openDatabase:function(e,t,i,r){try{var n=indexedDB.open(e,t)}catch(e){return r(e)}n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains("FILES")&&t.deleteObjectStore("FILES"),t.createObjectStore("FILES")},n.onsuccess=function(e){i(e.target.result)},n.onerror=function(e){r(e)}},staticInit:function(){var e="undefined"==typeof ENVIRONMENT_IS_FETCH_WORKER;ni.openDatabase("emscripten_filesystem",1,(function(t){ni.dbInstance=t,e&&nt("library_fetch_init")}),(function(){ni.dbInstance=!1,e&&nt("library_fetch_init")})),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||rt("library_fetch_init")}};function ai(e,t,i,r,n){var a=me[e+8>>2];if(a){var s=ie(a),o=e+112,l=ie(o);l||(l="GET");me[o+32>>2];var f=me[o+52>>2],u=me[o+56>>2],c=!!me[o+60>>2],h=(me[o+64>>2],me[o+68>>2]),d=me[o+72>>2],_=me[o+76>>2],p=me[o+80>>2],m=me[o+84>>2],b=me[o+88>>2],v=!!(1&f),y=!!(2&f),g=!!(64&f),w=h?ie(h):void 0,E=d?ie(d):void 0,C=p?ie(p):void 0,S=new XMLHttpRequest;if(S.withCredentials=c,S.open(l,s,!g,w,E),g||(S.timeout=u),S.url_=s,X(!y,"streaming uses moz-chunked-arraybuffer which is no longer supported; TODO: rewrite using fetch()"),S.responseType="arraybuffer",p&&S.overrideMimeType(C),_)for(;;){var j=me[_>>2];if(!j)break;var T=me[_+4>>2];if(!T)break;_+=8;var A=ie(j),x=ie(T);S.setRequestHeader(A,x)}ni.xhrs.push(S);var M=ni.xhrs.length;me[e+0>>2]=M;var k=m&&b?he.slice(m,m+b):null;S.onload=function(r){var n=S.response?S.response.byteLength:0,a=0,s=0;v&&!y&&(a=ya(s=n),he.set(new Uint8Array(S.response),a)),me[e+12>>2]=a,ni.setu64(e+16,s),ni.setu64(e+24,0),n&&ni.setu64(e+32,n),_e[e+40>>1]=S.readyState,4===S.readyState&&0===S.status&&(S.status=n>0?200:404),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),S.status>=200&&S.status<300?t&&t(e,S,r):i&&i(e,S,r)},S.onerror=function(t){var r=S.status;4===S.readyState&&0===r&&(r=404),me[e+12>>2]=0,ni.setu64(e+16,0),ni.setu64(e+24,0),ni.setu64(e+32,0),_e[e+40>>1]=S.readyState,_e[e+42>>1]=r,i&&i(e,S,t)},S.ontimeout=function(t){i&&i(e,S,t)},S.onprogress=function(t){var i=v&&y&&S.response?S.response.byteLength:0,n=0;v&&y&&(n=ya(i),he.set(new Uint8Array(S.response),n)),me[e+12>>2]=n,ni.setu64(e+16,i),ni.setu64(e+24,t.loaded-i),ni.setu64(e+32,t.total),_e[e+40>>1]=S.readyState,S.readyState>=3&&0===S.status&&t.loaded>0&&(S.status=200),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),r&&r(e,S,t)},S.onreadystatechange=function(t){_e[e+40>>1]=S.readyState,S.readyState>=2&&(_e[e+42>>1]=S.status),n&&n(e,S,t)};try{S.send(k)}catch(t){i&&i(e,S,t)}}else i(e,0,"no url specified!")}function si(e,t,i,r,n){if(e){var a=me[t+112+64>>2];a||(a=me[t+8>>2]);var s=ie(a);try{var o=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(i,s);o.onsuccess=function(e){_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),r(t,0,s)},o.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=413,ne("Payload Too Large",t+44,64),n(t,0,e)}}catch(e){n(t,0,e)}}else n(t,0,"IndexedDB not available!")}function oi(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readonly").objectStore("FILES").get(a);s.onsuccess=function(e){if(e.target.result){var n=e.target.result,a=n.byteLength||n.length,s=ya(a);he.set(new Uint8Array(n),s),me[t+12>>2]=s,ni.setu64(t+16,a),ni.setu64(t+24,0),ni.setu64(t+32,a),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,n)}else _e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,"no data")},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e)}}catch(e){r(t,0,e)}}else r(t,0,"IndexedDB not available!")}function li(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readwrite").objectStore("FILES").delete(a);s.onsuccess=function(e){var r=e.target.result;me[t+12>>2]=0,ni.setu64(t+16,0),ni.setu64(t+24,0),ni.setu64(t+32,0),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,r)},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e)}}catch(e){r(t,0,e)}}else r(t,0,"IndexedDB not available!")}function fi(e,t,i,r,n){void 0!==B&&(B=!0);var a=e+112,s=ie(a),o=me[a+36>>2],l=me[a+40>>2],f=me[a+44>>2],u=me[a+48>>2],c=me[a+52>>2],h=!!(4&c),d=!!(32&c),_=!!(16&c),p=function(e,i,r){o?Ca(o,e):t&&t(e)},m=function(e,t,i){f?Ca(f,e):r&&r(e)},b=function(e,t,r){l?Ca(l,e):i&&i(e)},v=function(e,t,i){u?Ca(u,e):n&&n(e)},y=function(e,i,r){si(ni.dbInstance,e,i.response,(function(e,i,r){o?Ca(o,e):t&&t(e)}),(function(e,i,r){o?Ca(o,e):t&&t(e)}))};if("EM_IDB_STORE"===s){var g=me[a+84>>2];si(ni.dbInstance,e,he.slice(g,g+me[a+88>>2]),p,b)}else if("EM_IDB_DELETE"===s)li(ni.dbInstance,e,p,b);else if(_){if(d)return 0;ai(e,h?y:p,b,m,v)}else oi(ni.dbInstance,e,p,d?b:h?function(e,t,i){ai(e,y,b,m,v)}:function(e,t,i){ai(e,p,b,m,v)});return e}var ui=We;function ci(e){return 0===e?0:(e=ie(e),wt.hasOwnProperty(e)?(ci.ret&&va(ci.ret),ci.ret=se(wt[e]),ci.ret):0)}function hi(e){var t=Date.now();return pe[e>>2]=t/1e3|0,pe[e+4>>2]=t%1e3*1e3|0,0}var di=(ne("GMT",1126992,4),1126992);function _i(e,t){var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getUTCSeconds(),pe[t+4>>2]=i.getUTCMinutes(),pe[t+8>>2]=i.getUTCHours(),pe[t+12>>2]=i.getUTCDate(),pe[t+16>>2]=i.getUTCMonth(),pe[t+20>>2]=i.getUTCFullYear()-1900,pe[t+24>>2]=i.getUTCDay(),pe[t+36>>2]=0,pe[t+32>>2]=0;var r=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),n=(i.getTime()-r)/864e5|0;return pe[t+28>>2]=n,pe[t+40>>2]=di,t}function pi(e){return Math.pow(2,e)}function mi(e){return pi(e)}function bi(e){return Math.log(e)/Math.LN2}function vi(e){var t=yi,i=t.LLVM_SAVEDSTACKS[e];t.LLVM_SAVEDSTACKS.splice(e,1),wa(i)}function yi(){var e=yi;return e.LLVM_SAVEDSTACKS||(e.LLVM_SAVEDSTACKS=[]),e.LLVM_SAVEDSTACKS.push(Ea()),e.LLVM_SAVEDSTACKS.length-1}var gi=Ze;function wi(){if(!wi.called){wi.called=!0,pe[ma()>>2]=60*(new Date).getTimezoneOffset();var e=(new Date).getFullYear(),t=new Date(e,0,1),i=new Date(e,6,1);pe[pa()>>2]=Number(t.getTimezoneOffset()!=i.getTimezoneOffset());var r=o(t),n=o(i),a=J(Ni(r),"i8",Q),s=J(Ni(n),"i8",Q);i.getTimezoneOffset()>2]=a,pe[ba()+4>>2]=s):(pe[ba()>>2]=s,pe[ba()+4>>2]=a)}function o(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}}function Ei(e,t){wi();var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getSeconds(),pe[t+4>>2]=i.getMinutes(),pe[t+8>>2]=i.getHours(),pe[t+12>>2]=i.getDate(),pe[t+16>>2]=i.getMonth(),pe[t+20>>2]=i.getFullYear()-1900,pe[t+24>>2]=i.getDay();var r=new Date(i.getFullYear(),0,1),n=(i.getTime()-r.getTime())/864e5|0;pe[t+28>>2]=n,pe[t+36>>2]=-60*i.getTimezoneOffset();var a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),s=r.getTimezoneOffset(),o=0|(a!=s&&i.getTimezoneOffset()==Math.min(s,a));pe[t+32>>2]=o;var l=pe[ba()+(o?4:0)>>2];return pe[t+40>>2]=l,t}function Ci(e,t,i){he.set(he.subarray(t,t+i),e)}function Si(e){var t=e/1e3;if((v||y)&&self.performance&&self.performance.now)for(var i=self.performance.now();self.performance.now()-i>2],r=pe[e+4>>2];return r<0||r>999999999||i<0?(St(28),-1):(0!==t&&(pe[t>>2]=0,pe[t+4>>2]=0),Si(1e6*i+r/1e3))}function Ti(){return 0}function Ai(){return 0}function xi(){return 6}function Mi(){}function ki(e){return e%4==0&&(e%100!=0||e%400==0)}function Pi(e,t){for(var i=0,r=0;r<=t;i+=e[r++]);return i}var Ii=[31,29,31,30,31,30,31,31,30,31,30,31],Ri=[31,28,31,30,31,30,31,31,30,31,30,31];function Ui(e,t){for(var i=new Date(e.getTime());t>0;){var r=ki(i.getFullYear()),n=i.getMonth(),a=(r?Ii:Ri)[n];if(!(t>a-i.getDate()))return i.setDate(i.getDate()+t),i;t-=a-i.getDate()+1,i.setDate(1),n<11?i.setMonth(n+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1))}return i}function Di(e,t,i,r){var n=pe[r+40>>2],a={tm_sec:pe[r>>2],tm_min:pe[r+4>>2],tm_hour:pe[r+8>>2],tm_mday:pe[r+12>>2],tm_mon:pe[r+16>>2],tm_year:pe[r+20>>2],tm_wday:pe[r+24>>2],tm_yday:pe[r+28>>2],tm_isdst:pe[r+32>>2],tm_gmtoff:pe[r+36>>2],tm_zone:n?ie(n):""},s=ie(i),o={"%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","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in o)s=s.replace(new RegExp(l,"g"),o[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,t,i){for(var r="number"==typeof e?e.toString():e||"";r.length0?1:0}var r;return 0===(r=i(e.getFullYear()-t.getFullYear()))&&0===(r=i(e.getMonth()-t.getMonth()))&&(r=i(e.getDate()-t.getDate())),r}function _(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 p(e){var t=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday),i=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),n=_(i),a=_(r);return d(n,t)<=0?d(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return f[e.tm_wday].substring(0,3)},"%A":function(e){return f[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return h((e.tm_year+1900)/100|0,2)},"%d":function(e){return h(e.tm_mday,2)},"%e":function(e){return c(e.tm_mday,2," ")},"%g":function(e){return p(e).toString().substring(2)},"%G":function(e){return p(e)},"%H":function(e){return h(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),h(t,2)},"%j":function(e){return h(e.tm_mday+Pi(ki(e.tm_year+1900)?Ii:Ri,e.tm_mon-1),3)},"%m":function(e){return h(e.tm_mon+1,2)},"%M":function(e){return h(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 h(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),i=0===t.getDay()?t:Ui(t,7-t.getDay()),r=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(d(i,r)<0){var n=Pi(ki(r.getFullYear())?Ii:Ri,r.getMonth()-1)-31,a=31-i.getDate()+n+r.getDate();return h(Math.ceil(a/7),2)}return 0===d(i,t)?"01":"00"},"%V":function(e){var t,i=new Date(e.tm_year+1900,0,4),r=new Date(e.tm_year+1901,0,4),n=_(i),a=_(r),s=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday);return d(s,n)<0?"53":d(a,s)<=0?"01":(t=n.getFullYear()=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(i?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in m)s.indexOf(l)>=0&&(s=s.replace(new RegExp(l,"g"),m[l](a)));var b=Ni(s,!1);return b.length>t?0:(le(b,e),b.length-1)}function Fi(e){switch(e){case 30:return ye;case 85:return 2147418112/ye;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.hardwareConcurrency||1}return St(28),-1}function Oi(e){var t=Date.now()/1e3|0;return e&&(pe[e>>2]=t),t}if(Ut.staticInit(),w){var Li=e("fs"),Bi=e("path");Pt.staticInit()}function Ni(e,t,i){var r=i>0?i:ae(e)+1,n=new Array(r),a=re(e,n,0,n.length);return t&&(n.length=a),n}Zt=g?function(){var e=i.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof dateNow?dateNow:"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now?function(){return performance.now()}:Date.now,ni.staticInit();var zi=[0,"jsCall_dd_0","jsCall_dd_1","jsCall_dd_2","jsCall_dd_3","jsCall_dd_4","jsCall_dd_5","jsCall_dd_6","jsCall_dd_7","jsCall_dd_8","jsCall_dd_9","jsCall_dd_10","jsCall_dd_11","jsCall_dd_12","jsCall_dd_13","jsCall_dd_14","jsCall_dd_15","jsCall_dd_16","jsCall_dd_17","jsCall_dd_18","jsCall_dd_19","jsCall_dd_20","jsCall_dd_21","jsCall_dd_22","jsCall_dd_23","jsCall_dd_24","jsCall_dd_25","jsCall_dd_26","jsCall_dd_27","jsCall_dd_28","jsCall_dd_29","jsCall_dd_30","jsCall_dd_31","jsCall_dd_32","jsCall_dd_33","jsCall_dd_34","_sinh","_cosh","_tanh","_sin","_cos","_tan","_atan","_asin","_acos","_exp","_log","_fabs","_etime",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Hi=[0,"jsCall_did_0","jsCall_did_1","jsCall_did_2","jsCall_did_3","jsCall_did_4","jsCall_did_5","jsCall_did_6","jsCall_did_7","jsCall_did_8","jsCall_did_9","jsCall_did_10","jsCall_did_11","jsCall_did_12","jsCall_did_13","jsCall_did_14","jsCall_did_15","jsCall_did_16","jsCall_did_17","jsCall_did_18","jsCall_did_19","jsCall_did_20","jsCall_did_21","jsCall_did_22","jsCall_did_23","jsCall_did_24","jsCall_did_25","jsCall_did_26","jsCall_did_27","jsCall_did_28","jsCall_did_29","jsCall_did_30","jsCall_did_31","jsCall_did_32","jsCall_did_33","jsCall_did_34",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,0],Vi=[0,"jsCall_didd_0","jsCall_didd_1","jsCall_didd_2","jsCall_didd_3","jsCall_didd_4","jsCall_didd_5","jsCall_didd_6","jsCall_didd_7","jsCall_didd_8","jsCall_didd_9","jsCall_didd_10","jsCall_didd_11","jsCall_didd_12","jsCall_didd_13","jsCall_didd_14","jsCall_didd_15","jsCall_didd_16","jsCall_didd_17","jsCall_didd_18","jsCall_didd_19","jsCall_didd_20","jsCall_didd_21","jsCall_didd_22","jsCall_didd_23","jsCall_didd_24","jsCall_didd_25","jsCall_didd_26","jsCall_didd_27","jsCall_didd_28","jsCall_didd_29","jsCall_didd_30","jsCall_didd_31","jsCall_didd_32","jsCall_didd_33","jsCall_didd_34",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,0],Yi=[0,"jsCall_fii_0","jsCall_fii_1","jsCall_fii_2","jsCall_fii_3","jsCall_fii_4","jsCall_fii_5","jsCall_fii_6","jsCall_fii_7","jsCall_fii_8","jsCall_fii_9","jsCall_fii_10","jsCall_fii_11","jsCall_fii_12","jsCall_fii_13","jsCall_fii_14","jsCall_fii_15","jsCall_fii_16","jsCall_fii_17","jsCall_fii_18","jsCall_fii_19","jsCall_fii_20","jsCall_fii_21","jsCall_fii_22","jsCall_fii_23","jsCall_fii_24","jsCall_fii_25","jsCall_fii_26","jsCall_fii_27","jsCall_fii_28","jsCall_fii_29","jsCall_fii_30","jsCall_fii_31","jsCall_fii_32","jsCall_fii_33","jsCall_fii_34","_sbr_sum_square_c",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],qi=[0,"jsCall_fiii_0","jsCall_fiii_1","jsCall_fiii_2","jsCall_fiii_3","jsCall_fiii_4","jsCall_fiii_5","jsCall_fiii_6","jsCall_fiii_7","jsCall_fiii_8","jsCall_fiii_9","jsCall_fiii_10","jsCall_fiii_11","jsCall_fiii_12","jsCall_fiii_13","jsCall_fiii_14","jsCall_fiii_15","jsCall_fiii_16","jsCall_fiii_17","jsCall_fiii_18","jsCall_fiii_19","jsCall_fiii_20","jsCall_fiii_21","jsCall_fiii_22","jsCall_fiii_23","jsCall_fiii_24","jsCall_fiii_25","jsCall_fiii_26","jsCall_fiii_27","jsCall_fiii_28","jsCall_fiii_29","jsCall_fiii_30","jsCall_fiii_31","jsCall_fiii_32","jsCall_fiii_33","jsCall_fiii_34","_avpriv_scalarproduct_float_c",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],Xi=[0,"jsCall_ii_0","jsCall_ii_1","jsCall_ii_2","jsCall_ii_3","jsCall_ii_4","jsCall_ii_5","jsCall_ii_6","jsCall_ii_7","jsCall_ii_8","jsCall_ii_9","jsCall_ii_10","jsCall_ii_11","jsCall_ii_12","jsCall_ii_13","jsCall_ii_14","jsCall_ii_15","jsCall_ii_16","jsCall_ii_17","jsCall_ii_18","jsCall_ii_19","jsCall_ii_20","jsCall_ii_21","jsCall_ii_22","jsCall_ii_23","jsCall_ii_24","jsCall_ii_25","jsCall_ii_26","jsCall_ii_27","jsCall_ii_28","jsCall_ii_29","jsCall_ii_30","jsCall_ii_31","jsCall_ii_32","jsCall_ii_33","jsCall_ii_34","_av_default_item_name","_ff_avio_child_class_next","_flv_probe","_flv_read_header","_flv_read_close","_live_flv_probe","_mov_probe","_mov_read_header","_mov_read_close","_mpegts_probe","_mpegts_read_header","_mpegts_read_close","_format_to_name","_format_child_class_next","_get_category","_urlcontext_to_name","_ff_urlcontext_child_class_next","_sws_context_to_name","_ff_bsf_child_class_next","_hevc_mp4toannexb_init","_hevc_init_thread_copy","_hevc_decode_init","_hevc_decode_free","_context_to_name","_codec_child_class_next","_get_category_2277","_aac_decode_init","_aac_decode_close","_init","___stdio_close","___emscripten_stdout_close","_releaseSniffStreamFunc","_flv_releaseFunc","_initializeDecoderFunc","__getFrame","_closeVideoFunc","_releaseFunc","_initializeDemuxerFunc","_getPacketFunc","_releaseDemuxerFunc","_io_short_seek","_avio_rb16","_avio_rl16","_av_buffer_allocz","_frame_worker_thread","_av_buffer_alloc","_thread_worker",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Wi=[0,"jsCall_iid_0","jsCall_iid_1","jsCall_iid_2","jsCall_iid_3","jsCall_iid_4","jsCall_iid_5","jsCall_iid_6","jsCall_iid_7","jsCall_iid_8","jsCall_iid_9","jsCall_iid_10","jsCall_iid_11","jsCall_iid_12","jsCall_iid_13","jsCall_iid_14","jsCall_iid_15","jsCall_iid_16","jsCall_iid_17","jsCall_iid_18","jsCall_iid_19","jsCall_iid_20","jsCall_iid_21","jsCall_iid_22","jsCall_iid_23","jsCall_iid_24","jsCall_iid_25","jsCall_iid_26","jsCall_iid_27","jsCall_iid_28","jsCall_iid_29","jsCall_iid_30","jsCall_iid_31","jsCall_iid_32","jsCall_iid_33","jsCall_iid_34","_seekBufferFunc",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],Gi=[0,"jsCall_iidiiii_0","jsCall_iidiiii_1","jsCall_iidiiii_2","jsCall_iidiiii_3","jsCall_iidiiii_4","jsCall_iidiiii_5","jsCall_iidiiii_6","jsCall_iidiiii_7","jsCall_iidiiii_8","jsCall_iidiiii_9","jsCall_iidiiii_10","jsCall_iidiiii_11","jsCall_iidiiii_12","jsCall_iidiiii_13","jsCall_iidiiii_14","jsCall_iidiiii_15","jsCall_iidiiii_16","jsCall_iidiiii_17","jsCall_iidiiii_18","jsCall_iidiiii_19","jsCall_iidiiii_20","jsCall_iidiiii_21","jsCall_iidiiii_22","jsCall_iidiiii_23","jsCall_iidiiii_24","jsCall_iidiiii_25","jsCall_iidiiii_26","jsCall_iidiiii_27","jsCall_iidiiii_28","jsCall_iidiiii_29","jsCall_iidiiii_30","jsCall_iidiiii_31","jsCall_iidiiii_32","jsCall_iidiiii_33","jsCall_iidiiii_34","_fmt_fp",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],Ki=[0,"jsCall_iii_0","jsCall_iii_1","jsCall_iii_2","jsCall_iii_3","jsCall_iii_4","jsCall_iii_5","jsCall_iii_6","jsCall_iii_7","jsCall_iii_8","jsCall_iii_9","jsCall_iii_10","jsCall_iii_11","jsCall_iii_12","jsCall_iii_13","jsCall_iii_14","jsCall_iii_15","jsCall_iii_16","jsCall_iii_17","jsCall_iii_18","jsCall_iii_19","jsCall_iii_20","jsCall_iii_21","jsCall_iii_22","jsCall_iii_23","jsCall_iii_24","jsCall_iii_25","jsCall_iii_26","jsCall_iii_27","jsCall_iii_28","jsCall_iii_29","jsCall_iii_30","jsCall_iii_31","jsCall_iii_32","jsCall_iii_33","jsCall_iii_34","_ff_avio_child_next","_flv_read_packet","_mov_read_packet","_mpegts_read_packet","_mpegts_raw_read_packet","_format_child_next","_urlcontext_child_next","_bsf_child_next","_hevc_mp4toannexb_filter","_hevc_update_thread_context","_null_filter","_codec_child_next","_initSniffStreamFunc","_flv_initFunc","_flv_getPacketFunc","_io_read_pause","_descriptor_compare","_hls_decode_entry","_avcodec_default_get_format","_ff_startcode_find_candidate_c","_color_table_compare",0,0,0,0,0,0,0],Qi=[0,"jsCall_iiii_0","jsCall_iiii_1","jsCall_iiii_2","jsCall_iiii_3","jsCall_iiii_4","jsCall_iiii_5","jsCall_iiii_6","jsCall_iiii_7","jsCall_iiii_8","jsCall_iiii_9","jsCall_iiii_10","jsCall_iiii_11","jsCall_iiii_12","jsCall_iiii_13","jsCall_iiii_14","jsCall_iiii_15","jsCall_iiii_16","jsCall_iiii_17","jsCall_iiii_18","jsCall_iiii_19","jsCall_iiii_20","jsCall_iiii_21","jsCall_iiii_22","jsCall_iiii_23","jsCall_iiii_24","jsCall_iiii_25","jsCall_iiii_26","jsCall_iiii_27","jsCall_iiii_28","jsCall_iiii_29","jsCall_iiii_30","jsCall_iiii_31","jsCall_iiii_32","jsCall_iiii_33","jsCall_iiii_34","_mov_read_aclr","_mov_read_avid","_mov_read_ares","_mov_read_avss","_mov_read_av1c","_mov_read_chpl","_mov_read_stco","_mov_read_colr","_mov_read_ctts","_mov_read_default","_mov_read_dpxe","_mov_read_dref","_mov_read_elst","_mov_read_enda","_mov_read_fiel","_mov_read_adrm","_mov_read_ftyp","_mov_read_glbl","_mov_read_hdlr","_mov_read_ilst","_mov_read_jp2h","_mov_read_mdat","_mov_read_mdhd","_mov_read_meta","_mov_read_moof","_mov_read_moov","_mov_read_mvhd","_mov_read_svq3","_mov_read_alac","_mov_read_pasp","_mov_read_sidx","_mov_read_stps","_mov_read_strf","_mov_read_stsc","_mov_read_stsd","_mov_read_stss","_mov_read_stsz","_mov_read_stts","_mov_read_tkhd","_mov_read_tfdt","_mov_read_tfhd","_mov_read_trak","_mov_read_tmcd","_mov_read_chap","_mov_read_trex","_mov_read_trun","_mov_read_wave","_mov_read_esds","_mov_read_dac3","_mov_read_dec3","_mov_read_ddts","_mov_read_wide","_mov_read_wfex","_mov_read_cmov","_mov_read_chan","_mov_read_dvc1","_mov_read_sbgp","_mov_read_uuid","_mov_read_targa_y216","_mov_read_free","_mov_read_custom","_mov_read_frma","_mov_read_senc","_mov_read_saiz","_mov_read_saio","_mov_read_pssh","_mov_read_schm","_mov_read_tenc","_mov_read_dfla","_mov_read_st3d","_mov_read_sv3d","_mov_read_dops","_mov_read_smdm","_mov_read_coll","_mov_read_vpcc","_mov_read_mdcv","_mov_read_clli","_h264_split","_hevc_split","___stdio_write","_sn_write","_read_stream_live","_read_stream_vod","_getSniffStreamPacketFunc","_flv_read_stream_live","_setCodecTypeFunc","_read_packet","_io_write_packet","_io_read_packet","_dyn_buf_write","_mov_read_keys","_mov_read_udta_string","_avcodec_default_get_buffer2","_do_read",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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Zi=[0,"jsCall_iiiii_0","jsCall_iiiii_1","jsCall_iiiii_2","jsCall_iiiii_3","jsCall_iiiii_4","jsCall_iiiii_5","jsCall_iiiii_6","jsCall_iiiii_7","jsCall_iiiii_8","jsCall_iiiii_9","jsCall_iiiii_10","jsCall_iiiii_11","jsCall_iiiii_12","jsCall_iiiii_13","jsCall_iiiii_14","jsCall_iiiii_15","jsCall_iiiii_16","jsCall_iiiii_17","jsCall_iiiii_18","jsCall_iiiii_19","jsCall_iiiii_20","jsCall_iiiii_21","jsCall_iiiii_22","jsCall_iiiii_23","jsCall_iiiii_24","jsCall_iiiii_25","jsCall_iiiii_26","jsCall_iiiii_27","jsCall_iiiii_28","jsCall_iiiii_29","jsCall_iiiii_30","jsCall_iiiii_31","jsCall_iiiii_32","jsCall_iiiii_33","jsCall_iiiii_34","_hevc_decode_frame","_aac_decode_frame","_flv_pushBufferFunc","_demuxBoxFunc","_mov_metadata_int8_no_padding","_mov_metadata_track_or_disc_number","_mov_metadata_gnre","_mov_metadata_int8_bypass_padding","_lum_planar_vscale","_chr_planar_vscale","_any_vscale","_packed_vscale","_gamma_convert","_lum_convert","_lum_h_scale","_chr_convert","_chr_h_scale","_no_chr_scale","_hls_decode_entry_wpp",0,0,0,0,0,0,0,0,0],Ji=[0,"jsCall_iiiiii_0","jsCall_iiiiii_1","jsCall_iiiiii_2","jsCall_iiiiii_3","jsCall_iiiiii_4","jsCall_iiiiii_5","jsCall_iiiiii_6","jsCall_iiiiii_7","jsCall_iiiiii_8","jsCall_iiiiii_9","jsCall_iiiiii_10","jsCall_iiiiii_11","jsCall_iiiiii_12","jsCall_iiiiii_13","jsCall_iiiiii_14","jsCall_iiiiii_15","jsCall_iiiiii_16","jsCall_iiiiii_17","jsCall_iiiiii_18","jsCall_iiiiii_19","jsCall_iiiiii_20","jsCall_iiiiii_21","jsCall_iiiiii_22","jsCall_iiiiii_23","jsCall_iiiiii_24","jsCall_iiiiii_25","jsCall_iiiiii_26","jsCall_iiiiii_27","jsCall_iiiiii_28","jsCall_iiiiii_29","jsCall_iiiiii_30","jsCall_iiiiii_31","jsCall_iiiiii_32","jsCall_iiiiii_33","jsCall_iiiiii_34","_pushBufferFunc","_decodeCodecContextFunc","_io_open_default","_avcodec_default_execute2","_thread_execute2","_sbr_lf_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],$i=[0,"jsCall_iiiiiii_0","jsCall_iiiiiii_1","jsCall_iiiiiii_2","jsCall_iiiiiii_3","jsCall_iiiiiii_4","jsCall_iiiiiii_5","jsCall_iiiiiii_6","jsCall_iiiiiii_7","jsCall_iiiiiii_8","jsCall_iiiiiii_9","jsCall_iiiiiii_10","jsCall_iiiiiii_11","jsCall_iiiiiii_12","jsCall_iiiiiii_13","jsCall_iiiiiii_14","jsCall_iiiiiii_15","jsCall_iiiiiii_16","jsCall_iiiiiii_17","jsCall_iiiiiii_18","jsCall_iiiiiii_19","jsCall_iiiiiii_20","jsCall_iiiiiii_21","jsCall_iiiiiii_22","jsCall_iiiiiii_23","jsCall_iiiiiii_24","jsCall_iiiiiii_25","jsCall_iiiiiii_26","jsCall_iiiiiii_27","jsCall_iiiiiii_28","jsCall_iiiiiii_29","jsCall_iiiiiii_30","jsCall_iiiiiii_31","jsCall_iiiiiii_32","jsCall_iiiiiii_33","jsCall_iiiiiii_34","_h264_parse","_hevc_parse","_flv_decodeVideoFrameFunc","_avcodec_default_execute","_thread_execute","_sbr_x_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],er=[0,"jsCall_iiiiiiii_0","jsCall_iiiiiiii_1","jsCall_iiiiiiii_2","jsCall_iiiiiiii_3","jsCall_iiiiiiii_4","jsCall_iiiiiiii_5","jsCall_iiiiiiii_6","jsCall_iiiiiiii_7","jsCall_iiiiiiii_8","jsCall_iiiiiiii_9","jsCall_iiiiiiii_10","jsCall_iiiiiiii_11","jsCall_iiiiiiii_12","jsCall_iiiiiiii_13","jsCall_iiiiiiii_14","jsCall_iiiiiiii_15","jsCall_iiiiiiii_16","jsCall_iiiiiiii_17","jsCall_iiiiiiii_18","jsCall_iiiiiiii_19","jsCall_iiiiiiii_20","jsCall_iiiiiiii_21","jsCall_iiiiiiii_22","jsCall_iiiiiiii_23","jsCall_iiiiiiii_24","jsCall_iiiiiiii_25","jsCall_iiiiiiii_26","jsCall_iiiiiiii_27","jsCall_iiiiiiii_28","jsCall_iiiiiiii_29","jsCall_iiiiiiii_30","jsCall_iiiiiiii_31","jsCall_iiiiiiii_32","jsCall_iiiiiiii_33","jsCall_iiiiiiii_34","_decodeVideoFrameFunc","_setSniffStreamCodecTypeFunc","_flv_setSniffStreamCodecTypeFunc","_swscale","_ff_sws_alphablendaway","_yuv2rgb_c_32","_yuva2rgba_c","_yuv2rgb_c_bgr48","_yuv2rgb_c_48","_yuva2argb_c","_yuv2rgb_c_24_rgb","_yuv2rgb_c_24_bgr","_yuv2rgb_c_16_ordered_dither","_yuv2rgb_c_15_ordered_dither","_yuv2rgb_c_12_ordered_dither","_yuv2rgb_c_8_ordered_dither","_yuv2rgb_c_4_ordered_dither","_yuv2rgb_c_4b_ordered_dither","_yuv2rgb_c_1_ordered_dither","_planarToP01xWrapper","_planar8ToP01xleWrapper","_yvu9ToYv12Wrapper","_bgr24ToYv12Wrapper","_rgbToRgbWrapper","_planarRgbToplanarRgbWrapper","_planarRgbToRgbWrapper","_planarRgbaToRgbWrapper","_Rgb16ToPlanarRgb16Wrapper","_planarRgb16ToRgb16Wrapper","_rgbToPlanarRgbWrapper","_bayer_to_rgb24_wrapper","_bayer_to_yv12_wrapper","_bswap_16bpc","_palToRgbWrapper","_yuv422pToYuy2Wrapper","_yuv422pToUyvyWrapper","_uint_y_to_float_y_wrapper","_float_y_to_uint_y_wrapper","_planarToYuy2Wrapper","_planarToUyvyWrapper","_yuyvToYuv420Wrapper","_uyvyToYuv420Wrapper","_yuyvToYuv422Wrapper","_uyvyToYuv422Wrapper","_packedCopyWrapper","_planarCopyWrapper","_planarToNv12Wrapper","_planarToNv24Wrapper","_nv12ToPlanarWrapper","_nv24ToPlanarWrapper",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],tr=[0,"jsCall_iiiiij_0","jsCall_iiiiij_1","jsCall_iiiiij_2","jsCall_iiiiij_3","jsCall_iiiiij_4","jsCall_iiiiij_5","jsCall_iiiiij_6","jsCall_iiiiij_7","jsCall_iiiiij_8","jsCall_iiiiij_9","jsCall_iiiiij_10","jsCall_iiiiij_11","jsCall_iiiiij_12","jsCall_iiiiij_13","jsCall_iiiiij_14","jsCall_iiiiij_15","jsCall_iiiiij_16","jsCall_iiiiij_17","jsCall_iiiiij_18","jsCall_iiiiij_19","jsCall_iiiiij_20","jsCall_iiiiij_21","jsCall_iiiiij_22","jsCall_iiiiij_23","jsCall_iiiiij_24","jsCall_iiiiij_25","jsCall_iiiiij_26","jsCall_iiiiij_27","jsCall_iiiiij_28","jsCall_iiiiij_29","jsCall_iiiiij_30","jsCall_iiiiij_31","jsCall_iiiiij_32","jsCall_iiiiij_33","jsCall_iiiiij_34","_mpegts_push_data",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],ir=[0,"jsCall_iiiji_0","jsCall_iiiji_1","jsCall_iiiji_2","jsCall_iiiji_3","jsCall_iiiji_4","jsCall_iiiji_5","jsCall_iiiji_6","jsCall_iiiji_7","jsCall_iiiji_8","jsCall_iiiji_9","jsCall_iiiji_10","jsCall_iiiji_11","jsCall_iiiji_12","jsCall_iiiji_13","jsCall_iiiji_14","jsCall_iiiji_15","jsCall_iiiji_16","jsCall_iiiji_17","jsCall_iiiji_18","jsCall_iiiji_19","jsCall_iiiji_20","jsCall_iiiji_21","jsCall_iiiji_22","jsCall_iiiji_23","jsCall_iiiji_24","jsCall_iiiji_25","jsCall_iiiji_26","jsCall_iiiji_27","jsCall_iiiji_28","jsCall_iiiji_29","jsCall_iiiji_30","jsCall_iiiji_31","jsCall_iiiji_32","jsCall_iiiji_33","jsCall_iiiji_34","_flv_read_seek","_mov_read_seek",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],rr=[0,"jsCall_iiijjji_0","jsCall_iiijjji_1","jsCall_iiijjji_2","jsCall_iiijjji_3","jsCall_iiijjji_4","jsCall_iiijjji_5","jsCall_iiijjji_6","jsCall_iiijjji_7","jsCall_iiijjji_8","jsCall_iiijjji_9","jsCall_iiijjji_10","jsCall_iiijjji_11","jsCall_iiijjji_12","jsCall_iiijjji_13","jsCall_iiijjji_14","jsCall_iiijjji_15","jsCall_iiijjji_16","jsCall_iiijjji_17","jsCall_iiijjji_18","jsCall_iiijjji_19","jsCall_iiijjji_20","jsCall_iiijjji_21","jsCall_iiijjji_22","jsCall_iiijjji_23","jsCall_iiijjji_24","jsCall_iiijjji_25","jsCall_iiijjji_26","jsCall_iiijjji_27","jsCall_iiijjji_28","jsCall_iiijjji_29","jsCall_iiijjji_30","jsCall_iiijjji_31","jsCall_iiijjji_32","jsCall_iiijjji_33","jsCall_iiijjji_34",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,0],nr=[0,"jsCall_jiiij_0","jsCall_jiiij_1","jsCall_jiiij_2","jsCall_jiiij_3","jsCall_jiiij_4","jsCall_jiiij_5","jsCall_jiiij_6","jsCall_jiiij_7","jsCall_jiiij_8","jsCall_jiiij_9","jsCall_jiiij_10","jsCall_jiiij_11","jsCall_jiiij_12","jsCall_jiiij_13","jsCall_jiiij_14","jsCall_jiiij_15","jsCall_jiiij_16","jsCall_jiiij_17","jsCall_jiiij_18","jsCall_jiiij_19","jsCall_jiiij_20","jsCall_jiiij_21","jsCall_jiiij_22","jsCall_jiiij_23","jsCall_jiiij_24","jsCall_jiiij_25","jsCall_jiiij_26","jsCall_jiiij_27","jsCall_jiiij_28","jsCall_jiiij_29","jsCall_jiiij_30","jsCall_jiiij_31","jsCall_jiiij_32","jsCall_jiiij_33","jsCall_jiiij_34","_mpegts_get_dts",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],ar=[0,"jsCall_jiiji_0","jsCall_jiiji_1","jsCall_jiiji_2","jsCall_jiiji_3","jsCall_jiiji_4","jsCall_jiiji_5","jsCall_jiiji_6","jsCall_jiiji_7","jsCall_jiiji_8","jsCall_jiiji_9","jsCall_jiiji_10","jsCall_jiiji_11","jsCall_jiiji_12","jsCall_jiiji_13","jsCall_jiiji_14","jsCall_jiiji_15","jsCall_jiiji_16","jsCall_jiiji_17","jsCall_jiiji_18","jsCall_jiiji_19","jsCall_jiiji_20","jsCall_jiiji_21","jsCall_jiiji_22","jsCall_jiiji_23","jsCall_jiiji_24","jsCall_jiiji_25","jsCall_jiiji_26","jsCall_jiiji_27","jsCall_jiiji_28","jsCall_jiiji_29","jsCall_jiiji_30","jsCall_jiiji_31","jsCall_jiiji_32","jsCall_jiiji_33","jsCall_jiiji_34","_io_read_seek",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],sr=[0,"jsCall_jiji_0","jsCall_jiji_1","jsCall_jiji_2","jsCall_jiji_3","jsCall_jiji_4","jsCall_jiji_5","jsCall_jiji_6","jsCall_jiji_7","jsCall_jiji_8","jsCall_jiji_9","jsCall_jiji_10","jsCall_jiji_11","jsCall_jiji_12","jsCall_jiji_13","jsCall_jiji_14","jsCall_jiji_15","jsCall_jiji_16","jsCall_jiji_17","jsCall_jiji_18","jsCall_jiji_19","jsCall_jiji_20","jsCall_jiji_21","jsCall_jiji_22","jsCall_jiji_23","jsCall_jiji_24","jsCall_jiji_25","jsCall_jiji_26","jsCall_jiji_27","jsCall_jiji_28","jsCall_jiji_29","jsCall_jiji_30","jsCall_jiji_31","jsCall_jiji_32","jsCall_jiji_33","jsCall_jiji_34","___stdio_seek","___emscripten_stdout_seek","_seek_in_buffer","_io_seek","_dyn_buf_seek",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],or=[0,"jsCall_v_0","jsCall_v_1","jsCall_v_2","jsCall_v_3","jsCall_v_4","jsCall_v_5","jsCall_v_6","jsCall_v_7","jsCall_v_8","jsCall_v_9","jsCall_v_10","jsCall_v_11","jsCall_v_12","jsCall_v_13","jsCall_v_14","jsCall_v_15","jsCall_v_16","jsCall_v_17","jsCall_v_18","jsCall_v_19","jsCall_v_20","jsCall_v_21","jsCall_v_22","jsCall_v_23","jsCall_v_24","jsCall_v_25","jsCall_v_26","jsCall_v_27","jsCall_v_28","jsCall_v_29","jsCall_v_30","jsCall_v_31","jsCall_v_32","jsCall_v_33","jsCall_v_34","_init_ff_cos_tabs_16","_init_ff_cos_tabs_32","_init_ff_cos_tabs_64","_init_ff_cos_tabs_128","_init_ff_cos_tabs_256","_init_ff_cos_tabs_512","_init_ff_cos_tabs_1024","_init_ff_cos_tabs_2048","_init_ff_cos_tabs_4096","_init_ff_cos_tabs_8192","_init_ff_cos_tabs_16384","_init_ff_cos_tabs_32768","_init_ff_cos_tabs_65536","_init_ff_cos_tabs_131072","_introduce_mine","_introduceMineFunc","_av_format_init_next","_av_codec_init_static","_av_codec_init_next","_aac_static_table_init","_AV_CRC_8_ATM_init_table_once","_AV_CRC_8_EBU_init_table_once","_AV_CRC_16_ANSI_init_table_once","_AV_CRC_16_CCITT_init_table_once","_AV_CRC_24_IEEE_init_table_once","_AV_CRC_32_IEEE_init_table_once","_AV_CRC_32_IEEE_LE_init_table_once","_AV_CRC_16_ANSI_LE_init_table_once"],lr=[0,"jsCall_vdiidiiiii_0","jsCall_vdiidiiiii_1","jsCall_vdiidiiiii_2","jsCall_vdiidiiiii_3","jsCall_vdiidiiiii_4","jsCall_vdiidiiiii_5","jsCall_vdiidiiiii_6","jsCall_vdiidiiiii_7","jsCall_vdiidiiiii_8","jsCall_vdiidiiiii_9","jsCall_vdiidiiiii_10","jsCall_vdiidiiiii_11","jsCall_vdiidiiiii_12","jsCall_vdiidiiiii_13","jsCall_vdiidiiiii_14","jsCall_vdiidiiiii_15","jsCall_vdiidiiiii_16","jsCall_vdiidiiiii_17","jsCall_vdiidiiiii_18","jsCall_vdiidiiiii_19","jsCall_vdiidiiiii_20","jsCall_vdiidiiiii_21","jsCall_vdiidiiiii_22","jsCall_vdiidiiiii_23","jsCall_vdiidiiiii_24","jsCall_vdiidiiiii_25","jsCall_vdiidiiiii_26","jsCall_vdiidiiiii_27","jsCall_vdiidiiiii_28","jsCall_vdiidiiiii_29","jsCall_vdiidiiiii_30","jsCall_vdiidiiiii_31","jsCall_vdiidiiiii_32","jsCall_vdiidiiiii_33","jsCall_vdiidiiiii_34",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,0],fr=[0,"jsCall_vi_0","jsCall_vi_1","jsCall_vi_2","jsCall_vi_3","jsCall_vi_4","jsCall_vi_5","jsCall_vi_6","jsCall_vi_7","jsCall_vi_8","jsCall_vi_9","jsCall_vi_10","jsCall_vi_11","jsCall_vi_12","jsCall_vi_13","jsCall_vi_14","jsCall_vi_15","jsCall_vi_16","jsCall_vi_17","jsCall_vi_18","jsCall_vi_19","jsCall_vi_20","jsCall_vi_21","jsCall_vi_22","jsCall_vi_23","jsCall_vi_24","jsCall_vi_25","jsCall_vi_26","jsCall_vi_27","jsCall_vi_28","jsCall_vi_29","jsCall_vi_30","jsCall_vi_31","jsCall_vi_32","jsCall_vi_33","jsCall_vi_34","_free_geobtag","_free_apic","_free_chapter","_free_priv","_hevc_decode_flush","_flush","_h264_close","_hevc_parser_close","_fft4","_fft8","_fft16","_fft32","_fft64","_fft128","_fft256","_fft512","_fft1024","_fft2048","_fft4096","_fft8192","_fft16384","_fft32768","_fft65536","_fft131072","_logRequest_downloadSucceeded","_logRequest_downloadFailed","_downloadSucceeded","_downloadFailed","_transform_4x4_luma_9","_idct_4x4_dc_9","_idct_8x8_dc_9","_idct_16x16_dc_9","_idct_32x32_dc_9","_transform_4x4_luma_10","_idct_4x4_dc_10","_idct_8x8_dc_10","_idct_16x16_dc_10","_idct_32x32_dc_10","_transform_4x4_luma_12","_idct_4x4_dc_12","_idct_8x8_dc_12","_idct_16x16_dc_12","_idct_32x32_dc_12","_transform_4x4_luma_8","_idct_4x4_dc_8","_idct_8x8_dc_8","_idct_16x16_dc_8","_idct_32x32_dc_8","_main_function","_sbr_sum64x5_c","_sbr_neg_odd_64_c","_sbr_qmf_pre_shuffle_c",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,0,0,0,0,0,0,0,0,0,0,0,0,0],ur=[0,"jsCall_vii_0","jsCall_vii_1","jsCall_vii_2","jsCall_vii_3","jsCall_vii_4","jsCall_vii_5","jsCall_vii_6","jsCall_vii_7","jsCall_vii_8","jsCall_vii_9","jsCall_vii_10","jsCall_vii_11","jsCall_vii_12","jsCall_vii_13","jsCall_vii_14","jsCall_vii_15","jsCall_vii_16","jsCall_vii_17","jsCall_vii_18","jsCall_vii_19","jsCall_vii_20","jsCall_vii_21","jsCall_vii_22","jsCall_vii_23","jsCall_vii_24","jsCall_vii_25","jsCall_vii_26","jsCall_vii_27","jsCall_vii_28","jsCall_vii_29","jsCall_vii_30","jsCall_vii_31","jsCall_vii_32","jsCall_vii_33","jsCall_vii_34","_io_close_default","_lumRangeFromJpeg_c","_lumRangeToJpeg_c","_lumRangeFromJpeg16_c","_lumRangeToJpeg16_c","_decode_data_free","_dequant_9","_idct_4x4_9","_idct_8x8_9","_idct_16x16_9","_idct_32x32_9","_dequant_10","_idct_4x4_10","_idct_8x8_10","_idct_16x16_10","_idct_32x32_10","_dequant_12","_idct_4x4_12","_idct_8x8_12","_idct_16x16_12","_idct_32x32_12","_dequant_8","_idct_4x4_8","_idct_8x8_8","_idct_16x16_8","_idct_32x32_8","_imdct_and_windowing","_apply_ltp","_update_ltp","_imdct_and_windowing_ld","_imdct_and_windowing_eld","_imdct_and_windowing_960","_ff_h264_chroma_dc_dequant_idct_9_c","_ff_h264_chroma422_dc_dequant_idct_9_c","_ff_h264_chroma_dc_dequant_idct_10_c","_ff_h264_chroma422_dc_dequant_idct_10_c","_ff_h264_chroma_dc_dequant_idct_12_c","_ff_h264_chroma422_dc_dequant_idct_12_c","_ff_h264_chroma_dc_dequant_idct_14_c","_ff_h264_chroma422_dc_dequant_idct_14_c","_ff_h264_chroma_dc_dequant_idct_8_c","_ff_h264_chroma422_dc_dequant_idct_8_c","_hevc_pps_free","_sbr_qmf_post_shuffle_c","_sbr_qmf_deint_neg_c","_sbr_autocorrelate_c","_fft_permute_c","_fft_calc_c","_av_buffer_default_free","_pool_release_buffer","_sha1_transform","_sha256_transform","_pop_arg_long_double",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,0,0,0,0,0,0,0,0,0,0,0,0],cr=[0,"jsCall_viidi_0","jsCall_viidi_1","jsCall_viidi_2","jsCall_viidi_3","jsCall_viidi_4","jsCall_viidi_5","jsCall_viidi_6","jsCall_viidi_7","jsCall_viidi_8","jsCall_viidi_9","jsCall_viidi_10","jsCall_viidi_11","jsCall_viidi_12","jsCall_viidi_13","jsCall_viidi_14","jsCall_viidi_15","jsCall_viidi_16","jsCall_viidi_17","jsCall_viidi_18","jsCall_viidi_19","jsCall_viidi_20","jsCall_viidi_21","jsCall_viidi_22","jsCall_viidi_23","jsCall_viidi_24","jsCall_viidi_25","jsCall_viidi_26","jsCall_viidi_27","jsCall_viidi_28","jsCall_viidi_29","jsCall_viidi_30","jsCall_viidi_31","jsCall_viidi_32","jsCall_viidi_33","jsCall_viidi_34","_vector_dmac_scalar_c","_vector_dmul_scalar_c",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],hr=[0,"jsCall_viifi_0","jsCall_viifi_1","jsCall_viifi_2","jsCall_viifi_3","jsCall_viifi_4","jsCall_viifi_5","jsCall_viifi_6","jsCall_viifi_7","jsCall_viifi_8","jsCall_viifi_9","jsCall_viifi_10","jsCall_viifi_11","jsCall_viifi_12","jsCall_viifi_13","jsCall_viifi_14","jsCall_viifi_15","jsCall_viifi_16","jsCall_viifi_17","jsCall_viifi_18","jsCall_viifi_19","jsCall_viifi_20","jsCall_viifi_21","jsCall_viifi_22","jsCall_viifi_23","jsCall_viifi_24","jsCall_viifi_25","jsCall_viifi_26","jsCall_viifi_27","jsCall_viifi_28","jsCall_viifi_29","jsCall_viifi_30","jsCall_viifi_31","jsCall_viifi_32","jsCall_viifi_33","jsCall_viifi_34","_vector_fmac_scalar_c","_vector_fmul_scalar_c",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],dr=[0,"jsCall_viii_0","jsCall_viii_1","jsCall_viii_2","jsCall_viii_3","jsCall_viii_4","jsCall_viii_5","jsCall_viii_6","jsCall_viii_7","jsCall_viii_8","jsCall_viii_9","jsCall_viii_10","jsCall_viii_11","jsCall_viii_12","jsCall_viii_13","jsCall_viii_14","jsCall_viii_15","jsCall_viii_16","jsCall_viii_17","jsCall_viii_18","jsCall_viii_19","jsCall_viii_20","jsCall_viii_21","jsCall_viii_22","jsCall_viii_23","jsCall_viii_24","jsCall_viii_25","jsCall_viii_26","jsCall_viii_27","jsCall_viii_28","jsCall_viii_29","jsCall_viii_30","jsCall_viii_31","jsCall_viii_32","jsCall_viii_33","jsCall_viii_34","_avcHandleFrame","_handleFrame","_sdt_cb","_pat_cb","_pmt_cb","_scte_data_cb","_m4sl_cb","_chrRangeFromJpeg_c","_chrRangeToJpeg_c","_chrRangeFromJpeg16_c","_chrRangeToJpeg16_c","_rgb15to16_c","_rgb15tobgr24_c","_rgb15to32_c","_rgb16tobgr24_c","_rgb16to32_c","_rgb16to15_c","_rgb24tobgr16_c","_rgb24tobgr15_c","_rgb24tobgr32_c","_rgb32to16_c","_rgb32to15_c","_rgb32tobgr24_c","_rgb24to15_c","_rgb24to16_c","_rgb24tobgr24_c","_shuffle_bytes_0321_c","_shuffle_bytes_2103_c","_shuffle_bytes_1230_c","_shuffle_bytes_3012_c","_shuffle_bytes_3210_c","_rgb32tobgr16_c","_rgb32tobgr15_c","_rgb48tobgr48_bswap","_rgb48tobgr64_bswap","_rgb48to64_bswap","_rgb64to48_bswap","_rgb48tobgr48_nobswap","_rgb48tobgr64_nobswap","_rgb48to64_nobswap","_rgb64tobgr48_nobswap","_rgb64tobgr48_bswap","_rgb64to48_nobswap","_rgb12to15","_rgb15to24","_rgb16to24","_rgb32to24","_rgb24to32","_rgb12tobgr12","_rgb15tobgr15","_rgb16tobgr15","_rgb15tobgr16","_rgb16tobgr16","_rgb15tobgr32","_rgb16tobgr32","_add_residual4x4_9","_add_residual8x8_9","_add_residual16x16_9","_add_residual32x32_9","_transform_rdpcm_9","_add_residual4x4_10","_add_residual8x8_10","_add_residual16x16_10","_add_residual32x32_10","_transform_rdpcm_10","_add_residual4x4_12","_add_residual8x8_12","_add_residual16x16_12","_add_residual32x32_12","_transform_rdpcm_12","_add_residual4x4_8","_add_residual8x8_8","_add_residual16x16_8","_add_residual32x32_8","_transform_rdpcm_8","_just_return","_bswap_buf","_bswap16_buf","_ff_h264_add_pixels4_16_c","_ff_h264_add_pixels4_8_c","_ff_h264_add_pixels8_16_c","_ff_h264_add_pixels8_8_c","_ff_h264_idct_add_9_c","_ff_h264_idct8_add_9_c","_ff_h264_idct_dc_add_9_c","_ff_h264_idct8_dc_add_9_c","_ff_h264_luma_dc_dequant_idct_9_c","_ff_h264_idct_add_10_c","_ff_h264_idct8_add_10_c","_ff_h264_idct_dc_add_10_c","_ff_h264_idct8_dc_add_10_c","_ff_h264_luma_dc_dequant_idct_10_c","_ff_h264_idct_add_12_c","_ff_h264_idct8_add_12_c","_ff_h264_idct_dc_add_12_c","_ff_h264_idct8_dc_add_12_c","_ff_h264_luma_dc_dequant_idct_12_c","_ff_h264_idct_add_14_c","_ff_h264_idct8_add_14_c","_ff_h264_idct_dc_add_14_c","_ff_h264_idct8_dc_add_14_c","_ff_h264_luma_dc_dequant_idct_14_c","_ff_h264_idct_add_8_c","_ff_h264_idct8_add_8_c","_ff_h264_idct_dc_add_8_c","_ff_h264_idct8_dc_add_8_c","_ff_h264_luma_dc_dequant_idct_8_c","_sbr_qmf_deint_bfly_c","_ps_add_squares_c","_ff_imdct_calc_c","_ff_imdct_half_c","_ff_mdct_calc_c","_butterflies_float_c",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,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,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,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],_r=[0,"jsCall_viiii_0","jsCall_viiii_1","jsCall_viiii_2","jsCall_viiii_3","jsCall_viiii_4","jsCall_viiii_5","jsCall_viiii_6","jsCall_viiii_7","jsCall_viiii_8","jsCall_viiii_9","jsCall_viiii_10","jsCall_viiii_11","jsCall_viiii_12","jsCall_viiii_13","jsCall_viiii_14","jsCall_viiii_15","jsCall_viiii_16","jsCall_viiii_17","jsCall_viiii_18","jsCall_viiii_19","jsCall_viiii_20","jsCall_viiii_21","jsCall_viiii_22","jsCall_viiii_23","jsCall_viiii_24","jsCall_viiii_25","jsCall_viiii_26","jsCall_viiii_27","jsCall_viiii_28","jsCall_viiii_29","jsCall_viiii_30","jsCall_viiii_31","jsCall_viiii_32","jsCall_viiii_33","jsCall_viiii_34","_planar_rgb9le_to_y","_planar_rgb10le_to_a","_planar_rgb10le_to_y","_planar_rgb12le_to_a","_planar_rgb12le_to_y","_planar_rgb14le_to_y","_planar_rgb16le_to_a","_planar_rgb16le_to_y","_planar_rgb9be_to_y","_planar_rgb10be_to_a","_planar_rgb10be_to_y","_planar_rgb12be_to_a","_planar_rgb12be_to_y","_planar_rgb14be_to_y","_planar_rgb16be_to_a","_planar_rgb16be_to_y","_planar_rgb_to_a","_planar_rgb_to_y","_gray8aToPacked32","_gray8aToPacked32_1","_gray8aToPacked24","_sws_convertPalette8ToPacked32","_sws_convertPalette8ToPacked24","_intra_pred_2_9","_intra_pred_3_9","_intra_pred_4_9","_intra_pred_5_9","_pred_planar_0_9","_pred_planar_1_9","_pred_planar_2_9","_pred_planar_3_9","_intra_pred_2_10","_intra_pred_3_10","_intra_pred_4_10","_intra_pred_5_10","_pred_planar_0_10","_pred_planar_1_10","_pred_planar_2_10","_pred_planar_3_10","_intra_pred_2_12","_intra_pred_3_12","_intra_pred_4_12","_intra_pred_5_12","_pred_planar_0_12","_pred_planar_1_12","_pred_planar_2_12","_pred_planar_3_12","_intra_pred_2_8","_intra_pred_3_8","_intra_pred_4_8","_intra_pred_5_8","_pred_planar_0_8","_pred_planar_1_8","_pred_planar_2_8","_pred_planar_3_8","_apply_tns","_windowing_and_mdct_ltp","_h264_v_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_mbaff_intra_9_c","_h264_v_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma422_intra_9_c","_h264_h_loop_filter_chroma_mbaff_intra_9_c","_h264_h_loop_filter_chroma422_mbaff_intra_9_c","_h264_v_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_mbaff_intra_10_c","_h264_v_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma422_intra_10_c","_h264_h_loop_filter_chroma_mbaff_intra_10_c","_h264_h_loop_filter_chroma422_mbaff_intra_10_c","_h264_v_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_mbaff_intra_12_c","_h264_v_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma422_intra_12_c","_h264_h_loop_filter_chroma_mbaff_intra_12_c","_h264_h_loop_filter_chroma422_mbaff_intra_12_c","_h264_v_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_mbaff_intra_14_c","_h264_v_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma422_intra_14_c","_h264_h_loop_filter_chroma_mbaff_intra_14_c","_h264_h_loop_filter_chroma422_mbaff_intra_14_c","_h264_v_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_mbaff_intra_8_c","_h264_v_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma422_intra_8_c","_h264_h_loop_filter_chroma_mbaff_intra_8_c","_h264_h_loop_filter_chroma422_mbaff_intra_8_c","_fft15_c","_mdct15","_imdct15_half","_ps_mul_pair_single_c","_ps_hybrid_analysis_ileave_c","_ps_hybrid_synthesis_deint_c","_vector_fmul_c","_vector_dmul_c","_vector_fmul_reverse_c","_av_log_default_callback",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,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,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,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,0,0,0,0,0],pr=[0,"jsCall_viiiid_0","jsCall_viiiid_1","jsCall_viiiid_2","jsCall_viiiid_3","jsCall_viiiid_4","jsCall_viiiid_5","jsCall_viiiid_6","jsCall_viiiid_7","jsCall_viiiid_8","jsCall_viiiid_9","jsCall_viiiid_10","jsCall_viiiid_11","jsCall_viiiid_12","jsCall_viiiid_13","jsCall_viiiid_14","jsCall_viiiid_15","jsCall_viiiid_16","jsCall_viiiid_17","jsCall_viiiid_18","jsCall_viiiid_19","jsCall_viiiid_20","jsCall_viiiid_21","jsCall_viiiid_22","jsCall_viiiid_23","jsCall_viiiid_24","jsCall_viiiid_25","jsCall_viiiid_26","jsCall_viiiid_27","jsCall_viiiid_28","jsCall_viiiid_29","jsCall_viiiid_30","jsCall_viiiid_31","jsCall_viiiid_32","jsCall_viiiid_33","jsCall_viiiid_34",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,0],mr=[0,"jsCall_viiiifii_0","jsCall_viiiifii_1","jsCall_viiiifii_2","jsCall_viiiifii_3","jsCall_viiiifii_4","jsCall_viiiifii_5","jsCall_viiiifii_6","jsCall_viiiifii_7","jsCall_viiiifii_8","jsCall_viiiifii_9","jsCall_viiiifii_10","jsCall_viiiifii_11","jsCall_viiiifii_12","jsCall_viiiifii_13","jsCall_viiiifii_14","jsCall_viiiifii_15","jsCall_viiiifii_16","jsCall_viiiifii_17","jsCall_viiiifii_18","jsCall_viiiifii_19","jsCall_viiiifii_20","jsCall_viiiifii_21","jsCall_viiiifii_22","jsCall_viiiifii_23","jsCall_viiiifii_24","jsCall_viiiifii_25","jsCall_viiiifii_26","jsCall_viiiifii_27","jsCall_viiiifii_28","jsCall_viiiifii_29","jsCall_viiiifii_30","jsCall_viiiifii_31","jsCall_viiiifii_32","jsCall_viiiifii_33","jsCall_viiiifii_34","_sbr_hf_gen_c",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],br=[0,"jsCall_viiiii_0","jsCall_viiiii_1","jsCall_viiiii_2","jsCall_viiiii_3","jsCall_viiiii_4","jsCall_viiiii_5","jsCall_viiiii_6","jsCall_viiiii_7","jsCall_viiiii_8","jsCall_viiiii_9","jsCall_viiiii_10","jsCall_viiiii_11","jsCall_viiiii_12","jsCall_viiiii_13","jsCall_viiiii_14","jsCall_viiiii_15","jsCall_viiiii_16","jsCall_viiiii_17","jsCall_viiiii_18","jsCall_viiiii_19","jsCall_viiiii_20","jsCall_viiiii_21","jsCall_viiiii_22","jsCall_viiiii_23","jsCall_viiiii_24","jsCall_viiiii_25","jsCall_viiiii_26","jsCall_viiiii_27","jsCall_viiiii_28","jsCall_viiiii_29","jsCall_viiiii_30","jsCall_viiiii_31","jsCall_viiiii_32","jsCall_viiiii_33","jsCall_viiiii_34","_planar_rgb9le_to_uv","_planar_rgb10le_to_uv","_planar_rgb12le_to_uv","_planar_rgb14le_to_uv","_planar_rgb16le_to_uv","_planar_rgb9be_to_uv","_planar_rgb10be_to_uv","_planar_rgb12be_to_uv","_planar_rgb14be_to_uv","_planar_rgb16be_to_uv","_planar_rgb_to_uv","_yuv2p010l1_LE_c","_yuv2p010l1_BE_c","_yuv2plane1_16LE_c","_yuv2plane1_16BE_c","_yuv2plane1_9LE_c","_yuv2plane1_9BE_c","_yuv2plane1_10LE_c","_yuv2plane1_10BE_c","_yuv2plane1_12LE_c","_yuv2plane1_12BE_c","_yuv2plane1_14LE_c","_yuv2plane1_14BE_c","_yuv2plane1_floatBE_c","_yuv2plane1_floatLE_c","_yuv2plane1_8_c","_bayer_bggr8_to_rgb24_copy","_bayer_bggr8_to_rgb24_interpolate","_bayer_bggr16le_to_rgb24_copy","_bayer_bggr16le_to_rgb24_interpolate","_bayer_bggr16be_to_rgb24_copy","_bayer_bggr16be_to_rgb24_interpolate","_bayer_rggb8_to_rgb24_copy","_bayer_rggb8_to_rgb24_interpolate","_bayer_rggb16le_to_rgb24_copy","_bayer_rggb16le_to_rgb24_interpolate","_bayer_rggb16be_to_rgb24_copy","_bayer_rggb16be_to_rgb24_interpolate","_bayer_gbrg8_to_rgb24_copy","_bayer_gbrg8_to_rgb24_interpolate","_bayer_gbrg16le_to_rgb24_copy","_bayer_gbrg16le_to_rgb24_interpolate","_bayer_gbrg16be_to_rgb24_copy","_bayer_gbrg16be_to_rgb24_interpolate","_bayer_grbg8_to_rgb24_copy","_bayer_grbg8_to_rgb24_interpolate","_bayer_grbg16le_to_rgb24_copy","_bayer_grbg16le_to_rgb24_interpolate","_bayer_grbg16be_to_rgb24_copy","_bayer_grbg16be_to_rgb24_interpolate","_hevc_h_loop_filter_chroma_9","_hevc_v_loop_filter_chroma_9","_hevc_h_loop_filter_chroma_10","_hevc_v_loop_filter_chroma_10","_hevc_h_loop_filter_chroma_12","_hevc_v_loop_filter_chroma_12","_hevc_h_loop_filter_chroma_8","_hevc_v_loop_filter_chroma_8","_worker_func","_sbr_hf_assemble","_sbr_hf_inverse_filter","_ff_h264_idct_add16_9_c","_ff_h264_idct8_add4_9_c","_ff_h264_idct_add8_9_c","_ff_h264_idct_add8_422_9_c","_ff_h264_idct_add16intra_9_c","_h264_v_loop_filter_luma_9_c","_h264_h_loop_filter_luma_9_c","_h264_h_loop_filter_luma_mbaff_9_c","_h264_v_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma422_9_c","_h264_h_loop_filter_chroma_mbaff_9_c","_h264_h_loop_filter_chroma422_mbaff_9_c","_ff_h264_idct_add16_10_c","_ff_h264_idct8_add4_10_c","_ff_h264_idct_add8_10_c","_ff_h264_idct_add8_422_10_c","_ff_h264_idct_add16intra_10_c","_h264_v_loop_filter_luma_10_c","_h264_h_loop_filter_luma_10_c","_h264_h_loop_filter_luma_mbaff_10_c","_h264_v_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma422_10_c","_h264_h_loop_filter_chroma_mbaff_10_c","_h264_h_loop_filter_chroma422_mbaff_10_c","_ff_h264_idct_add16_12_c","_ff_h264_idct8_add4_12_c","_ff_h264_idct_add8_12_c","_ff_h264_idct_add8_422_12_c","_ff_h264_idct_add16intra_12_c","_h264_v_loop_filter_luma_12_c","_h264_h_loop_filter_luma_12_c","_h264_h_loop_filter_luma_mbaff_12_c","_h264_v_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma422_12_c","_h264_h_loop_filter_chroma_mbaff_12_c","_h264_h_loop_filter_chroma422_mbaff_12_c","_ff_h264_idct_add16_14_c","_ff_h264_idct8_add4_14_c","_ff_h264_idct_add8_14_c","_ff_h264_idct_add8_422_14_c","_ff_h264_idct_add16intra_14_c","_h264_v_loop_filter_luma_14_c","_h264_h_loop_filter_luma_14_c","_h264_h_loop_filter_luma_mbaff_14_c","_h264_v_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma422_14_c","_h264_h_loop_filter_chroma_mbaff_14_c","_h264_h_loop_filter_chroma422_mbaff_14_c","_ff_h264_idct_add16_8_c","_ff_h264_idct8_add4_8_c","_ff_h264_idct_add8_8_c","_ff_h264_idct_add8_422_8_c","_ff_h264_idct_add16intra_8_c","_h264_v_loop_filter_luma_8_c","_h264_h_loop_filter_luma_8_c","_h264_h_loop_filter_luma_mbaff_8_c","_h264_v_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma422_8_c","_h264_h_loop_filter_chroma_mbaff_8_c","_h264_h_loop_filter_chroma422_mbaff_8_c","_postrotate_c","_sbr_hf_g_filt_c","_ps_hybrid_analysis_c","_ps_stereo_interpolate_c","_ps_stereo_interpolate_ipdopd_c","_vector_fmul_window_c","_vector_fmul_add_c",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,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,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,0,0,0,0,0,0],vr=[0,"jsCall_viiiiidd_0","jsCall_viiiiidd_1","jsCall_viiiiidd_2","jsCall_viiiiidd_3","jsCall_viiiiidd_4","jsCall_viiiiidd_5","jsCall_viiiiidd_6","jsCall_viiiiidd_7","jsCall_viiiiidd_8","jsCall_viiiiidd_9","jsCall_viiiiidd_10","jsCall_viiiiidd_11","jsCall_viiiiidd_12","jsCall_viiiiidd_13","jsCall_viiiiidd_14","jsCall_viiiiidd_15","jsCall_viiiiidd_16","jsCall_viiiiidd_17","jsCall_viiiiidd_18","jsCall_viiiiidd_19","jsCall_viiiiidd_20","jsCall_viiiiidd_21","jsCall_viiiiidd_22","jsCall_viiiiidd_23","jsCall_viiiiidd_24","jsCall_viiiiidd_25","jsCall_viiiiidd_26","jsCall_viiiiidd_27","jsCall_viiiiidd_28","jsCall_viiiiidd_29","jsCall_viiiiidd_30","jsCall_viiiiidd_31","jsCall_viiiiidd_32","jsCall_viiiiidd_33","jsCall_viiiiidd_34",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,0],yr=[0,"jsCall_viiiiii_0","jsCall_viiiiii_1","jsCall_viiiiii_2","jsCall_viiiiii_3","jsCall_viiiiii_4","jsCall_viiiiii_5","jsCall_viiiiii_6","jsCall_viiiiii_7","jsCall_viiiiii_8","jsCall_viiiiii_9","jsCall_viiiiii_10","jsCall_viiiiii_11","jsCall_viiiiii_12","jsCall_viiiiii_13","jsCall_viiiiii_14","jsCall_viiiiii_15","jsCall_viiiiii_16","jsCall_viiiiii_17","jsCall_viiiiii_18","jsCall_viiiiii_19","jsCall_viiiiii_20","jsCall_viiiiii_21","jsCall_viiiiii_22","jsCall_viiiiii_23","jsCall_viiiiii_24","jsCall_viiiiii_25","jsCall_viiiiii_26","jsCall_viiiiii_27","jsCall_viiiiii_28","jsCall_viiiiii_29","jsCall_viiiiii_30","jsCall_viiiiii_31","jsCall_viiiiii_32","jsCall_viiiiii_33","jsCall_viiiiii_34","_read_geobtag","_read_apic","_read_chapter","_read_priv","_ff_hyscale_fast_c","_bswap16Y_c","_read_ya16le_gray_c","_read_ya16be_gray_c","_read_ayuv64le_Y_c","_yuy2ToY_c","_uyvyToY_c","_bgr24ToY_c","_bgr16leToY_c","_bgr16beToY_c","_bgr15leToY_c","_bgr15beToY_c","_bgr12leToY_c","_bgr12beToY_c","_rgb24ToY_c","_rgb16leToY_c","_rgb16beToY_c","_rgb15leToY_c","_rgb15beToY_c","_rgb12leToY_c","_rgb12beToY_c","_palToY_c","_monoblack2Y_c","_monowhite2Y_c","_bgr32ToY_c","_bgr321ToY_c","_rgb32ToY_c","_rgb321ToY_c","_rgb48BEToY_c","_rgb48LEToY_c","_bgr48BEToY_c","_bgr48LEToY_c","_rgb64BEToY_c","_rgb64LEToY_c","_bgr64BEToY_c","_bgr64LEToY_c","_p010LEToY_c","_p010BEToY_c","_grayf32ToY16_c","_grayf32ToY16_bswap_c","_rgba64leToA_c","_rgba64beToA_c","_rgbaToA_c","_abgrToA_c","_read_ya16le_alpha_c","_read_ya16be_alpha_c","_read_ayuv64le_A_c","_palToA_c","_put_pcm_9","_hevc_h_loop_filter_luma_9","_hevc_v_loop_filter_luma_9","_put_pcm_10","_hevc_h_loop_filter_luma_10","_hevc_v_loop_filter_luma_10","_put_pcm_12","_hevc_h_loop_filter_luma_12","_hevc_v_loop_filter_luma_12","_put_pcm_8","_hevc_h_loop_filter_luma_8","_hevc_v_loop_filter_luma_8","_pred_dc_9","_pred_angular_0_9","_pred_angular_1_9","_pred_angular_2_9","_pred_angular_3_9","_pred_dc_10","_pred_angular_0_10","_pred_angular_1_10","_pred_angular_2_10","_pred_angular_3_10","_pred_dc_12","_pred_angular_0_12","_pred_angular_1_12","_pred_angular_2_12","_pred_angular_3_12","_pred_dc_8","_pred_angular_0_8","_pred_angular_1_8","_pred_angular_2_8","_pred_angular_3_8","_weight_h264_pixels16_9_c","_weight_h264_pixels8_9_c","_weight_h264_pixels4_9_c","_weight_h264_pixels2_9_c","_weight_h264_pixels16_10_c","_weight_h264_pixels8_10_c","_weight_h264_pixels4_10_c","_weight_h264_pixels2_10_c","_weight_h264_pixels16_12_c","_weight_h264_pixels8_12_c","_weight_h264_pixels4_12_c","_weight_h264_pixels2_12_c","_weight_h264_pixels16_14_c","_weight_h264_pixels8_14_c","_weight_h264_pixels4_14_c","_weight_h264_pixels2_14_c","_weight_h264_pixels16_8_c","_weight_h264_pixels8_8_c","_weight_h264_pixels4_8_c","_weight_h264_pixels2_8_c","_sbr_hf_apply_noise_0","_sbr_hf_apply_noise_1","_sbr_hf_apply_noise_2","_sbr_hf_apply_noise_3","_aes_decrypt","_aes_encrypt","_image_copy_plane",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,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,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,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,0],gr=[0,"jsCall_viiiiiifi_0","jsCall_viiiiiifi_1","jsCall_viiiiiifi_2","jsCall_viiiiiifi_3","jsCall_viiiiiifi_4","jsCall_viiiiiifi_5","jsCall_viiiiiifi_6","jsCall_viiiiiifi_7","jsCall_viiiiiifi_8","jsCall_viiiiiifi_9","jsCall_viiiiiifi_10","jsCall_viiiiiifi_11","jsCall_viiiiiifi_12","jsCall_viiiiiifi_13","jsCall_viiiiiifi_14","jsCall_viiiiiifi_15","jsCall_viiiiiifi_16","jsCall_viiiiiifi_17","jsCall_viiiiiifi_18","jsCall_viiiiiifi_19","jsCall_viiiiiifi_20","jsCall_viiiiiifi_21","jsCall_viiiiiifi_22","jsCall_viiiiiifi_23","jsCall_viiiiiifi_24","jsCall_viiiiiifi_25","jsCall_viiiiiifi_26","jsCall_viiiiiifi_27","jsCall_viiiiiifi_28","jsCall_viiiiiifi_29","jsCall_viiiiiifi_30","jsCall_viiiiiifi_31","jsCall_viiiiiifi_32","jsCall_viiiiiifi_33","jsCall_viiiiiifi_34","_ps_decorrelate_c",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],wr=[0,"jsCall_viiiiiii_0","jsCall_viiiiiii_1","jsCall_viiiiiii_2","jsCall_viiiiiii_3","jsCall_viiiiiii_4","jsCall_viiiiiii_5","jsCall_viiiiiii_6","jsCall_viiiiiii_7","jsCall_viiiiiii_8","jsCall_viiiiiii_9","jsCall_viiiiiii_10","jsCall_viiiiiii_11","jsCall_viiiiiii_12","jsCall_viiiiiii_13","jsCall_viiiiiii_14","jsCall_viiiiiii_15","jsCall_viiiiiii_16","jsCall_viiiiiii_17","jsCall_viiiiiii_18","jsCall_viiiiiii_19","jsCall_viiiiiii_20","jsCall_viiiiiii_21","jsCall_viiiiiii_22","jsCall_viiiiiii_23","jsCall_viiiiiii_24","jsCall_viiiiiii_25","jsCall_viiiiiii_26","jsCall_viiiiiii_27","jsCall_viiiiiii_28","jsCall_viiiiiii_29","jsCall_viiiiiii_30","jsCall_viiiiiii_31","jsCall_viiiiiii_32","jsCall_viiiiiii_33","jsCall_viiiiiii_34","_hScale8To15_c","_hScale8To19_c","_hScale16To19_c","_hScale16To15_c","_yuy2ToUV_c","_yvy2ToUV_c","_uyvyToUV_c","_nv12ToUV_c","_nv21ToUV_c","_palToUV_c","_bswap16UV_c","_read_ayuv64le_UV_c","_p010LEToUV_c","_p010BEToUV_c","_p016LEToUV_c","_p016BEToUV_c","_gbr24pToUV_half_c","_rgb64BEToUV_half_c","_rgb64LEToUV_half_c","_bgr64BEToUV_half_c","_bgr64LEToUV_half_c","_rgb48BEToUV_half_c","_rgb48LEToUV_half_c","_bgr48BEToUV_half_c","_bgr48LEToUV_half_c","_bgr32ToUV_half_c","_bgr321ToUV_half_c","_bgr24ToUV_half_c","_bgr16leToUV_half_c","_bgr16beToUV_half_c","_bgr15leToUV_half_c","_bgr15beToUV_half_c","_bgr12leToUV_half_c","_bgr12beToUV_half_c","_rgb32ToUV_half_c","_rgb321ToUV_half_c","_rgb24ToUV_half_c","_rgb16leToUV_half_c","_rgb16beToUV_half_c","_rgb15leToUV_half_c","_rgb15beToUV_half_c","_rgb12leToUV_half_c","_rgb12beToUV_half_c","_rgb64BEToUV_c","_rgb64LEToUV_c","_bgr64BEToUV_c","_bgr64LEToUV_c","_rgb48BEToUV_c","_rgb48LEToUV_c","_bgr48BEToUV_c","_bgr48LEToUV_c","_bgr32ToUV_c","_bgr321ToUV_c","_bgr24ToUV_c","_bgr16leToUV_c","_bgr16beToUV_c","_bgr15leToUV_c","_bgr15beToUV_c","_bgr12leToUV_c","_bgr12beToUV_c","_rgb32ToUV_c","_rgb321ToUV_c","_rgb24ToUV_c","_rgb16leToUV_c","_rgb16beToUV_c","_rgb15leToUV_c","_rgb15beToUV_c","_rgb12leToUV_c","_rgb12beToUV_c","_yuv2p010lX_LE_c","_yuv2p010lX_BE_c","_yuv2p010cX_c","_yuv2planeX_16LE_c","_yuv2planeX_16BE_c","_yuv2p016cX_c","_yuv2planeX_9LE_c","_yuv2planeX_9BE_c","_yuv2planeX_10LE_c","_yuv2planeX_10BE_c","_yuv2planeX_12LE_c","_yuv2planeX_12BE_c","_yuv2planeX_14LE_c","_yuv2planeX_14BE_c","_yuv2planeX_floatBE_c","_yuv2planeX_floatLE_c","_yuv2planeX_8_c","_yuv2nv12cX_c","_sao_edge_filter_9","_put_hevc_pel_pixels_9","_put_hevc_qpel_h_9","_put_hevc_qpel_v_9","_put_hevc_qpel_hv_9","_put_hevc_epel_h_9","_put_hevc_epel_v_9","_put_hevc_epel_hv_9","_sao_edge_filter_10","_put_hevc_pel_pixels_10","_put_hevc_qpel_h_10","_put_hevc_qpel_v_10","_put_hevc_qpel_hv_10","_put_hevc_epel_h_10","_put_hevc_epel_v_10","_put_hevc_epel_hv_10","_sao_edge_filter_12","_put_hevc_pel_pixels_12","_put_hevc_qpel_h_12","_put_hevc_qpel_v_12","_put_hevc_qpel_hv_12","_put_hevc_epel_h_12","_put_hevc_epel_v_12","_put_hevc_epel_hv_12","_sao_edge_filter_8","_put_hevc_pel_pixels_8","_put_hevc_qpel_h_8","_put_hevc_qpel_v_8","_put_hevc_qpel_hv_8","_put_hevc_epel_h_8","_put_hevc_epel_v_8","_put_hevc_epel_hv_8",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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Er=[0,"jsCall_viiiiiiii_0","jsCall_viiiiiiii_1","jsCall_viiiiiiii_2","jsCall_viiiiiiii_3","jsCall_viiiiiiii_4","jsCall_viiiiiiii_5","jsCall_viiiiiiii_6","jsCall_viiiiiiii_7","jsCall_viiiiiiii_8","jsCall_viiiiiiii_9","jsCall_viiiiiiii_10","jsCall_viiiiiiii_11","jsCall_viiiiiiii_12","jsCall_viiiiiiii_13","jsCall_viiiiiiii_14","jsCall_viiiiiiii_15","jsCall_viiiiiiii_16","jsCall_viiiiiiii_17","jsCall_viiiiiiii_18","jsCall_viiiiiiii_19","jsCall_viiiiiiii_20","jsCall_viiiiiiii_21","jsCall_viiiiiiii_22","jsCall_viiiiiiii_23","jsCall_viiiiiiii_24","jsCall_viiiiiiii_25","jsCall_viiiiiiii_26","jsCall_viiiiiiii_27","jsCall_viiiiiiii_28","jsCall_viiiiiiii_29","jsCall_viiiiiiii_30","jsCall_viiiiiiii_31","jsCall_viiiiiiii_32","jsCall_viiiiiiii_33","jsCall_viiiiiiii_34","_ff_hcscale_fast_c","_bayer_bggr8_to_yv12_copy","_bayer_bggr8_to_yv12_interpolate","_bayer_bggr16le_to_yv12_copy","_bayer_bggr16le_to_yv12_interpolate","_bayer_bggr16be_to_yv12_copy","_bayer_bggr16be_to_yv12_interpolate","_bayer_rggb8_to_yv12_copy","_bayer_rggb8_to_yv12_interpolate","_bayer_rggb16le_to_yv12_copy","_bayer_rggb16le_to_yv12_interpolate","_bayer_rggb16be_to_yv12_copy","_bayer_rggb16be_to_yv12_interpolate","_bayer_gbrg8_to_yv12_copy","_bayer_gbrg8_to_yv12_interpolate","_bayer_gbrg16le_to_yv12_copy","_bayer_gbrg16le_to_yv12_interpolate","_bayer_gbrg16be_to_yv12_copy","_bayer_gbrg16be_to_yv12_interpolate","_bayer_grbg8_to_yv12_copy","_bayer_grbg8_to_yv12_interpolate","_bayer_grbg16le_to_yv12_copy","_bayer_grbg16le_to_yv12_interpolate","_bayer_grbg16be_to_yv12_copy","_bayer_grbg16be_to_yv12_interpolate","_sao_band_filter_9","_put_hevc_pel_uni_pixels_9","_put_hevc_qpel_uni_h_9","_put_hevc_qpel_uni_v_9","_put_hevc_qpel_uni_hv_9","_put_hevc_epel_uni_h_9","_put_hevc_epel_uni_v_9","_put_hevc_epel_uni_hv_9","_sao_band_filter_10","_put_hevc_pel_uni_pixels_10","_put_hevc_qpel_uni_h_10","_put_hevc_qpel_uni_v_10","_put_hevc_qpel_uni_hv_10","_put_hevc_epel_uni_h_10","_put_hevc_epel_uni_v_10","_put_hevc_epel_uni_hv_10","_sao_band_filter_12","_put_hevc_pel_uni_pixels_12","_put_hevc_qpel_uni_h_12","_put_hevc_qpel_uni_v_12","_put_hevc_qpel_uni_hv_12","_put_hevc_epel_uni_h_12","_put_hevc_epel_uni_v_12","_put_hevc_epel_uni_hv_12","_sao_band_filter_8","_put_hevc_pel_uni_pixels_8","_put_hevc_qpel_uni_h_8","_put_hevc_qpel_uni_v_8","_put_hevc_qpel_uni_hv_8","_put_hevc_epel_uni_h_8","_put_hevc_epel_uni_v_8","_put_hevc_epel_uni_hv_8","_biweight_h264_pixels16_9_c","_biweight_h264_pixels8_9_c","_biweight_h264_pixels4_9_c","_biweight_h264_pixels2_9_c","_biweight_h264_pixels16_10_c","_biweight_h264_pixels8_10_c","_biweight_h264_pixels4_10_c","_biweight_h264_pixels2_10_c","_biweight_h264_pixels16_12_c","_biweight_h264_pixels8_12_c","_biweight_h264_pixels4_12_c","_biweight_h264_pixels2_12_c","_biweight_h264_pixels16_14_c","_biweight_h264_pixels8_14_c","_biweight_h264_pixels4_14_c","_biweight_h264_pixels2_14_c","_biweight_h264_pixels16_8_c","_biweight_h264_pixels8_8_c","_biweight_h264_pixels4_8_c","_biweight_h264_pixels2_8_c",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Cr=[0,"jsCall_viiiiiiiid_0","jsCall_viiiiiiiid_1","jsCall_viiiiiiiid_2","jsCall_viiiiiiiid_3","jsCall_viiiiiiiid_4","jsCall_viiiiiiiid_5","jsCall_viiiiiiiid_6","jsCall_viiiiiiiid_7","jsCall_viiiiiiiid_8","jsCall_viiiiiiiid_9","jsCall_viiiiiiiid_10","jsCall_viiiiiiiid_11","jsCall_viiiiiiiid_12","jsCall_viiiiiiiid_13","jsCall_viiiiiiiid_14","jsCall_viiiiiiiid_15","jsCall_viiiiiiiid_16","jsCall_viiiiiiiid_17","jsCall_viiiiiiiid_18","jsCall_viiiiiiiid_19","jsCall_viiiiiiiid_20","jsCall_viiiiiiiid_21","jsCall_viiiiiiiid_22","jsCall_viiiiiiiid_23","jsCall_viiiiiiiid_24","jsCall_viiiiiiiid_25","jsCall_viiiiiiiid_26","jsCall_viiiiiiiid_27","jsCall_viiiiiiiid_28","jsCall_viiiiiiiid_29","jsCall_viiiiiiiid_30","jsCall_viiiiiiiid_31","jsCall_viiiiiiiid_32","jsCall_viiiiiiiid_33","jsCall_viiiiiiiid_34",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,0],Sr=[0,"jsCall_viiiiiiiidi_0","jsCall_viiiiiiiidi_1","jsCall_viiiiiiiidi_2","jsCall_viiiiiiiidi_3","jsCall_viiiiiiiidi_4","jsCall_viiiiiiiidi_5","jsCall_viiiiiiiidi_6","jsCall_viiiiiiiidi_7","jsCall_viiiiiiiidi_8","jsCall_viiiiiiiidi_9","jsCall_viiiiiiiidi_10","jsCall_viiiiiiiidi_11","jsCall_viiiiiiiidi_12","jsCall_viiiiiiiidi_13","jsCall_viiiiiiiidi_14","jsCall_viiiiiiiidi_15","jsCall_viiiiiiiidi_16","jsCall_viiiiiiiidi_17","jsCall_viiiiiiiidi_18","jsCall_viiiiiiiidi_19","jsCall_viiiiiiiidi_20","jsCall_viiiiiiiidi_21","jsCall_viiiiiiiidi_22","jsCall_viiiiiiiidi_23","jsCall_viiiiiiiidi_24","jsCall_viiiiiiiidi_25","jsCall_viiiiiiiidi_26","jsCall_viiiiiiiidi_27","jsCall_viiiiiiiidi_28","jsCall_viiiiiiiidi_29","jsCall_viiiiiiiidi_30","jsCall_viiiiiiiidi_31","jsCall_viiiiiiiidi_32","jsCall_viiiiiiiidi_33","jsCall_viiiiiiiidi_34",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,0],jr=[0,"jsCall_viiiiiiiii_0","jsCall_viiiiiiiii_1","jsCall_viiiiiiiii_2","jsCall_viiiiiiiii_3","jsCall_viiiiiiiii_4","jsCall_viiiiiiiii_5","jsCall_viiiiiiiii_6","jsCall_viiiiiiiii_7","jsCall_viiiiiiiii_8","jsCall_viiiiiiiii_9","jsCall_viiiiiiiii_10","jsCall_viiiiiiiii_11","jsCall_viiiiiiiii_12","jsCall_viiiiiiiii_13","jsCall_viiiiiiiii_14","jsCall_viiiiiiiii_15","jsCall_viiiiiiiii_16","jsCall_viiiiiiiii_17","jsCall_viiiiiiiii_18","jsCall_viiiiiiiii_19","jsCall_viiiiiiiii_20","jsCall_viiiiiiiii_21","jsCall_viiiiiiiii_22","jsCall_viiiiiiiii_23","jsCall_viiiiiiiii_24","jsCall_viiiiiiiii_25","jsCall_viiiiiiiii_26","jsCall_viiiiiiiii_27","jsCall_viiiiiiiii_28","jsCall_viiiiiiiii_29","jsCall_viiiiiiiii_30","jsCall_viiiiiiiii_31","jsCall_viiiiiiiii_32","jsCall_viiiiiiiii_33","jsCall_viiiiiiiii_34","_yuv2rgba32_full_1_c","_yuv2rgbx32_full_1_c","_yuv2argb32_full_1_c","_yuv2xrgb32_full_1_c","_yuv2bgra32_full_1_c","_yuv2bgrx32_full_1_c","_yuv2abgr32_full_1_c","_yuv2xbgr32_full_1_c","_yuv2rgba64le_full_1_c","_yuv2rgbx64le_full_1_c","_yuv2rgba64be_full_1_c","_yuv2rgbx64be_full_1_c","_yuv2bgra64le_full_1_c","_yuv2bgrx64le_full_1_c","_yuv2bgra64be_full_1_c","_yuv2bgrx64be_full_1_c","_yuv2rgb24_full_1_c","_yuv2bgr24_full_1_c","_yuv2rgb48le_full_1_c","_yuv2bgr48le_full_1_c","_yuv2rgb48be_full_1_c","_yuv2bgr48be_full_1_c","_yuv2bgr4_byte_full_1_c","_yuv2rgb4_byte_full_1_c","_yuv2bgr8_full_1_c","_yuv2rgb8_full_1_c","_yuv2rgbx64le_1_c","_yuv2rgba64le_1_c","_yuv2rgbx64be_1_c","_yuv2rgba64be_1_c","_yuv2bgrx64le_1_c","_yuv2bgra64le_1_c","_yuv2bgrx64be_1_c","_yuv2bgra64be_1_c","_yuv2rgba32_1_c","_yuv2rgbx32_1_c","_yuv2rgba32_1_1_c","_yuv2rgbx32_1_1_c","_yuv2rgb16_1_c","_yuv2rgb15_1_c","_yuv2rgb12_1_c","_yuv2rgb8_1_c","_yuv2rgb4_1_c","_yuv2rgb4b_1_c","_yuv2rgb48le_1_c","_yuv2rgb48be_1_c","_yuv2bgr48le_1_c","_yuv2bgr48be_1_c","_yuv2rgb24_1_c","_yuv2bgr24_1_c","_yuv2monowhite_1_c","_yuv2monoblack_1_c","_yuv2yuyv422_1_c","_yuv2yvyu422_1_c","_yuv2uyvy422_1_c","_yuv2ya8_1_c","_yuv2ya16le_1_c","_yuv2ya16be_1_c","_yuy2toyv12_c","_put_hevc_pel_bi_pixels_9","_put_hevc_qpel_bi_h_9","_put_hevc_qpel_bi_v_9","_put_hevc_qpel_bi_hv_9","_put_hevc_epel_bi_h_9","_put_hevc_epel_bi_v_9","_put_hevc_epel_bi_hv_9","_put_hevc_pel_bi_pixels_10","_put_hevc_qpel_bi_h_10","_put_hevc_qpel_bi_v_10","_put_hevc_qpel_bi_hv_10","_put_hevc_epel_bi_h_10","_put_hevc_epel_bi_v_10","_put_hevc_epel_bi_hv_10","_put_hevc_pel_bi_pixels_12","_put_hevc_qpel_bi_h_12","_put_hevc_qpel_bi_v_12","_put_hevc_qpel_bi_hv_12","_put_hevc_epel_bi_h_12","_put_hevc_epel_bi_v_12","_put_hevc_epel_bi_hv_12","_put_hevc_pel_bi_pixels_8","_put_hevc_qpel_bi_h_8","_put_hevc_qpel_bi_v_8","_put_hevc_qpel_bi_hv_8","_put_hevc_epel_bi_h_8","_put_hevc_epel_bi_v_8","_put_hevc_epel_bi_hv_8",0,0,0,0,0],Tr=[0,"jsCall_viiiiiiiiii_0","jsCall_viiiiiiiiii_1","jsCall_viiiiiiiiii_2","jsCall_viiiiiiiiii_3","jsCall_viiiiiiiiii_4","jsCall_viiiiiiiiii_5","jsCall_viiiiiiiiii_6","jsCall_viiiiiiiiii_7","jsCall_viiiiiiiiii_8","jsCall_viiiiiiiiii_9","jsCall_viiiiiiiiii_10","jsCall_viiiiiiiiii_11","jsCall_viiiiiiiiii_12","jsCall_viiiiiiiiii_13","jsCall_viiiiiiiiii_14","jsCall_viiiiiiiiii_15","jsCall_viiiiiiiiii_16","jsCall_viiiiiiiiii_17","jsCall_viiiiiiiiii_18","jsCall_viiiiiiiiii_19","jsCall_viiiiiiiiii_20","jsCall_viiiiiiiiii_21","jsCall_viiiiiiiiii_22","jsCall_viiiiiiiiii_23","jsCall_viiiiiiiiii_24","jsCall_viiiiiiiiii_25","jsCall_viiiiiiiiii_26","jsCall_viiiiiiiiii_27","jsCall_viiiiiiiiii_28","jsCall_viiiiiiiiii_29","jsCall_viiiiiiiiii_30","jsCall_viiiiiiiiii_31","jsCall_viiiiiiiiii_32","jsCall_viiiiiiiiii_33","jsCall_viiiiiiiiii_34","_yuv2rgba32_full_2_c","_yuv2rgbx32_full_2_c","_yuv2argb32_full_2_c","_yuv2xrgb32_full_2_c","_yuv2bgra32_full_2_c","_yuv2bgrx32_full_2_c","_yuv2abgr32_full_2_c","_yuv2xbgr32_full_2_c","_yuv2rgba64le_full_2_c","_yuv2rgbx64le_full_2_c","_yuv2rgba64be_full_2_c","_yuv2rgbx64be_full_2_c","_yuv2bgra64le_full_2_c","_yuv2bgrx64le_full_2_c","_yuv2bgra64be_full_2_c","_yuv2bgrx64be_full_2_c","_yuv2rgb24_full_2_c","_yuv2bgr24_full_2_c","_yuv2rgb48le_full_2_c","_yuv2bgr48le_full_2_c","_yuv2rgb48be_full_2_c","_yuv2bgr48be_full_2_c","_yuv2bgr4_byte_full_2_c","_yuv2rgb4_byte_full_2_c","_yuv2bgr8_full_2_c","_yuv2rgb8_full_2_c","_yuv2rgbx64le_2_c","_yuv2rgba64le_2_c","_yuv2rgbx64be_2_c","_yuv2rgba64be_2_c","_yuv2bgrx64le_2_c","_yuv2bgra64le_2_c","_yuv2bgrx64be_2_c","_yuv2bgra64be_2_c","_yuv2rgba32_2_c","_yuv2rgbx32_2_c","_yuv2rgba32_1_2_c","_yuv2rgbx32_1_2_c","_yuv2rgb16_2_c","_yuv2rgb15_2_c","_yuv2rgb12_2_c","_yuv2rgb8_2_c","_yuv2rgb4_2_c","_yuv2rgb4b_2_c","_yuv2rgb48le_2_c","_yuv2rgb48be_2_c","_yuv2bgr48le_2_c","_yuv2bgr48be_2_c","_yuv2rgb24_2_c","_yuv2bgr24_2_c","_yuv2monowhite_2_c","_yuv2monoblack_2_c","_yuv2yuyv422_2_c","_yuv2yvyu422_2_c","_yuv2uyvy422_2_c","_yuv2ya8_2_c","_yuv2ya16le_2_c","_yuv2ya16be_2_c","_vu9_to_vu12_c","_yvu9_to_yuy2_c","_ff_emulated_edge_mc_8","_ff_emulated_edge_mc_16",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,0,0,0],Ar=[0,"jsCall_viiiiiiiiiii_0","jsCall_viiiiiiiiiii_1","jsCall_viiiiiiiiiii_2","jsCall_viiiiiiiiiii_3","jsCall_viiiiiiiiiii_4","jsCall_viiiiiiiiiii_5","jsCall_viiiiiiiiiii_6","jsCall_viiiiiiiiiii_7","jsCall_viiiiiiiiiii_8","jsCall_viiiiiiiiiii_9","jsCall_viiiiiiiiiii_10","jsCall_viiiiiiiiiii_11","jsCall_viiiiiiiiiii_12","jsCall_viiiiiiiiiii_13","jsCall_viiiiiiiiiii_14","jsCall_viiiiiiiiiii_15","jsCall_viiiiiiiiiii_16","jsCall_viiiiiiiiiii_17","jsCall_viiiiiiiiiii_18","jsCall_viiiiiiiiiii_19","jsCall_viiiiiiiiiii_20","jsCall_viiiiiiiiiii_21","jsCall_viiiiiiiiiii_22","jsCall_viiiiiiiiiii_23","jsCall_viiiiiiiiiii_24","jsCall_viiiiiiiiiii_25","jsCall_viiiiiiiiiii_26","jsCall_viiiiiiiiiii_27","jsCall_viiiiiiiiiii_28","jsCall_viiiiiiiiiii_29","jsCall_viiiiiiiiiii_30","jsCall_viiiiiiiiiii_31","jsCall_viiiiiiiiiii_32","jsCall_viiiiiiiiiii_33","jsCall_viiiiiiiiiii_34","_put_hevc_pel_uni_w_pixels_9","_put_hevc_qpel_uni_w_h_9","_put_hevc_qpel_uni_w_v_9","_put_hevc_qpel_uni_w_hv_9","_put_hevc_epel_uni_w_h_9","_put_hevc_epel_uni_w_v_9","_put_hevc_epel_uni_w_hv_9","_put_hevc_pel_uni_w_pixels_10","_put_hevc_qpel_uni_w_h_10","_put_hevc_qpel_uni_w_v_10","_put_hevc_qpel_uni_w_hv_10","_put_hevc_epel_uni_w_h_10","_put_hevc_epel_uni_w_v_10","_put_hevc_epel_uni_w_hv_10","_put_hevc_pel_uni_w_pixels_12","_put_hevc_qpel_uni_w_h_12","_put_hevc_qpel_uni_w_v_12","_put_hevc_qpel_uni_w_hv_12","_put_hevc_epel_uni_w_h_12","_put_hevc_epel_uni_w_v_12","_put_hevc_epel_uni_w_hv_12","_put_hevc_pel_uni_w_pixels_8","_put_hevc_qpel_uni_w_h_8","_put_hevc_qpel_uni_w_v_8","_put_hevc_qpel_uni_w_hv_8","_put_hevc_epel_uni_w_h_8","_put_hevc_epel_uni_w_v_8","_put_hevc_epel_uni_w_hv_8"],xr=[0,"jsCall_viiiiiiiiiiii_0","jsCall_viiiiiiiiiiii_1","jsCall_viiiiiiiiiiii_2","jsCall_viiiiiiiiiiii_3","jsCall_viiiiiiiiiiii_4","jsCall_viiiiiiiiiiii_5","jsCall_viiiiiiiiiiii_6","jsCall_viiiiiiiiiiii_7","jsCall_viiiiiiiiiiii_8","jsCall_viiiiiiiiiiii_9","jsCall_viiiiiiiiiiii_10","jsCall_viiiiiiiiiiii_11","jsCall_viiiiiiiiiiii_12","jsCall_viiiiiiiiiiii_13","jsCall_viiiiiiiiiiii_14","jsCall_viiiiiiiiiiii_15","jsCall_viiiiiiiiiiii_16","jsCall_viiiiiiiiiiii_17","jsCall_viiiiiiiiiiii_18","jsCall_viiiiiiiiiiii_19","jsCall_viiiiiiiiiiii_20","jsCall_viiiiiiiiiiii_21","jsCall_viiiiiiiiiiii_22","jsCall_viiiiiiiiiiii_23","jsCall_viiiiiiiiiiii_24","jsCall_viiiiiiiiiiii_25","jsCall_viiiiiiiiiiii_26","jsCall_viiiiiiiiiiii_27","jsCall_viiiiiiiiiiii_28","jsCall_viiiiiiiiiiii_29","jsCall_viiiiiiiiiiii_30","jsCall_viiiiiiiiiiii_31","jsCall_viiiiiiiiiiii_32","jsCall_viiiiiiiiiiii_33","jsCall_viiiiiiiiiiii_34","_yuv2rgba32_full_X_c","_yuv2rgbx32_full_X_c","_yuv2argb32_full_X_c","_yuv2xrgb32_full_X_c","_yuv2bgra32_full_X_c","_yuv2bgrx32_full_X_c","_yuv2abgr32_full_X_c","_yuv2xbgr32_full_X_c","_yuv2rgba64le_full_X_c","_yuv2rgbx64le_full_X_c","_yuv2rgba64be_full_X_c","_yuv2rgbx64be_full_X_c","_yuv2bgra64le_full_X_c","_yuv2bgrx64le_full_X_c","_yuv2bgra64be_full_X_c","_yuv2bgrx64be_full_X_c","_yuv2rgb24_full_X_c","_yuv2bgr24_full_X_c","_yuv2rgb48le_full_X_c","_yuv2bgr48le_full_X_c","_yuv2rgb48be_full_X_c","_yuv2bgr48be_full_X_c","_yuv2bgr4_byte_full_X_c","_yuv2rgb4_byte_full_X_c","_yuv2bgr8_full_X_c","_yuv2rgb8_full_X_c","_yuv2gbrp_full_X_c","_yuv2gbrp16_full_X_c","_yuv2rgbx64le_X_c","_yuv2rgba64le_X_c","_yuv2rgbx64be_X_c","_yuv2rgba64be_X_c","_yuv2bgrx64le_X_c","_yuv2bgra64le_X_c","_yuv2bgrx64be_X_c","_yuv2bgra64be_X_c","_yuv2rgba32_X_c","_yuv2rgbx32_X_c","_yuv2rgba32_1_X_c","_yuv2rgbx32_1_X_c","_yuv2rgb16_X_c","_yuv2rgb15_X_c","_yuv2rgb12_X_c","_yuv2rgb8_X_c","_yuv2rgb4_X_c","_yuv2rgb4b_X_c","_yuv2rgb48le_X_c","_yuv2rgb48be_X_c","_yuv2bgr48le_X_c","_yuv2bgr48be_X_c","_yuv2rgb24_X_c","_yuv2bgr24_X_c","_yuv2monowhite_X_c","_yuv2ayuv64le_X_c","_yuv2monoblack_X_c","_yuv2yuyv422_X_c","_yuv2yvyu422_X_c","_yuv2uyvy422_X_c","_yuv2ya8_X_c","_yuv2ya16le_X_c","_yuv2ya16be_X_c","_sao_edge_restore_0_9","_sao_edge_restore_1_9","_sao_edge_restore_0_10","_sao_edge_restore_1_10","_sao_edge_restore_0_12","_sao_edge_restore_1_12","_sao_edge_restore_0_8","_sao_edge_restore_1_8",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Mr=[0,"jsCall_viiiiiiiiiiiiii_0","jsCall_viiiiiiiiiiiiii_1","jsCall_viiiiiiiiiiiiii_2","jsCall_viiiiiiiiiiiiii_3","jsCall_viiiiiiiiiiiiii_4","jsCall_viiiiiiiiiiiiii_5","jsCall_viiiiiiiiiiiiii_6","jsCall_viiiiiiiiiiiiii_7","jsCall_viiiiiiiiiiiiii_8","jsCall_viiiiiiiiiiiiii_9","jsCall_viiiiiiiiiiiiii_10","jsCall_viiiiiiiiiiiiii_11","jsCall_viiiiiiiiiiiiii_12","jsCall_viiiiiiiiiiiiii_13","jsCall_viiiiiiiiiiiiii_14","jsCall_viiiiiiiiiiiiii_15","jsCall_viiiiiiiiiiiiii_16","jsCall_viiiiiiiiiiiiii_17","jsCall_viiiiiiiiiiiiii_18","jsCall_viiiiiiiiiiiiii_19","jsCall_viiiiiiiiiiiiii_20","jsCall_viiiiiiiiiiiiii_21","jsCall_viiiiiiiiiiiiii_22","jsCall_viiiiiiiiiiiiii_23","jsCall_viiiiiiiiiiiiii_24","jsCall_viiiiiiiiiiiiii_25","jsCall_viiiiiiiiiiiiii_26","jsCall_viiiiiiiiiiiiii_27","jsCall_viiiiiiiiiiiiii_28","jsCall_viiiiiiiiiiiiii_29","jsCall_viiiiiiiiiiiiii_30","jsCall_viiiiiiiiiiiiii_31","jsCall_viiiiiiiiiiiiii_32","jsCall_viiiiiiiiiiiiii_33","jsCall_viiiiiiiiiiiiii_34","_put_hevc_pel_bi_w_pixels_9","_put_hevc_qpel_bi_w_h_9","_put_hevc_qpel_bi_w_v_9","_put_hevc_qpel_bi_w_hv_9","_put_hevc_epel_bi_w_h_9","_put_hevc_epel_bi_w_v_9","_put_hevc_epel_bi_w_hv_9","_put_hevc_pel_bi_w_pixels_10","_put_hevc_qpel_bi_w_h_10","_put_hevc_qpel_bi_w_v_10","_put_hevc_qpel_bi_w_hv_10","_put_hevc_epel_bi_w_h_10","_put_hevc_epel_bi_w_v_10","_put_hevc_epel_bi_w_hv_10","_put_hevc_pel_bi_w_pixels_12","_put_hevc_qpel_bi_w_h_12","_put_hevc_qpel_bi_w_v_12","_put_hevc_qpel_bi_w_hv_12","_put_hevc_epel_bi_w_h_12","_put_hevc_epel_bi_w_v_12","_put_hevc_epel_bi_w_hv_12","_put_hevc_pel_bi_w_pixels_8","_put_hevc_qpel_bi_w_h_8","_put_hevc_qpel_bi_w_v_8","_put_hevc_qpel_bi_w_hv_8","_put_hevc_epel_bi_w_h_8","_put_hevc_epel_bi_w_v_8","_put_hevc_epel_bi_w_hv_8"],kr={dd:zi,did:Hi,didd:Vi,fii:Yi,fiii:qi,ii:Xi,iid:Wi,iidiiii:Gi,iii:Ki,iiii:Qi,iiiii:Zi,iiiiii:Ji,iiiiiii:$i,iiiiiiii:er,iiiiij:tr,iiiji:ir,iiijjji:rr,jiiij:nr,jiiji:ar,jiji:sr,v:or,vdiidiiiii:lr,vi:fr,vii:ur,viidi:cr,viifi:hr,viii:dr,viiii:_r,viiiid:pr,viiiifii:mr,viiiii:br,viiiiidd:vr,viiiiii:yr,viiiiiifi:gr,viiiiiii:wr,viiiiiiii:Er,viiiiiiiid:Cr,viiiiiiiidi:Sr,viiiiiiiii:jr,viiiiiiiiii:Tr,viiiiiiiiiii:Ar,viiiiiiiiiiii:xr,viiiiiiiiiiiiii:Mr};function Pr(e){Ie(e,"dd")}function Ir(e){Ie(e,"did")}function Rr(e){Ie(e,"didd")}function Ur(e){Ie(e,"fii")}function Dr(e){Ie(e,"fiii")}function Fr(e){Ie(e,"ii")}function Or(e){Ie(e,"iid")}function Lr(e){Ie(e,"iidiiii")}function Br(e){Ie(e,"iii")}function Nr(e){Ie(e,"iiii")}function zr(e){Ie(e,"iiiii")}function Hr(e){Ie(e,"iiiiii")}function Vr(e){Ie(e,"iiiiiii")}function Yr(e){Ie(e,"iiiiiiii")}function qr(e){Ie(e,"iiiiij")}function Xr(e){Ie(e,"iiiji")}function Wr(e){Ie(e,"iiijjji")}function Gr(e){Ie(e,"jiiij")}function Kr(e){Ie(e,"jiiji")}function Qr(e){Ie(e,"jiji")}function Zr(e){Ie(e,"v")}function Jr(e){Ie(e,"vdiidiiiii")}function $r(e){Ie(e,"vi")}function en(e){Ie(e,"vii")}function tn(e){Ie(e,"viidi")}function rn(e){Ie(e,"viifi")}function nn(e){Ie(e,"viii")}function an(e){Ie(e,"viiii")}function sn(e){Ie(e,"viiiid")}function on(e){Ie(e,"viiiifii")}function ln(e){Ie(e,"viiiii")}function fn(e){Ie(e,"viiiiidd")}function un(e){Ie(e,"viiiiii")}function cn(e){Ie(e,"viiiiiifi")}function hn(e){Ie(e,"viiiiiii")}function dn(e){Ie(e,"viiiiiiii")}function _n(e){Ie(e,"viiiiiiiid")}function pn(e){Ie(e,"viiiiiiiidi")}function mn(e){Ie(e,"viiiiiiiii")}function bn(e){Ie(e,"viiiiiiiiii")}function vn(e){Ie(e,"viiiiiiiiiii")}function yn(e){Ie(e,"viiiiiiiiiiii")}function gn(e){Ie(e,"viiiiiiiiiiiiii")}function wn(e,t){return F[e](t)}function En(e,t,i){return F[e](t,i)}function Cn(e,t,i,r){return F[e](t,i,r)}function Sn(e,t,i){return F[e](t,i)}function jn(e,t,i,r){return F[e](t,i,r)}function Tn(e,t){return F[e](t)}function An(e,t,i){return F[e](t,i)}function xn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Mn(e,t,i){return F[e](t,i)}function kn(e,t,i,r){return F[e](t,i,r)}function Pn(e,t,i,r,n){return F[e](t,i,r,n)}function In(e,t,i,r,n,a){return F[e](t,i,r,n,a)}function Rn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Un(e,t,i,r,n,a,s,o){return F[e](t,i,r,n,a,s,o)}function Dn(e,t,i,r,n,a){return F[e](t,i,r,n,a)}function Fn(e,t,i,r,n){return F[e](t,i,r,n)}function On(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Ln(e,t,i,r,n){return F[e](t,i,r,n)}function Bn(e,t,i,r,n){return F[e](t,i,r,n)}function Nn(e,t,i,r){return F[e](t,i,r)}function zn(e){F[e]()}function Hn(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function Vn(e,t){F[e](t)}function Yn(e,t,i){F[e](t,i)}function qn(e,t,i,r,n){F[e](t,i,r,n)}function Xn(e,t,i,r,n){F[e](t,i,r,n)}function Wn(e,t,i,r){F[e](t,i,r)}function Gn(e,t,i,r,n){F[e](t,i,r,n)}function Kn(e,t,i,r,n,a){F[e](t,i,r,n,a)}function Qn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function Zn(e,t,i,r,n,a){F[e](t,i,r,n,a)}function Jn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function $n(e,t,i,r,n,a,s){F[e](t,i,r,n,a,s)}function ea(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l)}function ta(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function ia(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l)}function ra(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function na(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u)}function aa(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function sa(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u)}function oa(e,t,i,r,n,a,s,o,l,f,u,c){F[e](t,i,r,n,a,s,o,l,f,u,c)}function la(e,t,i,r,n,a,s,o,l,f,u,c,h){F[e](t,i,r,n,a,s,o,l,f,u,c,h)}function fa(e,t,i,r,n,a,s,o,l,f,u,c,h,d,_){F[e](t,i,r,n,a,s,o,l,f,u,c,h,d,_)}var ua={},ca={___buildEnvironment:Et,___lock:Ct,___syscall221:Ft,___syscall3:Ot,___syscall5:Lt,___unlock:Bt,___wasi_fd_close:zt,___wasi_fd_fdstat_get:Vt,___wasi_fd_seek:qt,___wasi_fd_write:Wt,__emscripten_fetch_free:Gt,__memory_base:1024,__table_base:0,_abort:Kt,_clock:Qt,_clock_gettime:$t,_emscripten_asm_const_i:pt,_emscripten_get_heap_size:ei,_emscripten_is_main_browser_thread:ti,_emscripten_memcpy_big:Ci,_emscripten_resize_heap:ri,_emscripten_start_fetch:fi,_fabs:ui,_getenv:ci,_gettimeofday:hi,_gmtime_r:_i,_llvm_exp2_f64:mi,_llvm_log2_f32:bi,_llvm_stackrestore:vi,_llvm_stacksave:yi,_llvm_trunc_f64:gi,_localtime_r:Ei,_nanosleep:ji,_pthread_cond_destroy:Ti,_pthread_cond_init:Ai,_pthread_create:xi,_pthread_join:Mi,_strftime:Di,_sysconf:Fi,_time:Oi,abortStackOverflow:Pe,getTempRet0:H,jsCall_dd:wn,jsCall_did:En,jsCall_didd:Cn,jsCall_fii:Sn,jsCall_fiii:jn,jsCall_ii:Tn,jsCall_iid:An,jsCall_iidiiii:xn,jsCall_iii:Mn,jsCall_iiii:kn,jsCall_iiiii:Pn,jsCall_iiiiii:In,jsCall_iiiiiii:Rn,jsCall_iiiiiiii:Un,jsCall_iiiiij:Dn,jsCall_iiiji:Fn,jsCall_iiijjji:On,jsCall_jiiij:Ln,jsCall_jiiji:Bn,jsCall_jiji:Nn,jsCall_v:zn,jsCall_vdiidiiiii:Hn,jsCall_vi:Vn,jsCall_vii:Yn,jsCall_viidi:qn,jsCall_viifi:Xn,jsCall_viii:Wn,jsCall_viiii:Gn,jsCall_viiiid:Kn,jsCall_viiiifii:Qn,jsCall_viiiii:Zn,jsCall_viiiiidd:Jn,jsCall_viiiiii:$n,jsCall_viiiiiifi:ea,jsCall_viiiiiii:ta,jsCall_viiiiiiii:ia,jsCall_viiiiiiiid:ra,jsCall_viiiiiiiidi:na,jsCall_viiiiiiiii:aa,jsCall_viiiiiiiiii:sa,jsCall_viiiiiiiiiii:oa,jsCall_viiiiiiiiiiii:la,jsCall_viiiiiiiiiiiiii:fa,memory:N,nullFunc_dd:Pr,nullFunc_did:Ir,nullFunc_didd:Rr,nullFunc_fii:Ur,nullFunc_fiii:Dr,nullFunc_ii:Fr,nullFunc_iid:Or,nullFunc_iidiiii:Lr,nullFunc_iii:Br,nullFunc_iiii:Nr,nullFunc_iiiii:zr,nullFunc_iiiiii:Hr,nullFunc_iiiiiii:Vr,nullFunc_iiiiiiii:Yr,nullFunc_iiiiij:qr,nullFunc_iiiji:Xr,nullFunc_iiijjji:Wr,nullFunc_jiiij:Gr,nullFunc_jiiji:Kr,nullFunc_jiji:Qr,nullFunc_v:Zr,nullFunc_vdiidiiiii:Jr,nullFunc_vi:$r,nullFunc_vii:en,nullFunc_viidi:tn,nullFunc_viifi:rn,nullFunc_viii:nn,nullFunc_viiii:an,nullFunc_viiiid:sn,nullFunc_viiiifii:on,nullFunc_viiiii:ln,nullFunc_viiiiidd:fn,nullFunc_viiiiii:un,nullFunc_viiiiiifi:cn,nullFunc_viiiiiii:hn,nullFunc_viiiiiiii:dn,nullFunc_viiiiiiiid:_n,nullFunc_viiiiiiiidi:pn,nullFunc_viiiiiiiii:mn,nullFunc_viiiiiiiiii:bn,nullFunc_viiiiiiiiiii:vn,nullFunc_viiiiiiiiiiii:yn,nullFunc_viiiiiiiiiiiiii:gn,table:Y},ha=d.asm(ua,ca,ue);d.asm=ha;d._AVSniffHttpFlvInit=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffHttpFlvInit.apply(null,arguments)},d._AVSniffStreamInit=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffStreamInit.apply(null,arguments)};var da,_a=d.___emscripten_environ_constructor=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___emscripten_environ_constructor.apply(null,arguments)},pa=(d.___errno_location=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___errno_location.apply(null,arguments)},d.__get_daylight=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_daylight.apply(null,arguments)}),ma=d.__get_timezone=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_timezone.apply(null,arguments)},ba=d.__get_tzname=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_tzname.apply(null,arguments)},va=(d._closeVideo=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._closeVideo.apply(null,arguments)},d._decodeCodecContext=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeCodecContext.apply(null,arguments)},d._decodeHttpFlvVideoFrame=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeHttpFlvVideoFrame.apply(null,arguments)},d._decodeVideoFrame=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeVideoFrame.apply(null,arguments)},d._demuxBox=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._demuxBox.apply(null,arguments)},d._exitMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitMissile.apply(null,arguments)},d._exitTsMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitTsMissile.apply(null,arguments)},d._fflush=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._fflush.apply(null,arguments)},d._free=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._free.apply(null,arguments)}),ya=(d._getAudioCodecID=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getAudioCodecID.apply(null,arguments)},d._getExtensionInfo=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getExtensionInfo.apply(null,arguments)},d._getMediaInfo=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getMediaInfo.apply(null,arguments)},d._getPPS=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPS.apply(null,arguments)},d._getPPSLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPSLen.apply(null,arguments)},d._getPacket=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPacket.apply(null,arguments)},d._getSEI=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEI.apply(null,arguments)},d._getSEILen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEILen.apply(null,arguments)},d._getSPS=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPS.apply(null,arguments)},d._getSPSLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPSLen.apply(null,arguments)},d._getSniffHttpFlvPkg=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkg.apply(null,arguments)},d._getSniffHttpFlvPkgNoCheckProbe=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkgNoCheckProbe.apply(null,arguments)},d._getSniffStreamPkg=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkg.apply(null,arguments)},d._getSniffStreamPkgNoCheckProbe=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkgNoCheckProbe.apply(null,arguments)},d._getVLC=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLC.apply(null,arguments)},d._getVLCLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLCLen.apply(null,arguments)},d._getVPS=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPS.apply(null,arguments)},d._getVPSLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPSLen.apply(null,arguments)},d._getVideoCodecID=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVideoCodecID.apply(null,arguments)},d._initMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initMissile.apply(null,arguments)},d._initTsMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initTsMissile.apply(null,arguments)},d._initializeDecoder=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDecoder.apply(null,arguments)},d._initializeDemuxer=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDemuxer.apply(null,arguments)},d._initializeSniffHttpFlvModule=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModule.apply(null,arguments)},d._initializeSniffHttpFlvModuleWithAOpt=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModuleWithAOpt.apply(null,arguments)},d._initializeSniffStreamModule=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModule.apply(null,arguments)},d._initializeSniffStreamModuleWithAOpt=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModuleWithAOpt.apply(null,arguments)},d._main=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._main.apply(null,arguments)},d._malloc=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._malloc.apply(null,arguments)}),ga=(d._pushSniffHttpFlvData=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffHttpFlvData.apply(null,arguments)},d._pushSniffStreamData=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffStreamData.apply(null,arguments)},d._registerPlayer=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._registerPlayer.apply(null,arguments)},d._release=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._release.apply(null,arguments)},d._releaseSniffHttpFlv=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffHttpFlv.apply(null,arguments)},d._releaseSniffStream=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffStream.apply(null,arguments)},d._setCodecType=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._setCodecType.apply(null,arguments)},d.establishStackSpace=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.establishStackSpace.apply(null,arguments)},d.stackAlloc=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackAlloc.apply(null,arguments)}),wa=d.stackRestore=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackRestore.apply(null,arguments)},Ea=d.stackSave=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackSave.apply(null,arguments)},Ca=(d.dynCall_v=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_v.apply(null,arguments)},d.dynCall_vi=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_vi.apply(null,arguments)});function Sa(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}d.asm=ha,Object.getOwnPropertyDescriptor(d,"intArrayFromString")||(d.intArrayFromString=function(){at("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"intArrayToString")||(d.intArrayToString=function(){at("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),d.ccall=G,d.cwrap=K,Object.getOwnPropertyDescriptor(d,"setValue")||(d.setValue=function(){at("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getValue")||(d.getValue=function(){at("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"allocate")||(d.allocate=function(){at("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getMemory")||(d.getMemory=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"AsciiToString")||(d.AsciiToString=function(){at("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToAscii")||(d.stringToAscii=function(){at("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF8ArrayToString")||(d.UTF8ArrayToString=function(){at("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF8ToString")||(d.UTF8ToString=function(){at("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF8Array")||(d.stringToUTF8Array=function(){at("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF8")||(d.stringToUTF8=function(){at("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF8")||(d.lengthBytesUTF8=function(){at("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF16ToString")||(d.UTF16ToString=function(){at("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF16")||(d.stringToUTF16=function(){at("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF16")||(d.lengthBytesUTF16=function(){at("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF32ToString")||(d.UTF32ToString=function(){at("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF32")||(d.stringToUTF32=function(){at("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF32")||(d.lengthBytesUTF32=function(){at("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"allocateUTF8")||(d.allocateUTF8=function(){at("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackTrace")||(d.stackTrace=function(){at("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPreRun")||(d.addOnPreRun=function(){at("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnInit")||(d.addOnInit=function(){at("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPreMain")||(d.addOnPreMain=function(){at("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnExit")||(d.addOnExit=function(){at("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPostRun")||(d.addOnPostRun=function(){at("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeStringToMemory")||(d.writeStringToMemory=function(){at("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeArrayToMemory")||(d.writeArrayToMemory=function(){at("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeAsciiToMemory")||(d.writeAsciiToMemory=function(){at("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addRunDependency")||(d.addRunDependency=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"removeRunDependency")||(d.removeRunDependency=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"ENV")||(d.ENV=function(){at("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"FS")||(d.FS=function(){at("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"FS_createFolder")||(d.FS_createFolder=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createPath")||(d.FS_createPath=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createDataFile")||(d.FS_createDataFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createPreloadedFile")||(d.FS_createPreloadedFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createLazyFile")||(d.FS_createLazyFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createLink")||(d.FS_createLink=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createDevice")||(d.FS_createDevice=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_unlink")||(d.FS_unlink=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"GL")||(d.GL=function(){at("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"dynamicAlloc")||(d.dynamicAlloc=function(){at("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"loadDynamicLibrary")||(d.loadDynamicLibrary=function(){at("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"loadWebAssemblyModule")||(d.loadWebAssemblyModule=function(){at("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getLEB")||(d.getLEB=function(){at("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getFunctionTables")||(d.getFunctionTables=function(){at("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"alignFunctionTables")||(d.alignFunctionTables=function(){at("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"registerFunctions")||(d.registerFunctions=function(){at("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),d.addFunction=O,Object.getOwnPropertyDescriptor(d,"removeFunction")||(d.removeFunction=function(){at("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getFuncWrapper")||(d.getFuncWrapper=function(){at("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"prettyPrint")||(d.prettyPrint=function(){at("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"makeBigInt")||(d.makeBigInt=function(){at("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"dynCall")||(d.dynCall=function(){at("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getCompilerSetting")||(d.getCompilerSetting=function(){at("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackSave")||(d.stackSave=function(){at("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackRestore")||(d.stackRestore=function(){at("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackAlloc")||(d.stackAlloc=function(){at("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"establishStackSpace")||(d.establishStackSpace=function(){at("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"print")||(d.print=function(){at("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"printErr")||(d.printErr=function(){at("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getTempRet0")||(d.getTempRet0=function(){at("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"setTempRet0")||(d.setTempRet0=function(){at("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"callMain")||(d.callMain=function(){at("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"abort")||(d.abort=function(){at("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"Pointer_stringify")||(d.Pointer_stringify=function(){at("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"warnOnce")||(d.warnOnce=function(){at("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"ALLOC_NORMAL")||Object.defineProperty(d,"ALLOC_NORMAL",{configurable:!0,get:function(){at("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_STACK")||Object.defineProperty(d,"ALLOC_STACK",{configurable:!0,get:function(){at("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_DYNAMIC")||Object.defineProperty(d,"ALLOC_DYNAMIC",{configurable:!0,get:function(){at("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_NONE")||Object.defineProperty(d,"ALLOC_NONE",{configurable:!0,get:function(){at("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"calledRun")||Object.defineProperty(d,"calledRun",{configurable:!0,get:function(){at("'calledRun' 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")}});function ja(e){X(0==Je,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),X(0==Ue.length,"cannot call main when preRun functions remain to be called");var t=(e=e||[]).length+1,i=ga(4*(t+1));pe[i>>2]=oe(m);for(var r=1;r>2)+r]=oe(e[r-1]);pe[(i>>2)+t]=0;try{xa(d._main(t,i),!0)}catch(e){if(e instanceof Sa)return;if("SimulateInfiniteLoop"==e)return void(B=!0);var n=e;e&&"object"===u(e)&&e.stack&&(n=[e,e.stack]),k("exception thrown: "+n),b(1,e)}finally{!0}}function Ta(e){function t(){da||(da=!0,q||(ze(),He(),d.onRuntimeInitialized&&d.onRuntimeInitialized(),Ma&&ja(e),Ye()))}e=e||p,Je>0||(Me(),Ne(),Je>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),t()}),1)):t(),ke()))}function Aa(){var e=M,t=k,i=!1;M=k=function(e){i=!0};try{var r=d._fflush;r&&r(0),["stdout","stderr"].forEach((function(e){var t=Ut.analyzePath("/dev/"+e);if(t){var r=t.object.rdev,n=At.ttys[r];n&&n.output&&n.output.length&&(i=!0)}}))}catch(e){}M=e,k=t,i&&R("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.")}function xa(e,t){Aa(),t&&B&&0===e||(B?t||k("exit("+e+") called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)"):(q=!0,e,Ve(),d.onExit&&d.onExit(e)),b(e,new Sa(e)))}if(et=function e(){da||Ta(),da||(et=e)},d.run=Ta,d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();var Ma=!0;d.noInitialRun&&(Ma=!1),B=!0,Ta(),t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/src/decoder")},{_process:158,buffer:66,crypto:75,fs:64,path:150}],2:[function(e,t,i){"use strict";const r=i;r.bignum=e("bn.js"),r.define=e("./asn1/api").define,r.base=e("./asn1/base"),r.constants=e("./asn1/constants"),r.decoders=e("./asn1/decoders"),r.encoders=e("./asn1/encoders")},{"./asn1/api":3,"./asn1/base":5,"./asn1/constants":9,"./asn1/decoders":11,"./asn1/encoders":14,"bn.js":16}],3:[function(e,t,i){"use strict";const r=e("./encoders"),n=e("./decoders"),a=e("inherits");function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}i.define=function(e,t){return new s(e,t)},s.prototype._createNamed=function(e){const t=this.name;function i(e){this._initNamed(e,t)}return a(i,e),i.prototype._initNamed=function(t,i){e.call(this,t,i)},new i(this)},s.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n[e])),this.decoders[e]},s.prototype.decode=function(e,t,i){return this._getDecoder(t).decode(e,i)},s.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},s.prototype.encode=function(e,t,i){return this._getEncoder(t).encode(e,i)}},{"./decoders":11,"./encoders":14,inherits:136}],4:[function(e,t,i){"use strict";const r=e("inherits"),n=e("../base/reporter").Reporter,a=e("safer-buffer").Buffer;function s(e,t){n.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return o.isEncoderBuffer(e)||(e=new o(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=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(s,n),i.DecoderBuffer=s,s.isDecoderBuffer=function(e){if(e instanceof s)return!0;return"object"==typeof e&&a.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const i=new s(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},i.EncoderBuffer=o,o.isEncoderBuffer=function(e){if(e instanceof o)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},o.prototype.join=function(e,t){return e||(e=a.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(e,t),t+=i.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},{"../base/reporter":7,inherits:136,"safer-buffer":185}],5:[function(e,t,i){"use strict";const r=i;r.Reporter=e("./reporter").Reporter,r.DecoderBuffer=e("./buffer").DecoderBuffer,r.EncoderBuffer=e("./buffer").EncoderBuffer,r.Node=e("./node")},{"./buffer":4,"./node":6,"./reporter":7}],6:[function(e,t,i){"use strict";const r=e("../base/reporter").Reporter,n=e("../base/buffer").EncoderBuffer,a=e("../base/buffer").DecoderBuffer,s=e("minimalistic-assert"),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function f(e,t,i){const r={};this._baseState=r,r.name=i,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())}t.exports=f;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(i){t[i]=e[i]}));const i=new this.constructor(t.parent);return i._baseState=t,i},f.prototype._wrap=function(){const e=this._baseState;l.forEach((function(t){this[t]=function(){const i=new this.constructor(this);return e.children.push(i),i[t].apply(i,arguments)}}),this)},f.prototype._init=function(e){const 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")},f.prototype._useArgs=function(e){const t=this._baseState,i=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==i.length&&(s(null===t.children),t.children=i,i.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;const t={};return Object.keys(e).forEach((function(i){i==(0|i)&&(i|=0);const r=e[i];t[r]=i})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){f.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),o.forEach((function(e){f.prototype[e]=function(){const t=this._baseState,i=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(i),this}})),f.prototype.use=function(e){s(e);const t=this._baseState;return s(null===t.use),t.use=e,this},f.prototype.optional=function(){return this._baseState.optional=!0,this},f.prototype.def=function(e){const t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},f.prototype.explicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},f.prototype.implicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},f.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},f.prototype.key=function(e){const t=this._baseState;return s(null===t.key),t.key=e,this},f.prototype.any=function(){return this._baseState.any=!0,this},f.prototype.choice=function(e){const t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},f.prototype.contains=function(e){const t=this._baseState;return s(null===t.use),t.contains=e,this},f.prototype._decode=function(e,t){const i=this._baseState;if(null===i.parent)return e.wrapResult(i.children[0]._decode(e,t));let r,n=i.default,s=!0,o=null;if(null!==i.key&&(o=e.enterKey(i.key)),i.optional){let r=null;if(null!==i.explicit?r=i.explicit:null!==i.implicit?r=i.implicit:null!==i.tag&&(r=i.tag),null!==r||i.any){if(s=this._peekTag(e,r,i.any),e.isError(s))return s}else{const r=e.save();try{null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(r)}}if(i.obj&&s&&(r=e.enterObject()),s){if(null!==i.explicit){const t=this._decodeTag(e,i.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===i.use&&null===i.choice){let t;i.any&&(t=e.save());const r=this._decodeTag(e,null!==i.implicit?i.implicit:i.tag,i.any);if(e.isError(r))return r;i.any?n=e.raw(t):e=r}if(t&&t.track&&null!==i.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==i.tag&&t.track(e.path(),e.offset,e.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(i){i._decode(e,t)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){const r=new a(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(r,t)}}return i.obj&&s&&(n=e.leaveObject(r)),null===i.key||null===n&&!0!==s?null!==o&&e.exitKey(o):e.leaveKey(o,i.key,n),n},f.prototype._decodeGeneric=function(e,t,i){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],i):/str$/.test(e)?this._decodeStr(t,e,i):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],i):"objid"===e?this._decodeObjid(t,null,null,i):"gentime"===e||"utctime"===e?this._decodeTime(t,e,i):"null_"===e?this._decodeNull(t,i):"bool"===e?this._decodeBool(t,i):"objDesc"===e?this._decodeStr(t,e,i):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,i):t.error("unknown tag: "+e)},f.prototype._getUse=function(e,t){const i=this._baseState;return i.useDecoder=this._use(e,t),s(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},f.prototype._decodeChoice=function(e,t){const i=this._baseState;let r=null,n=!1;return Object.keys(i.choice).some((function(a){const s=e.save(),o=i.choice[a];try{const i=o._decode(e,t);if(e.isError(i))return!1;r={type:a,value:i},n=!0}catch(t){return e.restore(s),!1}return!0}),this),n?r:e.error("Choice not matched")},f.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},f.prototype._encode=function(e,t,i){const r=this._baseState;if(null!==r.default&&r.default===e)return;const n=this._encodeValue(e,t,i);return void 0===n||this._skipDefault(n,t,i)?void 0:n},f.prototype._encodeValue=function(e,t,i){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new r);let a=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}let s=null,o=!1;if(n.any)a=this._createEncoderBuffer(e);else if(n.choice)a=this._encodeChoice(e,t);else if(n.contains)s=this._getUse(n.contains,i)._encode(e,t),o=!0;else if(n.children)s=n.children.map((function(i){if("null_"===i._baseState.tag)return i._encode(null,t,e);if(null===i._baseState.key)return t.error("Child should have a key");const r=t.enterKey(i._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const n=i._encode(e[i._baseState.key],t,e);return t.leaveKey(r),n}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const i=this.clone();i._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(i){const r=this._baseState;return this._getUse(r.args[0],e)._encode(i,t)}),i))}else null!==n.use?a=this._getUse(n.use,i)._encode(e,t):(s=this._encodePrimitive(n.tag,e),o=!0);if(!n.any&&null===n.choice){const e=null!==n.implicit?n.implicit:n.tag,i=null===n.implicit?"universal":"context";null===e?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(a=this._encodeComposite(e,o,i,s))}return null!==n.explicit&&(a=this._encodeComposite(n.explicit,!1,"context",a)),a},f.prototype._encodeChoice=function(e,t){const i=this._baseState,r=i.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(e.value,t)},f.prototype._encodePrimitive=function(e,t){const i=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&i.args)return this._encodeObjid(t,i.reverseArgs[0],i.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,i.args&&i.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},f.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},f.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},{"../base/buffer":4,"../base/reporter":7,"minimalistic-assert":142}],7:[function(e,t,i){"use strict";const r=e("inherits");function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function a(e,t){this.path=e,this.rethrow(t)}i.Reporter=n,n.prototype.isError=function(e){return e instanceof a},n.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,i){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=i)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){const t=this._reporterState,i=t.obj;return t.obj=e,i},n.prototype.error=function(e){let t;const i=this._reporterState,r=e instanceof a;if(t=r?e:new a(i.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!i.options.partial)throw t;return r||i.errors.push(t),t},n.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(a,Error),a.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:136}],8:[function(e,t,i){"use strict";function r(e){const t={};return Object.keys(e).forEach((function(i){(0|i)==i&&(i|=0);const r=e[i];t[r]=i})),t}i.tagClass={0:"universal",1:"application",2:"context",3:"private"},i.tagClassByName=r(i.tagClass),i.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"},i.tagByName=r(i.tag)},{}],9:[function(e,t,i){"use strict";const r=i;r._reverse=function(e){const t={};return Object.keys(e).forEach((function(i){(0|i)==i&&(i|=0);const r=e[i];t[r]=i})),t},r.der=e("./der")},{"./der":8}],10:[function(e,t,i){"use strict";const r=e("inherits"),n=e("bn.js"),a=e("../base/buffer").DecoderBuffer,s=e("../base/node"),o=e("../constants/der");function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){s.call(this,"der",e)}function u(e,t){let i=e.readUInt8(t);if(e.isError(i))return i;const r=o.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){let r=i;for(i=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;i<<=7,i|=127&r}}else i&=31;return{cls:r,primitive:n,tag:i,tagStr:o.tag[i]}}function c(e,t,i){let r=e.readUInt8(i);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const n=127&r;if(n>4)return e.error("length octect is too long");r=0;for(let t=0;t=31)return r.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=s.tagClassByName[i||"universal"]<<6,n}(e,t,i,this.reporter);if(r.length<128){const e=n.alloc(2);return e[0]=a,e[1]=r.length,this._createEncoderBuffer([e,r])}let o=1;for(let e=r.length;e>=256;e>>=8)o++;const l=n.alloc(2+o);l[0]=a,l[1]=128|o;for(let e=1+o,t=r.length;t>0;e--,t>>=8)l[e]=255&t;return this._createEncoderBuffer([l,r])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=n.alloc(2*e.length);for(let i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let t=0;t=128;i>>=7)r++}const a=n.alloc(r);let s=a.length-1;for(let t=e.length-1;t>=0;t--){let i=e[t];for(a[s--]=127&i;(i>>=7)>0;)a[s--]=128|127&i}return this._createEncoderBuffer(a)},l.prototype._encodeTime=function(e,t){let i;const r=new Date(e);return"gentime"===t?i=[f(r.getUTCFullYear()),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?i=[f(r.getUTCFullYear()%100),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(i,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.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&&!n.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=n.from(t)}if(n.isBuffer(e)){let t=e.length;0===e.length&&t++;const i=n.alloc(t);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let i=1;for(let t=e;t>=256;t>>=8)i++;const r=new Array(i);for(let t=r.length-1;t>=0;t--)r[t]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(n.from(r))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,i){const r=this._baseState;let n;if(null===r.default)return!1;const a=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,i).join()),a.length!==r.defaultBuffer.length)return!1;for(n=0;n=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function l(e,t,i,r){for(var n=0,a=Math.min(e.length,i),s=t;s=49?o-49+10:o>=17?o-17+10:o}return n}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,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6)n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,c=67108863&l,h=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=h;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+c)/67108864|0,c=67108863&s}i.words[f]=0|c,l=0|u}return 0!==l?i.words[f]=0|l:i.length--,i.strip()}a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?f[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--)}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var h=u[e],d=c[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modn(d).toString(e);i=(_=_.idivn(d)).isZero()?p+i:f[h-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!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&&r(!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 r(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var s,o,l="le"===t,f=new e(a),u=this.clone();if(l){for(o=0;!u.isZero();o++)s=u.andln(255),u.iushrn(8),f[o]=s;for(;o=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;for(;0!==n&&a>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==a&&s>26,this.words[s]=67108863&t;if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,X=0|o[2],W=8191&X,G=X>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],ce=8191&ue,he=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(c,z))|0)+((8191&(n=(n=Math.imul(c,H))+Math.imul(h,z)|0))<<13)|0;f=((a=Math.imul(h,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(c,Y)|0)|0)+((8191&(n=(n=n+Math.imul(c,q)|0)+Math.imul(h,Y)|0))<<13)|0;f=((a=a+Math.imul(h,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(h,W)|0))<<13)|0;f=((a=a+Math.imul(h,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,W)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,Z)|0)+Math.imul(h,Q)|0))<<13)|0;f=((a=a+Math.imul(h,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,W)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,W)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,ee)|0)+Math.imul(h,$)|0))<<13)|0;f=((a=a+Math.imul(h,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,W)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(c,ie)|0)|0)+((8191&(n=(n=n+Math.imul(c,re)|0)+Math.imul(h,ie)|0))<<13)|0;f=((a=a+Math.imul(h,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,W)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(c,ae)|0)|0)+((8191&(n=(n=n+Math.imul(c,se)|0)+Math.imul(h,ae)|0))<<13)|0;f=((a=a+Math.imul(h,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,W)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(c,le)|0)|0)+((8191&(n=(n=n+Math.imul(c,fe)|0)+Math.imul(h,le)|0))<<13)|0;f=((a=a+Math.imul(h,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,W)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(c,ce)|0)|0)+((8191&(n=(n=n+Math.imul(c,he)|0)+Math.imul(h,ce)|0))<<13)|0;f=((a=a+Math.imul(h,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,ce)|0,n=(n=n+Math.imul(_,he)|0)+Math.imul(p,ce)|0,a=a+Math.imul(p,he)|0;var je=(f+(r=r+Math.imul(c,_e)|0)|0)+((8191&(n=(n=n+Math.imul(c,pe)|0)+Math.imul(h,_e)|0))<<13)|0;f=((a=a+Math.imul(h,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,W)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,ce)|0,n=(n=n+Math.imul(b,he)|0)+Math.imul(v,ce)|0,a=a+Math.imul(v,he)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,W),n=(n=Math.imul(L,G))+Math.imul(B,W)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,ce)|0,n=(n=n+Math.imul(g,he)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,he)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,ce)|0,n=(n=n+Math.imul(C,he)|0)+Math.imul(S,ce)|0,a=a+Math.imul(S,he)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,ce)|0,n=(n=n+Math.imul(T,he)|0)+Math.imul(A,ce)|0,a=a+Math.imul(A,he)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,ce)|0,n=(n=n+Math.imul(M,he)|0)+Math.imul(k,ce)|0,a=a+Math.imul(k,he)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(R,ce)|0,a=a+Math.imul(R,he)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,ce)|0,n=(n=n+Math.imul(D,he)|0)+Math.imul(F,ce)|0,a=a+Math.imul(F,he)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,ce),n=(n=Math.imul(L,he))+Math.imul(B,ce)|0,a=Math.imul(B,he);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i};function _(e,t,i){return(new p).mulp(e,t,i)}function p(e,t){this.x=e,this.y=t}Math.imul||(d=h),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):i<63?h(this,e,t):i<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863}i.words[a]=o,r=s,s=n}return 0!==r?i.words[a]=r:i.length--,i.strip()}(this,e,t):_(this,e,t)},p.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;return r},p.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;for(s=2*t;s>=26,t+=n/67108864|0,t+=a>>>26,this.words[i]=67108863&a}return 0!==t&&(this.words[i]=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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n}return t}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var c=0|this.words[f];this.words[f]=u<<26-a|c>>>a,u=c&o}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a}for(;n>26,this.words[n+i]=67108863&a;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;c--){var h=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(h=Math.min(h/s|0,67108863),r._ishlnsubmul(n,h,c);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);o&&(o.words[c]=h)}return o&&o.strip(),r.strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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);var n,s,o},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);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){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++f;for(var u=i.clone(),c=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(c)),n.iushrn(1),s.iushrn(1);for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1);if(_>0)for(i.iushrn(_);_-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(c)),o.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s))}return{a:o,b:l,gcd:i.iushln(f)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var c=0,h=1;0==(i.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(i.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s))}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var a=t;t=i,i=a}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 E(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){E.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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},n(v,b),v.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new g;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);)u.redIAdd(l);for(var c=this.pow(u,n),h=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++)p=p.redSqr();r(m<_);var b=this.pow(c,new a(1).iushln(_-m-1));h=h.redMul(b),c=b.redSqr(),d=d.redMul(c),_=m}return h},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var c=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==c||0!==s?(s<<=1,s|=c,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0}l=26}return n},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new C(e)},n(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:20}],17:[function(e,t,i){"use strict";i.byteLength=function(e){var t=f(e),i=t[0],r=t[1];return 3*(i+r)/4-r},i.toByteArray=function(e){var t,i,r=f(e),s=r[0],o=r[1],l=new a(function(e,t,i){return 3*(t+i)/4-i}(0,s,o)),u=0,c=o>0?s-4:s;for(i=0;i>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===o&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,l[u++]=255&t);1===o&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},i.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],s=0,o=i-n;so?o:s+16383));1===n?(t=e[i-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function u(e,t,i){for(var n,a,s=[],o=t;o>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],18:[function(e,t,i){!function(t,i){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function a(e,t,i){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var s;"object"==typeof t?t.exports=a:i.BN=a,a.BN=a,a.wordSize=26;try{s=e("buffer").Buffer}catch(e){}function o(e,t,i){for(var n=0,a=Math.min(e.length,i),s=0,o=t;o=49&&f<=54?f-49+10:f>=17&&f<=22?f-17+10:f,s|=l}return r(!(240&s),"Invalid character in "+e),n}function l(e,t,i,n){for(var a=0,s=0,o=Math.min(e.length,i),l=t;l=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&s0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this._strip(),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6)n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this._strip()},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){a.prototype.inspect=u}else a.prototype.inspect=u;function u(){return(this.red?""}var c=["","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"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?c[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--)}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var f=h[e],u=d[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modrn(u).toString(e);i=(_=_.idivn(u)).isZero()?p+i:c[f-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function _(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,c=67108863&l,h=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=h;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+c)/67108864|0,c=67108863&s}i.words[f]=0|c,l=0|u}return 0!==l?i.words[f]=0|l:i.length--,i._strip()}a.prototype.toArrayLike=function(e,t,i){this._strip();var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,n),s},a.prototype._toArrayLikeLE=function(e,t){for(var i=0,r=0,n=0,a=0;n>8&255),i>16&255),6===a?(i>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(i=0&&(e[i--]=s>>8&255),i>=0&&(e[i--]=s>>16&255),6===a?(i>=0&&(e[i--]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(i>=0)for(e[i--]=r;i>=0;)e[i--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;for(;0!==n&&a>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==a&&s>26,this.words[s]=67108863&t;if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,X=0|o[2],W=8191&X,G=X>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],ce=8191&ue,he=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(c,z))|0)+((8191&(n=(n=Math.imul(c,H))+Math.imul(h,z)|0))<<13)|0;f=((a=Math.imul(h,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(c,Y)|0)|0)+((8191&(n=(n=n+Math.imul(c,q)|0)+Math.imul(h,Y)|0))<<13)|0;f=((a=a+Math.imul(h,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(h,W)|0))<<13)|0;f=((a=a+Math.imul(h,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,W)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,Z)|0)+Math.imul(h,Q)|0))<<13)|0;f=((a=a+Math.imul(h,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,W)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,W)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,ee)|0)+Math.imul(h,$)|0))<<13)|0;f=((a=a+Math.imul(h,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,W)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(c,ie)|0)|0)+((8191&(n=(n=n+Math.imul(c,re)|0)+Math.imul(h,ie)|0))<<13)|0;f=((a=a+Math.imul(h,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,W)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(c,ae)|0)|0)+((8191&(n=(n=n+Math.imul(c,se)|0)+Math.imul(h,ae)|0))<<13)|0;f=((a=a+Math.imul(h,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,W)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(c,le)|0)|0)+((8191&(n=(n=n+Math.imul(c,fe)|0)+Math.imul(h,le)|0))<<13)|0;f=((a=a+Math.imul(h,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,W)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(c,ce)|0)|0)+((8191&(n=(n=n+Math.imul(c,he)|0)+Math.imul(h,ce)|0))<<13)|0;f=((a=a+Math.imul(h,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,ce)|0,n=(n=n+Math.imul(_,he)|0)+Math.imul(p,ce)|0,a=a+Math.imul(p,he)|0;var je=(f+(r=r+Math.imul(c,_e)|0)|0)+((8191&(n=(n=n+Math.imul(c,pe)|0)+Math.imul(h,_e)|0))<<13)|0;f=((a=a+Math.imul(h,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,W)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,ce)|0,n=(n=n+Math.imul(b,he)|0)+Math.imul(v,ce)|0,a=a+Math.imul(v,he)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,W),n=(n=Math.imul(L,G))+Math.imul(B,W)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,ce)|0,n=(n=n+Math.imul(g,he)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,he)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,ce)|0,n=(n=n+Math.imul(C,he)|0)+Math.imul(S,ce)|0,a=a+Math.imul(S,he)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,ce)|0,n=(n=n+Math.imul(T,he)|0)+Math.imul(A,ce)|0,a=a+Math.imul(A,he)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,ce)|0,n=(n=n+Math.imul(M,he)|0)+Math.imul(k,ce)|0,a=a+Math.imul(k,he)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(R,ce)|0,a=a+Math.imul(R,he)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,ce)|0,n=(n=n+Math.imul(D,he)|0)+Math.imul(F,ce)|0,a=a+Math.imul(F,he)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,ce),n=(n=Math.imul(L,he))+Math.imul(B,ce)|0,a=Math.imul(B,he);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i};function m(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863}i.words[a]=o,r=s,s=n}return 0!==r?i.words[a]=r:i.length--,i._strip()}function b(e,t,i){return m(e,t,i)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=_),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):i<63?_(this,e,t):i<1024?m(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;for(s=2*t;s>=26,i+=a/67108864|0,i+=s>>>26,this.words[n]=67108863&s}return 0!==i&&(this.words[n]=i,this.length++),t?this.ineg():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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n&1}return t}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var c=0|this.words[f];this.words[f]=u<<26-a|c>>>a,u=c&o}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a}for(;n>26,this.words[n+i]=67108863&a;if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;c--){var h=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(h=Math.min(h/s|0,67108863),r._ishlnsubmul(n,h,c);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);o&&(o.words[c]=h)}return o&&o._strip(),r._strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,s,o},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(i*n+(0|this.words[a]))%e;return t?-n:n},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var a=(0|this.words[n])+67108864*i;this.words[n]=a/e|0,i=a%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++f;for(var u=i.clone(),c=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(c)),n.iushrn(1),s.iushrn(1);for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1);if(_>0)for(i.iushrn(_);_-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(c)),o.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s))}return{a:o,b:l,gcd:i.iushln(f)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var c=0,h=1;0==(i.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(i.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s))}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var a=t;t=i,i=a}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 j(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(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 w(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){j.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)}g.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},n(w,g),w.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new E;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},j.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},j.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},j.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},j.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},j.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},j.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},j.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},j.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},j.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},j.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},j.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},j.prototype.isqr=function(e){return this.imul(e,e.clone())},j.prototype.sqr=function(e){return this.mul(e,e)},j.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);)u.redIAdd(l);for(var c=this.pow(u,n),h=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++)p=p.redSqr();r(m<_);var b=this.pow(c,new a(1).iushln(_-m-1));h=h.redMul(b),c=b.redSqr(),d=d.redMul(c),_=m}return h},j.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},j.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var c=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==c||0!==s?(s<<=1,s|=c,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0}l=26}return n},j.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},j.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new T(e)},n(T,j),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:20}],19:[function(e,t,i){var r;function n(e){this.rand=e}if(t.exports=function(e){return r||(r=new n(null)),r.generate(e)},t.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i>>24]^u[_>>>16&255]^c[p>>>8&255]^h[255&m]^t[b++],s=f[_>>>24]^u[p>>>16&255]^c[m>>>8&255]^h[255&d]^t[b++],o=f[p>>>24]^u[m>>>16&255]^c[d>>>8&255]^h[255&_]^t[b++],l=f[m>>>24]^u[d>>>16&255]^c[_>>>8&255]^h[255&p]^t[b++],d=a,_=s,p=o,m=l;return a=(r[d>>>24]<<24|r[_>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[b++],s=(r[_>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&d])^t[b++],o=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[d>>>8&255]<<8|r[255&_])^t[b++],l=(r[m>>>24]<<24|r[d>>>16&255]<<16|r[_>>>8&255]<<8|r[255&p])^t[b++],[a>>>=0,s>>>=0,o>>>=0,l>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var i=[],r=[],n=[[],[],[],[]],a=[[],[],[],[]],s=0,o=0,l=0;l<256;++l){var f=o^o<<1^o<<2^o<<3^o<<4;f=f>>>8^255&f^99,i[s]=f,r[f]=s;var u=e[s],c=e[u],h=e[c],d=257*e[f]^16843008*f;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*h^65537*c^257*u^16843008*s,a[0][f]=d<<24|d>>>8,a[1][f]=d<<16|d>>>16,a[2][f]=d<<8|d>>>24,a[3][f]=d,0===s?s=o=1:(s=u^e[e[e[h^u]]],o^=e[e[o]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:a}}();function f(e){this._key=n(e),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var e=this._key,t=e.length,i=t+6,r=4*(i+1),n=[],a=0;a>>24,s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s],s^=o[a/t|0]<<24):t>6&&a%t==4&&(s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s]),n[a]=n[a-t]^s}for(var f=[],u=0;u>>24]]^l.INV_SUB_MIX[1][l.SBOX[h>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[h>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&h]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(e){return s(e=n(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},f.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),i=r.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[1],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[3],12),i},f.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var i=s(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),a=r.allocUnsafe(16);return a.writeUInt32BE(i[0],0),a.writeUInt32BE(i[3],4),a.writeUInt32BE(i[2],8),a.writeUInt32BE(i[1],12),a},f.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=f},{"safe-buffer":184}],22:[function(e,t,i){var r=e("./aes"),n=e("safe-buffer").Buffer,a=e("cipher-base"),s=e("inherits"),o=e("./ghash"),l=e("buffer-xor"),f=e("./incr32");function u(e,t,i,s){a.call(this);var l=n.alloc(4,0);this._cipher=new r.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new o(u),i=function(e,t,i){if(12===t.length)return e._finID=n.concat([t,n.from([0,0,0,1])]),n.concat([t,n.from([0,0,0,2])]);var r=new o(i),a=t.length,s=a%16;r.update(t),s&&(s=16-s,r.update(n.alloc(s,0))),r.update(n.alloc(8,0));var l=8*a,u=n.alloc(8);u.writeUIntBE(l,0,8),r.update(u),e._finID=r.state;var c=n.from(e._finID);return f(c),c}(this,i,u),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(u,a),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=n.alloc(t,0),this._ghash.update(t))}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var i=0;e.length!==t.length&&i++;for(var r=Math.min(e.length,t.length),n=0;n16)throw new Error("unable to decrypt data");var i=-1;for(;++i16)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},c.prototype.flush=function(){if(this.cache.length)return this.cache},i.createDecipher=function(e,t){var i=a[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=f(t,!1,i.key,i.iv);return h(e,r.key,r.iv)},i.createDecipheriv=h},{"./aes":21,"./authCipher":22,"./modes":34,"./streamCipher":37,"cipher-base":67,evp_bytestokey:105,inherits:136,"safe-buffer":184}],25:[function(e,t,i){var r=e("./modes"),n=e("./authCipher"),a=e("safe-buffer").Buffer,s=e("./streamCipher"),o=e("cipher-base"),l=e("./aes"),f=e("evp_bytestokey");function u(e,t,i){o.call(this),this._cache=new h,this._cipher=new l.AES(t),this._prev=a.from(i),this._mode=e,this._autopadding=!0}e("inherits")(u,o),u.prototype._update=function(e){var t,i;this._cache.add(e);for(var r=[];t=this._cache.get();)i=this._mode.encrypt(this,t),r.push(i);return a.concat(r)};var c=a.alloc(16,16);function h(){this.cache=a.allocUnsafe(0)}function d(e,t,i){var o=r[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=a.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof i&&(i=a.from(i)),"GCM"!==o.mode&&i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new s(o.module,t,i):"auth"===o.type?new n(o.module,t,i):new u(o.module,t,i)}u.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(c))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=a.concat([this.cache,e])},h.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},h.prototype.flush=function(){for(var e=16-this.cache.length,t=a.allocUnsafe(e),i=-1;++i>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=a(n)},s.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(a([0,e,0,t])),this.state},t.exports=s},{"safe-buffer":184}],27:[function(e,t,i){t.exports=function(e){for(var t,i=e.length;i--;){if(255!==(t=e.readUInt8(i))){t++,e.writeUInt8(t,i);break}e.writeUInt8(0,i)}}},{}],28:[function(e,t,i){var r=e("buffer-xor");i.encrypt=function(e,t){var i=r(t,e._prev);return e._prev=e._cipher.encryptBlock(i),e._prev},i.decrypt=function(e,t){var i=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return r(n,i)}},{"buffer-xor":65}],29:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("buffer-xor");function a(e,t,i){var a=t.length,s=n(t,e._cache);return e._cache=e._cache.slice(a),e._prev=r.concat([e._prev,i?t:s]),s}i.encrypt=function(e,t,i){for(var n,s=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){s=r.concat([s,a(e,t,i)]);break}n=e._cache.length,s=r.concat([s,a(e,t.slice(0,n),i)]),t=t.slice(n)}return s}},{"buffer-xor":65,"safe-buffer":184}],30:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t,i){for(var r,n,s=-1,o=0;++s<8;)r=t&1<<7-s?128:0,o+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^r))>>s%8,e._prev=a(e._prev,i?r:n);return o}function a(e,t){var i=e.length,n=-1,a=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++n>7;return a}i.encrypt=function(e,t,i){for(var a=t.length,s=r.allocUnsafe(a),o=-1;++o=0||!i.umod(e.prime1)||!i.umod(e.prime2);)i=new r(n(t));return i}t.exports=a,a.getr=s}).call(this,e("buffer").Buffer)},{"bn.js":42,buffer:66,randombytes:166}],42:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],43:[function(e,t,i){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":44}],44:[function(e,t,i){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"}}},{}],45:[function(e,t,i){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"}},{}],46:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hash"),a=e("readable-stream"),s=e("inherits"),o=e("./sign"),l=e("./verify"),f=e("./algorithms.json");function u(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function c(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new u(e)}function d(e){return new c(e)}Object.keys(f).forEach((function(e){f[e].id=r.from(f[e].id,"hex"),f[e.toLowerCase()]=f[e]})),s(u,a.Writable),u.prototype._write=function(e,t,i){this._hash.update(e),i()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var i=this._hash.digest(),r=o(i,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},s(c,a.Writable),c.prototype._write=function(e,t,i){this._hash.update(e),i()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},c.prototype.verify=function(e,t,i){"string"==typeof t&&(t=r.from(t,i)),this.end();var n=this._hash.digest();return l(t,n,e,this._signType,this._tag)},t.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},{"./algorithms.json":44,"./sign":47,"./verify":48,"create-hash":71,inherits:136,"readable-stream":63,"safe-buffer":184}],47:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hmac"),a=e("browserify-rsa"),s=e("elliptic").ec,o=e("bn.js"),l=e("parse-asn1"),f=e("./curves.json");function u(e,t,i,a){if((e=r.from(e.toArray())).length0&&i.ishrn(r),i}function h(e,t,i){var a,s;do{for(a=r.alloc(0);8*a.length=t)throw new Error("invalid sig")}t.exports=function(e,t,i,f,u){var c=s(i);if("ec"===c.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=o[i.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var n=new a(r),s=i.data.subjectPrivateKey.data;return n.verify(t,e,s)}(e,t,c)}if("dsa"===c.type){if("dsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=i.data.p,a=i.data.q,o=i.data.g,f=i.data.pub_key,u=s.signature.decode(e,"der"),c=u.s,h=u.r;l(c,a),l(h,a);var d=n.mont(r),_=c.invm(a);return 0===o.toRed(d).redPow(new n(t).mul(_).mod(a)).fromRed().mul(f.toRed(d).redPow(h.mul(_).mod(a)).fromRed()).mod(r).mod(a).cmp(h)}(e,t,c)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");t=r.concat([u,t]);for(var h=c.modulus.byteLength(),d=[1],_=0;t.length+d.length+22?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,n,s,o;if("string"==typeof t&&(n="not ",t.substr(!s||s<0?0:+s,n.length)===n)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t}(e," argument"))o="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,i){return"number"!=typeof i&&(i=0),!(i+t.length>e.length)&&-1!==e.indexOf(t,i)}(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return o+=". Received type ".concat(typeof i)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},{}],50:[function(e,t,i){(function(i){"use strict";var r=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=f;var n=e("./_stream_readable"),a=e("./_stream_writable");e("inherits")(f,n);for(var s=r(a.prototype),o=0;o0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),r)s.endEmitted?E(e,new w):A(e,s,t,!0);else if(s.ended)E(e,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):P(e,s)):A(e,s,t,!1)}else r||(s.reading=!1,P(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(k,e))}function k(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function U(e){f("readable nexttick read 0"),e.read(0)}function D(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0)}function F(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):i=t.buffer.consume(e,t.decoder),i);var i}function L(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(B,t,e))}function B(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var i=t._writableState;(!i||i.autoDestroy&&i.finished)&&t.destroy()}}function N(e,t){for(var i=0,r=e.length;i=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):M(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&L(this),null;var r,n=t.needReadable;return f("need readable",n),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&L(this)),null!==r&&this.emit("data",r),r},j.prototype._read=function(e){E(this,new g("_read()"))},j.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,f("pipe count=%d opts=%j",n.pipesCount,t);var s=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?l:m;function o(t,i){f("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f("cleanup"),e.removeListener("close",_),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),r.removeListener("end",l),r.removeListener("end",m),r.removeListener("data",h),c=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){f("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",o);var u=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,F(e))}}(r);e.on("drain",u);var c=!1;function h(t){f("ondata");var i=e.write(t);f("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==N(n.pipes,e))&&!c&&(f("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){f("onerror",t),m(),e.removeListener("error",d),0===a(e,"error")&&E(e,t)}function _(){e.removeListener("finish",p),m()}function p(){f("onfinish"),e.removeListener("close",_),m()}function m(){f("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",d),e.once("close",_),e.once("finish",p),e.emit("pipe",r),n.flowing||(f("pipe resume"),r.resume()),e},j.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,f("on readable",n.length,n.reading),n.length?M(this):n.reading||i.nextTick(U,this))),r},j.prototype.addListener=j.prototype.on,j.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(R,this),r},j.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(R,this),t},j.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}(this,e)),e.paused=!1,this},j.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},j.prototype.wrap=function(e){var t=this,i=this._readableState,r=!1;for(var n in e.on("end",(function(){if(f("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(f("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(t.push(n)||(r=!0,e.pause()))})),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-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(j.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),j.prototype._write=function(e,t,i){i(new p("_write()"))},j.prototype._writev=null,j.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(j.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),j.prototype.destroy=c.destroy,j.prototype._undestroy=c.undestroy,j.prototype._destroy=function(e,t){t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":49,"./_stream_duplex":50,"./internal/streams/destroy":57,"./internal/streams/state":61,"./internal/streams/stream":62,_process:158,buffer:66,inherits:136,"util-deprecate":197}],55:[function(e,t,i){(function(i){"use strict";var r;function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var a=e("./end-of-stream"),s=Symbol("lastResolve"),o=Symbol("lastReject"),l=Symbol("error"),f=Symbol("ended"),u=Symbol("lastPromise"),c=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function _(e){var t=e[s];if(null!==t){var i=e[h].read();null!==i&&(e[u]=null,e[s]=null,e[o]=null,t(d(i,!1)))}}function p(e){i.nextTick(_,e)}var m=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((n(r={get stream(){return this[h]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[l]?r(e[l]):t(d(void 0,!0))}))}));var r,n=this[u];if(n)r=new Promise(function(e,t){return function(i,r){e.then((function(){t[f]?i(d(void 0,!0)):t[c](i,r)}),r)}}(n,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(d(a,!1));r=new Promise(this[c])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),n(r,"return",(function(){var e=this;return new Promise((function(t,i){e[h].destroy(null,(function(e){e?i(e):t(d(void 0,!0))}))}))})),r),m);t.exports=function(e){var t,i=Object.create(b,(n(t={},h,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,o,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,f,{value:e._readableState.endEmitted,writable:!0}),n(t,c,{value:function(e,t){var r=i[h].read();r?(i[u]=null,i[s]=null,i[o]=null,e(d(r,!1))):(i[s]=e,i[o]=t)},writable:!0}),t));return i[u]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=i[o];return null!==t&&(i[u]=null,i[s]=null,i[o]=null,t(e)),void(i[l]=e)}var r=i[s];null!==r&&(i[u]=null,i[s]=null,i[o]=null,r(d(void 0,!0))),i[f]=!0})),e.on("readable",p.bind(null,i)),i}}).call(this,e("_process"))},{"./end-of-stream":58,_process:158}],56:[function(e,t,i){"use strict";function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t){for(var i=0;i0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,i,r,n=s.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,i=n,r=o,s.prototype.copy.call(t,i,r),o+=a.data.length,a=a.next;return n}},{key:"consume",value:function(e,t){var i;return en.length?n.length:e;if(a===n.length?r+=n:r+=n.slice(0,e),0==(e-=a)){a===n.length?(++i,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(a));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),i=this.head,r=1;for(i.data.copy(t),e-=i.data.length;i=i.next;){var n=i.data,a=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,a),0==(e-=a)){a===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return o(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&s.forEach(f),a||(s.forEach(f),n(r))}))}));return t.reduce(u)}},{"../../../errors":49,"./end-of-stream":58}],61:[function(e,t,i){"use strict";var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,i,n){var a=function(e,t,i){return null!=e.highWaterMark?e.highWaterMark:t?e[i]:null}(t,n,i);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(n?i:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},{"../../../errors":49}],62:[function(e,t,i){t.exports=e("events").EventEmitter},{events:104}],63:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js"),i.finished=e("./lib/internal/streams/end-of-stream.js"),i.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":50,"./lib/_stream_passthrough.js":51,"./lib/_stream_readable.js":52,"./lib/_stream_transform.js":53,"./lib/_stream_writable.js":54,"./lib/internal/streams/end-of-stream.js":58,"./lib/internal/streams/pipeline.js":60}],64:[function(e,t,i){arguments[4][20][0].apply(i,arguments)},{dup:20}],65:[function(e,t,i){(function(e){t.exports=function(t,i){for(var r=Math.min(t.length,i.length),n=new e(r),a=0;a - * @license MIT - */ -"use strict";var r=e("base64-js"),n=e("ieee754");i.Buffer=t,i.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},i.INSPECT_MAX_BYTES=50;function a(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=new Uint8Array(e);return i.__proto__=t.prototype,i}function t(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return s(e,t,i)}function s(e,i,r){if("string"==typeof e)return function(e,i){"string"==typeof i&&""!==i||(i="utf8");if(!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var r=0|c(e,i),n=a(r),s=n.write(e,i);s!==r&&(n=n.slice(0,s));return n}(e,i);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(L(e,ArrayBuffer)||e&&L(e.buffer,ArrayBuffer))return function(e,i,r){if(i<0||e.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function c(e,i){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||L(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var a=!1;;)switch(i){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(a)return n?-1:D(e).length;i=(""+i).toLowerCase(),a=!0}}function h(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,i);case"utf8":case"utf-8":return C(this,t,i);case"ascii":return S(this,t,i);case"latin1":case"binary":return j(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function d(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function _(e,i,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),B(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof i&&(i=t.from(i,n)),t.isBuffer(i))return 0===i.length?-1:p(e,i,r,n,a);if("number"==typeof i)return i&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,i,r):Uint8Array.prototype.lastIndexOf.call(e,i,r):p(e,[i],r,n,a);throw new TypeError("val must be string, number or Buffer")}function p(e,t,i,r,n){var a,s=1,o=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,l/=2,i/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){var u=-1;for(a=i;ao&&(i=o-l),a=i;a>=0;a--){for(var c=!0,h=0;hn&&(r=n):r=n;var a=t.length;r>a/2&&(r=a/2);for(var s=0;s>8,n=i%256,a.push(n),a.push(r);return a}(t,e.length-i),e,i,r)}function E(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i))}function C(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n239?4:f>223?3:f>191?2:1;if(n+c<=i)switch(c){case 1:f<128&&(u=f);break;case 2:128==(192&(a=e[n+1]))&&(l=(31&f)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],s=e[n+2],128==(192&a)&&128==(192&s)&&(l=(15&f)<<12|(63&a)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],s=e[n+2],o=e[n+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(l=(15&f)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&l<1114112&&(u=l)}null===u?(u=65533,c=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=c}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var i="",r=0;for(;rt&&(e+=" ... "),""},t.prototype.compare=function(e,i,r,n,a){if(L(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===i&&(i=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),i<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&i>=r)return 0;if(n>=a)return-1;if(i>=r)return 1;if(this===e)return 0;for(var s=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(i>>>=0),l=Math.min(s,o),f=this.slice(n,a),u=e.slice(i,r),c=0;c>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return m(this,e,t,i);case"utf8":case"utf-8":return b(this,e,t,i);case"ascii":return v(this,e,t,i);case"latin1":case"binary":return y(this,e,t,i);case"base64":return g(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;nr)&&(i=r);for(var n="",a=t;ai)throw new RangeError("Trying to access beyond buffer length")}function M(e,i,r,n,a,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>a||ie.length)throw new RangeError("Index out of range")}function k(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function P(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,4),n.write(e,t,i,r,23,4),i+4}function I(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,8),n.write(e,t,i,r,52,8),i+8}t.prototype.slice=function(e,i){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(i=void 0===i?r:~~i)<0?(i+=r)<0&&(i=0):i>r&&(i=r),i>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},t.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a=(n*=128)&&(r-=Math.pow(2,8*t)),r},t.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=t,n=1,a=this[e+--r];r>0&&(n*=256);)a+=this[e+--r]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},t.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t>>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+i},t.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n)}var a=0,s=1,o=0;for(this[t]=255&e;++a>0)-o&255;return t+i},t.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n)}var a=i-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+i},t.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,i){return P(this,e,t,!0,i)},t.prototype.writeFloatBE=function(e,t,i){return P(this,e,t,!1,i)},t.prototype.writeDoubleLE=function(e,t,i){return I(this,e,t,!0,i)},t.prototype.writeDoubleBE=function(e,t,i){return I(this,e,t,!1,i)},t.prototype.copy=function(e,i,r,n){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),i>=e.length&&(i=e.length),i||(i=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-i=0;--s)e[s+i]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),i);return a},t.prototype.fill=function(e,i,r,n){if("string"==typeof e){if("string"==typeof i?(n=i,i=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var a=e.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(e=a)}}else"number"==typeof e&&(e&=255);if(i<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=i;s55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function F(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,i,r){for(var n=0;n=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function L(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function B(e){return e!=e}}).call(this,e("buffer").Buffer)},{"base64-js":17,buffer:66,ieee754:135}],67:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("stream").Transform,a=e("string_decoder").StringDecoder;function s(e){n.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}e("inherits")(s,n),s.prototype.update=function(e,t,i){"string"==typeof e&&(e=r.from(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,i){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{i(r)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,i){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return i&&(r+=this._decoder.end()),r},t.exports=s},{inherits:136,"safe-buffer":184,stream:194,string_decoder:195}],68:[function(e,t,i){(function(e){function t(e){return Object.prototype.toString.call(e)}i.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},i.isBoolean=function(e){return"boolean"==typeof e},i.isNull=function(e){return null===e},i.isNullOrUndefined=function(e){return null==e},i.isNumber=function(e){return"number"==typeof e},i.isString=function(e){return"string"==typeof e},i.isSymbol=function(e){return"symbol"==typeof e},i.isUndefined=function(e){return void 0===e},i.isRegExp=function(e){return"[object RegExp]"===t(e)},i.isObject=function(e){return"object"==typeof e&&null!==e},i.isDate=function(e){return"[object Date]"===t(e)},i.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},i.isFunction=function(e){return"function"==typeof e},i.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},i.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":137}],69:[function(e,t,i){(function(i){var r=e("elliptic"),n=e("bn.js");t.exports=function(e){return new s(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function o(e,t,r){Array.isArray(e)||(e=e.toArray());var n=new i(e);if(r&&n.lengthi)?t=("rmd160"===e?new l:f(e)).update(t).digest():t.length64?t=e(t):t.length<64&&(t=n.concat([t,s],64));for(var i=this._ipad=n.allocUnsafe(64),r=this._opad=n.allocUnsafe(64),o=0;o<64;o++)i[o]=54^t[o],r[o]=92^t[o];this._hash=[i]}r(o,a),o.prototype._update=function(e){this._hash.push(e)},o.prototype._final=function(){var e=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,e]))},t.exports=o},{"cipher-base":67,inherits:136,"safe-buffer":184}],75:[function(e,t,i){"use strict";i.randomBytes=i.rng=i.pseudoRandomBytes=i.prng=e("randombytes"),i.createHash=i.Hash=e("create-hash"),i.createHmac=i.Hmac=e("create-hmac");var r=e("browserify-sign/algos"),n=Object.keys(r),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);i.getHashes=function(){return a};var s=e("pbkdf2");i.pbkdf2=s.pbkdf2,i.pbkdf2Sync=s.pbkdf2Sync;var o=e("browserify-cipher");i.Cipher=o.Cipher,i.createCipher=o.createCipher,i.Cipheriv=o.Cipheriv,i.createCipheriv=o.createCipheriv,i.Decipher=o.Decipher,i.createDecipher=o.createDecipher,i.Decipheriv=o.Decipheriv,i.createDecipheriv=o.createDecipheriv,i.getCiphers=o.getCiphers,i.listCiphers=o.listCiphers;var l=e("diffie-hellman");i.DiffieHellmanGroup=l.DiffieHellmanGroup,i.createDiffieHellmanGroup=l.createDiffieHellmanGroup,i.getDiffieHellman=l.getDiffieHellman,i.createDiffieHellman=l.createDiffieHellman,i.DiffieHellman=l.DiffieHellman;var f=e("browserify-sign");i.createSign=f.createSign,i.Sign=f.Sign,i.createVerify=f.createVerify,i.Verify=f.Verify,i.createECDH=e("create-ecdh");var u=e("public-encrypt");i.publicEncrypt=u.publicEncrypt,i.privateEncrypt=u.privateEncrypt,i.publicDecrypt=u.publicDecrypt,i.privateDecrypt=u.privateDecrypt;var c=e("randomfill");i.randomFill=c.randomFill,i.randomFillSync=c.randomFillSync,i.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},i.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":38,"browserify-sign":46,"browserify-sign/algos":43,"create-ecdh":69,"create-hash":71,"create-hmac":73,"diffie-hellman":82,pbkdf2:151,"public-encrypt":159,randombytes:166,randomfill:167}],76:[function(e,t,i){"use strict";i.utils=e("./des/utils"),i.Cipher=e("./des/cipher"),i.DES=e("./des/des"),i.CBC=e("./des/cbc"),i.EDE=e("./des/ede")},{"./des/cbc":77,"./des/cipher":78,"./des/des":79,"./des/ede":80,"./des/utils":81}],77:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a={};function s(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t0;r--)t+=this._buffer(e,t),i+=this._flushBuffer(n,i);return t+=this._buffer(e,t),n},n.prototype.final=function(e){var t,i;return e&&(t=this.update(e)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(i):i},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];i=a.r28shl(i,o),n=a.r28shl(n,o),a.pc2(i,n,e.keys,s)}},l.prototype._update=function(e,t,i,r){var n=this._desState,s=a.readUInt32BE(e,t),o=a.readUInt32BE(e,t+4);a.ip(s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,s,o,n.tmp,0):this._decrypt(n,s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],a.writeUInt32BE(i,s,r),a.writeUInt32BE(i,o,r+4)},l.prototype._pad=function(e,t){for(var i=e.length-t,r=t;r>>0,s=h}a.rip(o,s,r,n)},l.prototype._decrypt=function(e,t,i,r,n){for(var s=i,o=t,l=e.keys.length-2;l>=0;l-=2){var f=e.keys[l],u=e.keys[l+1];a.expand(s,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1];var c=a.substitute(f,u),h=s;s=(o^a.permute(c))>>>0,o=h}a.rip(s,o,r,n)}},{"./cipher":78,"./utils":81,inherits:136,"minimalistic-assert":142}],80:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a=e("./cipher"),s=e("./des");function o(e,t){r.equal(t.length,24,"Invalid key length");var i=t.slice(0,8),n=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i})]}function l(e){a.call(this,e);var t=new o(this.type,this.options.key);this._edeState=t}n(l,a),t.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,i,r){var n=this._edeState;n.ciphers[0]._update(e,t,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r)},l.prototype._pad=s.prototype._pad,l.prototype._unpad=s.prototype._unpad},{"./cipher":78,"./des":79,inherits:136,"minimalistic-assert":142}],81:[function(e,t,i){"use strict";i.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},i.writeUInt32BE=function(e,t,i){e[0+i]=t>>>24,e[1+i]=t>>>16&255,e[2+i]=t>>>8&255,e[3+i]=255&t},i.ip=function(e,t,i,r){for(var n=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8)n<<=1,n|=t>>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=e>>>o+s&1}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8)a<<=1,a|=t>>>o+s&1;for(o=1;o<=25;o+=8)a<<=1,a|=e>>>o+s&1}i[r+0]=n>>>0,i[r+1]=a>>>0},i.rip=function(e,t,i,r){for(var n=0,a=0,s=0;s<4;s++)for(var o=24;o>=0;o-=8)n<<=1,n|=t>>>o+s&1,n<<=1,n|=e>>>o+s&1;for(s=4;s<8;s++)for(o=24;o>=0;o-=8)a<<=1,a|=t>>>o+s&1,a<<=1,a|=e>>>o+s&1;i[r+0]=n>>>0,i[r+1]=a>>>0},i.pc1=function(e,t,i,r){for(var n=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8)n<<=1,n|=t>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=e>>o+s&1}for(o=0;o<=24;o+=8)n<<=1,n|=t>>o+s&1;for(s=1;s<=3;s++){for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1;for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1}for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1;i[r+0]=n>>>0,i[r+1]=a>>>0},i.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];i.pc2=function(e,t,i,n){for(var a=0,s=0,o=r.length>>>1,l=0;l>>r[l]&1;for(l=o;l>>r[l]&1;i[n+0]=a>>>0,i[n+1]=s>>>0},i.expand=function(e,t,i){var r=0,n=0;r=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)r<<=6,r|=e>>>a&63;for(a=11;a>=3;a-=4)n|=e>>>a&63,n<<=6;n|=(31&e)<<1|e>>>31,t[i+0]=r>>>0,t[i+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];i.substitute=function(e,t){for(var i=0,r=0;r<4;r++){i<<=4,i|=n[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){i<<=4,i|=n[256+64*r+(t>>>18-6*r&63)]}return i>>>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];i.permute=function(e){for(var t=0,i=0;i>>a[i]&1;return t>>>0},i.padSplit=function(e,t,i){for(var r=e.toString(2);r.lengthe;)i.ishrn(1);if(i.isEven()&&i.iadd(o),i.testn(1)||i.iadd(l),t.cmp(l)){if(!t.cmp(f))for(;i.mod(u).cmp(c);)i.iadd(d)}else for(;i.mod(a).cmp(h);)i.iadd(d);if(m(_=i.shrn(1))&&m(i)&&b(_)&&b(i)&&s.test(_)&&s.test(i))return i}}},{"bn.js":86,"miller-rabin":140,randombytes:166}],85:[function(e,t,i){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"}}},{}],86:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],87:[function(e,t,i){"use strict";var r=i;r.version=e("../package.json").version,r.utils=e("./elliptic/utils"),r.rand=e("brorand"),r.curve=e("./elliptic/curve"),r.curves=e("./elliptic/curves"),r.ec=e("./elliptic/ec"),r.eddsa=e("./elliptic/eddsa")},{"../package.json":103,"./elliptic/curve":90,"./elliptic/curves":93,"./elliptic/ec":94,"./elliptic/eddsa":97,"./elliptic/utils":101,brorand:19}],88:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.getNAF,s=n.getJSF,o=n.assert;function l(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}t.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){o(e.precomputed);var i=e._getDoubles(),r=a(t,1,this._bitLength),n=(1<=l;t--)f=(f<<1)+r[t];s.push(f)}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),h=n;h>0;h--){for(l=0;l=0;f--){for(t=0;f>=0&&0===s[f];f--)t++;if(f>=0&&t++,l=l.dblp(t),f<0)break;var u=s[f];o(0!==u),l="affine"===e.type?u>0?l.mixedAdd(n[u-1>>1]):l.mixedAdd(n[-u-1>>1].neg()):u>0?l.add(n[u-1>>1]):l.add(n[-u-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,i,r,n){for(var o=this._wnafT1,l=this._wnafT2,f=this._wnafT3,u=0,c=0;c=1;c-=2){var d=c-1,_=c;if(1===o[d]&&1===o[_]){var p=[t[d],null,null,t[_]];0===t[d].y.cmp(t[_].y)?(p[1]=t[d].add(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg())):0===t[d].y.cmp(t[_].y.redNeg())?(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].add(t[_].neg())):(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],b=s(i[d],i[_]);u=Math.max(b[0].length,u),f[d]=new Array(u),f[_]=new Array(u);for(var v=0;v=0;c--){for(var C=0;c>=0;){var S=!0;for(v=0;v=0&&C++,w=w.dblp(C),c<0)break;for(v=0;v0?j=l[v][T-1>>1]:T<0&&(j=l[v][-T-1>>1].neg()),w="affine"===j.type?w.mixedAdd(j):w.add(j))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),s=a.redSub(i),o=r.redSub(t),l=n.redMul(s),f=a.redMul(o),u=n.redMul(o),c=s.redMul(a);return this.curve.point(l,f,c,u)},f.prototype._projDbl=function(){var e,t,i,r=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var s=(f=this.curve._mulA(n)).redAdd(a);if(this.zOne)e=r.redSub(n).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(f.redSub(a)),i=s.redSqr().redSub(s).redSub(s);else{var o=this.z.redSqr(),l=s.redSub(o).redISub(o);e=r.redSub(n).redISub(a).redMul(l),t=s.redMul(f.redSub(a)),i=s.redMul(l)}}else{var f=n.redAdd(a);o=this.curve._mulC(this.z).redSqr(),l=f.redSub(o).redSub(o);e=this.curve._mulC(r.redISub(f)).redMul(l),t=this.curve._mulC(f).redMul(n.redISub(a)),i=f.redMul(l)}return this.curve.point(e,t,i)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=i.redSub(t),s=n.redSub(r),o=n.redAdd(r),l=i.redAdd(t),f=a.redMul(s),u=o.redMul(l),c=a.redMul(l),h=s.redMul(o);return this.curve.point(f,u,h,c)},f.prototype._projAdd=function(e){var t,i,r=this.z.redMul(e.z),n=r.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(s),l=n.redSub(o),f=n.redAdd(o),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),c=r.redMul(l).redMul(u);return this.curve.twisted?(t=r.redMul(f).redMul(s.redSub(this.curve._mulA(a))),i=l.redMul(f)):(t=r.redMul(f).redMul(s.redSub(a)),i=this.curve._mulC(l).redMul(f)),this.curve.point(c,t,i)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1)},f.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0)},f.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},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],90:[function(e,t,i){"use strict";var r=i;r.base=e("./base"),r.short=e("./short"),r.mont=e("./mont"),r.edwards=e("./edwards")},{"./base":88,"./edwards":89,"./mont":91,"./short":92}],91:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("inherits"),a=e("./base"),s=e("../utils");function o(e){a.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,i){a.BasePoint.call(this,e,"projective"),null===t&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(o,a),t.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),r=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},n(l,a.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},o.prototype.point=function(e,t){return new l(this,e,t)},o.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),r=e.redMul(t),n=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(i),s=n.redMul(r),o=t.z.redMul(a.redAdd(s).redSqr()),l=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,l)},l.prototype.mul=function(e){for(var t=e.clone(),i=this,r=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],92:[function(e,t,i){"use strict";var r=e("../utils"),n=e("bn.js"),a=e("inherits"),s=e("./base"),o=r.assert;function l(e){s.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=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 f(e,t,i,r){s.BasePoint.call(this,e,"affine"),null===t&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(i,16),r&&(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 u(e,t,i,r){s.BasePoint.call(this,e,"jacobian"),null===t&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(i,16),this.z=new n(r,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}a(l,s),t.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,i;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)i=new n(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?i=a[0]:(i=a[1],o(0===this.g.mul(i).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:i,basis:e.basis?e.basis.map((function(e){return{a:new n(e.a,16),b:new n(e.b,16)}})):this._getEndoBasis(i)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),i=new n(2).toRed(t).redInvm(),r=i.redNeg(),a=new n(3).toRed(t).redNeg().redSqrt().redMul(i);return[r.redAdd(a).fromRed(),r.redSub(a).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,i,r,a,s,o,l,f,u,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),_=new n(1),p=new n(0),m=new n(0),b=new n(1),v=0;0!==h.cmpn(0);){var y=d.div(h);f=d.sub(y.mul(h)),u=m.sub(y.mul(_));var g=b.sub(y.mul(p));if(!r&&f.cmp(c)<0)t=l.neg(),i=_,r=f.neg(),a=u;else if(r&&2==++v)break;l=f,d=h,h=f,m=_,_=u,b=p,p=g}s=f.neg(),o=u;var w=r.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(w)>=0&&(s=t,o=i),r.negative&&(r=r.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:r,b:a},{a:s,b:o}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],r=t[1],n=r.b.mul(e).divRound(this.n),a=i.b.neg().mul(e).divRound(this.n),s=n.mul(i.a),o=a.mul(r.a),l=n.mul(i.b),f=a.mul(r.b);return{k1:e.sub(s).sub(o),k2:l.add(f).neg()}},l.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,r=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,a=0;a":""},f.prototype.isInfinity=function(){return this.inf},f.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 i=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},f.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,i=this.x.redSqr(),r=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(r),a=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new n(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},f.prototype.jmulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},f.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))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(u,s.BasePoint),l.prototype.jpoint=function(e,t,i){return new u(this,e,t,i)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(i,r)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(i),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(i.redMul(this.z)),o=r.redSub(n),l=a.redSub(s);if(0===o.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),c=r.redMul(f),h=l.redSqr().redIAdd(u).redISub(c).redISub(c),d=l.redMul(c.redISub(h)).redISub(a.redMul(u)),_=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(h,d,_)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,r=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),s=i.redSub(r),o=n.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),f=l.redMul(s),u=i.redMul(l),c=o.redSqr().redIAdd(f).redISub(u).redISub(u),h=o.redMul(u.redISub(c)).redISub(n.redMul(f)),d=this.z.redMul(s);return this.curve.jpoint(c,h,d)},u.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,i=0;i=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],93:[function(e,t,i){"use strict";var r,n=i,a=e("hash.js"),s=e("./curve"),o=e("./utils").assert;function l(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var i=new l(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:i}),i}})}n.PresetCurve=l,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=e("./precomputed/secp256k1")}catch(e){r=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},{"./curve":90,"./precomputed/secp256k1":100,"./utils":101,"hash.js":122}],94:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("hmac-drbg"),a=e("../utils"),s=e("../curves"),o=e("brorand"),l=a.assert,f=e("./key"),u=e("./signature");function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(l(s.hasOwnProperty(e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=c,c.prototype.keyPair=function(e){return new f(this,e)},c.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},c.prototype.genKeyPair=function(e){e||(e={});for(var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),a=this.n.sub(new r(2));;){var s=new r(t.generate(i));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(e,t){var i=8*e.byteLength()-this.n.bitLength();return i>0&&(e=e.ushrn(i)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},c.prototype.sign=function(e,t,i,a){"object"==typeof i&&(a=i,i=null),a||(a={}),t=this.keyFromPrivate(t,i),e=this._truncateToN(new r(e,16));for(var s=this.n.byteLength(),o=t.getPrivate().toArray("be",s),l=e.toArray("be",s),f=new n({hash:this.hash,entropy:o,nonce:l,pers:a.pers,persEnc:a.persEnc||"utf8"}),c=this.n.sub(new r(1)),h=0;;h++){var d=a.k?a.k(h):new r(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(c)>=0)){var _=this.g.mul(d);if(!_.isInfinity()){var p=_.getX(),m=p.umod(this.n);if(0!==m.cmpn(0)){var b=d.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(_.getY().isOdd()?1:0)|(0!==p.cmp(m)?2:0);return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new u({r:m,s:b,recoveryParam:v})}}}}}},c.prototype.verify=function(e,t,i,n){e=this._truncateToN(new r(e,16)),i=this.keyFromPublic(i,n);var a=(t=new u(t,"hex")).r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,l=s.invm(this.n),f=l.mul(e).umod(this.n),c=l.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(f,i.getPublic(),c)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(f,i.getPublic(),c)).isInfinity()&&0===o.getX().umod(this.n).cmp(a)},c.prototype.recoverPubKey=function(e,t,i,n){l((3&i)===i,"The recovery param is more than two bits"),t=new u(t,n);var a=this.n,s=new r(e),o=t.r,f=t.s,c=1&i,h=i>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");o=h?this.curve.pointFromX(o.add(this.curve.n),c):this.curve.pointFromX(o,c);var d=t.r.invm(a),_=a.sub(s).mul(d).umod(a),p=f.mul(d).umod(a);return this.g.mulAdd(_,o,p)},c.prototype.getKeyRecoveryParam=function(e,t,i,r){if(null!==(t=new u(t,r)).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(i))return n}throw new Error("Unable to find valid recovery factor")}},{"../curves":93,"../utils":101,"./key":95,"./signature":96,"bn.js":102,brorand:19,"hmac-drbg":134}],95:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils").assert;function a(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)}t.exports=a,a.fromPublic=function(e,t,i){return t instanceof a?t:new a(e,{pub:t,pubEnc:i})},a.fromPrivate=function(e,t,i){return t instanceof a?t:new a(e,{priv:t,privEnc:i})},a.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"}},a.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},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(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)},a.prototype.derive=function(e){return e.mul(this.priv).getX()},a.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i)},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},a.prototype.inspect=function(){return""}},{"../utils":101,"bn.js":102}],96:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(a(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function o(){this.place=0}function l(e,t){var i=e[t.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,a=0,s=t.place;a>>=0;return!(n<=127)&&(t.place=s,n)}function f(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|i);--i;)e.push(t>>>(i<<3)&255);e.push(t)}}t.exports=s,s.prototype._importDER=function(e,t){e=n.toArray(e,t);var i=new o;if(48!==e[i.place++])return!1;var a=l(e,i);if(!1===a)return!1;if(a+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var s=l(e,i);if(!1===s)return!1;var f=e.slice(i.place,s+i.place);if(i.place+=s,2!==e[i.place++])return!1;var u=l(e,i);if(!1===u)return!1;if(e.length!==u+i.place)return!1;var c=e.slice(i.place,u+i.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new r(f),this.s=new r(c),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&i[0]&&(i=[0].concat(i)),t=f(t),i=f(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];u(r,t.length),(r=r.concat(t)).push(2),u(r,i.length);var a=r.concat(i),s=[48];return u(s,a.length),s=s.concat(a),n.encode(s,e)}},{"../utils":101,"bn.js":102}],97:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("../curves"),a=e("../utils"),s=a.assert,o=a.parseBytes,l=e("./key"),f=e("./signature");function u(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=n[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}t.exports=u,u.prototype.sign=function(e,t){e=o(e);var i=this.keyFromSecret(t),r=this.hashInt(i.messagePrefix(),e),n=this.g.mul(r),a=this.encodePoint(n),s=this.hashInt(a,i.pubBytes(),e).mul(i.priv()),l=r.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:l,Rencoded:a})},u.prototype.verify=function(e,t,i){e=o(e),t=this.makeSignature(t);var r=this.keyFromPublic(i),n=this.hashInt(t.Rencoded(),r.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(r.pub().mul(n)).eq(a)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(n>>1)-1?(n>>1)-l:l,a.isubn(o)):o=0,r[s]=o,a.iushrn(1)}return r},r.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var r=0,n=0;e.cmpn(-r)>0||t.cmpn(-n)>0;){var a,s,o,l=e.andln(3)+r&3,f=t.andln(3)+n&3;if(3===l&&(l=-1),3===f&&(f=-1),0==(1&l))a=0;else a=3!==(o=e.andln(7)+r&7)&&5!==o||2!==f?l:-l;if(i[0].push(a),0==(1&f))s=0;else s=3!==(o=t.andln(7)+n&7)&&5!==o||2!==l?f:-f;i[1].push(s),2*r===a+1&&(r=1-r),2*n===s+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return i},r.cachedProperty=function(e,t,i){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new n(e,"hex","le")}},{"bn.js":102,"minimalistic-assert":142,"minimalistic-crypto-utils":143}],102:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],103:[function(e,t,i){t.exports={_args:[["elliptic@6.5.3","/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer"]],_from:"elliptic@6.5.3",_id:"elliptic@6.5.3",_inBundle:!1,_integrity:"sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.5.3",name:"elliptic",escapedName:"elliptic",rawSpec:"6.5.3",saveSpec:null,fetchSpec:"6.5.3"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",_spec:"6.5.3",_where:"/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},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"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^3.0.8",grunt:"^1.0.4","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":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.10.3",mocha:"^6.2.2"},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.5.3"}},{}],104:[function(e,t,i){var r=Object.create||function(e){var t=function(){};return t.prototype=e,new t},n=Object.keys||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return i},a=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var o,l=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),o=0===f.x}catch(e){o=!1}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,i){if(t)e.call(i);else for(var r=e.length,n=w(e,r),a=0;a0&&o.length>a){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,"object"==typeof console&&console.warn&&(l.name,l.message)}}else o=s[t]=i,++e._eventsCount;return e}function b(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(i=s[e]))return!1;var f="function"==typeof i;switch(r=arguments.length){case 1:c(i,f,this);break;case 2:h(i,f,this,arguments[1]);break;case 3:d(i,f,this,arguments[1],arguments[2]);break;case 4:_(i,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),a=1;a=0;s--)if(i[s]===t||i[s].listener===t){o=i[s].listener,a=s;break}if(a<0)return this;0===a?i.shift():function(e,t){for(var i=t,r=i+1,n=e.length;r=0;a--)this.removeListener(e,t[a]);return this},s.prototype.listeners=function(e){return y(this,e,!0)},s.prototype.rawListeners=function(e){return y(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],105:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("md5.js");t.exports=function(e,t,i,a){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=i/8,o=r.alloc(s),l=r.alloc(a||0),f=r.alloc(0);s>0||a>0;){var u=new n;u.update(f),u.update(e),t&&u.update(t),f=u.digest();var c=0;if(s>0){var h=o.length-s;c=Math.min(s,f.length),f.copy(o,h,0,c),s-=c}if(c0){var d=l.length-a,_=Math.min(a,f.length-c);f.copy(l,d,c,c+_),a-=_}}return f.fill(0),{key:o,iv:l}}},{"md5.js":139,"safe-buffer":184}],106:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("readable-stream").Transform;function a(e){n.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(a,n),a.prototype._transform=function(e,t,i){var r=null;try{this.update(e,t)}catch(e){r=e}i(r)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},a.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var i=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var a=this._blockOffset;a0;++s)this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.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 i=0;i<4;++i)this._length[i]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},{inherits:136,"readable-stream":121,"safe-buffer":184}],107:[function(e,t,i){arguments[4][49][0].apply(i,arguments)},{dup:49}],108:[function(e,t,i){arguments[4][50][0].apply(i,arguments)},{"./_stream_readable":110,"./_stream_writable":112,_process:158,dup:50,inherits:136}],109:[function(e,t,i){arguments[4][51][0].apply(i,arguments)},{"./_stream_transform":111,dup:51,inherits:136}],110:[function(e,t,i){arguments[4][52][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,"./internal/streams/async_iterator":113,"./internal/streams/buffer_list":114,"./internal/streams/destroy":115,"./internal/streams/from":117,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:52,events:104,inherits:136,"string_decoder/":195,util:20}],111:[function(e,t,i){arguments[4][53][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,dup:53,inherits:136}],112:[function(e,t,i){arguments[4][54][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,"./internal/streams/destroy":115,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:54,inherits:136,"util-deprecate":197}],113:[function(e,t,i){arguments[4][55][0].apply(i,arguments)},{"./end-of-stream":116,_process:158,dup:55}],114:[function(e,t,i){arguments[4][56][0].apply(i,arguments)},{buffer:66,dup:56,util:20}],115:[function(e,t,i){arguments[4][57][0].apply(i,arguments)},{_process:158,dup:57}],116:[function(e,t,i){arguments[4][58][0].apply(i,arguments)},{"../../../errors":107,dup:58}],117:[function(e,t,i){arguments[4][59][0].apply(i,arguments)},{dup:59}],118:[function(e,t,i){arguments[4][60][0].apply(i,arguments)},{"../../../errors":107,"./end-of-stream":116,dup:60}],119:[function(e,t,i){arguments[4][61][0].apply(i,arguments)},{"../../../errors":107,dup:61}],120:[function(e,t,i){arguments[4][62][0].apply(i,arguments)},{dup:62,events:104}],121:[function(e,t,i){arguments[4][63][0].apply(i,arguments)},{"./lib/_stream_duplex.js":108,"./lib/_stream_passthrough.js":109,"./lib/_stream_readable.js":110,"./lib/_stream_transform.js":111,"./lib/_stream_writable.js":112,"./lib/internal/streams/end-of-stream.js":116,"./lib/internal/streams/pipeline.js":118,dup:63}],122:[function(e,t,i){var r=i;r.utils=e("./hash/utils"),r.common=e("./hash/common"),r.sha=e("./hash/sha"),r.ripemd=e("./hash/ripemd"),r.hmac=e("./hash/hmac"),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},{"./hash/common":123,"./hash/hmac":124,"./hash/ripemd":125,"./hash/sha":126,"./hash/utils":133}],123:[function(e,t,i){"use strict";var r=e("./utils"),n=e("minimalistic-assert");function a(){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}i.BlockHash=a,a.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-i,this.endian);for(var n=0;n>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,a=8;athis.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t>>3},i.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},{"../utils":133}],133:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits");function a(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function l(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}i.inherits=n,i.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>6|192,i[r++]=63&s|128):a(e,n)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++n)),i[r++]=s>>18|240,i[r++]=s>>12&63|128,i[r++]=s>>6&63|128,i[r++]=63&s|128):(i[r++]=s>>12|224,i[r++]=s>>6&63|128,i[r++]=63&s|128)}else for(n=0;n>>0}return s},i.split32=function(e,t){for(var i=new Array(4*e.length),r=0,n=0;r>>24,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=255&a):(i[n+3]=a>>>24,i[n+2]=a>>>16&255,i[n+1]=a>>>8&255,i[n]=255&a)}return i},i.rotr32=function(e,t){return e>>>t|e<<32-t},i.rotl32=function(e,t){return e<>>32-t},i.sum32=function(e,t){return e+t>>>0},i.sum32_3=function(e,t,i){return e+t+i>>>0},i.sum32_4=function(e,t,i,r){return e+t+i+r>>>0},i.sum32_5=function(e,t,i,r,n){return e+t+i+r+n>>>0},i.sum64=function(e,t,i,r){var n=e[t],a=r+e[t+1]>>>0,s=(a>>0,e[t+1]=a},i.sum64_hi=function(e,t,i,r){return(t+r>>>0>>0},i.sum64_lo=function(e,t,i,r){return t+r>>>0},i.sum64_4_hi=function(e,t,i,r,n,a,s,o){var l=0,f=t;return l+=(f=f+r>>>0)>>0)>>0)>>0},i.sum64_4_lo=function(e,t,i,r,n,a,s,o){return t+r+a+o>>>0},i.sum64_5_hi=function(e,t,i,r,n,a,s,o,l,f){var u=0,c=t;return u+=(c=c+r>>>0)>>0)>>0)>>0)>>0},i.sum64_5_lo=function(e,t,i,r,n,a,s,o,l,f){return t+r+a+o+f>>>0},i.rotr64_hi=function(e,t,i){return(t<<32-i|e>>>i)>>>0},i.rotr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0},i.shr64_hi=function(e,t,i){return e>>>i},i.shr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0}},{inherits:136,"minimalistic-assert":142}],134:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("minimalistic-crypto-utils"),a=e("minimalistic-assert");function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex"),i=n.toArray(e.nonce,e.nonceEnc||"hex"),r=n.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,i,r)}t.exports=s,s.prototype._init=function(e,t,i){var r=e.concat(t).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},s.prototype.generate=function(e,t,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=i,i=t,t=null),i&&(i=n.toArray(i,r||"hex"),this._update(i));for(var a=[];a.length>1,u=-7,c=i?n-1:0,h=i?-1:1,d=e[t+c];for(c+=h,a=d&(1<<-u)-1,d>>=-u,u+=o;u>0;a=256*a+e[t+c],c+=h,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=r;u>0;s=256*s+e[t+c],c+=h,u-=8);if(0===a)a=1-f;else{if(a===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),a-=f}return(d?-1:1)*s*Math.pow(2,a-r)},i.write=function(e,t,i,r,n,a){var s,o,l,f=8*a-n-1,u=(1<>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,_=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+c>=1?h/l:h*Math.pow(2,1-c))*l>=2&&(s++,l/=2),s+c>=u?(o=0,s=u):s+c>=1?(o=(t*l-1)*Math.pow(2,n),s+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,n),s=0));n>=8;e[i+d]=255&o,d+=_,o/=256,n-=8);for(s=s<0;e[i+d]=255&s,d+=_,s/=256,f-=8);e[i+d-_]|=128*p}},{}],136:[function(e,t,i){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},{}],137:[function(e,t,i){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh - * @license MIT - */ -t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],138:[function(e,t,i){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],139:[function(e,t,i){"use strict";var r=e("inherits"),n=e("hash-base"),a=e("safe-buffer").Buffer,s=new Array(16);function o(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<>>32-t}function f(e,t,i,r,n,a,s){return l(e+(t&i|~t&r)+n+a|0,s)+t|0}function u(e,t,i,r,n,a,s){return l(e+(t&r|i&~r)+n+a|0,s)+t|0}function c(e,t,i,r,n,a,s){return l(e+(t^i^r)+n+a|0,s)+t|0}function h(e,t,i,r,n,a,s){return l(e+(i^(t|~r))+n+a|0,s)+t|0}r(o,n),o.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var i=this._a,r=this._b,n=this._c,a=this._d;i=f(i,r,n,a,e[0],3614090360,7),a=f(a,i,r,n,e[1],3905402710,12),n=f(n,a,i,r,e[2],606105819,17),r=f(r,n,a,i,e[3],3250441966,22),i=f(i,r,n,a,e[4],4118548399,7),a=f(a,i,r,n,e[5],1200080426,12),n=f(n,a,i,r,e[6],2821735955,17),r=f(r,n,a,i,e[7],4249261313,22),i=f(i,r,n,a,e[8],1770035416,7),a=f(a,i,r,n,e[9],2336552879,12),n=f(n,a,i,r,e[10],4294925233,17),r=f(r,n,a,i,e[11],2304563134,22),i=f(i,r,n,a,e[12],1804603682,7),a=f(a,i,r,n,e[13],4254626195,12),n=f(n,a,i,r,e[14],2792965006,17),i=u(i,r=f(r,n,a,i,e[15],1236535329,22),n,a,e[1],4129170786,5),a=u(a,i,r,n,e[6],3225465664,9),n=u(n,a,i,r,e[11],643717713,14),r=u(r,n,a,i,e[0],3921069994,20),i=u(i,r,n,a,e[5],3593408605,5),a=u(a,i,r,n,e[10],38016083,9),n=u(n,a,i,r,e[15],3634488961,14),r=u(r,n,a,i,e[4],3889429448,20),i=u(i,r,n,a,e[9],568446438,5),a=u(a,i,r,n,e[14],3275163606,9),n=u(n,a,i,r,e[3],4107603335,14),r=u(r,n,a,i,e[8],1163531501,20),i=u(i,r,n,a,e[13],2850285829,5),a=u(a,i,r,n,e[2],4243563512,9),n=u(n,a,i,r,e[7],1735328473,14),i=c(i,r=u(r,n,a,i,e[12],2368359562,20),n,a,e[5],4294588738,4),a=c(a,i,r,n,e[8],2272392833,11),n=c(n,a,i,r,e[11],1839030562,16),r=c(r,n,a,i,e[14],4259657740,23),i=c(i,r,n,a,e[1],2763975236,4),a=c(a,i,r,n,e[4],1272893353,11),n=c(n,a,i,r,e[7],4139469664,16),r=c(r,n,a,i,e[10],3200236656,23),i=c(i,r,n,a,e[13],681279174,4),a=c(a,i,r,n,e[0],3936430074,11),n=c(n,a,i,r,e[3],3572445317,16),r=c(r,n,a,i,e[6],76029189,23),i=c(i,r,n,a,e[9],3654602809,4),a=c(a,i,r,n,e[12],3873151461,11),n=c(n,a,i,r,e[15],530742520,16),i=h(i,r=c(r,n,a,i,e[2],3299628645,23),n,a,e[0],4096336452,6),a=h(a,i,r,n,e[7],1126891415,10),n=h(n,a,i,r,e[14],2878612391,15),r=h(r,n,a,i,e[5],4237533241,21),i=h(i,r,n,a,e[12],1700485571,6),a=h(a,i,r,n,e[3],2399980690,10),n=h(n,a,i,r,e[10],4293915773,15),r=h(r,n,a,i,e[1],2240044497,21),i=h(i,r,n,a,e[8],1873313359,6),a=h(a,i,r,n,e[15],4264355552,10),n=h(n,a,i,r,e[6],2734768916,15),r=h(r,n,a,i,e[13],1309151649,21),i=h(i,r,n,a,e[4],4149444226,6),a=h(a,i,r,n,e[11],3174756917,10),n=h(n,a,i,r,e[2],718787259,15),r=h(r,n,a,i,e[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+a|0},o.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=a.allocUnsafe(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=o},{"hash-base":106,inherits:136,"safe-buffer":184}],140:[function(e,t,i){var r=e("bn.js"),n=e("brorand");function a(e){this.rand=e||new n.Rand}t.exports=a,a.create=function(e){return new a(e)},a.prototype._randbelow=function(e){var t=e.bitLength(),i=Math.ceil(t/8);do{var n=new r(this.rand.generate(i))}while(n.cmp(e)>=0);return n},a.prototype._randrange=function(e,t){var i=t.sub(e);return e.add(this._randbelow(i))},a.prototype.test=function(e,t,i){var n=e.bitLength(),a=r.mont(e),s=new r(1).toRed(a);t||(t=Math.max(1,n/48|0));for(var o=e.subn(1),l=0;!o.testn(l);l++);for(var f=e.shrn(l),u=o.toRed(a);t>0;t--){var c=this._randrange(new r(2),o);i&&i(c);var h=c.toRed(a).redPow(f);if(0!==h.cmp(s)&&0!==h.cmp(u)){for(var d=1;d0;t--){var u=this._randrange(new r(2),s),c=e.gcd(u);if(0!==c.cmpn(1))return c;var h=u.toRed(n).redPow(l);if(0!==h.cmp(a)&&0!==h.cmp(f)){for(var d=1;d>8,s=255&n;a?i.push(a,s):i.push(s)}return i},r.zero2=n,r.toHex=a,r.encode=function(e,t){return"hex"===t?a(e):e}},{}],144:[function(e,t,i){var r,n,a=(r=new Date,n=4,{setLogLevel:function(e){n=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=n&&console.info("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=n&&a.getDurationString(new Date-r,1e3)},error:function(e,t){4>=n&&console.error("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)}});a.getDurationString=function(e,t){var i;function r(e,t){for(var i=(""+e).split(".");i[0].length0){for(var i="",r=0;r0&&(i+=","),i+="["+a.getDurationString(e.start(r))+","+a.getDurationString(e.end(r))+"]";return i}return"(empty)"},void 0!==i&&(i.Log=a);var s=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};s.prototype.getPosition=function(){return this.position},s.prototype.getEndPosition=function(){return this.buffer.byteLength},s.prototype.getLength=function(){return this.buffer.byteLength},s.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0},s.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},s.prototype.readAnyInt=function(e,t){var i=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:i=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:i=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";i=this.dataview.getUint8(this.position)<<16,i|=this.dataview.getUint8(this.position)<<8,i|=this.dataview.getUint8(this.position);break;case 4:i=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";i=this.dataview.getUint32(this.position)<<32,i|=this.dataview.getUint32(this.position);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,i}throw"Not enough bytes in buffer"},s.prototype.readUint8=function(){return this.readAnyInt(1,!1)},s.prototype.readUint16=function(){return this.readAnyInt(2,!1)},s.prototype.readUint24=function(){return this.readAnyInt(3,!1)},s.prototype.readUint32=function(){return this.readAnyInt(4,!1)},s.prototype.readUint64=function(){return this.readAnyInt(8,!1)},s.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",i=0;ithis._byteLength&&(this._byteLength=t);else{for(i<1&&(i=1);t>i;)i*=2;var r=new ArrayBuffer(i),n=new Uint8Array(this._buffer);new Uint8Array(r,0,n.length).set(n),this.buffer=r,this._byteLength=t}}},o.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),i=new Uint8Array(this._buffer,0,t.length);t.set(i),this.buffer=e}},o.BIG_ENDIAN=!1,o.LITTLE_ENDIAN=!0,o.prototype._byteLength=0,Object.defineProperty(o.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(o.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),o.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},o.prototype.isEof=function(){return this.position>=this._byteLength},o.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},o.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Int32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Int16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},o.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Uint32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Uint16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},o.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var i=new Float64Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Float32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},o.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},o.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},o.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},o.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},o.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,o.memcpy=function(e,t,i,r,n){var a=new Uint8Array(e,t,n),s=new Uint8Array(i,r,n);a.set(s)},o.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},o.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},o.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i=0;in;r--,n++){var a=t[n];t[n]=t[r],t[r]=a}return e},o.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],i=0;i>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},o.prototype.adjustUint32=function(e,t){var i=this.position;this.seek(e),this.writeUint32(t),this.seek(i)},o.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var i=new Int32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},o.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var i=new Int16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},o.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},o.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},o.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},o.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var i=new Float64Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=8*e,i},o.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var i=new Float32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i};var f=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(f.prototype=new o(new ArrayBuffer,0,o.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),e.byteLength),i.buffer},f.prototype.reduceBuffer=function(e,t,i){var r;return(r=new Uint8Array(i)).set(new Uint8Array(e,t,i)),r.buffer.fileStart=e.fileStart+t,r.buffer.usedBytes=0,r.buffer},f.prototype.insertBuffer=function(e){for(var t=!0,i=0;ir.byteLength){this.buffers.splice(i,1),i--;continue}a.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=r.fileStart||(e=this.reduceBuffer(e,0,r.fileStart-e.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(i,0,e),0===i&&(this.buffer=e);t=!1;break}if(e.fileStart0)){t=!1;break}e=this.reduceBuffer(e,n,s)}}t&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===i&&(this.buffer=e))},f.prototype.logBufferLevel=function(e){var t,i,r,n,s,o=[],l="";for(r=0,n=0,t=0;t0&&(l+=s.end-1+"]");var f=e?a.info:a.debug;0===this.buffers.length?f("MultiBufferStream","No more buffer in memory"):f("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+r+"/"+n+" bytes): "+l)},f.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}return!1}return!1},f.prototype.findPosition=function(e,t,i){var r,n=null,s=-1;for(r=!0===e?0:this.bufferIndex;r=t?(a.debug("MultiBufferStream","Found position in existing buffer #"+s),s):-1},f.prototype.findEndContiguousBuf=function(e){var t,i,r,n=void 0!==e?e:this.bufferIndex;if(i=this.buffers[n],this.buffers.length>n+1)for(t=n+1;t>3;return 31===r&&i.data.length>=2&&(r=32+((7&i.data[0])<<3)+((224&i.data[1])>>5)),r}return null},i.DecoderConfigDescriptor=function(e){i.Descriptor.call(this,4,e)},i.DecoderConfigDescriptor.prototype=new i.Descriptor,i.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},i.DecoderSpecificInfo=function(e){i.Descriptor.call(this,5,e)},i.DecoderSpecificInfo.prototype=new i.Descriptor,i.SLConfigDescriptor=function(e){i.Descriptor.call(this,6,e)},i.SLConfigDescriptor.prototype=new i.Descriptor,this};void 0!==i&&(i.MPEG4DescriptorParser=u);var c={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){c.FullBox.prototype=new c.Box,c.ContainerBox.prototype=new c.Box,c.SampleEntry.prototype=new c.Box,c.TrackGroupTypeBox.prototype=new c.FullBox,c.BASIC_BOXES.forEach((function(e){c.createBoxCtor(e)})),c.FULL_BOXES.forEach((function(e){c.createFullBoxCtor(e)})),c.CONTAINER_BOXES.forEach((function(e){c.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,i){this.type=e,this.size=t,this.uuid=i},FullBox:function(e,t,i){c.Box.call(this,e,t,i),this.flags=0,this.version=0},ContainerBox:function(e,t,i){c.Box.call(this,e,t,i),this.boxes=[]},SampleEntry:function(e,t,i,r){c.ContainerBox.call(this,e,t),this.hdr_size=i,this.start=r},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){c.FullBox.call(this,e,t)},createBoxCtor:function(e,t){c.boxCodes.push(e),c[e+"Box"]=function(t){c.Box.call(this,e,t)},c[e+"Box"].prototype=new c.Box,t&&(c[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){c[e+"Box"]=function(t){c.FullBox.call(this,e,t)},c[e+"Box"].prototype=new c.FullBox,c[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,i=0;ii?(a.error("BoxParser","Box of type '"+u+"' has a size "+f+" greater than its container size "+i),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):o+f>e.getEndPosition()?(e.seek(o),a.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):t?{code:c.OK,type:u,size:f,hdr_size:l,start:o}:(c[u+"Box"]?r=new c[u+"Box"](f):"uuid"!==u?(a.warn("BoxParser","Unknown box type: '"+u+"'"),(r=new c.Box(u,f)).has_unparsed_data=!0):c.UUIDBoxes[s]?r=new c.UUIDBoxes[s](f):(a.warn("BoxParser","Unknown uuid type: '"+s+"'"),(r=new c.Box(u,f)).uuid=s,r.has_unparsed_data=!0),r.hdr_size=l,r.start=o,r.write===c.Box.prototype.write&&"mdat"!==r.type&&(a.info("BoxParser","'"+h+"' box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(e)),r.parse(e),(n=e.getPosition()-(r.start+r.size))<0?(a.warn("BoxParser","Parsing of box '"+h+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),e.seek(r.start+r.size)):n>0&&(a.error("BoxParser","Parsing of box '"+h+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),e.seek(r.start+r.size)),{code:c.OK,box:r,size:r.size})},c.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},c.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},c.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.ContainerBox.prototype.parse=function(e){for(var t,i;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)},c.SAMPLE_ENTRY_TYPE_VISUAL="Visual",c.SAMPLE_ENTRY_TYPE_AUDIO="Audio",c.SAMPLE_ENTRY_TYPE_HINT="Hint",c.SAMPLE_ENTRY_TYPE_METADATA="Metadata",c.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",c.SAMPLE_ENTRY_TYPE_SYSTEM="System",c.SAMPLE_ENTRY_TYPE_TEXT="Text",c.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},c.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},c.SampleEntry.prototype.parseFooter=function(e){c.ContainerBox.prototype.parse.call(this,e)},c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_HINT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)})),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT,"enct"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA,"encm"),c.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)a.error("av1C marker problem");else if(this.version=127&t,1===this.version)if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void a.error("av1C reserved_2 parsing problem");var i=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(i)}else a.error("av1C reserved_1 parsing problem");else a.error("av1C version "+this.version+" not supported")})),c.createBoxCtor("avcC",(function(e){var t,i;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),i=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(i))})),c.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),c.createBoxCtor("clap",(function(e){this.cleanApertureWidthN=e.readUint32(),this.cleanApertureWidthD=e.readUint32(),this.cleanApertureHeightN=e.readUint32(),this.cleanApertureHeightD=e.readUint32(),this.horizOffN=e.readUint32(),this.horizOffD=e.readUint32(),this.vertOffN=e.readUint32(),this.vertOffD=e.readUint32()})),c.createBoxCtor("clli",(function(e){this.max_content_light_level=e.readUint16(),this.max_pic_average_light_level=e.readUint16()})),c.createFullBoxCtor("co64",(function(e){var t,i;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(i=0;i>7}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4))})),c.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),c.createFullBoxCtor("cslg",(function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())})),c.createFullBoxCtor("ctts",(function(e){var t,i;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(i=0;i>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|i>>6&3,this.acmod=i>>3&7,this.lfeon=i>>2&1,this.bit_rate_code=3&i|r>>5&7})),c.createBoxCtor("dec3",(function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var i=0;i>6,r.bsid=n>>1&31,r.bsmod=(1&n)<<4|a>>4&15,r.acmod=a>>1&7,r.lfeon=1&a,r.num_dep_sub=s>>1&15,r.num_dep_sub>0&&(r.chan_loc=(1&s)<<8|e.readUint8())}})),c.createFullBoxCtor("dfLa",(function(e){var t=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var r=e.readUint8(),n=Math.min(127&r,i.length-1);if(n?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(i[n]),128&r)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),c.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),c.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),c.createFullBoxCtor("dref",(function(e){var t,i;this.entries=[];for(var r=e.readUint32(),n=0;n=4;)this.compatible_brands[i]=e.readString(4),t-=4,i++})),c.createFullBoxCtor("hdlr",(function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))})),c.createBoxCtor("hvcC",(function(e){var t,i,r,n;this.configurationVersion=e.readUint8(),n=e.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),n=e.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var a=e.readUint8();for(t=0;t>7,s.nalu_type=63&n;var o=e.readUint16();for(i=0;i>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var i=0;if(this.version<2)i=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";i=e.readUint32()}for(var r=0;r=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))})),c.createFullBoxCtor("ipma",(function(e){var t,i;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?s.property_index=(127&a)<<8|e.readUint8():s.property_index=127&a}}})),c.createFullBoxCtor("iref",(function(e){var t,i;for(this.references=[];e.getPosition()>7,r.assignment_type=127&n,r.assignment_type){case 0:r.grouping_type=e.readString(4);break;case 1:r.grouping_type=e.readString(4),r.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:r.sub_track_id=e.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type")}}})),c.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),c.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=e.readUint16(),this.display_primaries[0].y=e.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=e.readUint16(),this.display_primaries[1].y=e.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=e.readUint16(),this.display_primaries[2].y=e.readUint16(),this.white_point={},this.white_point.x=e.readUint16(),this.white_point.y=e.readUint16(),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),c.createFullBoxCtor("mdhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()})),c.createFullBoxCtor("mehd",(function(e){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()})),c.createFullBoxCtor("meta",(function(e){this.boxes=[],c.ContainerBox.prototype.parse.call(this,e)})),c.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),c.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),c.createFullBoxCtor("mvhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()})),c.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),c.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),c.createFullBoxCtor("padb",(function(e){var t=e.readUint32();this.padbits=[];for(var i=0;i0){var t=e.readUint32();this.kid=[];for(var i=0;i0&&(this.data=e.readUint8Array(r))})),c.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),c.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),c.createFullBoxCtor("saio",(function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var i=0;i>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var i=e.readUint8(),r=0;r>7,this.num_leading_samples=127&t})),c.createSampleGroupCtor("rash",(function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=c.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))})),c.createSampleGroupCtor("stsa",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),c.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),c.createSampleGroupCtor("tsas",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("tscl",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("vipr",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createFullBoxCtor("sbgp",(function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),i=0;i>6,this.sample_depends_on[r]=t>>4&3,this.sample_is_depended_on[r]=t>>2&3,this.sample_has_redundancy[r]=3&t})),c.createFullBoxCtor("senc"),c.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),i=0;i>31&1,r.referenced_size=2147483647&n,r.subsegment_duration=e.readUint32(),n=e.readUint32(),r.starts_with_SAP=n>>31&1,r.SAP_type=n>>28&7,r.SAP_delta_time=268435455&n}})),c.SingleItemTypeReferenceBox=function(e,t,i,r){c.Box.call(this,e,t),this.hdr_size=i,this.start=r},c.SingleItemTypeReferenceBox.prototype=new c.Box,c.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var i=0;i>4&15,this.sample_sizes[t+1]=15&r}else if(8===this.field_size)for(t=0;t0)for(i=0;i>4&15,this.default_skip_byte_block=15&t}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=c.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))})),c.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),c.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),c.createFullBoxCtor("tfra",(function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var i=e.readUint32(),r=0;r>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()})),c.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),c.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),c.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},c.createTrackGroupCtor("msrc"),c.TrackReferenceTypeBox=function(e,t,i,r){c.Box.call(this,e,t),this.hdr_size=i,this.start=r},c.TrackReferenceTypeBox.prototype=new c.Box,c.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},c.trefBox.prototype.parse=function(e){for(var t,i;e.getPosition()t&&this.flags&c.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var i=0;i0&&(this.location=e.readCString())})),c.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})),c.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=c.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),c.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),c.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=c.parseHex16(e)})),c.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))})),c.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),c.SampleEntry.prototype.isVideo=function(){return!1},c.SampleEntry.prototype.isAudio=function(){return!1},c.SampleEntry.prototype.isSubtitle=function(){return!1},c.SampleEntry.prototype.isMetadata=function(){return!1},c.SampleEntry.prototype.isHint=function(){return!1},c.SampleEntry.prototype.getCodec=function(){return this.type.replace(".","")},c.SampleEntry.prototype.getWidth=function(){return""},c.SampleEntry.prototype.getHeight=function(){return""},c.SampleEntry.prototype.getChannelCount=function(){return""},c.SampleEntry.prototype.getSampleRate=function(){return""},c.SampleEntry.prototype.getSampleSize=function(){return""},c.VisualSampleEntry.prototype.isVideo=function(){return!0},c.VisualSampleEntry.prototype.getWidth=function(){return this.width},c.VisualSampleEntry.prototype.getHeight=function(){return this.height},c.AudioSampleEntry.prototype.isAudio=function(){return!0},c.AudioSampleEntry.prototype.getChannelCount=function(){return this.channel_count},c.AudioSampleEntry.prototype.getSampleRate=function(){return this.samplerate},c.AudioSampleEntry.prototype.getSampleSize=function(){return this.samplesize},c.SubtitleSampleEntry.prototype.isSubtitle=function(){return!0},c.MetadataSampleEntry.prototype.isMetadata=function(){return!0},c.decimalToHex=function(e,t){var i=Number(e).toString(16);for(t=null==t?t=2:t;i.length>=1;t+=c.decimalToHex(r,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var n=!1,a="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||n)&&(a="."+c.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+a,n=!0);t+=a}return t},c.mp4aSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),i=this.esds.esd.getAudioConfig();return e+"."+c.decimalToHex(t)+(i?"."+i:"")}return e},c.stxtSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},c.av01SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this);return 2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+this.av1C.seq_level_idx_0+(this.av1C.seq_tier_0?"H":"M")+"."+e},c.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>l?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>l&&e.writeUint64(this.size)},c.FullBox.prototype.writeHeader=function(e){this.size+=4,c.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},c.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},c.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1-1||e[i]instanceof c.Box||t[i]instanceof c.Box||void 0===e[i]||void 0===t[i]||"function"==typeof e[i]||"function"==typeof t[i]||e.subBoxNames&&e.subBoxNames.indexOf(i.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(i.slice(0,4))>-1||"data"===i||"start"===i||"size"===i||"creation_time"===i||"modification_time"===i||c.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1||e[i]===t[i]))return!1;return!0},c.boxEqual=function(e,t){if(!c.boxEqualFields(e,t))return!1;for(var i=0;i=t?e:new Array(t-e.length+1).join(i)+e}function n(e){var t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),n=Math.floor(e-3600*t-60*i),a=Math.floor(1e3*(e-3600*t-60*i-n));return r(t,2)+":"+r(i,2)+":"+r(n,2)+"."+r(a,3)}for(var a=this.parseSample(i),s="",o=0;o1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1)},p.prototype.setExtractionOptions=function(e,t,i){var r=this.getTrackById(e);if(r){var n={};this.extractedTracks.push(n),n.id=e,n.user=t,n.trak=r,r.nextSample=0,n.nb_samples=1e3,n.samples=[],i&&i.nbSamples&&(n.nb_samples=i.nbSamples)}},p.prototype.unsetExtractionOptions=function(e){for(var t=-1,i=0;i-1&&this.extractedTracks.splice(t,1)},p.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this.saveParsePosition&&this.saveParsePosition(),(e=c.parseOneBox(this.stream,!1)).code===c.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var i;switch(i="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),i){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[i]&&a.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},p.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1))},p.prototype.appendBuffer=function(e,t){var i;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(i=this.nextSeekPosition,this.nextSeekPosition=void 0):i=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(i=this.stream.getEndFilePositionAfter(i))):i=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+i),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i},p.prototype.getInfo=function(){var e,t,i,r,n,a={},s=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(a.hasMoov=!0,a.duration=this.moov.mvhd.duration,a.timescale=this.moov.mvhd.timescale,a.isFragmented=null!=this.moov.mvex,a.isFragmented&&this.moov.mvex.mehd&&(a.fragment_duration=this.moov.mvex.mehd.fragment_duration),a.isProgressive=this.isProgressive,a.hasIOD=null!=this.moov.iods,a.brands=[],a.brands.push(this.ftyp.major_brand),a.brands=a.brands.concat(this.ftyp.compatible_brands),a.created=new Date(s+1e3*this.moov.mvhd.creation_time),a.modified=new Date(s+1e3*this.moov.mvhd.modification_time),a.tracks=[],a.audioTracks=[],a.videoTracks=[],a.subtitleTracks=[],a.metadataTracks=[],a.hintTracks=[],a.otherTracks=[],e=0;e0?a.mime+='video/mp4; codecs="':a.audioTracks&&a.audioTracks.length>0?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e=i.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+r.id+" for samples ["+Math.max(0,i.nextSample-r.nb_samples)+","+(i.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(r.id,r.user,r.segmentStream.buffer,i.nextSample,e||i.nextSample>=i.samples.length),r.segmentStream=null,r!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t=i.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+s.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(s.id,s.user,s.samples),s.samples=[],s!==this.extractedTracks[t]))break}}}},p.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},p.prototype.getBoxes=function(e,t){var i=[];return p._sweep.call(this,e,i,t),i},p._sweep=function(e,t,i){for(var r in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;p._sweep.call(this.boxes[r],e,t,i)}},p.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},p.prototype.getTrackSample=function(e,t){var i=this.getTrackById(e);return this.getSample(i,t)},p.prototype.releaseUsedSamples=function(e,t){var i=0,r=this.getTrackById(e);r.lastValidSample||(r.lastValidSample=0);for(var n=r.lastValidSample;ne*n.timescale){f=r-1;break}t&&n.is_sync&&(l=r)}for(t&&(f=l),e=i.samples[f].cts,i.nextSample=f;i.samples[f].alreadyRead===i.samples[f].size&&i.samples[f+1];)f++;return s=i.samples[f].offset+i.samples[f].alreadyRead,a.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+a.getDurationString(e,o)+" and offset: "+s),{offset:s,time:e/o}},p.prototype.seek=function(e,t){var i,r,n,s=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(n=0;n-1){s=o;break}switch(s){case"Visual":n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24);break;case"Audio":n.add("smhd").set("balance",t.balance||0),a.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":switch(n.add("sthd"),t.type){case"stpp":a.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"")}break;case"Metadata":case"System":default:n.add("nmhd")}t.description&&a.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){a.addBox(e)})),n.add("dinf").add("dref").addEntry((new c["url Box"]).set("flags",1));var u=n.add("stbl");return u.add("stsd").addEntry(a),u.add("stts").set("sample_counts",[]).set("sample_deltas",[]),u.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),u.add("stco").set("chunk_offsets",[]),u.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(i),t.id}},c.Box.prototype.computeSize=function(e){var t=e||new o;t.endianness=o.BIG_ENDIAN,this.write(t)},p.prototype.addSample=function(e,t,i){var r=i||{},n={},a=this.getTrackById(e);if(null!==a){n.number=a.samples.length,n.track_id=a.tkhd.track_id,n.timescale=a.mdia.mdhd.timescale,n.description_index=r.sample_description_index?r.sample_description_index-1:0,n.description=a.mdia.minf.stbl.stsd.entries[n.description_index],n.data=t,n.size=t.length,n.alreadyRead=n.size,n.duration=r.duration||1,n.cts=r.cts||0,n.dts=r.dts||0,n.is_sync=r.is_sync||!1,n.is_leading=r.is_leading||0,n.depends_on=r.depends_on||0,n.is_depended_on=r.is_depended_on||0,n.has_redundancy=r.has_redundancy||0,n.degradation_priority=r.degradation_priority||0,n.offset=0,n.subsamples=r.subsamples,a.samples.push(n),a.samples_size+=n.size,a.samples_duration+=n.duration,this.processSamples();var s=p.createSingleSampleMoof(n);return this.addBox(s),s.computeSize(),s.trafs[0].truns[0].data_offset=s.size+8,this.add("mdat").data=t,n}},p.createSingleSampleMoof=function(e){var t=new c.moofBox;t.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=t.add("traf");return i.add("tfhd").set("track_id",e.track_id).set("flags",c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts),i.add("trun").set("flags",c.TRUN_FLAGS_DATA_OFFSET|c.TRUN_FLAGS_DURATION|c.TRUN_FLAGS_SIZE|c.TRUN_FLAGS_FLAGS|c.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[0]).set("sample_composition_time_offset",[e.cts-e.dts]),t},p.prototype.lastMoofIndex=0,p.prototype.samplesDataSize=0,p.prototype.resetTables=function(){var e,t,i,r,n,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=n[s].grouping_type+"/0",(o=new f(n[s].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=o))}else for(s=0;s=2&&(l=r[s].grouping_type+"/0",o=new f(r[s].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=o))},p.setSampleGroupProperties=function(e,t,i,r){var n,a;for(n in t.sample_groups=[],r){var s;if(t.sample_groups[n]={},t.sample_groups[n].grouping_type=r[n].grouping_type,t.sample_groups[n].grouping_type_parameter=r[n].grouping_type_parameter,i>=r[n].last_sample_in_run&&(r[n].last_sample_in_run<0&&(r[n].last_sample_in_run=0),r[n].entry_index++,r[n].entry_index<=r[n].sbgp.entries.length-1&&(r[n].last_sample_in_run+=r[n].sbgp.entries[r[n].entry_index].sample_count)),r[n].entry_index<=r[n].sbgp.entries.length-1?t.sample_groups[n].group_description_index=r[n].sbgp.entries[r[n].entry_index].group_description_index:t.sample_groups[n].group_description_index=-1,0!==t.sample_groups[n].group_description_index)s=r[n].fragment_description?r[n].fragment_description:r[n].description,t.sample_groups[n].group_description_index>0?(a=t.sample_groups[n].group_description_index>65535?(t.sample_groups[n].group_description_index>>16)-1:t.sample_groups[n].group_description_index-1,s&&a>=0&&(t.sample_groups[n].description=s.entries[a])):s&&s.version>=2&&s.default_group_description_index>0&&(t.sample_groups[n].description=s.entries[s.default_group_description_index-1])}},p.process_sdtp=function(e,t,i){t&&(e?(t.is_leading=e.is_leading[i],t.depends_on=e.sample_depends_on[i],t.is_depended_on=e.sample_is_depended_on[i],t.has_redundancy=e.sample_has_redundancy[i]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},p.prototype.buildSampleLists=function(){var e,t;for(e=0;ey&&(g++,y<0&&(y=0),y+=a.sample_counts[g]),t>0?(e.samples[t-1].duration=a.sample_deltas[g],e.samples_duration+=e.samples[t-1].duration,T.dts=e.samples[t-1].dts+e.samples[t-1].duration):T.dts=0,s?(t>=w&&(E++,w<0&&(w=0),w+=s.sample_counts[E]),T.cts=e.samples[t].dts+s.sample_offsets[E]):T.cts=T.dts,o?(t==o.sample_numbers[C]-1?(T.is_sync=!0,C++):(T.is_sync=!1,T.degradation_priority=0),f&&f.entries[S].sample_delta+j==t+1&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta,S++)):T.is_sync=!0,p.process_sdtp(e.mdia.minf.stbl.sdtp,T,T.number),T.degradation_priority=h?h.priority[t]:0,f&&f.entries[S].sample_delta+j==t&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta),(u.length>0||c.length>0)&&p.setSampleGroupProperties(e,T,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},p.prototype.updateSampleLists=function(){var e,t,i,r,n,a,s,o,l,f,u,h,d,_,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&p.initSampleGroups(h,u,u.sbgps,h.mdia.minf.stbl.sgpds,u.sgpds),t=0;t0?_.dts=h.samples[h.samples.length-2].dts+h.samples[h.samples.length-2].duration:(u.tfdt?_.dts=u.tfdt.baseMediaDecodeTime:_.dts=0,h.first_traf_merged=!0),_.cts=_.dts,b.flags&c.TRUN_FLAGS_CTS_OFFSET&&(_.cts=_.dts+b.sample_composition_time_offset[i]),m=s,b.flags&c.TRUN_FLAGS_FLAGS?m=b.sample_flags[i]:0===i&&b.flags&c.TRUN_FLAGS_FIRST_FLAG&&(m=b.first_sample_flags),_.is_sync=!(m>>16&1),_.is_leading=m>>26&3,_.depends_on=m>>24&3,_.is_depended_on=m>>22&3,_.has_redundancy=m>>20&3,_.degradation_priority=65535&m;var v=!!(u.tfhd.flags&c.TFHD_FLAG_BASE_DATA_OFFSET),y=!!(u.tfhd.flags&c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),g=!!(b.flags&c.TRUN_FLAGS_DATA_OFFSET),w=0;w=v?u.tfhd.base_data_offset:y||0===t?f.start:o,_.offset=0===t&&0===i?g?w+b.data_offset:w:o,o=_.offset+_.size,(u.sbgps.length>0||u.sgpds.length>0||h.mdia.minf.stbl.sbgps.length>0||h.mdia.minf.stbl.sgpds.length>0)&&p.setSampleGroupProperties(h,_,_.number_in_traf,u.sample_groups_info)}}if(u.subs){h.has_fragment_subsamples=!0;var E=u.first_sample_index;for(t=0;t-1))return null;var s=(i=this.stream.buffers[n]).byteLength-(r.offset+r.alreadyRead-i.fileStart);if(r.size-r.alreadyRead<=s)return a.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+(r.size-r.alreadyRead)+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,r.size-r.alreadyRead),i.usedBytes+=r.size-r.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead=r.size,r;if(0===s)return null;a.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+s+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,s),r.alreadyRead+=s,i.usedBytes+=s,this.stream.logBufferLevel()}},p.prototype.releaseSample=function(e,t){var i=e.samples[t];return i.data?(this.samplesDataSize-=i.size,i.data=null,i.alreadyRead=0,i.size):0},p.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},p.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec()}return t},p.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(i.protection=n.ipro.protections[n.iinf.item_infos[e].protection_index-1]),n.iinf.item_infos[e].item_type?i.type=n.iinf.item_infos[e].item_type:i.type="mime",i.content_type=n.iinf.item_infos[e].content_type,i.content_encoding=n.iinf.item_infos[e].content_encoding;if(n.iloc)for(e=0;e0){var h=n.iprp.ipco.boxes[c.property_index-1];i.properties[h.type]=h,i.properties.boxes.push(h)}}}}}},p.prototype.getItem=function(e){var t,i;if(!this.meta)return null;if(!(i=this.items[e]).data&&i.size)i.data=new Uint8Array(i.size),i.alreadyRead=0,this.itemsDataSize+=i.size,a.debug("ISOFile","Allocating item #"+e+" of size "+i.size+" (total: "+this.itemsDataSize+")");else if(i.alreadyRead===i.size)return i;for(var r=0;r-1))return null;var l=(t=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-t.fileStart);if(!(n.length-n.alreadyRead<=l))return a.debug("ISOFile","Getting item #"+e+" extent #"+r+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+l+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,l),n.alreadyRead+=l,i.alreadyRead+=l,t.usedBytes+=l,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+e+" extent #"+r+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,n.length-n.alreadyRead),t.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length}}return i.alreadyRead===i.size?i:null},p.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var i=0;i0?this.moov.traks[e].samples[0].duration:0),t.push(r)}return t},c.Box.prototype.printHeader=function(e){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},c.FullBox.prototype.printHeader=function(e){this.size+=4,c.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},c.Box.prototype.print=function(e){this.printHeader(e)},c.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},c.tkhdBox.prototype.print=function(e){c.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var m={createFile:function(e,t){var i=void 0===e||e,r=new p(t);return r.discardMdatData=!i,r}};void 0!==i&&(i.createFile=m.createFile)},{}],145:[function(e,t,i){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"}},{}],146:[function(e,t,i){"use strict";var r=e("asn1.js");i.certificate=e("./certificate");var n=r.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())}));i.RSAPrivateKey=n;var a=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));i.RSAPublicKey=a;var s=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}));i.PublicKey=s;var o=r.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())})),l=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())}));i.PrivateKey=l;var f=r.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())}));i.EncryptedPrivateKey=f;var u=r.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())}));i.DSAPrivateKey=u,i.DSAparam=r.define("DSAparam",(function(){this.int()}));var c=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));i.ECPrivateKey=c;var h=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));i.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":147,"asn1.js":2}],147:[function(e,t,i){"use strict";var r=e("asn1.js"),n=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),o=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),l=r.define("RelativeDistinguishedName",(function(){this.setof(a)})),f=r.define("RDNSequence",(function(){this.seqof(l)})),u=r.define("Name",(function(){this.choice({rdnSequence:this.use(f)})})),c=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),h=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(u),this.key("validity").use(c),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),_=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=_},{"asn1.js":2}],148:[function(e,t,i){var r=/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,s=e("evp_bytestokey"),o=e("browserify-aes"),l=e("safe-buffer").Buffer;t.exports=function(e,t){var i,f=e.toString(),u=f.match(r);if(u){var c="aes"+u[1],h=l.from(u[2],"hex"),d=l.from(u[3].replace(/[\r\n]/g,""),"base64"),_=s(t,h.slice(0,8),parseInt(u[1],10)).key,p=[],m=o.createDecipheriv(c,_,h);p.push(m.update(d)),p.push(m.final()),i=l.concat(p)}else{var b=f.match(a);i=l.from(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:f.match(n)[1],data:i}}},{"browserify-aes":23,evp_bytestokey:105,"safe-buffer":184}],149:[function(e,t,i){var r=e("./asn1"),n=e("./aesid.json"),a=e("./fixProc"),s=e("browserify-aes"),o=e("pbkdf2"),l=e("safe-buffer").Buffer;function f(e){var t;"object"!=typeof e||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var i,f,u=a(e,t),c=u.tag,h=u.data;switch(c){case"CERTIFICATE":f=r.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=r.PublicKey.decode(h,"der")),i=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=r.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=n[e.algorithm.decrypt.cipher.algo.join(".")],f=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,c=parseInt(a.split("-")[1],10)/8,h=o.pbkdf2Sync(t,i,r,c,"sha1"),d=s.createDecipheriv(a,h,f),_=[];return _.push(d.update(u)),_.push(d.final()),l.concat(_)}(h=r.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(i=(f=r.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:r.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=r.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=r.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+c)}}t.exports=f,f.signature=r.signature},{"./aesid.json":145,"./asn1":146,"./fixProc":148,"browserify-aes":23,pbkdf2:151,"safe-buffer":184}],150:[function(e,t,i){(function(e){function t(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],r=0;r=-1&&!n;a--){var s=a>=0?arguments[a]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(i=s+"/"+i,n="/"===s.charAt(0))}return(n?"/":"")+(i=t(r(i.split("/"),(function(e){return!!e})),!n).join("/"))||"."},i.normalize=function(e){var a=i.isAbsolute(e),s="/"===n(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!a).join("/"))||a||(e="."),e&&s&&(e+="/"),(a?"/":"")+e},i.isAbsolute=function(e){return"/"===e.charAt(0)},i.join=function(){var e=Array.prototype.slice.call(arguments,0);return i.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},i.relative=function(e,t){function r(e){for(var t=0;t=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=i.resolve(e).substr(1),t=i.resolve(t).substr(1);for(var n=r(e.split("/")),a=r(t.split("/")),s=Math.min(n.length,a.length),o=s,l=0;l=1;--a)if(47===(t=e.charCodeAt(a))){if(!n){r=a;break}}else n=!1;return-1===r?i?"/":".":i&&1===r?"/":e.slice(0,r)},i.basename=function(e,t){var i=function(e){"string"!=typeof e&&(e+="");var t,i=0,r=-1,n=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!n){i=t+1;break}}else-1===r&&(n=!1,r=t+1);return-1===r?"":e.slice(i,r)}(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},i.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,i=0,r=-1,n=!0,a=0,s=e.length-1;s>=0;--s){var o=e.charCodeAt(s);if(47!==o)-1===r&&(n=!1,r=s+1),46===o?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!n){i=s+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===i+1?"":e.slice(t,r)};var n="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,e("_process"))},{_process:158}],151:[function(e,t,i){i.pbkdf2=e("./lib/async"),i.pbkdf2Sync=e("./lib/sync")},{"./lib/async":152,"./lib/sync":155}],152:[function(e,t,i){(function(i,r){var n,a=e("safe-buffer").Buffer,s=e("./precondition"),o=e("./default-encoding"),l=e("./sync"),f=e("./to-buffer"),u=r.crypto&&r.crypto.subtle,c={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function d(e,t,i,r,n){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:i,hash:{name:n}},e,r<<3)})).then((function(e){return a.from(e)}))}t.exports=function(e,t,_,p,m,b){"function"==typeof m&&(b=m,m=void 0);var v=c[(m=m||"sha1").toLowerCase()];if(!v||"function"!=typeof r.Promise)return i.nextTick((function(){var i;try{i=l(e,t,_,p,m)}catch(e){return b(e)}b(null,i)}));if(s(_,p),e=f(e,o,"Password"),t=f(t,o,"Salt"),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){i.nextTick((function(){t(null,e)}))}),(function(e){i.nextTick((function(){t(e)}))}))}(function(e){if(r.process&&!r.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var t=d(n=n||a.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return h[e]=t,t}(v).then((function(i){return i?d(e,t,_,p,v):l(e,t,_,p,m)})),b)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":153,"./precondition":154,"./sync":155,"./to-buffer":156,_process:158,"safe-buffer":184}],153:[function(e,t,i){(function(e){var i;if(e.browser)i="utf-8";else if(e.version){i=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else i="utf-8";t.exports=i}).call(this,e("_process"))},{_process:158}],154:[function(e,t,i){var r=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>r||t!=t)throw new TypeError("Bad key length")}},{}],155:[function(e,t,i){var r=e("create-hash/md5"),n=e("ripemd160"),a=e("sha.js"),s=e("safe-buffer").Buffer,o=e("./precondition"),l=e("./default-encoding"),f=e("./to-buffer"),u=s.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,i){var o=function(e){function t(t){return a(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?function(e){return(new n).update(e).digest()}:"md5"===e?r:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=o(t):t.length1)for(var i=1;i_||new s(t).cmp(d.modulus)>=0)throw new Error("decryption error");h=i?f(new s(t),d):o(t,d);var p=u.alloc(_-h.length);if(h=u.concat([p,h],_),4===c)return function(e,t){var i=e.modulus.byteLength(),r=l("sha1").update(u.alloc(0)).digest(),s=r.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,s+1),f=t.slice(s+1),c=a(o,n(f,s)),h=a(f,n(c,i-s-1));if(function(e,t){e=u.from(e),t=u.from(t);var i=0,r=e.length;e.length!==t.length&&(i++,r=Math.min(e.length,t.length));var n=-1;for(;++n=t.length){a++;break}var s=t.slice(2,n-1);("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&a++;s.length<8&&a++;if(a)throw new Error("decryption error");return t.slice(n)}(0,h,i);if(3===c)return h;throw new Error("unknown padding")}},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,"safe-buffer":184}],163:[function(e,t,i){var r=e("parse-asn1"),n=e("randombytes"),a=e("create-hash"),s=e("./mgf"),o=e("./xor"),l=e("bn.js"),f=e("./withPublic"),u=e("browserify-rsa"),c=e("safe-buffer").Buffer;t.exports=function(e,t,i){var h;h=e.padding?e.padding:i?1:4;var d,_=r(e);if(4===h)d=function(e,t){var i=e.modulus.byteLength(),r=t.length,f=a("sha1").update(c.alloc(0)).digest(),u=f.length,h=2*u;if(r>i-h-2)throw new Error("message too long");var d=c.alloc(i-r-h-2),_=i-u-1,p=n(u),m=o(c.concat([f,d,c.alloc(1,1),t],_),s(p,_)),b=o(p,s(m,u));return new l(c.concat([c.alloc(1),b,m],i))}(_,t);else if(1===h)d=function(e,t,i){var r,a=t.length,s=e.modulus.byteLength();if(a>s-11)throw new Error("message too long");r=i?c.alloc(s-a-3,255):function(e){var t,i=c.allocUnsafe(e),r=0,a=n(2*e),s=0;for(;r=0)throw new Error("data too long for modulus")}return i?u(d,_):f(d,_)}},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,randombytes:166,"safe-buffer":184}],164:[function(e,t,i){var r=e("bn.js"),n=e("safe-buffer").Buffer;t.exports=function(e,t){return n.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},{"bn.js":161,"safe-buffer":184}],165:[function(e,t,i){t.exports=function(e,t){for(var i=e.length,r=-1;++r4294967295)throw new RangeError("requested too many random bytes");var r=n.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;su||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function h(e,t,i){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>i||e>l)throw new RangeError("buffer too small")}function d(e,i,r,n){if(t.browser){var a=e.buffer,o=new Uint8Array(a,i,r);return f.getRandomValues(o),n?void t.nextTick((function(){n(null,e)})):e}if(!n)return s(r).copy(e,i),e;s(r,(function(t,r){if(t)return n(t);r.copy(e,i),n(null,e)}))}f&&f.getRandomValues||!t.browser?(i.randomFill=function(e,t,i,n){if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)n=t,t=0,i=e.length;else if("function"==typeof i)n=i,i=e.length-t;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return c(t,e.length),h(i,t,e.length),d(e,t,i,n)},i.randomFillSync=function(e,t,i){void 0===t&&(t=0);if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');c(t,e.length),void 0===i&&(i=e.length-t);return h(i,t,e.length),d(e,t,i)}):(i.randomFill=n,i.randomFillSync=n)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:158,randombytes:166,"safe-buffer":184}],168:[function(e,t,i){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":169}],169:[function(e,t,i){"use strict";var r=e("process-nextick-args"),n=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=c;var a=Object.create(e("core-util-is"));a.inherits=e("inherits");var s=e("./_stream_readable"),o=e("./_stream_writable");a.inherits(c,s);for(var l=n(o.prototype),f=0;f0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):j(e,s)):w(e,s,t,!1))):r||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(S,e):S(e))}function S(e){d("emit readable"),e.emit("readable"),M(e)}function j(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(T,e,t))}function T(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;ea.length?a.length:e;if(s===a.length?n+=a:n+=a.slice(0,e),0===(e-=s)){s===a.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(s));break}++r}return t.length-=r,n}(e,t):function(e,t){var i=f.allocUnsafe(e),r=t.head,n=1;r.data.copy(i),e-=r.data.length;for(;r=r.next;){var a=r.data,s=e>a.length?a.length:e;if(a.copy(i,i.length-e,0,s),0===(e-=s)){s===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break}++n}return t.length-=n,i}(e,t);return r}(e,t.buffer,t.decoder),i);var i}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(I,t,e))}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function R(e,t){for(var i=0,r=e.length;i=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):C(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&P(this),null;var r,n=t.needReadable;return d("need readable",n),(0===t.length||t.length-e0?k(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&P(this)),null!==r&&this.emit("data",r),r},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,t);var l=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:y;function f(t,i){d("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",c),e.removeListener("error",m),e.removeListener("unpipe",f),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",p),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function u(){d("onend"),e.end()}a.endEmitted?n.nextTick(l):r.once("end",l),e.on("unpipe",f);var c=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",c);var h=!1;var _=!1;function p(t){d("ondata"),_=!1,!1!==e.write(t)||_||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==R(a.pipes,e))&&!h&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,_=!0),r.pause())}function m(t){d("onerror",t),y(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),y()}function v(){d("onfinish"),e.removeListener("close",b),y()}function y(){d("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",m),e.once("close",b),e.once("finish",v),e.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a-1?n:a.nextTick;v.WritableState=b;var f=Object.create(e("core-util-is"));f.inherits=e("inherits");var u={deprecate:e("util-deprecate")},c=e("./internal/streams/stream"),h=e("safe-buffer").Buffer,d=r.Uint8Array||function(){};var _,p=e("./internal/streams/destroy");function m(){}function b(t,i){o=o||e("./_stream_duplex"),t=t||{};var r=i instanceof o;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,f=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(f||0===f)?f:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?(a.nextTick(n,r),a.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(n(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t))}(e,i,r,t,n);else{var s=E(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||w(e,i),r?l(g,e,i,s,n):g(e,i,s,n)}}(i,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 s(this)}function v(t){if(o=o||e("./_stream_duplex"),!(_.call(v,this)||this instanceof o))return new v(t);this._writableState=new b(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)),c.call(this)}function y(e,t,i,r,n,a,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function g(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),a=t.corkedRequestsFree;a.entry=i;for(var o=0,l=!0;i;)n[o]=i,i.isBuf||(l=!1),i=i.next,o+=1;n.allBuffers=l,y(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;i;){var f=i.chunk,u=i.encoding,c=i.callback;if(y(e,t,!1,t.objectMode?1:f.length,f,u,c),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var i=E(t);return i&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}f.inherits(v,c),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!_.call(this,e)||this===v&&(e&&e._writableState instanceof b)}})):_=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,i){var r,n=this._writableState,s=!1,o=!n.objectMode&&(r=e,h.isBuffer(r)||r instanceof d);return o&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(i=t,t=null),o?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof i&&(i=m),n.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),a.nextTick(t,i)}(this,i):(o||function(e,t,i,r){var n=!0,s=!1;return null===i?s=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),a.nextTick(r,s),n=!1),n}(this,n,e,i))&&(n.pendingcb++,s=function(e,t,i,r,n,a){if(!i){var s=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,i));return t}(t,r,n);r!==s&&(i=!0,n="buffer",r=s)}var o=t.objectMode?1:r.length;t.length+=o;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,S(e,t),i&&(t.finished?a.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,r,i)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=p.destroy,v.prototype._undestroy=p.undestroy,v.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":169,"./internal/streams/destroy":175,"./internal/streams/stream":176,_process:158,"core-util-is":68,inherits:136,"process-nextick-args":157,"safe-buffer":177,timers:196,"util-deprecate":197}],174:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,i,n,a=r.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,i=a,n=o,t.copy(i,n),o+=s.data.length,s=s.next;return a},e}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":177,util:20}],175:[function(e,t,i){"use strict";var r=e("process-nextick-args");function n(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var i=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(n,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(n,i,e),i._writableState&&(i._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":157}],176:[function(e,t,i){arguments[4][62][0].apply(i,arguments)},{dup:62,events:104}],177:[function(e,t,i){var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:66}],178:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=r.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}};function a(e){var t;switch(this.encoding=function(e){var t=function(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}}(e);if("string"!=typeof t&&(r.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=f,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=u,this.end=c,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,i=function(e,t,i){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,"�"}}(this,e);return void 0!==i?i: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 l(e,t){if((e.length-t)%2==0){var i=e.toString("utf16le",t);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function u(e,t){var i=(e.length-t)%3;return 0===i?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?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-i))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}i.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i=0)return n>0&&(e.lastNeed=n-1),n;if(--r=0)return n>0&&(e.lastNeed=n-2),n;if(--r=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var r=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},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":177}],179:[function(e,t,i){t.exports=e("./readable").PassThrough},{"./readable":180}],180:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":169,"./lib/_stream_passthrough.js":170,"./lib/_stream_readable.js":171,"./lib/_stream_transform.js":172,"./lib/_stream_writable.js":173}],181:[function(e,t,i){t.exports=e("./readable").Transform},{"./readable":180}],182:[function(e,t,i){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":173}],183:[function(e,t,i){"use strict";var r=e("buffer").Buffer,n=e("inherits"),a=e("hash-base"),s=new Array(16),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],c=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function _(e,t){return e<>>32-t}function p(e,t,i,r,n,a,s,o){return _(e+(t^i^r)+a+s|0,o)+n|0}function m(e,t,i,r,n,a,s,o){return _(e+(t&i|~t&r)+a+s|0,o)+n|0}function b(e,t,i,r,n,a,s,o){return _(e+((t|~i)^r)+a+s|0,o)+n|0}function v(e,t,i,r,n,a,s,o){return _(e+(t&r|i&~r)+a+s|0,o)+n|0}function y(e,t,i,r,n,a,s,o){return _(e+(t^(i|~r))+a+s|0,o)+n|0}n(d,a),d.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var i=0|this._a,r=0|this._b,n=0|this._c,a=0|this._d,d=0|this._e,g=0|this._a,w=0|this._b,E=0|this._c,C=0|this._d,S=0|this._e,j=0;j<80;j+=1){var T,A;j<16?(T=p(i,r,n,a,d,e[o[j]],c[0],f[j]),A=y(g,w,E,C,S,e[l[j]],h[0],u[j])):j<32?(T=m(i,r,n,a,d,e[o[j]],c[1],f[j]),A=v(g,w,E,C,S,e[l[j]],h[1],u[j])):j<48?(T=b(i,r,n,a,d,e[o[j]],c[2],f[j]),A=b(g,w,E,C,S,e[l[j]],h[2],u[j])):j<64?(T=v(i,r,n,a,d,e[o[j]],c[3],f[j]),A=m(g,w,E,C,S,e[l[j]],h[3],u[j])):(T=y(i,r,n,a,d,e[o[j]],c[4],f[j]),A=p(g,w,E,C,S,e[l[j]],h[4],u[j])),i=d,d=a,a=_(n,10),n=r,r=T,g=S,S=C,C=_(E,10),E=w,w=A}var x=this._b+n+C|0;this._b=this._c+a+S|0,this._c=this._d+d+g|0,this._d=this._e+i+w|0,this._e=this._a+r+E|0,this._a=x},d.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=r.alloc?r.alloc(20):new r(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=d},{buffer:66,"hash-base":106,inherits:136}],184:[function(e,t,i){ -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),s.prototype=Object.create(n.prototype),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:66}],185:[function(e,t,i){(function(i){"use strict";var r,n=e("buffer"),a=n.Buffer,s={};for(r in n)n.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(s[r]=n[r]);var o=s.Buffer={};for(r in a)a.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(o[r]=a[r]);if(s.Buffer.prototype=a.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(e,t,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return a(e,t,i)}),o.alloc||(o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=a(e);return t&&0!==t.length?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r}),!s.kStringMaxLength)try{s.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),t.exports=s}).call(this,e("_process"))},{_process:158,buffer:66}],186:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var i=this._block,n=this._blockSize,a=e.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},{"safe-buffer":184}],187:[function(e,t,i){(i=t.exports=function(e){e=e.toLowerCase();var t=i[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),i.sha1=e("./sha1"),i.sha224=e("./sha224"),i.sha256=e("./sha256"),i.sha384=e("./sha384"),i.sha512=e("./sha512")},{"./sha":188,"./sha1":189,"./sha224":190,"./sha256":191,"./sha384":192,"./sha512":193}],188:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e){return e<<30|e>>>2}function u(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,c=0;c<16;++c)i[c]=e.readInt32BE(4*c);for(;c<80;++c)i[c]=i[c-3]^i[c-8]^i[c-14]^i[c-16];for(var h=0;h<80;++h){var d=~~(h/20),_=0|((t=r)<<5|t>>>27)+u(d,n,a,o)+l+i[h]+s[d];l=o,o=a,a=f(n),n=r,r=_}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],189:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function c(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,h=0;h<16;++h)i[h]=e.readInt32BE(4*h);for(;h<80;++h)i[h]=(t=i[h-3]^i[h-8]^i[h-14]^i[h-16])<<1|t>>>31;for(var d=0;d<80;++d){var _=~~(d/20),p=f(r)+c(_,n,a,o)+l+i[d]+s[_]|0;l=o,o=a,a=u(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],190:[function(e,t,i){var r=e("inherits"),n=e("./sha256"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(64);function l(){this.init(),this._w=o,a.call(this,64,56)}r(l,n),l.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},l.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=l},{"./hash":186,"./sha256":191,inherits:136,"safe-buffer":184}],191:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],o=new Array(64);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e,t,i){return i^e&(t^i)}function u(e,t,i){return e&t|i&(e|t)}function c(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(l,n),l.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},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,_=0|this._f,p=0|this._g,m=0|this._h,b=0;b<16;++b)i[b]=e.readInt32BE(4*b);for(;b<64;++b)i[b]=0|(((t=i[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+i[b-7]+d(i[b-15])+i[b-16];for(var v=0;v<64;++v){var y=m+h(l)+f(l,_,p)+s[v]+i[v]|0,g=c(r)+u(r,n,a)|0;m=p,p=_,_=l,l=o+y|0,o=a,a=n,n=r,r=y+g|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0,this._f=_+this._f|0,this._g=p+this._g|0,this._h=m+this._h|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],192:[function(e,t,i){var r=e("inherits"),n=e("./sha512"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(160);function l(){this.init(),this._w=o,a.call(this,128,112)}r(l,n),l.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},l.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=l},{"./hash":186,"./sha512":193,inherits:136,"safe-buffer":184}],193:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=new Array(160);function l(){this.init(),this._w=o,n.call(this,128,112)}function f(e,t,i){return i^e&(t^i)}function u(e,t,i){return e&t|i&(e|t)}function c(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function _(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function b(e,t){return e>>>0>>0?1:0}r(l,n),l.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},l.prototype._update=function(e){for(var t=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,a=0|this._dh,o=0|this._eh,l=0|this._fh,v=0|this._gh,y=0|this._hh,g=0|this._al,w=0|this._bl,E=0|this._cl,C=0|this._dl,S=0|this._el,j=0|this._fl,T=0|this._gl,A=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var M=t[x-30],k=t[x-30+1],P=d(M,k),I=_(k,M),R=p(M=t[x-4],k=t[x-4+1]),U=m(k,M),D=t[x-14],F=t[x-14+1],O=t[x-32],L=t[x-32+1],B=I+F|0,N=P+D+b(B,I)|0;N=(N=N+R+b(B=B+U|0,U)|0)+O+b(B=B+L|0,L)|0,t[x]=N,t[x+1]=B}for(var z=0;z<160;z+=2){N=t[z],B=t[z+1];var H=u(i,r,n),V=u(g,w,E),Y=c(i,g),q=c(g,i),X=h(o,S),W=h(S,o),G=s[z],K=s[z+1],Q=f(o,l,v),Z=f(S,j,T),J=A+W|0,$=y+X+b(J,A)|0;$=($=($=$+Q+b(J=J+Z|0,Z)|0)+G+b(J=J+K|0,K)|0)+N+b(J=J+B|0,B)|0;var ee=q+V|0,te=Y+H+b(ee,q)|0;y=v,A=T,v=l,T=j,l=o,j=S,o=a+$+b(S=C+J|0,C)|0,a=n,C=E,n=r,E=w,r=i,w=g,i=$+te+b(g=J+ee|0,J)|0}this._al=this._al+g|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+C|0,this._el=this._el+S|0,this._fl=this._fl+j|0,this._gl=this._gl+T|0,this._hl=this._hl+A|0,this._ah=this._ah+i+b(this._al,g)|0,this._bh=this._bh+r+b(this._bl,w)|0,this._ch=this._ch+n+b(this._cl,E)|0,this._dh=this._dh+a+b(this._dl,C)|0,this._eh=this._eh+o+b(this._el,S)|0,this._fh=this._fh+l+b(this._fl,j)|0,this._gh=this._gh+v+b(this._gl,T)|0,this._hh=this._hh+y+b(this._hl,A)|0},l.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=l},{"./hash":186,inherits:136,"safe-buffer":184}],194:[function(e,t,i){t.exports=n;var r=e("events").EventEmitter;function n(){r.call(this)}e("inherits")(n,r),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function a(){i.readable&&i.resume&&i.resume()}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",o),i.on("close",l));var s=!1;function o(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",o),i.removeListener("close",l),i.removeListener("error",f),e.removeListener("error",f),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",f),e.on("error",f),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e}},{events:104,inherits:136,"readable-stream/duplex.js":168,"readable-stream/passthrough.js":179,"readable-stream/readable.js":180,"readable-stream/transform.js":181,"readable-stream/writable.js":182}],195:[function(e,t,i){arguments[4][178][0].apply(i,arguments)},{dup:178,"safe-buffer":184}],196:[function(e,t,i){(function(t,r){var n=e("process/browser.js").nextTick,a=Function.prototype.apply,s=Array.prototype.slice,o={},l=0;function f(e,t){this._id=e,this._clearFn=t}i.setTimeout=function(){return new f(a.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new f(a.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(e){e.close()},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},i.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},i._unrefActive=i.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},i.setImmediate="function"==typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&s.call(arguments,1);return o[t]=!0,n((function(){o[t]&&(r?e.apply(null,r):e.call(null),i.clearImmediate(t))})),t},i.clearImmediate="function"==typeof r?r:function(e){delete o[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":158,timers:196}],197:[function(e,t,i){(function(e){function i(t){try{if(!e.localStorage)return!1}catch(e){return!1}var i=e.localStorage[t];return null!=i&&"true"===String(i).toLowerCase()}t.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")&&console.trace(t),r=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],198:[function(e,t,i){"use strict";t.exports={DEFAILT_WEBGL_PLAY_ID:"glplayer",PLAYER_IN_TYPE_MP4:"mp4",PLAYER_IN_TYPE_FLV:"flv",PLAYER_IN_TYPE_HTTPFLV:"httpflv",PLAYER_IN_TYPE_RAW_265:"raw265",PLAYER_IN_TYPE_TS:"ts",PLAYER_IN_TYPE_MPEGTS:"mpegts",PLAYER_IN_TYPE_M3U8:"hls",PLAYER_IN_TYPE_M3U8_VOD:"m3u8",PLAYER_IN_TYPE_M3U8_LIVE:"hls",APPEND_TYPE_STREAM:0,APPEND_TYPE_FRAME:1,APPEND_TYPE_SEQUENCE:2,DEFAULT_WIDTH:600,DEFAULT_HEIGHT:600,DEFAULT_FPS:25,DEFAULT_FRAME_DUR:40,DEFAULT_FIXED:!1,DEFAULT_SAMPLERATE:44100,DEFAULT_CHANNELS:2,DEFAULT_CONSU_SAMPLE_LEN:20,PLAYER_MODE_VOD:"vod",PLAYER_MODE_NOTIME_LIVE:"live",AUDIO_MODE_ONCE:"ONCE",AUDIO_MODE_SWAP:"SWAP",DEFAULT_STRING_LIVE:"LIVE",CODEC_H265:0,CODEC_H264:1,PLAYER_CORE_TYPE_DEFAULT:0,PLAYER_CORE_TYPE_CNATIVE:1,V_CODEC_NAME_HEVC:265,V_CODEC_NAME_AVC:264,V_CODEC_NAME_UNKN:500,A_CODEC_NAME_AAC:112,A_CODEC_NAME_MP3:113,A_CODEC_NAME_UNKN:500,CACHE_NO_LOADCACHE:192,CACHE_WITH_PLAY_SIGN:193,CACHE_WITH_NOPLAY_SIGN:194}},{}],199:[function(e,t,i){"use strict";var r=window.AudioContext||window.webkitAudioContext,n=e("../consts"),a=function(){return(new Date).getTime()};t.exports=function(e){var t={options:{sampleRate:e.sampleRate||n.DEFAULT_SAMPLERATE,appendType:e.appendType||n.APPEND_TYPE_STREAM,playMode:e.playMode||n.AUDIO_MODE_SWAP},sourceChannel:-1,audioCtx:new r({latencyHint:"interactive",sampleRate:e.sampleRate}),gainNode:null,sourceList:[],startStatus:!1,sampleQueue:[],nextBuffer:null,playTimestamp:0,playStartTime:0,durationMs:-1,voice:1,onLoadCache:null,resetStartParam:function(){t.playTimestamp=0,t.playStartTime=0},setOnLoadCache:function(e){t.onLoadCache=e},setDurationMs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e},setVoice:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.voice=e,t.gainNode.gain.value=e},getAlignVPTS:function(){return t.playTimestamp+(a()-t.playStartTime)/1e3},swapSource:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==t.startStatus)return null;if(e<0||e>=t.sourceList.length)return null;if(i<0||i>=t.sourceList.length)return null;try{t.sourceChannel===e&&null!==t.sourceList[e]&&(t.sourceList[e].disconnect(t.gainNode),t.sourceList[e]=null)}catch(e){}t.sourceChannel=i;var r=t.decodeSample(i,e);-2==r&&(t.getAlignVPTS()>=t.durationMs/1e3-.04?t.pause():null!==t.onLoadCache&&t.onLoadCache())},addSample:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!(null==e||!e||null==e)&&(0==t.sampleQueue.length&&(t.seekPos=e.pts),t.sampleQueue.push(e),!0)},runNextBuffer:function(){window.setInterval((function(){if(!(null!=t.nextBuffer||t.sampleQueue.length0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){t.swapSource(e,i)}),0==t.sampleQueue.length)return-2;if(t.sourceList[e].buffer)return t.sourceList[e],t.sourceList[i],t.gainNode,t.swapSource(e,i),0;if(null==t.nextBuffer||t.nextBuffer.data.length<1)return t.sourceList[e].context.state,t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0,t.sourceList[e].stop(),t.sourceList[e].context.state,1;var r=t.nextBuffer.data.buffer;t.playTimestamp=t.nextBuffer.pts,t.playStartTime=a();try{t.audioCtx.decodeAudioData(r,(function(i){null!==t.sourceList[e]&&(t.sourceList[e].buffer=i,t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0)}),(function(e){}))}catch(e){return t.nextBuffer=null,-3}return t.nextBuffer=null,0},decodeWholeSamples:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(t.sourceChannel=e,e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){}),0==t.sampleQueue.length)return-2;for(var i=null,r=null,a=0;a=2){var s=i.length/2;a=new Float32Array(s);for(var o=0,l=0;l0&&s()-this._start_time>=this._now_seg_dur&&(s(),this._start_time,this._now_seg_dur,this._start_time=-1,this._now_seg_dur=-1),s(),this._start_time<0)if(new Date,null!==this._pcm_array_buf&&this._pcm_array_buf.length>this._push_start_idx){this._swapStartPlay=!1;var e=this._push_start_idx+this._once_pop_len;e>this._pcm_array_buf.length&&(e=this._pcm_array_buf.length);var t=this._pcm_array_buf.slice(this._push_start_idx,e);this._push_start_idx+=t.length,this._now_seg_dur=1*t.length/this._sample_rate*1e3,t.length,this._sample_rate,this._now_seg_dur;var i=this._ctx.createBuffer(1,t.length,this._sample_rate);t.length,new Date,i.copyToChannel(t,0),this._active_node=this._ctx.createBufferSource(),this._active_node.buffer=i,this._active_node.connect(this._gain),this._start_time=s(),this._active_node.start(0)}else setTimeout(this.readingLoopWithF32,1)}}])&&r(t.prototype,i),o&&r(t,o),e}();i.AudioPcmPlayer=o},{"../consts":198}],201:[function(e,t,i){"use strict";var r=e("../consts"),n=[{format:"mp4",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"mov",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"flv",value:"flv",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"m3u8",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"m3u",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"ts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"mpegts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"hevc",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"h265",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT}];t.exports={frameDataAlignCrop:function(e,t,i,r,n,a,s,o){if(0==e-r)return[a,s,o];for(var l=r*n,f=l/4,u=new Uint8Array(l),c=new Uint8Array(f),h=new Uint8Array(f),d=r,_=r/2,p=0;p=0)return i.value}return n[0].value},GetFormatPlayCore:function(e){for(var t=0;t0&&void 0!==arguments[0]&&arguments[0];this.showScreen=e,this.canvas&&(e?this.canvas.setAttribute("hidden",!0):this.canvas.removeAttribute("hidden"))}},{key:"getCachePTS",value:function(){return 1!==this.config.ignoreAudio&&this.audioWAudio?Math.max(this.vCachePTS,this.aCachePTS):this.vCachePTS}},{key:"getMaxPTS",value:function(){return Math.max(this.vCachePTS,this.aCachePTS)}},{key:"isPlayingState",value:function(){return this.isPlaying}},{key:"pushDone",value:function(){this.pushEOF=!0}},{key:"_clearDecInterval",value:function(){this.decVFrameInterval&&window.clearInterval(this.decVFrameInterval),this.decVFrameInterval=null}},{key:"_checkPlayFinished",value:function(){return!(this.config.playMode!==u.PLAYER_MODE_VOD||!(!0===this.bufRecvStat&&(this.playPTS>=this.bufLastVDTS||this.audioWAudio&&this.playPTS>=this.bufLastADTS)||this.duration-this.playPTS0&&(this.isPlaying=!0);var t=0,i=0,r=0;this.config.playMode===u.PLAYER_MODE_NOTIME_LIVE?this.playFrameInterval=window.setInterval((function(){if(e._videoQueue.length>0){var t=e._videoQueue.shift();t.pts,l.renderFrame(e.yuv,t.data_y,t.data_u,t.data_v,t.line1,t.height)}}),1e3*this.frameDur):this.playFrameInterval=window.setInterval((function(){if(i=h(),e._videoQueue.length>0&&i-t>=e.frameTime-r){var n=e._videoQueue.shift(),a=0;if(e.isNewSeek||null===e.audioWAudio||void 0===e.audioWAudio||(a=1e3*(n.pts-e.audioWAudio.getAlignVPTS()),e.playPTS=Math.max(e.audioWAudio.getAlignVPTS(),e.playPTS)),t=i,h(),e.playPTS=Math.max(n.pts,e.playPTS),e.isNewSeek&&e.seekTarget-e.frameDur>n.pts)return void(r=e.frameTime);if(e.isNewSeek&&(e.audioWAudio&&e.audioWAudio.setVoice(e.audioVoice),e.audioWAudio&&e.audioWAudio.play(),r=0,e.isNewSeek=!1,e.seekTarget=0),e.showScreen?e.onRender&&e.onRender(n.line1,n.height,n.data_y,n.data_u,n.data_v):(n.pts,l.renderFrame(e.yuv,n.data_y,n.data_u,n.data_v,n.line1,n.height)),e.onPlayingTime&&e.onPlayingTime(n.pts),!e.isNewSeek&&e.audioWAudio&&(a<0&&-1*a<=e.frameTime||a>=0)){if(e.config.playMode===u.PLAYER_MODE_VOD)if(n.pts>=e.duration)e.onLoadCacheFinshed&&e.onLoadCacheFinshed(),e.onPlayingFinish&&e.onPlayingFinish(),e._clearDecInterval(),e.pause();else if(e._checkPlayFinished())return;r=h()-i}else!e.isNewSeek&&e.audioWAudio&&(a<0&&e.frameTime,r=e.frameTime)}e._checkPlayFinished()}),1)}this.isNewSeek||this.audioWAudio&&this.audioWAudio.play()}},{key:"pause",value:function(){this.isPlaying=!1,this._pause()}},{key:"_pause",value:function(){this.playFrameInterval&&window.clearInterval(this.playFrameInterval),this.playFrameInterval=null,this.audioWAudio&&this.audioWAudio.pause()}},{key:"seek",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.openFrameCall=!1,this.pause(),this._clearDecInterval(),null!==this.avFeedVideoInterval&&(window.clearInterval(this.avFeedVideoInterval),this.avFeedVideoInterval=null),null!==this.avFeedAudioInterval&&(window.clearInterval(this.avFeedAudioInterval),this.avFeedAudioInterval=null),this.yuvMaxTime=0,this.playVPipe.length=0,this._videoQueue.length=0,this.audioWAudio&&this.audioWAudio.stop(),e&&e(),this.isNewSeek=!0,this.avSeekVState=!0,this.seekTarget=i.seekTime,null!==this.audioWAudio&&void 0!==this.audioWAudio&&(this.audioWAudio.setVoice(0),this.audioWAudio.resetStartParam(),this.audioWAudio.stop()),this._avFeedData(i.seekTime),setTimeout((function(){t.yuvMaxTime=0,t._videoQueue.length=0,t.openFrameCall=!0,t.frameCallTag+=1,t._decVFrameIntervalFunc()}),1e3)}},{key:"setVoice",value:function(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e)}},{key:"cacheIsFull",value:function(){return this._videoQueue.length>=50}},{key:"_checkDisplaySize",value:function(e,t,i){var r=t-e,n=this.config.width+Math.ceil(r/2),a=t/this.config.width>i/this.config.height,s=(n/t).toFixed(2),o=(this.config.height/i).toFixed(2),l=a?s:o,f=this.config.fixed,u=f?n:parseInt(t*l),c=f?this.config.height:parseInt(i*l);if(this.canvas.offsetWidth!=u||this.canvas.offsetHeight!=c){var h=parseInt((this.canvasBox.offsetHeight-c)/2),d=parseInt((this.canvasBox.offsetWidth-u)/2);h=h<0?0:h,d=d<0?0:d,this.canvas.style.marginTop=h+"px",this.canvas.style.marginLeft=d+"px",this.canvas.style.width=u+"px",this.canvas.style.height=c+"px"}return this.isCheckDisplay=!0,[u,c]}},{key:"_createYUVCanvas",value:function(){this.canvasBox=document.querySelector("#"+this.config.playerId),this.canvasBox.style.overflow="hidden",this.canvas=document.createElement("canvas"),this.canvas.style.width=this.canvasBox.clientWidth+"px",this.canvas.style.height=this.canvasBox.clientHeight+"px",this.canvas.style.top="0px",this.canvas.style.left="0px",this.canvasBox.appendChild(this.canvas),this.yuv=l.setupCanvas(this.canvas,{preserveDrawingBuffer:!1})}},{key:"_avRecvPackets",value:function(){var e=this;this.bufObject.cleanPipeline(),null!==this.avRecvInterval&&(window.clearInterval(this.avRecvInterval),this.avRecvInterval=null),!0===this.config.checkProbe?this.avRecvInterval=window.setInterval((function(){a.cwrap("getSniffStreamPkg","number",["number"])(e.corePtr),e._avCheckRecvFinish()}),5):this.avRecvInterval=window.setInterval((function(){a.cwrap("getSniffStreamPkgNoCheckProbe","number",["number"])(e.corePtr),e._avCheckRecvFinish()}),5),this._avFeedData(0,!1)}},{key:"_avCheckRecvFinish",value:function(){this.config.playMode===u.PLAYER_MODE_VOD&&this.duration-this.getMaxPTS()=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),t.play(),window.clearInterval(i),i=null)}),10);return!0}},{key:"_afterAvFeedSeekToStartWithUnFinBuffer",value:function(e){var t=this,i=window.setInterval((function(){t._videoQueue.length,t._videoQueue.length>=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),!1===t.reFull?t.play():t.reFull=!1,window.clearInterval(i),i=null)}),10);return!0}},{key:"_avFeedData",value:function(e){var t=this;if(this.playVPipe.length=0,this.audioWAudio&&this.audioWAudio.cleanQueue(),e<=0&&!1===this.bufOK){var i=0;if(this.avFeedVideoInterval=window.setInterval((function(){var r=t.bufObject.videoBuffer.length;if(r-1>i||t.duration-t.getMaxPTS()0){for(var a=0;a0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.bufLastVDTS,t.bufObject.videoBuffer,t.playVPipe)}else t.config.playMode===u.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.duration,t.bufObject.videoBuffer,t.playVPipe);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===u.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithFinishedBuffer(e),t.avSeekVState=!1))}),5),void 0!==this.audioWAudio&&null!==this.audioWAudio&&this.config.ignoreAudio<1){var r=0;this.avFeedAudioInterval=window.setInterval((function(){var e=t.bufObject.audioBuffer.length;if(e-1>r||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer)}else t.config.playMode===u.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer)}),5)}}else{var n=this.bufObject.seekIDR(e),a=parseInt(n,10);this.playPTS=0;var o=a;if(this.avFeedVideoInterval=window.setInterval((function(){var i=t.bufObject.videoBuffer.length;if(i-1>o||t.duration-t.getMaxPTS()0){for(var n=0;n0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null)}else t.config.playMode===u.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===u.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithUnFinBuffer(e),t.avSeekVState=!1))}),5),this.audioWAudio&&this.config.ignoreAudio<1){var l=parseInt(e,10);this.avFeedAudioInterval=window.setInterval((function(){var e=t.bufObject.audioBuffer.length;if(e-1>l||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null)}else t.config.playMode===u.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null)}),5)}}}},{key:"_probeFinCallback",value:function(e,t,i,r,n,s,o,l,c){var h=this;this._createYUVCanvas(),u.V_CODEC_NAME_HEVC,this.config.fps=1*r,this.frameTime=1e3/this.config.fps,this.width=t,this.height=i,this.frameDur=1/this.config.fps,this.duration=e-this.frameDur,this.vCodecID=l,this.config.sampleRate=s,this.channels=o,this.audioIdx=n,this.duration<0&&(this.config.playMode=u.PLAYER_MODE_NOTIME_LIVE,this.frameTime,this.frameDur);for(var d=a.HEAPU8.subarray(c,c+10),_=0;_=0&&this.config.ignoreAudio<1?(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.audioWAudio=f({sampleRate:s,appendType:u.APPEND_TYPE_FRAME}),this.audioWAudio.setDurationMs(1e3*e),this.onLoadCache&&this.audioWAudio.setOnLoadCache((function(){if(h.retryAuSampleNo,h.retryAuSampleNo<=5){h.pause(),h.onLoadCache&&h.onLoadCache();var e=window.setInterval((function(){return h.retryAuSampleNo,h.audioWAudio.sampleQueue.length,h.audioWAudio.sampleQueue.length>2?(h.onLoadCacheFinshed&&h.onLoadCacheFinshed(),h.play(),h.retryAuSampleNo=0,window.clearInterval(e),void(e=null)):(h.retryAuSampleNo+=1,h.retryAuSampleNo>5?(h.play(),h.onLoadCacheFinshed&&h.onLoadCacheFinshed(),window.clearInterval(e),void(e=null)):void 0)}),1e3)}}))):this.audioNone=!0,this._avRecvPackets(),this._decVFrameIntervalFunc()),this.onProbeFinish&&this.onProbeFinish()}},{key:"_ptsFixed2",value:function(e){return Math.ceil(100*e)/100}},{key:"_naluCallback",value:function(e,t,i,r,n,s,o){var l=this._ptsFixed2(s),f=a.HEAPU8.subarray(e,e+t),u=new Uint8Array(f);this.bufObject.appendFrameWithDts(l,o,u,!0,i),this.bufLastVDTS=Math.max(o,this.bufLastVDTS),this.vCachePTS=Math.max(l,this.vCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS())}},{key:"_samplesCallback",value:function(e,t,i,r){}},{key:"_aacFrameCallback",value:function(e,t,i,r,n){var s=this._ptsFixed2(n);if(this.audioWAudio){var o=new Uint8Array(7+i),l=a.HEAPU8.subarray(e,e+7);o.set(l,0);var f=a.HEAPU8.subarray(t,t+i);o.set(f,7),this.bufObject.appendFrame(s,o,!1,!0),this.bufLastADTS=Math.max(s,this.bufLastADTS),this.aCachePTS=Math.max(s,this.aCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS())}}},{key:"_decVFrameIntervalFunc",value:function(){var e=this;null==this.decVFrameInterval&&(this.decVFrameInterval=window.setInterval((function(){if(e._videoQueue.length<50&&e.playVPipe.length>0){var t=e.playVPipe.shift(),i=t.data,r=a._malloc(i.length);a.HEAP8.set(i,r);var n=parseInt(1e3*t.pts,10),s=parseInt(1e3*t.dts,10);e.yuvMaxTime=Math.max(t.pts,e.yuvMaxTime),a.cwrap("decodeVideoFrame","number",["number","number","number","number","number"])(e.corePtr,r,i.length,n,s,e.frameCallTag),a._free(r),r=null}}),10))}},{key:"_frameCallback",value:function(e,t,i,r,n,s,o,f,u,c){if(this._videoQueue.length,!(!1===this.openFrameCall||c!==this.frameCallTag||u>this.yuvMaxTime+this.frameDur||this.isNewSeek&&this.seekTarget-u>3*this.frameDur)){var h=this._videoQueue.length;if(this.canvas.width==r&&this.canvas.height==f||(this.canvas.width=r,this.canvas.height=f,this.isCheckDisplay)||this._checkDisplaySize(o,r,f),!(this.playPTS>u)){var _=a.HEAPU8.subarray(e,e+r*f),p=a.HEAPU8.subarray(t,t+n*f/2),m=a.HEAPU8.subarray(i,i+s*f/2),b=new Uint8Array(_),v=new Uint8Array(p),y=new Uint8Array(m);this.config.readyShow&&(l.renderFrame(this.yuv,b,v,y,r,f),this.config.readyShow=!1,this.onReadyShowDone&&this.onReadyShowDone());var g=new d(b,v,y,r,n,s,o,f,u);if(h<=0||u>this._videoQueue[h-1].pts)this._videoQueue.push(g);else if(uthis._videoQueue[w].pts&&w+10&&void 0!==arguments[0]?arguments[0]:60,t={limit:e,yuvCache:[],appendCacheByCacheYuv:function(e){e.pts;return t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.OVERFLOW:(t.yuvCache.push(e),t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL)},getState:function(){return t.yuvCache.length<=0?CACHE_APPEND_STATUS_CODE.NULL:t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL},cleanPipeline:function(){t.yuvCache.length=0},vYuv:function(){return t.yuvCache.length<=0?null:t.yuvCache.shift()}};return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./cacheYuv":204}],204:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i>1;return n.indexOf(t)},GET_NALU_TYPE:function(e){var t=(126&e)>>1;if(t>=1&&t<=9)return r.DEFINE_P_FRAME;if(t>=16&&t<=21)return r.DEFINE_KEY_FRAME;var i=n.indexOf(t);return i>=0?n[i]:r.DEFINE_OTHERS_FRAME},PACK_NALU:function(e){var t=e.nalu,i=e.vlc.vlc;null==t.vps&&(t.vps=new Uint8Array);var r=new Uint8Array(t.vps.length+t.sps.length+t.pps.length+t.sei.length+i.length);return r.set(t.vps,0),r.set(t.sps,t.vps.length),r.set(t.pps,t.vps.length+t.sps.length),r.set(t.sei,t.vps.length+t.sps.length+t.pps.length),r.set(i,t.vps.length+t.sps.length+t.pps.length+t.sei.length),r}}},{"./hevc-header":205}],207:[function(e,t,i){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t0&&void 0!==arguments[0]&&arguments[0];null!=t&&(t.showScreen=e,t.canvas&&(e?t.canvas.setAttribute("hidden",!0):t.canvas.removeAttribute("hidden")))},setSize:function(e,i){t.config.width=e||f.DEFAULT_WIDTH,t.config.height=i||f.DEFAULT_HEIGHT},setFrameRate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:25;t.config.fps=e,t.config.frameDurMs=1e3/e},setDurationMs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e,0==t.config.audioNone&&t.audio.setDurationMs(e)},setPlayingCall:function(e){t.onPlayingTime=e},setVoice:function(e){t.realVolume=e,0==t.config.audioNone&&t.audio.setVoice(t.realVolume)},isPlayingState:function(){return t.isPlaying||t.isCaching===f.CACHE_WITH_PLAY_SIGN},appendAACFrame:function(e){t.audio.addSample(e),t.aCachePTS=Math.max(e.pts,t.aCachePTS)},appendHevcFrame:function(e){var i;t.config.appendHevcType==f.APPEND_TYPE_STREAM?t.stream=new Uint8Array((i=r(t.stream)).concat.apply(i,r(e))):t.config.appendHevcType==f.APPEND_TYPE_FRAME&&(t.frameList.push(e),t.vCachePTS=Math.max(e.pts,t.vCachePTS))},getCachePTS:function(){return Math.max(t.vCachePTS,t.aCachePTS)},endAudio:function(){0==t.config.audioNone&&t.audio.stop()},cleanSample:function(){0==t.config.audioNone&&t.audio.cleanQueue()},cleanVideoQueue:function(){t.config.appendHevcType==f.APPEND_TYPE_STREAM?t.stream=new Uint8Array:t.config.appendHevcType==f.APPEND_TYPE_FRAME&&(t.frameList=[],t.frameList.length=0)},cleanCacheYUV:function(){t.cacheYuvBuf.cleanPipeline()},pause:function(){t.loop&&window.clearInterval(t.loop),t.loop=null,0==t.config.audioNone&&t.audio.pause(),t.isPlaying=!1,t.isCaching===f.CACHE_WITH_PLAY_SIGN&&(t.isCaching=f.CACHE_WITH_NOPLAY_SIGN)},checkFinished:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.PLAYER_MODE_VOD;return e==f.PLAYER_MODE_VOD&&t.cacheYuvBuf.yuvCache.length<=0&&(t.videoPTS.toFixed(1)>=(t.durationMs-t.config.frameDurMs)/1e3||t.noCacheFrame>=10)&&(null!=t.onPlayingFinish&&(f.PLAYER_MODE_VOD,t.frameList.length,t.cacheYuvBuf.yuvCache.length,t.videoPTS.toFixed(1),t.durationMs,t.config.frameDurMs,t.noCacheFrame,t.onPlayingFinish()),!0)},clearAllCache:function(){t.nowPacket=null,t.vCachePTS=0,t.aCachePTS=0,t.cleanSample(),t.cleanVideoQueue(),t.cleanCacheYUV()},seek:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.isPlaying;t.pause(),t.stopCacheThread(),t.clearAllCache(),e&&e(),t.isNewSeek=!0,t.flushDecoder=1,t.videoPTS=parseInt(i.seekTime);var n={seekPos:i.seekTime||-1,mode:i.mode||f.PLAYER_MODE_VOD,accurateSeek:i.accurateSeek||!0,seekEvent:i.seekEvent||!0,realPlay:r};t.cacheThread(),t.play(n)},getNalu1Packet:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=null,r=-1;if(t.config.appendHevcType==f.APPEND_TYPE_STREAM)i=t.nextNalu();else{if(t.config.appendHevcType!=f.APPEND_TYPE_FRAME)return null;var n=t.frameList.shift();if(!n)return null;i=n.data,r=n.pts,e&&(t.videoPTS=r)}return{nalBuf:i,pts:r}},decodeNalu1Frame:function(e,i){var r=n._malloc(e.length);n.HEAP8.set(e,r);var a=parseInt(1e3*i);n.cwrap("decodeCodecContext","number",["number","number","number","number","number"])(t.vcodecerPtr,r,e.length,a,t.flushDecoder);return t.flushDecoder=0,n._free(r),!1},cacheThread:function(){t.cacheLoop=window.setInterval((function(){if(t.cacheYuvBuf.getState()!=CACHE_APPEND_STATUS_CODE.FULL){var e=t.getNalu1Packet(!1);if(null!=e){var i=e.nalBuf,r=e.pts;t.decodeNalu1Frame(i,r,!0)}}}),10)},stopCacheThread:function(){null!==t.cacheLoop&&(window.clearInterval(t.cacheLoop),t.cacheLoop=null)},loadCache:function(){if(!(t.frameList.length<=3)){var e=t.isPlaying;if(t.cacheYuvBuf.yuvCache.length<=3){t.pause(),null!=t.onLoadCache&&t.onLoadCache(),t.isCaching=e?f.CACHE_WITH_PLAY_SIGN:f.CACHE_WITH_NOPLAY_SIGN;var i=t.frameList.length>30?30:t.frameList.length;null===t.cacheInterval&&(t.cacheInterval=window.setInterval((function(){t.cacheYuvBuf.yuvCache.length>=i&&(null!=t.onLoadCacheFinshed&&t.onLoadCacheFinshed(),window.clearInterval(t.cacheInterval),t.cacheInterval=null,t.isCaching===f.CACHE_WITH_PLAY_SIGN&&t.play(t.playParams),t.isCaching=f.CACHE_NO_LOADCACHE)}),40))}}},playFunc:function(){var e=!1;if(t.playParams.seekEvent||c()-t.calcuteStartTime>=t.frameTime-t.preCostTime){e=!0;var i=!0;if(t.calcuteStartTime=c(),t.config.audioNone)t.playFrameYUV(i,t.playParams.accurateSeek);else{t.fix_poc_err_skip>0&&(t.fix_poc_err_skip--,i=!1);var r=t.videoPTS-t.audio.getAlignVPTS();if(r>0)return void(t.playParams.seekEvent&&!t.config.audioNone&&t.audio.setVoice(0));if(i){if(!(i=-1*r<=1*t.frameTimeSec)){for(var n=parseInt(r/t.frameTimeSec),a=0;a=i&&(t.playFrameYUV(!0,t.playParams.accurateSeek),i+=1)}),1)}else t.videoPTS>=t.playParams.seekPos&&!t.isNewSeek||0===t.playParams.seekPos||0===t.playParams.seekPos?(t.frameTime=1e3/t.config.fps,t.frameTimeSec=t.frameTime/1e3,0==t.config.audioNone&&t.audio.play(),t.realVolume=t.config.audioNone?0:t.audio.voice,t.playParams.seekEvent&&(t.fix_poc_err_skip=10),t.loop=window.setInterval((function(){var e=c();t.playFunc(),t.preCostTime=c()-e}),1)):(t.loop=window.setInterval((function(){t.playFrameYUV(!1,t.playParams.accurateSeek),t.checkFinished(t.playParams.mode)?(window.clearInterval(t.loop),t.loop=null):t.videoPTS>=t.playParams.seekPos&&(window.clearInterval(t.loop),t.loop=null,t.play(t.playParams))}),1),t.isNewSeek=!1)},stop:function(){t.release(),n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr),t.stream=new Uint8Array},release:function(){return t.endAudio(),t.cacheLoop&&window.clearInterval(t.cacheLoop),t.cacheLoop=null,t.loop&&window.clearInterval(t.loop),t.loop=null,t.pause(),n.cwrap("release","number",["number"])(t.vcodecerPtr),t.stream=null,t.frameList.length=0,t.durationMs=-1,t.videoPTS=0,t.isPlaying=!1,!0},nextNalu:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(t.stream.length<=4)return!1;for(var i=-1,r=0;r=t.stream.length){if(-1==i)return!1;var n=t.stream.subarray(i);return t.stream=new Uint8Array,n}var a="0 0 1"==t.stream.slice(0,3).join(" "),s="0 0 0 1"==t.stream.slice(0,4).join(" ");if(a||s){if(-1==i)i=r;else{if(e<=1){var o=t.stream.subarray(i,r);return t.stream=t.stream.subarray(r),o}e-=1}r+=3}}return!1},decodeSendPacket:function(e){var i=n._malloc(e.length);n.HEAP8.set(e,i);var r=n.cwrap("decodeSendPacket","number",["number","number","number"])(t.vcodecerPtr,i,e.length);return n._free(i),r},decodeRecvFrame:function(){return n.cwrap("decodeRecv","number",["number"])(t.vcodecerPtr)},playFrameYUV:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.cacheYuvBuf.vYuv();if(null==r)return t.noCacheFrame+=1,e&&!t.playParams.seekEvent&&t.loadCache(),!1;t.noCacheFrame=0;var n=r.pts;return t.videoPTS=n,(!e&&i||e)&&e&&t.drawImage(r.width,r.height,r.imageBufferY,r.imageBufferB,r.imageBufferR),e&&!t.playParams.seekEvent&&t.isPlaying&&t.loadCache(),!0},drawImage:function(e,i,r,n,a){if(t.canvas.width===e&&t.canvas.height==i||(t.canvas.width=e,t.canvas.height=i),t.showScreen&&null!=t.onRender)t.onRender(e,i,r,n,a);else{if(!t.isCheckDisplay)t.checkDisplaySize(e,i);var s=e*i,o=e/2*(i/2),f=new Uint8Array(s+2*o);f.set(r,0),f.set(n,s),f.set(a,s+o),l.renderFrame(t.yuv,r,n,a,e,i)}},debugYUV:function(e){t.debugYUVSwitch=!0,t.debugID=e},checkDisplaySize:function(e,i){var r=e/t.config.width>i/t.config.height,n=(t.config.width/e).toFixed(2),a=(t.config.height/i).toFixed(2),s=r?n:a,o=t.config.fixed,l=o?t.config.width:parseInt(e*s),f=o?t.config.height:parseInt(i*s);if(t.canvas.offsetWidth!=l||t.canvas.offsetHeight!=f){var u=parseInt((t.canvasBox.offsetHeight-f)/2),c=parseInt((t.canvasBox.offsetWidth-l)/2);t.canvas.style.marginTop=u+"px",t.canvas.style.marginLeft=c+"px",t.canvas.style.width=l+"px",t.canvas.style.height=f+"px"}return t.isCheckDisplay=!0,[l,f]},makeWasm:function(){if(null!=t.config.token){t.vcodecerPtr=n.cwrap("registerPlayer","number",["string","string"])(t.config.token,u.PLAYER_VERSION);var e=n.addFunction((function(e,i,r,a,s,l,f,u,c){var h=n.HEAPU8.subarray(e,e+a*u),d=n.HEAPU8.subarray(i,i+s*u/2),_=n.HEAPU8.subarray(r,r+l*u/2),p=new Uint8Array(h),m=new Uint8Array(d),b=new Uint8Array(_),v=1*c/1e3,y=new o.CacheYuvStruct(v,a,u,p,m,b);t.cacheYuvBuf.appendCacheByCacheYuv(y)}));n.cwrap("setCodecType","number",["number","number","number"])(t.vcodecerPtr,t.config.videoCodec,e);n.cwrap("initMissile","number",["number"])(t.vcodecerPtr);n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr)}},makeIt:function(){var e=document.querySelector("div#"+t.config.playerId),i=document.createElement("canvas");i.style.width=e.clientWidth+"px",i.style.height=e.clientHeight+"px",i.style.top="0px",i.style.left="0px",e.appendChild(i),t.canvasBox=e,t.canvas=i,t.yuv=l.setupCanvas(i,{preserveDrawingBuffer:!1}),0==t.config.audioNone&&(t.audio=a({sampleRate:t.config.sampleRate,appendType:t.config.appendHevcType})),t.isPlayLoadingFinish=1}};return t.makeWasm(),t.makeIt(),t.cacheThread(),t}},{"../consts":198,"../render-engine/webgl-420p":219,"../version":222,"./audio-core":199,"./cache":203,"./cacheYuv":204,"./missile.js":1}],208:[function(e,t,i){"use strict";var r=e("./bufferFrame");t.exports=function(){var e={videoBuffer:[],audioBuffer:[],idrIdxBuffer:[],appendFrame:function(t,i){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=new r.BufferFrame(t,a,i,n),o=parseInt(t);return n?(e.videoBuffer.length-1>=o?e.videoBuffer[o].push(s):e.videoBuffer.push([s]),a&&!e.idrIdxBuffer.includes(t)&&e.idrIdxBuffer.push(t)):e.audioBuffer.length-1>=o&&null!=e.audioBuffer[o]&&null!=e.audioBuffer[o]?e.audioBuffer[o]&&e.audioBuffer[o].push(s):e.audioBuffer.push([s]),!0},appendFrameWithDts:function(t,i,n){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=r.ConstructWithDts(t,i,s,n,a),l=parseInt(i);return a?(e.videoBuffer.length-1>=l?e.videoBuffer[l].push(o):e.videoBuffer.push([o]),s&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=l&&null!=e.audioBuffer[l]&&null!=e.audioBuffer[l]?e.audioBuffer[l]&&e.audioBuffer[l].push(o):e.audioBuffer.push([o]),!0},appendFrameByBufferFrame:function(t){var i=t.pts,r=parseInt(i);return t.video?(e.videoBuffer.length-1>=r?e.videoBuffer[r].push(t):e.videoBuffer.push([t]),isKey&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=r?e.audioBuffer[r].push(t):e.audioBuffer.push([t]),!0},cleanPipeline:function(){e.videoBuffer.length=0,e.audioBuffer.length=0},vFrame:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.videoBuffer.length-1))return e.videoBuffer[t]},aFrame:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.audioBuffer.length-1))return e.audioBuffer[t]},seekIDR:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e.idrIdxBuffer,e.videoBuffer,t<0)return null;if(e.idrIdxBuffer.includes(t))return t;for(var i=0;it||0===i&&e.idrIdxBuffer[i]>=t){for(var r=1;r>=0;r--){var n=i-r;if(n>=0)return e.idrIdxBuffer[n],e.idrIdxBuffer[n]}return e.idrIdxBuffer[i],j,e.idrIdxBuffer[i]}}};return e}},{"./bufferFrame":209}],209:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&i.extensionInfo.vHeight>0&&(i.size.width=i.extensionInfo.vWidth,i.size.height=i.extensionInfo.vHeight)),i.mediaInfo.duration,null!=i.onDemuxed&&i.onDemuxed(i.onReadyOBJ);for(var e=!1;;){var r=i.mpegTsObj.readPacket();if(r.size<=0)break;var n=r.dtime>0?r.dtime:r.ptime;if(!(n<0)){if(0==r.type){n<=i.vPreFramePTS&&(e=!0);var a=l.PACK_NALU(r.layer),o=1==r.keyframe,f=1==e?n+i.vStartTime:n,u=new s.BufferFrame(f,o,a,!0);i.bufObject.appendFrame(u.pts,u.data,!0,u.isKey),i.vPreFramePTS=f,null!=i.onSamples&&i.onSamples(i.onReadyOBJ,u)}else if(n<=i.aPreFramePTS&&(e=!0),"aac"==i.mediaInfo.aCodec)for(var c=r.data,h=0;h=3?(i._onTsReady(e),window.clearInterval(i.timerTsWasm),i.timerTsWasm=null):(i.mpegTsWasmRetryLoadTimes+=1,i.mpegTsObj.initDemuxer())}),3e3)}},{key:"_onTsReady",value:function(e){var t=this;t.hls.fetchM3u8(e),t.mpegTsWasmState=!0,t.timerFeed=window.setInterval((function(){if(t.tsList.length>0&&0==t.lockWait.state)try{var e=t.tsList.shift();if(null!=e){var i=e.streamURI,r=e.streamDur;t.lockWait.state=!0,t.lockWait.lockMember.dur=r,t.mpegTsObj.isLive=t.hls.isLive(),t.mpegTsObj.demuxURL(i)}else console.error("_onTsReady need wait ")}catch(e){console.error("onTsReady ERROR:",e),t.lockWait.state=!1}}),50)}},{key:"release",value:function(){this.timerFeed&&window.clearInterval(this.timerFeed),this.timerTsWasm&&window.clearInterval(this.timerTsWasm)}},{key:"bindReady",value:function(e){this.onReadyOBJ=e}},{key:"popBuffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1===e?t+1>this.bufObject.videoBuffer.length?null:this.bufObject.vFrame(t):2===e?t+1>this.bufObject.audioBuffer.length?null:this.bufObject.aFrame(t):void 0}},{key:"getVLen",value:function(){return this.bufObject.videoBuffer.length}},{key:"getALen",value:function(){return this.bufObject.audioBuffer.length}},{key:"getLastIdx",value:function(){return this.bufObject.videoBuffer.length-1}},{key:"getALastIdx",value:function(){return this.bufObject.audioBuffer.length-1}},{key:"getACodec",value:function(){return this.aCodec}},{key:"getDurationMs",value:function(){return this.durationMs}},{key:"getFPS",value:function(){return this.fps}},{key:"getSampleRate",value:function(){return this.sampleRate}},{key:"getSampleChannel",value:function(){return this.aChannel}},{key:"getSize",value:function(){return this.size}},{key:"seek",value:function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}}}])&&r(t.prototype,i),u&&r(t,u),e}();i.M3u8=u},{"../consts":198,"../decoder/hevc-imp":206,"./buffer":208,"./bufferFrame":209,"./m3u8base":211,"./mpegts/mpeg.js":215}],211:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i ",t),setTimeout((function(){i.fetchM3u8(e)}),500)}))}},{key:"_uriParse",value:function(e){this._preURI="";var t=e.split("//"),i=null,r=null;if(t.length<1)return!1;t.length>1?(i=t[0],r=t[1].split("/"),this._preURI=i+"//"):r=t[0].split("/");for(var n=0;n_&&(o=_);var p=r[f+=1],m=null;m=p.indexOf("http")>=0?p:this._preURI+p,this._slices.indexOf(m)<0&&(this._slices.push(m),this._slices[this._slices.length-1],null!=this.onTransportStream&&this.onTransportStream(m,_))}}}if(this._slices.length>s.hlsSliceLimit&&this._type==n.PLAYER_IN_TYPE_M3U8_LIVE&&(this._slices=this._slices.slice(-1*s.hlsSliceLimit)),null!=this.onFinished){var b={type:this._type,duration:-1};this.onFinished(b)}return o}},{key:"_readTag",value:function(e){var t=s.tagParse.exec(e);return null!==t?{key:t[1],value:t[3]}:null}}])&&r(t.prototype,i),o&&r(t,o),e}();i.M3u8Base=o},{"../consts":198}],212:[function(e,t,i){"use strict";var r=e("mp4box"),n=e("../decoder/hevc-header"),a=e("../decoder/hevc-imp"),s=e("./buffer"),o=e("../consts"),l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12,Reserved:13,"frequency is written explictly":15},f=function(e){for(var t=[],i=0;i1&&void 0!==arguments[1]&&arguments[1],i=null;return t?((i=e)[0]=n.DEFINE_STARTCODE[0],i[1]=n.DEFINE_STARTCODE[1],i[2]=n.DEFINE_STARTCODE[2],i[3]=n.DEFINE_STARTCODE[3]):((i=new Uint8Array(n.DEFINE_STARTCODE.length+e.length)).set(n.DEFINE_STARTCODE,0),i.set(e,n.DEFINE_STARTCODE.length)),i},u.prototype.setAACAdts=function(e){var t=null,i=this.aacProfile,r=l[this.sampleRate],n=new Uint8Array(7),a=n.length+e.length;return n[0]=255,n[1]=241,n[2]=(i-1<<6)+(r<<2)+0,n[3]=128+(a>>11),n[4]=(2047&a)>>3,n[5]=31+((7&a)<<5),n[6]=252,(t=new Uint8Array(a)).set(n,0),t.set(e,n.length),t},u.prototype.demux=function(){var e=this;e.seekPos=-1,e.mp4boxfile=r.createFile(),e.movieInfo=null,e.videoCodec=null,e.durationMs=-1,e.fps=-1,e.sampleRate=-1,e.aacProfile=2,e.size={width:-1,height:-1},e.bufObject=s(),e.audioNone=!1,e.naluHeader={vps:null,sps:null,pps:null,sei:null},e.mp4boxfile.onError=function(e){},this.mp4boxfile.onReady=function(t){for(var i in e.movieInfo=t,t.tracks)"VideoHandler"!==t.tracks[i].name&&"video"!==t.tracks[i].type||(t.tracks[i].codec,t.tracks[i].codec.indexOf("hev")>=0||t.tracks[i].codec.indexOf("hvc")>=0?e.videoCodec=o.CODEC_H265:t.tracks[i].codec.indexOf("avc")>=0&&(e.videoCodec=o.CODEC_H264));var r=-1;if(r=t.videoTracks[0].samples_duration/t.videoTracks[0].timescale,e.durationMs=1e3*r,e.fps=t.videoTracks[0].nb_samples/r,e.seekDiffTime=1/e.fps,e.size.width=t.videoTracks[0].track_width,e.size.height=t.videoTracks[0].track_height,t.audioTracks.length>0){e.sampleRate=t.audioTracks[0].audio.sample_rate;var n=t.audioTracks[0].codec.split(".");e.aacProfile=n[n.length-1]}else e.audioNone=!0;null!=e.onMp4BoxReady&&e.onMp4BoxReady(e.videoCodec),e.videoCodec===o.CODEC_H265?(e.initializeAllSourceBuffers(),e.mp4boxfile.start()):(e.videoCodec,o.CODEC_H264)},e.mp4boxfile.onSamples=function(t,i,r){var s=window.setInterval((function(){for(var i=0;i3?e.naluHeader.sei=e.setStartCode(m[3][0].data,!1):e.naluHeader.sei=new Uint8Array,e.naluHeader}else e.videoCodec==o.CODEC_H264&&(e.naluHeader.vps=new Uint8Array,e.naluHeader.sps=e.setStartCode(d.SPS[0].nalu,!1),e.naluHeader.pps=e.setStartCode(d.PPS[0].nalu,!1),e.naluHeader.sei=new Uint8Array);u[4].toString(16),e.naluHeader.vps[4].toString(16),f(e.naluHeader.vps),f(u);var b=e.setStartCode(u.subarray(0,e.naluHeader.vps.length),!0);if(f(b),u[4]===e.naluHeader.vps[4]){var v=e.naluHeader.vps.length+4,y=e.naluHeader.vps.length+e.naluHeader.sps.length+4,g=e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4;if(e.naluHeader.sei.length<=0&&e.naluHeader.sps.length>0&&u[v]===e.naluHeader.sps[4]&&e.naluHeader.pps.length>0&&u[y]===e.naluHeader.pps[4]&&78===u[g]){u[e.naluHeader.vps.length+4],e.naluHeader.sps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+4],e.naluHeader.pps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4];for(var w=0,E=0;E4&&u[4]===e.naluHeader.sei[4]){var C=u.subarray(0,10),S=new Uint8Array(e.naluHeader.vps.length+C.length);S.set(C,0),S.set(e.naluHeader.vps,C.length),S[3]=1,e.naluHeader.vps=null,e.naluHeader.vps=new Uint8Array(S),S=null,C=null,(u=u.subarray(10))[4],e.naluHeader.vps[4],e.naluHeader.vps}else if(0===e.naluHeader.sei.length&&78===u[4]){u=e.setStartCode(u,!0);for(var j=0,T=0;T1&&void 0!==arguments[1]?arguments[1]:0;return e.fileStart=t,this.mp4boxfile.appendBuffer(e)},u.prototype.finishBuffer=function(){this.mp4boxfile.flush()},u.prototype.play=function(){},u.prototype.getVideoCoder=function(){return this.videoCodec},u.prototype.getDurationMs=function(){return this.durationMs},u.prototype.getFPS=function(){return this.fps},u.prototype.getSampleRate=function(){return this.sampleRate},u.prototype.getSize=function(){return this.size},u.prototype.seek=function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}},u.prototype.popBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0},u.prototype.addBuffer=function(e){var t=e.id;this.mp4boxfile.setExtractionOptions(t)},u.prototype.initializeAllSourceBuffers=function(){if(this.movieInfo){for(var e=this.movieInfo,t=0;t>5)}},{key:"sliceAACFrames",value:function(e,t){for(var i=[],r=e,n=0;n>4==15){var a=this._getPktLen(t[n+3],t[n+4],t[n+5]);if(a<=0)continue;var s=t.subarray(n,n+a),o=new Uint8Array(a);o.set(s,0),i.push({ptime:r,data:o}),r+=this.frameDurSec,n+=a}else n+=1;return i}}])&&r(t.prototype,i),n&&r(t,n),e}();i.AACDecoder=n},{}],215:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i ",e),r=null})).catch((function(i){console.error("_demuxerTsInit ERROR fetch ERROR ==> ",i),t._releaseOffset(),t.onDemuxedFailed&&t.onDemuxedFailed(i,e)}))}},{key:"_releaseOffset",value:function(){void 0!==this.offsetDemux&&null!==this.offsetDemux&&(n._free(this.offsetDemux),this.offsetDemux=null)}},{key:"_demuxCore",value:function(e){this._releaseOffset(),this._refreshDemuxer(),this.offsetDemux=n._malloc(e.length),n.HEAP8.set(e,this.offsetDemux);var t=n.cwrap("demuxBox","number",["number","number","number"])(this.offsetDemux,e.length,this.isLive);n._free(this.offsetDemux),this.offsetDemux=null,t>=0&&(this._setMediaInfo(),this._setExtensionInfo(),null!=this.onDemuxed&&this.onDemuxed())}},{key:"_setMediaInfo",value:function(){var e=n.cwrap("getMediaInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],o=n.HEAPF64[e/8+1+1],l=n.HEAPF64[e/8+1+1+1],f=n.HEAPF64[e/8+1+1+1+1],u=n.HEAPU32[e/4+2+2+2+2+2];this.mediaAttr.vFps=r,this.mediaAttr.vGop=u,this.mediaAttr.vDuration=o,this.mediaAttr.aDuration=l,this.mediaAttr.duration=f;var c=n.cwrap("getAudioCodecID","number",[])();c>=0?(this.mediaAttr.aCodec=s.CODEC_OFFSET_TABLE[c],this.mediaAttr.sampleRate=t>0?t:s.DEFAULT_SAMPLERATE,this.mediaAttr.sampleChannel=i>=0?i:s.DEFAULT_CHANNEL):(this.mediaAttr.sampleRate=0,this.mediaAttr.sampleChannel=0,this.mediaAttr.audioNone=!0);var h=n.cwrap("getVideoCodecID","number",[])();h>=0&&(this.mediaAttr.vCodec=s.CODEC_OFFSET_TABLE[h]),null==this.aacDec?this.aacDec=new a.AACDecoder(this.mediaAttr):this.aacDec.updateConfig(this.mediaAttr)}},{key:"_setExtensionInfo",value:function(){var e=n.cwrap("getExtensionInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1];this.extensionInfo.vWidth=t,this.extensionInfo.vHeight=i}},{key:"readMediaInfo",value:function(){return this.mediaAttr}},{key:"readExtensionInfo",value:function(){return this.extensionInfo}},{key:"readAudioNone",value:function(){return this.mediaAttr.audioNone}},{key:"_readLayer",value:function(){var e={vps:null,sps:null,pps:null,sei:null},t={vlc:null},i=n.cwrap("getSPSLen","number",[])(),r=n.cwrap("getSPS","number",[])();e.sps=new Uint8Array(i),e.sps.set(n.HEAPU8.subarray(r,r+i),0);var a=n.cwrap("getPPSLen","number",[])(),o=n.cwrap("getPPS","number",[])();e.pps=new Uint8Array(a),e.pps.set(n.HEAPU8.subarray(o,o+a),0);var l=n.cwrap("getSEILen","number",[])(),f=n.cwrap("getSEI","number",[])();e.sei=new Uint8Array(l),e.sei.set(n.HEAPU8.subarray(f,f+l),0);var u=n.cwrap("getVLCLen","number",[])(),c=n.cwrap("getVLC","number",[])();if(t.vlc=new Uint8Array(u),t.vlc.set(n.HEAPU8.subarray(c,c+u),0),this.mediaAttr.vCodec==s.DEF_HEVC||this.mediaAttr.vCodec==s.DEF_H265){var h=n.cwrap("getVPSLen","number",[])(),d=n.cwrap("getVPS","number",[])();e.vps=new Uint8Array(h),e.vps.set(n.HEAPU8.subarray(d,d+h),0)}else this.mediaAttr.vCodec==s.DEF_AVC||(this.mediaAttr.vCodec,s.DEF_H264);return{nalu:e,vlc:t}}},{key:"readPacket",value:function(){var e=n.cwrap("getPacket","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],a=n.HEAPF64[e/8+1+1],o=n.HEAPU32[e/4+1+1+2+2],l=n.HEAPU32[e/4+1+1+2+2+1],f=n.HEAPU8.subarray(l,l+i),u=this._readLayer();return{type:t,size:i,ptime:r,dtime:a,keyframe:o,src:f,data:1==t&&this.mediaAttr.aCodec==s.DEF_AAC?this.aacDec.sliceAACFrames(r,f):f,layer:u}}},{key:"_refreshDemuxer",value:function(){this._releaseDemuxer(),this._initDemuxer()}},{key:"_initDemuxer",value:function(){n.cwrap("initTsMissile","number",[])(),n.cwrap("initializeDemuxer","number",[])()}},{key:"_releaseDemuxer",value:function(){n.cwrap("exitTsMissile","number",[])()}}])&&r(i.prototype,o),l&&r(i,l),e}();i.MPEG_JS=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../decoder/missile.js":1,"./consts":213,"./decoder/aac":214}],216:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&e.extensionInfo.vHeight>0&&(e.size.width=e.extensionInfo.vWidth,e.size.height=e.extensionInfo.vHeight);for(var t=null;!((t=e.mpegTsObj.readPacket()).size<=0);){var i=t.dtime;if(0==t.type){var r=s.PACK_NALU(t.layer),n=1==t.keyframe;e.bufObject.appendFrame(i,r,!0,n)}else if("aac"==e.mediaInfo.aCodec)for(var a=t.data,o=0;o0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0}},{key:"getACodec",value:function(){return this.aCodec}},{key:"getAudioNone",value:function(){return this.mpegTsObj.mediaAttr.audioNone}},{key:"getDurationMs",value:function(){return this.durationMs}},{key:"getFPS",value:function(){return this.fps}},{key:"getSampleRate",value:function(){return this.sampleRate}},{key:"getSize",value:function(){return this.size}},{key:"seek",value:function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}}}])&&r(t.prototype,i),o&&r(t,o),e}();i.MpegTs=o},{"../decoder/hevc-imp":206,"./buffer":208,"./mpegts/mpeg.js":215}],217:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];this.player.setScreen(e)}},{key:"play",value:function(){if(this.playParam.videoCodec===c.CODEC_H265){var e={seekPos:this._getSeekTarget(),mode:this.playMode,accurateSeek:this.configFormat.accurateSeek,seekEvent:!1,realPlay:!0};this.player.play(e)}else this.player.play();return!0}},{key:"pause",value:function(){return this.player.pause(),!0}},{key:"isPlaying",value:function(){return this.player.isPlayingState()}},{key:"setVoice",value:function(e){if(e<0)return!1;this.volume=e,this.player.setVoice(e)}},{key:"getVolume",value:function(){return this.volume}},{key:"mediaInfo",value:function(){return{meta:this.playParam,videoType:this.playMode}}},{key:"_seekHLS",value:function(e,t,i){setTimeout((function(){t.player.getCachePTS(),t.player.getCachePTS()>e?i():t._seekHLS(e,t,i)}),100)}},{key:"seek",value:function(e){var t=this;this.seekTarget=e,this.onSeekStart&&this.onSeekStart(e),this.timerFeed&&(window.clearInterval(this.timerFeed),this.timerFeed=null);var i=this._getSeekTarget();return this.playParam.videoCodec===c.CODEC_H264&&this.configFormat.type==c.PLAYER_IN_TYPE_MP4?(this.player.seek(e),this.onSeekFinish&&this.onSeekFinish()):this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?this.player.seek((function(){}),{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek}):this._seekHLS(e,this,(function(){t.player.seek((function(){t.configFormat.type==c.PLAYER_IN_TYPE_MP4?t.mp4Obj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_TS||t.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?t.mpegTsObj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(t.hlsObj.onSamples=null,t.hlsObj.seek(e));var i,r=(i=0,i=t.configFormat.accurateSeek?e:t._getBoxBufSeekIDR(),parseInt(i)),n=parseInt(t._getBoxBufSeekIDR())||0;t._avFeedMP4Data(n,r)}),{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek})})),!0}},{key:"fullScreen",value:function(){this.autoScreenClose=!0;var e=document.querySelector("#"+this.configFormat.playerId),t=e.getElementsByTagName("canvas")[0];e.style.width=this.screenW+"px",e.style.height=this.screenH+"px";var i=this._checkScreenDisplaySize(this.screenW,this.screenH,this.playParam.size.width,this.playParam.size.height);t.style.marginTop=i[0]+"px",t.style.marginLeft=i[1]+"px",t.style.width=i[2]+"px",t.style.height=i[3]+"px",this._requestFullScreen(e)}},{key:"closeFullScreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!1===e&&(this.autoScreenClose=!1,this._exitFull());var t=document.querySelector("#"+this.configFormat.playerId),i=t.getElementsByTagName("canvas")[0];t.style.width=this.configFormat.playerW+"px",t.style.height=this.configFormat.playerH+"px";var r=this._checkScreenDisplaySize(this.configFormat.playerW,this.configFormat.playerH,this.playParam.size.width,this.playParam.size.height);i.style.marginTop=r[0]+"px",i.style.marginLeft=r[1]+"px",i.style.width=r[2]+"px",i.style.height=r[3]+"px"}},{key:"_checkScreenDisplaySize",value:function(e,t,i,r){var n=i/e>r/t,a=(e/i).toFixed(2),s=(t/r).toFixed(2),o=n?a:s,l=this.fixed?e:parseInt(i*o),f=this.fixed?t:parseInt(r*o);return[parseInt((t-f)/2),parseInt((e-l)/2),l,f]}},{key:"_isFullScreen",value:function(){var e=document.fullscreenElement||document.mozFullscreenElement||document.webkitFullscreenElement;return document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled,null!=e}},{key:"_requestFullScreen",value:function(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullScreen()}},{key:"_exitFull",value:function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}},{key:"_durationText",value:function(e){if(e<0)return"Play";var t=Math.round(e);return Math.floor(t/3600)+":"+Math.floor(t%3600/60)+":"+Math.floor(t%60)}},{key:"_getSeekTarget",value:function(){return this.configFormat.accurateSeek?this.seekTarget:this._getBoxBufSeekIDR()}},{key:"_getBoxBufSeekIDR",value:function(){return this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.mp4Obj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this.mpegTsObj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this.hlsObj.seekPos:void 0}},{key:"_playControl",value:function(){this.isPlaying()?this.pause():this.play()}},{key:"_avFeedMP4Data",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=parseInt(this.playParam.durationMs/1e3);this.player.clearAllCache(),this.timerFeed=window.setInterval((function(){var a=null,s=null,o=!0,l=!0;if(e.configFormat.type==c.PLAYER_IN_TYPE_MP4?(a=e.mp4Obj.popBuffer(1,t),s=e.mp4Obj.audioNone?null:e.mp4Obj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_TS||e.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?(a=e.mpegTsObj.popBuffer(1,t),s=e.mpegTsObj.getAudioNone()?null:e.mpegTsObj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(a=e.hlsObj.popBuffer(1,t),s=e.hlsObj.audioNone?null:e.hlsObj.popBuffer(2,i),t=e.hlsObj.getLastIdx()&&(o=!1),i=e.hlsObj.getALastIdx()&&(l=!1)),!0===o&&null!=a)for(var f=0;fn)return window.clearInterval(e.timerFeed),e.timerFeed=null,e.player.vCachePTS,e.player.aCachePTS,void(null!=r&&r())}),5)}},{key:"_makeMP4Player",value:function(){null!=this.configFormat.extInfo.core&&null!==this.configFormat.extInfo.core&&this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?this._cDemuxDecoderEntry():this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.configFormat.extInfo.moovStartFlag?this._mp4EntryVodStream():this._mp4Entry():this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this._mpegTsEntry():this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this._m3u8Entry():this.configFormat.type===c.PLAYER_IN_TYPE_RAW_265&&this._raw265Entry()}},{key:"_makeMP4PlayerViewEvent",value:function(e,t,i,r){var a=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=this;if(this.playParam.durationMs=e,this.playParam.fps=t,this.playParam.sampleRate=i,this.playParam.size=r,this.playParam.audioNone=s,this.playParam.videoCodec=o||c.CODEC_H265,this.playParam,(this.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&this.hlsConf.hlsType==c.PLAYER_IN_TYPE_M3U8_LIVE||this.configFormat.type==c.PLAYER_IN_TYPE_RAW_265)&&(this.playMode=c.PLAYER_MODE_NOTIME_LIVE),l.configFormat.extInfo.autoCrop){var f=document.querySelector("#"+this.configFormat.playerId),u=r.width/r.height,h=this.configFormat.playerW/this.configFormat.playerH;u>h?f.style.height=this.configFormat.playerW/u+"px":u>1,a>>1,i),e.v.fill(n>>1,a>>1,r),e.drawArrays(e.TRIANGLE_STRIP,0,4)},setupCanvas:function(e,t){var i=e.getContext("webgl")||e.getContext("experimental-webgl");if(!i)return i;var n=i.createProgram(),a=["attribute highp vec4 aVertexPosition;","attribute vec2 aTextureCoord;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = aVertexPosition;"," vTextureCoord = aTextureCoord;","}"].join("\n"),s=i.createShader(i.VERTEX_SHADER);i.shaderSource(s,a),i.compileShader(s);var o=["precision highp float;","varying lowp vec2 vTextureCoord;","uniform sampler2D YTexture;","uniform sampler2D UTexture;","uniform sampler2D VTexture;","const mat4 YUV2RGB = mat4","("," 1.1643828125, 0, 1.59602734375, -.87078515625,"," 1.1643828125, -.39176171875, -.81296875, .52959375,"," 1.1643828125, 2.017234375, 0, -1.081390625,"," 0, 0, 0, 1",");","void main(void) {"," gl_FragColor = vec4( texture2D(YTexture, vTextureCoord).x, texture2D(UTexture, vTextureCoord).x, texture2D(VTexture, vTextureCoord).x, 1) * YUV2RGB;","}"].join("\n"),l=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(l,o),i.compileShader(l),i.attachShader(n,s),i.attachShader(n,l),i.linkProgram(n),i.useProgram(n),i.getProgramParameter(n,i.LINK_STATUS);var f=i.getAttribLocation(n,"aVertexPosition");i.enableVertexAttribArray(f);var u=i.getAttribLocation(n,"aTextureCoord");i.enableVertexAttribArray(u);var c=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,c),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0]),i.STATIC_DRAW),i.vertexAttribPointer(f,3,i.FLOAT,!1,0,0);var h=i.createBuffer();return i.bindBuffer(i.ARRAY_BUFFER,h),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),i.STATIC_DRAW),i.vertexAttribPointer(u,2,i.FLOAT,!1,0,0),i.y=new r(i),i.u=new r(i),i.v=new r(i),i.y.bind(0,n,"YTexture"),i.u.bind(1,n,"UTexture"),i.v.bind(2,n,"VTexture"),i}}},{}],220:[function(e,t,i){(function(e){"use strict";e.STATIC_MEM_wasmDecoderState=-1,e.STATICE_MEM_playerCount=-1,e.STATICE_MEM_playerIndexPtr=0}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],221:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i1&&(m=i.argv[1].replace(/\\/g,"/")),p=i.argv.slice(2),void 0!==t&&(t.exports=d),i.on("uncaughtException",(function(e){if(!(e instanceof Sa))throw e})),i.on("unhandledRejection",at),b=function(e){i.exit(e)},d.inspect=function(){return"[Emscripten Module object]"};else if(E)"undefined"!=typeof read&&(C=function(e){return read(e)}),S=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(W("object"===u(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?p=scriptArgs:void 0!==arguments&&(p=arguments),"function"==typeof quit&&(b=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print);else{if(!v&&!y)throw new Error("environment detection error");y?A=self.location.href:document.currentScript&&(A=document.currentScript.src),A=0!==A.indexOf("blob:")?A.substr(0,A.lastIndexOf("/")+1):"",C=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},y&&(S=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),function(e,t,i){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):i()},r.onerror=i,r.send(null)},function(e){document.title=e}}var M=d.print||console.log.bind(console),k=d.printErr||console.warn.bind(console);for(h in _)_.hasOwnProperty(h)&&(d[h]=_[h]);function P(e){W(Te);var t=pe[Te>>2],i=t+e+15&-16;return i>ei()&&at("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly"),pe[Te>>2]=i,t}function I(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 W(t%8==0,"getNativeTypeSize invalid bits "+t+", type "+e),t/8}return 0}}function R(e){R.shown||(R.shown={}),R.shown[e]||(R.shown[e]=1,k(e))}_=null,d.arguments&&(p=d.arguments),Object.getOwnPropertyDescriptor(d,"arguments")||Object.defineProperty(d,"arguments",{configurable:!0,get:function(){at("Module.arguments has been replaced with plain arguments_")}}),d.thisProgram&&(m=d.thisProgram),Object.getOwnPropertyDescriptor(d,"thisProgram")||Object.defineProperty(d,"thisProgram",{configurable:!0,get:function(){at("Module.thisProgram has been replaced with plain thisProgram")}}),d.quit&&(b=d.quit),Object.getOwnPropertyDescriptor(d,"quit")||Object.defineProperty(d,"quit",{configurable:!0,get:function(){at("Module.quit has been replaced with plain quit_")}}),W(void 0===d.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.read,"Module.read option was removed (modify read_ in JS)"),W(void 0===d.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),W(void 0===d.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),W(void 0===d.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),Object.getOwnPropertyDescriptor(d,"read")||Object.defineProperty(d,"read",{configurable:!0,get:function(){at("Module.read has been replaced with plain read_")}}),Object.getOwnPropertyDescriptor(d,"readAsync")||Object.defineProperty(d,"readAsync",{configurable:!0,get:function(){at("Module.readAsync has been replaced with plain readAsync")}}),Object.getOwnPropertyDescriptor(d,"readBinary")||Object.defineProperty(d,"readBinary",{configurable:!0,get:function(){at("Module.readBinary has been replaced with plain readBinary")}}),Ea=wa=ga=function(){at("cannot use the stack before compiled code is ready to run, and has provided stack access")};var U={"f64-rem":function(e,t){return e%t},debugger:function(){}},D=1,F=new Array(35);function O(e,t){W(void 0!==e);for(var i=0;i<35;i++)if(!F[i])return F[i]=e,D+i;throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."}var L,B,N,z=0,H=function(){return z};function V(e,t,i,r){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":he[e>>0]=t;break;case"i16":de[e>>1]=t;break;case"i32":pe[e>>2]=t;break;case"i64":ft=[t>>>0,(lt=t,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[e>>2]=ft[0],pe[e+4>>2]=ft[1];break;case"float":be[e>>2]=t;break;case"double":ve[e>>3]=t;break;default:at("invalid type for setValue: "+i)}}d.wasmBinary&&(L=d.wasmBinary),Object.getOwnPropertyDescriptor(d,"wasmBinary")||Object.defineProperty(d,"wasmBinary",{configurable:!0,get:function(){at("Module.wasmBinary has been replaced with plain wasmBinary")}}),d.noExitRuntime&&(B=d.noExitRuntime),Object.getOwnPropertyDescriptor(d,"noExitRuntime")||Object.defineProperty(d,"noExitRuntime",{configurable:!0,get:function(){at("Module.noExitRuntime has been replaced with plain noExitRuntime")}}),"object"!==("undefined"==typeof WebAssembly?"undefined":u(WebAssembly))&&at("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Y=new WebAssembly.Table({initial:4416,element:"anyfunc"}),q=!1;function W(e,t){e||at("Assertion failed: "+t)}function X(e){var t=d["_"+e];return W(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function G(e,t,i,r,n){var a={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);ne(e,t=ga(i),i)}return t},array:function(e){var t=ga(e.length);return le(e,t),t}};var s=X(e),o=[],l=0;if(W("array"!==t,'Return type should not be "array".'),r)for(var f=0;f>2]=0;for(l=s+a;r>0]=0;return s}if("i8"===o)return e.subarray||e.slice?ce.set(e,s):ce.set(new Uint8Array(e),s),s;for(var f,u,h,c=0;c=r);)++n;if(n-t>16&&e.subarray&&ee)return ee.decode(e.subarray(t,n));for(var a="";t>10,56320|1023&f)}}else a+=String.fromCharCode((31&s)<<6|o)}else a+=String.fromCharCode(s)}return a}function ie(e,t){return e?te(ce,e,t):""}function re(e,t,i,r){if(!(r>0))return 0;for(var n=i,a=i+r-1,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(o<=127){if(i>=a)break;t[i++]=o}else if(o<=2047){if(i+1>=a)break;t[i++]=192|o>>6,t[i++]=128|63&o}else if(o<=65535){if(i+2>=a)break;t[i++]=224|o>>12,t[i++]=128|o>>6&63,t[i++]=128|63&o}else{if(i+3>=a)break;o>=2097152&&R("Invalid Unicode code point 0x"+o.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[i++]=240|o>>18,t[i++]=128|o>>12&63,t[i++]=128|o>>6&63,t[i++]=128|63&o}}return t[i]=0,i-n}function ne(e,t,i){return W("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),re(e,ce,t,i)}function ae(e){for(var t=0,i=0;i=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++i)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function se(e){var t=ae(e)+1,i=ya(t);return i&&re(e,he,i,t),i}function oe(e){var t=ae(e)+1,i=ga(t);return re(e,he,i,t),i}function le(e,t){W(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),he.set(e,t)}function fe(e,t,i){for(var r=0;r>0]=e.charCodeAt(r);i||(he[t>>0]=0)}var ue,he,ce,de,_e,pe,me,be,ve,ye=16384,ge=65536;function we(e,t){return e%t>0&&(e+=t-e%t),e}function Ee(e){ue=e,d.HEAP8=he=new Int8Array(e),d.HEAP16=de=new Int16Array(e),d.HEAP32=pe=new Int32Array(e),d.HEAPU8=ce=new Uint8Array(e),d.HEAPU16=_e=new Uint16Array(e),d.HEAPU32=me=new Uint32Array(e),d.HEAPF32=be=new Float32Array(e),d.HEAPF64=ve=new Float64Array(e)}var Ce=1127056,Se=6369936,je=6369936,Te=1126832;W(Ce%16==0,"stack must start aligned"),W(je%16==0,"heap must start aligned");var Ae=5242880;d.TOTAL_STACK&&W(Ae===d.TOTAL_STACK,"the stack size can no longer be determined at runtime");var xe=d.TOTAL_MEMORY||1073741824;function Me(){W(0==(3&Se)),me[(Se>>2)-1]=34821223,me[(Se>>2)-2]=2310721022,pe[0]=1668509029}function ke(){var e=me[(Se>>2)-1],t=me[(Se>>2)-2];34821223==e&&2310721022==t||at("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==pe[0]&&at("Runtime error: The application has corrupted its heap memory area (address zero)!")}function Pe(e){at("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(Se-Ea()+e)+" bytes available!")}function Ie(e,t){var i="";for(var r in kr){var n=kr[r];n[e]&&(i+='as sig "'+r+'" pointing to function '+n[e]+", ")}at("Invalid function pointer "+e+" called with signature '"+t+"'. 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). This pointer might make sense in another type signature: "+i)}function Re(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?d.dynCall_v(i):d.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}}Object.getOwnPropertyDescriptor(d,"TOTAL_MEMORY")||Object.defineProperty(d,"TOTAL_MEMORY",{configurable:!0,get:function(){at("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY")}}),W(xe>=Ae,"TOTAL_MEMORY should be larger than TOTAL_STACK, was "+xe+"! (TOTAL_STACK="+Ae+")"),W("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"),(N=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:xe/ge}))&&(ue=N.buffer),W((xe=ue.byteLength)%ge==0),Ee(ue),pe[Te>>2]=je,function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!"}();var Ue=[],De=[],Fe=[],Oe=[],Le=!1,Be=!1;function Ne(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)qe(d.preRun.shift());Re(Ue)}function ze(){ke(),W(!Le),Le=!0,d.noFSInit||Ut.init.initialized||Ut.init(),At.init(),Re(De)}function He(){ke(),Ut.ignorePermissions=!1,Re(Fe)}function Ve(){ke(),Be=!0}function Ye(){if(ke(),d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)We(d.postRun.shift());Re(Oe)}function qe(e){Ue.unshift(e)}function We(e){Oe.unshift(e)}W(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),W(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),W(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),W(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var Xe=Math.abs,Ge=Math.ceil,Ke=Math.floor,Qe=Math.min,Ze=Math.trunc,Je=0,$e=null,et=null,tt={};function it(e){for(var t=e;;){if(!tt[e])return e;e=t+Math.random()}return e}function rt(e){Je++,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(W(!tt[e]),tt[e]=1,null===$e&&"undefined"!=typeof setInterval&&($e=setInterval((function(){if(q)return clearInterval($e),void($e=null);var e=!1;for(var t in tt)e||(e=!0,k("still waiting on run dependencies:")),k("dependency: "+t);e&&k("(end of list)")}),1e4))):k("warning: run dependency added without ID")}function nt(e){if(Je--,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(W(tt[e]),delete tt[e]):k("warning: run dependency removed without ID"),0==Je&&(null!==$e&&(clearInterval($e),$e=null),et)){var t=et;et=null,t()}}function at(e){d.onAbort&&d.onAbort(e),M(e+=""),k(e),q=!0,1;throw"abort("+e+") at "+gt()}d.preloadedImages={},d.preloadedAudios={},c||qe((function(){"undefined"!=typeof SharedArrayBuffer&&(rt("pthreads"),PThread.allocateUnusedWorkers(5,(function(){nt("pthreads")})))}));var st="data:application/octet-stream;base64,";function ot(e){return String.prototype.startsWith?e.startsWith(st):0===e.indexOf(st)}var lt,ft,ut="missile-v20211009.wasm";function ht(){try{if(L)return new Uint8Array(L);if(S)return S(ut);throw"both async and sync fetching of the wasm failed"}catch(e){at(e)}}function ct(){return L||!v&&!y||"function"!=typeof fetch?new Promise((function(e,t){e(ht())})):fetch(ut,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ut+"'";return e.arrayBuffer()})).catch((function(){return ht()}))}function dt(){var e={env:ha,wasi_unstable:ha,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:U};function t(e,t){var i=e.exports;d.asm=i,nt("wasm-instantiate")}rt("wasm-instantiate");var i=d;function r(e){W(d===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance)}function n(t){return ct().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){k("failed to asynchronously prepare wasm: "+e),at(e)}))}if(d.instantiateWasm)try{return d.instantiateWasm(e,t)}catch(e){return k("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(L||"function"!=typeof WebAssembly.instantiateStreaming||ot(ut)||"function"!=typeof fetch)return n(r);fetch(ut,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){k("wasm streaming compile failed: "+e),k("falling back to ArrayBuffer instantiation"),n(r)}))}))}(),{}}ot(ut)||(ut=x(ut)),d.asm=dt;var _t=[function(){"undefined"!=typeof window?window.dispatchEvent(new CustomEvent("wasmLoaded")):r.onWASMLoaded&&r.onWASMLoaded()}];function pt(e){return _t[e]()}De.push({func:function(){_a()}});var mt=1127040;function bt(e){return R("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function vt(e){return e.replace(/\b__Z[\w\d_]+/g,(function(e){var t=bt(e);return e===t?e:t+" ["+e+"]"}))}function yt(){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 gt(){var e=yt();return d.extraStackTrace&&(e+="\n"+d.extraStackTrace()),vt(e)}W(mt%8==0);var wt={};function Et(e){var t,i;Et.called?(i=pe[e>>2],t=pe[i>>2]):(Et.called=!0,wt.USER="web_user",wt.LOGNAME="web_user",wt.PATH="/",wt.PWD="/",wt.HOME="/home/web_user",wt.LANG=("object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",wt._=m,t=$(1024),i=$(256),pe[i>>2]=t,pe[e>>2]=i);var r=[],n=0;for(var a in wt)if("string"==typeof wt[a]){var s=a+"="+wt[a];r.push(s),n+=s.length}if(n>1024)throw new Error("Environment size exceeded TOTAL_ENV_SIZE!");for(var o=0;o>2]=t,t+=s.length+1}pe[i+4*r.length>>2]=0}function Ct(){}function St(e){return d.___errno_location?pe[d.___errno_location()>>2]=e:k("failed to set errno from JS"),e}var jt={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i;i--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),i="/"===e.substr(-1);return(e=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&i&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=jt.splitPath(e),i=t[0],r=t[1];return i||r?(r&&(r=r.substr(0,r.length-1)),i+r):"."},basename:function(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return jt.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return jt.normalize(e.join("/"))},join2:function(e,t){return jt.normalize(e+"/"+t)}},Tt={resolve:function(){for(var e="",t=!1,i=arguments.length-1;i>=-1&&!t;i--){var r=i>=0?arguments[i]:Ut.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t="/"===r.charAt(0)}return(t?"/":"")+(e=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function i(e){for(var t=0;t=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=Tt.resolve(e).substr(1),t=Tt.resolve(t).substr(1);for(var r=i(e.split("/")),n=i(t.split("/")),a=Math.min(r.length,n.length),s=a,o=0;o0?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=Ni(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(M(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(M(te(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(k(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(k(te(e.output,0)),e.output=[])}}},xt={ops_table:null,mount:function(e){return xt.createNode(null,"/",16895,0)},createNode:function(e,t,i,r){if(Ut.isBlkdev(i)||Ut.isFIFO(i))throw new Ut.ErrnoError(63);xt.ops_table||(xt.ops_table={dir:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,lookup:xt.node_ops.lookup,mknod:xt.node_ops.mknod,rename:xt.node_ops.rename,unlink:xt.node_ops.unlink,rmdir:xt.node_ops.rmdir,readdir:xt.node_ops.readdir,symlink:xt.node_ops.symlink},stream:{llseek:xt.stream_ops.llseek}},file:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:{llseek:xt.stream_ops.llseek,read:xt.stream_ops.read,write:xt.stream_ops.write,allocate:xt.stream_ops.allocate,mmap:xt.stream_ops.mmap,msync:xt.stream_ops.msync}},link:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,readlink:xt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:Ut.chrdev_stream_ops}});var n=Ut.createNode(e,t,i,r);return Ut.isDir(n.mode)?(n.node_ops=xt.ops_table.dir.node,n.stream_ops=xt.ops_table.dir.stream,n.contents={}):Ut.isFile(n.mode)?(n.node_ops=xt.ops_table.file.node,n.stream_ops=xt.ops_table.file.stream,n.usedBytes=0,n.contents=null):Ut.isLink(n.mode)?(n.node_ops=xt.ops_table.link.node,n.stream_ops=xt.ops_table.link.stream):Ut.isChrdev(n.mode)&&(n.node_ops=xt.ops_table.chrdev.node,n.stream_ops=xt.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=[],i=0;i=t)){t=Math.max(t,i*(i<1048576?2:1.125)|0),0!=i&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),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 i=e.contents;return e.contents=new Uint8Array(new ArrayBuffer(t)),i&&e.contents.set(i.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=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-n,r);if(W(s>=0),s>8&&a.subarray)t.set(a.subarray(n,n+s),i);else for(var o=0;o0||n+rs.timestamp)&&(n.push(i),r++)}));var a=[];if(Object.keys(t.entries).forEach((function(i){t.entries[i];e.entries[i]||(a.push(i),r++)})),!r)return i(null);var s=!1,o=("remote"===e.type?e.db:t.db).transaction([Mt.DB_STORE_NAME],"readwrite"),l=o.objectStore(Mt.DB_STORE_NAME);function f(e){if(e&&!s)return s=!0,i(e)}o.onerror=function(e){f(this.error),e.preventDefault()},o.oncomplete=function(e){s||i(null)},n.sort().forEach((function(e){"local"===t.type?Mt.loadRemoteEntry(l,e,(function(t,i){if(t)return f(t);Mt.storeLocalEntry(e,i,f)})):Mt.loadLocalEntry(e,(function(t,i){if(t)return f(t);Mt.storeRemoteEntry(l,e,i,f)}))})),a.sort().reverse().forEach((function(e){"local"===t.type?Mt.removeLocalEntry(e,f):Mt.removeRemoteEntry(l,e,f)}))}},kt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Pt={isWindows:!1,staticInit:function(){Pt.isWindows=!!i.platform.match(/^win/);var e=i.binding("constants");e.fs&&(e=e.fs),Pt.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)},convertNodeCode:function(e){var t=e.code;return W(t in kt),kt[t]},mount:function(e){return W(w),Pt.createNode(null,"/",Pt.getMode(e.opts.root),0)},createNode:function(e,t,i,r){if(!Ut.isDir(i)&&!Ut.isFile(i)&&!Ut.isLink(i))throw new Ut.ErrnoError(28);var n=Ut.createNode(e,t,i);return n.node_ops=Pt.node_ops,n.stream_ops=Pt.stream_ops,n},getMode:function(e){var t;try{t=Li.lstatSync(e),Pt.isWindows&&(t.mode=t.mode|(292&t.mode)>>2)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}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(),jt.join.apply(null,t)},flagsForNode:function(e){e&=-2097153,e&=-2049,e&=-32769,e&=-524289;var t=0;for(var i in Pt.flagsForNodeMap)e&i&&(t|=Pt.flagsForNodeMap[i],e^=i);if(e)throw new Ut.ErrnoError(28);return t},node_ops:{getattr:function(e){var t,i=Pt.realPath(e);try{t=Li.lstatSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}return Pt.isWindows&&!t.blksize&&(t.blksize=4096),Pt.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 i=Pt.realPath(e);try{if(void 0!==t.mode&&(Li.chmodSync(i,t.mode),e.mode=t.mode),void 0!==t.timestamp){var r=new Date(t.timestamp);Li.utimesSync(i,r,r)}void 0!==t.size&&Li.truncateSync(i,t.size)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},lookup:function(e,t){var i=jt.join2(Pt.realPath(e),t),r=Pt.getMode(i);return Pt.createNode(e,t,r)},mknod:function(e,t,i,r){var n=Pt.createNode(e,t,i,r),a=Pt.realPath(n);try{Ut.isDir(n.mode)?Li.mkdirSync(a,n.mode):Li.writeFileSync(a,"",{mode:n.mode})}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}return n},rename:function(e,t,i){var r=Pt.realPath(e),n=jt.join2(Pt.realPath(t),i);try{Li.renameSync(r,n)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},unlink:function(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.unlinkSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},rmdir:function(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.rmdirSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},readdir:function(e){var t=Pt.realPath(e);try{return Li.readdirSync(t)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},symlink:function(e,t,i){var r=jt.join2(Pt.realPath(e),t);try{Li.symlinkSync(i,r)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},readlink:function(e){var t=Pt.realPath(e);try{return t=Li.readlinkSync(t),t=Bi.relative(Bi.resolve(e.mount.opts.root),t)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}}},stream_ops:{open:function(e){var t=Pt.realPath(e.node);try{Ut.isFile(e.node.mode)&&(e.nfd=Li.openSync(t,Pt.flagsForNode(e.flags)))}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},close:function(e){try{Ut.isFile(e.node.mode)&&e.nfd&&Li.closeSync(e.nfd)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},read:function(e,t,i,r,n){if(0===r)return 0;try{return Li.readSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n)}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},write:function(e,t,i,r,n){try{return Li.writeSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n)}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},llseek:function(e,t,i){var r=t;if(1===i)r+=e.position;else if(2===i&&Ut.isFile(e.node.mode))try{r+=Li.fstatSync(e.nfd).size}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}if(r<0)throw new Ut.ErrnoError(28);return r}}},It={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(e){W(y),It.reader||(It.reader=new FileReaderSync);var t=It.createNode(null,"/",It.DIR_MODE,0),i={};function r(e){for(var r=e.split("/"),n=t,a=0;a=e.node.size)return 0;var a=e.node.contents.slice(n,n+r),s=It.reader.readAsArrayBuffer(a);return t.set(new Uint8Array(s),i),a.size},write:function(e,t,i,r,n){throw new Ut.ErrnoError(29)},llseek:function(e,t,i){var r=t;if(1===i?r+=e.position:2===i&&Ut.isFile(e.node.mode)&&(r+=e.node.size),r<0)throw new Ut.ErrnoError(28);return r}}},Rt={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Ut={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 Ut.ErrnoError))throw e+" : "+gt();return St(e.errno)},lookupPath:function(e,t){if(t=t||{},!(e=Tt.resolve(Ut.cwd(),e)))return{path:"",node:null};var i={follow_mount:!0,recurse_count:0};for(var r in i)void 0===t[r]&&(t[r]=i[r]);if(t.recurse_count>8)throw new Ut.ErrnoError(32);for(var n=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),a=Ut.root,s="/",o=0;o40)throw new Ut.ErrnoError(32)}}return{path:s,node:a}},getPath:function(e){for(var t;;){if(Ut.isRoot(e)){var i=e.mount.mountpoint;return t?"/"!==i[i.length-1]?i+"/"+t:i+t:i}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var i=0,r=0;r>>0)%Ut.nameTable.length},hashAddNode:function(e){var t=Ut.hashName(e.parent.id,e.name);e.name_next=Ut.nameTable[t],Ut.nameTable[t]=e},hashRemoveNode:function(e){var t=Ut.hashName(e.parent.id,e.name);if(Ut.nameTable[t]===e)Ut.nameTable[t]=e.name_next;else for(var i=Ut.nameTable[t];i;){if(i.name_next===e){i.name_next=e.name_next;break}i=i.name_next}},lookupNode:function(e,t){var i=Ut.mayLookup(e);if(i)throw new Ut.ErrnoError(i,e);for(var r=Ut.hashName(e.id,t),n=Ut.nameTable[r];n;n=n.name_next){var a=n.name;if(n.parent.id===e.id&&a===t)return n}return Ut.lookup(e,t)},createNode:function(e,t,i,r){if(!Ut.FSNode){Ut.FSNode=function(e,t,i,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ut.nextInode++,this.name=t,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=r},Ut.FSNode.prototype={};Object.defineProperties(Ut.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 Ut.isDir(this.mode)}},isDevice:{get:function(){return Ut.isChrdev(this.mode)}}})}var n=new Ut.FSNode(e,t,i,r);return Ut.hashAddNode(n),n},destroyNode:function(e){Ut.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=Ut.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 Ut.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){var t=Ut.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{Ut.lookupNode(e,t);return 20}catch(e){}return Ut.nodePermissions(e,"wx")},mayDelete:function(e,t,i){var r;try{r=Ut.lookupNode(e,t)}catch(e){return e.errno}var n=Ut.nodePermissions(e,"wx");if(n)return n;if(i){if(!Ut.isDir(r.mode))return 54;if(Ut.isRoot(r)||Ut.getPath(r)===Ut.cwd())return 10}else if(Ut.isDir(r.mode))return 31;return 0},mayOpen:function(e,t){return e?Ut.isLink(e.mode)?32:Ut.isDir(e.mode)&&("r"!==Ut.flagsToPermissionString(t)||512&t)?31:Ut.nodePermissions(e,Ut.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||Ut.MAX_OPEN_FDS;for(var i=e;i<=t;i++)if(!Ut.streams[i])return i;throw new Ut.ErrnoError(33)},getStream:function(e){return Ut.streams[e]},createStream:function(e,t,i){Ut.FSStream||(Ut.FSStream=function(){},Ut.FSStream.prototype={},Object.defineProperties(Ut.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 r=new Ut.FSStream;for(var n in e)r[n]=e[n];e=r;var a=Ut.nextfd(t,i);return e.fd=a,Ut.streams[a]=e,e},closeStream:function(e){Ut.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=Ut.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new Ut.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){Ut.devices[e]={stream_ops:t}},getDevice:function(e){return Ut.devices[e]},getMounts:function(e){for(var t=[],i=[e];i.length;){var r=i.pop();t.push(r),i.push.apply(i,r.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),Ut.syncFSRequests++,Ut.syncFSRequests>1&&Ut.syncFSRequests;var i=Ut.getMounts(Ut.root.mount),r=0;function n(e){return W(Ut.syncFSRequests>0),Ut.syncFSRequests--,t(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,n(e));++r>=i.length&&n(null)}i.forEach((function(t){if(!t.type.syncfs)return a(null);t.type.syncfs(t,e,a)}))},mount:function(e,t,i){var r,n="/"===i,a=!i;if(n&&Ut.root)throw new Ut.ErrnoError(10);if(!n&&!a){var s=Ut.lookupPath(i,{follow_mount:!1});if(i=s.path,r=s.node,Ut.isMountpoint(r))throw new Ut.ErrnoError(10);if(!Ut.isDir(r.mode))throw new Ut.ErrnoError(54)}var o={type:e,opts:t,mountpoint:i,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,n?Ut.root=l:r&&(r.mounted=o,r.mount&&r.mount.mounts.push(o)),l},unmount:function(e){var t=Ut.lookupPath(e,{follow_mount:!1});if(!Ut.isMountpoint(t.node))throw new Ut.ErrnoError(28);var i=t.node,r=i.mounted,n=Ut.getMounts(r);Object.keys(Ut.nameTable).forEach((function(e){for(var t=Ut.nameTable[e];t;){var i=t.name_next;-1!==n.indexOf(t.mount)&&Ut.destroyNode(t),t=i}})),i.mounted=null;var a=i.mount.mounts.indexOf(r);W(-1!==a),i.mount.mounts.splice(a,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,i){var r=Ut.lookupPath(e,{parent:!0}).node,n=jt.basename(e);if(!n||"."===n||".."===n)throw new Ut.ErrnoError(28);var a=Ut.mayCreate(r,n);if(a)throw new Ut.ErrnoError(a);if(!r.node_ops.mknod)throw new Ut.ErrnoError(63);return r.node_ops.mknod(r,n,t,i)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Ut.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Ut.mknod(e,t,0)},mkdirTree:function(e,t){for(var i=e.split("/"),r="",n=0;nthis.length-1||e<0)){var t=e%this.chunkSize,i=e/this.chunkSize|0;return this.getter(i)[t]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,s=1048576;n||(s=r);var o=this;o.setDataGetter((function(e){var t=e*s,n=(e+1)*s-1;if(n=Math.min(n,r-1),void 0===o.chunks[e]&&(o.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",i,!1),r!==s&&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 "+i+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):Ni(n.responseText||"",!0)}(t,n)),void 0===o.chunks[e])throw new Error("doXHR failed!");return o.chunks[e]})),!a&&r||(s=r=1,r=this.getter(0).length,s=r),this._length=r,this._chunkSize=s,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!y)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var o={isDevice:!1,contents:s}}else o={isDevice:!1,url:i};var l=Ut.createFile(e,t,o,r,n);o.contents?l.contents=o.contents:o.url&&(l.contents=null,l.url=o.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var f={};return Object.keys(l.stream_ops).forEach((function(e){var t=l.stream_ops[e];f[e]=function(){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);return t.apply(null,arguments)}})),f.read=function(e,t,i,r,n){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);var a=e.node.contents;if(n>=a.length)return 0;var s=Math.min(a.length-n,r);if(W(s>=0),a.slice)for(var o=0;o>2]=r.dev,pe[i+4>>2]=0,pe[i+8>>2]=r.ino,pe[i+12>>2]=r.mode,pe[i+16>>2]=r.nlink,pe[i+20>>2]=r.uid,pe[i+24>>2]=r.gid,pe[i+28>>2]=r.rdev,pe[i+32>>2]=0,ft=[r.size>>>0,(lt=r.size,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+40>>2]=ft[0],pe[i+44>>2]=ft[1],pe[i+48>>2]=4096,pe[i+52>>2]=r.blocks,pe[i+56>>2]=r.atime.getTime()/1e3|0,pe[i+60>>2]=0,pe[i+64>>2]=r.mtime.getTime()/1e3|0,pe[i+68>>2]=0,pe[i+72>>2]=r.ctime.getTime()/1e3|0,pe[i+76>>2]=0,ft=[r.ino>>>0,(lt=r.ino,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+80>>2]=ft[0],pe[i+84>>2]=ft[1],0},doMsync:function(e,t,i,r){var n=new Uint8Array(ce.subarray(e,e+i));Ut.msync(t,n,0,i,r)},doMkdir:function(e,t){return"/"===(e=jt.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),Ut.mkdir(e,t,0),0},doMknod:function(e,t,i){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Ut.mknod(e,t,i),0},doReadlink:function(e,t,i){if(i<=0)return-28;var r=Ut.readlink(e),n=Math.min(i,ae(r)),a=he[t+n];return ne(r,t,i+1),he[t+n]=a,n},doAccess:function(e,t){if(-8&t)return-28;var i;if(!(i=Ut.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&Ut.nodePermissions(i,r)?-2:0},doDup:function(e,t,i){var r=Ut.getStream(i);return r&&Ut.close(r),Ut.open(e,t,0,i,i).fd},doReadv:function(e,t,i,r){for(var n=0,a=0;a>2],o=pe[t+(8*a+4)>>2],l=Ut.read(e,he,s,o,r);if(l<0)return-1;if(n+=l,l>2],o=pe[t+(8*a+4)>>2],l=Ut.write(e,he,s,o,r);if(l<0)return-1;n+=l}return n},varargs:0,get:function(e){return Dt.varargs+=4,pe[Dt.varargs-4>>2]},getStr:function(){return ie(Dt.get())},getStreamFromFD:function(e){void 0===e&&(e=Dt.get());var t=Ut.getStream(e);if(!t)throw new Ut.ErrnoError(8);return t},get64:function(){var e=Dt.get(),t=Dt.get();return W(e>=0?0===t:-1===t),e},getZero:function(){W(0===Dt.get())}};function Ft(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD();switch(Dt.get()){case 0:return(r=Dt.get())<0?-28:Ut.open(i.path,i.flags,0,r).fd;case 1:case 2:return 0;case 3:return i.flags;case 4:var r=Dt.get();return i.flags|=r,0;case 12:r=Dt.get();return de[r+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return St(28),-1;default:return-28}}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Ot(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD(),r=Dt.get(),n=Dt.get();return Ut.read(i,he,r,n)}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Lt(e,t){Dt.varargs=t;try{var i=Dt.getStr(),r=Dt.get(),n=Dt.get();return Ut.open(i,r,n).fd}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Bt(){}function Nt(e){try{var t=Dt.getStreamFromFD(e);return Ut.close(t),0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function zt(){return Nt.apply(null,arguments)}function Ht(e,t){try{var i=Dt.getStreamFromFD(e),r=i.tty?2:Ut.isDir(i.mode)?3:Ut.isLink(i.mode)?7:4;return he[t>>0]=r,0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function Vt(){return Ht.apply(null,arguments)}function Yt(e,t,i,r,n){try{var a=Dt.getStreamFromFD(e),s=4294967296*i+(t>>>0);return s<=-9007199254740992||s>=9007199254740992?-61:(Ut.llseek(a,s,r),ft=[a.position>>>0,(lt=a.position,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[n>>2]=ft[0],pe[n+4>>2]=ft[1],a.getdents&&0===s&&0===r&&(a.getdents=null),0)}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function qt(){return Yt.apply(null,arguments)}function Wt(e,t,i,r){try{var n=Dt.getStreamFromFD(e),a=Dt.doWritev(n,t,i);return pe[r>>2]=a,0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function Xt(){return Wt.apply(null,arguments)}function Gt(e){delete ni.xhrs[e-1]}function Kt(){at()}function Qt(){return void 0===Qt.start&&(Qt.start=Date.now()),1e3*(Date.now()-Qt.start)|0}function Zt(){at()}function Jt(){return g||"undefined"!=typeof dateNow||"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now}function $t(e,t){var i;if(0===e)i=Date.now();else{if(1!==e||!Jt())return St(28),-1;i=Zt()}return pe[t>>2]=i/1e3|0,pe[t+4>>2]=i%1e3*1e3*1e3|0,0}function ei(){return he.length}function ti(){return!y}function ii(e){try{return N.grow(e-ue.byteLength+65535>>16),Ee(N.buffer),1}catch(t){console.error("emscripten_realloc_buffer: Attempted to grow heap from "+ue.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function ri(e){var t=ei();W(e>t);if(e>2147418112)return k("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147418112 bytes!"),!1;for(var i=Math.max(t,16777216);i>2]=t,me[e+4>>2]=t/4294967296|0},openDatabase:function(e,t,i,r){try{var n=indexedDB.open(e,t)}catch(e){return r(e)}n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains("FILES")&&t.deleteObjectStore("FILES"),t.createObjectStore("FILES")},n.onsuccess=function(e){i(e.target.result)},n.onerror=function(e){r(e)}},staticInit:function(){var e="undefined"==typeof ENVIRONMENT_IS_FETCH_WORKER;ni.openDatabase("emscripten_filesystem",1,(function(t){ni.dbInstance=t,e&&nt("library_fetch_init")}),(function(){ni.dbInstance=!1,e&&nt("library_fetch_init")})),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||rt("library_fetch_init")}};function ai(e,t,i,r,n){var a=me[e+8>>2];if(a){var s=ie(a),o=e+112,l=ie(o);l||(l="GET");me[o+32>>2];var f=me[o+52>>2],u=me[o+56>>2],h=!!me[o+60>>2],c=(me[o+64>>2],me[o+68>>2]),d=me[o+72>>2],_=me[o+76>>2],p=me[o+80>>2],m=me[o+84>>2],b=me[o+88>>2],v=!!(1&f),y=!!(2&f),g=!!(64&f),w=c?ie(c):void 0,E=d?ie(d):void 0,C=p?ie(p):void 0,S=new XMLHttpRequest;if(S.withCredentials=h,S.open(l,s,!g,w,E),g||(S.timeout=u),S.url_=s,W(!y,"streaming uses moz-chunked-arraybuffer which is no longer supported; TODO: rewrite using fetch()"),S.responseType="arraybuffer",p&&S.overrideMimeType(C),_)for(;;){var j=me[_>>2];if(!j)break;var T=me[_+4>>2];if(!T)break;_+=8;var A=ie(j),x=ie(T);S.setRequestHeader(A,x)}ni.xhrs.push(S);var M=ni.xhrs.length;me[e+0>>2]=M;var k=m&&b?ce.slice(m,m+b):null;S.onload=function(r){var n=S.response?S.response.byteLength:0,a=0,s=0;v&&!y&&(a=ya(s=n),ce.set(new Uint8Array(S.response),a)),me[e+12>>2]=a,ni.setu64(e+16,s),ni.setu64(e+24,0),n&&ni.setu64(e+32,n),_e[e+40>>1]=S.readyState,4===S.readyState&&0===S.status&&(S.status=n>0?200:404),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),S.status>=200&&S.status<300?t&&t(e,S,r):i&&i(e,S,r)},S.onerror=function(t){var r=S.status;4===S.readyState&&0===r&&(r=404),me[e+12>>2]=0,ni.setu64(e+16,0),ni.setu64(e+24,0),ni.setu64(e+32,0),_e[e+40>>1]=S.readyState,_e[e+42>>1]=r,i&&i(e,S,t)},S.ontimeout=function(t){i&&i(e,S,t)},S.onprogress=function(t){var i=v&&y&&S.response?S.response.byteLength:0,n=0;v&&y&&(n=ya(i),ce.set(new Uint8Array(S.response),n)),me[e+12>>2]=n,ni.setu64(e+16,i),ni.setu64(e+24,t.loaded-i),ni.setu64(e+32,t.total),_e[e+40>>1]=S.readyState,S.readyState>=3&&0===S.status&&t.loaded>0&&(S.status=200),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),r&&r(e,S,t)},S.onreadystatechange=function(t){_e[e+40>>1]=S.readyState,S.readyState>=2&&(_e[e+42>>1]=S.status),n&&n(e,S,t)};try{S.send(k)}catch(t){i&&i(e,S,t)}}else i(e,0,"no url specified!")}function si(e,t,i,r,n){if(e){var a=me[t+112+64>>2];a||(a=me[t+8>>2]);var s=ie(a);try{var o=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(i,s);o.onsuccess=function(e){_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),r(t,0,s)},o.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=413,ne("Payload Too Large",t+44,64),n(t,0,e)}}catch(e){n(t,0,e)}}else n(t,0,"IndexedDB not available!")}function oi(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readonly").objectStore("FILES").get(a);s.onsuccess=function(e){if(e.target.result){var n=e.target.result,a=n.byteLength||n.length,s=ya(a);ce.set(new Uint8Array(n),s),me[t+12>>2]=s,ni.setu64(t+16,a),ni.setu64(t+24,0),ni.setu64(t+32,a),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,n)}else _e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,"no data")},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e)}}catch(e){r(t,0,e)}}else r(t,0,"IndexedDB not available!")}function li(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readwrite").objectStore("FILES").delete(a);s.onsuccess=function(e){var r=e.target.result;me[t+12>>2]=0,ni.setu64(t+16,0),ni.setu64(t+24,0),ni.setu64(t+32,0),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,r)},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e)}}catch(e){r(t,0,e)}}else r(t,0,"IndexedDB not available!")}function fi(e,t,i,r,n){void 0!==B&&(B=!0);var a=e+112,s=ie(a),o=me[a+36>>2],l=me[a+40>>2],f=me[a+44>>2],u=me[a+48>>2],h=me[a+52>>2],c=!!(4&h),d=!!(32&h),_=!!(16&h),p=function(e,i,r){o?Ca(o,e):t&&t(e)},m=function(e,t,i){f?Ca(f,e):r&&r(e)},b=function(e,t,r){l?Ca(l,e):i&&i(e)},v=function(e,t,i){u?Ca(u,e):n&&n(e)},y=function(e,i,r){si(ni.dbInstance,e,i.response,(function(e,i,r){o?Ca(o,e):t&&t(e)}),(function(e,i,r){o?Ca(o,e):t&&t(e)}))};if("EM_IDB_STORE"===s){var g=me[a+84>>2];si(ni.dbInstance,e,ce.slice(g,g+me[a+88>>2]),p,b)}else if("EM_IDB_DELETE"===s)li(ni.dbInstance,e,p,b);else if(_){if(d)return 0;ai(e,c?y:p,b,m,v)}else oi(ni.dbInstance,e,p,d?b:c?function(e,t,i){ai(e,y,b,m,v)}:function(e,t,i){ai(e,p,b,m,v)});return e}var ui=Xe;function hi(e){return 0===e?0:(e=ie(e),wt.hasOwnProperty(e)?(hi.ret&&va(hi.ret),hi.ret=se(wt[e]),hi.ret):0)}function ci(e){var t=Date.now();return pe[e>>2]=t/1e3|0,pe[e+4>>2]=t%1e3*1e3|0,0}var di=(ne("GMT",1126928,4),1126928);function _i(e,t){var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getUTCSeconds(),pe[t+4>>2]=i.getUTCMinutes(),pe[t+8>>2]=i.getUTCHours(),pe[t+12>>2]=i.getUTCDate(),pe[t+16>>2]=i.getUTCMonth(),pe[t+20>>2]=i.getUTCFullYear()-1900,pe[t+24>>2]=i.getUTCDay(),pe[t+36>>2]=0,pe[t+32>>2]=0;var r=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),n=(i.getTime()-r)/864e5|0;return pe[t+28>>2]=n,pe[t+40>>2]=di,t}function pi(e){return Math.pow(2,e)}function mi(e){return pi(e)}function bi(e){return Math.log(e)/Math.LN2}function vi(e){var t=yi,i=t.LLVM_SAVEDSTACKS[e];t.LLVM_SAVEDSTACKS.splice(e,1),wa(i)}function yi(){var e=yi;return e.LLVM_SAVEDSTACKS||(e.LLVM_SAVEDSTACKS=[]),e.LLVM_SAVEDSTACKS.push(Ea()),e.LLVM_SAVEDSTACKS.length-1}var gi=Ze;function wi(){if(!wi.called){wi.called=!0,pe[ma()>>2]=60*(new Date).getTimezoneOffset();var e=(new Date).getFullYear(),t=new Date(e,0,1),i=new Date(e,6,1);pe[pa()>>2]=Number(t.getTimezoneOffset()!=i.getTimezoneOffset());var r=o(t),n=o(i),a=J(Ni(r),"i8",Q),s=J(Ni(n),"i8",Q);i.getTimezoneOffset()>2]=a,pe[ba()+4>>2]=s):(pe[ba()>>2]=s,pe[ba()+4>>2]=a)}function o(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}}function Ei(e,t){wi();var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getSeconds(),pe[t+4>>2]=i.getMinutes(),pe[t+8>>2]=i.getHours(),pe[t+12>>2]=i.getDate(),pe[t+16>>2]=i.getMonth(),pe[t+20>>2]=i.getFullYear()-1900,pe[t+24>>2]=i.getDay();var r=new Date(i.getFullYear(),0,1),n=(i.getTime()-r.getTime())/864e5|0;pe[t+28>>2]=n,pe[t+36>>2]=-60*i.getTimezoneOffset();var a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),s=r.getTimezoneOffset(),o=0|(a!=s&&i.getTimezoneOffset()==Math.min(s,a));pe[t+32>>2]=o;var l=pe[ba()+(o?4:0)>>2];return pe[t+40>>2]=l,t}function Ci(e,t,i){ce.set(ce.subarray(t,t+i),e)}function Si(e){var t=e/1e3;if((v||y)&&self.performance&&self.performance.now)for(var i=self.performance.now();self.performance.now()-i>2],r=pe[e+4>>2];return r<0||r>999999999||i<0?(St(28),-1):(0!==t&&(pe[t>>2]=0,pe[t+4>>2]=0),Si(1e6*i+r/1e3))}function Ti(){return 0}function Ai(){return 0}function xi(){return 6}function Mi(){}function ki(e){return e%4==0&&(e%100!=0||e%400==0)}function Pi(e,t){for(var i=0,r=0;r<=t;i+=e[r++]);return i}var Ii=[31,29,31,30,31,30,31,31,30,31,30,31],Ri=[31,28,31,30,31,30,31,31,30,31,30,31];function Ui(e,t){for(var i=new Date(e.getTime());t>0;){var r=ki(i.getFullYear()),n=i.getMonth(),a=(r?Ii:Ri)[n];if(!(t>a-i.getDate()))return i.setDate(i.getDate()+t),i;t-=a-i.getDate()+1,i.setDate(1),n<11?i.setMonth(n+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1))}return i}function Di(e,t,i,r){var n=pe[r+40>>2],a={tm_sec:pe[r>>2],tm_min:pe[r+4>>2],tm_hour:pe[r+8>>2],tm_mday:pe[r+12>>2],tm_mon:pe[r+16>>2],tm_year:pe[r+20>>2],tm_wday:pe[r+24>>2],tm_yday:pe[r+28>>2],tm_isdst:pe[r+32>>2],tm_gmtoff:pe[r+36>>2],tm_zone:n?ie(n):""},s=ie(i),o={"%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","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in o)s=s.replace(new RegExp(l,"g"),o[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(e,t,i){for(var r="number"==typeof e?e.toString():e||"";r.length0?1:0}var r;return 0===(r=i(e.getFullYear()-t.getFullYear()))&&0===(r=i(e.getMonth()-t.getMonth()))&&(r=i(e.getDate()-t.getDate())),r}function _(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 p(e){var t=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday),i=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),n=_(i),a=_(r);return d(n,t)<=0?d(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return f[e.tm_wday].substring(0,3)},"%A":function(e){return f[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return c((e.tm_year+1900)/100|0,2)},"%d":function(e){return c(e.tm_mday,2)},"%e":function(e){return h(e.tm_mday,2," ")},"%g":function(e){return p(e).toString().substring(2)},"%G":function(e){return p(e)},"%H":function(e){return c(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),c(t,2)},"%j":function(e){return c(e.tm_mday+Pi(ki(e.tm_year+1900)?Ii:Ri,e.tm_mon-1),3)},"%m":function(e){return c(e.tm_mon+1,2)},"%M":function(e){return c(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 c(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),i=0===t.getDay()?t:Ui(t,7-t.getDay()),r=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(d(i,r)<0){var n=Pi(ki(r.getFullYear())?Ii:Ri,r.getMonth()-1)-31,a=31-i.getDate()+n+r.getDate();return c(Math.ceil(a/7),2)}return 0===d(i,t)?"01":"00"},"%V":function(e){var t,i=new Date(e.tm_year+1900,0,4),r=new Date(e.tm_year+1901,0,4),n=_(i),a=_(r),s=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday);return d(s,n)<0?"53":d(a,s)<=0?"01":(t=n.getFullYear()=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(i?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in m)s.indexOf(l)>=0&&(s=s.replace(new RegExp(l,"g"),m[l](a)));var b=Ni(s,!1);return b.length>t?0:(le(b,e),b.length-1)}function Fi(e){switch(e){case 30:return ye;case 85:return 2147418112/ye;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.hardwareConcurrency||1}return St(28),-1}function Oi(e){var t=Date.now()/1e3|0;return e&&(pe[e>>2]=t),t}if(Ut.staticInit(),w){var Li=e("fs"),Bi=e("path");Pt.staticInit()}function Ni(e,t,i){var r=i>0?i:ae(e)+1,n=new Array(r),a=re(e,n,0,n.length);return t&&(n.length=a),n}Zt=g?function(){var e=i.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof dateNow?dateNow:"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now?function(){return performance.now()}:Date.now,ni.staticInit();var zi=[0,"jsCall_dd_0","jsCall_dd_1","jsCall_dd_2","jsCall_dd_3","jsCall_dd_4","jsCall_dd_5","jsCall_dd_6","jsCall_dd_7","jsCall_dd_8","jsCall_dd_9","jsCall_dd_10","jsCall_dd_11","jsCall_dd_12","jsCall_dd_13","jsCall_dd_14","jsCall_dd_15","jsCall_dd_16","jsCall_dd_17","jsCall_dd_18","jsCall_dd_19","jsCall_dd_20","jsCall_dd_21","jsCall_dd_22","jsCall_dd_23","jsCall_dd_24","jsCall_dd_25","jsCall_dd_26","jsCall_dd_27","jsCall_dd_28","jsCall_dd_29","jsCall_dd_30","jsCall_dd_31","jsCall_dd_32","jsCall_dd_33","jsCall_dd_34","_sinh","_cosh","_tanh","_sin","_cos","_tan","_atan","_asin","_acos","_exp","_log","_fabs","_etime",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Hi=[0,"jsCall_did_0","jsCall_did_1","jsCall_did_2","jsCall_did_3","jsCall_did_4","jsCall_did_5","jsCall_did_6","jsCall_did_7","jsCall_did_8","jsCall_did_9","jsCall_did_10","jsCall_did_11","jsCall_did_12","jsCall_did_13","jsCall_did_14","jsCall_did_15","jsCall_did_16","jsCall_did_17","jsCall_did_18","jsCall_did_19","jsCall_did_20","jsCall_did_21","jsCall_did_22","jsCall_did_23","jsCall_did_24","jsCall_did_25","jsCall_did_26","jsCall_did_27","jsCall_did_28","jsCall_did_29","jsCall_did_30","jsCall_did_31","jsCall_did_32","jsCall_did_33","jsCall_did_34",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,0],Vi=[0,"jsCall_didd_0","jsCall_didd_1","jsCall_didd_2","jsCall_didd_3","jsCall_didd_4","jsCall_didd_5","jsCall_didd_6","jsCall_didd_7","jsCall_didd_8","jsCall_didd_9","jsCall_didd_10","jsCall_didd_11","jsCall_didd_12","jsCall_didd_13","jsCall_didd_14","jsCall_didd_15","jsCall_didd_16","jsCall_didd_17","jsCall_didd_18","jsCall_didd_19","jsCall_didd_20","jsCall_didd_21","jsCall_didd_22","jsCall_didd_23","jsCall_didd_24","jsCall_didd_25","jsCall_didd_26","jsCall_didd_27","jsCall_didd_28","jsCall_didd_29","jsCall_didd_30","jsCall_didd_31","jsCall_didd_32","jsCall_didd_33","jsCall_didd_34",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,0],Yi=[0,"jsCall_fii_0","jsCall_fii_1","jsCall_fii_2","jsCall_fii_3","jsCall_fii_4","jsCall_fii_5","jsCall_fii_6","jsCall_fii_7","jsCall_fii_8","jsCall_fii_9","jsCall_fii_10","jsCall_fii_11","jsCall_fii_12","jsCall_fii_13","jsCall_fii_14","jsCall_fii_15","jsCall_fii_16","jsCall_fii_17","jsCall_fii_18","jsCall_fii_19","jsCall_fii_20","jsCall_fii_21","jsCall_fii_22","jsCall_fii_23","jsCall_fii_24","jsCall_fii_25","jsCall_fii_26","jsCall_fii_27","jsCall_fii_28","jsCall_fii_29","jsCall_fii_30","jsCall_fii_31","jsCall_fii_32","jsCall_fii_33","jsCall_fii_34","_sbr_sum_square_c",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],qi=[0,"jsCall_fiii_0","jsCall_fiii_1","jsCall_fiii_2","jsCall_fiii_3","jsCall_fiii_4","jsCall_fiii_5","jsCall_fiii_6","jsCall_fiii_7","jsCall_fiii_8","jsCall_fiii_9","jsCall_fiii_10","jsCall_fiii_11","jsCall_fiii_12","jsCall_fiii_13","jsCall_fiii_14","jsCall_fiii_15","jsCall_fiii_16","jsCall_fiii_17","jsCall_fiii_18","jsCall_fiii_19","jsCall_fiii_20","jsCall_fiii_21","jsCall_fiii_22","jsCall_fiii_23","jsCall_fiii_24","jsCall_fiii_25","jsCall_fiii_26","jsCall_fiii_27","jsCall_fiii_28","jsCall_fiii_29","jsCall_fiii_30","jsCall_fiii_31","jsCall_fiii_32","jsCall_fiii_33","jsCall_fiii_34","_avpriv_scalarproduct_float_c",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],Wi=[0,"jsCall_ii_0","jsCall_ii_1","jsCall_ii_2","jsCall_ii_3","jsCall_ii_4","jsCall_ii_5","jsCall_ii_6","jsCall_ii_7","jsCall_ii_8","jsCall_ii_9","jsCall_ii_10","jsCall_ii_11","jsCall_ii_12","jsCall_ii_13","jsCall_ii_14","jsCall_ii_15","jsCall_ii_16","jsCall_ii_17","jsCall_ii_18","jsCall_ii_19","jsCall_ii_20","jsCall_ii_21","jsCall_ii_22","jsCall_ii_23","jsCall_ii_24","jsCall_ii_25","jsCall_ii_26","jsCall_ii_27","jsCall_ii_28","jsCall_ii_29","jsCall_ii_30","jsCall_ii_31","jsCall_ii_32","jsCall_ii_33","jsCall_ii_34","_av_default_item_name","_ff_avio_child_class_next","_flv_probe","_flv_read_header","_flv_read_close","_live_flv_probe","_mov_probe","_mov_read_header","_mov_read_close","_mpegts_probe","_mpegts_read_header","_mpegts_read_close","_format_to_name","_format_child_class_next","_get_category","_urlcontext_to_name","_ff_urlcontext_child_class_next","_sws_context_to_name","_ff_bsf_child_class_next","_hevc_mp4toannexb_init","_hevc_init_thread_copy","_hevc_decode_init","_hevc_decode_free","_context_to_name","_codec_child_class_next","_get_category_2282","_aac_decode_init","_aac_decode_close","_init","___stdio_close","___emscripten_stdout_close","_releaseSniffStreamFunc","_hflv_releaseFunc","_hflv_getBufferLength","_initializeDecoderFunc","__getFrame","_closeVideoFunc","_releaseFunc","_initializeDemuxerFunc","_getPacketFunc","_releaseDemuxerFunc","_io_short_seek","_avio_rb16","_avio_rl16","_av_buffer_allocz","_frame_worker_thread","_av_buffer_alloc","_thread_worker",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Xi=[0,"jsCall_iid_0","jsCall_iid_1","jsCall_iid_2","jsCall_iid_3","jsCall_iid_4","jsCall_iid_5","jsCall_iid_6","jsCall_iid_7","jsCall_iid_8","jsCall_iid_9","jsCall_iid_10","jsCall_iid_11","jsCall_iid_12","jsCall_iid_13","jsCall_iid_14","jsCall_iid_15","jsCall_iid_16","jsCall_iid_17","jsCall_iid_18","jsCall_iid_19","jsCall_iid_20","jsCall_iid_21","jsCall_iid_22","jsCall_iid_23","jsCall_iid_24","jsCall_iid_25","jsCall_iid_26","jsCall_iid_27","jsCall_iid_28","jsCall_iid_29","jsCall_iid_30","jsCall_iid_31","jsCall_iid_32","jsCall_iid_33","jsCall_iid_34","_seekBufferFunc",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],Gi=[0,"jsCall_iidiiii_0","jsCall_iidiiii_1","jsCall_iidiiii_2","jsCall_iidiiii_3","jsCall_iidiiii_4","jsCall_iidiiii_5","jsCall_iidiiii_6","jsCall_iidiiii_7","jsCall_iidiiii_8","jsCall_iidiiii_9","jsCall_iidiiii_10","jsCall_iidiiii_11","jsCall_iidiiii_12","jsCall_iidiiii_13","jsCall_iidiiii_14","jsCall_iidiiii_15","jsCall_iidiiii_16","jsCall_iidiiii_17","jsCall_iidiiii_18","jsCall_iidiiii_19","jsCall_iidiiii_20","jsCall_iidiiii_21","jsCall_iidiiii_22","jsCall_iidiiii_23","jsCall_iidiiii_24","jsCall_iidiiii_25","jsCall_iidiiii_26","jsCall_iidiiii_27","jsCall_iidiiii_28","jsCall_iidiiii_29","jsCall_iidiiii_30","jsCall_iidiiii_31","jsCall_iidiiii_32","jsCall_iidiiii_33","jsCall_iidiiii_34","_fmt_fp",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],Ki=[0,"jsCall_iii_0","jsCall_iii_1","jsCall_iii_2","jsCall_iii_3","jsCall_iii_4","jsCall_iii_5","jsCall_iii_6","jsCall_iii_7","jsCall_iii_8","jsCall_iii_9","jsCall_iii_10","jsCall_iii_11","jsCall_iii_12","jsCall_iii_13","jsCall_iii_14","jsCall_iii_15","jsCall_iii_16","jsCall_iii_17","jsCall_iii_18","jsCall_iii_19","jsCall_iii_20","jsCall_iii_21","jsCall_iii_22","jsCall_iii_23","jsCall_iii_24","jsCall_iii_25","jsCall_iii_26","jsCall_iii_27","jsCall_iii_28","jsCall_iii_29","jsCall_iii_30","jsCall_iii_31","jsCall_iii_32","jsCall_iii_33","jsCall_iii_34","_ff_avio_child_next","_flv_read_packet","_mov_read_packet","_mpegts_read_packet","_mpegts_raw_read_packet","_format_child_next","_urlcontext_child_next","_bsf_child_next","_hevc_mp4toannexb_filter","_hevc_update_thread_context","_null_filter","_codec_child_next","_initSniffStreamFunc","_hflv_initFunc","_hflv_getPacketFunc","_io_read_pause","_descriptor_compare","_hls_decode_entry","_avcodec_default_get_format","_ff_startcode_find_candidate_c","_color_table_compare",0,0,0,0,0,0,0],Qi=[0,"jsCall_iiii_0","jsCall_iiii_1","jsCall_iiii_2","jsCall_iiii_3","jsCall_iiii_4","jsCall_iiii_5","jsCall_iiii_6","jsCall_iiii_7","jsCall_iiii_8","jsCall_iiii_9","jsCall_iiii_10","jsCall_iiii_11","jsCall_iiii_12","jsCall_iiii_13","jsCall_iiii_14","jsCall_iiii_15","jsCall_iiii_16","jsCall_iiii_17","jsCall_iiii_18","jsCall_iiii_19","jsCall_iiii_20","jsCall_iiii_21","jsCall_iiii_22","jsCall_iiii_23","jsCall_iiii_24","jsCall_iiii_25","jsCall_iiii_26","jsCall_iiii_27","jsCall_iiii_28","jsCall_iiii_29","jsCall_iiii_30","jsCall_iiii_31","jsCall_iiii_32","jsCall_iiii_33","jsCall_iiii_34","_mov_read_aclr","_mov_read_avid","_mov_read_ares","_mov_read_avss","_mov_read_av1c","_mov_read_chpl","_mov_read_stco","_mov_read_colr","_mov_read_ctts","_mov_read_default","_mov_read_dpxe","_mov_read_dref","_mov_read_elst","_mov_read_enda","_mov_read_fiel","_mov_read_adrm","_mov_read_ftyp","_mov_read_glbl","_mov_read_hdlr","_mov_read_ilst","_mov_read_jp2h","_mov_read_mdat","_mov_read_mdhd","_mov_read_meta","_mov_read_moof","_mov_read_moov","_mov_read_mvhd","_mov_read_svq3","_mov_read_alac","_mov_read_pasp","_mov_read_sidx","_mov_read_stps","_mov_read_strf","_mov_read_stsc","_mov_read_stsd","_mov_read_stss","_mov_read_stsz","_mov_read_stts","_mov_read_tkhd","_mov_read_tfdt","_mov_read_tfhd","_mov_read_trak","_mov_read_tmcd","_mov_read_chap","_mov_read_trex","_mov_read_trun","_mov_read_wave","_mov_read_esds","_mov_read_dac3","_mov_read_dec3","_mov_read_ddts","_mov_read_wide","_mov_read_wfex","_mov_read_cmov","_mov_read_chan","_mov_read_dvc1","_mov_read_sbgp","_mov_read_uuid","_mov_read_targa_y216","_mov_read_free","_mov_read_custom","_mov_read_frma","_mov_read_senc","_mov_read_saiz","_mov_read_saio","_mov_read_pssh","_mov_read_schm","_mov_read_tenc","_mov_read_dfla","_mov_read_st3d","_mov_read_sv3d","_mov_read_dops","_mov_read_smdm","_mov_read_coll","_mov_read_vpcc","_mov_read_mdcv","_mov_read_clli","_h264_split","_hevc_split","___stdio_write","_sn_write","_read_stream_live","_read_stream_vod","_getSniffStreamPacketFunc","_hflv_read_stream_live","_setCodecTypeFunc","_read_packet","_io_write_packet","_io_read_packet","_dyn_buf_write","_mov_read_keys","_mov_read_udta_string","_avcodec_default_get_buffer2","_do_read",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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Zi=[0,"jsCall_iiiii_0","jsCall_iiiii_1","jsCall_iiiii_2","jsCall_iiiii_3","jsCall_iiiii_4","jsCall_iiiii_5","jsCall_iiiii_6","jsCall_iiiii_7","jsCall_iiiii_8","jsCall_iiiii_9","jsCall_iiiii_10","jsCall_iiiii_11","jsCall_iiiii_12","jsCall_iiiii_13","jsCall_iiiii_14","jsCall_iiiii_15","jsCall_iiiii_16","jsCall_iiiii_17","jsCall_iiiii_18","jsCall_iiiii_19","jsCall_iiiii_20","jsCall_iiiii_21","jsCall_iiiii_22","jsCall_iiiii_23","jsCall_iiiii_24","jsCall_iiiii_25","jsCall_iiiii_26","jsCall_iiiii_27","jsCall_iiiii_28","jsCall_iiiii_29","jsCall_iiiii_30","jsCall_iiiii_31","jsCall_iiiii_32","jsCall_iiiii_33","jsCall_iiiii_34","_hevc_decode_frame","_aac_decode_frame","_hflv_pushBufferFunc","_demuxBoxFunc","_mov_metadata_int8_no_padding","_mov_metadata_track_or_disc_number","_mov_metadata_gnre","_mov_metadata_int8_bypass_padding","_lum_planar_vscale","_chr_planar_vscale","_any_vscale","_packed_vscale","_gamma_convert","_lum_convert","_lum_h_scale","_chr_convert","_chr_h_scale","_no_chr_scale","_hls_decode_entry_wpp",0,0,0,0,0,0,0,0,0],Ji=[0,"jsCall_iiiiii_0","jsCall_iiiiii_1","jsCall_iiiiii_2","jsCall_iiiiii_3","jsCall_iiiiii_4","jsCall_iiiiii_5","jsCall_iiiiii_6","jsCall_iiiiii_7","jsCall_iiiiii_8","jsCall_iiiiii_9","jsCall_iiiiii_10","jsCall_iiiiii_11","jsCall_iiiiii_12","jsCall_iiiiii_13","jsCall_iiiiii_14","jsCall_iiiiii_15","jsCall_iiiiii_16","jsCall_iiiiii_17","jsCall_iiiiii_18","jsCall_iiiiii_19","jsCall_iiiiii_20","jsCall_iiiiii_21","jsCall_iiiiii_22","jsCall_iiiiii_23","jsCall_iiiiii_24","jsCall_iiiiii_25","jsCall_iiiiii_26","jsCall_iiiiii_27","jsCall_iiiiii_28","jsCall_iiiiii_29","jsCall_iiiiii_30","jsCall_iiiiii_31","jsCall_iiiiii_32","jsCall_iiiiii_33","jsCall_iiiiii_34","_pushBufferFunc","_decodeCodecContextFunc","_io_open_default","_avcodec_default_execute2","_thread_execute2","_sbr_lf_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],$i=[0,"jsCall_iiiiiii_0","jsCall_iiiiiii_1","jsCall_iiiiiii_2","jsCall_iiiiiii_3","jsCall_iiiiiii_4","jsCall_iiiiiii_5","jsCall_iiiiiii_6","jsCall_iiiiiii_7","jsCall_iiiiiii_8","jsCall_iiiiiii_9","jsCall_iiiiiii_10","jsCall_iiiiiii_11","jsCall_iiiiiii_12","jsCall_iiiiiii_13","jsCall_iiiiiii_14","jsCall_iiiiiii_15","jsCall_iiiiiii_16","jsCall_iiiiiii_17","jsCall_iiiiiii_18","jsCall_iiiiiii_19","jsCall_iiiiiii_20","jsCall_iiiiiii_21","jsCall_iiiiiii_22","jsCall_iiiiiii_23","jsCall_iiiiiii_24","jsCall_iiiiiii_25","jsCall_iiiiiii_26","jsCall_iiiiiii_27","jsCall_iiiiiii_28","jsCall_iiiiiii_29","jsCall_iiiiiii_30","jsCall_iiiiiii_31","jsCall_iiiiiii_32","jsCall_iiiiiii_33","jsCall_iiiiiii_34","_h264_parse","_hevc_parse","_hflv_decodeVideoFrameFunc","_avcodec_default_execute","_thread_execute","_sbr_x_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],er=[0,"jsCall_iiiiiiii_0","jsCall_iiiiiiii_1","jsCall_iiiiiiii_2","jsCall_iiiiiiii_3","jsCall_iiiiiiii_4","jsCall_iiiiiiii_5","jsCall_iiiiiiii_6","jsCall_iiiiiiii_7","jsCall_iiiiiiii_8","jsCall_iiiiiiii_9","jsCall_iiiiiiii_10","jsCall_iiiiiiii_11","jsCall_iiiiiiii_12","jsCall_iiiiiiii_13","jsCall_iiiiiiii_14","jsCall_iiiiiiii_15","jsCall_iiiiiiii_16","jsCall_iiiiiiii_17","jsCall_iiiiiiii_18","jsCall_iiiiiiii_19","jsCall_iiiiiiii_20","jsCall_iiiiiiii_21","jsCall_iiiiiiii_22","jsCall_iiiiiiii_23","jsCall_iiiiiiii_24","jsCall_iiiiiiii_25","jsCall_iiiiiiii_26","jsCall_iiiiiiii_27","jsCall_iiiiiiii_28","jsCall_iiiiiiii_29","jsCall_iiiiiiii_30","jsCall_iiiiiiii_31","jsCall_iiiiiiii_32","jsCall_iiiiiiii_33","jsCall_iiiiiiii_34","_decodeVideoFrameFunc","_setSniffStreamCodecTypeFunc","_hflv_setSniffStreamCodecTypeFunc","_swscale","_ff_sws_alphablendaway","_yuv2rgb_c_32","_yuva2rgba_c","_yuv2rgb_c_bgr48","_yuv2rgb_c_48","_yuva2argb_c","_yuv2rgb_c_24_rgb","_yuv2rgb_c_24_bgr","_yuv2rgb_c_16_ordered_dither","_yuv2rgb_c_15_ordered_dither","_yuv2rgb_c_12_ordered_dither","_yuv2rgb_c_8_ordered_dither","_yuv2rgb_c_4_ordered_dither","_yuv2rgb_c_4b_ordered_dither","_yuv2rgb_c_1_ordered_dither","_planarToP01xWrapper","_planar8ToP01xleWrapper","_yvu9ToYv12Wrapper","_bgr24ToYv12Wrapper","_rgbToRgbWrapper","_planarRgbToplanarRgbWrapper","_planarRgbToRgbWrapper","_planarRgbaToRgbWrapper","_Rgb16ToPlanarRgb16Wrapper","_planarRgb16ToRgb16Wrapper","_rgbToPlanarRgbWrapper","_bayer_to_rgb24_wrapper","_bayer_to_yv12_wrapper","_bswap_16bpc","_palToRgbWrapper","_yuv422pToYuy2Wrapper","_yuv422pToUyvyWrapper","_uint_y_to_float_y_wrapper","_float_y_to_uint_y_wrapper","_planarToYuy2Wrapper","_planarToUyvyWrapper","_yuyvToYuv420Wrapper","_uyvyToYuv420Wrapper","_yuyvToYuv422Wrapper","_uyvyToYuv422Wrapper","_packedCopyWrapper","_planarCopyWrapper","_planarToNv12Wrapper","_planarToNv24Wrapper","_nv12ToPlanarWrapper","_nv24ToPlanarWrapper",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],tr=[0,"jsCall_iiiiij_0","jsCall_iiiiij_1","jsCall_iiiiij_2","jsCall_iiiiij_3","jsCall_iiiiij_4","jsCall_iiiiij_5","jsCall_iiiiij_6","jsCall_iiiiij_7","jsCall_iiiiij_8","jsCall_iiiiij_9","jsCall_iiiiij_10","jsCall_iiiiij_11","jsCall_iiiiij_12","jsCall_iiiiij_13","jsCall_iiiiij_14","jsCall_iiiiij_15","jsCall_iiiiij_16","jsCall_iiiiij_17","jsCall_iiiiij_18","jsCall_iiiiij_19","jsCall_iiiiij_20","jsCall_iiiiij_21","jsCall_iiiiij_22","jsCall_iiiiij_23","jsCall_iiiiij_24","jsCall_iiiiij_25","jsCall_iiiiij_26","jsCall_iiiiij_27","jsCall_iiiiij_28","jsCall_iiiiij_29","jsCall_iiiiij_30","jsCall_iiiiij_31","jsCall_iiiiij_32","jsCall_iiiiij_33","jsCall_iiiiij_34","_mpegts_push_data",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],ir=[0,"jsCall_iiiji_0","jsCall_iiiji_1","jsCall_iiiji_2","jsCall_iiiji_3","jsCall_iiiji_4","jsCall_iiiji_5","jsCall_iiiji_6","jsCall_iiiji_7","jsCall_iiiji_8","jsCall_iiiji_9","jsCall_iiiji_10","jsCall_iiiji_11","jsCall_iiiji_12","jsCall_iiiji_13","jsCall_iiiji_14","jsCall_iiiji_15","jsCall_iiiji_16","jsCall_iiiji_17","jsCall_iiiji_18","jsCall_iiiji_19","jsCall_iiiji_20","jsCall_iiiji_21","jsCall_iiiji_22","jsCall_iiiji_23","jsCall_iiiji_24","jsCall_iiiji_25","jsCall_iiiji_26","jsCall_iiiji_27","jsCall_iiiji_28","jsCall_iiiji_29","jsCall_iiiji_30","jsCall_iiiji_31","jsCall_iiiji_32","jsCall_iiiji_33","jsCall_iiiji_34","_flv_read_seek","_mov_read_seek",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],rr=[0,"jsCall_iiijjji_0","jsCall_iiijjji_1","jsCall_iiijjji_2","jsCall_iiijjji_3","jsCall_iiijjji_4","jsCall_iiijjji_5","jsCall_iiijjji_6","jsCall_iiijjji_7","jsCall_iiijjji_8","jsCall_iiijjji_9","jsCall_iiijjji_10","jsCall_iiijjji_11","jsCall_iiijjji_12","jsCall_iiijjji_13","jsCall_iiijjji_14","jsCall_iiijjji_15","jsCall_iiijjji_16","jsCall_iiijjji_17","jsCall_iiijjji_18","jsCall_iiijjji_19","jsCall_iiijjji_20","jsCall_iiijjji_21","jsCall_iiijjji_22","jsCall_iiijjji_23","jsCall_iiijjji_24","jsCall_iiijjji_25","jsCall_iiijjji_26","jsCall_iiijjji_27","jsCall_iiijjji_28","jsCall_iiijjji_29","jsCall_iiijjji_30","jsCall_iiijjji_31","jsCall_iiijjji_32","jsCall_iiijjji_33","jsCall_iiijjji_34",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,0],nr=[0,"jsCall_jiiij_0","jsCall_jiiij_1","jsCall_jiiij_2","jsCall_jiiij_3","jsCall_jiiij_4","jsCall_jiiij_5","jsCall_jiiij_6","jsCall_jiiij_7","jsCall_jiiij_8","jsCall_jiiij_9","jsCall_jiiij_10","jsCall_jiiij_11","jsCall_jiiij_12","jsCall_jiiij_13","jsCall_jiiij_14","jsCall_jiiij_15","jsCall_jiiij_16","jsCall_jiiij_17","jsCall_jiiij_18","jsCall_jiiij_19","jsCall_jiiij_20","jsCall_jiiij_21","jsCall_jiiij_22","jsCall_jiiij_23","jsCall_jiiij_24","jsCall_jiiij_25","jsCall_jiiij_26","jsCall_jiiij_27","jsCall_jiiij_28","jsCall_jiiij_29","jsCall_jiiij_30","jsCall_jiiij_31","jsCall_jiiij_32","jsCall_jiiij_33","jsCall_jiiij_34","_mpegts_get_dts",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],ar=[0,"jsCall_jiiji_0","jsCall_jiiji_1","jsCall_jiiji_2","jsCall_jiiji_3","jsCall_jiiji_4","jsCall_jiiji_5","jsCall_jiiji_6","jsCall_jiiji_7","jsCall_jiiji_8","jsCall_jiiji_9","jsCall_jiiji_10","jsCall_jiiji_11","jsCall_jiiji_12","jsCall_jiiji_13","jsCall_jiiji_14","jsCall_jiiji_15","jsCall_jiiji_16","jsCall_jiiji_17","jsCall_jiiji_18","jsCall_jiiji_19","jsCall_jiiji_20","jsCall_jiiji_21","jsCall_jiiji_22","jsCall_jiiji_23","jsCall_jiiji_24","jsCall_jiiji_25","jsCall_jiiji_26","jsCall_jiiji_27","jsCall_jiiji_28","jsCall_jiiji_29","jsCall_jiiji_30","jsCall_jiiji_31","jsCall_jiiji_32","jsCall_jiiji_33","jsCall_jiiji_34","_io_read_seek",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],sr=[0,"jsCall_jiji_0","jsCall_jiji_1","jsCall_jiji_2","jsCall_jiji_3","jsCall_jiji_4","jsCall_jiji_5","jsCall_jiji_6","jsCall_jiji_7","jsCall_jiji_8","jsCall_jiji_9","jsCall_jiji_10","jsCall_jiji_11","jsCall_jiji_12","jsCall_jiji_13","jsCall_jiji_14","jsCall_jiji_15","jsCall_jiji_16","jsCall_jiji_17","jsCall_jiji_18","jsCall_jiji_19","jsCall_jiji_20","jsCall_jiji_21","jsCall_jiji_22","jsCall_jiji_23","jsCall_jiji_24","jsCall_jiji_25","jsCall_jiji_26","jsCall_jiji_27","jsCall_jiji_28","jsCall_jiji_29","jsCall_jiji_30","jsCall_jiji_31","jsCall_jiji_32","jsCall_jiji_33","jsCall_jiji_34","___stdio_seek","___emscripten_stdout_seek","_seek_in_buffer","_io_seek","_dyn_buf_seek",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],or=[0,"jsCall_v_0","jsCall_v_1","jsCall_v_2","jsCall_v_3","jsCall_v_4","jsCall_v_5","jsCall_v_6","jsCall_v_7","jsCall_v_8","jsCall_v_9","jsCall_v_10","jsCall_v_11","jsCall_v_12","jsCall_v_13","jsCall_v_14","jsCall_v_15","jsCall_v_16","jsCall_v_17","jsCall_v_18","jsCall_v_19","jsCall_v_20","jsCall_v_21","jsCall_v_22","jsCall_v_23","jsCall_v_24","jsCall_v_25","jsCall_v_26","jsCall_v_27","jsCall_v_28","jsCall_v_29","jsCall_v_30","jsCall_v_31","jsCall_v_32","jsCall_v_33","jsCall_v_34","_init_ff_cos_tabs_16","_init_ff_cos_tabs_32","_init_ff_cos_tabs_64","_init_ff_cos_tabs_128","_init_ff_cos_tabs_256","_init_ff_cos_tabs_512","_init_ff_cos_tabs_1024","_init_ff_cos_tabs_2048","_init_ff_cos_tabs_4096","_init_ff_cos_tabs_8192","_init_ff_cos_tabs_16384","_init_ff_cos_tabs_32768","_init_ff_cos_tabs_65536","_init_ff_cos_tabs_131072","_introduce_mine","_introduceMineFunc","_av_format_init_next","_av_codec_init_static","_av_codec_init_next","_aac_static_table_init","_AV_CRC_8_ATM_init_table_once","_AV_CRC_8_EBU_init_table_once","_AV_CRC_16_ANSI_init_table_once","_AV_CRC_16_CCITT_init_table_once","_AV_CRC_24_IEEE_init_table_once","_AV_CRC_32_IEEE_init_table_once","_AV_CRC_32_IEEE_LE_init_table_once","_AV_CRC_16_ANSI_LE_init_table_once"],lr=[0,"jsCall_vdiidiiiii_0","jsCall_vdiidiiiii_1","jsCall_vdiidiiiii_2","jsCall_vdiidiiiii_3","jsCall_vdiidiiiii_4","jsCall_vdiidiiiii_5","jsCall_vdiidiiiii_6","jsCall_vdiidiiiii_7","jsCall_vdiidiiiii_8","jsCall_vdiidiiiii_9","jsCall_vdiidiiiii_10","jsCall_vdiidiiiii_11","jsCall_vdiidiiiii_12","jsCall_vdiidiiiii_13","jsCall_vdiidiiiii_14","jsCall_vdiidiiiii_15","jsCall_vdiidiiiii_16","jsCall_vdiidiiiii_17","jsCall_vdiidiiiii_18","jsCall_vdiidiiiii_19","jsCall_vdiidiiiii_20","jsCall_vdiidiiiii_21","jsCall_vdiidiiiii_22","jsCall_vdiidiiiii_23","jsCall_vdiidiiiii_24","jsCall_vdiidiiiii_25","jsCall_vdiidiiiii_26","jsCall_vdiidiiiii_27","jsCall_vdiidiiiii_28","jsCall_vdiidiiiii_29","jsCall_vdiidiiiii_30","jsCall_vdiidiiiii_31","jsCall_vdiidiiiii_32","jsCall_vdiidiiiii_33","jsCall_vdiidiiiii_34",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,0],fr=[0,"jsCall_vi_0","jsCall_vi_1","jsCall_vi_2","jsCall_vi_3","jsCall_vi_4","jsCall_vi_5","jsCall_vi_6","jsCall_vi_7","jsCall_vi_8","jsCall_vi_9","jsCall_vi_10","jsCall_vi_11","jsCall_vi_12","jsCall_vi_13","jsCall_vi_14","jsCall_vi_15","jsCall_vi_16","jsCall_vi_17","jsCall_vi_18","jsCall_vi_19","jsCall_vi_20","jsCall_vi_21","jsCall_vi_22","jsCall_vi_23","jsCall_vi_24","jsCall_vi_25","jsCall_vi_26","jsCall_vi_27","jsCall_vi_28","jsCall_vi_29","jsCall_vi_30","jsCall_vi_31","jsCall_vi_32","jsCall_vi_33","jsCall_vi_34","_free_geobtag","_free_apic","_free_chapter","_free_priv","_hevc_decode_flush","_flush","_h264_close","_hevc_parser_close","_fft4","_fft8","_fft16","_fft32","_fft64","_fft128","_fft256","_fft512","_fft1024","_fft2048","_fft4096","_fft8192","_fft16384","_fft32768","_fft65536","_fft131072","_logRequest_downloadSucceeded","_logRequest_downloadFailed","_downloadSucceeded","_downloadFailed","_transform_4x4_luma_9","_idct_4x4_dc_9","_idct_8x8_dc_9","_idct_16x16_dc_9","_idct_32x32_dc_9","_transform_4x4_luma_10","_idct_4x4_dc_10","_idct_8x8_dc_10","_idct_16x16_dc_10","_idct_32x32_dc_10","_transform_4x4_luma_12","_idct_4x4_dc_12","_idct_8x8_dc_12","_idct_16x16_dc_12","_idct_32x32_dc_12","_transform_4x4_luma_8","_idct_4x4_dc_8","_idct_8x8_dc_8","_idct_16x16_dc_8","_idct_32x32_dc_8","_main_function","_sbr_sum64x5_c","_sbr_neg_odd_64_c","_sbr_qmf_pre_shuffle_c",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,0,0,0,0,0,0,0,0,0,0,0,0,0],ur=[0,"jsCall_vii_0","jsCall_vii_1","jsCall_vii_2","jsCall_vii_3","jsCall_vii_4","jsCall_vii_5","jsCall_vii_6","jsCall_vii_7","jsCall_vii_8","jsCall_vii_9","jsCall_vii_10","jsCall_vii_11","jsCall_vii_12","jsCall_vii_13","jsCall_vii_14","jsCall_vii_15","jsCall_vii_16","jsCall_vii_17","jsCall_vii_18","jsCall_vii_19","jsCall_vii_20","jsCall_vii_21","jsCall_vii_22","jsCall_vii_23","jsCall_vii_24","jsCall_vii_25","jsCall_vii_26","jsCall_vii_27","jsCall_vii_28","jsCall_vii_29","jsCall_vii_30","jsCall_vii_31","jsCall_vii_32","jsCall_vii_33","jsCall_vii_34","_io_close_default","_lumRangeFromJpeg_c","_lumRangeToJpeg_c","_lumRangeFromJpeg16_c","_lumRangeToJpeg16_c","_decode_data_free","_dequant_9","_idct_4x4_9","_idct_8x8_9","_idct_16x16_9","_idct_32x32_9","_dequant_10","_idct_4x4_10","_idct_8x8_10","_idct_16x16_10","_idct_32x32_10","_dequant_12","_idct_4x4_12","_idct_8x8_12","_idct_16x16_12","_idct_32x32_12","_dequant_8","_idct_4x4_8","_idct_8x8_8","_idct_16x16_8","_idct_32x32_8","_imdct_and_windowing","_apply_ltp","_update_ltp","_imdct_and_windowing_ld","_imdct_and_windowing_eld","_imdct_and_windowing_960","_ff_h264_chroma_dc_dequant_idct_9_c","_ff_h264_chroma422_dc_dequant_idct_9_c","_ff_h264_chroma_dc_dequant_idct_10_c","_ff_h264_chroma422_dc_dequant_idct_10_c","_ff_h264_chroma_dc_dequant_idct_12_c","_ff_h264_chroma422_dc_dequant_idct_12_c","_ff_h264_chroma_dc_dequant_idct_14_c","_ff_h264_chroma422_dc_dequant_idct_14_c","_ff_h264_chroma_dc_dequant_idct_8_c","_ff_h264_chroma422_dc_dequant_idct_8_c","_hevc_pps_free","_sbr_qmf_post_shuffle_c","_sbr_qmf_deint_neg_c","_sbr_autocorrelate_c","_fft_permute_c","_fft_calc_c","_av_buffer_default_free","_pool_release_buffer","_sha1_transform","_sha256_transform","_pop_arg_long_double",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,0,0,0,0,0,0,0,0,0,0,0,0],hr=[0,"jsCall_viidi_0","jsCall_viidi_1","jsCall_viidi_2","jsCall_viidi_3","jsCall_viidi_4","jsCall_viidi_5","jsCall_viidi_6","jsCall_viidi_7","jsCall_viidi_8","jsCall_viidi_9","jsCall_viidi_10","jsCall_viidi_11","jsCall_viidi_12","jsCall_viidi_13","jsCall_viidi_14","jsCall_viidi_15","jsCall_viidi_16","jsCall_viidi_17","jsCall_viidi_18","jsCall_viidi_19","jsCall_viidi_20","jsCall_viidi_21","jsCall_viidi_22","jsCall_viidi_23","jsCall_viidi_24","jsCall_viidi_25","jsCall_viidi_26","jsCall_viidi_27","jsCall_viidi_28","jsCall_viidi_29","jsCall_viidi_30","jsCall_viidi_31","jsCall_viidi_32","jsCall_viidi_33","jsCall_viidi_34","_vector_dmac_scalar_c","_vector_dmul_scalar_c",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],cr=[0,"jsCall_viifi_0","jsCall_viifi_1","jsCall_viifi_2","jsCall_viifi_3","jsCall_viifi_4","jsCall_viifi_5","jsCall_viifi_6","jsCall_viifi_7","jsCall_viifi_8","jsCall_viifi_9","jsCall_viifi_10","jsCall_viifi_11","jsCall_viifi_12","jsCall_viifi_13","jsCall_viifi_14","jsCall_viifi_15","jsCall_viifi_16","jsCall_viifi_17","jsCall_viifi_18","jsCall_viifi_19","jsCall_viifi_20","jsCall_viifi_21","jsCall_viifi_22","jsCall_viifi_23","jsCall_viifi_24","jsCall_viifi_25","jsCall_viifi_26","jsCall_viifi_27","jsCall_viifi_28","jsCall_viifi_29","jsCall_viifi_30","jsCall_viifi_31","jsCall_viifi_32","jsCall_viifi_33","jsCall_viifi_34","_vector_fmac_scalar_c","_vector_fmul_scalar_c",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],dr=[0,"jsCall_viii_0","jsCall_viii_1","jsCall_viii_2","jsCall_viii_3","jsCall_viii_4","jsCall_viii_5","jsCall_viii_6","jsCall_viii_7","jsCall_viii_8","jsCall_viii_9","jsCall_viii_10","jsCall_viii_11","jsCall_viii_12","jsCall_viii_13","jsCall_viii_14","jsCall_viii_15","jsCall_viii_16","jsCall_viii_17","jsCall_viii_18","jsCall_viii_19","jsCall_viii_20","jsCall_viii_21","jsCall_viii_22","jsCall_viii_23","jsCall_viii_24","jsCall_viii_25","jsCall_viii_26","jsCall_viii_27","jsCall_viii_28","jsCall_viii_29","jsCall_viii_30","jsCall_viii_31","jsCall_viii_32","jsCall_viii_33","jsCall_viii_34","_avcHandleFrame","_handleFrame","_sdt_cb","_pat_cb","_pmt_cb","_scte_data_cb","_m4sl_cb","_chrRangeFromJpeg_c","_chrRangeToJpeg_c","_chrRangeFromJpeg16_c","_chrRangeToJpeg16_c","_rgb15to16_c","_rgb15tobgr24_c","_rgb15to32_c","_rgb16tobgr24_c","_rgb16to32_c","_rgb16to15_c","_rgb24tobgr16_c","_rgb24tobgr15_c","_rgb24tobgr32_c","_rgb32to16_c","_rgb32to15_c","_rgb32tobgr24_c","_rgb24to15_c","_rgb24to16_c","_rgb24tobgr24_c","_shuffle_bytes_0321_c","_shuffle_bytes_2103_c","_shuffle_bytes_1230_c","_shuffle_bytes_3012_c","_shuffle_bytes_3210_c","_rgb32tobgr16_c","_rgb32tobgr15_c","_rgb48tobgr48_bswap","_rgb48tobgr64_bswap","_rgb48to64_bswap","_rgb64to48_bswap","_rgb48tobgr48_nobswap","_rgb48tobgr64_nobswap","_rgb48to64_nobswap","_rgb64tobgr48_nobswap","_rgb64tobgr48_bswap","_rgb64to48_nobswap","_rgb12to15","_rgb15to24","_rgb16to24","_rgb32to24","_rgb24to32","_rgb12tobgr12","_rgb15tobgr15","_rgb16tobgr15","_rgb15tobgr16","_rgb16tobgr16","_rgb15tobgr32","_rgb16tobgr32","_add_residual4x4_9","_add_residual8x8_9","_add_residual16x16_9","_add_residual32x32_9","_transform_rdpcm_9","_add_residual4x4_10","_add_residual8x8_10","_add_residual16x16_10","_add_residual32x32_10","_transform_rdpcm_10","_add_residual4x4_12","_add_residual8x8_12","_add_residual16x16_12","_add_residual32x32_12","_transform_rdpcm_12","_add_residual4x4_8","_add_residual8x8_8","_add_residual16x16_8","_add_residual32x32_8","_transform_rdpcm_8","_just_return","_bswap_buf","_bswap16_buf","_ff_h264_add_pixels4_16_c","_ff_h264_add_pixels4_8_c","_ff_h264_add_pixels8_16_c","_ff_h264_add_pixels8_8_c","_ff_h264_idct_add_9_c","_ff_h264_idct8_add_9_c","_ff_h264_idct_dc_add_9_c","_ff_h264_idct8_dc_add_9_c","_ff_h264_luma_dc_dequant_idct_9_c","_ff_h264_idct_add_10_c","_ff_h264_idct8_add_10_c","_ff_h264_idct_dc_add_10_c","_ff_h264_idct8_dc_add_10_c","_ff_h264_luma_dc_dequant_idct_10_c","_ff_h264_idct_add_12_c","_ff_h264_idct8_add_12_c","_ff_h264_idct_dc_add_12_c","_ff_h264_idct8_dc_add_12_c","_ff_h264_luma_dc_dequant_idct_12_c","_ff_h264_idct_add_14_c","_ff_h264_idct8_add_14_c","_ff_h264_idct_dc_add_14_c","_ff_h264_idct8_dc_add_14_c","_ff_h264_luma_dc_dequant_idct_14_c","_ff_h264_idct_add_8_c","_ff_h264_idct8_add_8_c","_ff_h264_idct_dc_add_8_c","_ff_h264_idct8_dc_add_8_c","_ff_h264_luma_dc_dequant_idct_8_c","_sbr_qmf_deint_bfly_c","_ps_add_squares_c","_ff_imdct_calc_c","_ff_imdct_half_c","_ff_mdct_calc_c","_butterflies_float_c",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,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,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,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],_r=[0,"jsCall_viiii_0","jsCall_viiii_1","jsCall_viiii_2","jsCall_viiii_3","jsCall_viiii_4","jsCall_viiii_5","jsCall_viiii_6","jsCall_viiii_7","jsCall_viiii_8","jsCall_viiii_9","jsCall_viiii_10","jsCall_viiii_11","jsCall_viiii_12","jsCall_viiii_13","jsCall_viiii_14","jsCall_viiii_15","jsCall_viiii_16","jsCall_viiii_17","jsCall_viiii_18","jsCall_viiii_19","jsCall_viiii_20","jsCall_viiii_21","jsCall_viiii_22","jsCall_viiii_23","jsCall_viiii_24","jsCall_viiii_25","jsCall_viiii_26","jsCall_viiii_27","jsCall_viiii_28","jsCall_viiii_29","jsCall_viiii_30","jsCall_viiii_31","jsCall_viiii_32","jsCall_viiii_33","jsCall_viiii_34","_planar_rgb9le_to_y","_planar_rgb10le_to_a","_planar_rgb10le_to_y","_planar_rgb12le_to_a","_planar_rgb12le_to_y","_planar_rgb14le_to_y","_planar_rgb16le_to_a","_planar_rgb16le_to_y","_planar_rgb9be_to_y","_planar_rgb10be_to_a","_planar_rgb10be_to_y","_planar_rgb12be_to_a","_planar_rgb12be_to_y","_planar_rgb14be_to_y","_planar_rgb16be_to_a","_planar_rgb16be_to_y","_planar_rgb_to_a","_planar_rgb_to_y","_gray8aToPacked32","_gray8aToPacked32_1","_gray8aToPacked24","_sws_convertPalette8ToPacked32","_sws_convertPalette8ToPacked24","_intra_pred_2_9","_intra_pred_3_9","_intra_pred_4_9","_intra_pred_5_9","_pred_planar_0_9","_pred_planar_1_9","_pred_planar_2_9","_pred_planar_3_9","_intra_pred_2_10","_intra_pred_3_10","_intra_pred_4_10","_intra_pred_5_10","_pred_planar_0_10","_pred_planar_1_10","_pred_planar_2_10","_pred_planar_3_10","_intra_pred_2_12","_intra_pred_3_12","_intra_pred_4_12","_intra_pred_5_12","_pred_planar_0_12","_pred_planar_1_12","_pred_planar_2_12","_pred_planar_3_12","_intra_pred_2_8","_intra_pred_3_8","_intra_pred_4_8","_intra_pred_5_8","_pred_planar_0_8","_pred_planar_1_8","_pred_planar_2_8","_pred_planar_3_8","_apply_tns","_windowing_and_mdct_ltp","_h264_v_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_mbaff_intra_9_c","_h264_v_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma422_intra_9_c","_h264_h_loop_filter_chroma_mbaff_intra_9_c","_h264_h_loop_filter_chroma422_mbaff_intra_9_c","_h264_v_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_mbaff_intra_10_c","_h264_v_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma422_intra_10_c","_h264_h_loop_filter_chroma_mbaff_intra_10_c","_h264_h_loop_filter_chroma422_mbaff_intra_10_c","_h264_v_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_mbaff_intra_12_c","_h264_v_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma422_intra_12_c","_h264_h_loop_filter_chroma_mbaff_intra_12_c","_h264_h_loop_filter_chroma422_mbaff_intra_12_c","_h264_v_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_mbaff_intra_14_c","_h264_v_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma422_intra_14_c","_h264_h_loop_filter_chroma_mbaff_intra_14_c","_h264_h_loop_filter_chroma422_mbaff_intra_14_c","_h264_v_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_mbaff_intra_8_c","_h264_v_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma422_intra_8_c","_h264_h_loop_filter_chroma_mbaff_intra_8_c","_h264_h_loop_filter_chroma422_mbaff_intra_8_c","_fft15_c","_mdct15","_imdct15_half","_ps_mul_pair_single_c","_ps_hybrid_analysis_ileave_c","_ps_hybrid_synthesis_deint_c","_vector_fmul_c","_vector_dmul_c","_vector_fmul_reverse_c","_av_log_default_callback",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,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,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,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,0,0,0,0,0],pr=[0,"jsCall_viiiid_0","jsCall_viiiid_1","jsCall_viiiid_2","jsCall_viiiid_3","jsCall_viiiid_4","jsCall_viiiid_5","jsCall_viiiid_6","jsCall_viiiid_7","jsCall_viiiid_8","jsCall_viiiid_9","jsCall_viiiid_10","jsCall_viiiid_11","jsCall_viiiid_12","jsCall_viiiid_13","jsCall_viiiid_14","jsCall_viiiid_15","jsCall_viiiid_16","jsCall_viiiid_17","jsCall_viiiid_18","jsCall_viiiid_19","jsCall_viiiid_20","jsCall_viiiid_21","jsCall_viiiid_22","jsCall_viiiid_23","jsCall_viiiid_24","jsCall_viiiid_25","jsCall_viiiid_26","jsCall_viiiid_27","jsCall_viiiid_28","jsCall_viiiid_29","jsCall_viiiid_30","jsCall_viiiid_31","jsCall_viiiid_32","jsCall_viiiid_33","jsCall_viiiid_34",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,0],mr=[0,"jsCall_viiiifii_0","jsCall_viiiifii_1","jsCall_viiiifii_2","jsCall_viiiifii_3","jsCall_viiiifii_4","jsCall_viiiifii_5","jsCall_viiiifii_6","jsCall_viiiifii_7","jsCall_viiiifii_8","jsCall_viiiifii_9","jsCall_viiiifii_10","jsCall_viiiifii_11","jsCall_viiiifii_12","jsCall_viiiifii_13","jsCall_viiiifii_14","jsCall_viiiifii_15","jsCall_viiiifii_16","jsCall_viiiifii_17","jsCall_viiiifii_18","jsCall_viiiifii_19","jsCall_viiiifii_20","jsCall_viiiifii_21","jsCall_viiiifii_22","jsCall_viiiifii_23","jsCall_viiiifii_24","jsCall_viiiifii_25","jsCall_viiiifii_26","jsCall_viiiifii_27","jsCall_viiiifii_28","jsCall_viiiifii_29","jsCall_viiiifii_30","jsCall_viiiifii_31","jsCall_viiiifii_32","jsCall_viiiifii_33","jsCall_viiiifii_34","_sbr_hf_gen_c",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],br=[0,"jsCall_viiiii_0","jsCall_viiiii_1","jsCall_viiiii_2","jsCall_viiiii_3","jsCall_viiiii_4","jsCall_viiiii_5","jsCall_viiiii_6","jsCall_viiiii_7","jsCall_viiiii_8","jsCall_viiiii_9","jsCall_viiiii_10","jsCall_viiiii_11","jsCall_viiiii_12","jsCall_viiiii_13","jsCall_viiiii_14","jsCall_viiiii_15","jsCall_viiiii_16","jsCall_viiiii_17","jsCall_viiiii_18","jsCall_viiiii_19","jsCall_viiiii_20","jsCall_viiiii_21","jsCall_viiiii_22","jsCall_viiiii_23","jsCall_viiiii_24","jsCall_viiiii_25","jsCall_viiiii_26","jsCall_viiiii_27","jsCall_viiiii_28","jsCall_viiiii_29","jsCall_viiiii_30","jsCall_viiiii_31","jsCall_viiiii_32","jsCall_viiiii_33","jsCall_viiiii_34","_planar_rgb9le_to_uv","_planar_rgb10le_to_uv","_planar_rgb12le_to_uv","_planar_rgb14le_to_uv","_planar_rgb16le_to_uv","_planar_rgb9be_to_uv","_planar_rgb10be_to_uv","_planar_rgb12be_to_uv","_planar_rgb14be_to_uv","_planar_rgb16be_to_uv","_planar_rgb_to_uv","_yuv2p010l1_LE_c","_yuv2p010l1_BE_c","_yuv2plane1_16LE_c","_yuv2plane1_16BE_c","_yuv2plane1_9LE_c","_yuv2plane1_9BE_c","_yuv2plane1_10LE_c","_yuv2plane1_10BE_c","_yuv2plane1_12LE_c","_yuv2plane1_12BE_c","_yuv2plane1_14LE_c","_yuv2plane1_14BE_c","_yuv2plane1_floatBE_c","_yuv2plane1_floatLE_c","_yuv2plane1_8_c","_bayer_bggr8_to_rgb24_copy","_bayer_bggr8_to_rgb24_interpolate","_bayer_bggr16le_to_rgb24_copy","_bayer_bggr16le_to_rgb24_interpolate","_bayer_bggr16be_to_rgb24_copy","_bayer_bggr16be_to_rgb24_interpolate","_bayer_rggb8_to_rgb24_copy","_bayer_rggb8_to_rgb24_interpolate","_bayer_rggb16le_to_rgb24_copy","_bayer_rggb16le_to_rgb24_interpolate","_bayer_rggb16be_to_rgb24_copy","_bayer_rggb16be_to_rgb24_interpolate","_bayer_gbrg8_to_rgb24_copy","_bayer_gbrg8_to_rgb24_interpolate","_bayer_gbrg16le_to_rgb24_copy","_bayer_gbrg16le_to_rgb24_interpolate","_bayer_gbrg16be_to_rgb24_copy","_bayer_gbrg16be_to_rgb24_interpolate","_bayer_grbg8_to_rgb24_copy","_bayer_grbg8_to_rgb24_interpolate","_bayer_grbg16le_to_rgb24_copy","_bayer_grbg16le_to_rgb24_interpolate","_bayer_grbg16be_to_rgb24_copy","_bayer_grbg16be_to_rgb24_interpolate","_hevc_h_loop_filter_chroma_9","_hevc_v_loop_filter_chroma_9","_hevc_h_loop_filter_chroma_10","_hevc_v_loop_filter_chroma_10","_hevc_h_loop_filter_chroma_12","_hevc_v_loop_filter_chroma_12","_hevc_h_loop_filter_chroma_8","_hevc_v_loop_filter_chroma_8","_worker_func","_sbr_hf_assemble","_sbr_hf_inverse_filter","_ff_h264_idct_add16_9_c","_ff_h264_idct8_add4_9_c","_ff_h264_idct_add8_9_c","_ff_h264_idct_add8_422_9_c","_ff_h264_idct_add16intra_9_c","_h264_v_loop_filter_luma_9_c","_h264_h_loop_filter_luma_9_c","_h264_h_loop_filter_luma_mbaff_9_c","_h264_v_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma422_9_c","_h264_h_loop_filter_chroma_mbaff_9_c","_h264_h_loop_filter_chroma422_mbaff_9_c","_ff_h264_idct_add16_10_c","_ff_h264_idct8_add4_10_c","_ff_h264_idct_add8_10_c","_ff_h264_idct_add8_422_10_c","_ff_h264_idct_add16intra_10_c","_h264_v_loop_filter_luma_10_c","_h264_h_loop_filter_luma_10_c","_h264_h_loop_filter_luma_mbaff_10_c","_h264_v_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma422_10_c","_h264_h_loop_filter_chroma_mbaff_10_c","_h264_h_loop_filter_chroma422_mbaff_10_c","_ff_h264_idct_add16_12_c","_ff_h264_idct8_add4_12_c","_ff_h264_idct_add8_12_c","_ff_h264_idct_add8_422_12_c","_ff_h264_idct_add16intra_12_c","_h264_v_loop_filter_luma_12_c","_h264_h_loop_filter_luma_12_c","_h264_h_loop_filter_luma_mbaff_12_c","_h264_v_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma422_12_c","_h264_h_loop_filter_chroma_mbaff_12_c","_h264_h_loop_filter_chroma422_mbaff_12_c","_ff_h264_idct_add16_14_c","_ff_h264_idct8_add4_14_c","_ff_h264_idct_add8_14_c","_ff_h264_idct_add8_422_14_c","_ff_h264_idct_add16intra_14_c","_h264_v_loop_filter_luma_14_c","_h264_h_loop_filter_luma_14_c","_h264_h_loop_filter_luma_mbaff_14_c","_h264_v_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma422_14_c","_h264_h_loop_filter_chroma_mbaff_14_c","_h264_h_loop_filter_chroma422_mbaff_14_c","_ff_h264_idct_add16_8_c","_ff_h264_idct8_add4_8_c","_ff_h264_idct_add8_8_c","_ff_h264_idct_add8_422_8_c","_ff_h264_idct_add16intra_8_c","_h264_v_loop_filter_luma_8_c","_h264_h_loop_filter_luma_8_c","_h264_h_loop_filter_luma_mbaff_8_c","_h264_v_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma422_8_c","_h264_h_loop_filter_chroma_mbaff_8_c","_h264_h_loop_filter_chroma422_mbaff_8_c","_postrotate_c","_sbr_hf_g_filt_c","_ps_hybrid_analysis_c","_ps_stereo_interpolate_c","_ps_stereo_interpolate_ipdopd_c","_vector_fmul_window_c","_vector_fmul_add_c",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,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,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,0,0,0,0,0,0],vr=[0,"jsCall_viiiiidd_0","jsCall_viiiiidd_1","jsCall_viiiiidd_2","jsCall_viiiiidd_3","jsCall_viiiiidd_4","jsCall_viiiiidd_5","jsCall_viiiiidd_6","jsCall_viiiiidd_7","jsCall_viiiiidd_8","jsCall_viiiiidd_9","jsCall_viiiiidd_10","jsCall_viiiiidd_11","jsCall_viiiiidd_12","jsCall_viiiiidd_13","jsCall_viiiiidd_14","jsCall_viiiiidd_15","jsCall_viiiiidd_16","jsCall_viiiiidd_17","jsCall_viiiiidd_18","jsCall_viiiiidd_19","jsCall_viiiiidd_20","jsCall_viiiiidd_21","jsCall_viiiiidd_22","jsCall_viiiiidd_23","jsCall_viiiiidd_24","jsCall_viiiiidd_25","jsCall_viiiiidd_26","jsCall_viiiiidd_27","jsCall_viiiiidd_28","jsCall_viiiiidd_29","jsCall_viiiiidd_30","jsCall_viiiiidd_31","jsCall_viiiiidd_32","jsCall_viiiiidd_33","jsCall_viiiiidd_34",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,0],yr=[0,"jsCall_viiiiii_0","jsCall_viiiiii_1","jsCall_viiiiii_2","jsCall_viiiiii_3","jsCall_viiiiii_4","jsCall_viiiiii_5","jsCall_viiiiii_6","jsCall_viiiiii_7","jsCall_viiiiii_8","jsCall_viiiiii_9","jsCall_viiiiii_10","jsCall_viiiiii_11","jsCall_viiiiii_12","jsCall_viiiiii_13","jsCall_viiiiii_14","jsCall_viiiiii_15","jsCall_viiiiii_16","jsCall_viiiiii_17","jsCall_viiiiii_18","jsCall_viiiiii_19","jsCall_viiiiii_20","jsCall_viiiiii_21","jsCall_viiiiii_22","jsCall_viiiiii_23","jsCall_viiiiii_24","jsCall_viiiiii_25","jsCall_viiiiii_26","jsCall_viiiiii_27","jsCall_viiiiii_28","jsCall_viiiiii_29","jsCall_viiiiii_30","jsCall_viiiiii_31","jsCall_viiiiii_32","jsCall_viiiiii_33","jsCall_viiiiii_34","_read_geobtag","_read_apic","_read_chapter","_read_priv","_ff_hyscale_fast_c","_bswap16Y_c","_read_ya16le_gray_c","_read_ya16be_gray_c","_read_ayuv64le_Y_c","_yuy2ToY_c","_uyvyToY_c","_bgr24ToY_c","_bgr16leToY_c","_bgr16beToY_c","_bgr15leToY_c","_bgr15beToY_c","_bgr12leToY_c","_bgr12beToY_c","_rgb24ToY_c","_rgb16leToY_c","_rgb16beToY_c","_rgb15leToY_c","_rgb15beToY_c","_rgb12leToY_c","_rgb12beToY_c","_palToY_c","_monoblack2Y_c","_monowhite2Y_c","_bgr32ToY_c","_bgr321ToY_c","_rgb32ToY_c","_rgb321ToY_c","_rgb48BEToY_c","_rgb48LEToY_c","_bgr48BEToY_c","_bgr48LEToY_c","_rgb64BEToY_c","_rgb64LEToY_c","_bgr64BEToY_c","_bgr64LEToY_c","_p010LEToY_c","_p010BEToY_c","_grayf32ToY16_c","_grayf32ToY16_bswap_c","_rgba64leToA_c","_rgba64beToA_c","_rgbaToA_c","_abgrToA_c","_read_ya16le_alpha_c","_read_ya16be_alpha_c","_read_ayuv64le_A_c","_palToA_c","_put_pcm_9","_hevc_h_loop_filter_luma_9","_hevc_v_loop_filter_luma_9","_put_pcm_10","_hevc_h_loop_filter_luma_10","_hevc_v_loop_filter_luma_10","_put_pcm_12","_hevc_h_loop_filter_luma_12","_hevc_v_loop_filter_luma_12","_put_pcm_8","_hevc_h_loop_filter_luma_8","_hevc_v_loop_filter_luma_8","_pred_dc_9","_pred_angular_0_9","_pred_angular_1_9","_pred_angular_2_9","_pred_angular_3_9","_pred_dc_10","_pred_angular_0_10","_pred_angular_1_10","_pred_angular_2_10","_pred_angular_3_10","_pred_dc_12","_pred_angular_0_12","_pred_angular_1_12","_pred_angular_2_12","_pred_angular_3_12","_pred_dc_8","_pred_angular_0_8","_pred_angular_1_8","_pred_angular_2_8","_pred_angular_3_8","_weight_h264_pixels16_9_c","_weight_h264_pixels8_9_c","_weight_h264_pixels4_9_c","_weight_h264_pixels2_9_c","_weight_h264_pixels16_10_c","_weight_h264_pixels8_10_c","_weight_h264_pixels4_10_c","_weight_h264_pixels2_10_c","_weight_h264_pixels16_12_c","_weight_h264_pixels8_12_c","_weight_h264_pixels4_12_c","_weight_h264_pixels2_12_c","_weight_h264_pixels16_14_c","_weight_h264_pixels8_14_c","_weight_h264_pixels4_14_c","_weight_h264_pixels2_14_c","_weight_h264_pixels16_8_c","_weight_h264_pixels8_8_c","_weight_h264_pixels4_8_c","_weight_h264_pixels2_8_c","_sbr_hf_apply_noise_0","_sbr_hf_apply_noise_1","_sbr_hf_apply_noise_2","_sbr_hf_apply_noise_3","_aes_decrypt","_aes_encrypt","_image_copy_plane",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,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,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,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,0],gr=[0,"jsCall_viiiiiifi_0","jsCall_viiiiiifi_1","jsCall_viiiiiifi_2","jsCall_viiiiiifi_3","jsCall_viiiiiifi_4","jsCall_viiiiiifi_5","jsCall_viiiiiifi_6","jsCall_viiiiiifi_7","jsCall_viiiiiifi_8","jsCall_viiiiiifi_9","jsCall_viiiiiifi_10","jsCall_viiiiiifi_11","jsCall_viiiiiifi_12","jsCall_viiiiiifi_13","jsCall_viiiiiifi_14","jsCall_viiiiiifi_15","jsCall_viiiiiifi_16","jsCall_viiiiiifi_17","jsCall_viiiiiifi_18","jsCall_viiiiiifi_19","jsCall_viiiiiifi_20","jsCall_viiiiiifi_21","jsCall_viiiiiifi_22","jsCall_viiiiiifi_23","jsCall_viiiiiifi_24","jsCall_viiiiiifi_25","jsCall_viiiiiifi_26","jsCall_viiiiiifi_27","jsCall_viiiiiifi_28","jsCall_viiiiiifi_29","jsCall_viiiiiifi_30","jsCall_viiiiiifi_31","jsCall_viiiiiifi_32","jsCall_viiiiiifi_33","jsCall_viiiiiifi_34","_ps_decorrelate_c",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],wr=[0,"jsCall_viiiiiii_0","jsCall_viiiiiii_1","jsCall_viiiiiii_2","jsCall_viiiiiii_3","jsCall_viiiiiii_4","jsCall_viiiiiii_5","jsCall_viiiiiii_6","jsCall_viiiiiii_7","jsCall_viiiiiii_8","jsCall_viiiiiii_9","jsCall_viiiiiii_10","jsCall_viiiiiii_11","jsCall_viiiiiii_12","jsCall_viiiiiii_13","jsCall_viiiiiii_14","jsCall_viiiiiii_15","jsCall_viiiiiii_16","jsCall_viiiiiii_17","jsCall_viiiiiii_18","jsCall_viiiiiii_19","jsCall_viiiiiii_20","jsCall_viiiiiii_21","jsCall_viiiiiii_22","jsCall_viiiiiii_23","jsCall_viiiiiii_24","jsCall_viiiiiii_25","jsCall_viiiiiii_26","jsCall_viiiiiii_27","jsCall_viiiiiii_28","jsCall_viiiiiii_29","jsCall_viiiiiii_30","jsCall_viiiiiii_31","jsCall_viiiiiii_32","jsCall_viiiiiii_33","jsCall_viiiiiii_34","_hScale8To15_c","_hScale8To19_c","_hScale16To19_c","_hScale16To15_c","_yuy2ToUV_c","_yvy2ToUV_c","_uyvyToUV_c","_nv12ToUV_c","_nv21ToUV_c","_palToUV_c","_bswap16UV_c","_read_ayuv64le_UV_c","_p010LEToUV_c","_p010BEToUV_c","_p016LEToUV_c","_p016BEToUV_c","_gbr24pToUV_half_c","_rgb64BEToUV_half_c","_rgb64LEToUV_half_c","_bgr64BEToUV_half_c","_bgr64LEToUV_half_c","_rgb48BEToUV_half_c","_rgb48LEToUV_half_c","_bgr48BEToUV_half_c","_bgr48LEToUV_half_c","_bgr32ToUV_half_c","_bgr321ToUV_half_c","_bgr24ToUV_half_c","_bgr16leToUV_half_c","_bgr16beToUV_half_c","_bgr15leToUV_half_c","_bgr15beToUV_half_c","_bgr12leToUV_half_c","_bgr12beToUV_half_c","_rgb32ToUV_half_c","_rgb321ToUV_half_c","_rgb24ToUV_half_c","_rgb16leToUV_half_c","_rgb16beToUV_half_c","_rgb15leToUV_half_c","_rgb15beToUV_half_c","_rgb12leToUV_half_c","_rgb12beToUV_half_c","_rgb64BEToUV_c","_rgb64LEToUV_c","_bgr64BEToUV_c","_bgr64LEToUV_c","_rgb48BEToUV_c","_rgb48LEToUV_c","_bgr48BEToUV_c","_bgr48LEToUV_c","_bgr32ToUV_c","_bgr321ToUV_c","_bgr24ToUV_c","_bgr16leToUV_c","_bgr16beToUV_c","_bgr15leToUV_c","_bgr15beToUV_c","_bgr12leToUV_c","_bgr12beToUV_c","_rgb32ToUV_c","_rgb321ToUV_c","_rgb24ToUV_c","_rgb16leToUV_c","_rgb16beToUV_c","_rgb15leToUV_c","_rgb15beToUV_c","_rgb12leToUV_c","_rgb12beToUV_c","_yuv2p010lX_LE_c","_yuv2p010lX_BE_c","_yuv2p010cX_c","_yuv2planeX_16LE_c","_yuv2planeX_16BE_c","_yuv2p016cX_c","_yuv2planeX_9LE_c","_yuv2planeX_9BE_c","_yuv2planeX_10LE_c","_yuv2planeX_10BE_c","_yuv2planeX_12LE_c","_yuv2planeX_12BE_c","_yuv2planeX_14LE_c","_yuv2planeX_14BE_c","_yuv2planeX_floatBE_c","_yuv2planeX_floatLE_c","_yuv2planeX_8_c","_yuv2nv12cX_c","_sao_edge_filter_9","_put_hevc_pel_pixels_9","_put_hevc_qpel_h_9","_put_hevc_qpel_v_9","_put_hevc_qpel_hv_9","_put_hevc_epel_h_9","_put_hevc_epel_v_9","_put_hevc_epel_hv_9","_sao_edge_filter_10","_put_hevc_pel_pixels_10","_put_hevc_qpel_h_10","_put_hevc_qpel_v_10","_put_hevc_qpel_hv_10","_put_hevc_epel_h_10","_put_hevc_epel_v_10","_put_hevc_epel_hv_10","_sao_edge_filter_12","_put_hevc_pel_pixels_12","_put_hevc_qpel_h_12","_put_hevc_qpel_v_12","_put_hevc_qpel_hv_12","_put_hevc_epel_h_12","_put_hevc_epel_v_12","_put_hevc_epel_hv_12","_sao_edge_filter_8","_put_hevc_pel_pixels_8","_put_hevc_qpel_h_8","_put_hevc_qpel_v_8","_put_hevc_qpel_hv_8","_put_hevc_epel_h_8","_put_hevc_epel_v_8","_put_hevc_epel_hv_8",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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Er=[0,"jsCall_viiiiiiii_0","jsCall_viiiiiiii_1","jsCall_viiiiiiii_2","jsCall_viiiiiiii_3","jsCall_viiiiiiii_4","jsCall_viiiiiiii_5","jsCall_viiiiiiii_6","jsCall_viiiiiiii_7","jsCall_viiiiiiii_8","jsCall_viiiiiiii_9","jsCall_viiiiiiii_10","jsCall_viiiiiiii_11","jsCall_viiiiiiii_12","jsCall_viiiiiiii_13","jsCall_viiiiiiii_14","jsCall_viiiiiiii_15","jsCall_viiiiiiii_16","jsCall_viiiiiiii_17","jsCall_viiiiiiii_18","jsCall_viiiiiiii_19","jsCall_viiiiiiii_20","jsCall_viiiiiiii_21","jsCall_viiiiiiii_22","jsCall_viiiiiiii_23","jsCall_viiiiiiii_24","jsCall_viiiiiiii_25","jsCall_viiiiiiii_26","jsCall_viiiiiiii_27","jsCall_viiiiiiii_28","jsCall_viiiiiiii_29","jsCall_viiiiiiii_30","jsCall_viiiiiiii_31","jsCall_viiiiiiii_32","jsCall_viiiiiiii_33","jsCall_viiiiiiii_34","_ff_hcscale_fast_c","_bayer_bggr8_to_yv12_copy","_bayer_bggr8_to_yv12_interpolate","_bayer_bggr16le_to_yv12_copy","_bayer_bggr16le_to_yv12_interpolate","_bayer_bggr16be_to_yv12_copy","_bayer_bggr16be_to_yv12_interpolate","_bayer_rggb8_to_yv12_copy","_bayer_rggb8_to_yv12_interpolate","_bayer_rggb16le_to_yv12_copy","_bayer_rggb16le_to_yv12_interpolate","_bayer_rggb16be_to_yv12_copy","_bayer_rggb16be_to_yv12_interpolate","_bayer_gbrg8_to_yv12_copy","_bayer_gbrg8_to_yv12_interpolate","_bayer_gbrg16le_to_yv12_copy","_bayer_gbrg16le_to_yv12_interpolate","_bayer_gbrg16be_to_yv12_copy","_bayer_gbrg16be_to_yv12_interpolate","_bayer_grbg8_to_yv12_copy","_bayer_grbg8_to_yv12_interpolate","_bayer_grbg16le_to_yv12_copy","_bayer_grbg16le_to_yv12_interpolate","_bayer_grbg16be_to_yv12_copy","_bayer_grbg16be_to_yv12_interpolate","_sao_band_filter_9","_put_hevc_pel_uni_pixels_9","_put_hevc_qpel_uni_h_9","_put_hevc_qpel_uni_v_9","_put_hevc_qpel_uni_hv_9","_put_hevc_epel_uni_h_9","_put_hevc_epel_uni_v_9","_put_hevc_epel_uni_hv_9","_sao_band_filter_10","_put_hevc_pel_uni_pixels_10","_put_hevc_qpel_uni_h_10","_put_hevc_qpel_uni_v_10","_put_hevc_qpel_uni_hv_10","_put_hevc_epel_uni_h_10","_put_hevc_epel_uni_v_10","_put_hevc_epel_uni_hv_10","_sao_band_filter_12","_put_hevc_pel_uni_pixels_12","_put_hevc_qpel_uni_h_12","_put_hevc_qpel_uni_v_12","_put_hevc_qpel_uni_hv_12","_put_hevc_epel_uni_h_12","_put_hevc_epel_uni_v_12","_put_hevc_epel_uni_hv_12","_sao_band_filter_8","_put_hevc_pel_uni_pixels_8","_put_hevc_qpel_uni_h_8","_put_hevc_qpel_uni_v_8","_put_hevc_qpel_uni_hv_8","_put_hevc_epel_uni_h_8","_put_hevc_epel_uni_v_8","_put_hevc_epel_uni_hv_8","_biweight_h264_pixels16_9_c","_biweight_h264_pixels8_9_c","_biweight_h264_pixels4_9_c","_biweight_h264_pixels2_9_c","_biweight_h264_pixels16_10_c","_biweight_h264_pixels8_10_c","_biweight_h264_pixels4_10_c","_biweight_h264_pixels2_10_c","_biweight_h264_pixels16_12_c","_biweight_h264_pixels8_12_c","_biweight_h264_pixels4_12_c","_biweight_h264_pixels2_12_c","_biweight_h264_pixels16_14_c","_biweight_h264_pixels8_14_c","_biweight_h264_pixels4_14_c","_biweight_h264_pixels2_14_c","_biweight_h264_pixels16_8_c","_biweight_h264_pixels8_8_c","_biweight_h264_pixels4_8_c","_biweight_h264_pixels2_8_c",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Cr=[0,"jsCall_viiiiiiiid_0","jsCall_viiiiiiiid_1","jsCall_viiiiiiiid_2","jsCall_viiiiiiiid_3","jsCall_viiiiiiiid_4","jsCall_viiiiiiiid_5","jsCall_viiiiiiiid_6","jsCall_viiiiiiiid_7","jsCall_viiiiiiiid_8","jsCall_viiiiiiiid_9","jsCall_viiiiiiiid_10","jsCall_viiiiiiiid_11","jsCall_viiiiiiiid_12","jsCall_viiiiiiiid_13","jsCall_viiiiiiiid_14","jsCall_viiiiiiiid_15","jsCall_viiiiiiiid_16","jsCall_viiiiiiiid_17","jsCall_viiiiiiiid_18","jsCall_viiiiiiiid_19","jsCall_viiiiiiiid_20","jsCall_viiiiiiiid_21","jsCall_viiiiiiiid_22","jsCall_viiiiiiiid_23","jsCall_viiiiiiiid_24","jsCall_viiiiiiiid_25","jsCall_viiiiiiiid_26","jsCall_viiiiiiiid_27","jsCall_viiiiiiiid_28","jsCall_viiiiiiiid_29","jsCall_viiiiiiiid_30","jsCall_viiiiiiiid_31","jsCall_viiiiiiiid_32","jsCall_viiiiiiiid_33","jsCall_viiiiiiiid_34",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,0],Sr=[0,"jsCall_viiiiiiiidi_0","jsCall_viiiiiiiidi_1","jsCall_viiiiiiiidi_2","jsCall_viiiiiiiidi_3","jsCall_viiiiiiiidi_4","jsCall_viiiiiiiidi_5","jsCall_viiiiiiiidi_6","jsCall_viiiiiiiidi_7","jsCall_viiiiiiiidi_8","jsCall_viiiiiiiidi_9","jsCall_viiiiiiiidi_10","jsCall_viiiiiiiidi_11","jsCall_viiiiiiiidi_12","jsCall_viiiiiiiidi_13","jsCall_viiiiiiiidi_14","jsCall_viiiiiiiidi_15","jsCall_viiiiiiiidi_16","jsCall_viiiiiiiidi_17","jsCall_viiiiiiiidi_18","jsCall_viiiiiiiidi_19","jsCall_viiiiiiiidi_20","jsCall_viiiiiiiidi_21","jsCall_viiiiiiiidi_22","jsCall_viiiiiiiidi_23","jsCall_viiiiiiiidi_24","jsCall_viiiiiiiidi_25","jsCall_viiiiiiiidi_26","jsCall_viiiiiiiidi_27","jsCall_viiiiiiiidi_28","jsCall_viiiiiiiidi_29","jsCall_viiiiiiiidi_30","jsCall_viiiiiiiidi_31","jsCall_viiiiiiiidi_32","jsCall_viiiiiiiidi_33","jsCall_viiiiiiiidi_34",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,0],jr=[0,"jsCall_viiiiiiiii_0","jsCall_viiiiiiiii_1","jsCall_viiiiiiiii_2","jsCall_viiiiiiiii_3","jsCall_viiiiiiiii_4","jsCall_viiiiiiiii_5","jsCall_viiiiiiiii_6","jsCall_viiiiiiiii_7","jsCall_viiiiiiiii_8","jsCall_viiiiiiiii_9","jsCall_viiiiiiiii_10","jsCall_viiiiiiiii_11","jsCall_viiiiiiiii_12","jsCall_viiiiiiiii_13","jsCall_viiiiiiiii_14","jsCall_viiiiiiiii_15","jsCall_viiiiiiiii_16","jsCall_viiiiiiiii_17","jsCall_viiiiiiiii_18","jsCall_viiiiiiiii_19","jsCall_viiiiiiiii_20","jsCall_viiiiiiiii_21","jsCall_viiiiiiiii_22","jsCall_viiiiiiiii_23","jsCall_viiiiiiiii_24","jsCall_viiiiiiiii_25","jsCall_viiiiiiiii_26","jsCall_viiiiiiiii_27","jsCall_viiiiiiiii_28","jsCall_viiiiiiiii_29","jsCall_viiiiiiiii_30","jsCall_viiiiiiiii_31","jsCall_viiiiiiiii_32","jsCall_viiiiiiiii_33","jsCall_viiiiiiiii_34","_yuv2rgba32_full_1_c","_yuv2rgbx32_full_1_c","_yuv2argb32_full_1_c","_yuv2xrgb32_full_1_c","_yuv2bgra32_full_1_c","_yuv2bgrx32_full_1_c","_yuv2abgr32_full_1_c","_yuv2xbgr32_full_1_c","_yuv2rgba64le_full_1_c","_yuv2rgbx64le_full_1_c","_yuv2rgba64be_full_1_c","_yuv2rgbx64be_full_1_c","_yuv2bgra64le_full_1_c","_yuv2bgrx64le_full_1_c","_yuv2bgra64be_full_1_c","_yuv2bgrx64be_full_1_c","_yuv2rgb24_full_1_c","_yuv2bgr24_full_1_c","_yuv2rgb48le_full_1_c","_yuv2bgr48le_full_1_c","_yuv2rgb48be_full_1_c","_yuv2bgr48be_full_1_c","_yuv2bgr4_byte_full_1_c","_yuv2rgb4_byte_full_1_c","_yuv2bgr8_full_1_c","_yuv2rgb8_full_1_c","_yuv2rgbx64le_1_c","_yuv2rgba64le_1_c","_yuv2rgbx64be_1_c","_yuv2rgba64be_1_c","_yuv2bgrx64le_1_c","_yuv2bgra64le_1_c","_yuv2bgrx64be_1_c","_yuv2bgra64be_1_c","_yuv2rgba32_1_c","_yuv2rgbx32_1_c","_yuv2rgba32_1_1_c","_yuv2rgbx32_1_1_c","_yuv2rgb16_1_c","_yuv2rgb15_1_c","_yuv2rgb12_1_c","_yuv2rgb8_1_c","_yuv2rgb4_1_c","_yuv2rgb4b_1_c","_yuv2rgb48le_1_c","_yuv2rgb48be_1_c","_yuv2bgr48le_1_c","_yuv2bgr48be_1_c","_yuv2rgb24_1_c","_yuv2bgr24_1_c","_yuv2monowhite_1_c","_yuv2monoblack_1_c","_yuv2yuyv422_1_c","_yuv2yvyu422_1_c","_yuv2uyvy422_1_c","_yuv2ya8_1_c","_yuv2ya16le_1_c","_yuv2ya16be_1_c","_yuy2toyv12_c","_put_hevc_pel_bi_pixels_9","_put_hevc_qpel_bi_h_9","_put_hevc_qpel_bi_v_9","_put_hevc_qpel_bi_hv_9","_put_hevc_epel_bi_h_9","_put_hevc_epel_bi_v_9","_put_hevc_epel_bi_hv_9","_put_hevc_pel_bi_pixels_10","_put_hevc_qpel_bi_h_10","_put_hevc_qpel_bi_v_10","_put_hevc_qpel_bi_hv_10","_put_hevc_epel_bi_h_10","_put_hevc_epel_bi_v_10","_put_hevc_epel_bi_hv_10","_put_hevc_pel_bi_pixels_12","_put_hevc_qpel_bi_h_12","_put_hevc_qpel_bi_v_12","_put_hevc_qpel_bi_hv_12","_put_hevc_epel_bi_h_12","_put_hevc_epel_bi_v_12","_put_hevc_epel_bi_hv_12","_put_hevc_pel_bi_pixels_8","_put_hevc_qpel_bi_h_8","_put_hevc_qpel_bi_v_8","_put_hevc_qpel_bi_hv_8","_put_hevc_epel_bi_h_8","_put_hevc_epel_bi_v_8","_put_hevc_epel_bi_hv_8",0,0,0,0,0],Tr=[0,"jsCall_viiiiiiiiii_0","jsCall_viiiiiiiiii_1","jsCall_viiiiiiiiii_2","jsCall_viiiiiiiiii_3","jsCall_viiiiiiiiii_4","jsCall_viiiiiiiiii_5","jsCall_viiiiiiiiii_6","jsCall_viiiiiiiiii_7","jsCall_viiiiiiiiii_8","jsCall_viiiiiiiiii_9","jsCall_viiiiiiiiii_10","jsCall_viiiiiiiiii_11","jsCall_viiiiiiiiii_12","jsCall_viiiiiiiiii_13","jsCall_viiiiiiiiii_14","jsCall_viiiiiiiiii_15","jsCall_viiiiiiiiii_16","jsCall_viiiiiiiiii_17","jsCall_viiiiiiiiii_18","jsCall_viiiiiiiiii_19","jsCall_viiiiiiiiii_20","jsCall_viiiiiiiiii_21","jsCall_viiiiiiiiii_22","jsCall_viiiiiiiiii_23","jsCall_viiiiiiiiii_24","jsCall_viiiiiiiiii_25","jsCall_viiiiiiiiii_26","jsCall_viiiiiiiiii_27","jsCall_viiiiiiiiii_28","jsCall_viiiiiiiiii_29","jsCall_viiiiiiiiii_30","jsCall_viiiiiiiiii_31","jsCall_viiiiiiiiii_32","jsCall_viiiiiiiiii_33","jsCall_viiiiiiiiii_34","_yuv2rgba32_full_2_c","_yuv2rgbx32_full_2_c","_yuv2argb32_full_2_c","_yuv2xrgb32_full_2_c","_yuv2bgra32_full_2_c","_yuv2bgrx32_full_2_c","_yuv2abgr32_full_2_c","_yuv2xbgr32_full_2_c","_yuv2rgba64le_full_2_c","_yuv2rgbx64le_full_2_c","_yuv2rgba64be_full_2_c","_yuv2rgbx64be_full_2_c","_yuv2bgra64le_full_2_c","_yuv2bgrx64le_full_2_c","_yuv2bgra64be_full_2_c","_yuv2bgrx64be_full_2_c","_yuv2rgb24_full_2_c","_yuv2bgr24_full_2_c","_yuv2rgb48le_full_2_c","_yuv2bgr48le_full_2_c","_yuv2rgb48be_full_2_c","_yuv2bgr48be_full_2_c","_yuv2bgr4_byte_full_2_c","_yuv2rgb4_byte_full_2_c","_yuv2bgr8_full_2_c","_yuv2rgb8_full_2_c","_yuv2rgbx64le_2_c","_yuv2rgba64le_2_c","_yuv2rgbx64be_2_c","_yuv2rgba64be_2_c","_yuv2bgrx64le_2_c","_yuv2bgra64le_2_c","_yuv2bgrx64be_2_c","_yuv2bgra64be_2_c","_yuv2rgba32_2_c","_yuv2rgbx32_2_c","_yuv2rgba32_1_2_c","_yuv2rgbx32_1_2_c","_yuv2rgb16_2_c","_yuv2rgb15_2_c","_yuv2rgb12_2_c","_yuv2rgb8_2_c","_yuv2rgb4_2_c","_yuv2rgb4b_2_c","_yuv2rgb48le_2_c","_yuv2rgb48be_2_c","_yuv2bgr48le_2_c","_yuv2bgr48be_2_c","_yuv2rgb24_2_c","_yuv2bgr24_2_c","_yuv2monowhite_2_c","_yuv2monoblack_2_c","_yuv2yuyv422_2_c","_yuv2yvyu422_2_c","_yuv2uyvy422_2_c","_yuv2ya8_2_c","_yuv2ya16le_2_c","_yuv2ya16be_2_c","_vu9_to_vu12_c","_yvu9_to_yuy2_c","_ff_emulated_edge_mc_8","_ff_emulated_edge_mc_16",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,0,0,0],Ar=[0,"jsCall_viiiiiiiiiii_0","jsCall_viiiiiiiiiii_1","jsCall_viiiiiiiiiii_2","jsCall_viiiiiiiiiii_3","jsCall_viiiiiiiiiii_4","jsCall_viiiiiiiiiii_5","jsCall_viiiiiiiiiii_6","jsCall_viiiiiiiiiii_7","jsCall_viiiiiiiiiii_8","jsCall_viiiiiiiiiii_9","jsCall_viiiiiiiiiii_10","jsCall_viiiiiiiiiii_11","jsCall_viiiiiiiiiii_12","jsCall_viiiiiiiiiii_13","jsCall_viiiiiiiiiii_14","jsCall_viiiiiiiiiii_15","jsCall_viiiiiiiiiii_16","jsCall_viiiiiiiiiii_17","jsCall_viiiiiiiiiii_18","jsCall_viiiiiiiiiii_19","jsCall_viiiiiiiiiii_20","jsCall_viiiiiiiiiii_21","jsCall_viiiiiiiiiii_22","jsCall_viiiiiiiiiii_23","jsCall_viiiiiiiiiii_24","jsCall_viiiiiiiiiii_25","jsCall_viiiiiiiiiii_26","jsCall_viiiiiiiiiii_27","jsCall_viiiiiiiiiii_28","jsCall_viiiiiiiiiii_29","jsCall_viiiiiiiiiii_30","jsCall_viiiiiiiiiii_31","jsCall_viiiiiiiiiii_32","jsCall_viiiiiiiiiii_33","jsCall_viiiiiiiiiii_34","_put_hevc_pel_uni_w_pixels_9","_put_hevc_qpel_uni_w_h_9","_put_hevc_qpel_uni_w_v_9","_put_hevc_qpel_uni_w_hv_9","_put_hevc_epel_uni_w_h_9","_put_hevc_epel_uni_w_v_9","_put_hevc_epel_uni_w_hv_9","_put_hevc_pel_uni_w_pixels_10","_put_hevc_qpel_uni_w_h_10","_put_hevc_qpel_uni_w_v_10","_put_hevc_qpel_uni_w_hv_10","_put_hevc_epel_uni_w_h_10","_put_hevc_epel_uni_w_v_10","_put_hevc_epel_uni_w_hv_10","_put_hevc_pel_uni_w_pixels_12","_put_hevc_qpel_uni_w_h_12","_put_hevc_qpel_uni_w_v_12","_put_hevc_qpel_uni_w_hv_12","_put_hevc_epel_uni_w_h_12","_put_hevc_epel_uni_w_v_12","_put_hevc_epel_uni_w_hv_12","_put_hevc_pel_uni_w_pixels_8","_put_hevc_qpel_uni_w_h_8","_put_hevc_qpel_uni_w_v_8","_put_hevc_qpel_uni_w_hv_8","_put_hevc_epel_uni_w_h_8","_put_hevc_epel_uni_w_v_8","_put_hevc_epel_uni_w_hv_8"],xr=[0,"jsCall_viiiiiiiiiiii_0","jsCall_viiiiiiiiiiii_1","jsCall_viiiiiiiiiiii_2","jsCall_viiiiiiiiiiii_3","jsCall_viiiiiiiiiiii_4","jsCall_viiiiiiiiiiii_5","jsCall_viiiiiiiiiiii_6","jsCall_viiiiiiiiiiii_7","jsCall_viiiiiiiiiiii_8","jsCall_viiiiiiiiiiii_9","jsCall_viiiiiiiiiiii_10","jsCall_viiiiiiiiiiii_11","jsCall_viiiiiiiiiiii_12","jsCall_viiiiiiiiiiii_13","jsCall_viiiiiiiiiiii_14","jsCall_viiiiiiiiiiii_15","jsCall_viiiiiiiiiiii_16","jsCall_viiiiiiiiiiii_17","jsCall_viiiiiiiiiiii_18","jsCall_viiiiiiiiiiii_19","jsCall_viiiiiiiiiiii_20","jsCall_viiiiiiiiiiii_21","jsCall_viiiiiiiiiiii_22","jsCall_viiiiiiiiiiii_23","jsCall_viiiiiiiiiiii_24","jsCall_viiiiiiiiiiii_25","jsCall_viiiiiiiiiiii_26","jsCall_viiiiiiiiiiii_27","jsCall_viiiiiiiiiiii_28","jsCall_viiiiiiiiiiii_29","jsCall_viiiiiiiiiiii_30","jsCall_viiiiiiiiiiii_31","jsCall_viiiiiiiiiiii_32","jsCall_viiiiiiiiiiii_33","jsCall_viiiiiiiiiiii_34","_yuv2rgba32_full_X_c","_yuv2rgbx32_full_X_c","_yuv2argb32_full_X_c","_yuv2xrgb32_full_X_c","_yuv2bgra32_full_X_c","_yuv2bgrx32_full_X_c","_yuv2abgr32_full_X_c","_yuv2xbgr32_full_X_c","_yuv2rgba64le_full_X_c","_yuv2rgbx64le_full_X_c","_yuv2rgba64be_full_X_c","_yuv2rgbx64be_full_X_c","_yuv2bgra64le_full_X_c","_yuv2bgrx64le_full_X_c","_yuv2bgra64be_full_X_c","_yuv2bgrx64be_full_X_c","_yuv2rgb24_full_X_c","_yuv2bgr24_full_X_c","_yuv2rgb48le_full_X_c","_yuv2bgr48le_full_X_c","_yuv2rgb48be_full_X_c","_yuv2bgr48be_full_X_c","_yuv2bgr4_byte_full_X_c","_yuv2rgb4_byte_full_X_c","_yuv2bgr8_full_X_c","_yuv2rgb8_full_X_c","_yuv2gbrp_full_X_c","_yuv2gbrp16_full_X_c","_yuv2rgbx64le_X_c","_yuv2rgba64le_X_c","_yuv2rgbx64be_X_c","_yuv2rgba64be_X_c","_yuv2bgrx64le_X_c","_yuv2bgra64le_X_c","_yuv2bgrx64be_X_c","_yuv2bgra64be_X_c","_yuv2rgba32_X_c","_yuv2rgbx32_X_c","_yuv2rgba32_1_X_c","_yuv2rgbx32_1_X_c","_yuv2rgb16_X_c","_yuv2rgb15_X_c","_yuv2rgb12_X_c","_yuv2rgb8_X_c","_yuv2rgb4_X_c","_yuv2rgb4b_X_c","_yuv2rgb48le_X_c","_yuv2rgb48be_X_c","_yuv2bgr48le_X_c","_yuv2bgr48be_X_c","_yuv2rgb24_X_c","_yuv2bgr24_X_c","_yuv2monowhite_X_c","_yuv2ayuv64le_X_c","_yuv2monoblack_X_c","_yuv2yuyv422_X_c","_yuv2yvyu422_X_c","_yuv2uyvy422_X_c","_yuv2ya8_X_c","_yuv2ya16le_X_c","_yuv2ya16be_X_c","_sao_edge_restore_0_9","_sao_edge_restore_1_9","_sao_edge_restore_0_10","_sao_edge_restore_1_10","_sao_edge_restore_0_12","_sao_edge_restore_1_12","_sao_edge_restore_0_8","_sao_edge_restore_1_8",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Mr=[0,"jsCall_viiiiiiiiiiiiii_0","jsCall_viiiiiiiiiiiiii_1","jsCall_viiiiiiiiiiiiii_2","jsCall_viiiiiiiiiiiiii_3","jsCall_viiiiiiiiiiiiii_4","jsCall_viiiiiiiiiiiiii_5","jsCall_viiiiiiiiiiiiii_6","jsCall_viiiiiiiiiiiiii_7","jsCall_viiiiiiiiiiiiii_8","jsCall_viiiiiiiiiiiiii_9","jsCall_viiiiiiiiiiiiii_10","jsCall_viiiiiiiiiiiiii_11","jsCall_viiiiiiiiiiiiii_12","jsCall_viiiiiiiiiiiiii_13","jsCall_viiiiiiiiiiiiii_14","jsCall_viiiiiiiiiiiiii_15","jsCall_viiiiiiiiiiiiii_16","jsCall_viiiiiiiiiiiiii_17","jsCall_viiiiiiiiiiiiii_18","jsCall_viiiiiiiiiiiiii_19","jsCall_viiiiiiiiiiiiii_20","jsCall_viiiiiiiiiiiiii_21","jsCall_viiiiiiiiiiiiii_22","jsCall_viiiiiiiiiiiiii_23","jsCall_viiiiiiiiiiiiii_24","jsCall_viiiiiiiiiiiiii_25","jsCall_viiiiiiiiiiiiii_26","jsCall_viiiiiiiiiiiiii_27","jsCall_viiiiiiiiiiiiii_28","jsCall_viiiiiiiiiiiiii_29","jsCall_viiiiiiiiiiiiii_30","jsCall_viiiiiiiiiiiiii_31","jsCall_viiiiiiiiiiiiii_32","jsCall_viiiiiiiiiiiiii_33","jsCall_viiiiiiiiiiiiii_34","_put_hevc_pel_bi_w_pixels_9","_put_hevc_qpel_bi_w_h_9","_put_hevc_qpel_bi_w_v_9","_put_hevc_qpel_bi_w_hv_9","_put_hevc_epel_bi_w_h_9","_put_hevc_epel_bi_w_v_9","_put_hevc_epel_bi_w_hv_9","_put_hevc_pel_bi_w_pixels_10","_put_hevc_qpel_bi_w_h_10","_put_hevc_qpel_bi_w_v_10","_put_hevc_qpel_bi_w_hv_10","_put_hevc_epel_bi_w_h_10","_put_hevc_epel_bi_w_v_10","_put_hevc_epel_bi_w_hv_10","_put_hevc_pel_bi_w_pixels_12","_put_hevc_qpel_bi_w_h_12","_put_hevc_qpel_bi_w_v_12","_put_hevc_qpel_bi_w_hv_12","_put_hevc_epel_bi_w_h_12","_put_hevc_epel_bi_w_v_12","_put_hevc_epel_bi_w_hv_12","_put_hevc_pel_bi_w_pixels_8","_put_hevc_qpel_bi_w_h_8","_put_hevc_qpel_bi_w_v_8","_put_hevc_qpel_bi_w_hv_8","_put_hevc_epel_bi_w_h_8","_put_hevc_epel_bi_w_v_8","_put_hevc_epel_bi_w_hv_8"],kr={dd:zi,did:Hi,didd:Vi,fii:Yi,fiii:qi,ii:Wi,iid:Xi,iidiiii:Gi,iii:Ki,iiii:Qi,iiiii:Zi,iiiiii:Ji,iiiiiii:$i,iiiiiiii:er,iiiiij:tr,iiiji:ir,iiijjji:rr,jiiij:nr,jiiji:ar,jiji:sr,v:or,vdiidiiiii:lr,vi:fr,vii:ur,viidi:hr,viifi:cr,viii:dr,viiii:_r,viiiid:pr,viiiifii:mr,viiiii:br,viiiiidd:vr,viiiiii:yr,viiiiiifi:gr,viiiiiii:wr,viiiiiiii:Er,viiiiiiiid:Cr,viiiiiiiidi:Sr,viiiiiiiii:jr,viiiiiiiiii:Tr,viiiiiiiiiii:Ar,viiiiiiiiiiii:xr,viiiiiiiiiiiiii:Mr};function Pr(e){Ie(e,"dd")}function Ir(e){Ie(e,"did")}function Rr(e){Ie(e,"didd")}function Ur(e){Ie(e,"fii")}function Dr(e){Ie(e,"fiii")}function Fr(e){Ie(e,"ii")}function Or(e){Ie(e,"iid")}function Lr(e){Ie(e,"iidiiii")}function Br(e){Ie(e,"iii")}function Nr(e){Ie(e,"iiii")}function zr(e){Ie(e,"iiiii")}function Hr(e){Ie(e,"iiiiii")}function Vr(e){Ie(e,"iiiiiii")}function Yr(e){Ie(e,"iiiiiiii")}function qr(e){Ie(e,"iiiiij")}function Wr(e){Ie(e,"iiiji")}function Xr(e){Ie(e,"iiijjji")}function Gr(e){Ie(e,"jiiij")}function Kr(e){Ie(e,"jiiji")}function Qr(e){Ie(e,"jiji")}function Zr(e){Ie(e,"v")}function Jr(e){Ie(e,"vdiidiiiii")}function $r(e){Ie(e,"vi")}function en(e){Ie(e,"vii")}function tn(e){Ie(e,"viidi")}function rn(e){Ie(e,"viifi")}function nn(e){Ie(e,"viii")}function an(e){Ie(e,"viiii")}function sn(e){Ie(e,"viiiid")}function on(e){Ie(e,"viiiifii")}function ln(e){Ie(e,"viiiii")}function fn(e){Ie(e,"viiiiidd")}function un(e){Ie(e,"viiiiii")}function hn(e){Ie(e,"viiiiiifi")}function cn(e){Ie(e,"viiiiiii")}function dn(e){Ie(e,"viiiiiiii")}function _n(e){Ie(e,"viiiiiiiid")}function pn(e){Ie(e,"viiiiiiiidi")}function mn(e){Ie(e,"viiiiiiiii")}function bn(e){Ie(e,"viiiiiiiiii")}function vn(e){Ie(e,"viiiiiiiiiii")}function yn(e){Ie(e,"viiiiiiiiiiii")}function gn(e){Ie(e,"viiiiiiiiiiiiii")}function wn(e,t){return F[e](t)}function En(e,t,i){return F[e](t,i)}function Cn(e,t,i,r){return F[e](t,i,r)}function Sn(e,t,i){return F[e](t,i)}function jn(e,t,i,r){return F[e](t,i,r)}function Tn(e,t){return F[e](t)}function An(e,t,i){return F[e](t,i)}function xn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Mn(e,t,i){return F[e](t,i)}function kn(e,t,i,r){return F[e](t,i,r)}function Pn(e,t,i,r,n){return F[e](t,i,r,n)}function In(e,t,i,r,n,a){return F[e](t,i,r,n,a)}function Rn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Un(e,t,i,r,n,a,s,o){return F[e](t,i,r,n,a,s,o)}function Dn(e,t,i,r,n,a){return F[e](t,i,r,n,a)}function Fn(e,t,i,r,n){return F[e](t,i,r,n)}function On(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Ln(e,t,i,r,n){return F[e](t,i,r,n)}function Bn(e,t,i,r,n){return F[e](t,i,r,n)}function Nn(e,t,i,r){return F[e](t,i,r)}function zn(e){F[e]()}function Hn(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function Vn(e,t){F[e](t)}function Yn(e,t,i){F[e](t,i)}function qn(e,t,i,r,n){F[e](t,i,r,n)}function Wn(e,t,i,r,n){F[e](t,i,r,n)}function Xn(e,t,i,r){F[e](t,i,r)}function Gn(e,t,i,r,n){F[e](t,i,r,n)}function Kn(e,t,i,r,n,a){F[e](t,i,r,n,a)}function Qn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function Zn(e,t,i,r,n,a){F[e](t,i,r,n,a)}function Jn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function $n(e,t,i,r,n,a,s){F[e](t,i,r,n,a,s)}function ea(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l)}function ta(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function ia(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l)}function ra(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function na(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u)}function aa(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function sa(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u)}function oa(e,t,i,r,n,a,s,o,l,f,u,h){F[e](t,i,r,n,a,s,o,l,f,u,h)}function la(e,t,i,r,n,a,s,o,l,f,u,h,c){F[e](t,i,r,n,a,s,o,l,f,u,h,c)}function fa(e,t,i,r,n,a,s,o,l,f,u,h,c,d,_){F[e](t,i,r,n,a,s,o,l,f,u,h,c,d,_)}var ua={},ha={___buildEnvironment:Et,___lock:Ct,___syscall221:Ft,___syscall3:Ot,___syscall5:Lt,___unlock:Bt,___wasi_fd_close:zt,___wasi_fd_fdstat_get:Vt,___wasi_fd_seek:qt,___wasi_fd_write:Xt,__emscripten_fetch_free:Gt,__memory_base:1024,__table_base:0,_abort:Kt,_clock:Qt,_clock_gettime:$t,_emscripten_asm_const_i:pt,_emscripten_get_heap_size:ei,_emscripten_is_main_browser_thread:ti,_emscripten_memcpy_big:Ci,_emscripten_resize_heap:ri,_emscripten_start_fetch:fi,_fabs:ui,_getenv:hi,_gettimeofday:ci,_gmtime_r:_i,_llvm_exp2_f64:mi,_llvm_log2_f32:bi,_llvm_stackrestore:vi,_llvm_stacksave:yi,_llvm_trunc_f64:gi,_localtime_r:Ei,_nanosleep:ji,_pthread_cond_destroy:Ti,_pthread_cond_init:Ai,_pthread_create:xi,_pthread_join:Mi,_strftime:Di,_sysconf:Fi,_time:Oi,abortStackOverflow:Pe,getTempRet0:H,jsCall_dd:wn,jsCall_did:En,jsCall_didd:Cn,jsCall_fii:Sn,jsCall_fiii:jn,jsCall_ii:Tn,jsCall_iid:An,jsCall_iidiiii:xn,jsCall_iii:Mn,jsCall_iiii:kn,jsCall_iiiii:Pn,jsCall_iiiiii:In,jsCall_iiiiiii:Rn,jsCall_iiiiiiii:Un,jsCall_iiiiij:Dn,jsCall_iiiji:Fn,jsCall_iiijjji:On,jsCall_jiiij:Ln,jsCall_jiiji:Bn,jsCall_jiji:Nn,jsCall_v:zn,jsCall_vdiidiiiii:Hn,jsCall_vi:Vn,jsCall_vii:Yn,jsCall_viidi:qn,jsCall_viifi:Wn,jsCall_viii:Xn,jsCall_viiii:Gn,jsCall_viiiid:Kn,jsCall_viiiifii:Qn,jsCall_viiiii:Zn,jsCall_viiiiidd:Jn,jsCall_viiiiii:$n,jsCall_viiiiiifi:ea,jsCall_viiiiiii:ta,jsCall_viiiiiiii:ia,jsCall_viiiiiiiid:ra,jsCall_viiiiiiiidi:na,jsCall_viiiiiiiii:aa,jsCall_viiiiiiiiii:sa,jsCall_viiiiiiiiiii:oa,jsCall_viiiiiiiiiiii:la,jsCall_viiiiiiiiiiiiii:fa,memory:N,nullFunc_dd:Pr,nullFunc_did:Ir,nullFunc_didd:Rr,nullFunc_fii:Ur,nullFunc_fiii:Dr,nullFunc_ii:Fr,nullFunc_iid:Or,nullFunc_iidiiii:Lr,nullFunc_iii:Br,nullFunc_iiii:Nr,nullFunc_iiiii:zr,nullFunc_iiiiii:Hr,nullFunc_iiiiiii:Vr,nullFunc_iiiiiiii:Yr,nullFunc_iiiiij:qr,nullFunc_iiiji:Wr,nullFunc_iiijjji:Xr,nullFunc_jiiij:Gr,nullFunc_jiiji:Kr,nullFunc_jiji:Qr,nullFunc_v:Zr,nullFunc_vdiidiiiii:Jr,nullFunc_vi:$r,nullFunc_vii:en,nullFunc_viidi:tn,nullFunc_viifi:rn,nullFunc_viii:nn,nullFunc_viiii:an,nullFunc_viiiid:sn,nullFunc_viiiifii:on,nullFunc_viiiii:ln,nullFunc_viiiiidd:fn,nullFunc_viiiiii:un,nullFunc_viiiiiifi:hn,nullFunc_viiiiiii:cn,nullFunc_viiiiiiii:dn,nullFunc_viiiiiiiid:_n,nullFunc_viiiiiiiidi:pn,nullFunc_viiiiiiiii:mn,nullFunc_viiiiiiiiii:bn,nullFunc_viiiiiiiiiii:vn,nullFunc_viiiiiiiiiiii:yn,nullFunc_viiiiiiiiiiiiii:gn,table:Y},ca=d.asm(ua,ha,ue);d.asm=ca;d._AVSniffHttpFlvInit=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffHttpFlvInit.apply(null,arguments)},d._AVSniffStreamInit=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffStreamInit.apply(null,arguments)};var da,_a=d.___emscripten_environ_constructor=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___emscripten_environ_constructor.apply(null,arguments)},pa=(d.___errno_location=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___errno_location.apply(null,arguments)},d.__get_daylight=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_daylight.apply(null,arguments)}),ma=d.__get_timezone=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_timezone.apply(null,arguments)},ba=d.__get_tzname=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_tzname.apply(null,arguments)},va=(d._closeVideo=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._closeVideo.apply(null,arguments)},d._decodeCodecContext=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeCodecContext.apply(null,arguments)},d._decodeHttpFlvVideoFrame=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeHttpFlvVideoFrame.apply(null,arguments)},d._decodeVideoFrame=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeVideoFrame.apply(null,arguments)},d._demuxBox=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._demuxBox.apply(null,arguments)},d._exitMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitMissile.apply(null,arguments)},d._exitTsMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitTsMissile.apply(null,arguments)},d._fflush=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._fflush.apply(null,arguments)},d._free=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._free.apply(null,arguments)}),ya=(d._getAudioCodecID=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getAudioCodecID.apply(null,arguments)},d._getBufferLengthApi=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getBufferLengthApi.apply(null,arguments)},d._getExtensionInfo=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getExtensionInfo.apply(null,arguments)},d._getMediaInfo=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getMediaInfo.apply(null,arguments)},d._getPPS=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPS.apply(null,arguments)},d._getPPSLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPSLen.apply(null,arguments)},d._getPacket=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPacket.apply(null,arguments)},d._getSEI=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEI.apply(null,arguments)},d._getSEILen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEILen.apply(null,arguments)},d._getSPS=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPS.apply(null,arguments)},d._getSPSLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPSLen.apply(null,arguments)},d._getSniffHttpFlvPkg=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkg.apply(null,arguments)},d._getSniffHttpFlvPkgNoCheckProbe=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkgNoCheckProbe.apply(null,arguments)},d._getSniffStreamPkg=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkg.apply(null,arguments)},d._getSniffStreamPkgNoCheckProbe=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkgNoCheckProbe.apply(null,arguments)},d._getVLC=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLC.apply(null,arguments)},d._getVLCLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLCLen.apply(null,arguments)},d._getVPS=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPS.apply(null,arguments)},d._getVPSLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPSLen.apply(null,arguments)},d._getVideoCodecID=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVideoCodecID.apply(null,arguments)},d._initMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initMissile.apply(null,arguments)},d._initTsMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initTsMissile.apply(null,arguments)},d._initializeDecoder=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDecoder.apply(null,arguments)},d._initializeDemuxer=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDemuxer.apply(null,arguments)},d._initializeSniffHttpFlvModule=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModule.apply(null,arguments)},d._initializeSniffHttpFlvModuleWithAOpt=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModuleWithAOpt.apply(null,arguments)},d._initializeSniffStreamModule=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModule.apply(null,arguments)},d._initializeSniffStreamModuleWithAOpt=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModuleWithAOpt.apply(null,arguments)},d._main=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._main.apply(null,arguments)},d._malloc=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._malloc.apply(null,arguments)}),ga=(d._pushSniffHttpFlvData=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffHttpFlvData.apply(null,arguments)},d._pushSniffStreamData=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffStreamData.apply(null,arguments)},d._registerPlayer=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._registerPlayer.apply(null,arguments)},d._release=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._release.apply(null,arguments)},d._releaseHttpFLV=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseHttpFLV.apply(null,arguments)},d._releaseSniffHttpFlv=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffHttpFlv.apply(null,arguments)},d._releaseSniffStream=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffStream.apply(null,arguments)},d._setCodecType=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._setCodecType.apply(null,arguments)},d.establishStackSpace=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.establishStackSpace.apply(null,arguments)},d.stackAlloc=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackAlloc.apply(null,arguments)}),wa=d.stackRestore=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackRestore.apply(null,arguments)},Ea=d.stackSave=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackSave.apply(null,arguments)},Ca=(d.dynCall_v=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_v.apply(null,arguments)},d.dynCall_vi=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_vi.apply(null,arguments)});function Sa(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}d.asm=ca,Object.getOwnPropertyDescriptor(d,"intArrayFromString")||(d.intArrayFromString=function(){at("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"intArrayToString")||(d.intArrayToString=function(){at("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),d.ccall=G,d.cwrap=K,Object.getOwnPropertyDescriptor(d,"setValue")||(d.setValue=function(){at("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getValue")||(d.getValue=function(){at("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"allocate")||(d.allocate=function(){at("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getMemory")||(d.getMemory=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"AsciiToString")||(d.AsciiToString=function(){at("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToAscii")||(d.stringToAscii=function(){at("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF8ArrayToString")||(d.UTF8ArrayToString=function(){at("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF8ToString")||(d.UTF8ToString=function(){at("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF8Array")||(d.stringToUTF8Array=function(){at("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF8")||(d.stringToUTF8=function(){at("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF8")||(d.lengthBytesUTF8=function(){at("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF16ToString")||(d.UTF16ToString=function(){at("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF16")||(d.stringToUTF16=function(){at("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF16")||(d.lengthBytesUTF16=function(){at("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF32ToString")||(d.UTF32ToString=function(){at("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF32")||(d.stringToUTF32=function(){at("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF32")||(d.lengthBytesUTF32=function(){at("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"allocateUTF8")||(d.allocateUTF8=function(){at("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackTrace")||(d.stackTrace=function(){at("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPreRun")||(d.addOnPreRun=function(){at("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnInit")||(d.addOnInit=function(){at("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPreMain")||(d.addOnPreMain=function(){at("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnExit")||(d.addOnExit=function(){at("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPostRun")||(d.addOnPostRun=function(){at("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeStringToMemory")||(d.writeStringToMemory=function(){at("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeArrayToMemory")||(d.writeArrayToMemory=function(){at("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeAsciiToMemory")||(d.writeAsciiToMemory=function(){at("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addRunDependency")||(d.addRunDependency=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"removeRunDependency")||(d.removeRunDependency=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"ENV")||(d.ENV=function(){at("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"FS")||(d.FS=function(){at("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"FS_createFolder")||(d.FS_createFolder=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createPath")||(d.FS_createPath=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createDataFile")||(d.FS_createDataFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createPreloadedFile")||(d.FS_createPreloadedFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createLazyFile")||(d.FS_createLazyFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createLink")||(d.FS_createLink=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createDevice")||(d.FS_createDevice=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_unlink")||(d.FS_unlink=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"GL")||(d.GL=function(){at("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"dynamicAlloc")||(d.dynamicAlloc=function(){at("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"loadDynamicLibrary")||(d.loadDynamicLibrary=function(){at("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"loadWebAssemblyModule")||(d.loadWebAssemblyModule=function(){at("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getLEB")||(d.getLEB=function(){at("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getFunctionTables")||(d.getFunctionTables=function(){at("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"alignFunctionTables")||(d.alignFunctionTables=function(){at("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"registerFunctions")||(d.registerFunctions=function(){at("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),d.addFunction=O,Object.getOwnPropertyDescriptor(d,"removeFunction")||(d.removeFunction=function(){at("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getFuncWrapper")||(d.getFuncWrapper=function(){at("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"prettyPrint")||(d.prettyPrint=function(){at("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"makeBigInt")||(d.makeBigInt=function(){at("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"dynCall")||(d.dynCall=function(){at("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getCompilerSetting")||(d.getCompilerSetting=function(){at("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackSave")||(d.stackSave=function(){at("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackRestore")||(d.stackRestore=function(){at("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackAlloc")||(d.stackAlloc=function(){at("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"establishStackSpace")||(d.establishStackSpace=function(){at("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"print")||(d.print=function(){at("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"printErr")||(d.printErr=function(){at("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getTempRet0")||(d.getTempRet0=function(){at("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"setTempRet0")||(d.setTempRet0=function(){at("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"callMain")||(d.callMain=function(){at("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"abort")||(d.abort=function(){at("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"Pointer_stringify")||(d.Pointer_stringify=function(){at("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"warnOnce")||(d.warnOnce=function(){at("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"ALLOC_NORMAL")||Object.defineProperty(d,"ALLOC_NORMAL",{configurable:!0,get:function(){at("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_STACK")||Object.defineProperty(d,"ALLOC_STACK",{configurable:!0,get:function(){at("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_DYNAMIC")||Object.defineProperty(d,"ALLOC_DYNAMIC",{configurable:!0,get:function(){at("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_NONE")||Object.defineProperty(d,"ALLOC_NONE",{configurable:!0,get:function(){at("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"calledRun")||Object.defineProperty(d,"calledRun",{configurable:!0,get:function(){at("'calledRun' 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")}});function ja(e){W(0==Je,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),W(0==Ue.length,"cannot call main when preRun functions remain to be called");var t=(e=e||[]).length+1,i=ga(4*(t+1));pe[i>>2]=oe(m);for(var r=1;r>2)+r]=oe(e[r-1]);pe[(i>>2)+t]=0;try{xa(d._main(t,i),!0)}catch(e){if(e instanceof Sa)return;if("SimulateInfiniteLoop"==e)return void(B=!0);var n=e;e&&"object"===u(e)&&e.stack&&(n=[e,e.stack]),k("exception thrown: "+n),b(1,e)}finally{!0}}function Ta(e){function t(){da||(da=!0,q||(ze(),He(),d.onRuntimeInitialized&&d.onRuntimeInitialized(),Ma&&ja(e),Ye()))}e=e||p,Je>0||(Me(),Ne(),Je>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),t()}),1)):t(),ke()))}function Aa(){var e=M,t=k,i=!1;M=k=function(e){i=!0};try{var r=d._fflush;r&&r(0),["stdout","stderr"].forEach((function(e){var t=Ut.analyzePath("/dev/"+e);if(t){var r=t.object.rdev,n=At.ttys[r];n&&n.output&&n.output.length&&(i=!0)}}))}catch(e){}M=e,k=t,i&&R("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.")}function xa(e,t){Aa(),t&&B&&0===e||(B?t||k("exit("+e+") called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)"):(q=!0,e,Ve(),d.onExit&&d.onExit(e)),b(e,new Sa(e)))}if(et=function e(){da||Ta(),da||(et=e)},d.run=Ta,d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();var Ma=!0;d.noInitialRun&&(Ma=!1),B=!0,Ta(),t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/src/decoder")},{_process:158,buffer:66,crypto:75,fs:64,path:150}],2:[function(e,t,i){"use strict";const r=i;r.bignum=e("bn.js"),r.define=e("./asn1/api").define,r.base=e("./asn1/base"),r.constants=e("./asn1/constants"),r.decoders=e("./asn1/decoders"),r.encoders=e("./asn1/encoders")},{"./asn1/api":3,"./asn1/base":5,"./asn1/constants":9,"./asn1/decoders":11,"./asn1/encoders":14,"bn.js":16}],3:[function(e,t,i){"use strict";const r=e("./encoders"),n=e("./decoders"),a=e("inherits");function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}i.define=function(e,t){return new s(e,t)},s.prototype._createNamed=function(e){const t=this.name;function i(e){this._initNamed(e,t)}return a(i,e),i.prototype._initNamed=function(t,i){e.call(this,t,i)},new i(this)},s.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n[e])),this.decoders[e]},s.prototype.decode=function(e,t,i){return this._getDecoder(t).decode(e,i)},s.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},s.prototype.encode=function(e,t,i){return this._getEncoder(t).encode(e,i)}},{"./decoders":11,"./encoders":14,inherits:136}],4:[function(e,t,i){"use strict";const r=e("inherits"),n=e("../base/reporter").Reporter,a=e("safer-buffer").Buffer;function s(e,t){n.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return o.isEncoderBuffer(e)||(e=new o(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=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(s,n),i.DecoderBuffer=s,s.isDecoderBuffer=function(e){if(e instanceof s)return!0;return"object"==typeof e&&a.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const i=new s(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},i.EncoderBuffer=o,o.isEncoderBuffer=function(e){if(e instanceof o)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},o.prototype.join=function(e,t){return e||(e=a.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(e,t),t+=i.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},{"../base/reporter":7,inherits:136,"safer-buffer":185}],5:[function(e,t,i){"use strict";const r=i;r.Reporter=e("./reporter").Reporter,r.DecoderBuffer=e("./buffer").DecoderBuffer,r.EncoderBuffer=e("./buffer").EncoderBuffer,r.Node=e("./node")},{"./buffer":4,"./node":6,"./reporter":7}],6:[function(e,t,i){"use strict";const r=e("../base/reporter").Reporter,n=e("../base/buffer").EncoderBuffer,a=e("../base/buffer").DecoderBuffer,s=e("minimalistic-assert"),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function f(e,t,i){const r={};this._baseState=r,r.name=i,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())}t.exports=f;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(i){t[i]=e[i]}));const i=new this.constructor(t.parent);return i._baseState=t,i},f.prototype._wrap=function(){const e=this._baseState;l.forEach((function(t){this[t]=function(){const i=new this.constructor(this);return e.children.push(i),i[t].apply(i,arguments)}}),this)},f.prototype._init=function(e){const 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")},f.prototype._useArgs=function(e){const t=this._baseState,i=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==i.length&&(s(null===t.children),t.children=i,i.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;const t={};return Object.keys(e).forEach((function(i){i==(0|i)&&(i|=0);const r=e[i];t[r]=i})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){f.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),o.forEach((function(e){f.prototype[e]=function(){const t=this._baseState,i=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(i),this}})),f.prototype.use=function(e){s(e);const t=this._baseState;return s(null===t.use),t.use=e,this},f.prototype.optional=function(){return this._baseState.optional=!0,this},f.prototype.def=function(e){const t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},f.prototype.explicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},f.prototype.implicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},f.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},f.prototype.key=function(e){const t=this._baseState;return s(null===t.key),t.key=e,this},f.prototype.any=function(){return this._baseState.any=!0,this},f.prototype.choice=function(e){const t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},f.prototype.contains=function(e){const t=this._baseState;return s(null===t.use),t.contains=e,this},f.prototype._decode=function(e,t){const i=this._baseState;if(null===i.parent)return e.wrapResult(i.children[0]._decode(e,t));let r,n=i.default,s=!0,o=null;if(null!==i.key&&(o=e.enterKey(i.key)),i.optional){let r=null;if(null!==i.explicit?r=i.explicit:null!==i.implicit?r=i.implicit:null!==i.tag&&(r=i.tag),null!==r||i.any){if(s=this._peekTag(e,r,i.any),e.isError(s))return s}else{const r=e.save();try{null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(r)}}if(i.obj&&s&&(r=e.enterObject()),s){if(null!==i.explicit){const t=this._decodeTag(e,i.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===i.use&&null===i.choice){let t;i.any&&(t=e.save());const r=this._decodeTag(e,null!==i.implicit?i.implicit:i.tag,i.any);if(e.isError(r))return r;i.any?n=e.raw(t):e=r}if(t&&t.track&&null!==i.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==i.tag&&t.track(e.path(),e.offset,e.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(i){i._decode(e,t)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){const r=new a(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(r,t)}}return i.obj&&s&&(n=e.leaveObject(r)),null===i.key||null===n&&!0!==s?null!==o&&e.exitKey(o):e.leaveKey(o,i.key,n),n},f.prototype._decodeGeneric=function(e,t,i){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],i):/str$/.test(e)?this._decodeStr(t,e,i):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],i):"objid"===e?this._decodeObjid(t,null,null,i):"gentime"===e||"utctime"===e?this._decodeTime(t,e,i):"null_"===e?this._decodeNull(t,i):"bool"===e?this._decodeBool(t,i):"objDesc"===e?this._decodeStr(t,e,i):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,i):t.error("unknown tag: "+e)},f.prototype._getUse=function(e,t){const i=this._baseState;return i.useDecoder=this._use(e,t),s(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},f.prototype._decodeChoice=function(e,t){const i=this._baseState;let r=null,n=!1;return Object.keys(i.choice).some((function(a){const s=e.save(),o=i.choice[a];try{const i=o._decode(e,t);if(e.isError(i))return!1;r={type:a,value:i},n=!0}catch(t){return e.restore(s),!1}return!0}),this),n?r:e.error("Choice not matched")},f.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},f.prototype._encode=function(e,t,i){const r=this._baseState;if(null!==r.default&&r.default===e)return;const n=this._encodeValue(e,t,i);return void 0===n||this._skipDefault(n,t,i)?void 0:n},f.prototype._encodeValue=function(e,t,i){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new r);let a=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}let s=null,o=!1;if(n.any)a=this._createEncoderBuffer(e);else if(n.choice)a=this._encodeChoice(e,t);else if(n.contains)s=this._getUse(n.contains,i)._encode(e,t),o=!0;else if(n.children)s=n.children.map((function(i){if("null_"===i._baseState.tag)return i._encode(null,t,e);if(null===i._baseState.key)return t.error("Child should have a key");const r=t.enterKey(i._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const n=i._encode(e[i._baseState.key],t,e);return t.leaveKey(r),n}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const i=this.clone();i._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(i){const r=this._baseState;return this._getUse(r.args[0],e)._encode(i,t)}),i))}else null!==n.use?a=this._getUse(n.use,i)._encode(e,t):(s=this._encodePrimitive(n.tag,e),o=!0);if(!n.any&&null===n.choice){const e=null!==n.implicit?n.implicit:n.tag,i=null===n.implicit?"universal":"context";null===e?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(a=this._encodeComposite(e,o,i,s))}return null!==n.explicit&&(a=this._encodeComposite(n.explicit,!1,"context",a)),a},f.prototype._encodeChoice=function(e,t){const i=this._baseState,r=i.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(e.value,t)},f.prototype._encodePrimitive=function(e,t){const i=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&i.args)return this._encodeObjid(t,i.reverseArgs[0],i.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,i.args&&i.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},f.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},f.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},{"../base/buffer":4,"../base/reporter":7,"minimalistic-assert":142}],7:[function(e,t,i){"use strict";const r=e("inherits");function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function a(e,t){this.path=e,this.rethrow(t)}i.Reporter=n,n.prototype.isError=function(e){return e instanceof a},n.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,i){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=i)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){const t=this._reporterState,i=t.obj;return t.obj=e,i},n.prototype.error=function(e){let t;const i=this._reporterState,r=e instanceof a;if(t=r?e:new a(i.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!i.options.partial)throw t;return r||i.errors.push(t),t},n.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(a,Error),a.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:136}],8:[function(e,t,i){"use strict";function r(e){const t={};return Object.keys(e).forEach((function(i){(0|i)==i&&(i|=0);const r=e[i];t[r]=i})),t}i.tagClass={0:"universal",1:"application",2:"context",3:"private"},i.tagClassByName=r(i.tagClass),i.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"},i.tagByName=r(i.tag)},{}],9:[function(e,t,i){"use strict";const r=i;r._reverse=function(e){const t={};return Object.keys(e).forEach((function(i){(0|i)==i&&(i|=0);const r=e[i];t[r]=i})),t},r.der=e("./der")},{"./der":8}],10:[function(e,t,i){"use strict";const r=e("inherits"),n=e("bn.js"),a=e("../base/buffer").DecoderBuffer,s=e("../base/node"),o=e("../constants/der");function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){s.call(this,"der",e)}function u(e,t){let i=e.readUInt8(t);if(e.isError(i))return i;const r=o.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){let r=i;for(i=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;i<<=7,i|=127&r}}else i&=31;return{cls:r,primitive:n,tag:i,tagStr:o.tag[i]}}function h(e,t,i){let r=e.readUInt8(i);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const n=127&r;if(n>4)return e.error("length octect is too long");r=0;for(let t=0;t=31)return r.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=s.tagClassByName[i||"universal"]<<6,n}(e,t,i,this.reporter);if(r.length<128){const e=n.alloc(2);return e[0]=a,e[1]=r.length,this._createEncoderBuffer([e,r])}let o=1;for(let e=r.length;e>=256;e>>=8)o++;const l=n.alloc(2+o);l[0]=a,l[1]=128|o;for(let e=1+o,t=r.length;t>0;e--,t>>=8)l[e]=255&t;return this._createEncoderBuffer([l,r])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=n.alloc(2*e.length);for(let i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let t=0;t=128;i>>=7)r++}const a=n.alloc(r);let s=a.length-1;for(let t=e.length-1;t>=0;t--){let i=e[t];for(a[s--]=127&i;(i>>=7)>0;)a[s--]=128|127&i}return this._createEncoderBuffer(a)},l.prototype._encodeTime=function(e,t){let i;const r=new Date(e);return"gentime"===t?i=[f(r.getUTCFullYear()),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?i=[f(r.getUTCFullYear()%100),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(i,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.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&&!n.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=n.from(t)}if(n.isBuffer(e)){let t=e.length;0===e.length&&t++;const i=n.alloc(t);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let i=1;for(let t=e;t>=256;t>>=8)i++;const r=new Array(i);for(let t=r.length-1;t>=0;t--)r[t]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(n.from(r))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,i){const r=this._baseState;let n;if(null===r.default)return!1;const a=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,i).join()),a.length!==r.defaultBuffer.length)return!1;for(n=0;n=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function l(e,t,i,r){for(var n=0,a=Math.min(e.length,i),s=t;s=49?o-49+10:o>=17?o-17+10:o}return n}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,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6)n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,h=67108863&l,c=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=c;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+h)/67108864|0,h=67108863&s}i.words[f]=0|h,l=0|u}return 0!==l?i.words[f]=0|l:i.length--,i.strip()}a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?f[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--)}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=u[e],d=h[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modn(d).toString(e);i=(_=_.idivn(d)).isZero()?p+i:f[c-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!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&&r(!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 r(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var s,o,l="le"===t,f=new e(a),u=this.clone();if(l){for(o=0;!u.isZero();o++)s=u.andln(255),u.iushrn(8),f[o]=s;for(;o=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;for(;0!==n&&a>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==a&&s>26,this.words[s]=67108863&t;if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,W=0|o[2],X=8191&W,G=W>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],he=8191&ue,ce=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(h,z))|0)+((8191&(n=(n=Math.imul(h,H))+Math.imul(c,z)|0))<<13)|0;f=((a=Math.imul(c,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(h,Y)|0)|0)+((8191&(n=(n=n+Math.imul(h,q)|0)+Math.imul(c,Y)|0))<<13)|0;f=((a=a+Math.imul(c,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(h,X)|0)|0)+((8191&(n=(n=n+Math.imul(h,G)|0)+Math.imul(c,X)|0))<<13)|0;f=((a=a+Math.imul(c,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,X)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(h,Q)|0)|0)+((8191&(n=(n=n+Math.imul(h,Z)|0)+Math.imul(c,Q)|0))<<13)|0;f=((a=a+Math.imul(c,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,X)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(h,$)|0)|0)+((8191&(n=(n=n+Math.imul(h,ee)|0)+Math.imul(c,$)|0))<<13)|0;f=((a=a+Math.imul(c,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,X)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(h,ie)|0)|0)+((8191&(n=(n=n+Math.imul(h,re)|0)+Math.imul(c,ie)|0))<<13)|0;f=((a=a+Math.imul(c,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,X)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(h,ae)|0)|0)+((8191&(n=(n=n+Math.imul(h,se)|0)+Math.imul(c,ae)|0))<<13)|0;f=((a=a+Math.imul(c,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,X)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,X)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(h,le)|0)|0)+((8191&(n=(n=n+Math.imul(h,fe)|0)+Math.imul(c,le)|0))<<13)|0;f=((a=a+Math.imul(c,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,X)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(h,he)|0)|0)+((8191&(n=(n=n+Math.imul(h,ce)|0)+Math.imul(c,he)|0))<<13)|0;f=((a=a+Math.imul(c,ce)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,he)|0,n=(n=n+Math.imul(_,ce)|0)+Math.imul(p,he)|0,a=a+Math.imul(p,ce)|0;var je=(f+(r=r+Math.imul(h,_e)|0)|0)+((8191&(n=(n=n+Math.imul(h,pe)|0)+Math.imul(c,_e)|0))<<13)|0;f=((a=a+Math.imul(c,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,X)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,X)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,he)|0,n=(n=n+Math.imul(b,ce)|0)+Math.imul(v,he)|0,a=a+Math.imul(v,ce)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,X),n=(n=Math.imul(L,G))+Math.imul(B,X)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,he)|0,n=(n=n+Math.imul(g,ce)|0)+Math.imul(w,he)|0,a=a+Math.imul(w,ce)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,he)|0,n=(n=n+Math.imul(C,ce)|0)+Math.imul(S,he)|0,a=a+Math.imul(S,ce)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,he)|0,n=(n=n+Math.imul(T,ce)|0)+Math.imul(A,he)|0,a=a+Math.imul(A,ce)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,he)|0,n=(n=n+Math.imul(M,ce)|0)+Math.imul(k,he)|0,a=a+Math.imul(k,ce)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,he)|0,n=(n=n+Math.imul(I,ce)|0)+Math.imul(R,he)|0,a=a+Math.imul(R,ce)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,he)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(F,he)|0,a=a+Math.imul(F,ce)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,he),n=(n=Math.imul(L,ce))+Math.imul(B,he)|0,a=Math.imul(B,ce);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i};function _(e,t,i){return(new p).mulp(e,t,i)}function p(e,t){this.x=e,this.y=t}Math.imul||(d=c),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):i<63?c(this,e,t):i<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863}i.words[a]=o,r=s,s=n}return 0!==r?i.words[a]=r:i.length--,i.strip()}(this,e,t):_(this,e,t)},p.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;return r},p.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;for(s=2*t;s>=26,t+=n/67108864|0,t+=a>>>26,this.words[i]=67108863&a}return 0!==t&&(this.words[i]=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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n}return t}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var h=0|this.words[f];this.words[f]=u<<26-a|h>>>a,u=h&o}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a}for(;n>26,this.words[n+i]=67108863&a;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;h--){var c=67108864*(0|r.words[n.length+h])+(0|r.words[n.length+h-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,h);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(n,1,h),r.isZero()||(r.negative^=1);o&&(o.words[h]=c)}return o&&o.strip(),r.strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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);var n,s,o},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);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){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++f;for(var u=i.clone(),h=t.clone();!t.isZero();){for(var c=0,d=1;0==(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(h)),n.iushrn(1),s.iushrn(1);for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1);if(_>0)for(i.iushrn(_);_-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(h)),o.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s))}return{a:o,b:l,gcd:i.iushln(f)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,c=1;0==(i.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(i.iushrn(h);h-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s))}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var a=t;t=i,i=a}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 E(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){E.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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},n(v,b),v.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new g;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,n),c=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++)p=p.redSqr();r(m<_);var b=this.pow(h,new a(1).iushln(_-m-1));c=c.redMul(b),h=b.redSqr(),d=d.redMul(h),_=m}return c},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var h=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==h||0!==s?(s<<=1,s|=h,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0}l=26}return n},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new C(e)},n(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:20}],17:[function(e,t,i){"use strict";i.byteLength=function(e){var t=f(e),i=t[0],r=t[1];return 3*(i+r)/4-r},i.toByteArray=function(e){var t,i,r=f(e),s=r[0],o=r[1],l=new a(function(e,t,i){return 3*(t+i)/4-i}(0,s,o)),u=0,h=o>0?s-4:s;for(i=0;i>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===o&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,l[u++]=255&t);1===o&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},i.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],s=0,o=i-n;so?o:s+16383));1===n?(t=e[i-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function u(e,t,i){for(var n,a,s=[],o=t;o>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],18:[function(e,t,i){!function(t,i){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function a(e,t,i){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var s;"object"==typeof t?t.exports=a:i.BN=a,a.BN=a,a.wordSize=26;try{s=e("buffer").Buffer}catch(e){}function o(e,t,i){for(var n=0,a=Math.min(e.length,i),s=0,o=t;o=49&&f<=54?f-49+10:f>=17&&f<=22?f-17+10:f,s|=l}return r(!(240&s),"Invalid character in "+e),n}function l(e,t,i,n){for(var a=0,s=0,o=Math.min(e.length,i),l=t;l=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&s0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this._strip(),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6)n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this._strip()},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){a.prototype.inspect=u}else a.prototype.inspect=u;function u(){return(this.red?""}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?h[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--)}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var f=c[e],u=d[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modrn(u).toString(e);i=(_=_.idivn(u)).isZero()?p+i:h[f-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function _(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,h=67108863&l,c=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=c;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+h)/67108864|0,h=67108863&s}i.words[f]=0|h,l=0|u}return 0!==l?i.words[f]=0|l:i.length--,i._strip()}a.prototype.toArrayLike=function(e,t,i){this._strip();var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,n),s},a.prototype._toArrayLikeLE=function(e,t){for(var i=0,r=0,n=0,a=0;n>8&255),i>16&255),6===a?(i>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(i=0&&(e[i--]=s>>8&255),i>=0&&(e[i--]=s>>16&255),6===a?(i>=0&&(e[i--]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(i>=0)for(e[i--]=r;i>=0;)e[i--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;for(;0!==n&&a>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==a&&s>26,this.words[s]=67108863&t;if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,W=0|o[2],X=8191&W,G=W>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],he=8191&ue,ce=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(h,z))|0)+((8191&(n=(n=Math.imul(h,H))+Math.imul(c,z)|0))<<13)|0;f=((a=Math.imul(c,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(h,Y)|0)|0)+((8191&(n=(n=n+Math.imul(h,q)|0)+Math.imul(c,Y)|0))<<13)|0;f=((a=a+Math.imul(c,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(h,X)|0)|0)+((8191&(n=(n=n+Math.imul(h,G)|0)+Math.imul(c,X)|0))<<13)|0;f=((a=a+Math.imul(c,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,X)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(h,Q)|0)|0)+((8191&(n=(n=n+Math.imul(h,Z)|0)+Math.imul(c,Q)|0))<<13)|0;f=((a=a+Math.imul(c,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,X)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(h,$)|0)|0)+((8191&(n=(n=n+Math.imul(h,ee)|0)+Math.imul(c,$)|0))<<13)|0;f=((a=a+Math.imul(c,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,X)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(h,ie)|0)|0)+((8191&(n=(n=n+Math.imul(h,re)|0)+Math.imul(c,ie)|0))<<13)|0;f=((a=a+Math.imul(c,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,X)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(h,ae)|0)|0)+((8191&(n=(n=n+Math.imul(h,se)|0)+Math.imul(c,ae)|0))<<13)|0;f=((a=a+Math.imul(c,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,X)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,X)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(h,le)|0)|0)+((8191&(n=(n=n+Math.imul(h,fe)|0)+Math.imul(c,le)|0))<<13)|0;f=((a=a+Math.imul(c,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,X)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(h,he)|0)|0)+((8191&(n=(n=n+Math.imul(h,ce)|0)+Math.imul(c,he)|0))<<13)|0;f=((a=a+Math.imul(c,ce)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,he)|0,n=(n=n+Math.imul(_,ce)|0)+Math.imul(p,he)|0,a=a+Math.imul(p,ce)|0;var je=(f+(r=r+Math.imul(h,_e)|0)|0)+((8191&(n=(n=n+Math.imul(h,pe)|0)+Math.imul(c,_e)|0))<<13)|0;f=((a=a+Math.imul(c,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,X)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,X)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,he)|0,n=(n=n+Math.imul(b,ce)|0)+Math.imul(v,he)|0,a=a+Math.imul(v,ce)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,X),n=(n=Math.imul(L,G))+Math.imul(B,X)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,he)|0,n=(n=n+Math.imul(g,ce)|0)+Math.imul(w,he)|0,a=a+Math.imul(w,ce)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,he)|0,n=(n=n+Math.imul(C,ce)|0)+Math.imul(S,he)|0,a=a+Math.imul(S,ce)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,he)|0,n=(n=n+Math.imul(T,ce)|0)+Math.imul(A,he)|0,a=a+Math.imul(A,ce)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,he)|0,n=(n=n+Math.imul(M,ce)|0)+Math.imul(k,he)|0,a=a+Math.imul(k,ce)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,he)|0,n=(n=n+Math.imul(I,ce)|0)+Math.imul(R,he)|0,a=a+Math.imul(R,ce)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,he)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(F,he)|0,a=a+Math.imul(F,ce)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,he),n=(n=Math.imul(L,ce))+Math.imul(B,he)|0,a=Math.imul(B,ce);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i};function m(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863}i.words[a]=o,r=s,s=n}return 0!==r?i.words[a]=r:i.length--,i._strip()}function b(e,t,i){return m(e,t,i)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=_),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):i<63?_(this,e,t):i<1024?m(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;for(s=2*t;s>=26,i+=a/67108864|0,i+=s>>>26,this.words[n]=67108863&s}return 0!==i&&(this.words[n]=i,this.length++),t?this.ineg():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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n&1}return t}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var h=0|this.words[f];this.words[f]=u<<26-a|h>>>a,u=h&o}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a}for(;n>26,this.words[n+i]=67108863&a;if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;h--){var c=67108864*(0|r.words[n.length+h])+(0|r.words[n.length+h-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,h);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(n,1,h),r.isZero()||(r.negative^=1);o&&(o.words[h]=c)}return o&&o._strip(),r._strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,s,o},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(i*n+(0|this.words[a]))%e;return t?-n:n},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var a=(0|this.words[n])+67108864*i;this.words[n]=a/e|0,i=a%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++f;for(var u=i.clone(),h=t.clone();!t.isZero();){for(var c=0,d=1;0==(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(h)),n.iushrn(1),s.iushrn(1);for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1);if(_>0)for(i.iushrn(_);_-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(h)),o.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s))}return{a:o,b:l,gcd:i.iushln(f)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,c=1;0==(i.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(i.iushrn(h);h-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s))}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var a=t;t=i,i=a}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 j(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(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 w(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){j.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)}g.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},n(w,g),w.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new E;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},j.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},j.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},j.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},j.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},j.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},j.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},j.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},j.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},j.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},j.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},j.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},j.prototype.isqr=function(e){return this.imul(e,e.clone())},j.prototype.sqr=function(e){return this.mul(e,e)},j.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,n),c=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++)p=p.redSqr();r(m<_);var b=this.pow(h,new a(1).iushln(_-m-1));c=c.redMul(b),h=b.redSqr(),d=d.redMul(h),_=m}return c},j.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},j.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var h=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==h||0!==s?(s<<=1,s|=h,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0}l=26}return n},j.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},j.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new T(e)},n(T,j),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:20}],19:[function(e,t,i){var r;function n(e){this.rand=e}if(t.exports=function(e){return r||(r=new n(null)),r.generate(e)},t.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i>>24]^u[_>>>16&255]^h[p>>>8&255]^c[255&m]^t[b++],s=f[_>>>24]^u[p>>>16&255]^h[m>>>8&255]^c[255&d]^t[b++],o=f[p>>>24]^u[m>>>16&255]^h[d>>>8&255]^c[255&_]^t[b++],l=f[m>>>24]^u[d>>>16&255]^h[_>>>8&255]^c[255&p]^t[b++],d=a,_=s,p=o,m=l;return a=(r[d>>>24]<<24|r[_>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[b++],s=(r[_>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&d])^t[b++],o=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[d>>>8&255]<<8|r[255&_])^t[b++],l=(r[m>>>24]<<24|r[d>>>16&255]<<16|r[_>>>8&255]<<8|r[255&p])^t[b++],[a>>>=0,s>>>=0,o>>>=0,l>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var i=[],r=[],n=[[],[],[],[]],a=[[],[],[],[]],s=0,o=0,l=0;l<256;++l){var f=o^o<<1^o<<2^o<<3^o<<4;f=f>>>8^255&f^99,i[s]=f,r[f]=s;var u=e[s],h=e[u],c=e[h],d=257*e[f]^16843008*f;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*c^65537*h^257*u^16843008*s,a[0][f]=d<<24|d>>>8,a[1][f]=d<<16|d>>>16,a[2][f]=d<<8|d>>>24,a[3][f]=d,0===s?s=o=1:(s=u^e[e[e[c^u]]],o^=e[e[o]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:a}}();function f(e){this._key=n(e),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var e=this._key,t=e.length,i=t+6,r=4*(i+1),n=[],a=0;a>>24,s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s],s^=o[a/t|0]<<24):t>6&&a%t==4&&(s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s]),n[a]=n[a-t]^s}for(var f=[],u=0;u>>24]]^l.INV_SUB_MIX[1][l.SBOX[c>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[c>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&c]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(e){return s(e=n(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},f.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),i=r.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[1],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[3],12),i},f.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var i=s(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),a=r.allocUnsafe(16);return a.writeUInt32BE(i[0],0),a.writeUInt32BE(i[3],4),a.writeUInt32BE(i[2],8),a.writeUInt32BE(i[1],12),a},f.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=f},{"safe-buffer":184}],22:[function(e,t,i){var r=e("./aes"),n=e("safe-buffer").Buffer,a=e("cipher-base"),s=e("inherits"),o=e("./ghash"),l=e("buffer-xor"),f=e("./incr32");function u(e,t,i,s){a.call(this);var l=n.alloc(4,0);this._cipher=new r.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new o(u),i=function(e,t,i){if(12===t.length)return e._finID=n.concat([t,n.from([0,0,0,1])]),n.concat([t,n.from([0,0,0,2])]);var r=new o(i),a=t.length,s=a%16;r.update(t),s&&(s=16-s,r.update(n.alloc(s,0))),r.update(n.alloc(8,0));var l=8*a,u=n.alloc(8);u.writeUIntBE(l,0,8),r.update(u),e._finID=r.state;var h=n.from(e._finID);return f(h),h}(this,i,u),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(u,a),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=n.alloc(t,0),this._ghash.update(t))}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var i=0;e.length!==t.length&&i++;for(var r=Math.min(e.length,t.length),n=0;n16)throw new Error("unable to decrypt data");var i=-1;for(;++i16)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},h.prototype.flush=function(){if(this.cache.length)return this.cache},i.createDecipher=function(e,t){var i=a[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=f(t,!1,i.key,i.iv);return c(e,r.key,r.iv)},i.createDecipheriv=c},{"./aes":21,"./authCipher":22,"./modes":34,"./streamCipher":37,"cipher-base":67,evp_bytestokey:105,inherits:136,"safe-buffer":184}],25:[function(e,t,i){var r=e("./modes"),n=e("./authCipher"),a=e("safe-buffer").Buffer,s=e("./streamCipher"),o=e("cipher-base"),l=e("./aes"),f=e("evp_bytestokey");function u(e,t,i){o.call(this),this._cache=new c,this._cipher=new l.AES(t),this._prev=a.from(i),this._mode=e,this._autopadding=!0}e("inherits")(u,o),u.prototype._update=function(e){var t,i;this._cache.add(e);for(var r=[];t=this._cache.get();)i=this._mode.encrypt(this,t),r.push(i);return a.concat(r)};var h=a.alloc(16,16);function c(){this.cache=a.allocUnsafe(0)}function d(e,t,i){var o=r[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=a.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof i&&(i=a.from(i)),"GCM"!==o.mode&&i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new s(o.module,t,i):"auth"===o.type?new n(o.module,t,i):new u(o.module,t,i)}u.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(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},c.prototype.add=function(e){this.cache=a.concat([this.cache,e])},c.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},c.prototype.flush=function(){for(var e=16-this.cache.length,t=a.allocUnsafe(e),i=-1;++i>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=a(n)},s.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(a([0,e,0,t])),this.state},t.exports=s},{"safe-buffer":184}],27:[function(e,t,i){t.exports=function(e){for(var t,i=e.length;i--;){if(255!==(t=e.readUInt8(i))){t++,e.writeUInt8(t,i);break}e.writeUInt8(0,i)}}},{}],28:[function(e,t,i){var r=e("buffer-xor");i.encrypt=function(e,t){var i=r(t,e._prev);return e._prev=e._cipher.encryptBlock(i),e._prev},i.decrypt=function(e,t){var i=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return r(n,i)}},{"buffer-xor":65}],29:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("buffer-xor");function a(e,t,i){var a=t.length,s=n(t,e._cache);return e._cache=e._cache.slice(a),e._prev=r.concat([e._prev,i?t:s]),s}i.encrypt=function(e,t,i){for(var n,s=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){s=r.concat([s,a(e,t,i)]);break}n=e._cache.length,s=r.concat([s,a(e,t.slice(0,n),i)]),t=t.slice(n)}return s}},{"buffer-xor":65,"safe-buffer":184}],30:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t,i){for(var r,n,s=-1,o=0;++s<8;)r=t&1<<7-s?128:0,o+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^r))>>s%8,e._prev=a(e._prev,i?r:n);return o}function a(e,t){var i=e.length,n=-1,a=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++n>7;return a}i.encrypt=function(e,t,i){for(var a=t.length,s=r.allocUnsafe(a),o=-1;++o=0||!i.umod(e.prime1)||!i.umod(e.prime2);)i=new r(n(t));return i}t.exports=a,a.getr=s}).call(this,e("buffer").Buffer)},{"bn.js":42,buffer:66,randombytes:166}],42:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],43:[function(e,t,i){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":44}],44:[function(e,t,i){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"}}},{}],45:[function(e,t,i){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"}},{}],46:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hash"),a=e("readable-stream"),s=e("inherits"),o=e("./sign"),l=e("./verify"),f=e("./algorithms.json");function u(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function c(e){return new u(e)}function d(e){return new h(e)}Object.keys(f).forEach((function(e){f[e].id=r.from(f[e].id,"hex"),f[e.toLowerCase()]=f[e]})),s(u,a.Writable),u.prototype._write=function(e,t,i){this._hash.update(e),i()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var i=this._hash.digest(),r=o(i,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},s(h,a.Writable),h.prototype._write=function(e,t,i){this._hash.update(e),i()},h.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},h.prototype.verify=function(e,t,i){"string"==typeof t&&(t=r.from(t,i)),this.end();var n=this._hash.digest();return l(t,n,e,this._signType,this._tag)},t.exports={Sign:c,Verify:d,createSign:c,createVerify:d}},{"./algorithms.json":44,"./sign":47,"./verify":48,"create-hash":71,inherits:136,"readable-stream":63,"safe-buffer":184}],47:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hmac"),a=e("browserify-rsa"),s=e("elliptic").ec,o=e("bn.js"),l=e("parse-asn1"),f=e("./curves.json");function u(e,t,i,a){if((e=r.from(e.toArray())).length0&&i.ishrn(r),i}function c(e,t,i){var a,s;do{for(a=r.alloc(0);8*a.length=t)throw new Error("invalid sig")}t.exports=function(e,t,i,f,u){var h=s(i);if("ec"===h.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=o[i.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var n=new a(r),s=i.data.subjectPrivateKey.data;return n.verify(t,e,s)}(e,t,h)}if("dsa"===h.type){if("dsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=i.data.p,a=i.data.q,o=i.data.g,f=i.data.pub_key,u=s.signature.decode(e,"der"),h=u.s,c=u.r;l(h,a),l(c,a);var d=n.mont(r),_=h.invm(a);return 0===o.toRed(d).redPow(new n(t).mul(_).mod(a)).fromRed().mul(f.toRed(d).redPow(c.mul(_).mod(a)).fromRed()).mod(r).mod(a).cmp(c)}(e,t,h)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");t=r.concat([u,t]);for(var c=h.modulus.byteLength(),d=[1],_=0;t.length+d.length+22?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,n,s,o;if("string"==typeof t&&(n="not ",t.substr(!s||s<0?0:+s,n.length)===n)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t}(e," argument"))o="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,i){return"number"!=typeof i&&(i=0),!(i+t.length>e.length)&&-1!==e.indexOf(t,i)}(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return o+=". Received type ".concat(typeof i)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},{}],50:[function(e,t,i){(function(i){"use strict";var r=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=f;var n=e("./_stream_readable"),a=e("./_stream_writable");e("inherits")(f,n);for(var s=r(a.prototype),o=0;o0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),r)s.endEmitted?E(e,new w):A(e,s,t,!0);else if(s.ended)E(e,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):P(e,s)):A(e,s,t,!1)}else r||(s.reading=!1,P(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(k,e))}function k(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function U(e){f("readable nexttick read 0"),e.read(0)}function D(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0)}function F(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):i=t.buffer.consume(e,t.decoder),i);var i}function L(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(B,t,e))}function B(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var i=t._writableState;(!i||i.autoDestroy&&i.finished)&&t.destroy()}}function N(e,t){for(var i=0,r=e.length;i=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):M(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&L(this),null;var r,n=t.needReadable;return f("need readable",n),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&L(this)),null!==r&&this.emit("data",r),r},j.prototype._read=function(e){E(this,new g("_read()"))},j.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,f("pipe count=%d opts=%j",n.pipesCount,t);var s=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?l:m;function o(t,i){f("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f("cleanup"),e.removeListener("close",_),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),r.removeListener("end",l),r.removeListener("end",m),r.removeListener("data",c),h=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){f("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",o);var u=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,F(e))}}(r);e.on("drain",u);var h=!1;function c(t){f("ondata");var i=e.write(t);f("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==N(n.pipes,e))&&!h&&(f("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){f("onerror",t),m(),e.removeListener("error",d),0===a(e,"error")&&E(e,t)}function _(){e.removeListener("finish",p),m()}function p(){f("onfinish"),e.removeListener("close",_),m()}function m(){f("unpipe"),r.unpipe(e)}return r.on("data",c),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",d),e.once("close",_),e.once("finish",p),e.emit("pipe",r),n.flowing||(f("pipe resume"),r.resume()),e},j.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,f("on readable",n.length,n.reading),n.length?M(this):n.reading||i.nextTick(U,this))),r},j.prototype.addListener=j.prototype.on,j.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(R,this),r},j.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(R,this),t},j.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}(this,e)),e.paused=!1,this},j.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},j.prototype.wrap=function(e){var t=this,i=this._readableState,r=!1;for(var n in e.on("end",(function(){if(f("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(f("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(t.push(n)||(r=!0,e.pause()))})),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-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(j.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),j.prototype._write=function(e,t,i){i(new p("_write()"))},j.prototype._writev=null,j.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(j.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),j.prototype.destroy=h.destroy,j.prototype._undestroy=h.undestroy,j.prototype._destroy=function(e,t){t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":49,"./_stream_duplex":50,"./internal/streams/destroy":57,"./internal/streams/state":61,"./internal/streams/stream":62,_process:158,buffer:66,inherits:136,"util-deprecate":197}],55:[function(e,t,i){(function(i){"use strict";var r;function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var a=e("./end-of-stream"),s=Symbol("lastResolve"),o=Symbol("lastReject"),l=Symbol("error"),f=Symbol("ended"),u=Symbol("lastPromise"),h=Symbol("handlePromise"),c=Symbol("stream");function d(e,t){return{value:e,done:t}}function _(e){var t=e[s];if(null!==t){var i=e[c].read();null!==i&&(e[u]=null,e[s]=null,e[o]=null,t(d(i,!1)))}}function p(e){i.nextTick(_,e)}var m=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((n(r={get stream(){return this[c]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[c].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[l]?r(e[l]):t(d(void 0,!0))}))}));var r,n=this[u];if(n)r=new Promise(function(e,t){return function(i,r){e.then((function(){t[f]?i(d(void 0,!0)):t[h](i,r)}),r)}}(n,this));else{var a=this[c].read();if(null!==a)return Promise.resolve(d(a,!1));r=new Promise(this[h])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),n(r,"return",(function(){var e=this;return new Promise((function(t,i){e[c].destroy(null,(function(e){e?i(e):t(d(void 0,!0))}))}))})),r),m);t.exports=function(e){var t,i=Object.create(b,(n(t={},c,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,o,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,f,{value:e._readableState.endEmitted,writable:!0}),n(t,h,{value:function(e,t){var r=i[c].read();r?(i[u]=null,i[s]=null,i[o]=null,e(d(r,!1))):(i[s]=e,i[o]=t)},writable:!0}),t));return i[u]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=i[o];return null!==t&&(i[u]=null,i[s]=null,i[o]=null,t(e)),void(i[l]=e)}var r=i[s];null!==r&&(i[u]=null,i[s]=null,i[o]=null,r(d(void 0,!0))),i[f]=!0})),e.on("readable",p.bind(null,i)),i}}).call(this,e("_process"))},{"./end-of-stream":58,_process:158}],56:[function(e,t,i){"use strict";function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t){for(var i=0;i0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,i,r,n=s.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,i=n,r=o,s.prototype.copy.call(t,i,r),o+=a.data.length,a=a.next;return n}},{key:"consume",value:function(e,t){var i;return en.length?n.length:e;if(a===n.length?r+=n:r+=n.slice(0,e),0==(e-=a)){a===n.length?(++i,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(a));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),i=this.head,r=1;for(i.data.copy(t),e-=i.data.length;i=i.next;){var n=i.data,a=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,a),0==(e-=a)){a===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return o(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&s.forEach(f),a||(s.forEach(f),n(r))}))}));return t.reduce(u)}},{"../../../errors":49,"./end-of-stream":58}],61:[function(e,t,i){"use strict";var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,i,n){var a=function(e,t,i){return null!=e.highWaterMark?e.highWaterMark:t?e[i]:null}(t,n,i);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(n?i:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},{"../../../errors":49}],62:[function(e,t,i){t.exports=e("events").EventEmitter},{events:104}],63:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js"),i.finished=e("./lib/internal/streams/end-of-stream.js"),i.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":50,"./lib/_stream_passthrough.js":51,"./lib/_stream_readable.js":52,"./lib/_stream_transform.js":53,"./lib/_stream_writable.js":54,"./lib/internal/streams/end-of-stream.js":58,"./lib/internal/streams/pipeline.js":60}],64:[function(e,t,i){arguments[4][20][0].apply(i,arguments)},{dup:20}],65:[function(e,t,i){(function(e){t.exports=function(t,i){for(var r=Math.min(t.length,i.length),n=new e(r),a=0;a + * @license MIT + */ +"use strict";var r=e("base64-js"),n=e("ieee754");i.Buffer=t,i.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},i.INSPECT_MAX_BYTES=50;function a(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=new Uint8Array(e);return i.__proto__=t.prototype,i}function t(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return s(e,t,i)}function s(e,i,r){if("string"==typeof e)return function(e,i){"string"==typeof i&&""!==i||(i="utf8");if(!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var r=0|h(e,i),n=a(r),s=n.write(e,i);s!==r&&(n=n.slice(0,s));return n}(e,i);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(L(e,ArrayBuffer)||e&&L(e.buffer,ArrayBuffer))return function(e,i,r){if(i<0||e.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function h(e,i){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||L(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var a=!1;;)switch(i){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(a)return n?-1:D(e).length;i=(""+i).toLowerCase(),a=!0}}function c(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,i);case"utf8":case"utf-8":return C(this,t,i);case"ascii":return S(this,t,i);case"latin1":case"binary":return j(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function d(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function _(e,i,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),B(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof i&&(i=t.from(i,n)),t.isBuffer(i))return 0===i.length?-1:p(e,i,r,n,a);if("number"==typeof i)return i&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,i,r):Uint8Array.prototype.lastIndexOf.call(e,i,r):p(e,[i],r,n,a);throw new TypeError("val must be string, number or Buffer")}function p(e,t,i,r,n){var a,s=1,o=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,l/=2,i/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){var u=-1;for(a=i;ao&&(i=o-l),a=i;a>=0;a--){for(var h=!0,c=0;cn&&(r=n):r=n;var a=t.length;r>a/2&&(r=a/2);for(var s=0;s>8,n=i%256,a.push(n),a.push(r);return a}(t,e.length-i),e,i,r)}function E(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i))}function C(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n239?4:f>223?3:f>191?2:1;if(n+h<=i)switch(h){case 1:f<128&&(u=f);break;case 2:128==(192&(a=e[n+1]))&&(l=(31&f)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],s=e[n+2],128==(192&a)&&128==(192&s)&&(l=(15&f)<<12|(63&a)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],s=e[n+2],o=e[n+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(l=(15&f)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var i="",r=0;for(;rt&&(e+=" ... "),""},t.prototype.compare=function(e,i,r,n,a){if(L(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===i&&(i=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),i<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&i>=r)return 0;if(n>=a)return-1;if(i>=r)return 1;if(this===e)return 0;for(var s=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(i>>>=0),l=Math.min(s,o),f=this.slice(n,a),u=e.slice(i,r),h=0;h>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return m(this,e,t,i);case"utf8":case"utf-8":return b(this,e,t,i);case"ascii":return v(this,e,t,i);case"latin1":case"binary":return y(this,e,t,i);case"base64":return g(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;nr)&&(i=r);for(var n="",a=t;ai)throw new RangeError("Trying to access beyond buffer length")}function M(e,i,r,n,a,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>a||ie.length)throw new RangeError("Index out of range")}function k(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function P(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,4),n.write(e,t,i,r,23,4),i+4}function I(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,8),n.write(e,t,i,r,52,8),i+8}t.prototype.slice=function(e,i){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(i=void 0===i?r:~~i)<0?(i+=r)<0&&(i=0):i>r&&(i=r),i>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},t.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a=(n*=128)&&(r-=Math.pow(2,8*t)),r},t.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=t,n=1,a=this[e+--r];r>0&&(n*=256);)a+=this[e+--r]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},t.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t>>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+i},t.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n)}var a=0,s=1,o=0;for(this[t]=255&e;++a>0)-o&255;return t+i},t.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n)}var a=i-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+i},t.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,i){return P(this,e,t,!0,i)},t.prototype.writeFloatBE=function(e,t,i){return P(this,e,t,!1,i)},t.prototype.writeDoubleLE=function(e,t,i){return I(this,e,t,!0,i)},t.prototype.writeDoubleBE=function(e,t,i){return I(this,e,t,!1,i)},t.prototype.copy=function(e,i,r,n){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),i>=e.length&&(i=e.length),i||(i=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-i=0;--s)e[s+i]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),i);return a},t.prototype.fill=function(e,i,r,n){if("string"==typeof e){if("string"==typeof i?(n=i,i=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var a=e.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(e=a)}}else"number"==typeof e&&(e&=255);if(i<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=i;s55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function F(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,i,r){for(var n=0;n=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function L(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function B(e){return e!=e}}).call(this,e("buffer").Buffer)},{"base64-js":17,buffer:66,ieee754:135}],67:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("stream").Transform,a=e("string_decoder").StringDecoder;function s(e){n.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}e("inherits")(s,n),s.prototype.update=function(e,t,i){"string"==typeof e&&(e=r.from(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,i){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{i(r)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,i){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return i&&(r+=this._decoder.end()),r},t.exports=s},{inherits:136,"safe-buffer":184,stream:194,string_decoder:195}],68:[function(e,t,i){(function(e){function t(e){return Object.prototype.toString.call(e)}i.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},i.isBoolean=function(e){return"boolean"==typeof e},i.isNull=function(e){return null===e},i.isNullOrUndefined=function(e){return null==e},i.isNumber=function(e){return"number"==typeof e},i.isString=function(e){return"string"==typeof e},i.isSymbol=function(e){return"symbol"==typeof e},i.isUndefined=function(e){return void 0===e},i.isRegExp=function(e){return"[object RegExp]"===t(e)},i.isObject=function(e){return"object"==typeof e&&null!==e},i.isDate=function(e){return"[object Date]"===t(e)},i.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},i.isFunction=function(e){return"function"==typeof e},i.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},i.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":137}],69:[function(e,t,i){(function(i){var r=e("elliptic"),n=e("bn.js");t.exports=function(e){return new s(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function o(e,t,r){Array.isArray(e)||(e=e.toArray());var n=new i(e);if(r&&n.lengthi)?t=("rmd160"===e?new l:f(e)).update(t).digest():t.length64?t=e(t):t.length<64&&(t=n.concat([t,s],64));for(var i=this._ipad=n.allocUnsafe(64),r=this._opad=n.allocUnsafe(64),o=0;o<64;o++)i[o]=54^t[o],r[o]=92^t[o];this._hash=[i]}r(o,a),o.prototype._update=function(e){this._hash.push(e)},o.prototype._final=function(){var e=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,e]))},t.exports=o},{"cipher-base":67,inherits:136,"safe-buffer":184}],75:[function(e,t,i){"use strict";i.randomBytes=i.rng=i.pseudoRandomBytes=i.prng=e("randombytes"),i.createHash=i.Hash=e("create-hash"),i.createHmac=i.Hmac=e("create-hmac");var r=e("browserify-sign/algos"),n=Object.keys(r),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);i.getHashes=function(){return a};var s=e("pbkdf2");i.pbkdf2=s.pbkdf2,i.pbkdf2Sync=s.pbkdf2Sync;var o=e("browserify-cipher");i.Cipher=o.Cipher,i.createCipher=o.createCipher,i.Cipheriv=o.Cipheriv,i.createCipheriv=o.createCipheriv,i.Decipher=o.Decipher,i.createDecipher=o.createDecipher,i.Decipheriv=o.Decipheriv,i.createDecipheriv=o.createDecipheriv,i.getCiphers=o.getCiphers,i.listCiphers=o.listCiphers;var l=e("diffie-hellman");i.DiffieHellmanGroup=l.DiffieHellmanGroup,i.createDiffieHellmanGroup=l.createDiffieHellmanGroup,i.getDiffieHellman=l.getDiffieHellman,i.createDiffieHellman=l.createDiffieHellman,i.DiffieHellman=l.DiffieHellman;var f=e("browserify-sign");i.createSign=f.createSign,i.Sign=f.Sign,i.createVerify=f.createVerify,i.Verify=f.Verify,i.createECDH=e("create-ecdh");var u=e("public-encrypt");i.publicEncrypt=u.publicEncrypt,i.privateEncrypt=u.privateEncrypt,i.publicDecrypt=u.publicDecrypt,i.privateDecrypt=u.privateDecrypt;var h=e("randomfill");i.randomFill=h.randomFill,i.randomFillSync=h.randomFillSync,i.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},i.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":38,"browserify-sign":46,"browserify-sign/algos":43,"create-ecdh":69,"create-hash":71,"create-hmac":73,"diffie-hellman":82,pbkdf2:151,"public-encrypt":159,randombytes:166,randomfill:167}],76:[function(e,t,i){"use strict";i.utils=e("./des/utils"),i.Cipher=e("./des/cipher"),i.DES=e("./des/des"),i.CBC=e("./des/cbc"),i.EDE=e("./des/ede")},{"./des/cbc":77,"./des/cipher":78,"./des/des":79,"./des/ede":80,"./des/utils":81}],77:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a={};function s(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t0;r--)t+=this._buffer(e,t),i+=this._flushBuffer(n,i);return t+=this._buffer(e,t),n},n.prototype.final=function(e){var t,i;return e&&(t=this.update(e)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(i):i},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];i=a.r28shl(i,o),n=a.r28shl(n,o),a.pc2(i,n,e.keys,s)}},l.prototype._update=function(e,t,i,r){var n=this._desState,s=a.readUInt32BE(e,t),o=a.readUInt32BE(e,t+4);a.ip(s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,s,o,n.tmp,0):this._decrypt(n,s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],a.writeUInt32BE(i,s,r),a.writeUInt32BE(i,o,r+4)},l.prototype._pad=function(e,t){for(var i=e.length-t,r=t;r>>0,s=c}a.rip(o,s,r,n)},l.prototype._decrypt=function(e,t,i,r,n){for(var s=i,o=t,l=e.keys.length-2;l>=0;l-=2){var f=e.keys[l],u=e.keys[l+1];a.expand(s,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1];var h=a.substitute(f,u),c=s;s=(o^a.permute(h))>>>0,o=c}a.rip(s,o,r,n)}},{"./cipher":78,"./utils":81,inherits:136,"minimalistic-assert":142}],80:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a=e("./cipher"),s=e("./des");function o(e,t){r.equal(t.length,24,"Invalid key length");var i=t.slice(0,8),n=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i})]}function l(e){a.call(this,e);var t=new o(this.type,this.options.key);this._edeState=t}n(l,a),t.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,i,r){var n=this._edeState;n.ciphers[0]._update(e,t,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r)},l.prototype._pad=s.prototype._pad,l.prototype._unpad=s.prototype._unpad},{"./cipher":78,"./des":79,inherits:136,"minimalistic-assert":142}],81:[function(e,t,i){"use strict";i.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},i.writeUInt32BE=function(e,t,i){e[0+i]=t>>>24,e[1+i]=t>>>16&255,e[2+i]=t>>>8&255,e[3+i]=255&t},i.ip=function(e,t,i,r){for(var n=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8)n<<=1,n|=t>>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=e>>>o+s&1}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8)a<<=1,a|=t>>>o+s&1;for(o=1;o<=25;o+=8)a<<=1,a|=e>>>o+s&1}i[r+0]=n>>>0,i[r+1]=a>>>0},i.rip=function(e,t,i,r){for(var n=0,a=0,s=0;s<4;s++)for(var o=24;o>=0;o-=8)n<<=1,n|=t>>>o+s&1,n<<=1,n|=e>>>o+s&1;for(s=4;s<8;s++)for(o=24;o>=0;o-=8)a<<=1,a|=t>>>o+s&1,a<<=1,a|=e>>>o+s&1;i[r+0]=n>>>0,i[r+1]=a>>>0},i.pc1=function(e,t,i,r){for(var n=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8)n<<=1,n|=t>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=e>>o+s&1}for(o=0;o<=24;o+=8)n<<=1,n|=t>>o+s&1;for(s=1;s<=3;s++){for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1;for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1}for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1;i[r+0]=n>>>0,i[r+1]=a>>>0},i.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];i.pc2=function(e,t,i,n){for(var a=0,s=0,o=r.length>>>1,l=0;l>>r[l]&1;for(l=o;l>>r[l]&1;i[n+0]=a>>>0,i[n+1]=s>>>0},i.expand=function(e,t,i){var r=0,n=0;r=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)r<<=6,r|=e>>>a&63;for(a=11;a>=3;a-=4)n|=e>>>a&63,n<<=6;n|=(31&e)<<1|e>>>31,t[i+0]=r>>>0,t[i+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];i.substitute=function(e,t){for(var i=0,r=0;r<4;r++){i<<=4,i|=n[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){i<<=4,i|=n[256+64*r+(t>>>18-6*r&63)]}return i>>>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];i.permute=function(e){for(var t=0,i=0;i>>a[i]&1;return t>>>0},i.padSplit=function(e,t,i){for(var r=e.toString(2);r.lengthe;)i.ishrn(1);if(i.isEven()&&i.iadd(o),i.testn(1)||i.iadd(l),t.cmp(l)){if(!t.cmp(f))for(;i.mod(u).cmp(h);)i.iadd(d)}else for(;i.mod(a).cmp(c);)i.iadd(d);if(m(_=i.shrn(1))&&m(i)&&b(_)&&b(i)&&s.test(_)&&s.test(i))return i}}},{"bn.js":86,"miller-rabin":140,randombytes:166}],85:[function(e,t,i){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"}}},{}],86:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],87:[function(e,t,i){"use strict";var r=i;r.version=e("../package.json").version,r.utils=e("./elliptic/utils"),r.rand=e("brorand"),r.curve=e("./elliptic/curve"),r.curves=e("./elliptic/curves"),r.ec=e("./elliptic/ec"),r.eddsa=e("./elliptic/eddsa")},{"../package.json":103,"./elliptic/curve":90,"./elliptic/curves":93,"./elliptic/ec":94,"./elliptic/eddsa":97,"./elliptic/utils":101,brorand:19}],88:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.getNAF,s=n.getJSF,o=n.assert;function l(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}t.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){o(e.precomputed);var i=e._getDoubles(),r=a(t,1,this._bitLength),n=(1<=l;t--)f=(f<<1)+r[t];s.push(f)}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),c=n;c>0;c--){for(l=0;l=0;f--){for(t=0;f>=0&&0===s[f];f--)t++;if(f>=0&&t++,l=l.dblp(t),f<0)break;var u=s[f];o(0!==u),l="affine"===e.type?u>0?l.mixedAdd(n[u-1>>1]):l.mixedAdd(n[-u-1>>1].neg()):u>0?l.add(n[u-1>>1]):l.add(n[-u-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,i,r,n){for(var o=this._wnafT1,l=this._wnafT2,f=this._wnafT3,u=0,h=0;h=1;h-=2){var d=h-1,_=h;if(1===o[d]&&1===o[_]){var p=[t[d],null,null,t[_]];0===t[d].y.cmp(t[_].y)?(p[1]=t[d].add(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg())):0===t[d].y.cmp(t[_].y.redNeg())?(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].add(t[_].neg())):(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],b=s(i[d],i[_]);u=Math.max(b[0].length,u),f[d]=new Array(u),f[_]=new Array(u);for(var v=0;v=0;h--){for(var C=0;h>=0;){var S=!0;for(v=0;v=0&&C++,w=w.dblp(C),h<0)break;for(v=0;v0?j=l[v][T-1>>1]:T<0&&(j=l[v][-T-1>>1].neg()),w="affine"===j.type?w.mixedAdd(j):w.add(j))}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),s=a.redSub(i),o=r.redSub(t),l=n.redMul(s),f=a.redMul(o),u=n.redMul(o),h=s.redMul(a);return this.curve.point(l,f,h,u)},f.prototype._projDbl=function(){var e,t,i,r=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var s=(f=this.curve._mulA(n)).redAdd(a);if(this.zOne)e=r.redSub(n).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(f.redSub(a)),i=s.redSqr().redSub(s).redSub(s);else{var o=this.z.redSqr(),l=s.redSub(o).redISub(o);e=r.redSub(n).redISub(a).redMul(l),t=s.redMul(f.redSub(a)),i=s.redMul(l)}}else{var f=n.redAdd(a);o=this.curve._mulC(this.z).redSqr(),l=f.redSub(o).redSub(o);e=this.curve._mulC(r.redISub(f)).redMul(l),t=this.curve._mulC(f).redMul(n.redISub(a)),i=f.redMul(l)}return this.curve.point(e,t,i)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=i.redSub(t),s=n.redSub(r),o=n.redAdd(r),l=i.redAdd(t),f=a.redMul(s),u=o.redMul(l),h=a.redMul(l),c=s.redMul(o);return this.curve.point(f,u,c,h)},f.prototype._projAdd=function(e){var t,i,r=this.z.redMul(e.z),n=r.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(s),l=n.redSub(o),f=n.redAdd(o),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),h=r.redMul(l).redMul(u);return this.curve.twisted?(t=r.redMul(f).redMul(s.redSub(this.curve._mulA(a))),i=l.redMul(f)):(t=r.redMul(f).redMul(s.redSub(a)),i=this.curve._mulC(l).redMul(f)),this.curve.point(h,t,i)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1)},f.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0)},f.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},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],90:[function(e,t,i){"use strict";var r=i;r.base=e("./base"),r.short=e("./short"),r.mont=e("./mont"),r.edwards=e("./edwards")},{"./base":88,"./edwards":89,"./mont":91,"./short":92}],91:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("inherits"),a=e("./base"),s=e("../utils");function o(e){a.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,i){a.BasePoint.call(this,e,"projective"),null===t&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(o,a),t.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),r=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},n(l,a.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},o.prototype.point=function(e,t){return new l(this,e,t)},o.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),r=e.redMul(t),n=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(i),s=n.redMul(r),o=t.z.redMul(a.redAdd(s).redSqr()),l=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,l)},l.prototype.mul=function(e){for(var t=e.clone(),i=this,r=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],92:[function(e,t,i){"use strict";var r=e("../utils"),n=e("bn.js"),a=e("inherits"),s=e("./base"),o=r.assert;function l(e){s.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=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 f(e,t,i,r){s.BasePoint.call(this,e,"affine"),null===t&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(i,16),r&&(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 u(e,t,i,r){s.BasePoint.call(this,e,"jacobian"),null===t&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(i,16),this.z=new n(r,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}a(l,s),t.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,i;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)i=new n(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?i=a[0]:(i=a[1],o(0===this.g.mul(i).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:i,basis:e.basis?e.basis.map((function(e){return{a:new n(e.a,16),b:new n(e.b,16)}})):this._getEndoBasis(i)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),i=new n(2).toRed(t).redInvm(),r=i.redNeg(),a=new n(3).toRed(t).redNeg().redSqrt().redMul(i);return[r.redAdd(a).fromRed(),r.redSub(a).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,i,r,a,s,o,l,f,u,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),c=e,d=this.n.clone(),_=new n(1),p=new n(0),m=new n(0),b=new n(1),v=0;0!==c.cmpn(0);){var y=d.div(c);f=d.sub(y.mul(c)),u=m.sub(y.mul(_));var g=b.sub(y.mul(p));if(!r&&f.cmp(h)<0)t=l.neg(),i=_,r=f.neg(),a=u;else if(r&&2==++v)break;l=f,d=c,c=f,m=_,_=u,b=p,p=g}s=f.neg(),o=u;var w=r.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(w)>=0&&(s=t,o=i),r.negative&&(r=r.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:r,b:a},{a:s,b:o}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],r=t[1],n=r.b.mul(e).divRound(this.n),a=i.b.neg().mul(e).divRound(this.n),s=n.mul(i.a),o=a.mul(r.a),l=n.mul(i.b),f=a.mul(r.b);return{k1:e.sub(s).sub(o),k2:l.add(f).neg()}},l.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,r=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,a=0;a":""},f.prototype.isInfinity=function(){return this.inf},f.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 i=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},f.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,i=this.x.redSqr(),r=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(r),a=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new n(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},f.prototype.jmulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},f.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))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(u,s.BasePoint),l.prototype.jpoint=function(e,t,i){return new u(this,e,t,i)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(i,r)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(i),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(i.redMul(this.z)),o=r.redSub(n),l=a.redSub(s);if(0===o.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),h=r.redMul(f),c=l.redSqr().redIAdd(u).redISub(h).redISub(h),d=l.redMul(h.redISub(c)).redISub(a.redMul(u)),_=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(c,d,_)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,r=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),s=i.redSub(r),o=n.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),f=l.redMul(s),u=i.redMul(l),h=o.redSqr().redIAdd(f).redISub(u).redISub(u),c=o.redMul(u.redISub(h)).redISub(n.redMul(f)),d=this.z.redMul(s);return this.curve.jpoint(h,c,d)},u.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,i=0;i=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],93:[function(e,t,i){"use strict";var r,n=i,a=e("hash.js"),s=e("./curve"),o=e("./utils").assert;function l(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var i=new l(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:i}),i}})}n.PresetCurve=l,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=e("./precomputed/secp256k1")}catch(e){r=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},{"./curve":90,"./precomputed/secp256k1":100,"./utils":101,"hash.js":122}],94:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("hmac-drbg"),a=e("../utils"),s=e("../curves"),o=e("brorand"),l=a.assert,f=e("./key"),u=e("./signature");function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(l(s.hasOwnProperty(e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=h,h.prototype.keyPair=function(e){return new f(this,e)},h.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),a=this.n.sub(new r(2));;){var s=new r(t.generate(i));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},h.prototype._truncateToN=function(e,t){var i=8*e.byteLength()-this.n.bitLength();return i>0&&(e=e.ushrn(i)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,i,a){"object"==typeof i&&(a=i,i=null),a||(a={}),t=this.keyFromPrivate(t,i),e=this._truncateToN(new r(e,16));for(var s=this.n.byteLength(),o=t.getPrivate().toArray("be",s),l=e.toArray("be",s),f=new n({hash:this.hash,entropy:o,nonce:l,pers:a.pers,persEnc:a.persEnc||"utf8"}),h=this.n.sub(new r(1)),c=0;;c++){var d=a.k?a.k(c):new r(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(h)>=0)){var _=this.g.mul(d);if(!_.isInfinity()){var p=_.getX(),m=p.umod(this.n);if(0!==m.cmpn(0)){var b=d.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(_.getY().isOdd()?1:0)|(0!==p.cmp(m)?2:0);return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new u({r:m,s:b,recoveryParam:v})}}}}}},h.prototype.verify=function(e,t,i,n){e=this._truncateToN(new r(e,16)),i=this.keyFromPublic(i,n);var a=(t=new u(t,"hex")).r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,l=s.invm(this.n),f=l.mul(e).umod(this.n),h=l.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(f,i.getPublic(),h)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(f,i.getPublic(),h)).isInfinity()&&0===o.getX().umod(this.n).cmp(a)},h.prototype.recoverPubKey=function(e,t,i,n){l((3&i)===i,"The recovery param is more than two bits"),t=new u(t,n);var a=this.n,s=new r(e),o=t.r,f=t.s,h=1&i,c=i>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");o=c?this.curve.pointFromX(o.add(this.curve.n),h):this.curve.pointFromX(o,h);var d=t.r.invm(a),_=a.sub(s).mul(d).umod(a),p=f.mul(d).umod(a);return this.g.mulAdd(_,o,p)},h.prototype.getKeyRecoveryParam=function(e,t,i,r){if(null!==(t=new u(t,r)).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(i))return n}throw new Error("Unable to find valid recovery factor")}},{"../curves":93,"../utils":101,"./key":95,"./signature":96,"bn.js":102,brorand:19,"hmac-drbg":134}],95:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils").assert;function a(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)}t.exports=a,a.fromPublic=function(e,t,i){return t instanceof a?t:new a(e,{pub:t,pubEnc:i})},a.fromPrivate=function(e,t,i){return t instanceof a?t:new a(e,{priv:t,privEnc:i})},a.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"}},a.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},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(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)},a.prototype.derive=function(e){return e.mul(this.priv).getX()},a.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i)},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},a.prototype.inspect=function(){return""}},{"../utils":101,"bn.js":102}],96:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(a(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function o(){this.place=0}function l(e,t){var i=e[t.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,a=0,s=t.place;a>>=0;return!(n<=127)&&(t.place=s,n)}function f(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|i);--i;)e.push(t>>>(i<<3)&255);e.push(t)}}t.exports=s,s.prototype._importDER=function(e,t){e=n.toArray(e,t);var i=new o;if(48!==e[i.place++])return!1;var a=l(e,i);if(!1===a)return!1;if(a+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var s=l(e,i);if(!1===s)return!1;var f=e.slice(i.place,s+i.place);if(i.place+=s,2!==e[i.place++])return!1;var u=l(e,i);if(!1===u)return!1;if(e.length!==u+i.place)return!1;var h=e.slice(i.place,u+i.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new r(f),this.s=new r(h),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&i[0]&&(i=[0].concat(i)),t=f(t),i=f(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];u(r,t.length),(r=r.concat(t)).push(2),u(r,i.length);var a=r.concat(i),s=[48];return u(s,a.length),s=s.concat(a),n.encode(s,e)}},{"../utils":101,"bn.js":102}],97:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("../curves"),a=e("../utils"),s=a.assert,o=a.parseBytes,l=e("./key"),f=e("./signature");function u(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=n[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}t.exports=u,u.prototype.sign=function(e,t){e=o(e);var i=this.keyFromSecret(t),r=this.hashInt(i.messagePrefix(),e),n=this.g.mul(r),a=this.encodePoint(n),s=this.hashInt(a,i.pubBytes(),e).mul(i.priv()),l=r.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:l,Rencoded:a})},u.prototype.verify=function(e,t,i){e=o(e),t=this.makeSignature(t);var r=this.keyFromPublic(i),n=this.hashInt(t.Rencoded(),r.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(r.pub().mul(n)).eq(a)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(n>>1)-1?(n>>1)-l:l,a.isubn(o)):o=0,r[s]=o,a.iushrn(1)}return r},r.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var r=0,n=0;e.cmpn(-r)>0||t.cmpn(-n)>0;){var a,s,o,l=e.andln(3)+r&3,f=t.andln(3)+n&3;if(3===l&&(l=-1),3===f&&(f=-1),0==(1&l))a=0;else a=3!==(o=e.andln(7)+r&7)&&5!==o||2!==f?l:-l;if(i[0].push(a),0==(1&f))s=0;else s=3!==(o=t.andln(7)+n&7)&&5!==o||2!==l?f:-f;i[1].push(s),2*r===a+1&&(r=1-r),2*n===s+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return i},r.cachedProperty=function(e,t,i){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new n(e,"hex","le")}},{"bn.js":102,"minimalistic-assert":142,"minimalistic-crypto-utils":143}],102:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],103:[function(e,t,i){t.exports={_args:[["elliptic@6.5.3","/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer"]],_from:"elliptic@6.5.3",_id:"elliptic@6.5.3",_inBundle:!1,_integrity:"sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.5.3",name:"elliptic",escapedName:"elliptic",rawSpec:"6.5.3",saveSpec:null,fetchSpec:"6.5.3"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",_spec:"6.5.3",_where:"/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},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"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^3.0.8",grunt:"^1.0.4","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":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.10.3",mocha:"^6.2.2"},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.5.3"}},{}],104:[function(e,t,i){var r=Object.create||function(e){var t=function(){};return t.prototype=e,new t},n=Object.keys||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return i},a=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var o,l=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),o=0===f.x}catch(e){o=!1}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function h(e,t,i){if(t)e.call(i);else for(var r=e.length,n=w(e,r),a=0;a0&&o.length>a){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,"object"==typeof console&&console.warn&&(l.name,l.message)}}else o=s[t]=i,++e._eventsCount;return e}function b(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(i=s[e]))return!1;var f="function"==typeof i;switch(r=arguments.length){case 1:h(i,f,this);break;case 2:c(i,f,this,arguments[1]);break;case 3:d(i,f,this,arguments[1],arguments[2]);break;case 4:_(i,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),a=1;a=0;s--)if(i[s]===t||i[s].listener===t){o=i[s].listener,a=s;break}if(a<0)return this;0===a?i.shift():function(e,t){for(var i=t,r=i+1,n=e.length;r=0;a--)this.removeListener(e,t[a]);return this},s.prototype.listeners=function(e){return y(this,e,!0)},s.prototype.rawListeners=function(e){return y(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],105:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("md5.js");t.exports=function(e,t,i,a){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=i/8,o=r.alloc(s),l=r.alloc(a||0),f=r.alloc(0);s>0||a>0;){var u=new n;u.update(f),u.update(e),t&&u.update(t),f=u.digest();var h=0;if(s>0){var c=o.length-s;h=Math.min(s,f.length),f.copy(o,c,0,h),s-=h}if(h0){var d=l.length-a,_=Math.min(a,f.length-h);f.copy(l,d,h,h+_),a-=_}}return f.fill(0),{key:o,iv:l}}},{"md5.js":139,"safe-buffer":184}],106:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("readable-stream").Transform;function a(e){n.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(a,n),a.prototype._transform=function(e,t,i){var r=null;try{this.update(e,t)}catch(e){r=e}i(r)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},a.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var i=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var a=this._blockOffset;a0;++s)this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.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 i=0;i<4;++i)this._length[i]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},{inherits:136,"readable-stream":121,"safe-buffer":184}],107:[function(e,t,i){arguments[4][49][0].apply(i,arguments)},{dup:49}],108:[function(e,t,i){arguments[4][50][0].apply(i,arguments)},{"./_stream_readable":110,"./_stream_writable":112,_process:158,dup:50,inherits:136}],109:[function(e,t,i){arguments[4][51][0].apply(i,arguments)},{"./_stream_transform":111,dup:51,inherits:136}],110:[function(e,t,i){arguments[4][52][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,"./internal/streams/async_iterator":113,"./internal/streams/buffer_list":114,"./internal/streams/destroy":115,"./internal/streams/from":117,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:52,events:104,inherits:136,"string_decoder/":195,util:20}],111:[function(e,t,i){arguments[4][53][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,dup:53,inherits:136}],112:[function(e,t,i){arguments[4][54][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,"./internal/streams/destroy":115,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:54,inherits:136,"util-deprecate":197}],113:[function(e,t,i){arguments[4][55][0].apply(i,arguments)},{"./end-of-stream":116,_process:158,dup:55}],114:[function(e,t,i){arguments[4][56][0].apply(i,arguments)},{buffer:66,dup:56,util:20}],115:[function(e,t,i){arguments[4][57][0].apply(i,arguments)},{_process:158,dup:57}],116:[function(e,t,i){arguments[4][58][0].apply(i,arguments)},{"../../../errors":107,dup:58}],117:[function(e,t,i){arguments[4][59][0].apply(i,arguments)},{dup:59}],118:[function(e,t,i){arguments[4][60][0].apply(i,arguments)},{"../../../errors":107,"./end-of-stream":116,dup:60}],119:[function(e,t,i){arguments[4][61][0].apply(i,arguments)},{"../../../errors":107,dup:61}],120:[function(e,t,i){arguments[4][62][0].apply(i,arguments)},{dup:62,events:104}],121:[function(e,t,i){arguments[4][63][0].apply(i,arguments)},{"./lib/_stream_duplex.js":108,"./lib/_stream_passthrough.js":109,"./lib/_stream_readable.js":110,"./lib/_stream_transform.js":111,"./lib/_stream_writable.js":112,"./lib/internal/streams/end-of-stream.js":116,"./lib/internal/streams/pipeline.js":118,dup:63}],122:[function(e,t,i){var r=i;r.utils=e("./hash/utils"),r.common=e("./hash/common"),r.sha=e("./hash/sha"),r.ripemd=e("./hash/ripemd"),r.hmac=e("./hash/hmac"),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},{"./hash/common":123,"./hash/hmac":124,"./hash/ripemd":125,"./hash/sha":126,"./hash/utils":133}],123:[function(e,t,i){"use strict";var r=e("./utils"),n=e("minimalistic-assert");function a(){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}i.BlockHash=a,a.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-i,this.endian);for(var n=0;n>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,a=8;athis.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t>>3},i.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},{"../utils":133}],133:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits");function a(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function l(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}i.inherits=n,i.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>6|192,i[r++]=63&s|128):a(e,n)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++n)),i[r++]=s>>18|240,i[r++]=s>>12&63|128,i[r++]=s>>6&63|128,i[r++]=63&s|128):(i[r++]=s>>12|224,i[r++]=s>>6&63|128,i[r++]=63&s|128)}else for(n=0;n>>0}return s},i.split32=function(e,t){for(var i=new Array(4*e.length),r=0,n=0;r>>24,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=255&a):(i[n+3]=a>>>24,i[n+2]=a>>>16&255,i[n+1]=a>>>8&255,i[n]=255&a)}return i},i.rotr32=function(e,t){return e>>>t|e<<32-t},i.rotl32=function(e,t){return e<>>32-t},i.sum32=function(e,t){return e+t>>>0},i.sum32_3=function(e,t,i){return e+t+i>>>0},i.sum32_4=function(e,t,i,r){return e+t+i+r>>>0},i.sum32_5=function(e,t,i,r,n){return e+t+i+r+n>>>0},i.sum64=function(e,t,i,r){var n=e[t],a=r+e[t+1]>>>0,s=(a>>0,e[t+1]=a},i.sum64_hi=function(e,t,i,r){return(t+r>>>0>>0},i.sum64_lo=function(e,t,i,r){return t+r>>>0},i.sum64_4_hi=function(e,t,i,r,n,a,s,o){var l=0,f=t;return l+=(f=f+r>>>0)>>0)>>0)>>0},i.sum64_4_lo=function(e,t,i,r,n,a,s,o){return t+r+a+o>>>0},i.sum64_5_hi=function(e,t,i,r,n,a,s,o,l,f){var u=0,h=t;return u+=(h=h+r>>>0)>>0)>>0)>>0)>>0},i.sum64_5_lo=function(e,t,i,r,n,a,s,o,l,f){return t+r+a+o+f>>>0},i.rotr64_hi=function(e,t,i){return(t<<32-i|e>>>i)>>>0},i.rotr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0},i.shr64_hi=function(e,t,i){return e>>>i},i.shr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0}},{inherits:136,"minimalistic-assert":142}],134:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("minimalistic-crypto-utils"),a=e("minimalistic-assert");function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex"),i=n.toArray(e.nonce,e.nonceEnc||"hex"),r=n.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,i,r)}t.exports=s,s.prototype._init=function(e,t,i){var r=e.concat(t).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},s.prototype.generate=function(e,t,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=i,i=t,t=null),i&&(i=n.toArray(i,r||"hex"),this._update(i));for(var a=[];a.length>1,u=-7,h=i?n-1:0,c=i?-1:1,d=e[t+h];for(h+=c,a=d&(1<<-u)-1,d>>=-u,u+=o;u>0;a=256*a+e[t+h],h+=c,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=r;u>0;s=256*s+e[t+h],h+=c,u-=8);if(0===a)a=1-f;else{if(a===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),a-=f}return(d?-1:1)*s*Math.pow(2,a-r)},i.write=function(e,t,i,r,n,a){var s,o,l,f=8*a-n-1,u=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,_=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?c/l:c*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=u?(o=0,s=u):s+h>=1?(o=(t*l-1)*Math.pow(2,n),s+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,n),s=0));n>=8;e[i+d]=255&o,d+=_,o/=256,n-=8);for(s=s<0;e[i+d]=255&s,d+=_,s/=256,f-=8);e[i+d-_]|=128*p}},{}],136:[function(e,t,i){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},{}],137:[function(e,t,i){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ +t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],138:[function(e,t,i){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],139:[function(e,t,i){"use strict";var r=e("inherits"),n=e("hash-base"),a=e("safe-buffer").Buffer,s=new Array(16);function o(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<>>32-t}function f(e,t,i,r,n,a,s){return l(e+(t&i|~t&r)+n+a|0,s)+t|0}function u(e,t,i,r,n,a,s){return l(e+(t&r|i&~r)+n+a|0,s)+t|0}function h(e,t,i,r,n,a,s){return l(e+(t^i^r)+n+a|0,s)+t|0}function c(e,t,i,r,n,a,s){return l(e+(i^(t|~r))+n+a|0,s)+t|0}r(o,n),o.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var i=this._a,r=this._b,n=this._c,a=this._d;i=f(i,r,n,a,e[0],3614090360,7),a=f(a,i,r,n,e[1],3905402710,12),n=f(n,a,i,r,e[2],606105819,17),r=f(r,n,a,i,e[3],3250441966,22),i=f(i,r,n,a,e[4],4118548399,7),a=f(a,i,r,n,e[5],1200080426,12),n=f(n,a,i,r,e[6],2821735955,17),r=f(r,n,a,i,e[7],4249261313,22),i=f(i,r,n,a,e[8],1770035416,7),a=f(a,i,r,n,e[9],2336552879,12),n=f(n,a,i,r,e[10],4294925233,17),r=f(r,n,a,i,e[11],2304563134,22),i=f(i,r,n,a,e[12],1804603682,7),a=f(a,i,r,n,e[13],4254626195,12),n=f(n,a,i,r,e[14],2792965006,17),i=u(i,r=f(r,n,a,i,e[15],1236535329,22),n,a,e[1],4129170786,5),a=u(a,i,r,n,e[6],3225465664,9),n=u(n,a,i,r,e[11],643717713,14),r=u(r,n,a,i,e[0],3921069994,20),i=u(i,r,n,a,e[5],3593408605,5),a=u(a,i,r,n,e[10],38016083,9),n=u(n,a,i,r,e[15],3634488961,14),r=u(r,n,a,i,e[4],3889429448,20),i=u(i,r,n,a,e[9],568446438,5),a=u(a,i,r,n,e[14],3275163606,9),n=u(n,a,i,r,e[3],4107603335,14),r=u(r,n,a,i,e[8],1163531501,20),i=u(i,r,n,a,e[13],2850285829,5),a=u(a,i,r,n,e[2],4243563512,9),n=u(n,a,i,r,e[7],1735328473,14),i=h(i,r=u(r,n,a,i,e[12],2368359562,20),n,a,e[5],4294588738,4),a=h(a,i,r,n,e[8],2272392833,11),n=h(n,a,i,r,e[11],1839030562,16),r=h(r,n,a,i,e[14],4259657740,23),i=h(i,r,n,a,e[1],2763975236,4),a=h(a,i,r,n,e[4],1272893353,11),n=h(n,a,i,r,e[7],4139469664,16),r=h(r,n,a,i,e[10],3200236656,23),i=h(i,r,n,a,e[13],681279174,4),a=h(a,i,r,n,e[0],3936430074,11),n=h(n,a,i,r,e[3],3572445317,16),r=h(r,n,a,i,e[6],76029189,23),i=h(i,r,n,a,e[9],3654602809,4),a=h(a,i,r,n,e[12],3873151461,11),n=h(n,a,i,r,e[15],530742520,16),i=c(i,r=h(r,n,a,i,e[2],3299628645,23),n,a,e[0],4096336452,6),a=c(a,i,r,n,e[7],1126891415,10),n=c(n,a,i,r,e[14],2878612391,15),r=c(r,n,a,i,e[5],4237533241,21),i=c(i,r,n,a,e[12],1700485571,6),a=c(a,i,r,n,e[3],2399980690,10),n=c(n,a,i,r,e[10],4293915773,15),r=c(r,n,a,i,e[1],2240044497,21),i=c(i,r,n,a,e[8],1873313359,6),a=c(a,i,r,n,e[15],4264355552,10),n=c(n,a,i,r,e[6],2734768916,15),r=c(r,n,a,i,e[13],1309151649,21),i=c(i,r,n,a,e[4],4149444226,6),a=c(a,i,r,n,e[11],3174756917,10),n=c(n,a,i,r,e[2],718787259,15),r=c(r,n,a,i,e[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+a|0},o.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=a.allocUnsafe(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=o},{"hash-base":106,inherits:136,"safe-buffer":184}],140:[function(e,t,i){var r=e("bn.js"),n=e("brorand");function a(e){this.rand=e||new n.Rand}t.exports=a,a.create=function(e){return new a(e)},a.prototype._randbelow=function(e){var t=e.bitLength(),i=Math.ceil(t/8);do{var n=new r(this.rand.generate(i))}while(n.cmp(e)>=0);return n},a.prototype._randrange=function(e,t){var i=t.sub(e);return e.add(this._randbelow(i))},a.prototype.test=function(e,t,i){var n=e.bitLength(),a=r.mont(e),s=new r(1).toRed(a);t||(t=Math.max(1,n/48|0));for(var o=e.subn(1),l=0;!o.testn(l);l++);for(var f=e.shrn(l),u=o.toRed(a);t>0;t--){var h=this._randrange(new r(2),o);i&&i(h);var c=h.toRed(a).redPow(f);if(0!==c.cmp(s)&&0!==c.cmp(u)){for(var d=1;d0;t--){var u=this._randrange(new r(2),s),h=e.gcd(u);if(0!==h.cmpn(1))return h;var c=u.toRed(n).redPow(l);if(0!==c.cmp(a)&&0!==c.cmp(f)){for(var d=1;d>8,s=255&n;a?i.push(a,s):i.push(s)}return i},r.zero2=n,r.toHex=a,r.encode=function(e,t){return"hex"===t?a(e):e}},{}],144:[function(e,t,i){var r,n,a=(r=new Date,n=4,{setLogLevel:function(e){n=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=n&&console.info("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=n&&a.getDurationString(new Date-r,1e3)},error:function(e,t){4>=n&&console.error("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)}});a.getDurationString=function(e,t){var i;function r(e,t){for(var i=(""+e).split(".");i[0].length0){for(var i="",r=0;r0&&(i+=","),i+="["+a.getDurationString(e.start(r))+","+a.getDurationString(e.end(r))+"]";return i}return"(empty)"},void 0!==i&&(i.Log=a);var s=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};s.prototype.getPosition=function(){return this.position},s.prototype.getEndPosition=function(){return this.buffer.byteLength},s.prototype.getLength=function(){return this.buffer.byteLength},s.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0},s.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},s.prototype.readAnyInt=function(e,t){var i=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:i=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:i=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";i=this.dataview.getUint8(this.position)<<16,i|=this.dataview.getUint8(this.position)<<8,i|=this.dataview.getUint8(this.position);break;case 4:i=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";i=this.dataview.getUint32(this.position)<<32,i|=this.dataview.getUint32(this.position);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,i}throw"Not enough bytes in buffer"},s.prototype.readUint8=function(){return this.readAnyInt(1,!1)},s.prototype.readUint16=function(){return this.readAnyInt(2,!1)},s.prototype.readUint24=function(){return this.readAnyInt(3,!1)},s.prototype.readUint32=function(){return this.readAnyInt(4,!1)},s.prototype.readUint64=function(){return this.readAnyInt(8,!1)},s.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",i=0;ithis._byteLength&&(this._byteLength=t);else{for(i<1&&(i=1);t>i;)i*=2;var r=new ArrayBuffer(i),n=new Uint8Array(this._buffer);new Uint8Array(r,0,n.length).set(n),this.buffer=r,this._byteLength=t}}},o.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),i=new Uint8Array(this._buffer,0,t.length);t.set(i),this.buffer=e}},o.BIG_ENDIAN=!1,o.LITTLE_ENDIAN=!0,o.prototype._byteLength=0,Object.defineProperty(o.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(o.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),o.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},o.prototype.isEof=function(){return this.position>=this._byteLength},o.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},o.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Int32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Int16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},o.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Uint32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Uint16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},o.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var i=new Float64Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Float32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},o.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},o.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},o.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},o.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},o.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,o.memcpy=function(e,t,i,r,n){var a=new Uint8Array(e,t,n),s=new Uint8Array(i,r,n);a.set(s)},o.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},o.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},o.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i=0;in;r--,n++){var a=t[n];t[n]=t[r],t[r]=a}return e},o.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],i=0;i>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},o.prototype.adjustUint32=function(e,t){var i=this.position;this.seek(e),this.writeUint32(t),this.seek(i)},o.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var i=new Int32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},o.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var i=new Int16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},o.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},o.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},o.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},o.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var i=new Float64Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=8*e,i},o.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var i=new Float32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i};var f=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(f.prototype=new o(new ArrayBuffer,0,o.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),e.byteLength),i.buffer},f.prototype.reduceBuffer=function(e,t,i){var r;return(r=new Uint8Array(i)).set(new Uint8Array(e,t,i)),r.buffer.fileStart=e.fileStart+t,r.buffer.usedBytes=0,r.buffer},f.prototype.insertBuffer=function(e){for(var t=!0,i=0;ir.byteLength){this.buffers.splice(i,1),i--;continue}a.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=r.fileStart||(e=this.reduceBuffer(e,0,r.fileStart-e.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(i,0,e),0===i&&(this.buffer=e);t=!1;break}if(e.fileStart0)){t=!1;break}e=this.reduceBuffer(e,n,s)}}t&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===i&&(this.buffer=e))},f.prototype.logBufferLevel=function(e){var t,i,r,n,s,o=[],l="";for(r=0,n=0,t=0;t0&&(l+=s.end-1+"]");var f=e?a.info:a.debug;0===this.buffers.length?f("MultiBufferStream","No more buffer in memory"):f("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+r+"/"+n+" bytes): "+l)},f.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}return!1}return!1},f.prototype.findPosition=function(e,t,i){var r,n=null,s=-1;for(r=!0===e?0:this.bufferIndex;r=t?(a.debug("MultiBufferStream","Found position in existing buffer #"+s),s):-1},f.prototype.findEndContiguousBuf=function(e){var t,i,r,n=void 0!==e?e:this.bufferIndex;if(i=this.buffers[n],this.buffers.length>n+1)for(t=n+1;t>3;return 31===r&&i.data.length>=2&&(r=32+((7&i.data[0])<<3)+((224&i.data[1])>>5)),r}return null},i.DecoderConfigDescriptor=function(e){i.Descriptor.call(this,4,e)},i.DecoderConfigDescriptor.prototype=new i.Descriptor,i.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},i.DecoderSpecificInfo=function(e){i.Descriptor.call(this,5,e)},i.DecoderSpecificInfo.prototype=new i.Descriptor,i.SLConfigDescriptor=function(e){i.Descriptor.call(this,6,e)},i.SLConfigDescriptor.prototype=new i.Descriptor,this};void 0!==i&&(i.MPEG4DescriptorParser=u);var h={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){h.FullBox.prototype=new h.Box,h.ContainerBox.prototype=new h.Box,h.SampleEntry.prototype=new h.Box,h.TrackGroupTypeBox.prototype=new h.FullBox,h.BASIC_BOXES.forEach((function(e){h.createBoxCtor(e)})),h.FULL_BOXES.forEach((function(e){h.createFullBoxCtor(e)})),h.CONTAINER_BOXES.forEach((function(e){h.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,i){this.type=e,this.size=t,this.uuid=i},FullBox:function(e,t,i){h.Box.call(this,e,t,i),this.flags=0,this.version=0},ContainerBox:function(e,t,i){h.Box.call(this,e,t,i),this.boxes=[]},SampleEntry:function(e,t,i,r){h.ContainerBox.call(this,e,t),this.hdr_size=i,this.start=r},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){h.FullBox.call(this,e,t)},createBoxCtor:function(e,t){h.boxCodes.push(e),h[e+"Box"]=function(t){h.Box.call(this,e,t)},h[e+"Box"].prototype=new h.Box,t&&(h[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){h[e+"Box"]=function(t){h.FullBox.call(this,e,t)},h[e+"Box"].prototype=new h.FullBox,h[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,i=0;ii?(a.error("BoxParser","Box of type '"+u+"' has a size "+f+" greater than its container size "+i),{code:h.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):o+f>e.getEndPosition()?(e.seek(o),a.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:h.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):t?{code:h.OK,type:u,size:f,hdr_size:l,start:o}:(h[u+"Box"]?r=new h[u+"Box"](f):"uuid"!==u?(a.warn("BoxParser","Unknown box type: '"+u+"'"),(r=new h.Box(u,f)).has_unparsed_data=!0):h.UUIDBoxes[s]?r=new h.UUIDBoxes[s](f):(a.warn("BoxParser","Unknown uuid type: '"+s+"'"),(r=new h.Box(u,f)).uuid=s,r.has_unparsed_data=!0),r.hdr_size=l,r.start=o,r.write===h.Box.prototype.write&&"mdat"!==r.type&&(a.info("BoxParser","'"+c+"' box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(e)),r.parse(e),(n=e.getPosition()-(r.start+r.size))<0?(a.warn("BoxParser","Parsing of box '"+c+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),e.seek(r.start+r.size)):n>0&&(a.error("BoxParser","Parsing of box '"+c+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),e.seek(r.start+r.size)),{code:h.OK,box:r,size:r.size})},h.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},h.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},h.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},h.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},h.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},h.ContainerBox.prototype.parse=function(e){for(var t,i;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)},h.SAMPLE_ENTRY_TYPE_VISUAL="Visual",h.SAMPLE_ENTRY_TYPE_AUDIO="Audio",h.SAMPLE_ENTRY_TYPE_HINT="Hint",h.SAMPLE_ENTRY_TYPE_METADATA="Metadata",h.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",h.SAMPLE_ENTRY_TYPE_SYSTEM="System",h.SAMPLE_ENTRY_TYPE_TEXT="Text",h.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},h.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},h.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},h.SampleEntry.prototype.parseFooter=function(e){h.ContainerBox.prototype.parse.call(this,e)},h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_HINT),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_METADATA),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SUBTITLE),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SYSTEM),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_TEXT),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)})),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_TEXT,"enct"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_METADATA,"encm"),h.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)a.error("av1C marker problem");else if(this.version=127&t,1===this.version)if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void a.error("av1C reserved_2 parsing problem");var i=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(i)}else a.error("av1C reserved_1 parsing problem");else a.error("av1C version "+this.version+" not supported")})),h.createBoxCtor("avcC",(function(e){var t,i;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),i=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(i))})),h.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),h.createBoxCtor("clap",(function(e){this.cleanApertureWidthN=e.readUint32(),this.cleanApertureWidthD=e.readUint32(),this.cleanApertureHeightN=e.readUint32(),this.cleanApertureHeightD=e.readUint32(),this.horizOffN=e.readUint32(),this.horizOffD=e.readUint32(),this.vertOffN=e.readUint32(),this.vertOffD=e.readUint32()})),h.createBoxCtor("clli",(function(e){this.max_content_light_level=e.readUint16(),this.max_pic_average_light_level=e.readUint16()})),h.createFullBoxCtor("co64",(function(e){var t,i;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(i=0;i>7}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4))})),h.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),h.createFullBoxCtor("cslg",(function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())})),h.createFullBoxCtor("ctts",(function(e){var t,i;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(i=0;i>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|i>>6&3,this.acmod=i>>3&7,this.lfeon=i>>2&1,this.bit_rate_code=3&i|r>>5&7})),h.createBoxCtor("dec3",(function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var i=0;i>6,r.bsid=n>>1&31,r.bsmod=(1&n)<<4|a>>4&15,r.acmod=a>>1&7,r.lfeon=1&a,r.num_dep_sub=s>>1&15,r.num_dep_sub>0&&(r.chan_loc=(1&s)<<8|e.readUint8())}})),h.createFullBoxCtor("dfLa",(function(e){var t=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var r=e.readUint8(),n=Math.min(127&r,i.length-1);if(n?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(i[n]),128&r)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),h.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),h.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),h.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),h.createFullBoxCtor("dref",(function(e){var t,i;this.entries=[];for(var r=e.readUint32(),n=0;n=4;)this.compatible_brands[i]=e.readString(4),t-=4,i++})),h.createFullBoxCtor("hdlr",(function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))})),h.createBoxCtor("hvcC",(function(e){var t,i,r,n;this.configurationVersion=e.readUint8(),n=e.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),n=e.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var a=e.readUint8();for(t=0;t>7,s.nalu_type=63&n;var o=e.readUint16();for(i=0;i>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var i=0;if(this.version<2)i=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";i=e.readUint32()}for(var r=0;r=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))})),h.createFullBoxCtor("ipma",(function(e){var t,i;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?s.property_index=(127&a)<<8|e.readUint8():s.property_index=127&a}}})),h.createFullBoxCtor("iref",(function(e){var t,i;for(this.references=[];e.getPosition()>7,r.assignment_type=127&n,r.assignment_type){case 0:r.grouping_type=e.readString(4);break;case 1:r.grouping_type=e.readString(4),r.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:r.sub_track_id=e.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type")}}})),h.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),h.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=e.readUint16(),this.display_primaries[0].y=e.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=e.readUint16(),this.display_primaries[1].y=e.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=e.readUint16(),this.display_primaries[2].y=e.readUint16(),this.white_point={},this.white_point.x=e.readUint16(),this.white_point.y=e.readUint16(),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),h.createFullBoxCtor("mdhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()})),h.createFullBoxCtor("mehd",(function(e){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()})),h.createFullBoxCtor("meta",(function(e){this.boxes=[],h.ContainerBox.prototype.parse.call(this,e)})),h.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),h.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),h.createFullBoxCtor("mvhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()})),h.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),h.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),h.createFullBoxCtor("padb",(function(e){var t=e.readUint32();this.padbits=[];for(var i=0;i0){var t=e.readUint32();this.kid=[];for(var i=0;i0&&(this.data=e.readUint8Array(r))})),h.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),h.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),h.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),h.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),h.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),h.createFullBoxCtor("saio",(function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var i=0;i>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var i=e.readUint8(),r=0;r>7,this.num_leading_samples=127&t})),h.createSampleGroupCtor("rash",(function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=h.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))})),h.createSampleGroupCtor("stsa",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),h.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),h.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),h.createSampleGroupCtor("tsas",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),h.createSampleGroupCtor("tscl",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),h.createSampleGroupCtor("vipr",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),h.createFullBoxCtor("sbgp",(function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),i=0;i>6,this.sample_depends_on[r]=t>>4&3,this.sample_is_depended_on[r]=t>>2&3,this.sample_has_redundancy[r]=3&t})),h.createFullBoxCtor("senc"),h.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),i=0;i>31&1,r.referenced_size=2147483647&n,r.subsegment_duration=e.readUint32(),n=e.readUint32(),r.starts_with_SAP=n>>31&1,r.SAP_type=n>>28&7,r.SAP_delta_time=268435455&n}})),h.SingleItemTypeReferenceBox=function(e,t,i,r){h.Box.call(this,e,t),this.hdr_size=i,this.start=r},h.SingleItemTypeReferenceBox.prototype=new h.Box,h.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var i=0;i>4&15,this.sample_sizes[t+1]=15&r}else if(8===this.field_size)for(t=0;t0)for(i=0;i>4&15,this.default_skip_byte_block=15&t}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=h.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))})),h.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),h.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),h.createFullBoxCtor("tfra",(function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var i=e.readUint32(),r=0;r>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()})),h.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),h.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),h.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),h.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),h.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),h.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},h.createTrackGroupCtor("msrc"),h.TrackReferenceTypeBox=function(e,t,i,r){h.Box.call(this,e,t),this.hdr_size=i,this.start=r},h.TrackReferenceTypeBox.prototype=new h.Box,h.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},h.trefBox.prototype.parse=function(e){for(var t,i;e.getPosition()t&&this.flags&h.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&h.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var i=0;i0&&(this.location=e.readCString())})),h.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})),h.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=h.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),h.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),h.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=h.parseHex16(e)})),h.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))})),h.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),h.SampleEntry.prototype.isVideo=function(){return!1},h.SampleEntry.prototype.isAudio=function(){return!1},h.SampleEntry.prototype.isSubtitle=function(){return!1},h.SampleEntry.prototype.isMetadata=function(){return!1},h.SampleEntry.prototype.isHint=function(){return!1},h.SampleEntry.prototype.getCodec=function(){return this.type.replace(".","")},h.SampleEntry.prototype.getWidth=function(){return""},h.SampleEntry.prototype.getHeight=function(){return""},h.SampleEntry.prototype.getChannelCount=function(){return""},h.SampleEntry.prototype.getSampleRate=function(){return""},h.SampleEntry.prototype.getSampleSize=function(){return""},h.VisualSampleEntry.prototype.isVideo=function(){return!0},h.VisualSampleEntry.prototype.getWidth=function(){return this.width},h.VisualSampleEntry.prototype.getHeight=function(){return this.height},h.AudioSampleEntry.prototype.isAudio=function(){return!0},h.AudioSampleEntry.prototype.getChannelCount=function(){return this.channel_count},h.AudioSampleEntry.prototype.getSampleRate=function(){return this.samplerate},h.AudioSampleEntry.prototype.getSampleSize=function(){return this.samplesize},h.SubtitleSampleEntry.prototype.isSubtitle=function(){return!0},h.MetadataSampleEntry.prototype.isMetadata=function(){return!0},h.decimalToHex=function(e,t){var i=Number(e).toString(16);for(t=null==t?t=2:t;i.length>=1;t+=h.decimalToHex(r,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var n=!1,a="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||n)&&(a="."+h.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+a,n=!0);t+=a}return t},h.mp4aSampleEntry.prototype.getCodec=function(){var e=h.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),i=this.esds.esd.getAudioConfig();return e+"."+h.decimalToHex(t)+(i?"."+i:"")}return e},h.stxtSampleEntry.prototype.getCodec=function(){var e=h.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},h.av01SampleEntry.prototype.getCodec=function(){var e,t=h.SampleEntry.prototype.getCodec.call(this);return 2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+this.av1C.seq_level_idx_0+(this.av1C.seq_tier_0?"H":"M")+"."+e},h.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>l?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>l&&e.writeUint64(this.size)},h.FullBox.prototype.writeHeader=function(e){this.size+=4,h.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},h.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},h.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1-1||e[i]instanceof h.Box||t[i]instanceof h.Box||void 0===e[i]||void 0===t[i]||"function"==typeof e[i]||"function"==typeof t[i]||e.subBoxNames&&e.subBoxNames.indexOf(i.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(i.slice(0,4))>-1||"data"===i||"start"===i||"size"===i||"creation_time"===i||"modification_time"===i||h.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1||e[i]===t[i]))return!1;return!0},h.boxEqual=function(e,t){if(!h.boxEqualFields(e,t))return!1;for(var i=0;i=t?e:new Array(t-e.length+1).join(i)+e}function n(e){var t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),n=Math.floor(e-3600*t-60*i),a=Math.floor(1e3*(e-3600*t-60*i-n));return r(t,2)+":"+r(i,2)+":"+r(n,2)+"."+r(a,3)}for(var a=this.parseSample(i),s="",o=0;o1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1)},p.prototype.setExtractionOptions=function(e,t,i){var r=this.getTrackById(e);if(r){var n={};this.extractedTracks.push(n),n.id=e,n.user=t,n.trak=r,r.nextSample=0,n.nb_samples=1e3,n.samples=[],i&&i.nbSamples&&(n.nb_samples=i.nbSamples)}},p.prototype.unsetExtractionOptions=function(e){for(var t=-1,i=0;i-1&&this.extractedTracks.splice(t,1)},p.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this.saveParsePosition&&this.saveParsePosition(),(e=h.parseOneBox(this.stream,!1)).code===h.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var i;switch(i="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),i){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[i]&&a.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},p.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1))},p.prototype.appendBuffer=function(e,t){var i;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(i=this.nextSeekPosition,this.nextSeekPosition=void 0):i=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(i=this.stream.getEndFilePositionAfter(i))):i=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+i),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i},p.prototype.getInfo=function(){var e,t,i,r,n,a={},s=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(a.hasMoov=!0,a.duration=this.moov.mvhd.duration,a.timescale=this.moov.mvhd.timescale,a.isFragmented=null!=this.moov.mvex,a.isFragmented&&this.moov.mvex.mehd&&(a.fragment_duration=this.moov.mvex.mehd.fragment_duration),a.isProgressive=this.isProgressive,a.hasIOD=null!=this.moov.iods,a.brands=[],a.brands.push(this.ftyp.major_brand),a.brands=a.brands.concat(this.ftyp.compatible_brands),a.created=new Date(s+1e3*this.moov.mvhd.creation_time),a.modified=new Date(s+1e3*this.moov.mvhd.modification_time),a.tracks=[],a.audioTracks=[],a.videoTracks=[],a.subtitleTracks=[],a.metadataTracks=[],a.hintTracks=[],a.otherTracks=[],e=0;e0?a.mime+='video/mp4; codecs="':a.audioTracks&&a.audioTracks.length>0?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e=i.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+r.id+" for samples ["+Math.max(0,i.nextSample-r.nb_samples)+","+(i.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(r.id,r.user,r.segmentStream.buffer,i.nextSample,e||i.nextSample>=i.samples.length),r.segmentStream=null,r!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t=i.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+s.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(s.id,s.user,s.samples),s.samples=[],s!==this.extractedTracks[t]))break}}}},p.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},p.prototype.getBoxes=function(e,t){var i=[];return p._sweep.call(this,e,i,t),i},p._sweep=function(e,t,i){for(var r in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;p._sweep.call(this.boxes[r],e,t,i)}},p.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},p.prototype.getTrackSample=function(e,t){var i=this.getTrackById(e);return this.getSample(i,t)},p.prototype.releaseUsedSamples=function(e,t){var i=0,r=this.getTrackById(e);r.lastValidSample||(r.lastValidSample=0);for(var n=r.lastValidSample;ne*n.timescale){f=r-1;break}t&&n.is_sync&&(l=r)}for(t&&(f=l),e=i.samples[f].cts,i.nextSample=f;i.samples[f].alreadyRead===i.samples[f].size&&i.samples[f+1];)f++;return s=i.samples[f].offset+i.samples[f].alreadyRead,a.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+a.getDurationString(e,o)+" and offset: "+s),{offset:s,time:e/o}},p.prototype.seek=function(e,t){var i,r,n,s=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(n=0;n-1){s=o;break}switch(s){case"Visual":n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24);break;case"Audio":n.add("smhd").set("balance",t.balance||0),a.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":switch(n.add("sthd"),t.type){case"stpp":a.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"")}break;case"Metadata":case"System":default:n.add("nmhd")}t.description&&a.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){a.addBox(e)})),n.add("dinf").add("dref").addEntry((new h["url Box"]).set("flags",1));var u=n.add("stbl");return u.add("stsd").addEntry(a),u.add("stts").set("sample_counts",[]).set("sample_deltas",[]),u.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),u.add("stco").set("chunk_offsets",[]),u.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(i),t.id}},h.Box.prototype.computeSize=function(e){var t=e||new o;t.endianness=o.BIG_ENDIAN,this.write(t)},p.prototype.addSample=function(e,t,i){var r=i||{},n={},a=this.getTrackById(e);if(null!==a){n.number=a.samples.length,n.track_id=a.tkhd.track_id,n.timescale=a.mdia.mdhd.timescale,n.description_index=r.sample_description_index?r.sample_description_index-1:0,n.description=a.mdia.minf.stbl.stsd.entries[n.description_index],n.data=t,n.size=t.length,n.alreadyRead=n.size,n.duration=r.duration||1,n.cts=r.cts||0,n.dts=r.dts||0,n.is_sync=r.is_sync||!1,n.is_leading=r.is_leading||0,n.depends_on=r.depends_on||0,n.is_depended_on=r.is_depended_on||0,n.has_redundancy=r.has_redundancy||0,n.degradation_priority=r.degradation_priority||0,n.offset=0,n.subsamples=r.subsamples,a.samples.push(n),a.samples_size+=n.size,a.samples_duration+=n.duration,this.processSamples();var s=p.createSingleSampleMoof(n);return this.addBox(s),s.computeSize(),s.trafs[0].truns[0].data_offset=s.size+8,this.add("mdat").data=t,n}},p.createSingleSampleMoof=function(e){var t=new h.moofBox;t.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=t.add("traf");return i.add("tfhd").set("track_id",e.track_id).set("flags",h.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts),i.add("trun").set("flags",h.TRUN_FLAGS_DATA_OFFSET|h.TRUN_FLAGS_DURATION|h.TRUN_FLAGS_SIZE|h.TRUN_FLAGS_FLAGS|h.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[0]).set("sample_composition_time_offset",[e.cts-e.dts]),t},p.prototype.lastMoofIndex=0,p.prototype.samplesDataSize=0,p.prototype.resetTables=function(){var e,t,i,r,n,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=n[s].grouping_type+"/0",(o=new f(n[s].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=o))}else for(s=0;s=2&&(l=r[s].grouping_type+"/0",o=new f(r[s].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=o))},p.setSampleGroupProperties=function(e,t,i,r){var n,a;for(n in t.sample_groups=[],r){var s;if(t.sample_groups[n]={},t.sample_groups[n].grouping_type=r[n].grouping_type,t.sample_groups[n].grouping_type_parameter=r[n].grouping_type_parameter,i>=r[n].last_sample_in_run&&(r[n].last_sample_in_run<0&&(r[n].last_sample_in_run=0),r[n].entry_index++,r[n].entry_index<=r[n].sbgp.entries.length-1&&(r[n].last_sample_in_run+=r[n].sbgp.entries[r[n].entry_index].sample_count)),r[n].entry_index<=r[n].sbgp.entries.length-1?t.sample_groups[n].group_description_index=r[n].sbgp.entries[r[n].entry_index].group_description_index:t.sample_groups[n].group_description_index=-1,0!==t.sample_groups[n].group_description_index)s=r[n].fragment_description?r[n].fragment_description:r[n].description,t.sample_groups[n].group_description_index>0?(a=t.sample_groups[n].group_description_index>65535?(t.sample_groups[n].group_description_index>>16)-1:t.sample_groups[n].group_description_index-1,s&&a>=0&&(t.sample_groups[n].description=s.entries[a])):s&&s.version>=2&&s.default_group_description_index>0&&(t.sample_groups[n].description=s.entries[s.default_group_description_index-1])}},p.process_sdtp=function(e,t,i){t&&(e?(t.is_leading=e.is_leading[i],t.depends_on=e.sample_depends_on[i],t.is_depended_on=e.sample_is_depended_on[i],t.has_redundancy=e.sample_has_redundancy[i]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},p.prototype.buildSampleLists=function(){var e,t;for(e=0;ey&&(g++,y<0&&(y=0),y+=a.sample_counts[g]),t>0?(e.samples[t-1].duration=a.sample_deltas[g],e.samples_duration+=e.samples[t-1].duration,T.dts=e.samples[t-1].dts+e.samples[t-1].duration):T.dts=0,s?(t>=w&&(E++,w<0&&(w=0),w+=s.sample_counts[E]),T.cts=e.samples[t].dts+s.sample_offsets[E]):T.cts=T.dts,o?(t==o.sample_numbers[C]-1?(T.is_sync=!0,C++):(T.is_sync=!1,T.degradation_priority=0),f&&f.entries[S].sample_delta+j==t+1&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta,S++)):T.is_sync=!0,p.process_sdtp(e.mdia.minf.stbl.sdtp,T,T.number),T.degradation_priority=c?c.priority[t]:0,f&&f.entries[S].sample_delta+j==t&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta),(u.length>0||h.length>0)&&p.setSampleGroupProperties(e,T,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},p.prototype.updateSampleLists=function(){var e,t,i,r,n,a,s,o,l,f,u,c,d,_,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&p.initSampleGroups(c,u,u.sbgps,c.mdia.minf.stbl.sgpds,u.sgpds),t=0;t0?_.dts=c.samples[c.samples.length-2].dts+c.samples[c.samples.length-2].duration:(u.tfdt?_.dts=u.tfdt.baseMediaDecodeTime:_.dts=0,c.first_traf_merged=!0),_.cts=_.dts,b.flags&h.TRUN_FLAGS_CTS_OFFSET&&(_.cts=_.dts+b.sample_composition_time_offset[i]),m=s,b.flags&h.TRUN_FLAGS_FLAGS?m=b.sample_flags[i]:0===i&&b.flags&h.TRUN_FLAGS_FIRST_FLAG&&(m=b.first_sample_flags),_.is_sync=!(m>>16&1),_.is_leading=m>>26&3,_.depends_on=m>>24&3,_.is_depended_on=m>>22&3,_.has_redundancy=m>>20&3,_.degradation_priority=65535&m;var v=!!(u.tfhd.flags&h.TFHD_FLAG_BASE_DATA_OFFSET),y=!!(u.tfhd.flags&h.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),g=!!(b.flags&h.TRUN_FLAGS_DATA_OFFSET),w=0;w=v?u.tfhd.base_data_offset:y||0===t?f.start:o,_.offset=0===t&&0===i?g?w+b.data_offset:w:o,o=_.offset+_.size,(u.sbgps.length>0||u.sgpds.length>0||c.mdia.minf.stbl.sbgps.length>0||c.mdia.minf.stbl.sgpds.length>0)&&p.setSampleGroupProperties(c,_,_.number_in_traf,u.sample_groups_info)}}if(u.subs){c.has_fragment_subsamples=!0;var E=u.first_sample_index;for(t=0;t-1))return null;var s=(i=this.stream.buffers[n]).byteLength-(r.offset+r.alreadyRead-i.fileStart);if(r.size-r.alreadyRead<=s)return a.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+(r.size-r.alreadyRead)+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,r.size-r.alreadyRead),i.usedBytes+=r.size-r.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead=r.size,r;if(0===s)return null;a.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+s+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,s),r.alreadyRead+=s,i.usedBytes+=s,this.stream.logBufferLevel()}},p.prototype.releaseSample=function(e,t){var i=e.samples[t];return i.data?(this.samplesDataSize-=i.size,i.data=null,i.alreadyRead=0,i.size):0},p.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},p.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec()}return t},p.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(i.protection=n.ipro.protections[n.iinf.item_infos[e].protection_index-1]),n.iinf.item_infos[e].item_type?i.type=n.iinf.item_infos[e].item_type:i.type="mime",i.content_type=n.iinf.item_infos[e].content_type,i.content_encoding=n.iinf.item_infos[e].content_encoding;if(n.iloc)for(e=0;e0){var c=n.iprp.ipco.boxes[h.property_index-1];i.properties[c.type]=c,i.properties.boxes.push(c)}}}}}},p.prototype.getItem=function(e){var t,i;if(!this.meta)return null;if(!(i=this.items[e]).data&&i.size)i.data=new Uint8Array(i.size),i.alreadyRead=0,this.itemsDataSize+=i.size,a.debug("ISOFile","Allocating item #"+e+" of size "+i.size+" (total: "+this.itemsDataSize+")");else if(i.alreadyRead===i.size)return i;for(var r=0;r-1))return null;var l=(t=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-t.fileStart);if(!(n.length-n.alreadyRead<=l))return a.debug("ISOFile","Getting item #"+e+" extent #"+r+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+l+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,l),n.alreadyRead+=l,i.alreadyRead+=l,t.usedBytes+=l,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+e+" extent #"+r+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,n.length-n.alreadyRead),t.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length}}return i.alreadyRead===i.size?i:null},p.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var i=0;i0?this.moov.traks[e].samples[0].duration:0),t.push(r)}return t},h.Box.prototype.printHeader=function(e){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},h.FullBox.prototype.printHeader=function(e){this.size+=4,h.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},h.Box.prototype.print=function(e){this.printHeader(e)},h.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},h.tkhdBox.prototype.print=function(e){h.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var m={createFile:function(e,t){var i=void 0===e||e,r=new p(t);return r.discardMdatData=!i,r}};void 0!==i&&(i.createFile=m.createFile)},{}],145:[function(e,t,i){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"}},{}],146:[function(e,t,i){"use strict";var r=e("asn1.js");i.certificate=e("./certificate");var n=r.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())}));i.RSAPrivateKey=n;var a=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));i.RSAPublicKey=a;var s=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}));i.PublicKey=s;var o=r.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())})),l=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())}));i.PrivateKey=l;var f=r.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())}));i.EncryptedPrivateKey=f;var u=r.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())}));i.DSAPrivateKey=u,i.DSAparam=r.define("DSAparam",(function(){this.int()}));var h=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(c),this.key("publicKey").optional().explicit(1).bitstr())}));i.ECPrivateKey=h;var c=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));i.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":147,"asn1.js":2}],147:[function(e,t,i){"use strict";var r=e("asn1.js"),n=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),o=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),l=r.define("RelativeDistinguishedName",(function(){this.setof(a)})),f=r.define("RDNSequence",(function(){this.seqof(l)})),u=r.define("Name",(function(){this.choice({rdnSequence:this.use(f)})})),h=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),c=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(u),this.key("validity").use(h),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(c).optional())})),_=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=_},{"asn1.js":2}],148:[function(e,t,i){var r=/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,s=e("evp_bytestokey"),o=e("browserify-aes"),l=e("safe-buffer").Buffer;t.exports=function(e,t){var i,f=e.toString(),u=f.match(r);if(u){var h="aes"+u[1],c=l.from(u[2],"hex"),d=l.from(u[3].replace(/[\r\n]/g,""),"base64"),_=s(t,c.slice(0,8),parseInt(u[1],10)).key,p=[],m=o.createDecipheriv(h,_,c);p.push(m.update(d)),p.push(m.final()),i=l.concat(p)}else{var b=f.match(a);i=l.from(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:f.match(n)[1],data:i}}},{"browserify-aes":23,evp_bytestokey:105,"safe-buffer":184}],149:[function(e,t,i){var r=e("./asn1"),n=e("./aesid.json"),a=e("./fixProc"),s=e("browserify-aes"),o=e("pbkdf2"),l=e("safe-buffer").Buffer;function f(e){var t;"object"!=typeof e||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var i,f,u=a(e,t),h=u.tag,c=u.data;switch(h){case"CERTIFICATE":f=r.certificate.decode(c,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=r.PublicKey.decode(c,"der")),i=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=r.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":c=function(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=n[e.algorithm.decrypt.cipher.algo.join(".")],f=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,h=parseInt(a.split("-")[1],10)/8,c=o.pbkdf2Sync(t,i,r,h,"sha1"),d=s.createDecipheriv(a,c,f),_=[];return _.push(d.update(u)),_.push(d.final()),l.concat(_)}(c=r.EncryptedPrivateKey.decode(c,"der"),t);case"PRIVATE KEY":switch(i=(f=r.PrivateKey.decode(c,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:r.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=r.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(c,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(c,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(c,"der")};case"EC PRIVATE KEY":return{curve:(c=r.ECPrivateKey.decode(c,"der")).parameters.value,privateKey:c.privateKey};default:throw new Error("unknown key type "+h)}}t.exports=f,f.signature=r.signature},{"./aesid.json":145,"./asn1":146,"./fixProc":148,"browserify-aes":23,pbkdf2:151,"safe-buffer":184}],150:[function(e,t,i){(function(e){function t(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],r=0;r=-1&&!n;a--){var s=a>=0?arguments[a]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(i=s+"/"+i,n="/"===s.charAt(0))}return(n?"/":"")+(i=t(r(i.split("/"),(function(e){return!!e})),!n).join("/"))||"."},i.normalize=function(e){var a=i.isAbsolute(e),s="/"===n(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!a).join("/"))||a||(e="."),e&&s&&(e+="/"),(a?"/":"")+e},i.isAbsolute=function(e){return"/"===e.charAt(0)},i.join=function(){var e=Array.prototype.slice.call(arguments,0);return i.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},i.relative=function(e,t){function r(e){for(var t=0;t=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=i.resolve(e).substr(1),t=i.resolve(t).substr(1);for(var n=r(e.split("/")),a=r(t.split("/")),s=Math.min(n.length,a.length),o=s,l=0;l=1;--a)if(47===(t=e.charCodeAt(a))){if(!n){r=a;break}}else n=!1;return-1===r?i?"/":".":i&&1===r?"/":e.slice(0,r)},i.basename=function(e,t){var i=function(e){"string"!=typeof e&&(e+="");var t,i=0,r=-1,n=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!n){i=t+1;break}}else-1===r&&(n=!1,r=t+1);return-1===r?"":e.slice(i,r)}(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},i.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,i=0,r=-1,n=!0,a=0,s=e.length-1;s>=0;--s){var o=e.charCodeAt(s);if(47!==o)-1===r&&(n=!1,r=s+1),46===o?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!n){i=s+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===i+1?"":e.slice(t,r)};var n="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,e("_process"))},{_process:158}],151:[function(e,t,i){i.pbkdf2=e("./lib/async"),i.pbkdf2Sync=e("./lib/sync")},{"./lib/async":152,"./lib/sync":155}],152:[function(e,t,i){(function(i,r){var n,a=e("safe-buffer").Buffer,s=e("./precondition"),o=e("./default-encoding"),l=e("./sync"),f=e("./to-buffer"),u=r.crypto&&r.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"},c=[];function d(e,t,i,r,n){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:i,hash:{name:n}},e,r<<3)})).then((function(e){return a.from(e)}))}t.exports=function(e,t,_,p,m,b){"function"==typeof m&&(b=m,m=void 0);var v=h[(m=m||"sha1").toLowerCase()];if(!v||"function"!=typeof r.Promise)return i.nextTick((function(){var i;try{i=l(e,t,_,p,m)}catch(e){return b(e)}b(null,i)}));if(s(_,p),e=f(e,o,"Password"),t=f(t,o,"Salt"),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){i.nextTick((function(){t(null,e)}))}),(function(e){i.nextTick((function(){t(e)}))}))}(function(e){if(r.process&&!r.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==c[e])return c[e];var t=d(n=n||a.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return c[e]=t,t}(v).then((function(i){return i?d(e,t,_,p,v):l(e,t,_,p,m)})),b)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":153,"./precondition":154,"./sync":155,"./to-buffer":156,_process:158,"safe-buffer":184}],153:[function(e,t,i){(function(e){var i;if(e.browser)i="utf-8";else if(e.version){i=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else i="utf-8";t.exports=i}).call(this,e("_process"))},{_process:158}],154:[function(e,t,i){var r=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>r||t!=t)throw new TypeError("Bad key length")}},{}],155:[function(e,t,i){var r=e("create-hash/md5"),n=e("ripemd160"),a=e("sha.js"),s=e("safe-buffer").Buffer,o=e("./precondition"),l=e("./default-encoding"),f=e("./to-buffer"),u=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function c(e,t,i){var o=function(e){function t(t){return a(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?function(e){return(new n).update(e).digest()}:"md5"===e?r:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=o(t):t.length1)for(var i=1;i_||new s(t).cmp(d.modulus)>=0)throw new Error("decryption error");c=i?f(new s(t),d):o(t,d);var p=u.alloc(_-c.length);if(c=u.concat([p,c],_),4===h)return function(e,t){var i=e.modulus.byteLength(),r=l("sha1").update(u.alloc(0)).digest(),s=r.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,s+1),f=t.slice(s+1),h=a(o,n(f,s)),c=a(f,n(h,i-s-1));if(function(e,t){e=u.from(e),t=u.from(t);var i=0,r=e.length;e.length!==t.length&&(i++,r=Math.min(e.length,t.length));var n=-1;for(;++n=t.length){a++;break}var s=t.slice(2,n-1);("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&a++;s.length<8&&a++;if(a)throw new Error("decryption error");return t.slice(n)}(0,c,i);if(3===h)return c;throw new Error("unknown padding")}},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,"safe-buffer":184}],163:[function(e,t,i){var r=e("parse-asn1"),n=e("randombytes"),a=e("create-hash"),s=e("./mgf"),o=e("./xor"),l=e("bn.js"),f=e("./withPublic"),u=e("browserify-rsa"),h=e("safe-buffer").Buffer;t.exports=function(e,t,i){var c;c=e.padding?e.padding:i?1:4;var d,_=r(e);if(4===c)d=function(e,t){var i=e.modulus.byteLength(),r=t.length,f=a("sha1").update(h.alloc(0)).digest(),u=f.length,c=2*u;if(r>i-c-2)throw new Error("message too long");var d=h.alloc(i-r-c-2),_=i-u-1,p=n(u),m=o(h.concat([f,d,h.alloc(1,1),t],_),s(p,_)),b=o(p,s(m,u));return new l(h.concat([h.alloc(1),b,m],i))}(_,t);else if(1===c)d=function(e,t,i){var r,a=t.length,s=e.modulus.byteLength();if(a>s-11)throw new Error("message too long");r=i?h.alloc(s-a-3,255):function(e){var t,i=h.allocUnsafe(e),r=0,a=n(2*e),s=0;for(;r=0)throw new Error("data too long for modulus")}return i?u(d,_):f(d,_)}},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,randombytes:166,"safe-buffer":184}],164:[function(e,t,i){var r=e("bn.js"),n=e("safe-buffer").Buffer;t.exports=function(e,t){return n.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},{"bn.js":161,"safe-buffer":184}],165:[function(e,t,i){t.exports=function(e,t){for(var i=e.length,r=-1;++r4294967295)throw new RangeError("requested too many random bytes");var r=n.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;su||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function c(e,t,i){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>i||e>l)throw new RangeError("buffer too small")}function d(e,i,r,n){if(t.browser){var a=e.buffer,o=new Uint8Array(a,i,r);return f.getRandomValues(o),n?void t.nextTick((function(){n(null,e)})):e}if(!n)return s(r).copy(e,i),e;s(r,(function(t,r){if(t)return n(t);r.copy(e,i),n(null,e)}))}f&&f.getRandomValues||!t.browser?(i.randomFill=function(e,t,i,n){if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)n=t,t=0,i=e.length;else if("function"==typeof i)n=i,i=e.length-t;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return h(t,e.length),c(i,t,e.length),d(e,t,i,n)},i.randomFillSync=function(e,t,i){void 0===t&&(t=0);if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(t,e.length),void 0===i&&(i=e.length-t);return c(i,t,e.length),d(e,t,i)}):(i.randomFill=n,i.randomFillSync=n)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:158,randombytes:166,"safe-buffer":184}],168:[function(e,t,i){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":169}],169:[function(e,t,i){"use strict";var r=e("process-nextick-args"),n=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=h;var a=Object.create(e("core-util-is"));a.inherits=e("inherits");var s=e("./_stream_readable"),o=e("./_stream_writable");a.inherits(h,s);for(var l=n(o.prototype),f=0;f0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):j(e,s)):w(e,s,t,!1))):r||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(S,e):S(e))}function S(e){d("emit readable"),e.emit("readable"),M(e)}function j(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(T,e,t))}function T(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;ea.length?a.length:e;if(s===a.length?n+=a:n+=a.slice(0,e),0===(e-=s)){s===a.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(s));break}++r}return t.length-=r,n}(e,t):function(e,t){var i=f.allocUnsafe(e),r=t.head,n=1;r.data.copy(i),e-=r.data.length;for(;r=r.next;){var a=r.data,s=e>a.length?a.length:e;if(a.copy(i,i.length-e,0,s),0===(e-=s)){s===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break}++n}return t.length-=n,i}(e,t);return r}(e,t.buffer,t.decoder),i);var i}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(I,t,e))}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function R(e,t){for(var i=0,r=e.length;i=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):C(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&P(this),null;var r,n=t.needReadable;return d("need readable",n),(0===t.length||t.length-e0?k(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&P(this)),null!==r&&this.emit("data",r),r},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,t);var l=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:y;function f(t,i){d("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",h),e.removeListener("error",m),e.removeListener("unpipe",f),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",p),c=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){d("onend"),e.end()}a.endEmitted?n.nextTick(l):r.once("end",l),e.on("unpipe",f);var h=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",h);var c=!1;var _=!1;function p(t){d("ondata"),_=!1,!1!==e.write(t)||_||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==R(a.pipes,e))&&!c&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,_=!0),r.pause())}function m(t){d("onerror",t),y(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),y()}function v(){d("onfinish"),e.removeListener("close",b),y()}function y(){d("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",m),e.once("close",b),e.once("finish",v),e.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a-1?n:a.nextTick;v.WritableState=b;var f=Object.create(e("core-util-is"));f.inherits=e("inherits");var u={deprecate:e("util-deprecate")},h=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,d=r.Uint8Array||function(){};var _,p=e("./internal/streams/destroy");function m(){}function b(t,i){o=o||e("./_stream_duplex"),t=t||{};var r=i instanceof o;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,f=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(f||0===f)?f:u,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 h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?(a.nextTick(n,r),a.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(n(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t))}(e,i,r,t,n);else{var s=E(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||w(e,i),r?l(g,e,i,s,n):g(e,i,s,n)}}(i,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 s(this)}function v(t){if(o=o||e("./_stream_duplex"),!(_.call(v,this)||this instanceof o))return new v(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function y(e,t,i,r,n,a,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function g(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),a=t.corkedRequestsFree;a.entry=i;for(var o=0,l=!0;i;)n[o]=i,i.isBuf||(l=!1),i=i.next,o+=1;n.allBuffers=l,y(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;i;){var f=i.chunk,u=i.encoding,h=i.callback;if(y(e,t,!1,t.objectMode?1:f.length,f,u,h),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var i=E(t);return i&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}f.inherits(v,h),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!_.call(this,e)||this===v&&(e&&e._writableState instanceof b)}})):_=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,i){var r,n=this._writableState,s=!1,o=!n.objectMode&&(r=e,c.isBuffer(r)||r instanceof d);return o&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(i=t,t=null),o?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof i&&(i=m),n.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),a.nextTick(t,i)}(this,i):(o||function(e,t,i,r){var n=!0,s=!1;return null===i?s=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),a.nextTick(r,s),n=!1),n}(this,n,e,i))&&(n.pendingcb++,s=function(e,t,i,r,n,a){if(!i){var s=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,i));return t}(t,r,n);r!==s&&(i=!0,n="buffer",r=s)}var o=t.objectMode?1:r.length;t.length+=o;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,S(e,t),i&&(t.finished?a.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,r,i)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=p.destroy,v.prototype._undestroy=p.undestroy,v.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":169,"./internal/streams/destroy":175,"./internal/streams/stream":176,_process:158,"core-util-is":68,inherits:136,"process-nextick-args":157,"safe-buffer":177,timers:196,"util-deprecate":197}],174:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,i,n,a=r.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,i=a,n=o,t.copy(i,n),o+=s.data.length,s=s.next;return a},e}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":177,util:20}],175:[function(e,t,i){"use strict";var r=e("process-nextick-args");function n(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var i=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(n,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(n,i,e),i._writableState&&(i._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":157}],176:[function(e,t,i){arguments[4][62][0].apply(i,arguments)},{dup:62,events:104}],177:[function(e,t,i){var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:66}],178:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=r.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}};function a(e){var t;switch(this.encoding=function(e){var t=function(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}}(e);if("string"!=typeof t&&(r.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=f,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=c,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,i=function(e,t,i){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,"�"}}(this,e);return void 0!==i?i: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 l(e,t){if((e.length-t)%2==0){var i=e.toString("utf16le",t);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function u(e,t){var i=(e.length-t)%3;return 0===i?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?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-i))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function c(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}i.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i=0)return n>0&&(e.lastNeed=n-1),n;if(--r=0)return n>0&&(e.lastNeed=n-2),n;if(--r=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var r=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},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":177}],179:[function(e,t,i){t.exports=e("./readable").PassThrough},{"./readable":180}],180:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":169,"./lib/_stream_passthrough.js":170,"./lib/_stream_readable.js":171,"./lib/_stream_transform.js":172,"./lib/_stream_writable.js":173}],181:[function(e,t,i){t.exports=e("./readable").Transform},{"./readable":180}],182:[function(e,t,i){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":173}],183:[function(e,t,i){"use strict";var r=e("buffer").Buffer,n=e("inherits"),a=e("hash-base"),s=new Array(16),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[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],h=[0,1518500249,1859775393,2400959708,2840853838],c=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function _(e,t){return e<>>32-t}function p(e,t,i,r,n,a,s,o){return _(e+(t^i^r)+a+s|0,o)+n|0}function m(e,t,i,r,n,a,s,o){return _(e+(t&i|~t&r)+a+s|0,o)+n|0}function b(e,t,i,r,n,a,s,o){return _(e+((t|~i)^r)+a+s|0,o)+n|0}function v(e,t,i,r,n,a,s,o){return _(e+(t&r|i&~r)+a+s|0,o)+n|0}function y(e,t,i,r,n,a,s,o){return _(e+(t^(i|~r))+a+s|0,o)+n|0}n(d,a),d.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var i=0|this._a,r=0|this._b,n=0|this._c,a=0|this._d,d=0|this._e,g=0|this._a,w=0|this._b,E=0|this._c,C=0|this._d,S=0|this._e,j=0;j<80;j+=1){var T,A;j<16?(T=p(i,r,n,a,d,e[o[j]],h[0],f[j]),A=y(g,w,E,C,S,e[l[j]],c[0],u[j])):j<32?(T=m(i,r,n,a,d,e[o[j]],h[1],f[j]),A=v(g,w,E,C,S,e[l[j]],c[1],u[j])):j<48?(T=b(i,r,n,a,d,e[o[j]],h[2],f[j]),A=b(g,w,E,C,S,e[l[j]],c[2],u[j])):j<64?(T=v(i,r,n,a,d,e[o[j]],h[3],f[j]),A=m(g,w,E,C,S,e[l[j]],c[3],u[j])):(T=y(i,r,n,a,d,e[o[j]],h[4],f[j]),A=p(g,w,E,C,S,e[l[j]],c[4],u[j])),i=d,d=a,a=_(n,10),n=r,r=T,g=S,S=C,C=_(E,10),E=w,w=A}var x=this._b+n+C|0;this._b=this._c+a+S|0,this._c=this._d+d+g|0,this._d=this._e+i+w|0,this._e=this._a+r+E|0,this._a=x},d.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=r.alloc?r.alloc(20):new r(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=d},{buffer:66,"hash-base":106,inherits:136}],184:[function(e,t,i){ +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ +var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),s.prototype=Object.create(n.prototype),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:66}],185:[function(e,t,i){(function(i){"use strict";var r,n=e("buffer"),a=n.Buffer,s={};for(r in n)n.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(s[r]=n[r]);var o=s.Buffer={};for(r in a)a.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(o[r]=a[r]);if(s.Buffer.prototype=a.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(e,t,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return a(e,t,i)}),o.alloc||(o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=a(e);return t&&0!==t.length?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r}),!s.kStringMaxLength)try{s.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),t.exports=s}).call(this,e("_process"))},{_process:158,buffer:66}],186:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var i=this._block,n=this._blockSize,a=e.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},{"safe-buffer":184}],187:[function(e,t,i){(i=t.exports=function(e){e=e.toLowerCase();var t=i[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),i.sha1=e("./sha1"),i.sha224=e("./sha224"),i.sha256=e("./sha256"),i.sha384=e("./sha384"),i.sha512=e("./sha512")},{"./sha":188,"./sha1":189,"./sha224":190,"./sha256":191,"./sha384":192,"./sha512":193}],188:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e){return e<<30|e>>>2}function u(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,h=0;h<16;++h)i[h]=e.readInt32BE(4*h);for(;h<80;++h)i[h]=i[h-3]^i[h-8]^i[h-14]^i[h-16];for(var c=0;c<80;++c){var d=~~(c/20),_=0|((t=r)<<5|t>>>27)+u(d,n,a,o)+l+i[c]+s[d];l=o,o=a,a=f(n),n=r,r=_}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],189:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function h(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,c=0;c<16;++c)i[c]=e.readInt32BE(4*c);for(;c<80;++c)i[c]=(t=i[c-3]^i[c-8]^i[c-14]^i[c-16])<<1|t>>>31;for(var d=0;d<80;++d){var _=~~(d/20),p=f(r)+h(_,n,a,o)+l+i[d]+s[_]|0;l=o,o=a,a=u(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],190:[function(e,t,i){var r=e("inherits"),n=e("./sha256"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(64);function l(){this.init(),this._w=o,a.call(this,64,56)}r(l,n),l.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},l.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=l},{"./hash":186,"./sha256":191,inherits:136,"safe-buffer":184}],191:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],o=new Array(64);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e,t,i){return i^e&(t^i)}function u(e,t,i){return e&t|i&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function c(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(l,n),l.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},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,_=0|this._f,p=0|this._g,m=0|this._h,b=0;b<16;++b)i[b]=e.readInt32BE(4*b);for(;b<64;++b)i[b]=0|(((t=i[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+i[b-7]+d(i[b-15])+i[b-16];for(var v=0;v<64;++v){var y=m+c(l)+f(l,_,p)+s[v]+i[v]|0,g=h(r)+u(r,n,a)|0;m=p,p=_,_=l,l=o+y|0,o=a,a=n,n=r,r=y+g|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0,this._f=_+this._f|0,this._g=p+this._g|0,this._h=m+this._h|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],192:[function(e,t,i){var r=e("inherits"),n=e("./sha512"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(160);function l(){this.init(),this._w=o,a.call(this,128,112)}r(l,n),l.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},l.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=l},{"./hash":186,"./sha512":193,inherits:136,"safe-buffer":184}],193:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=new Array(160);function l(){this.init(),this._w=o,n.call(this,128,112)}function f(e,t,i){return i^e&(t^i)}function u(e,t,i){return e&t|i&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function c(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function _(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function b(e,t){return e>>>0>>0?1:0}r(l,n),l.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},l.prototype._update=function(e){for(var t=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,a=0|this._dh,o=0|this._eh,l=0|this._fh,v=0|this._gh,y=0|this._hh,g=0|this._al,w=0|this._bl,E=0|this._cl,C=0|this._dl,S=0|this._el,j=0|this._fl,T=0|this._gl,A=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var M=t[x-30],k=t[x-30+1],P=d(M,k),I=_(k,M),R=p(M=t[x-4],k=t[x-4+1]),U=m(k,M),D=t[x-14],F=t[x-14+1],O=t[x-32],L=t[x-32+1],B=I+F|0,N=P+D+b(B,I)|0;N=(N=N+R+b(B=B+U|0,U)|0)+O+b(B=B+L|0,L)|0,t[x]=N,t[x+1]=B}for(var z=0;z<160;z+=2){N=t[z],B=t[z+1];var H=u(i,r,n),V=u(g,w,E),Y=h(i,g),q=h(g,i),W=c(o,S),X=c(S,o),G=s[z],K=s[z+1],Q=f(o,l,v),Z=f(S,j,T),J=A+X|0,$=y+W+b(J,A)|0;$=($=($=$+Q+b(J=J+Z|0,Z)|0)+G+b(J=J+K|0,K)|0)+N+b(J=J+B|0,B)|0;var ee=q+V|0,te=Y+H+b(ee,q)|0;y=v,A=T,v=l,T=j,l=o,j=S,o=a+$+b(S=C+J|0,C)|0,a=n,C=E,n=r,E=w,r=i,w=g,i=$+te+b(g=J+ee|0,J)|0}this._al=this._al+g|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+C|0,this._el=this._el+S|0,this._fl=this._fl+j|0,this._gl=this._gl+T|0,this._hl=this._hl+A|0,this._ah=this._ah+i+b(this._al,g)|0,this._bh=this._bh+r+b(this._bl,w)|0,this._ch=this._ch+n+b(this._cl,E)|0,this._dh=this._dh+a+b(this._dl,C)|0,this._eh=this._eh+o+b(this._el,S)|0,this._fh=this._fh+l+b(this._fl,j)|0,this._gh=this._gh+v+b(this._gl,T)|0,this._hh=this._hh+y+b(this._hl,A)|0},l.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=l},{"./hash":186,inherits:136,"safe-buffer":184}],194:[function(e,t,i){t.exports=n;var r=e("events").EventEmitter;function n(){r.call(this)}e("inherits")(n,r),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function a(){i.readable&&i.resume&&i.resume()}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",o),i.on("close",l));var s=!1;function o(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",o),i.removeListener("close",l),i.removeListener("error",f),e.removeListener("error",f),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",f),e.on("error",f),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e}},{events:104,inherits:136,"readable-stream/duplex.js":168,"readable-stream/passthrough.js":179,"readable-stream/readable.js":180,"readable-stream/transform.js":181,"readable-stream/writable.js":182}],195:[function(e,t,i){arguments[4][178][0].apply(i,arguments)},{dup:178,"safe-buffer":184}],196:[function(e,t,i){(function(t,r){var n=e("process/browser.js").nextTick,a=Function.prototype.apply,s=Array.prototype.slice,o={},l=0;function f(e,t){this._id=e,this._clearFn=t}i.setTimeout=function(){return new f(a.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new f(a.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(e){e.close()},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},i.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},i._unrefActive=i.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},i.setImmediate="function"==typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&s.call(arguments,1);return o[t]=!0,n((function(){o[t]&&(r?e.apply(null,r):e.call(null),i.clearImmediate(t))})),t},i.clearImmediate="function"==typeof r?r:function(e){delete o[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":158,timers:196}],197:[function(e,t,i){(function(e){function i(t){try{if(!e.localStorage)return!1}catch(e){return!1}var i=e.localStorage[t];return null!=i&&"true"===String(i).toLowerCase()}t.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")&&console.trace(t),r=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],198:[function(e,t,i){"use strict";t.exports={DEFAILT_WEBGL_PLAY_ID:"glplayer",PLAYER_IN_TYPE_MP4:"mp4",PLAYER_IN_TYPE_FLV:"flv",PLAYER_IN_TYPE_HTTPFLV:"httpflv",PLAYER_IN_TYPE_RAW_265:"raw265",PLAYER_IN_TYPE_TS:"ts",PLAYER_IN_TYPE_MPEGTS:"mpegts",PLAYER_IN_TYPE_M3U8:"hls",PLAYER_IN_TYPE_M3U8_VOD:"m3u8",PLAYER_IN_TYPE_M3U8_LIVE:"hls",APPEND_TYPE_STREAM:0,APPEND_TYPE_FRAME:1,APPEND_TYPE_SEQUENCE:2,DEFAULT_WIDTH:600,DEFAULT_HEIGHT:600,DEFAULT_FPS:25,DEFAULT_FRAME_DUR:40,DEFAULT_FIXED:!1,DEFAULT_SAMPLERATE:44100,DEFAULT_CHANNELS:2,DEFAULT_CONSU_SAMPLE_LEN:20,PLAYER_MODE_VOD:"vod",PLAYER_MODE_NOTIME_LIVE:"live",AUDIO_MODE_ONCE:"ONCE",AUDIO_MODE_SWAP:"SWAP",DEFAULT_STRING_LIVE:"LIVE",CODEC_H265:0,CODEC_H264:1,PLAYER_CORE_TYPE_DEFAULT:0,PLAYER_CORE_TYPE_CNATIVE:1,V_CODEC_NAME_HEVC:265,V_CODEC_NAME_AVC:264,V_CODEC_NAME_UNKN:500,A_CODEC_NAME_AAC:112,A_CODEC_NAME_MP3:113,A_CODEC_NAME_UNKN:500,CACHE_NO_LOADCACHE:192,CACHE_WITH_PLAY_SIGN:193,CACHE_WITH_NOPLAY_SIGN:194}},{}],199:[function(e,t,i){"use strict";var r=window.AudioContext||window.webkitAudioContext,n=e("../consts"),a=e("./av-common");t.exports=function(e){var t={options:{sampleRate:e.sampleRate||n.DEFAULT_SAMPLERATE,appendType:e.appendType||n.APPEND_TYPE_STREAM,playMode:e.playMode||n.AUDIO_MODE_SWAP},sourceChannel:-1,audioCtx:new r({latencyHint:"interactive",sampleRate:e.sampleRate}),gainNode:null,sourceList:[],startStatus:!1,sampleQueue:[],nextBuffer:null,playTimestamp:0,playStartTime:0,durationMs:-1,isLIVE:!1,voice:1,onLoadCache:null,resetStartParam:function(){t.playTimestamp=0,t.playStartTime=0},setOnLoadCache:function(e){t.onLoadCache=e},setDurationMs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e},setVoice:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.voice=e,t.gainNode.gain.value=e},getAlignVPTS:function(){return t.playTimestamp+(a.GetMsTime()-t.playStartTime)/1e3},swapSource:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==t.startStatus)return null;if(e<0||e>=t.sourceList.length)return null;if(i<0||i>=t.sourceList.length)return null;try{t.sourceChannel===e&&null!==t.sourceList[e]&&(t.sourceList[e].disconnect(t.gainNode),t.sourceList[e]=null)}catch(t){console.error("[DEFINE ERROR] audioModule disconnect source Index:"+e+" error happened!",t)}t.sourceChannel=i;var r=t.decodeSample(i,e);-2==r&&t.isLIVE&&(t.getAlignVPTS()>=t.durationMs/1e3-.04?t.pause():null!==t.onLoadCache&&t.onLoadCache())},addSample:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!(null==e||!e||null==e)&&(0==t.sampleQueue.length&&(t.seekPos=e.pts),t.sampleQueue.push(e),!0)},runNextBuffer:function(){window.setInterval((function(){if(!(null!=t.nextBuffer||t.sampleQueue.length0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){t.swapSource(e,i)}),0==t.sampleQueue.length)return t.isLIVE?(t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].onended=function(){t.swapSource(e,i)},t.sourceList[e].stop(),0):-2;if(t.sourceList[e].buffer)return t.sourceList[e],t.sourceList[i],t.gainNode,t.swapSource(e,i),0;if(null==t.nextBuffer||t.nextBuffer.data.length<1)return t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0,t.sourceList[e].stop(),1;var r=t.nextBuffer.data.buffer;t.playTimestamp=t.nextBuffer.pts,t.playStartTime=a.GetMsTime();try{t.audioCtx.decodeAudioData(r,(function(i){null!==t.sourceList[e]&&(t.sourceList[e].buffer=i,t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0)}),(function(e){}))}catch(e){return t.nextBuffer=null,-3}return t.nextBuffer=null,0},decodeWholeSamples:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(t.sourceChannel=e,e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){}),0==t.sampleQueue.length)return-2;for(var i=null,r=null,a=0;a=2){var s=i.length/2;a=new Float32Array(s);for(var o=0,l=0;l0&&s()-this._start_time>=this._now_seg_dur&&(s(),this._start_time,this._now_seg_dur,this._start_time=-1,this._now_seg_dur=-1),s(),this._start_time<0)if(new Date,null!==this._pcm_array_buf&&this._pcm_array_buf.length>this._push_start_idx){this._swapStartPlay=!1;var e=this._push_start_idx+this._once_pop_len;e>this._pcm_array_buf.length&&(e=this._pcm_array_buf.length);var t=this._pcm_array_buf.slice(this._push_start_idx,e);this._push_start_idx+=t.length,this._now_seg_dur=1*t.length/this._sample_rate*1e3,t.length,this._sample_rate,this._now_seg_dur;var i=this._ctx.createBuffer(1,t.length,this._sample_rate);t.length,new Date,i.copyToChannel(t,0),this._active_node=this._ctx.createBufferSource(),this._active_node.buffer=i,this._active_node.connect(this._gain),this._start_time=s(),this._active_node.start(0)}else setTimeout(this.readingLoopWithF32,1)}}])&&r(t.prototype,i),o&&r(t,o),e}();i.AudioPcmPlayer=o},{"../consts":198}],201:[function(e,t,i){"use strict";var r=e("../consts"),n=[{format:"mp4",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"mov",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"flv",value:"flv",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"m3u8",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"m3u",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"ts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"mpegts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"hevc",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"h265",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT}];t.exports={frameDataAlignCrop:function(e,t,i,r,n,a,s,o){if(0==e-r)return[a,s,o];for(var l=r*n,f=l/4,u=new Uint8Array(l),h=new Uint8Array(f),c=new Uint8Array(f),d=r,_=r/2,p=0;p=0)return i.value}return n[0].value},GetFormatPlayCore:function(e){for(var t=0;tt.config.probeSize&&(n.cwrap("getSniffHttpFlvPkg","number",["number"])(t.AVSniffPtr),t.pushPkg-=1)}),5));break;case"fetch-fin":break;case"fetch-error":t.onNetworkError&&t.onNetworkError(i.data)}}},{key:"_checkDisplaySize",value:function(e,t,i){var r=t-e,n=this.config.width+Math.ceil(r/2),a=t/this.config.width>i/this.config.height,s=(n/t).toFixed(2),o=(this.config.height/i).toFixed(2),l=a?s:o,f=this.config.fixed,u=f?n:parseInt(t*l),h=f?this.config.height:parseInt(i*l);if(this.CanvasObj.offsetWidth!=u||this.CanvasObj.offsetHeight!=h){var c=parseInt((this.canvasBox.offsetHeight-h)/2),d=parseInt((this.canvasBox.offsetWidth-u)/2);c=c<0?0:c,d=d<0?0:d,this.CanvasObj.style.marginTop=c+"px",this.CanvasObj.style.marginLeft=d+"px",this.CanvasObj.style.width=u+"px",this.CanvasObj.style.height=h+"px"}return this.isCheckDisplay=!0,[u,h]}},{key:"_ptsFixed2",value:function(e){return Math.ceil(100*e)/100}},{key:"_callbackProbe",value:function(e,t,i,r,a,s,f,u,h){for(var c=n.HEAPU8.subarray(h,h+10),d=0;d=0&&(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.config.sampleRate=s,this.mediaInfo.sampleRate=s,this.audioWAudio=o({sampleRate:s,appendType:l.APPEND_TYPE_FRAME}),this.audioWAudio.isLIVE=!0),this.onProbeFinish&&this.onProbeFinish()}},{key:"_callbackYUV",value:function(e,t,i,r,a,s,o,l,f){var u=n.HEAPU8.subarray(e,e+r*l),h=new Uint8Array(u),c=n.HEAPU8.subarray(t,t+a*l/2),d=new Uint8Array(c),_=n.HEAPU8.subarray(i,i+s*l/2),p={bufY:h,bufU:d,bufV:new Uint8Array(_),line_y:r,h:l,pts:f};this.YuvBuf.push(p),this.checkCacheState(),n._free(u),u=null,n._free(c),c=null,n._free(_),_=null,!1===this.readyShowDone&&(this.playYUV(),this.readyShowDone=!0,this.onReadyShowDone&&this.onReadyShowDone())}},{key:"_callbackNALU",value:function(e,t,i,r,a,s,o){if(!1===this.readyKeyFrame){if(i<=0)return;this.readyKeyFrame=!0}var l=n.HEAPU8.subarray(e,e+t),f=new Uint8Array(l);this.NaluBuf.push({bufData:f,len:t,isKey:i,w:r,h:a,pts:1e3*s,dts:1e3*o}),n._free(l),l=null}},{key:"_callbackPCM",value:function(e){}},{key:"_callbackAAC",value:function(e,t,i,r,a){var s=this._ptsFixed2(a);if(this.audioWAudio){var o=new Uint8Array(7+i),l=n.HEAPU8.subarray(e,e+7);o.set(l,0);var f=n.HEAPU8.subarray(t,t+i);o.set(f,7);var u={pts:s,data:o};this.audioWAudio.addSample(u),this.checkCacheState()}}},{key:"_decode",value:function(){var e=this;setTimeout((function(){if(null!==e.workerFetch){var t=e.NaluBuf.shift();if(null!=t){var i=n._malloc(t.bufData.length);n.HEAP8.set(t.bufData,i),n.cwrap("decodeHttpFlvVideoFrame","number",["number","number","number","number","number"])(e.AVSniffPtr,i,t.bufData.length,t.pts,t.dts,0),n._free(i),i=null}e._decode()}}),1)}},{key:"checkCacheState",value:function(){var e=this.YuvBuf.length>=50&&this.audioWAudio.sampleQueue.length>=50;return!1===this.cache_status&&e&&(this.playInterval&&this.audioWAudio.play(),this.onLoadCacheFinshed&&this.onLoadCacheFinshed(),this.cache_status=!0),e}},{key:"setVoice",value:function(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e)}},{key:"release",value:function(){this.pause(),this.NaluBuf.length=0,this.YuvBuf.length=0,void 0!==this.workerFetch&&null!==this.workerFetch&&this.workerFetch.postMessage({cmd:"stop",data:"stop",msg:"stop"}),this.workerFetch=null,n.cwrap("releaseHttpFLV","number",["number"])(this.AVSniffPtr),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null,this.audioWAudio&&this.audioWAudio.stop(),this.audioWAudio=null}},{key:"isPlayingState",value:function(){return null!==this.playInterval&&void 0!==this.playInterval}},{key:"pause",value:function(){this.audioWAudio&&this.audioWAudio.pause(),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null}},{key:"playYUV",value:function(){if(this.YuvBuf.length>0){var e=this.YuvBuf.shift();return a.renderFrame(this.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h),!0}return!1}},{key:"play",value:function(){var e=this,t=this;if(!1===this.checkCacheState())return this.onLoadCache&&this.onLoadCache(),setTimeout((function(){e.play()}),100),!1;if(void 0===this.playInterval||null===this.playInterval){var i=0,r=0,n=0;this.playInterval=setInterval((function(){if(r=s.GetMsTime(),t.cache_status){if(r-i>=t.frameTime-n){var e=t.YuvBuf.shift();if(null!=e&&null!==e){var o=0;null!==t.audioWAudio&&void 0!==t.audioWAudio&&(o=1e3*(e.pts-t.audioWAudio.getAlignVPTS())),n=t.audioWAudio?o<0&&-1*o<=t.frameTime||o>=0?s.GetMsTime()-r+1:t.frameTime:s.GetMsTime()-r+1,a.renderFrame(t.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h)}(t.YuvBuf.length<=0||t.audioWAudio.sampleQueue.length<=0)&&(t.cache_status=!1,t.onLoadCache&&t.onLoadCache(),t.audioWAudio.pause()),i=r}}else n=t.frameTime}),1),this.audioWAudio&&this.audioWAudio.play()}}},{key:"start",value:function(e){var t,i,r,s=this;this.workerFetch=new Worker((t=function(){var e=new AbortController,t=e.signal;self,self.onmessage=function(i){var r=i.data;switch(void 0===r.cmd||null===r.cmd?"":r.cmd){case"start":!function(e){var i=!1;i||(i=!0,fetch(e,{signal:t}).then((function(e){return function e(t){return t.read().then((function(i){if(!i.done){var r=i.value;return self.postMessage({cmd:"fetch-chunk",data:r,msg:"fetch-chunk"}),e(t)}self.postMessage({cmd:"fetch-fin",data:null,msg:"fetch-fin"})}))}(e.body.getReader())})).catch((function(e){e.toString().includes("user aborted")||(console.error("httplive error",e),self.postMessage({cmd:"fetch-error",data:e,msg:"fetch-error"}))})))}(r.data),self.postMessage({cmd:"default",data:"WORKER STARTED",msg:"default"});break;case"stop":e.abort(),self.close()}}}.toString(),i=t.match(/^\s*function\s*\(\s*\)\s*\{(([\s\S](?!\}$))*[\s\S])/),r=[i[1]],window.URL.createObjectURL(new Blob(r,{type:"text/javascript"})))),this.workerFetch.onmessage=function(e){s._workerFetch_onmessage(e,s)},this.workerFetch,this.AVSniffPtr=n.cwrap("AVSniffHttpFlvInit","number",["string","string"])("base64:QXV0aG9yOmNoYW5neWFubG9uZ3xudW1iZXJ3b2xmLEdpdGh1YjpodHRwczovL2dpdGh1Yi5jb20vbnVtYmVyd29sZixFbWFpbDpwb3JzY2hlZ3QyM0Bmb3htYWlsLmNvbSxRUTo1MzEzNjU4NzIsSG9tZVBhZ2U6aHR0cDovL3h2aWRlby52aWRlbyxEaXNjb3JkOm51bWJlcndvbGYjODY5NCx3ZWNoYXI6bnVtYmVyd29sZjExLEJlaWppbmcsV29ya0luOkJhaWR1","0.0.0"),this.AVSniffPtr;var o=n.addFunction(this._callbackProbe.bind(this)),l=n.addFunction(this._callbackYUV.bind(this)),f=n.addFunction(this._callbackNALU.bind(this)),u=n.addFunction(this._callbackPCM.bind(this)),h=n.addFunction(this._callbackAAC.bind(this));n.cwrap("initializeSniffHttpFlvModule","number",["number","number","number","number","number","number"])(this.AVSniffPtr,o,l,f,u,h),this.AVGLObj=a.setupCanvas(this.CanvasObj,{preserveDrawingBuffer:!1}),this.workerFetch.postMessage({cmd:"start",data:e,msg:"start"}),this._decode()}}])&&r(t.prototype,i),f&&r(t,f),e}();i.CHttpLiveCore=f},{"../consts":198,"../demuxer/buffer":209,"../demuxer/bufferFrame":210,"../render-engine/webgl-420p":220,"../version":223,"./audio-core":199,"./audio-native-core":200,"./av-common":201,"./cache":204,"./cacheYuv":205,"./missile.js":1}],203:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];this.showScreen=e,this.canvas&&(e?this.canvas.setAttribute("hidden",!0):this.canvas.removeAttribute("hidden"))}},{key:"getCachePTS",value:function(){return 1!==this.config.ignoreAudio&&this.audioWAudio?Math.max(this.vCachePTS,this.aCachePTS):this.vCachePTS}},{key:"getMaxPTS",value:function(){return Math.max(this.vCachePTS,this.aCachePTS)}},{key:"isPlayingState",value:function(){return this.isPlaying}},{key:"pushDone",value:function(){this.pushEOF=!0}},{key:"_clearDecInterval",value:function(){this.decVFrameInterval&&window.clearInterval(this.decVFrameInterval),this.decVFrameInterval=null}},{key:"_checkPlayFinished",value:function(){return!(this.config.playMode!==h.PLAYER_MODE_VOD||!(!0===this.bufRecvStat&&(this.playPTS>=this.bufLastVDTS||this.audioWAudio&&this.playPTS>=this.bufLastADTS)||this.duration-this.playPTS0&&(this.isPlaying=!0);var t=0,i=0,r=0;this.config.playMode===h.PLAYER_MODE_NOTIME_LIVE?this.playFrameInterval=window.setInterval((function(){if(e._videoQueue.length>0){var t=e._videoQueue.shift();t.pts,l.renderFrame(e.yuv,t.data_y,t.data_u,t.data_v,t.line1,t.height)}}),1e3*this.frameDur):this.playFrameInterval=window.setInterval((function(){if(i=f.GetMsTime(),e._videoQueue.length>0&&i-t>=e.frameTime-r){var n=e._videoQueue.shift(),a=0;if(e.isNewSeek||null===e.audioWAudio||void 0===e.audioWAudio||(a=1e3*(n.pts-e.audioWAudio.getAlignVPTS()),e.playPTS=Math.max(e.audioWAudio.getAlignVPTS(),e.playPTS)),t=i,f.GetMsTime(),e.playPTS=Math.max(n.pts,e.playPTS),e.isNewSeek&&e.seekTarget-e.frameDur>n.pts)return void(r=e.frameTime);if(e.isNewSeek&&(e.audioWAudio&&e.audioWAudio.setVoice(e.audioVoice),e.audioWAudio&&e.audioWAudio.play(),r=0,e.isNewSeek=!1,e.seekTarget=0),e.showScreen?e.onRender&&e.onRender(n.line1,n.height,n.data_y,n.data_u,n.data_v):(n.pts,l.renderFrame(e.yuv,n.data_y,n.data_u,n.data_v,n.line1,n.height)),e.onPlayingTime&&e.onPlayingTime(n.pts),!e.isNewSeek&&e.audioWAudio&&(a<0&&-1*a<=e.frameTime||a>=0)){if(e.config.playMode===h.PLAYER_MODE_VOD)if(n.pts>=e.duration)e.onLoadCacheFinshed&&e.onLoadCacheFinshed(),e.onPlayingFinish&&e.onPlayingFinish(),e._clearDecInterval(),e.pause();else if(e._checkPlayFinished())return;r=f.GetMsTime()-i}else!e.isNewSeek&&e.audioWAudio&&(a<0&&e.frameTime,r=e.frameTime)}e._checkPlayFinished()}),1)}this.isNewSeek||this.audioWAudio&&this.audioWAudio.play()}},{key:"pause",value:function(){this.isPlaying=!1,this._pause()}},{key:"_pause",value:function(){this.playFrameInterval&&window.clearInterval(this.playFrameInterval),this.playFrameInterval=null,this.audioWAudio&&this.audioWAudio.pause()}},{key:"seek",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.openFrameCall=!1,this.pause(),this._clearDecInterval(),null!==this.avFeedVideoInterval&&(window.clearInterval(this.avFeedVideoInterval),this.avFeedVideoInterval=null),null!==this.avFeedAudioInterval&&(window.clearInterval(this.avFeedAudioInterval),this.avFeedAudioInterval=null),this.yuvMaxTime=0,this.playVPipe.length=0,this._videoQueue.length=0,this.audioWAudio&&this.audioWAudio.stop(),e&&e(),this.isNewSeek=!0,this.avSeekVState=!0,this.seekTarget=i.seekTime,null!==this.audioWAudio&&void 0!==this.audioWAudio&&(this.audioWAudio.setVoice(0),this.audioWAudio.resetStartParam(),this.audioWAudio.stop()),this._avFeedData(i.seekTime),setTimeout((function(){t.yuvMaxTime=0,t._videoQueue.length=0,t.openFrameCall=!0,t.frameCallTag+=1,t._decVFrameIntervalFunc()}),1e3)}},{key:"setVoice",value:function(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e)}},{key:"cacheIsFull",value:function(){return this._videoQueue.length>=50}},{key:"_checkDisplaySize",value:function(e,t,i){var r=t-e,n=this.config.width+Math.ceil(r/2),a=t/this.config.width>i/this.config.height,s=(n/t).toFixed(2),o=(this.config.height/i).toFixed(2),l=a?s:o,f=this.config.fixed,u=f?n:parseInt(t*l),h=f?this.config.height:parseInt(i*l);if(this.canvas.offsetWidth!=u||this.canvas.offsetHeight!=h){var c=parseInt((this.canvasBox.offsetHeight-h)/2),d=parseInt((this.canvasBox.offsetWidth-u)/2);c=c<0?0:c,d=d<0?0:d,this.canvas.style.marginTop=c+"px",this.canvas.style.marginLeft=d+"px",this.canvas.style.width=u+"px",this.canvas.style.height=h+"px"}return this.isCheckDisplay=!0,[u,h]}},{key:"_createYUVCanvas",value:function(){this.canvasBox=document.querySelector("#"+this.config.playerId),this.canvasBox.style.overflow="hidden",this.canvas=document.createElement("canvas"),this.canvas.style.width=this.canvasBox.clientWidth+"px",this.canvas.style.height=this.canvasBox.clientHeight+"px",this.canvas.style.top="0px",this.canvas.style.left="0px",this.canvasBox.appendChild(this.canvas),this.yuv=l.setupCanvas(this.canvas,{preserveDrawingBuffer:!1})}},{key:"_avRecvPackets",value:function(){var e=this;this.bufObject.cleanPipeline(),null!==this.avRecvInterval&&(window.clearInterval(this.avRecvInterval),this.avRecvInterval=null),!0===this.config.checkProbe?this.avRecvInterval=window.setInterval((function(){a.cwrap("getSniffStreamPkg","number",["number"])(e.corePtr),e._avCheckRecvFinish()}),5):this.avRecvInterval=window.setInterval((function(){a.cwrap("getSniffStreamPkgNoCheckProbe","number",["number"])(e.corePtr),e._avCheckRecvFinish()}),5),this._avFeedData(0,!1)}},{key:"_avCheckRecvFinish",value:function(){this.config.playMode===h.PLAYER_MODE_VOD&&this.duration-this.getMaxPTS()=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),t.play(),window.clearInterval(i),i=null)}),10);return!0}},{key:"_afterAvFeedSeekToStartWithUnFinBuffer",value:function(e){var t=this,i=window.setInterval((function(){t._videoQueue.length,t._videoQueue.length>=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),!1===t.reFull?t.play():t.reFull=!1,window.clearInterval(i),i=null)}),10);return!0}},{key:"_avFeedData",value:function(e){var t=this;if(this.playVPipe.length=0,this.audioWAudio&&this.audioWAudio.cleanQueue(),e<=0&&!1===this.bufOK){var i=0;if(this.avFeedVideoInterval=window.setInterval((function(){var r=t.bufObject.videoBuffer.length;if(r-1>i||t.duration-t.getMaxPTS()0){for(var a=0;a0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.bufLastVDTS,t.bufObject.videoBuffer,t.playVPipe)}else t.config.playMode===h.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.duration,t.bufObject.videoBuffer,t.playVPipe);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===h.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithFinishedBuffer(e),t.avSeekVState=!1))}),5),void 0!==this.audioWAudio&&null!==this.audioWAudio&&this.config.ignoreAudio<1){var r=0;this.avFeedAudioInterval=window.setInterval((function(){var e=t.bufObject.audioBuffer.length;if(e-1>r||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer)}else t.config.playMode===h.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer)}),5)}}else{var n=this.bufObject.seekIDR(e),a=parseInt(n,10);this.playPTS=0;var o=a;if(this.avFeedVideoInterval=window.setInterval((function(){var i=t.bufObject.videoBuffer.length;if(i-1>o||t.duration-t.getMaxPTS()0){for(var n=0;n0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null)}else t.config.playMode===h.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===h.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithUnFinBuffer(e),t.avSeekVState=!1))}),5),this.audioWAudio&&this.config.ignoreAudio<1){var l=parseInt(e,10);this.avFeedAudioInterval=window.setInterval((function(){var e=t.bufObject.audioBuffer.length;if(e-1>l||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null)}else t.config.playMode===h.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null)}),5)}}}},{key:"_probeFinCallback",value:function(e,t,i,r,n,s,o,l,f){var c=this;this._createYUVCanvas(),h.V_CODEC_NAME_HEVC,this.config.fps=1*r,this.frameTime=1e3/this.config.fps,this.width=t,this.height=i,this.frameDur=1/this.config.fps,this.duration=e-this.frameDur,this.vCodecID=l,this.config.sampleRate=s,this.channels=o,this.audioIdx=n,this.duration<0&&(this.config.playMode=h.PLAYER_MODE_NOTIME_LIVE,this.frameTime,this.frameDur);for(var d=a.HEAPU8.subarray(f,f+10),_=0;_=0&&this.config.ignoreAudio<1?(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.audioWAudio=u({sampleRate:s,appendType:h.APPEND_TYPE_FRAME}),this.audioWAudio.setDurationMs(1e3*e),this.onLoadCache&&this.audioWAudio.setOnLoadCache((function(){if(c.retryAuSampleNo,c.retryAuSampleNo<=5){c.pause(),c.onLoadCache&&c.onLoadCache();var e=window.setInterval((function(){return c.retryAuSampleNo,c.audioWAudio.sampleQueue.length,c.audioWAudio.sampleQueue.length>2?(c.onLoadCacheFinshed&&c.onLoadCacheFinshed(),c.play(),c.retryAuSampleNo=0,window.clearInterval(e),void(e=null)):(c.retryAuSampleNo+=1,c.retryAuSampleNo>5?(c.play(),c.onLoadCacheFinshed&&c.onLoadCacheFinshed(),window.clearInterval(e),void(e=null)):void 0)}),1e3)}}))):this.audioNone=!0,this._avRecvPackets(),this._decVFrameIntervalFunc()),this.onProbeFinish&&this.onProbeFinish()}},{key:"_ptsFixed2",value:function(e){return Math.ceil(100*e)/100}},{key:"_naluCallback",value:function(e,t,i,r,n,s,o){var l=this._ptsFixed2(s),f=a.HEAPU8.subarray(e,e+t),u=new Uint8Array(f);this.bufObject.appendFrameWithDts(l,o,u,!0,i),this.bufLastVDTS=Math.max(o,this.bufLastVDTS),this.vCachePTS=Math.max(l,this.vCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS())}},{key:"_samplesCallback",value:function(e,t,i,r){}},{key:"_aacFrameCallback",value:function(e,t,i,r,n){var s=this._ptsFixed2(n);if(this.audioWAudio){var o=new Uint8Array(7+i),l=a.HEAPU8.subarray(e,e+7);o.set(l,0);var f=a.HEAPU8.subarray(t,t+i);o.set(f,7),this.bufObject.appendFrame(s,o,!1,!0),this.bufLastADTS=Math.max(s,this.bufLastADTS),this.aCachePTS=Math.max(s,this.aCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS())}}},{key:"_decVFrameIntervalFunc",value:function(){var e=this;null==this.decVFrameInterval&&(this.decVFrameInterval=window.setInterval((function(){if(e._videoQueue.length<50&&e.playVPipe.length>0){var t=e.playVPipe.shift(),i=t.data,r=a._malloc(i.length);a.HEAP8.set(i,r);var n=parseInt(1e3*t.pts,10),s=parseInt(1e3*t.dts,10);e.yuvMaxTime=Math.max(t.pts,e.yuvMaxTime),a.cwrap("decodeVideoFrame","number",["number","number","number","number","number"])(e.corePtr,r,i.length,n,s,e.frameCallTag),a._free(r),r=null}}),10))}},{key:"_frameCallback",value:function(e,t,i,r,n,s,o,f,u,h){if(this._videoQueue.length,!(!1===this.openFrameCall||h!==this.frameCallTag||u>this.yuvMaxTime+this.frameDur||this.isNewSeek&&this.seekTarget-u>3*this.frameDur)){var c=this._videoQueue.length;if(this.canvas.width==r&&this.canvas.height==f||(this.canvas.width=r,this.canvas.height=f,this.isCheckDisplay)||this._checkDisplaySize(o,r,f),!(this.playPTS>u)){var _=a.HEAPU8.subarray(e,e+r*f),p=a.HEAPU8.subarray(t,t+n*f/2),m=a.HEAPU8.subarray(i,i+s*f/2),b=new Uint8Array(_),v=new Uint8Array(p),y=new Uint8Array(m);this.config.readyShow&&(l.renderFrame(this.yuv,b,v,y,r,f),this.config.readyShow=!1,this.onReadyShowDone&&this.onReadyShowDone());var g=new d(b,v,y,r,n,s,o,f,u);if(c<=0||u>this._videoQueue[c-1].pts)this._videoQueue.push(g);else if(uthis._videoQueue[w].pts&&w+10&&void 0!==arguments[0]?arguments[0]:60,t={limit:e,yuvCache:[],appendCacheByCacheYuv:function(e){e.pts;return t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.OVERFLOW:(t.yuvCache.push(e),t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL)},getState:function(){return t.yuvCache.length<=0?CACHE_APPEND_STATUS_CODE.NULL:t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL},cleanPipeline:function(){t.yuvCache.length=0},vYuv:function(){return t.yuvCache.length<=0?null:t.yuvCache.shift()}};return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./cacheYuv":205}],205:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i>1;return n.indexOf(t)},GET_NALU_TYPE:function(e){var t=(126&e)>>1;if(t>=1&&t<=9)return r.DEFINE_P_FRAME;if(t>=16&&t<=21)return r.DEFINE_KEY_FRAME;var i=n.indexOf(t);return i>=0?n[i]:r.DEFINE_OTHERS_FRAME},PACK_NALU:function(e){var t=e.nalu,i=e.vlc.vlc;null==t.vps&&(t.vps=new Uint8Array);var r=new Uint8Array(t.vps.length+t.sps.length+t.pps.length+t.sei.length+i.length);return r.set(t.vps,0),r.set(t.sps,t.vps.length),r.set(t.pps,t.vps.length+t.sps.length),r.set(t.sei,t.vps.length+t.sps.length+t.pps.length),r.set(i,t.vps.length+t.sps.length+t.pps.length+t.sei.length),r}}},{"./hevc-header":206}],208:[function(e,t,i){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t0&&void 0!==arguments[0]&&arguments[0];null!=t&&(t.showScreen=e,t.canvas&&(e?t.canvas.setAttribute("hidden",!0):t.canvas.removeAttribute("hidden")))},setSize:function(e,i){t.config.width=e||u.DEFAULT_WIDTH,t.config.height=i||u.DEFAULT_HEIGHT},setFrameRate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:25;t.config.fps=e,t.config.frameDurMs=1e3/e},setDurationMs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e,0==t.config.audioNone&&t.audio.setDurationMs(e)},setPlayingCall:function(e){t.onPlayingTime=e},setVoice:function(e){t.realVolume=e,0==t.config.audioNone&&t.audio.setVoice(t.realVolume)},isPlayingState:function(){return t.isPlaying||t.isCaching===u.CACHE_WITH_PLAY_SIGN},appendAACFrame:function(e){t.audio.addSample(e),t.aCachePTS=Math.max(e.pts,t.aCachePTS)},appendHevcFrame:function(e){var i;t.config.appendHevcType==u.APPEND_TYPE_STREAM?t.stream=new Uint8Array((i=r(t.stream)).concat.apply(i,r(e))):t.config.appendHevcType==u.APPEND_TYPE_FRAME&&(t.frameList.push(e),t.vCachePTS=Math.max(e.pts,t.vCachePTS))},getCachePTS:function(){return Math.max(t.vCachePTS,t.aCachePTS)},endAudio:function(){0==t.config.audioNone&&t.audio.stop()},cleanSample:function(){0==t.config.audioNone&&t.audio.cleanQueue()},cleanVideoQueue:function(){t.config.appendHevcType==u.APPEND_TYPE_STREAM?t.stream=new Uint8Array:t.config.appendHevcType==u.APPEND_TYPE_FRAME&&(t.frameList=[],t.frameList.length=0)},cleanCacheYUV:function(){t.cacheYuvBuf.cleanPipeline()},pause:function(){t.loop&&window.clearInterval(t.loop),t.loop=null,0==t.config.audioNone&&t.audio.pause(),t.isPlaying=!1,t.isCaching===u.CACHE_WITH_PLAY_SIGN&&(t.isCaching=u.CACHE_WITH_NOPLAY_SIGN)},checkFinished:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.PLAYER_MODE_VOD;return e==u.PLAYER_MODE_VOD&&t.cacheYuvBuf.yuvCache.length<=0&&(t.videoPTS.toFixed(1)>=(t.durationMs-t.config.frameDurMs)/1e3||t.noCacheFrame>=10)&&(null!=t.onPlayingFinish&&(u.PLAYER_MODE_VOD,t.frameList.length,t.cacheYuvBuf.yuvCache.length,t.videoPTS.toFixed(1),t.durationMs,t.config.frameDurMs,t.noCacheFrame,t.onPlayingFinish()),!0)},clearAllCache:function(){t.nowPacket=null,t.vCachePTS=0,t.aCachePTS=0,t.cleanSample(),t.cleanVideoQueue(),t.cleanCacheYUV()},seek:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.isPlaying;t.pause(),t.stopCacheThread(),t.clearAllCache(),e&&e(),t.isNewSeek=!0,t.flushDecoder=1,t.videoPTS=parseInt(i.seekTime);var n={seekPos:i.seekTime||-1,mode:i.mode||u.PLAYER_MODE_VOD,accurateSeek:i.accurateSeek||!0,seekEvent:i.seekEvent||!0,realPlay:r};t.cacheThread(),t.play(n)},getNalu1Packet:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=null,r=-1;if(t.config.appendHevcType==u.APPEND_TYPE_STREAM)i=t.nextNalu();else{if(t.config.appendHevcType!=u.APPEND_TYPE_FRAME)return null;var n=t.frameList.shift();if(!n)return null;i=n.data,r=n.pts,e&&(t.videoPTS=r)}return{nalBuf:i,pts:r}},decodeNalu1Frame:function(e,i){var r=n._malloc(e.length);n.HEAP8.set(e,r);var a=parseInt(1e3*i);n.cwrap("decodeCodecContext","number",["number","number","number","number","number"])(t.vcodecerPtr,r,e.length,a,t.flushDecoder);return t.flushDecoder=0,n._free(r),!1},cacheThread:function(){t.cacheLoop=window.setInterval((function(){if(t.cacheYuvBuf.getState()!=CACHE_APPEND_STATUS_CODE.FULL){var e=t.getNalu1Packet(!1);if(null!=e){var i=e.nalBuf,r=e.pts;t.decodeNalu1Frame(i,r,!0)}}}),10)},stopCacheThread:function(){null!==t.cacheLoop&&(window.clearInterval(t.cacheLoop),t.cacheLoop=null)},loadCache:function(){if(!(t.frameList.length<=3)){var e=t.isPlaying;if(t.cacheYuvBuf.yuvCache.length<=3){t.pause(),null!=t.onLoadCache&&t.onLoadCache(),t.isCaching=e?u.CACHE_WITH_PLAY_SIGN:u.CACHE_WITH_NOPLAY_SIGN;var i=t.frameList.length>30?30:t.frameList.length;null===t.cacheInterval&&(t.cacheInterval=window.setInterval((function(){t.cacheYuvBuf.yuvCache.length>=i&&(null!=t.onLoadCacheFinshed&&t.onLoadCacheFinshed(),window.clearInterval(t.cacheInterval),t.cacheInterval=null,t.isCaching===u.CACHE_WITH_PLAY_SIGN&&t.play(t.playParams),t.isCaching=u.CACHE_NO_LOADCACHE)}),40))}}},playFunc:function(){var e=!1;if(t.playParams.seekEvent||a.GetMsTime()-t.calcuteStartTime>=t.frameTime-t.preCostTime){e=!0;var i=!0;if(t.calcuteStartTime=a.GetMsTime(),t.config.audioNone)t.playFrameYUV(i,t.playParams.accurateSeek);else{t.fix_poc_err_skip>0&&(t.fix_poc_err_skip--,i=!1);var r=t.videoPTS-t.audio.getAlignVPTS();if(r>0)return void(t.playParams.seekEvent&&!t.config.audioNone&&t.audio.setVoice(0));if(i){if(!(i=-1*r<=1*t.frameTimeSec)){for(var n=parseInt(r/t.frameTimeSec),s=0;s=i&&(t.playFrameYUV(!0,t.playParams.accurateSeek),i+=1)}),1)}else t.videoPTS>=t.playParams.seekPos&&!t.isNewSeek||0===t.playParams.seekPos||0===t.playParams.seekPos?(t.frameTime=1e3/t.config.fps,t.frameTimeSec=t.frameTime/1e3,0==t.config.audioNone&&t.audio.play(),t.realVolume=t.config.audioNone?0:t.audio.voice,t.playParams.seekEvent&&(t.fix_poc_err_skip=10),t.loop=window.setInterval((function(){var e=a.GetMsTime();t.playFunc(),t.preCostTime=a.GetMsTime()-e}),1)):(t.loop=window.setInterval((function(){t.playFrameYUV(!1,t.playParams.accurateSeek),t.checkFinished(t.playParams.mode)?(window.clearInterval(t.loop),t.loop=null):t.videoPTS>=t.playParams.seekPos&&(window.clearInterval(t.loop),t.loop=null,t.play(t.playParams))}),1),t.isNewSeek=!1)},stop:function(){t.release(),n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr),t.stream=new Uint8Array},release:function(){return t.endAudio(),t.cacheLoop&&window.clearInterval(t.cacheLoop),t.cacheLoop=null,t.loop&&window.clearInterval(t.loop),t.loop=null,t.pause(),n.cwrap("release","number",["number"])(t.vcodecerPtr),t.stream=null,t.frameList.length=0,t.durationMs=-1,t.videoPTS=0,t.isPlaying=!1,!0},nextNalu:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(t.stream.length<=4)return!1;for(var i=-1,r=0;r=t.stream.length){if(-1==i)return!1;var n=t.stream.subarray(i);return t.stream=new Uint8Array,n}var a="0 0 1"==t.stream.slice(0,3).join(" "),s="0 0 0 1"==t.stream.slice(0,4).join(" ");if(a||s){if(-1==i)i=r;else{if(e<=1){var o=t.stream.subarray(i,r);return t.stream=t.stream.subarray(r),o}e-=1}r+=3}}return!1},decodeSendPacket:function(e){var i=n._malloc(e.length);n.HEAP8.set(e,i);var r=n.cwrap("decodeSendPacket","number",["number","number","number"])(t.vcodecerPtr,i,e.length);return n._free(i),r},decodeRecvFrame:function(){return n.cwrap("decodeRecv","number",["number"])(t.vcodecerPtr)},playFrameYUV:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.cacheYuvBuf.vYuv();if(null==r)return t.noCacheFrame+=1,e&&!t.playParams.seekEvent&&t.loadCache(),!1;t.noCacheFrame=0;var n=r.pts;return t.videoPTS=n,(!e&&i||e)&&e&&t.drawImage(r.width,r.height,r.imageBufferY,r.imageBufferB,r.imageBufferR),e&&!t.playParams.seekEvent&&t.isPlaying&&t.loadCache(),!0},drawImage:function(e,i,r,n,a){if(t.canvas.width===e&&t.canvas.height==i||(t.canvas.width=e,t.canvas.height=i),t.showScreen&&null!=t.onRender)t.onRender(e,i,r,n,a);else{if(!t.isCheckDisplay)t.checkDisplaySize(e,i);var s=e*i,o=e/2*(i/2),l=new Uint8Array(s+2*o);l.set(r,0),l.set(n,s),l.set(a,s+o),f.renderFrame(t.yuv,r,n,a,e,i)}},debugYUV:function(e){t.debugYUVSwitch=!0,t.debugID=e},checkDisplaySize:function(e,i){var r=e/t.config.width>i/t.config.height,n=(t.config.width/e).toFixed(2),a=(t.config.height/i).toFixed(2),s=r?n:a,o=t.config.fixed,l=o?t.config.width:parseInt(e*s),f=o?t.config.height:parseInt(i*s);if(t.canvas.offsetWidth!=l||t.canvas.offsetHeight!=f){var u=parseInt((t.canvasBox.offsetHeight-f)/2),h=parseInt((t.canvasBox.offsetWidth-l)/2);t.canvas.style.marginTop=u+"px",t.canvas.style.marginLeft=h+"px",t.canvas.style.width=l+"px",t.canvas.style.height=f+"px"}return t.isCheckDisplay=!0,[l,f]},makeWasm:function(){if(null!=t.config.token){t.vcodecerPtr=n.cwrap("registerPlayer","number",["string","string"])(t.config.token,h.PLAYER_VERSION);var e=n.addFunction((function(e,i,r,a,s,o,f,u,h){var c=n.HEAPU8.subarray(e,e+a*u),d=n.HEAPU8.subarray(i,i+s*u/2),_=n.HEAPU8.subarray(r,r+o*u/2),p=new Uint8Array(c),m=new Uint8Array(d),b=new Uint8Array(_),v=1*h/1e3,y=new l.CacheYuvStruct(v,a,u,p,m,b);t.cacheYuvBuf.appendCacheByCacheYuv(y)}));n.cwrap("setCodecType","number",["number","number","number"])(t.vcodecerPtr,t.config.videoCodec,e);n.cwrap("initMissile","number",["number"])(t.vcodecerPtr);n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr)}},makeIt:function(){var e=document.querySelector("div#"+t.config.playerId),i=document.createElement("canvas");i.style.width=e.clientWidth+"px",i.style.height=e.clientHeight+"px",i.style.top="0px",i.style.left="0px",e.appendChild(i),t.canvasBox=e,t.canvas=i,t.yuv=f.setupCanvas(i,{preserveDrawingBuffer:!1}),0==t.config.audioNone&&(t.audio=s({sampleRate:t.config.sampleRate,appendType:t.config.appendHevcType})),t.isPlayLoadingFinish=1}};return t.makeWasm(),t.makeIt(),t.cacheThread(),t}},{"../consts":198,"../render-engine/webgl-420p":220,"../version":223,"./audio-core":199,"./av-common":201,"./cache":204,"./cacheYuv":205,"./missile.js":1}],209:[function(e,t,i){"use strict";var r=e("./bufferFrame");t.exports=function(){var e={videoBuffer:[],audioBuffer:[],idrIdxBuffer:[],appendFrame:function(t,i){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=new r.BufferFrame(t,a,i,n),o=parseInt(t);return n?(e.videoBuffer.length-1>=o?e.videoBuffer[o].push(s):e.videoBuffer.push([s]),a&&!e.idrIdxBuffer.includes(t)&&e.idrIdxBuffer.push(t)):e.audioBuffer.length-1>=o&&null!=e.audioBuffer[o]&&null!=e.audioBuffer[o]?e.audioBuffer[o]&&e.audioBuffer[o].push(s):e.audioBuffer.push([s]),!0},appendFrameWithDts:function(t,i,n){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=r.ConstructWithDts(t,i,s,n,a),l=parseInt(i);return a?(e.videoBuffer.length-1>=l?e.videoBuffer[l].push(o):e.videoBuffer.push([o]),s&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=l&&null!=e.audioBuffer[l]&&null!=e.audioBuffer[l]?e.audioBuffer[l]&&e.audioBuffer[l].push(o):e.audioBuffer.push([o]),!0},appendFrameByBufferFrame:function(t){var i=t.pts,r=parseInt(i);return t.video?(e.videoBuffer.length-1>=r?e.videoBuffer[r].push(t):e.videoBuffer.push([t]),isKey&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=r?e.audioBuffer[r].push(t):e.audioBuffer.push([t]),!0},cleanPipeline:function(){e.videoBuffer.length=0,e.audioBuffer.length=0},vFrame:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.videoBuffer.length-1))return e.videoBuffer[t]},aFrame:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.audioBuffer.length-1))return e.audioBuffer[t]},seekIDR:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e.idrIdxBuffer,e.videoBuffer,t<0)return null;if(e.idrIdxBuffer.includes(t))return t;for(var i=0;it||0===i&&e.idrIdxBuffer[i]>=t){for(var r=1;r>=0;r--){var n=i-r;if(n>=0)return e.idrIdxBuffer[n],e.idrIdxBuffer[n]}return e.idrIdxBuffer[i],j,e.idrIdxBuffer[i]}}};return e}},{"./bufferFrame":210}],210:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&i.extensionInfo.vHeight>0&&(i.size.width=i.extensionInfo.vWidth,i.size.height=i.extensionInfo.vHeight)),i.mediaInfo.duration,null!=i.onDemuxed&&i.onDemuxed(i.onReadyOBJ);for(var e=!1;;){var r=i.mpegTsObj.readPacket();if(r.size<=0)break;var n=r.dtime>0?r.dtime:r.ptime;if(!(n<0)){if(0==r.type){n<=i.vPreFramePTS&&(e=!0);var a=l.PACK_NALU(r.layer),o=1==r.keyframe,f=1==e?n+i.vStartTime:n,u=new s.BufferFrame(f,o,a,!0);i.bufObject.appendFrame(u.pts,u.data,!0,u.isKey),i.vPreFramePTS=f,null!=i.onSamples&&i.onSamples(i.onReadyOBJ,u)}else if(n<=i.aPreFramePTS&&(e=!0),"aac"==i.mediaInfo.aCodec)for(var h=r.data,c=0;c=3?(i._onTsReady(e),window.clearInterval(i.timerTsWasm),i.timerTsWasm=null):(i.mpegTsWasmRetryLoadTimes+=1,i.mpegTsObj.initDemuxer())}),3e3)}},{key:"_onTsReady",value:function(e){var t=this;t.hls.fetchM3u8(e),t.mpegTsWasmState=!0,t.timerFeed=window.setInterval((function(){if(t.tsList.length>0&&0==t.lockWait.state)try{var e=t.tsList.shift();if(null!=e){var i=e.streamURI,r=e.streamDur;t.lockWait.state=!0,t.lockWait.lockMember.dur=r,t.mpegTsObj.isLive=t.hls.isLive(),t.mpegTsObj.demuxURL(i)}else console.error("_onTsReady need wait ")}catch(e){console.error("onTsReady ERROR:",e),t.lockWait.state=!1}}),50)}},{key:"release",value:function(){this.timerFeed&&window.clearInterval(this.timerFeed),this.timerTsWasm&&window.clearInterval(this.timerTsWasm)}},{key:"bindReady",value:function(e){this.onReadyOBJ=e}},{key:"popBuffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1===e?t+1>this.bufObject.videoBuffer.length?null:this.bufObject.vFrame(t):2===e?t+1>this.bufObject.audioBuffer.length?null:this.bufObject.aFrame(t):void 0}},{key:"getVLen",value:function(){return this.bufObject.videoBuffer.length}},{key:"getALen",value:function(){return this.bufObject.audioBuffer.length}},{key:"getLastIdx",value:function(){return this.bufObject.videoBuffer.length-1}},{key:"getALastIdx",value:function(){return this.bufObject.audioBuffer.length-1}},{key:"getACodec",value:function(){return this.aCodec}},{key:"getDurationMs",value:function(){return this.durationMs}},{key:"getFPS",value:function(){return this.fps}},{key:"getSampleRate",value:function(){return this.sampleRate}},{key:"getSampleChannel",value:function(){return this.aChannel}},{key:"getSize",value:function(){return this.size}},{key:"seek",value:function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}}}])&&r(t.prototype,i),u&&r(t,u),e}();i.M3u8=u},{"../consts":198,"../decoder/hevc-imp":207,"./buffer":209,"./bufferFrame":210,"./m3u8base":212,"./mpegts/mpeg.js":216}],212:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i ",t),setTimeout((function(){i.fetchM3u8(e)}),500)}))}},{key:"_uriParse",value:function(e){this._preURI="";var t=e.split("//"),i=null,r=null;if(t.length<1)return!1;t.length>1?(i=t[0],r=t[1].split("/"),this._preURI=i+"//"):r=t[0].split("/");for(var n=0;n_&&(o=_);var p=r[f+=1],m=null;m=p.indexOf("http")>=0?p:this._preURI+p,this._slices.indexOf(m)<0&&(this._slices.push(m),this._slices[this._slices.length-1],null!=this.onTransportStream&&this.onTransportStream(m,_))}}}if(this._slices.length>s.hlsSliceLimit&&this._type==n.PLAYER_IN_TYPE_M3U8_LIVE&&(this._slices=this._slices.slice(-1*s.hlsSliceLimit)),null!=this.onFinished){var b={type:this._type,duration:-1};this.onFinished(b)}return o}},{key:"_readTag",value:function(e){var t=s.tagParse.exec(e);return null!==t?{key:t[1],value:t[3]}:null}}])&&r(t.prototype,i),o&&r(t,o),e}();i.M3u8Base=o},{"../consts":198}],213:[function(e,t,i){"use strict";var r=e("mp4box"),n=e("../decoder/hevc-header"),a=e("../decoder/hevc-imp"),s=e("./buffer"),o=e("../consts"),l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12,Reserved:13,"frequency is written explictly":15},f=function(e){for(var t=[],i=0;i1&&void 0!==arguments[1]&&arguments[1],i=null;return t?((i=e)[0]=n.DEFINE_STARTCODE[0],i[1]=n.DEFINE_STARTCODE[1],i[2]=n.DEFINE_STARTCODE[2],i[3]=n.DEFINE_STARTCODE[3]):((i=new Uint8Array(n.DEFINE_STARTCODE.length+e.length)).set(n.DEFINE_STARTCODE,0),i.set(e,n.DEFINE_STARTCODE.length)),i},u.prototype.setAACAdts=function(e){var t=null,i=this.aacProfile,r=l[this.sampleRate],n=new Uint8Array(7),a=n.length+e.length;return n[0]=255,n[1]=241,n[2]=(i-1<<6)+(r<<2)+0,n[3]=128+(a>>11),n[4]=(2047&a)>>3,n[5]=31+((7&a)<<5),n[6]=252,(t=new Uint8Array(a)).set(n,0),t.set(e,n.length),t},u.prototype.demux=function(){var e=this;e.seekPos=-1,e.mp4boxfile=r.createFile(),e.movieInfo=null,e.videoCodec=null,e.durationMs=-1,e.fps=-1,e.sampleRate=-1,e.aacProfile=2,e.size={width:-1,height:-1},e.bufObject=s(),e.audioNone=!1,e.naluHeader={vps:null,sps:null,pps:null,sei:null},e.mp4boxfile.onError=function(e){},this.mp4boxfile.onReady=function(t){for(var i in e.movieInfo=t,t.tracks)"VideoHandler"!==t.tracks[i].name&&"video"!==t.tracks[i].type||(t.tracks[i].codec,t.tracks[i].codec.indexOf("hev")>=0||t.tracks[i].codec.indexOf("hvc")>=0?e.videoCodec=o.CODEC_H265:t.tracks[i].codec.indexOf("avc")>=0&&(e.videoCodec=o.CODEC_H264));var r=-1;if(r=t.videoTracks[0].samples_duration/t.videoTracks[0].timescale,e.durationMs=1e3*r,e.fps=t.videoTracks[0].nb_samples/r,e.seekDiffTime=1/e.fps,e.size.width=t.videoTracks[0].track_width,e.size.height=t.videoTracks[0].track_height,t.audioTracks.length>0){e.sampleRate=t.audioTracks[0].audio.sample_rate;var n=t.audioTracks[0].codec.split(".");e.aacProfile=n[n.length-1]}else e.audioNone=!0;null!=e.onMp4BoxReady&&e.onMp4BoxReady(e.videoCodec),e.videoCodec===o.CODEC_H265?(e.initializeAllSourceBuffers(),e.mp4boxfile.start()):(e.videoCodec,o.CODEC_H264)},e.mp4boxfile.onSamples=function(t,i,r){var s=window.setInterval((function(){for(var i=0;i3?e.naluHeader.sei=e.setStartCode(m[3][0].data,!1):e.naluHeader.sei=new Uint8Array,e.naluHeader}else e.videoCodec==o.CODEC_H264&&(e.naluHeader.vps=new Uint8Array,e.naluHeader.sps=e.setStartCode(d.SPS[0].nalu,!1),e.naluHeader.pps=e.setStartCode(d.PPS[0].nalu,!1),e.naluHeader.sei=new Uint8Array);u[4].toString(16),e.naluHeader.vps[4].toString(16),f(e.naluHeader.vps),f(u);var b=e.setStartCode(u.subarray(0,e.naluHeader.vps.length),!0);if(f(b),u[4]===e.naluHeader.vps[4]){var v=e.naluHeader.vps.length+4,y=e.naluHeader.vps.length+e.naluHeader.sps.length+4,g=e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4;if(e.naluHeader.sei.length<=0&&e.naluHeader.sps.length>0&&u[v]===e.naluHeader.sps[4]&&e.naluHeader.pps.length>0&&u[y]===e.naluHeader.pps[4]&&78===u[g]){u[e.naluHeader.vps.length+4],e.naluHeader.sps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+4],e.naluHeader.pps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4];for(var w=0,E=0;E4&&u[4]===e.naluHeader.sei[4]){var C=u.subarray(0,10),S=new Uint8Array(e.naluHeader.vps.length+C.length);S.set(C,0),S.set(e.naluHeader.vps,C.length),S[3]=1,e.naluHeader.vps=null,e.naluHeader.vps=new Uint8Array(S),S=null,C=null,(u=u.subarray(10))[4],e.naluHeader.vps[4],e.naluHeader.vps}else if(0===e.naluHeader.sei.length&&78===u[4]){u=e.setStartCode(u,!0);for(var j=0,T=0;T1&&void 0!==arguments[1]?arguments[1]:0;return e.fileStart=t,this.mp4boxfile.appendBuffer(e)},u.prototype.finishBuffer=function(){this.mp4boxfile.flush()},u.prototype.play=function(){},u.prototype.getVideoCoder=function(){return this.videoCodec},u.prototype.getDurationMs=function(){return this.durationMs},u.prototype.getFPS=function(){return this.fps},u.prototype.getSampleRate=function(){return this.sampleRate},u.prototype.getSize=function(){return this.size},u.prototype.seek=function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}},u.prototype.popBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0},u.prototype.addBuffer=function(e){var t=e.id;this.mp4boxfile.setExtractionOptions(t)},u.prototype.initializeAllSourceBuffers=function(){if(this.movieInfo){for(var e=this.movieInfo,t=0;t>5)}},{key:"sliceAACFrames",value:function(e,t){for(var i=[],r=e,n=0;n>4==15){var a=this._getPktLen(t[n+3],t[n+4],t[n+5]);if(a<=0)continue;var s=t.subarray(n,n+a),o=new Uint8Array(a);o.set(s,0),i.push({ptime:r,data:o}),r+=this.frameDurSec,n+=a}else n+=1;return i}}])&&r(t.prototype,i),n&&r(t,n),e}();i.AACDecoder=n},{}],216:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i ",e),r=null})).catch((function(i){console.error("_demuxerTsInit ERROR fetch ERROR ==> ",i),t._releaseOffset(),t.onDemuxedFailed&&t.onDemuxedFailed(i,e)}))}},{key:"_releaseOffset",value:function(){void 0!==this.offsetDemux&&null!==this.offsetDemux&&(n._free(this.offsetDemux),this.offsetDemux=null)}},{key:"_demuxCore",value:function(e){this._releaseOffset(),this._refreshDemuxer(),this.offsetDemux=n._malloc(e.length),n.HEAP8.set(e,this.offsetDemux);var t=n.cwrap("demuxBox","number",["number","number","number"])(this.offsetDemux,e.length,this.isLive);n._free(this.offsetDemux),this.offsetDemux=null,t>=0&&(this._setMediaInfo(),this._setExtensionInfo(),null!=this.onDemuxed&&this.onDemuxed())}},{key:"_setMediaInfo",value:function(){var e=n.cwrap("getMediaInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],o=n.HEAPF64[e/8+1+1],l=n.HEAPF64[e/8+1+1+1],f=n.HEAPF64[e/8+1+1+1+1],u=n.HEAPU32[e/4+2+2+2+2+2];this.mediaAttr.vFps=r,this.mediaAttr.vGop=u,this.mediaAttr.vDuration=o,this.mediaAttr.aDuration=l,this.mediaAttr.duration=f;var h=n.cwrap("getAudioCodecID","number",[])();h>=0?(this.mediaAttr.aCodec=s.CODEC_OFFSET_TABLE[h],this.mediaAttr.sampleRate=t>0?t:s.DEFAULT_SAMPLERATE,this.mediaAttr.sampleChannel=i>=0?i:s.DEFAULT_CHANNEL):(this.mediaAttr.sampleRate=0,this.mediaAttr.sampleChannel=0,this.mediaAttr.audioNone=!0);var c=n.cwrap("getVideoCodecID","number",[])();c>=0&&(this.mediaAttr.vCodec=s.CODEC_OFFSET_TABLE[c]),null==this.aacDec?this.aacDec=new a.AACDecoder(this.mediaAttr):this.aacDec.updateConfig(this.mediaAttr)}},{key:"_setExtensionInfo",value:function(){var e=n.cwrap("getExtensionInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1];this.extensionInfo.vWidth=t,this.extensionInfo.vHeight=i}},{key:"readMediaInfo",value:function(){return this.mediaAttr}},{key:"readExtensionInfo",value:function(){return this.extensionInfo}},{key:"readAudioNone",value:function(){return this.mediaAttr.audioNone}},{key:"_readLayer",value:function(){var e={vps:null,sps:null,pps:null,sei:null},t={vlc:null},i=n.cwrap("getSPSLen","number",[])(),r=n.cwrap("getSPS","number",[])();e.sps=new Uint8Array(i),e.sps.set(n.HEAPU8.subarray(r,r+i),0);var a=n.cwrap("getPPSLen","number",[])(),o=n.cwrap("getPPS","number",[])();e.pps=new Uint8Array(a),e.pps.set(n.HEAPU8.subarray(o,o+a),0);var l=n.cwrap("getSEILen","number",[])(),f=n.cwrap("getSEI","number",[])();e.sei=new Uint8Array(l),e.sei.set(n.HEAPU8.subarray(f,f+l),0);var u=n.cwrap("getVLCLen","number",[])(),h=n.cwrap("getVLC","number",[])();if(t.vlc=new Uint8Array(u),t.vlc.set(n.HEAPU8.subarray(h,h+u),0),this.mediaAttr.vCodec==s.DEF_HEVC||this.mediaAttr.vCodec==s.DEF_H265){var c=n.cwrap("getVPSLen","number",[])(),d=n.cwrap("getVPS","number",[])();e.vps=new Uint8Array(c),e.vps.set(n.HEAPU8.subarray(d,d+c),0)}else this.mediaAttr.vCodec==s.DEF_AVC||(this.mediaAttr.vCodec,s.DEF_H264);return{nalu:e,vlc:t}}},{key:"readPacket",value:function(){var e=n.cwrap("getPacket","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],a=n.HEAPF64[e/8+1+1],o=n.HEAPU32[e/4+1+1+2+2],l=n.HEAPU32[e/4+1+1+2+2+1],f=n.HEAPU8.subarray(l,l+i),u=this._readLayer();return{type:t,size:i,ptime:r,dtime:a,keyframe:o,src:f,data:1==t&&this.mediaAttr.aCodec==s.DEF_AAC?this.aacDec.sliceAACFrames(r,f):f,layer:u}}},{key:"_refreshDemuxer",value:function(){this._releaseDemuxer(),this._initDemuxer()}},{key:"_initDemuxer",value:function(){n.cwrap("initTsMissile","number",[])(),n.cwrap("initializeDemuxer","number",[])()}},{key:"_releaseDemuxer",value:function(){n.cwrap("exitTsMissile","number",[])()}}])&&r(i.prototype,o),l&&r(i,l),e}();i.MPEG_JS=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../decoder/missile.js":1,"./consts":214,"./decoder/aac":215}],217:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&e.extensionInfo.vHeight>0&&(e.size.width=e.extensionInfo.vWidth,e.size.height=e.extensionInfo.vHeight);for(var t=null;!((t=e.mpegTsObj.readPacket()).size<=0);){var i=t.dtime;if(0==t.type){var r=s.PACK_NALU(t.layer),n=1==t.keyframe;e.bufObject.appendFrame(i,r,!0,n)}else if("aac"==e.mediaInfo.aCodec)for(var a=t.data,o=0;o0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0}},{key:"getACodec",value:function(){return this.aCodec}},{key:"getAudioNone",value:function(){return this.mpegTsObj.mediaAttr.audioNone}},{key:"getDurationMs",value:function(){return this.durationMs}},{key:"getFPS",value:function(){return this.fps}},{key:"getSampleRate",value:function(){return this.sampleRate}},{key:"getSize",value:function(){return this.size}},{key:"seek",value:function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}}}])&&r(t.prototype,i),o&&r(t,o),e}();i.MpegTs=o},{"../decoder/hevc-imp":207,"./buffer":209,"./mpegts/mpeg.js":216}],218:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];this.player.setScreen(e)}},{key:"play",value:function(){if(this.playParam.videoCodec===c.CODEC_H265){var e={seekPos:this._getSeekTarget(),mode:this.playMode,accurateSeek:this.configFormat.accurateSeek,seekEvent:!1,realPlay:!0};this.player.play(e)}else this.player.play();return!0}},{key:"pause",value:function(){return this.player.pause(),!0}},{key:"isPlaying",value:function(){return this.player.isPlayingState()}},{key:"setVoice",value:function(e){if(e<0)return!1;this.volume=e,this.player.setVoice(e)}},{key:"getVolume",value:function(){return this.volume}},{key:"mediaInfo",value:function(){return{meta:this.playParam,videoType:this.playMode}}},{key:"_seekHLS",value:function(e,t,i){setTimeout((function(){t.player.getCachePTS(),t.player.getCachePTS()>e?i():t._seekHLS(e,t,i)}),100)}},{key:"seek",value:function(e){var t=this;this.seekTarget=e,this.onSeekStart&&this.onSeekStart(e),this.timerFeed&&(window.clearInterval(this.timerFeed),this.timerFeed=null);var i=this._getSeekTarget();return this.playParam.videoCodec===c.CODEC_H264&&this.configFormat.type==c.PLAYER_IN_TYPE_MP4?(this.player.seek(e),this.onSeekFinish&&this.onSeekFinish()):this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?(this.pause(),this._seekHLS(e,this,(function(){t.player.seek((function(){}),{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek})}))):this._seekHLS(e,this,(function(){t.player.seek((function(){t.configFormat.type==c.PLAYER_IN_TYPE_MP4?t.mp4Obj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_TS||t.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?t.mpegTsObj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(t.hlsObj.onSamples=null,t.hlsObj.seek(e));var i,r=(i=0,i=t.configFormat.accurateSeek?e:t._getBoxBufSeekIDR(),parseInt(i)),n=parseInt(t._getBoxBufSeekIDR())||0;t._avFeedMP4Data(n,r)}),{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek})})),!0}},{key:"fullScreen",value:function(){this.autoScreenClose=!0;var e=document.querySelector("#"+this.configFormat.playerId),t=e.getElementsByTagName("canvas")[0];e.style.width=this.screenW+"px",e.style.height=this.screenH+"px";var i=this._checkScreenDisplaySize(this.screenW,this.screenH,this.playParam.size.width,this.playParam.size.height);t.style.marginTop=i[0]+"px",t.style.marginLeft=i[1]+"px",t.style.width=i[2]+"px",t.style.height=i[3]+"px",this._requestFullScreen(e)}},{key:"closeFullScreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!1===e&&(this.autoScreenClose=!1,this._exitFull());var t=document.querySelector("#"+this.configFormat.playerId),i=t.getElementsByTagName("canvas")[0];t.style.width=this.configFormat.playerW+"px",t.style.height=this.configFormat.playerH+"px";var r=this._checkScreenDisplaySize(this.configFormat.playerW,this.configFormat.playerH,this.playParam.size.width,this.playParam.size.height);i.style.marginTop=r[0]+"px",i.style.marginLeft=r[1]+"px",i.style.width=r[2]+"px",i.style.height=r[3]+"px"}},{key:"_checkScreenDisplaySize",value:function(e,t,i,r){var n=i/e>r/t,a=(e/i).toFixed(2),s=(t/r).toFixed(2),o=n?a:s,l=this.fixed?e:parseInt(i*o),f=this.fixed?t:parseInt(r*o);return[parseInt((t-f)/2),parseInt((e-l)/2),l,f]}},{key:"_isFullScreen",value:function(){var e=document.fullscreenElement||document.mozFullscreenElement||document.webkitFullscreenElement;return document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled,null!=e}},{key:"_requestFullScreen",value:function(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullScreen()}},{key:"_exitFull",value:function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}},{key:"_durationText",value:function(e){if(e<0)return"Play";var t=Math.round(e);return Math.floor(t/3600)+":"+Math.floor(t%3600/60)+":"+Math.floor(t%60)}},{key:"_getSeekTarget",value:function(){return this.configFormat.accurateSeek?this.seekTarget:this._getBoxBufSeekIDR()}},{key:"_getBoxBufSeekIDR",value:function(){return this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.mp4Obj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this.mpegTsObj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this.hlsObj.seekPos:void 0}},{key:"_playControl",value:function(){this.isPlaying()?this.pause():this.play()}},{key:"_avFeedMP4Data",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=parseInt(this.playParam.durationMs/1e3);this.player.clearAllCache(),this.timerFeed=window.setInterval((function(){var a=null,s=null,o=!0,l=!0;if(e.configFormat.type==c.PLAYER_IN_TYPE_MP4?(a=e.mp4Obj.popBuffer(1,t),s=e.mp4Obj.audioNone?null:e.mp4Obj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_TS||e.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?(a=e.mpegTsObj.popBuffer(1,t),s=e.mpegTsObj.getAudioNone()?null:e.mpegTsObj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(a=e.hlsObj.popBuffer(1,t),s=e.hlsObj.audioNone?null:e.hlsObj.popBuffer(2,i),t=e.hlsObj.getLastIdx()&&(o=!1),i=e.hlsObj.getALastIdx()&&(l=!1)),!0===o&&null!=a)for(var f=0;fn)return window.clearInterval(e.timerFeed),e.timerFeed=null,e.player.vCachePTS,e.player.aCachePTS,void(null!=r&&r())}),5)}},{key:"_makeMP4Player",value:function(){null!=this.configFormat.extInfo.core&&null!==this.configFormat.extInfo.core&&this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?this._cDemuxDecoderEntry():this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.configFormat.extInfo.moovStartFlag?this._mp4EntryVodStream():this._mp4Entry():this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this._mpegTsEntry():this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this._m3u8Entry():this.configFormat.type===c.PLAYER_IN_TYPE_RAW_265&&this._raw265Entry()}},{key:"_makeMP4PlayerViewEvent",value:function(e,t,i,r){var a=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=this;if(this.playParam.durationMs=e,this.playParam.fps=t,this.playParam.sampleRate=i,this.playParam.size=r,this.playParam.audioNone=s,this.playParam.videoCodec=o||c.CODEC_H265,this.playParam,(this.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&this.hlsConf.hlsType==c.PLAYER_IN_TYPE_M3U8_LIVE||this.configFormat.type==c.PLAYER_IN_TYPE_RAW_265)&&(this.playMode=c.PLAYER_MODE_NOTIME_LIVE),l.configFormat.extInfo.autoCrop){var f=document.querySelector("#"+this.configFormat.playerId),u=r.width/r.height,h=this.configFormat.playerW/this.configFormat.playerH;u>h?f.style.height=this.configFormat.playerW/u+"px":u>1,a>>1,i),e.v.fill(n>>1,a>>1,r),e.drawArrays(e.TRIANGLE_STRIP,0,4)},setupCanvas:function(e,t){var i=e.getContext("webgl")||e.getContext("experimental-webgl");if(!i)return i;var n=i.createProgram(),a=["attribute highp vec4 aVertexPosition;","attribute vec2 aTextureCoord;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = aVertexPosition;"," vTextureCoord = aTextureCoord;","}"].join("\n"),s=i.createShader(i.VERTEX_SHADER);i.shaderSource(s,a),i.compileShader(s);var o=["precision highp float;","varying lowp vec2 vTextureCoord;","uniform sampler2D YTexture;","uniform sampler2D UTexture;","uniform sampler2D VTexture;","const mat4 YUV2RGB = mat4","("," 1.1643828125, 0, 1.59602734375, -.87078515625,"," 1.1643828125, -.39176171875, -.81296875, .52959375,"," 1.1643828125, 2.017234375, 0, -1.081390625,"," 0, 0, 0, 1",");","void main(void) {"," gl_FragColor = vec4( texture2D(YTexture, vTextureCoord).x, texture2D(UTexture, vTextureCoord).x, texture2D(VTexture, vTextureCoord).x, 1) * YUV2RGB;","}"].join("\n"),l=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(l,o),i.compileShader(l),i.attachShader(n,s),i.attachShader(n,l),i.linkProgram(n),i.useProgram(n),i.getProgramParameter(n,i.LINK_STATUS);var f=i.getAttribLocation(n,"aVertexPosition");i.enableVertexAttribArray(f);var u=i.getAttribLocation(n,"aTextureCoord");i.enableVertexAttribArray(u);var h=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,h),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0]),i.STATIC_DRAW),i.vertexAttribPointer(f,3,i.FLOAT,!1,0,0);var c=i.createBuffer();return i.bindBuffer(i.ARRAY_BUFFER,c),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),i.STATIC_DRAW),i.vertexAttribPointer(u,2,i.FLOAT,!1,0,0),i.y=new r(i),i.u=new r(i),i.v=new r(i),i.y.bind(0,n,"YTexture"),i.u.bind(1,n,"UTexture"),i.v.bind(2,n,"VTexture"),i}}},{}],221:[function(e,t,i){(function(e){"use strict";e.STATIC_MEM_wasmDecoderState=-1,e.STATICE_MEM_playerCount=-1,e.STATICE_MEM_playerIndexPtr=0}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],222:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i1&&(m=i.argv[1].replace(/\\/g,"/")),p=i.argv.slice(2),void 0!==t&&(t.exports=d),i.on("uncaughtException",function(e){if(!(e instanceof Sa))throw e;}),i.on("unhandledRejection",at),b=function b(e){i.exit(e);},d.inspect=function(){return"[Emscripten Module object]";};else if(E)"undefined"!=typeof read&&(C=function C(e){return read(e);}),S=function S(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(X("object"===u(t=read(e,"binary"))),t);},"undefined"!=typeof scriptArgs?p=scriptArgs:void 0!==arguments&&(p=arguments),"function"==typeof quit&&(b=function b(e){quit(e);}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print);else{if(!v&&!y)throw new Error("environment detection error");y?A=self.location.href:document.currentScript&&(A=document.currentScript.src),A=0!==A.indexOf("blob:")?A.substr(0,A.lastIndexOf("/")+1):"",C=function C(e){var t=new XMLHttpRequest();return t.open("GET",e,!1),t.send(null),t.responseText;},y&&(S=function S(e){var t=new XMLHttpRequest();return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response);}),function(e,t,i){var r=new XMLHttpRequest();r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):i();},r.onerror=i,r.send(null);},function(e){document.title=e;};}var M=d.print||console.log.bind(console),k=d.printErr||console.warn.bind(console);for(c in _){_.hasOwnProperty(c)&&(d[c]=_[c]);}function P(e){X(Te);var t=pe[Te>>2],i=t+e+15&-16;return i>ei()&&at("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly"),pe[Te>>2]=i,t;}function I(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 X(t%8==0,"getNativeTypeSize invalid bits "+t+", type "+e),t/8;}return 0;}}function R(e){R.shown||(R.shown={}),R.shown[e]||(R.shown[e]=1,k(e));}_=null,d.arguments&&(p=d.arguments),Object.getOwnPropertyDescriptor(d,"arguments")||Object.defineProperty(d,"arguments",{configurable:!0,get:function get(){at("Module.arguments has been replaced with plain arguments_");}}),d.thisProgram&&(m=d.thisProgram),Object.getOwnPropertyDescriptor(d,"thisProgram")||Object.defineProperty(d,"thisProgram",{configurable:!0,get:function get(){at("Module.thisProgram has been replaced with plain thisProgram");}}),d.quit&&(b=d.quit),Object.getOwnPropertyDescriptor(d,"quit")||Object.defineProperty(d,"quit",{configurable:!0,get:function get(){at("Module.quit has been replaced with plain quit_");}}),X(void 0===d.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.read,"Module.read option was removed (modify read_ in JS)"),X(void 0===d.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),X(void 0===d.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),X(void 0===d.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),Object.getOwnPropertyDescriptor(d,"read")||Object.defineProperty(d,"read",{configurable:!0,get:function get(){at("Module.read has been replaced with plain read_");}}),Object.getOwnPropertyDescriptor(d,"readAsync")||Object.defineProperty(d,"readAsync",{configurable:!0,get:function get(){at("Module.readAsync has been replaced with plain readAsync");}}),Object.getOwnPropertyDescriptor(d,"readBinary")||Object.defineProperty(d,"readBinary",{configurable:!0,get:function get(){at("Module.readBinary has been replaced with plain readBinary");}}),Ea=wa=ga=function ga(){at("cannot use the stack before compiled code is ready to run, and has provided stack access");};var U={"f64-rem":function f64Rem(e,t){return e%t;},"debugger":function _debugger(){}},D=1,F=new Array(35);function O(e,t){X(void 0!==e);for(var i=0;i<35;i++){if(!F[i])return F[i]=e,D+i;}throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.";}var L,B,N,z=0,H=function H(){return z;};function V(e,t,i,r){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":ce[e>>0]=t;break;case"i16":de[e>>1]=t;break;case"i32":pe[e>>2]=t;break;case"i64":ft=[t>>>0,(lt=t,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[e>>2]=ft[0],pe[e+4>>2]=ft[1];break;case"float":be[e>>2]=t;break;case"double":ve[e>>3]=t;break;default:at("invalid type for setValue: "+i);}}d.wasmBinary&&(L=d.wasmBinary),Object.getOwnPropertyDescriptor(d,"wasmBinary")||Object.defineProperty(d,"wasmBinary",{configurable:!0,get:function get(){at("Module.wasmBinary has been replaced with plain wasmBinary");}}),d.noExitRuntime&&(B=d.noExitRuntime),Object.getOwnPropertyDescriptor(d,"noExitRuntime")||Object.defineProperty(d,"noExitRuntime",{configurable:!0,get:function get(){at("Module.noExitRuntime has been replaced with plain noExitRuntime");}}),"object"!==("undefined"==typeof WebAssembly?"undefined":u(WebAssembly))&&at("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Y=new WebAssembly.Table({initial:4416,element:"anyfunc"}),q=!1;function X(e,t){e||at("Assertion failed: "+t);}function W(e){var t=d["_"+e];return X(t,"Cannot call unknown function "+e+", make sure it is exported"),t;}function G(e,t,i,r,n){var a={string:function string(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);ne(e,t=ga(i),i);}return t;},array:function array(e){var t=ga(e.length);return le(e,t),t;}};var s=W(e),o=[],l=0;if(X("array"!==t,'Return type should not be "array".'),r)for(var f=0;f>2]=0;}for(l=s+a;r>0]=0;}return s;}if("i8"===o)return e.subarray||e.slice?he.set(e,s):he.set(new Uint8Array(e),s),s;for(var f,u,c,h=0;h=r);){++n;}if(n-t>16&&e.subarray&&ee)return ee.decode(e.subarray(t,n));for(var a="";t>10,56320|1023&f);}}else a+=String.fromCharCode((31&s)<<6|o);}else a+=String.fromCharCode(s);}return a;}function ie(e,t){return e?te(he,e,t):"";}function re(e,t,i,r){if(!(r>0))return 0;for(var n=i,a=i+r-1,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(o<=127){if(i>=a)break;t[i++]=o;}else if(o<=2047){if(i+1>=a)break;t[i++]=192|o>>6,t[i++]=128|63&o;}else if(o<=65535){if(i+2>=a)break;t[i++]=224|o>>12,t[i++]=128|o>>6&63,t[i++]=128|63&o;}else{if(i+3>=a)break;o>=2097152&&R("Invalid Unicode code point 0x"+o.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[i++]=240|o>>18,t[i++]=128|o>>12&63,t[i++]=128|o>>6&63,t[i++]=128|63&o;}}return t[i]=0,i-n;}function ne(e,t,i){return X("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),re(e,he,t,i);}function ae(e){for(var t=0,i=0;i=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++i)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4;}return t;}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function se(e){var t=ae(e)+1,i=ya(t);return i&&re(e,ce,i,t),i;}function oe(e){var t=ae(e)+1,i=ga(t);return re(e,ce,i,t),i;}function le(e,t){X(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),ce.set(e,t);}function fe(e,t,i){for(var r=0;r>0]=e.charCodeAt(r);}i||(ce[t>>0]=0);}var ue,ce,he,de,_e,pe,me,be,ve,ye=16384,ge=65536;function we(e,t){return e%t>0&&(e+=t-e%t),e;}function Ee(e){ue=e,d.HEAP8=ce=new Int8Array(e),d.HEAP16=de=new Int16Array(e),d.HEAP32=pe=new Int32Array(e),d.HEAPU8=he=new Uint8Array(e),d.HEAPU16=_e=new Uint16Array(e),d.HEAPU32=me=new Uint32Array(e),d.HEAPF32=be=new Float32Array(e),d.HEAPF64=ve=new Float64Array(e);}var Ce=1127120,Se=637e4,je=637e4,Te=1126896;X(Ce%16==0,"stack must start aligned"),X(je%16==0,"heap must start aligned");var Ae=5242880;d.TOTAL_STACK&&X(Ae===d.TOTAL_STACK,"the stack size can no longer be determined at runtime");var xe=d.TOTAL_MEMORY||1073741824;function Me(){X(0==(3&Se)),me[(Se>>2)-1]=34821223,me[(Se>>2)-2]=2310721022,pe[0]=1668509029;}function ke(){var e=me[(Se>>2)-1],t=me[(Se>>2)-2];34821223==e&&2310721022==t||at("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==pe[0]&&at("Runtime error: The application has corrupted its heap memory area (address zero)!");}function Pe(e){at("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(Se-Ea()+e)+" bytes available!");}function Ie(e,t){var i="";for(var r in kr){var n=kr[r];n[e]&&(i+='as sig "'+r+'" pointing to function '+n[e]+", ");}at("Invalid function pointer "+e+" called with signature '"+t+"'. 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). This pointer might make sense in another type signature: "+i);}function Re(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?d.dynCall_v(i):d.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg);}else t();}}Object.getOwnPropertyDescriptor(d,"TOTAL_MEMORY")||Object.defineProperty(d,"TOTAL_MEMORY",{configurable:!0,get:function get(){at("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY");}}),X(xe>=Ae,"TOTAL_MEMORY should be larger than TOTAL_STACK, was "+xe+"! (TOTAL_STACK="+Ae+")"),X("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"),(N=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:xe/ge}))&&(ue=N.buffer),X((xe=ue.byteLength)%ge==0),Ee(ue),pe[Te>>2]=je,function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!";}();var Ue=[],De=[],Fe=[],Oe=[],Le=!1,Be=!1;function Ne(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;){qe(d.preRun.shift());}Re(Ue);}function ze(){ke(),X(!Le),Le=!0,d.noFSInit||Ut.init.initialized||Ut.init(),At.init(),Re(De);}function He(){ke(),Ut.ignorePermissions=!1,Re(Fe);}function Ve(){ke(),Be=!0;}function Ye(){if(ke(),d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;){Xe(d.postRun.shift());}Re(Oe);}function qe(e){Ue.unshift(e);}function Xe(e){Oe.unshift(e);}X(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),X(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),X(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),X(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var We=Math.abs,Ge=Math.ceil,Ke=Math.floor,Qe=Math.min,Ze=Math.trunc,Je=0,$e=null,et=null,tt={};function it(e){for(var t=e;;){if(!tt[e])return e;e=t+Math.random();}return e;}function rt(e){Je++,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(X(!tt[e]),tt[e]=1,null===$e&&"undefined"!=typeof setInterval&&($e=setInterval(function(){if(q)return clearInterval($e),void($e=null);var e=!1;for(var t in tt){e||(e=!0,k("still waiting on run dependencies:")),k("dependency: "+t);}e&&k("(end of list)");},1e4))):k("warning: run dependency added without ID");}function nt(e){if(Je--,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(X(tt[e]),delete tt[e]):k("warning: run dependency removed without ID"),0==Je&&(null!==$e&&(clearInterval($e),$e=null),et)){var t=et;et=null,t();}}function at(e){d.onAbort&&d.onAbort(e),M(e+=""),k(e),q=!0,1;throw"abort("+e+") at "+gt();}d.preloadedImages={},d.preloadedAudios={},h||qe(function(){"undefined"!=typeof SharedArrayBuffer&&(rt("pthreads"),PThread.allocateUnusedWorkers(5,function(){nt("pthreads");}));});var st="data:application/octet-stream;base64,";function ot(e){return String.prototype.startsWith?e.startsWith(st):0===e.indexOf(st);}var lt,ft,ut="missile-v20210925.wasm";function ct(){try{if(L)return new Uint8Array(L);if(S)return S(ut);throw"both async and sync fetching of the wasm failed";}catch(e){at(e);}}function ht(){return L||!v&&!y||"function"!=typeof fetch?new Promise(function(e,t){e(ct());}):fetch(ut,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ut+"'";return e.arrayBuffer();})["catch"](function(){return ct();});}function dt(){var e={env:ca,wasi_unstable:ca,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:U};function t(e,t){var i=e.exports;d.asm=i,nt("wasm-instantiate");}rt("wasm-instantiate");var i=d;function r(e){X(d===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance);}function n(t){return ht().then(function(t){return WebAssembly.instantiate(t,e);}).then(t,function(e){k("failed to asynchronously prepare wasm: "+e),at(e);});}if(d.instantiateWasm)try{return d.instantiateWasm(e,t);}catch(e){return k("Module.instantiateWasm callback failed with error: "+e),!1;}return function(){if(L||"function"!=typeof WebAssembly.instantiateStreaming||ot(ut)||"function"!=typeof fetch)return n(r);fetch(ut,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,e).then(r,function(e){k("wasm streaming compile failed: "+e),k("falling back to ArrayBuffer instantiation"),n(r);});});}(),{};}ot(ut)||(ut=x(ut)),d.asm=dt;var _t=[function(){"undefined"!=typeof window?window.dispatchEvent(new CustomEvent("wasmLoaded")):r.onWASMLoaded&&r.onWASMLoaded();}];function pt(e){return _t[e]();}De.push({func:function func(){_a();}});var mt=1127104;function bt(e){return R("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e;}function vt(e){return e.replace(/\b__Z[\w\d_]+/g,function(e){var t=bt(e);return e===t?e:t+" ["+e+"]";});}function yt(){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 gt(){var e=yt();return d.extraStackTrace&&(e+="\n"+d.extraStackTrace()),vt(e);}X(mt%8==0);var wt={};function Et(e){var t,i;Et.called?(i=pe[e>>2],t=pe[i>>2]):(Et.called=!0,wt.USER="web_user",wt.LOGNAME="web_user",wt.PATH="/",wt.PWD="/",wt.HOME="/home/web_user",wt.LANG=("object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",wt._=m,t=$(1024),i=$(256),pe[i>>2]=t,pe[e>>2]=i);var r=[],n=0;for(var a in wt){if("string"==typeof wt[a]){var s=a+"="+wt[a];r.push(s),n+=s.length;}}if(n>1024)throw new Error("Environment size exceeded TOTAL_ENV_SIZE!");for(var o=0;o>2]=t,t+=s.length+1;}pe[i+4*r.length>>2]=0;}function Ct(){}function St(e){return d.___errno_location?pe[d.___errno_location()>>2]=e:k("failed to set errno from JS"),e;}var jt={splitPath:function splitPath(e){return /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);},normalizeArray:function normalizeArray(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--);}if(t)for(;i;i--){e.unshift("..");}return e;},normalize:function normalize(e){var t="/"===e.charAt(0),i="/"===e.substr(-1);return(e=jt.normalizeArray(e.split("/").filter(function(e){return!!e;}),!t).join("/"))||t||(e="."),e&&i&&(e+="/"),(t?"/":"")+e;},dirname:function dirname(e){var t=jt.splitPath(e),i=t[0],r=t[1];return i||r?(r&&(r=r.substr(0,r.length-1)),i+r):".";},basename:function basename(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1);},extname:function extname(e){return jt.splitPath(e)[3];},join:function join(){var e=Array.prototype.slice.call(arguments,0);return jt.normalize(e.join("/"));},join2:function join2(e,t){return jt.normalize(e+"/"+t);}},Tt={resolve:function resolve(){for(var e="",t=!1,i=arguments.length-1;i>=-1&&!t;i--){var r=i>=0?arguments[i]:Ut.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t="/"===r.charAt(0);}return(t?"/":"")+(e=jt.normalizeArray(e.split("/").filter(function(e){return!!e;}),!t).join("/"))||".";},relative:function relative(e,t){function i(e){for(var t=0;t=0&&""===e[i];i--){;}return t>i?[]:e.slice(t,i-t+1);}e=Tt.resolve(e).substr(1),t=Tt.resolve(t).substr(1);for(var r=i(e.split("/")),n=i(t.split("/")),a=Math.min(r.length,n.length),s=a,o=0;o0?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=Ni(t,!0);}return e.input.shift();},put_char:function put_char(e,t){null===t||10===t?(M(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t);},flush:function flush(e){e.output&&e.output.length>0&&(M(te(e.output,0)),e.output=[]);}},default_tty1_ops:{put_char:function put_char(e,t){null===t||10===t?(k(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t);},flush:function flush(e){e.output&&e.output.length>0&&(k(te(e.output,0)),e.output=[]);}}},xt={ops_table:null,mount:function mount(e){return xt.createNode(null,"/",16895,0);},createNode:function createNode(e,t,i,r){if(Ut.isBlkdev(i)||Ut.isFIFO(i))throw new Ut.ErrnoError(63);xt.ops_table||(xt.ops_table={dir:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,lookup:xt.node_ops.lookup,mknod:xt.node_ops.mknod,rename:xt.node_ops.rename,unlink:xt.node_ops.unlink,rmdir:xt.node_ops.rmdir,readdir:xt.node_ops.readdir,symlink:xt.node_ops.symlink},stream:{llseek:xt.stream_ops.llseek}},file:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:{llseek:xt.stream_ops.llseek,read:xt.stream_ops.read,write:xt.stream_ops.write,allocate:xt.stream_ops.allocate,mmap:xt.stream_ops.mmap,msync:xt.stream_ops.msync}},link:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,readlink:xt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:Ut.chrdev_stream_ops}});var n=Ut.createNode(e,t,i,r);return Ut.isDir(n.mode)?(n.node_ops=xt.ops_table.dir.node,n.stream_ops=xt.ops_table.dir.stream,n.contents={}):Ut.isFile(n.mode)?(n.node_ops=xt.ops_table.file.node,n.stream_ops=xt.ops_table.file.stream,n.usedBytes=0,n.contents=null):Ut.isLink(n.mode)?(n.node_ops=xt.ops_table.link.node,n.stream_ops=xt.ops_table.link.stream):Ut.isChrdev(n.mode)&&(n.node_ops=xt.ops_table.chrdev.node,n.stream_ops=xt.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n),n;},getFileDataAsRegularArray:function getFileDataAsRegularArray(e){if(e.contents&&e.contents.subarray){for(var t=[],i=0;i=t)){t=Math.max(t,i*(i<1048576?2:1.125)|0),0!=i&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0);}},resizeFileStorage:function resizeFileStorage(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var i=e.contents;return e.contents=new Uint8Array(new ArrayBuffer(t)),i&&e.contents.set(i.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=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-n,r);if(X(s>=0),s>8&&a.subarray)t.set(a.subarray(n,n+s),i);else for(var o=0;o0||n+rs.timestamp)&&(n.push(i),r++);});var a=[];if(Object.keys(t.entries).forEach(function(i){t.entries[i];e.entries[i]||(a.push(i),r++);}),!r)return i(null);var s=!1,o=("remote"===e.type?e.db:t.db).transaction([Mt.DB_STORE_NAME],"readwrite"),l=o.objectStore(Mt.DB_STORE_NAME);function f(e){if(e&&!s)return s=!0,i(e);}o.onerror=function(e){f(this.error),e.preventDefault();},o.oncomplete=function(e){s||i(null);},n.sort().forEach(function(e){"local"===t.type?Mt.loadRemoteEntry(l,e,function(t,i){if(t)return f(t);Mt.storeLocalEntry(e,i,f);}):Mt.loadLocalEntry(e,function(t,i){if(t)return f(t);Mt.storeRemoteEntry(l,e,i,f);});}),a.sort().reverse().forEach(function(e){"local"===t.type?Mt.removeLocalEntry(e,f):Mt.removeRemoteEntry(l,e,f);});}},kt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Pt={isWindows:!1,staticInit:function staticInit(){Pt.isWindows=!!i.platform.match(/^win/);var e=i.binding("constants");e.fs&&(e=e.fs),Pt.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 bufferFrom(e){return n.alloc?n.from(e):new n(e);},convertNodeCode:function convertNodeCode(e){var t=e.code;return X(t in kt),kt[t];},mount:function mount(e){return X(w),Pt.createNode(null,"/",Pt.getMode(e.opts.root),0);},createNode:function createNode(e,t,i,r){if(!Ut.isDir(i)&&!Ut.isFile(i)&&!Ut.isLink(i))throw new Ut.ErrnoError(28);var n=Ut.createNode(e,t,i);return n.node_ops=Pt.node_ops,n.stream_ops=Pt.stream_ops,n;},getMode:function getMode(e){var t;try{t=Li.lstatSync(e),Pt.isWindows&&(t.mode=t.mode|(292&t.mode)>>2);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}return t.mode;},realPath:function realPath(e){for(var t=[];e.parent!==e;){t.push(e.name),e=e.parent;}return t.push(e.mount.opts.root),t.reverse(),jt.join.apply(null,t);},flagsForNode:function flagsForNode(e){e&=-2097153,e&=-2049,e&=-32769,e&=-524289;var t=0;for(var i in Pt.flagsForNodeMap){e&i&&(t|=Pt.flagsForNodeMap[i],e^=i);}if(e)throw new Ut.ErrnoError(28);return t;},node_ops:{getattr:function getattr(e){var t,i=Pt.realPath(e);try{t=Li.lstatSync(i);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}return Pt.isWindows&&!t.blksize&&(t.blksize=4096),Pt.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 setattr(e,t){var i=Pt.realPath(e);try{if(void 0!==t.mode&&(Li.chmodSync(i,t.mode),e.mode=t.mode),void 0!==t.timestamp){var r=new Date(t.timestamp);Li.utimesSync(i,r,r);}void 0!==t.size&&Li.truncateSync(i,t.size);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},lookup:function lookup(e,t){var i=jt.join2(Pt.realPath(e),t),r=Pt.getMode(i);return Pt.createNode(e,t,r);},mknod:function mknod(e,t,i,r){var n=Pt.createNode(e,t,i,r),a=Pt.realPath(n);try{Ut.isDir(n.mode)?Li.mkdirSync(a,n.mode):Li.writeFileSync(a,"",{mode:n.mode});}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}return n;},rename:function rename(e,t,i){var r=Pt.realPath(e),n=jt.join2(Pt.realPath(t),i);try{Li.renameSync(r,n);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},unlink:function unlink(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.unlinkSync(i);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},rmdir:function rmdir(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.rmdirSync(i);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},readdir:function readdir(e){var t=Pt.realPath(e);try{return Li.readdirSync(t);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},symlink:function symlink(e,t,i){var r=jt.join2(Pt.realPath(e),t);try{Li.symlinkSync(i,r);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},readlink:function readlink(e){var t=Pt.realPath(e);try{return t=Li.readlinkSync(t),t=Bi.relative(Bi.resolve(e.mount.opts.root),t);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}}},stream_ops:{open:function open(e){var t=Pt.realPath(e.node);try{Ut.isFile(e.node.mode)&&(e.nfd=Li.openSync(t,Pt.flagsForNode(e.flags)));}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},close:function close(e){try{Ut.isFile(e.node.mode)&&e.nfd&&Li.closeSync(e.nfd);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},read:function read(e,t,i,r,n){if(0===r)return 0;try{return Li.readSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n);}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},write:function write(e,t,i,r,n){try{return Li.writeSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n);}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},llseek:function llseek(e,t,i){var r=t;if(1===i)r+=e.position;else if(2===i&&Ut.isFile(e.node.mode))try{r+=Li.fstatSync(e.nfd).size;}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e));}if(r<0)throw new Ut.ErrnoError(28);return r;}}},It={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function mount(e){X(y),It.reader||(It.reader=new FileReaderSync());var t=It.createNode(null,"/",It.DIR_MODE,0),i={};function r(e){for(var r=e.split("/"),n=t,a=0;a=e.node.size)return 0;var a=e.node.contents.slice(n,n+r),s=It.reader.readAsArrayBuffer(a);return t.set(new Uint8Array(s),i),a.size;},write:function write(e,t,i,r,n){throw new Ut.ErrnoError(29);},llseek:function llseek(e,t,i){var r=t;if(1===i?r+=e.position:2===i&&Ut.isFile(e.node.mode)&&(r+=e.node.size),r<0)throw new Ut.ErrnoError(28);return r;}}},Rt={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Ut={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 handleFSError(e){if(!(e instanceof Ut.ErrnoError))throw e+" : "+gt();return St(e.errno);},lookupPath:function lookupPath(e,t){if(t=t||{},!(e=Tt.resolve(Ut.cwd(),e)))return{path:"",node:null};var i={follow_mount:!0,recurse_count:0};for(var r in i){void 0===t[r]&&(t[r]=i[r]);}if(t.recurse_count>8)throw new Ut.ErrnoError(32);for(var n=jt.normalizeArray(e.split("/").filter(function(e){return!!e;}),!1),a=Ut.root,s="/",o=0;o40)throw new Ut.ErrnoError(32);}}return{path:s,node:a};},getPath:function getPath(e){for(var t;;){if(Ut.isRoot(e)){var i=e.mount.mountpoint;return t?"/"!==i[i.length-1]?i+"/"+t:i+t:i;}t=t?e.name+"/"+t:e.name,e=e.parent;}},hashName:function hashName(e,t){for(var i=0,r=0;r>>0)%Ut.nameTable.length;},hashAddNode:function hashAddNode(e){var t=Ut.hashName(e.parent.id,e.name);e.name_next=Ut.nameTable[t],Ut.nameTable[t]=e;},hashRemoveNode:function hashRemoveNode(e){var t=Ut.hashName(e.parent.id,e.name);if(Ut.nameTable[t]===e)Ut.nameTable[t]=e.name_next;else for(var i=Ut.nameTable[t];i;){if(i.name_next===e){i.name_next=e.name_next;break;}i=i.name_next;}},lookupNode:function lookupNode(e,t){var i=Ut.mayLookup(e);if(i)throw new Ut.ErrnoError(i,e);for(var r=Ut.hashName(e.id,t),n=Ut.nameTable[r];n;n=n.name_next){var a=n.name;if(n.parent.id===e.id&&a===t)return n;}return Ut.lookup(e,t);},createNode:function createNode(e,t,i,r){if(!Ut.FSNode){Ut.FSNode=function(e,t,i,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ut.nextInode++,this.name=t,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=r;},Ut.FSNode.prototype={};Object.defineProperties(Ut.FSNode.prototype,{read:{get:function get(){return 365==(365&this.mode);},set:function set(e){e?this.mode|=365:this.mode&=-366;}},write:{get:function get(){return 146==(146&this.mode);},set:function set(e){e?this.mode|=146:this.mode&=-147;}},isFolder:{get:function get(){return Ut.isDir(this.mode);}},isDevice:{get:function get(){return Ut.isChrdev(this.mode);}}});}var n=new Ut.FSNode(e,t,i,r);return Ut.hashAddNode(n),n;},destroyNode:function destroyNode(e){Ut.hashRemoveNode(e);},isRoot:function isRoot(e){return e===e.parent;},isMountpoint:function isMountpoint(e){return!!e.mounted;},isFile:function isFile(e){return 32768==(61440&e);},isDir:function isDir(e){return 16384==(61440&e);},isLink:function isLink(e){return 40960==(61440&e);},isChrdev:function isChrdev(e){return 8192==(61440&e);},isBlkdev:function isBlkdev(e){return 24576==(61440&e);},isFIFO:function isFIFO(e){return 4096==(61440&e);},isSocket:function isSocket(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 modeStringToFlags(e){var t=Ut.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t;},flagsToPermissionString:function flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t;},nodePermissions:function nodePermissions(e,t){return Ut.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2;},mayLookup:function mayLookup(e){var t=Ut.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2);},mayCreate:function mayCreate(e,t){try{Ut.lookupNode(e,t);return 20;}catch(e){}return Ut.nodePermissions(e,"wx");},mayDelete:function mayDelete(e,t,i){var r;try{r=Ut.lookupNode(e,t);}catch(e){return e.errno;}var n=Ut.nodePermissions(e,"wx");if(n)return n;if(i){if(!Ut.isDir(r.mode))return 54;if(Ut.isRoot(r)||Ut.getPath(r)===Ut.cwd())return 10;}else if(Ut.isDir(r.mode))return 31;return 0;},mayOpen:function mayOpen(e,t){return e?Ut.isLink(e.mode)?32:Ut.isDir(e.mode)&&("r"!==Ut.flagsToPermissionString(t)||512&t)?31:Ut.nodePermissions(e,Ut.flagsToPermissionString(t)):44;},MAX_OPEN_FDS:4096,nextfd:function nextfd(e,t){e=e||0,t=t||Ut.MAX_OPEN_FDS;for(var i=e;i<=t;i++){if(!Ut.streams[i])return i;}throw new Ut.ErrnoError(33);},getStream:function getStream(e){return Ut.streams[e];},createStream:function createStream(e,t,i){Ut.FSStream||(Ut.FSStream=function(){},Ut.FSStream.prototype={},Object.defineProperties(Ut.FSStream.prototype,{object:{get:function get(){return this.node;},set:function set(e){this.node=e;}},isRead:{get:function get(){return 1!=(2097155&this.flags);}},isWrite:{get:function get(){return 0!=(2097155&this.flags);}},isAppend:{get:function get(){return 1024&this.flags;}}}));var r=new Ut.FSStream();for(var n in e){r[n]=e[n];}e=r;var a=Ut.nextfd(t,i);return e.fd=a,Ut.streams[a]=e,e;},closeStream:function closeStream(e){Ut.streams[e]=null;},chrdev_stream_ops:{open:function open(e){var t=Ut.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e);},llseek:function llseek(){throw new Ut.ErrnoError(70);}},major:function major(e){return e>>8;},minor:function minor(e){return 255&e;},makedev:function makedev(e,t){return e<<8|t;},registerDevice:function registerDevice(e,t){Ut.devices[e]={stream_ops:t};},getDevice:function getDevice(e){return Ut.devices[e];},getMounts:function getMounts(e){for(var t=[],i=[e];i.length;){var r=i.pop();t.push(r),i.push.apply(i,r.mounts);}return t;},syncfs:function syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Ut.syncFSRequests++,Ut.syncFSRequests>1&&Ut.syncFSRequests;var i=Ut.getMounts(Ut.root.mount),r=0;function n(e){return X(Ut.syncFSRequests>0),Ut.syncFSRequests--,t(e);}function a(e){if(e)return a.errored?void 0:(a.errored=!0,n(e));++r>=i.length&&n(null);}i.forEach(function(t){if(!t.type.syncfs)return a(null);t.type.syncfs(t,e,a);});},mount:function mount(e,t,i){var r,n="/"===i,a=!i;if(n&&Ut.root)throw new Ut.ErrnoError(10);if(!n&&!a){var s=Ut.lookupPath(i,{follow_mount:!1});if(i=s.path,r=s.node,Ut.isMountpoint(r))throw new Ut.ErrnoError(10);if(!Ut.isDir(r.mode))throw new Ut.ErrnoError(54);}var o={type:e,opts:t,mountpoint:i,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,n?Ut.root=l:r&&(r.mounted=o,r.mount&&r.mount.mounts.push(o)),l;},unmount:function unmount(e){var t=Ut.lookupPath(e,{follow_mount:!1});if(!Ut.isMountpoint(t.node))throw new Ut.ErrnoError(28);var i=t.node,r=i.mounted,n=Ut.getMounts(r);Object.keys(Ut.nameTable).forEach(function(e){for(var t=Ut.nameTable[e];t;){var i=t.name_next;-1!==n.indexOf(t.mount)&&Ut.destroyNode(t),t=i;}}),i.mounted=null;var a=i.mount.mounts.indexOf(r);X(-1!==a),i.mount.mounts.splice(a,1);},lookup:function lookup(e,t){return e.node_ops.lookup(e,t);},mknod:function mknod(e,t,i){var r=Ut.lookupPath(e,{parent:!0}).node,n=jt.basename(e);if(!n||"."===n||".."===n)throw new Ut.ErrnoError(28);var a=Ut.mayCreate(r,n);if(a)throw new Ut.ErrnoError(a);if(!r.node_ops.mknod)throw new Ut.ErrnoError(63);return r.node_ops.mknod(r,n,t,i);},create:function create(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Ut.mknod(e,t,0);},mkdir:function mkdir(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Ut.mknod(e,t,0);},mkdirTree:function mkdirTree(e,t){for(var i=e.split("/"),r="",n=0;nthis.length-1||e<0)){var t=e%this.chunkSize,i=e/this.chunkSize|0;return this.getter(i)[t];}},a.prototype.setDataGetter=function(e){this.getter=e;},a.prototype.cacheLength=function(){var e=new XMLHttpRequest();if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,s=1048576;n||(s=r);var o=this;o.setDataGetter(function(e){var t=e*s,n=(e+1)*s-1;if(n=Math.min(n,r-1),void 0===o.chunks[e]&&(o.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var n=new XMLHttpRequest();if(n.open("GET",i,!1),r!==s&&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 "+i+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):Ni(n.responseText||"",!0);}(t,n)),void 0===o.chunks[e])throw new Error("doXHR failed!");return o.chunks[e];}),!a&&r||(s=r=1,r=this.getter(0).length,s=r),this._length=r,this._chunkSize=s,this.lengthKnown=!0;},"undefined"!=typeof XMLHttpRequest){if(!y)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new a();Object.defineProperties(s,{length:{get:function get(){return this.lengthKnown||this.cacheLength(),this._length;}},chunkSize:{get:function get(){return this.lengthKnown||this.cacheLength(),this._chunkSize;}}});var o={isDevice:!1,contents:s};}else o={isDevice:!1,url:i};var l=Ut.createFile(e,t,o,r,n);o.contents?l.contents=o.contents:o.url&&(l.contents=null,l.url=o.url),Object.defineProperties(l,{usedBytes:{get:function get(){return this.contents.length;}}});var f={};return Object.keys(l.stream_ops).forEach(function(e){var t=l.stream_ops[e];f[e]=function(){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);return t.apply(null,arguments);};}),f.read=function(e,t,i,r,n){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);var a=e.node.contents;if(n>=a.length)return 0;var s=Math.min(a.length-n,r);if(X(s>=0),a.slice)for(var o=0;o>2]=r.dev,pe[i+4>>2]=0,pe[i+8>>2]=r.ino,pe[i+12>>2]=r.mode,pe[i+16>>2]=r.nlink,pe[i+20>>2]=r.uid,pe[i+24>>2]=r.gid,pe[i+28>>2]=r.rdev,pe[i+32>>2]=0,ft=[r.size>>>0,(lt=r.size,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+40>>2]=ft[0],pe[i+44>>2]=ft[1],pe[i+48>>2]=4096,pe[i+52>>2]=r.blocks,pe[i+56>>2]=r.atime.getTime()/1e3|0,pe[i+60>>2]=0,pe[i+64>>2]=r.mtime.getTime()/1e3|0,pe[i+68>>2]=0,pe[i+72>>2]=r.ctime.getTime()/1e3|0,pe[i+76>>2]=0,ft=[r.ino>>>0,(lt=r.ino,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+80>>2]=ft[0],pe[i+84>>2]=ft[1],0;},doMsync:function doMsync(e,t,i,r){var n=new Uint8Array(he.subarray(e,e+i));Ut.msync(t,n,0,i,r);},doMkdir:function doMkdir(e,t){return"/"===(e=jt.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),Ut.mkdir(e,t,0),0;},doMknod:function doMknod(e,t,i){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28;}return Ut.mknod(e,t,i),0;},doReadlink:function doReadlink(e,t,i){if(i<=0)return-28;var r=Ut.readlink(e),n=Math.min(i,ae(r)),a=ce[t+n];return ne(r,t,i+1),ce[t+n]=a,n;},doAccess:function doAccess(e,t){if(-8&t)return-28;var i;if(!(i=Ut.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&Ut.nodePermissions(i,r)?-2:0;},doDup:function doDup(e,t,i){var r=Ut.getStream(i);return r&&Ut.close(r),Ut.open(e,t,0,i,i).fd;},doReadv:function doReadv(e,t,i,r){for(var n=0,a=0;a>2],o=pe[t+(8*a+4)>>2],l=Ut.read(e,ce,s,o,r);if(l<0)return-1;if(n+=l,l>2],o=pe[t+(8*a+4)>>2],l=Ut.write(e,ce,s,o,r);if(l<0)return-1;n+=l;}return n;},varargs:0,get:function get(e){return Dt.varargs+=4,pe[Dt.varargs-4>>2];},getStr:function getStr(){return ie(Dt.get());},getStreamFromFD:function getStreamFromFD(e){void 0===e&&(e=Dt.get());var t=Ut.getStream(e);if(!t)throw new Ut.ErrnoError(8);return t;},get64:function get64(){var e=Dt.get(),t=Dt.get();return X(e>=0?0===t:-1===t),e;},getZero:function getZero(){X(0===Dt.get());}};function Ft(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD();switch(Dt.get()){case 0:return(r=Dt.get())<0?-28:Ut.open(i.path,i.flags,0,r).fd;case 1:case 2:return 0;case 3:return i.flags;case 4:var r=Dt.get();return i.flags|=r,0;case 12:r=Dt.get();return de[r+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return St(28),-1;default:return-28;}}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno;}}function Ot(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD(),r=Dt.get(),n=Dt.get();return Ut.read(i,ce,r,n);}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno;}}function Lt(e,t){Dt.varargs=t;try{var i=Dt.getStr(),r=Dt.get(),n=Dt.get();return Ut.open(i,r,n).fd;}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno;}}function Bt(){}function Nt(e){try{var t=Dt.getStreamFromFD(e);return Ut.close(t),0;}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno;}}function zt(){return Nt.apply(null,arguments);}function Ht(e,t){try{var i=Dt.getStreamFromFD(e),r=i.tty?2:Ut.isDir(i.mode)?3:Ut.isLink(i.mode)?7:4;return ce[t>>0]=r,0;}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno;}}function Vt(){return Ht.apply(null,arguments);}function Yt(e,t,i,r,n){try{var a=Dt.getStreamFromFD(e),s=4294967296*i+(t>>>0);return s<=-9007199254740992||s>=9007199254740992?-61:(Ut.llseek(a,s,r),ft=[a.position>>>0,(lt=a.position,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[n>>2]=ft[0],pe[n+4>>2]=ft[1],a.getdents&&0===s&&0===r&&(a.getdents=null),0);}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno;}}function qt(){return Yt.apply(null,arguments);}function Xt(e,t,i,r){try{var n=Dt.getStreamFromFD(e),a=Dt.doWritev(n,t,i);return pe[r>>2]=a,0;}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno;}}function Wt(){return Xt.apply(null,arguments);}function Gt(e){delete ni.xhrs[e-1];}function Kt(){at();}function Qt(){return void 0===Qt.start&&(Qt.start=Date.now()),1e3*(Date.now()-Qt.start)|0;}function Zt(){at();}function Jt(){return g||"undefined"!=typeof dateNow||"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now;}function $t(e,t){var i;if(0===e)i=Date.now();else{if(1!==e||!Jt())return St(28),-1;i=Zt();}return pe[t>>2]=i/1e3|0,pe[t+4>>2]=i%1e3*1e3*1e3|0,0;}function ei(){return ce.length;}function ti(){return!y;}function ii(e){try{return N.grow(e-ue.byteLength+65535>>16),Ee(N.buffer),1;}catch(t){console.error("emscripten_realloc_buffer: Attempted to grow heap from "+ue.byteLength+" bytes to "+e+" bytes, but got error: "+t);}}function ri(e){var t=ei();X(e>t);if(e>2147418112)return k("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147418112 bytes!"),!1;for(var i=Math.max(t,16777216);i>2]=t,me[e+4>>2]=t/4294967296|0;},openDatabase:function openDatabase(e,t,i,r){try{var n=indexedDB.open(e,t);}catch(e){return r(e);}n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains("FILES")&&t.deleteObjectStore("FILES"),t.createObjectStore("FILES");},n.onsuccess=function(e){i(e.target.result);},n.onerror=function(e){r(e);};},staticInit:function staticInit(){var e="undefined"==typeof ENVIRONMENT_IS_FETCH_WORKER;ni.openDatabase("emscripten_filesystem",1,function(t){ni.dbInstance=t,e&&nt("library_fetch_init");},function(){ni.dbInstance=!1,e&&nt("library_fetch_init");}),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||rt("library_fetch_init");}};function ai(e,t,i,r,n){var a=me[e+8>>2];if(a){var s=ie(a),o=e+112,l=ie(o);l||(l="GET");me[o+32>>2];var f=me[o+52>>2],u=me[o+56>>2],c=!!me[o+60>>2],h=(me[o+64>>2],me[o+68>>2]),d=me[o+72>>2],_=me[o+76>>2],p=me[o+80>>2],m=me[o+84>>2],b=me[o+88>>2],v=!!(1&f),y=!!(2&f),g=!!(64&f),w=h?ie(h):void 0,E=d?ie(d):void 0,C=p?ie(p):void 0,S=new XMLHttpRequest();if(S.withCredentials=c,S.open(l,s,!g,w,E),g||(S.timeout=u),S.url_=s,X(!y,"streaming uses moz-chunked-arraybuffer which is no longer supported; TODO: rewrite using fetch()"),S.responseType="arraybuffer",p&&S.overrideMimeType(C),_)for(;;){var j=me[_>>2];if(!j)break;var T=me[_+4>>2];if(!T)break;_+=8;var A=ie(j),x=ie(T);S.setRequestHeader(A,x);}ni.xhrs.push(S);var M=ni.xhrs.length;me[e+0>>2]=M;var k=m&&b?he.slice(m,m+b):null;S.onload=function(r){var n=S.response?S.response.byteLength:0,a=0,s=0;v&&!y&&(a=ya(s=n),he.set(new Uint8Array(S.response),a)),me[e+12>>2]=a,ni.setu64(e+16,s),ni.setu64(e+24,0),n&&ni.setu64(e+32,n),_e[e+40>>1]=S.readyState,4===S.readyState&&0===S.status&&(S.status=n>0?200:404),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),S.status>=200&&S.status<300?t&&t(e,S,r):i&&i(e,S,r);},S.onerror=function(t){var r=S.status;4===S.readyState&&0===r&&(r=404),me[e+12>>2]=0,ni.setu64(e+16,0),ni.setu64(e+24,0),ni.setu64(e+32,0),_e[e+40>>1]=S.readyState,_e[e+42>>1]=r,i&&i(e,S,t);},S.ontimeout=function(t){i&&i(e,S,t);},S.onprogress=function(t){var i=v&&y&&S.response?S.response.byteLength:0,n=0;v&&y&&(n=ya(i),he.set(new Uint8Array(S.response),n)),me[e+12>>2]=n,ni.setu64(e+16,i),ni.setu64(e+24,t.loaded-i),ni.setu64(e+32,t.total),_e[e+40>>1]=S.readyState,S.readyState>=3&&0===S.status&&t.loaded>0&&(S.status=200),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),r&&r(e,S,t);},S.onreadystatechange=function(t){_e[e+40>>1]=S.readyState,S.readyState>=2&&(_e[e+42>>1]=S.status),n&&n(e,S,t);};try{S.send(k);}catch(t){i&&i(e,S,t);}}else i(e,0,"no url specified!");}function si(e,t,i,r,n){if(e){var a=me[t+112+64>>2];a||(a=me[t+8>>2]);var s=ie(a);try{var o=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(i,s);o.onsuccess=function(e){_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),r(t,0,s);},o.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=413,ne("Payload Too Large",t+44,64),n(t,0,e);};}catch(e){n(t,0,e);}}else n(t,0,"IndexedDB not available!");}function oi(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readonly").objectStore("FILES").get(a);s.onsuccess=function(e){if(e.target.result){var n=e.target.result,a=n.byteLength||n.length,s=ya(a);he.set(new Uint8Array(n),s),me[t+12>>2]=s,ni.setu64(t+16,a),ni.setu64(t+24,0),ni.setu64(t+32,a),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,n);}else _e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,"no data");},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e);};}catch(e){r(t,0,e);}}else r(t,0,"IndexedDB not available!");}function li(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readwrite").objectStore("FILES")["delete"](a);s.onsuccess=function(e){var r=e.target.result;me[t+12>>2]=0,ni.setu64(t+16,0),ni.setu64(t+24,0),ni.setu64(t+32,0),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,r);},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e);};}catch(e){r(t,0,e);}}else r(t,0,"IndexedDB not available!");}function fi(e,t,i,r,n){void 0!==B&&(B=!0);var a=e+112,s=ie(a),o=me[a+36>>2],l=me[a+40>>2],f=me[a+44>>2],u=me[a+48>>2],c=me[a+52>>2],h=!!(4&c),d=!!(32&c),_=!!(16&c),p=function p(e,i,r){o?Ca(o,e):t&&t(e);},m=function m(e,t,i){f?Ca(f,e):r&&r(e);},b=function b(e,t,r){l?Ca(l,e):i&&i(e);},v=function v(e,t,i){u?Ca(u,e):n&&n(e);},y=function y(e,i,r){si(ni.dbInstance,e,i.response,function(e,i,r){o?Ca(o,e):t&&t(e);},function(e,i,r){o?Ca(o,e):t&&t(e);});};if("EM_IDB_STORE"===s){var g=me[a+84>>2];si(ni.dbInstance,e,he.slice(g,g+me[a+88>>2]),p,b);}else if("EM_IDB_DELETE"===s)li(ni.dbInstance,e,p,b);else if(_){if(d)return 0;ai(e,h?y:p,b,m,v);}else oi(ni.dbInstance,e,p,d?b:h?function(e,t,i){ai(e,y,b,m,v);}:function(e,t,i){ai(e,p,b,m,v);});return e;}var ui=We;function ci(e){return 0===e?0:(e=ie(e),wt.hasOwnProperty(e)?(ci.ret&&va(ci.ret),ci.ret=se(wt[e]),ci.ret):0);}function hi(e){var t=Date.now();return pe[e>>2]=t/1e3|0,pe[e+4>>2]=t%1e3*1e3|0,0;}var di=(ne("GMT",1126992,4),1126992);function _i(e,t){var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getUTCSeconds(),pe[t+4>>2]=i.getUTCMinutes(),pe[t+8>>2]=i.getUTCHours(),pe[t+12>>2]=i.getUTCDate(),pe[t+16>>2]=i.getUTCMonth(),pe[t+20>>2]=i.getUTCFullYear()-1900,pe[t+24>>2]=i.getUTCDay(),pe[t+36>>2]=0,pe[t+32>>2]=0;var r=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),n=(i.getTime()-r)/864e5|0;return pe[t+28>>2]=n,pe[t+40>>2]=di,t;}function pi(e){return Math.pow(2,e);}function mi(e){return pi(e);}function bi(e){return Math.log(e)/Math.LN2;}function vi(e){var t=yi,i=t.LLVM_SAVEDSTACKS[e];t.LLVM_SAVEDSTACKS.splice(e,1),wa(i);}function yi(){var e=yi;return e.LLVM_SAVEDSTACKS||(e.LLVM_SAVEDSTACKS=[]),e.LLVM_SAVEDSTACKS.push(Ea()),e.LLVM_SAVEDSTACKS.length-1;}var gi=Ze;function wi(){if(!wi.called){wi.called=!0,pe[ma()>>2]=60*new Date().getTimezoneOffset();var e=new Date().getFullYear(),t=new Date(e,0,1),i=new Date(e,6,1);pe[pa()>>2]=Number(t.getTimezoneOffset()!=i.getTimezoneOffset());var r=o(t),n=o(i),a=J(Ni(r),"i8",Q),s=J(Ni(n),"i8",Q);i.getTimezoneOffset()>2]=a,pe[ba()+4>>2]=s):(pe[ba()>>2]=s,pe[ba()+4>>2]=a);}function o(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT";}}function Ei(e,t){wi();var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getSeconds(),pe[t+4>>2]=i.getMinutes(),pe[t+8>>2]=i.getHours(),pe[t+12>>2]=i.getDate(),pe[t+16>>2]=i.getMonth(),pe[t+20>>2]=i.getFullYear()-1900,pe[t+24>>2]=i.getDay();var r=new Date(i.getFullYear(),0,1),n=(i.getTime()-r.getTime())/864e5|0;pe[t+28>>2]=n,pe[t+36>>2]=-60*i.getTimezoneOffset();var a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),s=r.getTimezoneOffset(),o=0|(a!=s&&i.getTimezoneOffset()==Math.min(s,a));pe[t+32>>2]=o;var l=pe[ba()+(o?4:0)>>2];return pe[t+40>>2]=l,t;}function Ci(e,t,i){he.set(he.subarray(t,t+i),e);}function Si(e){var t=e/1e3;if((v||y)&&self.performance&&self.performance.now)for(var i=self.performance.now();self.performance.now()-i>2],r=pe[e+4>>2];return r<0||r>999999999||i<0?(St(28),-1):(0!==t&&(pe[t>>2]=0,pe[t+4>>2]=0),Si(1e6*i+r/1e3));}function Ti(){return 0;}function Ai(){return 0;}function xi(){return 6;}function Mi(){}function ki(e){return e%4==0&&(e%100!=0||e%400==0);}function Pi(e,t){for(var i=0,r=0;r<=t;i+=e[r++]){;}return i;}var Ii=[31,29,31,30,31,30,31,31,30,31,30,31],Ri=[31,28,31,30,31,30,31,31,30,31,30,31];function Ui(e,t){for(var i=new Date(e.getTime());t>0;){var r=ki(i.getFullYear()),n=i.getMonth(),a=(r?Ii:Ri)[n];if(!(t>a-i.getDate()))return i.setDate(i.getDate()+t),i;t-=a-i.getDate()+1,i.setDate(1),n<11?i.setMonth(n+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1));}return i;}function Di(e,t,i,r){var n=pe[r+40>>2],a={tm_sec:pe[r>>2],tm_min:pe[r+4>>2],tm_hour:pe[r+8>>2],tm_mday:pe[r+12>>2],tm_mon:pe[r+16>>2],tm_year:pe[r+20>>2],tm_wday:pe[r+24>>2],tm_yday:pe[r+28>>2],tm_isdst:pe[r+32>>2],tm_gmtoff:pe[r+36>>2],tm_zone:n?ie(n):""},s=ie(i),o={"%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","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in o){s=s.replace(new RegExp(l,"g"),o[l]);}var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,t,i){for(var r="number"==typeof e?e.toString():e||"";r.length0?1:0;}var r;return 0===(r=i(e.getFullYear()-t.getFullYear()))&&0===(r=i(e.getMonth()-t.getMonth()))&&(r=i(e.getDate()-t.getDate())),r;}function _(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 p(e){var t=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday),i=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),n=_(i),a=_(r);return d(n,t)<=0?d(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1;}var m={"%a":function a(e){return f[e.tm_wday].substring(0,3);},"%A":function A(e){return f[e.tm_wday];},"%b":function b(e){return u[e.tm_mon].substring(0,3);},"%B":function B(e){return u[e.tm_mon];},"%C":function C(e){return h((e.tm_year+1900)/100|0,2);},"%d":function d(e){return h(e.tm_mday,2);},"%e":function e(_e2){return c(_e2.tm_mday,2," ");},"%g":function g(e){return p(e).toString().substring(2);},"%G":function G(e){return p(e);},"%H":function H(e){return h(e.tm_hour,2);},"%I":function I(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),h(t,2);},"%j":function j(e){return h(e.tm_mday+Pi(ki(e.tm_year+1900)?Ii:Ri,e.tm_mon-1),3);},"%m":function m(e){return h(e.tm_mon+1,2);},"%M":function M(e){return h(e.tm_min,2);},"%n":function n(){return"\n";},"%p":function p(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM";},"%S":function S(e){return h(e.tm_sec,2);},"%t":function t(){return"\t";},"%u":function u(e){return e.tm_wday||7;},"%U":function U(e){var t=new Date(e.tm_year+1900,0,1),i=0===t.getDay()?t:Ui(t,7-t.getDay()),r=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(d(i,r)<0){var n=Pi(ki(r.getFullYear())?Ii:Ri,r.getMonth()-1)-31,a=31-i.getDate()+n+r.getDate();return h(Math.ceil(a/7),2);}return 0===d(i,t)?"01":"00";},"%V":function V(e){var t,i=new Date(e.tm_year+1900,0,4),r=new Date(e.tm_year+1901,0,4),n=_(i),a=_(r),s=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday);return d(s,n)<0?"53":d(a,s)<=0?"01":(t=n.getFullYear()=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(i?"+":"-")+String("0000"+t).slice(-4);},"%Z":function Z(e){return e.tm_zone;},"%%":function _(){return"%";}};for(var l in m){s.indexOf(l)>=0&&(s=s.replace(new RegExp(l,"g"),m[l](a)));}var b=Ni(s,!1);return b.length>t?0:(le(b,e),b.length-1);}function Fi(e){switch(e){case 30:return ye;case 85:return 2147418112/ye;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.hardwareConcurrency||1;}return St(28),-1;}function Oi(e){var t=Date.now()/1e3|0;return e&&(pe[e>>2]=t),t;}if(Ut.staticInit(),w){var Li=e("fs"),Bi=e("path");Pt.staticInit();}function Ni(e,t,i){var r=i>0?i:ae(e)+1,n=new Array(r),a=re(e,n,0,n.length);return t&&(n.length=a),n;}Zt=g?function(){var e=i.hrtime();return 1e3*e[0]+e[1]/1e6;}:"undefined"!=typeof dateNow?dateNow:"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now?function(){return performance.now();}:Date.now,ni.staticInit();var zi=[0,"jsCall_dd_0","jsCall_dd_1","jsCall_dd_2","jsCall_dd_3","jsCall_dd_4","jsCall_dd_5","jsCall_dd_6","jsCall_dd_7","jsCall_dd_8","jsCall_dd_9","jsCall_dd_10","jsCall_dd_11","jsCall_dd_12","jsCall_dd_13","jsCall_dd_14","jsCall_dd_15","jsCall_dd_16","jsCall_dd_17","jsCall_dd_18","jsCall_dd_19","jsCall_dd_20","jsCall_dd_21","jsCall_dd_22","jsCall_dd_23","jsCall_dd_24","jsCall_dd_25","jsCall_dd_26","jsCall_dd_27","jsCall_dd_28","jsCall_dd_29","jsCall_dd_30","jsCall_dd_31","jsCall_dd_32","jsCall_dd_33","jsCall_dd_34","_sinh","_cosh","_tanh","_sin","_cos","_tan","_atan","_asin","_acos","_exp","_log","_fabs","_etime",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Hi=[0,"jsCall_did_0","jsCall_did_1","jsCall_did_2","jsCall_did_3","jsCall_did_4","jsCall_did_5","jsCall_did_6","jsCall_did_7","jsCall_did_8","jsCall_did_9","jsCall_did_10","jsCall_did_11","jsCall_did_12","jsCall_did_13","jsCall_did_14","jsCall_did_15","jsCall_did_16","jsCall_did_17","jsCall_did_18","jsCall_did_19","jsCall_did_20","jsCall_did_21","jsCall_did_22","jsCall_did_23","jsCall_did_24","jsCall_did_25","jsCall_did_26","jsCall_did_27","jsCall_did_28","jsCall_did_29","jsCall_did_30","jsCall_did_31","jsCall_did_32","jsCall_did_33","jsCall_did_34",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,0],Vi=[0,"jsCall_didd_0","jsCall_didd_1","jsCall_didd_2","jsCall_didd_3","jsCall_didd_4","jsCall_didd_5","jsCall_didd_6","jsCall_didd_7","jsCall_didd_8","jsCall_didd_9","jsCall_didd_10","jsCall_didd_11","jsCall_didd_12","jsCall_didd_13","jsCall_didd_14","jsCall_didd_15","jsCall_didd_16","jsCall_didd_17","jsCall_didd_18","jsCall_didd_19","jsCall_didd_20","jsCall_didd_21","jsCall_didd_22","jsCall_didd_23","jsCall_didd_24","jsCall_didd_25","jsCall_didd_26","jsCall_didd_27","jsCall_didd_28","jsCall_didd_29","jsCall_didd_30","jsCall_didd_31","jsCall_didd_32","jsCall_didd_33","jsCall_didd_34",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,0],Yi=[0,"jsCall_fii_0","jsCall_fii_1","jsCall_fii_2","jsCall_fii_3","jsCall_fii_4","jsCall_fii_5","jsCall_fii_6","jsCall_fii_7","jsCall_fii_8","jsCall_fii_9","jsCall_fii_10","jsCall_fii_11","jsCall_fii_12","jsCall_fii_13","jsCall_fii_14","jsCall_fii_15","jsCall_fii_16","jsCall_fii_17","jsCall_fii_18","jsCall_fii_19","jsCall_fii_20","jsCall_fii_21","jsCall_fii_22","jsCall_fii_23","jsCall_fii_24","jsCall_fii_25","jsCall_fii_26","jsCall_fii_27","jsCall_fii_28","jsCall_fii_29","jsCall_fii_30","jsCall_fii_31","jsCall_fii_32","jsCall_fii_33","jsCall_fii_34","_sbr_sum_square_c",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],qi=[0,"jsCall_fiii_0","jsCall_fiii_1","jsCall_fiii_2","jsCall_fiii_3","jsCall_fiii_4","jsCall_fiii_5","jsCall_fiii_6","jsCall_fiii_7","jsCall_fiii_8","jsCall_fiii_9","jsCall_fiii_10","jsCall_fiii_11","jsCall_fiii_12","jsCall_fiii_13","jsCall_fiii_14","jsCall_fiii_15","jsCall_fiii_16","jsCall_fiii_17","jsCall_fiii_18","jsCall_fiii_19","jsCall_fiii_20","jsCall_fiii_21","jsCall_fiii_22","jsCall_fiii_23","jsCall_fiii_24","jsCall_fiii_25","jsCall_fiii_26","jsCall_fiii_27","jsCall_fiii_28","jsCall_fiii_29","jsCall_fiii_30","jsCall_fiii_31","jsCall_fiii_32","jsCall_fiii_33","jsCall_fiii_34","_avpriv_scalarproduct_float_c",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],Xi=[0,"jsCall_ii_0","jsCall_ii_1","jsCall_ii_2","jsCall_ii_3","jsCall_ii_4","jsCall_ii_5","jsCall_ii_6","jsCall_ii_7","jsCall_ii_8","jsCall_ii_9","jsCall_ii_10","jsCall_ii_11","jsCall_ii_12","jsCall_ii_13","jsCall_ii_14","jsCall_ii_15","jsCall_ii_16","jsCall_ii_17","jsCall_ii_18","jsCall_ii_19","jsCall_ii_20","jsCall_ii_21","jsCall_ii_22","jsCall_ii_23","jsCall_ii_24","jsCall_ii_25","jsCall_ii_26","jsCall_ii_27","jsCall_ii_28","jsCall_ii_29","jsCall_ii_30","jsCall_ii_31","jsCall_ii_32","jsCall_ii_33","jsCall_ii_34","_av_default_item_name","_ff_avio_child_class_next","_flv_probe","_flv_read_header","_flv_read_close","_live_flv_probe","_mov_probe","_mov_read_header","_mov_read_close","_mpegts_probe","_mpegts_read_header","_mpegts_read_close","_format_to_name","_format_child_class_next","_get_category","_urlcontext_to_name","_ff_urlcontext_child_class_next","_sws_context_to_name","_ff_bsf_child_class_next","_hevc_mp4toannexb_init","_hevc_init_thread_copy","_hevc_decode_init","_hevc_decode_free","_context_to_name","_codec_child_class_next","_get_category_2277","_aac_decode_init","_aac_decode_close","_init","___stdio_close","___emscripten_stdout_close","_releaseSniffStreamFunc","_flv_releaseFunc","_initializeDecoderFunc","__getFrame","_closeVideoFunc","_releaseFunc","_initializeDemuxerFunc","_getPacketFunc","_releaseDemuxerFunc","_io_short_seek","_avio_rb16","_avio_rl16","_av_buffer_allocz","_frame_worker_thread","_av_buffer_alloc","_thread_worker",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Wi=[0,"jsCall_iid_0","jsCall_iid_1","jsCall_iid_2","jsCall_iid_3","jsCall_iid_4","jsCall_iid_5","jsCall_iid_6","jsCall_iid_7","jsCall_iid_8","jsCall_iid_9","jsCall_iid_10","jsCall_iid_11","jsCall_iid_12","jsCall_iid_13","jsCall_iid_14","jsCall_iid_15","jsCall_iid_16","jsCall_iid_17","jsCall_iid_18","jsCall_iid_19","jsCall_iid_20","jsCall_iid_21","jsCall_iid_22","jsCall_iid_23","jsCall_iid_24","jsCall_iid_25","jsCall_iid_26","jsCall_iid_27","jsCall_iid_28","jsCall_iid_29","jsCall_iid_30","jsCall_iid_31","jsCall_iid_32","jsCall_iid_33","jsCall_iid_34","_seekBufferFunc",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],Gi=[0,"jsCall_iidiiii_0","jsCall_iidiiii_1","jsCall_iidiiii_2","jsCall_iidiiii_3","jsCall_iidiiii_4","jsCall_iidiiii_5","jsCall_iidiiii_6","jsCall_iidiiii_7","jsCall_iidiiii_8","jsCall_iidiiii_9","jsCall_iidiiii_10","jsCall_iidiiii_11","jsCall_iidiiii_12","jsCall_iidiiii_13","jsCall_iidiiii_14","jsCall_iidiiii_15","jsCall_iidiiii_16","jsCall_iidiiii_17","jsCall_iidiiii_18","jsCall_iidiiii_19","jsCall_iidiiii_20","jsCall_iidiiii_21","jsCall_iidiiii_22","jsCall_iidiiii_23","jsCall_iidiiii_24","jsCall_iidiiii_25","jsCall_iidiiii_26","jsCall_iidiiii_27","jsCall_iidiiii_28","jsCall_iidiiii_29","jsCall_iidiiii_30","jsCall_iidiiii_31","jsCall_iidiiii_32","jsCall_iidiiii_33","jsCall_iidiiii_34","_fmt_fp",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],Ki=[0,"jsCall_iii_0","jsCall_iii_1","jsCall_iii_2","jsCall_iii_3","jsCall_iii_4","jsCall_iii_5","jsCall_iii_6","jsCall_iii_7","jsCall_iii_8","jsCall_iii_9","jsCall_iii_10","jsCall_iii_11","jsCall_iii_12","jsCall_iii_13","jsCall_iii_14","jsCall_iii_15","jsCall_iii_16","jsCall_iii_17","jsCall_iii_18","jsCall_iii_19","jsCall_iii_20","jsCall_iii_21","jsCall_iii_22","jsCall_iii_23","jsCall_iii_24","jsCall_iii_25","jsCall_iii_26","jsCall_iii_27","jsCall_iii_28","jsCall_iii_29","jsCall_iii_30","jsCall_iii_31","jsCall_iii_32","jsCall_iii_33","jsCall_iii_34","_ff_avio_child_next","_flv_read_packet","_mov_read_packet","_mpegts_read_packet","_mpegts_raw_read_packet","_format_child_next","_urlcontext_child_next","_bsf_child_next","_hevc_mp4toannexb_filter","_hevc_update_thread_context","_null_filter","_codec_child_next","_initSniffStreamFunc","_flv_initFunc","_flv_getPacketFunc","_io_read_pause","_descriptor_compare","_hls_decode_entry","_avcodec_default_get_format","_ff_startcode_find_candidate_c","_color_table_compare",0,0,0,0,0,0,0],Qi=[0,"jsCall_iiii_0","jsCall_iiii_1","jsCall_iiii_2","jsCall_iiii_3","jsCall_iiii_4","jsCall_iiii_5","jsCall_iiii_6","jsCall_iiii_7","jsCall_iiii_8","jsCall_iiii_9","jsCall_iiii_10","jsCall_iiii_11","jsCall_iiii_12","jsCall_iiii_13","jsCall_iiii_14","jsCall_iiii_15","jsCall_iiii_16","jsCall_iiii_17","jsCall_iiii_18","jsCall_iiii_19","jsCall_iiii_20","jsCall_iiii_21","jsCall_iiii_22","jsCall_iiii_23","jsCall_iiii_24","jsCall_iiii_25","jsCall_iiii_26","jsCall_iiii_27","jsCall_iiii_28","jsCall_iiii_29","jsCall_iiii_30","jsCall_iiii_31","jsCall_iiii_32","jsCall_iiii_33","jsCall_iiii_34","_mov_read_aclr","_mov_read_avid","_mov_read_ares","_mov_read_avss","_mov_read_av1c","_mov_read_chpl","_mov_read_stco","_mov_read_colr","_mov_read_ctts","_mov_read_default","_mov_read_dpxe","_mov_read_dref","_mov_read_elst","_mov_read_enda","_mov_read_fiel","_mov_read_adrm","_mov_read_ftyp","_mov_read_glbl","_mov_read_hdlr","_mov_read_ilst","_mov_read_jp2h","_mov_read_mdat","_mov_read_mdhd","_mov_read_meta","_mov_read_moof","_mov_read_moov","_mov_read_mvhd","_mov_read_svq3","_mov_read_alac","_mov_read_pasp","_mov_read_sidx","_mov_read_stps","_mov_read_strf","_mov_read_stsc","_mov_read_stsd","_mov_read_stss","_mov_read_stsz","_mov_read_stts","_mov_read_tkhd","_mov_read_tfdt","_mov_read_tfhd","_mov_read_trak","_mov_read_tmcd","_mov_read_chap","_mov_read_trex","_mov_read_trun","_mov_read_wave","_mov_read_esds","_mov_read_dac3","_mov_read_dec3","_mov_read_ddts","_mov_read_wide","_mov_read_wfex","_mov_read_cmov","_mov_read_chan","_mov_read_dvc1","_mov_read_sbgp","_mov_read_uuid","_mov_read_targa_y216","_mov_read_free","_mov_read_custom","_mov_read_frma","_mov_read_senc","_mov_read_saiz","_mov_read_saio","_mov_read_pssh","_mov_read_schm","_mov_read_tenc","_mov_read_dfla","_mov_read_st3d","_mov_read_sv3d","_mov_read_dops","_mov_read_smdm","_mov_read_coll","_mov_read_vpcc","_mov_read_mdcv","_mov_read_clli","_h264_split","_hevc_split","___stdio_write","_sn_write","_read_stream_live","_read_stream_vod","_getSniffStreamPacketFunc","_flv_read_stream_live","_setCodecTypeFunc","_read_packet","_io_write_packet","_io_read_packet","_dyn_buf_write","_mov_read_keys","_mov_read_udta_string","_avcodec_default_get_buffer2","_do_read",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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Zi=[0,"jsCall_iiiii_0","jsCall_iiiii_1","jsCall_iiiii_2","jsCall_iiiii_3","jsCall_iiiii_4","jsCall_iiiii_5","jsCall_iiiii_6","jsCall_iiiii_7","jsCall_iiiii_8","jsCall_iiiii_9","jsCall_iiiii_10","jsCall_iiiii_11","jsCall_iiiii_12","jsCall_iiiii_13","jsCall_iiiii_14","jsCall_iiiii_15","jsCall_iiiii_16","jsCall_iiiii_17","jsCall_iiiii_18","jsCall_iiiii_19","jsCall_iiiii_20","jsCall_iiiii_21","jsCall_iiiii_22","jsCall_iiiii_23","jsCall_iiiii_24","jsCall_iiiii_25","jsCall_iiiii_26","jsCall_iiiii_27","jsCall_iiiii_28","jsCall_iiiii_29","jsCall_iiiii_30","jsCall_iiiii_31","jsCall_iiiii_32","jsCall_iiiii_33","jsCall_iiiii_34","_hevc_decode_frame","_aac_decode_frame","_flv_pushBufferFunc","_demuxBoxFunc","_mov_metadata_int8_no_padding","_mov_metadata_track_or_disc_number","_mov_metadata_gnre","_mov_metadata_int8_bypass_padding","_lum_planar_vscale","_chr_planar_vscale","_any_vscale","_packed_vscale","_gamma_convert","_lum_convert","_lum_h_scale","_chr_convert","_chr_h_scale","_no_chr_scale","_hls_decode_entry_wpp",0,0,0,0,0,0,0,0,0],Ji=[0,"jsCall_iiiiii_0","jsCall_iiiiii_1","jsCall_iiiiii_2","jsCall_iiiiii_3","jsCall_iiiiii_4","jsCall_iiiiii_5","jsCall_iiiiii_6","jsCall_iiiiii_7","jsCall_iiiiii_8","jsCall_iiiiii_9","jsCall_iiiiii_10","jsCall_iiiiii_11","jsCall_iiiiii_12","jsCall_iiiiii_13","jsCall_iiiiii_14","jsCall_iiiiii_15","jsCall_iiiiii_16","jsCall_iiiiii_17","jsCall_iiiiii_18","jsCall_iiiiii_19","jsCall_iiiiii_20","jsCall_iiiiii_21","jsCall_iiiiii_22","jsCall_iiiiii_23","jsCall_iiiiii_24","jsCall_iiiiii_25","jsCall_iiiiii_26","jsCall_iiiiii_27","jsCall_iiiiii_28","jsCall_iiiiii_29","jsCall_iiiiii_30","jsCall_iiiiii_31","jsCall_iiiiii_32","jsCall_iiiiii_33","jsCall_iiiiii_34","_pushBufferFunc","_decodeCodecContextFunc","_io_open_default","_avcodec_default_execute2","_thread_execute2","_sbr_lf_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],$i=[0,"jsCall_iiiiiii_0","jsCall_iiiiiii_1","jsCall_iiiiiii_2","jsCall_iiiiiii_3","jsCall_iiiiiii_4","jsCall_iiiiiii_5","jsCall_iiiiiii_6","jsCall_iiiiiii_7","jsCall_iiiiiii_8","jsCall_iiiiiii_9","jsCall_iiiiiii_10","jsCall_iiiiiii_11","jsCall_iiiiiii_12","jsCall_iiiiiii_13","jsCall_iiiiiii_14","jsCall_iiiiiii_15","jsCall_iiiiiii_16","jsCall_iiiiiii_17","jsCall_iiiiiii_18","jsCall_iiiiiii_19","jsCall_iiiiiii_20","jsCall_iiiiiii_21","jsCall_iiiiiii_22","jsCall_iiiiiii_23","jsCall_iiiiiii_24","jsCall_iiiiiii_25","jsCall_iiiiiii_26","jsCall_iiiiiii_27","jsCall_iiiiiii_28","jsCall_iiiiiii_29","jsCall_iiiiiii_30","jsCall_iiiiiii_31","jsCall_iiiiiii_32","jsCall_iiiiiii_33","jsCall_iiiiiii_34","_h264_parse","_hevc_parse","_flv_decodeVideoFrameFunc","_avcodec_default_execute","_thread_execute","_sbr_x_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],er=[0,"jsCall_iiiiiiii_0","jsCall_iiiiiiii_1","jsCall_iiiiiiii_2","jsCall_iiiiiiii_3","jsCall_iiiiiiii_4","jsCall_iiiiiiii_5","jsCall_iiiiiiii_6","jsCall_iiiiiiii_7","jsCall_iiiiiiii_8","jsCall_iiiiiiii_9","jsCall_iiiiiiii_10","jsCall_iiiiiiii_11","jsCall_iiiiiiii_12","jsCall_iiiiiiii_13","jsCall_iiiiiiii_14","jsCall_iiiiiiii_15","jsCall_iiiiiiii_16","jsCall_iiiiiiii_17","jsCall_iiiiiiii_18","jsCall_iiiiiiii_19","jsCall_iiiiiiii_20","jsCall_iiiiiiii_21","jsCall_iiiiiiii_22","jsCall_iiiiiiii_23","jsCall_iiiiiiii_24","jsCall_iiiiiiii_25","jsCall_iiiiiiii_26","jsCall_iiiiiiii_27","jsCall_iiiiiiii_28","jsCall_iiiiiiii_29","jsCall_iiiiiiii_30","jsCall_iiiiiiii_31","jsCall_iiiiiiii_32","jsCall_iiiiiiii_33","jsCall_iiiiiiii_34","_decodeVideoFrameFunc","_setSniffStreamCodecTypeFunc","_flv_setSniffStreamCodecTypeFunc","_swscale","_ff_sws_alphablendaway","_yuv2rgb_c_32","_yuva2rgba_c","_yuv2rgb_c_bgr48","_yuv2rgb_c_48","_yuva2argb_c","_yuv2rgb_c_24_rgb","_yuv2rgb_c_24_bgr","_yuv2rgb_c_16_ordered_dither","_yuv2rgb_c_15_ordered_dither","_yuv2rgb_c_12_ordered_dither","_yuv2rgb_c_8_ordered_dither","_yuv2rgb_c_4_ordered_dither","_yuv2rgb_c_4b_ordered_dither","_yuv2rgb_c_1_ordered_dither","_planarToP01xWrapper","_planar8ToP01xleWrapper","_yvu9ToYv12Wrapper","_bgr24ToYv12Wrapper","_rgbToRgbWrapper","_planarRgbToplanarRgbWrapper","_planarRgbToRgbWrapper","_planarRgbaToRgbWrapper","_Rgb16ToPlanarRgb16Wrapper","_planarRgb16ToRgb16Wrapper","_rgbToPlanarRgbWrapper","_bayer_to_rgb24_wrapper","_bayer_to_yv12_wrapper","_bswap_16bpc","_palToRgbWrapper","_yuv422pToYuy2Wrapper","_yuv422pToUyvyWrapper","_uint_y_to_float_y_wrapper","_float_y_to_uint_y_wrapper","_planarToYuy2Wrapper","_planarToUyvyWrapper","_yuyvToYuv420Wrapper","_uyvyToYuv420Wrapper","_yuyvToYuv422Wrapper","_uyvyToYuv422Wrapper","_packedCopyWrapper","_planarCopyWrapper","_planarToNv12Wrapper","_planarToNv24Wrapper","_nv12ToPlanarWrapper","_nv24ToPlanarWrapper",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],tr=[0,"jsCall_iiiiij_0","jsCall_iiiiij_1","jsCall_iiiiij_2","jsCall_iiiiij_3","jsCall_iiiiij_4","jsCall_iiiiij_5","jsCall_iiiiij_6","jsCall_iiiiij_7","jsCall_iiiiij_8","jsCall_iiiiij_9","jsCall_iiiiij_10","jsCall_iiiiij_11","jsCall_iiiiij_12","jsCall_iiiiij_13","jsCall_iiiiij_14","jsCall_iiiiij_15","jsCall_iiiiij_16","jsCall_iiiiij_17","jsCall_iiiiij_18","jsCall_iiiiij_19","jsCall_iiiiij_20","jsCall_iiiiij_21","jsCall_iiiiij_22","jsCall_iiiiij_23","jsCall_iiiiij_24","jsCall_iiiiij_25","jsCall_iiiiij_26","jsCall_iiiiij_27","jsCall_iiiiij_28","jsCall_iiiiij_29","jsCall_iiiiij_30","jsCall_iiiiij_31","jsCall_iiiiij_32","jsCall_iiiiij_33","jsCall_iiiiij_34","_mpegts_push_data",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],ir=[0,"jsCall_iiiji_0","jsCall_iiiji_1","jsCall_iiiji_2","jsCall_iiiji_3","jsCall_iiiji_4","jsCall_iiiji_5","jsCall_iiiji_6","jsCall_iiiji_7","jsCall_iiiji_8","jsCall_iiiji_9","jsCall_iiiji_10","jsCall_iiiji_11","jsCall_iiiji_12","jsCall_iiiji_13","jsCall_iiiji_14","jsCall_iiiji_15","jsCall_iiiji_16","jsCall_iiiji_17","jsCall_iiiji_18","jsCall_iiiji_19","jsCall_iiiji_20","jsCall_iiiji_21","jsCall_iiiji_22","jsCall_iiiji_23","jsCall_iiiji_24","jsCall_iiiji_25","jsCall_iiiji_26","jsCall_iiiji_27","jsCall_iiiji_28","jsCall_iiiji_29","jsCall_iiiji_30","jsCall_iiiji_31","jsCall_iiiji_32","jsCall_iiiji_33","jsCall_iiiji_34","_flv_read_seek","_mov_read_seek",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],rr=[0,"jsCall_iiijjji_0","jsCall_iiijjji_1","jsCall_iiijjji_2","jsCall_iiijjji_3","jsCall_iiijjji_4","jsCall_iiijjji_5","jsCall_iiijjji_6","jsCall_iiijjji_7","jsCall_iiijjji_8","jsCall_iiijjji_9","jsCall_iiijjji_10","jsCall_iiijjji_11","jsCall_iiijjji_12","jsCall_iiijjji_13","jsCall_iiijjji_14","jsCall_iiijjji_15","jsCall_iiijjji_16","jsCall_iiijjji_17","jsCall_iiijjji_18","jsCall_iiijjji_19","jsCall_iiijjji_20","jsCall_iiijjji_21","jsCall_iiijjji_22","jsCall_iiijjji_23","jsCall_iiijjji_24","jsCall_iiijjji_25","jsCall_iiijjji_26","jsCall_iiijjji_27","jsCall_iiijjji_28","jsCall_iiijjji_29","jsCall_iiijjji_30","jsCall_iiijjji_31","jsCall_iiijjji_32","jsCall_iiijjji_33","jsCall_iiijjji_34",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,0],nr=[0,"jsCall_jiiij_0","jsCall_jiiij_1","jsCall_jiiij_2","jsCall_jiiij_3","jsCall_jiiij_4","jsCall_jiiij_5","jsCall_jiiij_6","jsCall_jiiij_7","jsCall_jiiij_8","jsCall_jiiij_9","jsCall_jiiij_10","jsCall_jiiij_11","jsCall_jiiij_12","jsCall_jiiij_13","jsCall_jiiij_14","jsCall_jiiij_15","jsCall_jiiij_16","jsCall_jiiij_17","jsCall_jiiij_18","jsCall_jiiij_19","jsCall_jiiij_20","jsCall_jiiij_21","jsCall_jiiij_22","jsCall_jiiij_23","jsCall_jiiij_24","jsCall_jiiij_25","jsCall_jiiij_26","jsCall_jiiij_27","jsCall_jiiij_28","jsCall_jiiij_29","jsCall_jiiij_30","jsCall_jiiij_31","jsCall_jiiij_32","jsCall_jiiij_33","jsCall_jiiij_34","_mpegts_get_dts",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],ar=[0,"jsCall_jiiji_0","jsCall_jiiji_1","jsCall_jiiji_2","jsCall_jiiji_3","jsCall_jiiji_4","jsCall_jiiji_5","jsCall_jiiji_6","jsCall_jiiji_7","jsCall_jiiji_8","jsCall_jiiji_9","jsCall_jiiji_10","jsCall_jiiji_11","jsCall_jiiji_12","jsCall_jiiji_13","jsCall_jiiji_14","jsCall_jiiji_15","jsCall_jiiji_16","jsCall_jiiji_17","jsCall_jiiji_18","jsCall_jiiji_19","jsCall_jiiji_20","jsCall_jiiji_21","jsCall_jiiji_22","jsCall_jiiji_23","jsCall_jiiji_24","jsCall_jiiji_25","jsCall_jiiji_26","jsCall_jiiji_27","jsCall_jiiji_28","jsCall_jiiji_29","jsCall_jiiji_30","jsCall_jiiji_31","jsCall_jiiji_32","jsCall_jiiji_33","jsCall_jiiji_34","_io_read_seek",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],sr=[0,"jsCall_jiji_0","jsCall_jiji_1","jsCall_jiji_2","jsCall_jiji_3","jsCall_jiji_4","jsCall_jiji_5","jsCall_jiji_6","jsCall_jiji_7","jsCall_jiji_8","jsCall_jiji_9","jsCall_jiji_10","jsCall_jiji_11","jsCall_jiji_12","jsCall_jiji_13","jsCall_jiji_14","jsCall_jiji_15","jsCall_jiji_16","jsCall_jiji_17","jsCall_jiji_18","jsCall_jiji_19","jsCall_jiji_20","jsCall_jiji_21","jsCall_jiji_22","jsCall_jiji_23","jsCall_jiji_24","jsCall_jiji_25","jsCall_jiji_26","jsCall_jiji_27","jsCall_jiji_28","jsCall_jiji_29","jsCall_jiji_30","jsCall_jiji_31","jsCall_jiji_32","jsCall_jiji_33","jsCall_jiji_34","___stdio_seek","___emscripten_stdout_seek","_seek_in_buffer","_io_seek","_dyn_buf_seek",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],or=[0,"jsCall_v_0","jsCall_v_1","jsCall_v_2","jsCall_v_3","jsCall_v_4","jsCall_v_5","jsCall_v_6","jsCall_v_7","jsCall_v_8","jsCall_v_9","jsCall_v_10","jsCall_v_11","jsCall_v_12","jsCall_v_13","jsCall_v_14","jsCall_v_15","jsCall_v_16","jsCall_v_17","jsCall_v_18","jsCall_v_19","jsCall_v_20","jsCall_v_21","jsCall_v_22","jsCall_v_23","jsCall_v_24","jsCall_v_25","jsCall_v_26","jsCall_v_27","jsCall_v_28","jsCall_v_29","jsCall_v_30","jsCall_v_31","jsCall_v_32","jsCall_v_33","jsCall_v_34","_init_ff_cos_tabs_16","_init_ff_cos_tabs_32","_init_ff_cos_tabs_64","_init_ff_cos_tabs_128","_init_ff_cos_tabs_256","_init_ff_cos_tabs_512","_init_ff_cos_tabs_1024","_init_ff_cos_tabs_2048","_init_ff_cos_tabs_4096","_init_ff_cos_tabs_8192","_init_ff_cos_tabs_16384","_init_ff_cos_tabs_32768","_init_ff_cos_tabs_65536","_init_ff_cos_tabs_131072","_introduce_mine","_introduceMineFunc","_av_format_init_next","_av_codec_init_static","_av_codec_init_next","_aac_static_table_init","_AV_CRC_8_ATM_init_table_once","_AV_CRC_8_EBU_init_table_once","_AV_CRC_16_ANSI_init_table_once","_AV_CRC_16_CCITT_init_table_once","_AV_CRC_24_IEEE_init_table_once","_AV_CRC_32_IEEE_init_table_once","_AV_CRC_32_IEEE_LE_init_table_once","_AV_CRC_16_ANSI_LE_init_table_once"],lr=[0,"jsCall_vdiidiiiii_0","jsCall_vdiidiiiii_1","jsCall_vdiidiiiii_2","jsCall_vdiidiiiii_3","jsCall_vdiidiiiii_4","jsCall_vdiidiiiii_5","jsCall_vdiidiiiii_6","jsCall_vdiidiiiii_7","jsCall_vdiidiiiii_8","jsCall_vdiidiiiii_9","jsCall_vdiidiiiii_10","jsCall_vdiidiiiii_11","jsCall_vdiidiiiii_12","jsCall_vdiidiiiii_13","jsCall_vdiidiiiii_14","jsCall_vdiidiiiii_15","jsCall_vdiidiiiii_16","jsCall_vdiidiiiii_17","jsCall_vdiidiiiii_18","jsCall_vdiidiiiii_19","jsCall_vdiidiiiii_20","jsCall_vdiidiiiii_21","jsCall_vdiidiiiii_22","jsCall_vdiidiiiii_23","jsCall_vdiidiiiii_24","jsCall_vdiidiiiii_25","jsCall_vdiidiiiii_26","jsCall_vdiidiiiii_27","jsCall_vdiidiiiii_28","jsCall_vdiidiiiii_29","jsCall_vdiidiiiii_30","jsCall_vdiidiiiii_31","jsCall_vdiidiiiii_32","jsCall_vdiidiiiii_33","jsCall_vdiidiiiii_34",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,0],fr=[0,"jsCall_vi_0","jsCall_vi_1","jsCall_vi_2","jsCall_vi_3","jsCall_vi_4","jsCall_vi_5","jsCall_vi_6","jsCall_vi_7","jsCall_vi_8","jsCall_vi_9","jsCall_vi_10","jsCall_vi_11","jsCall_vi_12","jsCall_vi_13","jsCall_vi_14","jsCall_vi_15","jsCall_vi_16","jsCall_vi_17","jsCall_vi_18","jsCall_vi_19","jsCall_vi_20","jsCall_vi_21","jsCall_vi_22","jsCall_vi_23","jsCall_vi_24","jsCall_vi_25","jsCall_vi_26","jsCall_vi_27","jsCall_vi_28","jsCall_vi_29","jsCall_vi_30","jsCall_vi_31","jsCall_vi_32","jsCall_vi_33","jsCall_vi_34","_free_geobtag","_free_apic","_free_chapter","_free_priv","_hevc_decode_flush","_flush","_h264_close","_hevc_parser_close","_fft4","_fft8","_fft16","_fft32","_fft64","_fft128","_fft256","_fft512","_fft1024","_fft2048","_fft4096","_fft8192","_fft16384","_fft32768","_fft65536","_fft131072","_logRequest_downloadSucceeded","_logRequest_downloadFailed","_downloadSucceeded","_downloadFailed","_transform_4x4_luma_9","_idct_4x4_dc_9","_idct_8x8_dc_9","_idct_16x16_dc_9","_idct_32x32_dc_9","_transform_4x4_luma_10","_idct_4x4_dc_10","_idct_8x8_dc_10","_idct_16x16_dc_10","_idct_32x32_dc_10","_transform_4x4_luma_12","_idct_4x4_dc_12","_idct_8x8_dc_12","_idct_16x16_dc_12","_idct_32x32_dc_12","_transform_4x4_luma_8","_idct_4x4_dc_8","_idct_8x8_dc_8","_idct_16x16_dc_8","_idct_32x32_dc_8","_main_function","_sbr_sum64x5_c","_sbr_neg_odd_64_c","_sbr_qmf_pre_shuffle_c",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,0,0,0,0,0,0,0,0,0,0,0,0,0],ur=[0,"jsCall_vii_0","jsCall_vii_1","jsCall_vii_2","jsCall_vii_3","jsCall_vii_4","jsCall_vii_5","jsCall_vii_6","jsCall_vii_7","jsCall_vii_8","jsCall_vii_9","jsCall_vii_10","jsCall_vii_11","jsCall_vii_12","jsCall_vii_13","jsCall_vii_14","jsCall_vii_15","jsCall_vii_16","jsCall_vii_17","jsCall_vii_18","jsCall_vii_19","jsCall_vii_20","jsCall_vii_21","jsCall_vii_22","jsCall_vii_23","jsCall_vii_24","jsCall_vii_25","jsCall_vii_26","jsCall_vii_27","jsCall_vii_28","jsCall_vii_29","jsCall_vii_30","jsCall_vii_31","jsCall_vii_32","jsCall_vii_33","jsCall_vii_34","_io_close_default","_lumRangeFromJpeg_c","_lumRangeToJpeg_c","_lumRangeFromJpeg16_c","_lumRangeToJpeg16_c","_decode_data_free","_dequant_9","_idct_4x4_9","_idct_8x8_9","_idct_16x16_9","_idct_32x32_9","_dequant_10","_idct_4x4_10","_idct_8x8_10","_idct_16x16_10","_idct_32x32_10","_dequant_12","_idct_4x4_12","_idct_8x8_12","_idct_16x16_12","_idct_32x32_12","_dequant_8","_idct_4x4_8","_idct_8x8_8","_idct_16x16_8","_idct_32x32_8","_imdct_and_windowing","_apply_ltp","_update_ltp","_imdct_and_windowing_ld","_imdct_and_windowing_eld","_imdct_and_windowing_960","_ff_h264_chroma_dc_dequant_idct_9_c","_ff_h264_chroma422_dc_dequant_idct_9_c","_ff_h264_chroma_dc_dequant_idct_10_c","_ff_h264_chroma422_dc_dequant_idct_10_c","_ff_h264_chroma_dc_dequant_idct_12_c","_ff_h264_chroma422_dc_dequant_idct_12_c","_ff_h264_chroma_dc_dequant_idct_14_c","_ff_h264_chroma422_dc_dequant_idct_14_c","_ff_h264_chroma_dc_dequant_idct_8_c","_ff_h264_chroma422_dc_dequant_idct_8_c","_hevc_pps_free","_sbr_qmf_post_shuffle_c","_sbr_qmf_deint_neg_c","_sbr_autocorrelate_c","_fft_permute_c","_fft_calc_c","_av_buffer_default_free","_pool_release_buffer","_sha1_transform","_sha256_transform","_pop_arg_long_double",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,0,0,0,0,0,0,0,0,0,0,0,0],cr=[0,"jsCall_viidi_0","jsCall_viidi_1","jsCall_viidi_2","jsCall_viidi_3","jsCall_viidi_4","jsCall_viidi_5","jsCall_viidi_6","jsCall_viidi_7","jsCall_viidi_8","jsCall_viidi_9","jsCall_viidi_10","jsCall_viidi_11","jsCall_viidi_12","jsCall_viidi_13","jsCall_viidi_14","jsCall_viidi_15","jsCall_viidi_16","jsCall_viidi_17","jsCall_viidi_18","jsCall_viidi_19","jsCall_viidi_20","jsCall_viidi_21","jsCall_viidi_22","jsCall_viidi_23","jsCall_viidi_24","jsCall_viidi_25","jsCall_viidi_26","jsCall_viidi_27","jsCall_viidi_28","jsCall_viidi_29","jsCall_viidi_30","jsCall_viidi_31","jsCall_viidi_32","jsCall_viidi_33","jsCall_viidi_34","_vector_dmac_scalar_c","_vector_dmul_scalar_c",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],hr=[0,"jsCall_viifi_0","jsCall_viifi_1","jsCall_viifi_2","jsCall_viifi_3","jsCall_viifi_4","jsCall_viifi_5","jsCall_viifi_6","jsCall_viifi_7","jsCall_viifi_8","jsCall_viifi_9","jsCall_viifi_10","jsCall_viifi_11","jsCall_viifi_12","jsCall_viifi_13","jsCall_viifi_14","jsCall_viifi_15","jsCall_viifi_16","jsCall_viifi_17","jsCall_viifi_18","jsCall_viifi_19","jsCall_viifi_20","jsCall_viifi_21","jsCall_viifi_22","jsCall_viifi_23","jsCall_viifi_24","jsCall_viifi_25","jsCall_viifi_26","jsCall_viifi_27","jsCall_viifi_28","jsCall_viifi_29","jsCall_viifi_30","jsCall_viifi_31","jsCall_viifi_32","jsCall_viifi_33","jsCall_viifi_34","_vector_fmac_scalar_c","_vector_fmul_scalar_c",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],dr=[0,"jsCall_viii_0","jsCall_viii_1","jsCall_viii_2","jsCall_viii_3","jsCall_viii_4","jsCall_viii_5","jsCall_viii_6","jsCall_viii_7","jsCall_viii_8","jsCall_viii_9","jsCall_viii_10","jsCall_viii_11","jsCall_viii_12","jsCall_viii_13","jsCall_viii_14","jsCall_viii_15","jsCall_viii_16","jsCall_viii_17","jsCall_viii_18","jsCall_viii_19","jsCall_viii_20","jsCall_viii_21","jsCall_viii_22","jsCall_viii_23","jsCall_viii_24","jsCall_viii_25","jsCall_viii_26","jsCall_viii_27","jsCall_viii_28","jsCall_viii_29","jsCall_viii_30","jsCall_viii_31","jsCall_viii_32","jsCall_viii_33","jsCall_viii_34","_avcHandleFrame","_handleFrame","_sdt_cb","_pat_cb","_pmt_cb","_scte_data_cb","_m4sl_cb","_chrRangeFromJpeg_c","_chrRangeToJpeg_c","_chrRangeFromJpeg16_c","_chrRangeToJpeg16_c","_rgb15to16_c","_rgb15tobgr24_c","_rgb15to32_c","_rgb16tobgr24_c","_rgb16to32_c","_rgb16to15_c","_rgb24tobgr16_c","_rgb24tobgr15_c","_rgb24tobgr32_c","_rgb32to16_c","_rgb32to15_c","_rgb32tobgr24_c","_rgb24to15_c","_rgb24to16_c","_rgb24tobgr24_c","_shuffle_bytes_0321_c","_shuffle_bytes_2103_c","_shuffle_bytes_1230_c","_shuffle_bytes_3012_c","_shuffle_bytes_3210_c","_rgb32tobgr16_c","_rgb32tobgr15_c","_rgb48tobgr48_bswap","_rgb48tobgr64_bswap","_rgb48to64_bswap","_rgb64to48_bswap","_rgb48tobgr48_nobswap","_rgb48tobgr64_nobswap","_rgb48to64_nobswap","_rgb64tobgr48_nobswap","_rgb64tobgr48_bswap","_rgb64to48_nobswap","_rgb12to15","_rgb15to24","_rgb16to24","_rgb32to24","_rgb24to32","_rgb12tobgr12","_rgb15tobgr15","_rgb16tobgr15","_rgb15tobgr16","_rgb16tobgr16","_rgb15tobgr32","_rgb16tobgr32","_add_residual4x4_9","_add_residual8x8_9","_add_residual16x16_9","_add_residual32x32_9","_transform_rdpcm_9","_add_residual4x4_10","_add_residual8x8_10","_add_residual16x16_10","_add_residual32x32_10","_transform_rdpcm_10","_add_residual4x4_12","_add_residual8x8_12","_add_residual16x16_12","_add_residual32x32_12","_transform_rdpcm_12","_add_residual4x4_8","_add_residual8x8_8","_add_residual16x16_8","_add_residual32x32_8","_transform_rdpcm_8","_just_return","_bswap_buf","_bswap16_buf","_ff_h264_add_pixels4_16_c","_ff_h264_add_pixels4_8_c","_ff_h264_add_pixels8_16_c","_ff_h264_add_pixels8_8_c","_ff_h264_idct_add_9_c","_ff_h264_idct8_add_9_c","_ff_h264_idct_dc_add_9_c","_ff_h264_idct8_dc_add_9_c","_ff_h264_luma_dc_dequant_idct_9_c","_ff_h264_idct_add_10_c","_ff_h264_idct8_add_10_c","_ff_h264_idct_dc_add_10_c","_ff_h264_idct8_dc_add_10_c","_ff_h264_luma_dc_dequant_idct_10_c","_ff_h264_idct_add_12_c","_ff_h264_idct8_add_12_c","_ff_h264_idct_dc_add_12_c","_ff_h264_idct8_dc_add_12_c","_ff_h264_luma_dc_dequant_idct_12_c","_ff_h264_idct_add_14_c","_ff_h264_idct8_add_14_c","_ff_h264_idct_dc_add_14_c","_ff_h264_idct8_dc_add_14_c","_ff_h264_luma_dc_dequant_idct_14_c","_ff_h264_idct_add_8_c","_ff_h264_idct8_add_8_c","_ff_h264_idct_dc_add_8_c","_ff_h264_idct8_dc_add_8_c","_ff_h264_luma_dc_dequant_idct_8_c","_sbr_qmf_deint_bfly_c","_ps_add_squares_c","_ff_imdct_calc_c","_ff_imdct_half_c","_ff_mdct_calc_c","_butterflies_float_c",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,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,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,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],_r=[0,"jsCall_viiii_0","jsCall_viiii_1","jsCall_viiii_2","jsCall_viiii_3","jsCall_viiii_4","jsCall_viiii_5","jsCall_viiii_6","jsCall_viiii_7","jsCall_viiii_8","jsCall_viiii_9","jsCall_viiii_10","jsCall_viiii_11","jsCall_viiii_12","jsCall_viiii_13","jsCall_viiii_14","jsCall_viiii_15","jsCall_viiii_16","jsCall_viiii_17","jsCall_viiii_18","jsCall_viiii_19","jsCall_viiii_20","jsCall_viiii_21","jsCall_viiii_22","jsCall_viiii_23","jsCall_viiii_24","jsCall_viiii_25","jsCall_viiii_26","jsCall_viiii_27","jsCall_viiii_28","jsCall_viiii_29","jsCall_viiii_30","jsCall_viiii_31","jsCall_viiii_32","jsCall_viiii_33","jsCall_viiii_34","_planar_rgb9le_to_y","_planar_rgb10le_to_a","_planar_rgb10le_to_y","_planar_rgb12le_to_a","_planar_rgb12le_to_y","_planar_rgb14le_to_y","_planar_rgb16le_to_a","_planar_rgb16le_to_y","_planar_rgb9be_to_y","_planar_rgb10be_to_a","_planar_rgb10be_to_y","_planar_rgb12be_to_a","_planar_rgb12be_to_y","_planar_rgb14be_to_y","_planar_rgb16be_to_a","_planar_rgb16be_to_y","_planar_rgb_to_a","_planar_rgb_to_y","_gray8aToPacked32","_gray8aToPacked32_1","_gray8aToPacked24","_sws_convertPalette8ToPacked32","_sws_convertPalette8ToPacked24","_intra_pred_2_9","_intra_pred_3_9","_intra_pred_4_9","_intra_pred_5_9","_pred_planar_0_9","_pred_planar_1_9","_pred_planar_2_9","_pred_planar_3_9","_intra_pred_2_10","_intra_pred_3_10","_intra_pred_4_10","_intra_pred_5_10","_pred_planar_0_10","_pred_planar_1_10","_pred_planar_2_10","_pred_planar_3_10","_intra_pred_2_12","_intra_pred_3_12","_intra_pred_4_12","_intra_pred_5_12","_pred_planar_0_12","_pred_planar_1_12","_pred_planar_2_12","_pred_planar_3_12","_intra_pred_2_8","_intra_pred_3_8","_intra_pred_4_8","_intra_pred_5_8","_pred_planar_0_8","_pred_planar_1_8","_pred_planar_2_8","_pred_planar_3_8","_apply_tns","_windowing_and_mdct_ltp","_h264_v_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_mbaff_intra_9_c","_h264_v_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma422_intra_9_c","_h264_h_loop_filter_chroma_mbaff_intra_9_c","_h264_h_loop_filter_chroma422_mbaff_intra_9_c","_h264_v_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_mbaff_intra_10_c","_h264_v_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma422_intra_10_c","_h264_h_loop_filter_chroma_mbaff_intra_10_c","_h264_h_loop_filter_chroma422_mbaff_intra_10_c","_h264_v_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_mbaff_intra_12_c","_h264_v_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma422_intra_12_c","_h264_h_loop_filter_chroma_mbaff_intra_12_c","_h264_h_loop_filter_chroma422_mbaff_intra_12_c","_h264_v_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_mbaff_intra_14_c","_h264_v_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma422_intra_14_c","_h264_h_loop_filter_chroma_mbaff_intra_14_c","_h264_h_loop_filter_chroma422_mbaff_intra_14_c","_h264_v_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_mbaff_intra_8_c","_h264_v_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma422_intra_8_c","_h264_h_loop_filter_chroma_mbaff_intra_8_c","_h264_h_loop_filter_chroma422_mbaff_intra_8_c","_fft15_c","_mdct15","_imdct15_half","_ps_mul_pair_single_c","_ps_hybrid_analysis_ileave_c","_ps_hybrid_synthesis_deint_c","_vector_fmul_c","_vector_dmul_c","_vector_fmul_reverse_c","_av_log_default_callback",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,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,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,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,0,0,0,0,0],pr=[0,"jsCall_viiiid_0","jsCall_viiiid_1","jsCall_viiiid_2","jsCall_viiiid_3","jsCall_viiiid_4","jsCall_viiiid_5","jsCall_viiiid_6","jsCall_viiiid_7","jsCall_viiiid_8","jsCall_viiiid_9","jsCall_viiiid_10","jsCall_viiiid_11","jsCall_viiiid_12","jsCall_viiiid_13","jsCall_viiiid_14","jsCall_viiiid_15","jsCall_viiiid_16","jsCall_viiiid_17","jsCall_viiiid_18","jsCall_viiiid_19","jsCall_viiiid_20","jsCall_viiiid_21","jsCall_viiiid_22","jsCall_viiiid_23","jsCall_viiiid_24","jsCall_viiiid_25","jsCall_viiiid_26","jsCall_viiiid_27","jsCall_viiiid_28","jsCall_viiiid_29","jsCall_viiiid_30","jsCall_viiiid_31","jsCall_viiiid_32","jsCall_viiiid_33","jsCall_viiiid_34",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,0],mr=[0,"jsCall_viiiifii_0","jsCall_viiiifii_1","jsCall_viiiifii_2","jsCall_viiiifii_3","jsCall_viiiifii_4","jsCall_viiiifii_5","jsCall_viiiifii_6","jsCall_viiiifii_7","jsCall_viiiifii_8","jsCall_viiiifii_9","jsCall_viiiifii_10","jsCall_viiiifii_11","jsCall_viiiifii_12","jsCall_viiiifii_13","jsCall_viiiifii_14","jsCall_viiiifii_15","jsCall_viiiifii_16","jsCall_viiiifii_17","jsCall_viiiifii_18","jsCall_viiiifii_19","jsCall_viiiifii_20","jsCall_viiiifii_21","jsCall_viiiifii_22","jsCall_viiiifii_23","jsCall_viiiifii_24","jsCall_viiiifii_25","jsCall_viiiifii_26","jsCall_viiiifii_27","jsCall_viiiifii_28","jsCall_viiiifii_29","jsCall_viiiifii_30","jsCall_viiiifii_31","jsCall_viiiifii_32","jsCall_viiiifii_33","jsCall_viiiifii_34","_sbr_hf_gen_c",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],br=[0,"jsCall_viiiii_0","jsCall_viiiii_1","jsCall_viiiii_2","jsCall_viiiii_3","jsCall_viiiii_4","jsCall_viiiii_5","jsCall_viiiii_6","jsCall_viiiii_7","jsCall_viiiii_8","jsCall_viiiii_9","jsCall_viiiii_10","jsCall_viiiii_11","jsCall_viiiii_12","jsCall_viiiii_13","jsCall_viiiii_14","jsCall_viiiii_15","jsCall_viiiii_16","jsCall_viiiii_17","jsCall_viiiii_18","jsCall_viiiii_19","jsCall_viiiii_20","jsCall_viiiii_21","jsCall_viiiii_22","jsCall_viiiii_23","jsCall_viiiii_24","jsCall_viiiii_25","jsCall_viiiii_26","jsCall_viiiii_27","jsCall_viiiii_28","jsCall_viiiii_29","jsCall_viiiii_30","jsCall_viiiii_31","jsCall_viiiii_32","jsCall_viiiii_33","jsCall_viiiii_34","_planar_rgb9le_to_uv","_planar_rgb10le_to_uv","_planar_rgb12le_to_uv","_planar_rgb14le_to_uv","_planar_rgb16le_to_uv","_planar_rgb9be_to_uv","_planar_rgb10be_to_uv","_planar_rgb12be_to_uv","_planar_rgb14be_to_uv","_planar_rgb16be_to_uv","_planar_rgb_to_uv","_yuv2p010l1_LE_c","_yuv2p010l1_BE_c","_yuv2plane1_16LE_c","_yuv2plane1_16BE_c","_yuv2plane1_9LE_c","_yuv2plane1_9BE_c","_yuv2plane1_10LE_c","_yuv2plane1_10BE_c","_yuv2plane1_12LE_c","_yuv2plane1_12BE_c","_yuv2plane1_14LE_c","_yuv2plane1_14BE_c","_yuv2plane1_floatBE_c","_yuv2plane1_floatLE_c","_yuv2plane1_8_c","_bayer_bggr8_to_rgb24_copy","_bayer_bggr8_to_rgb24_interpolate","_bayer_bggr16le_to_rgb24_copy","_bayer_bggr16le_to_rgb24_interpolate","_bayer_bggr16be_to_rgb24_copy","_bayer_bggr16be_to_rgb24_interpolate","_bayer_rggb8_to_rgb24_copy","_bayer_rggb8_to_rgb24_interpolate","_bayer_rggb16le_to_rgb24_copy","_bayer_rggb16le_to_rgb24_interpolate","_bayer_rggb16be_to_rgb24_copy","_bayer_rggb16be_to_rgb24_interpolate","_bayer_gbrg8_to_rgb24_copy","_bayer_gbrg8_to_rgb24_interpolate","_bayer_gbrg16le_to_rgb24_copy","_bayer_gbrg16le_to_rgb24_interpolate","_bayer_gbrg16be_to_rgb24_copy","_bayer_gbrg16be_to_rgb24_interpolate","_bayer_grbg8_to_rgb24_copy","_bayer_grbg8_to_rgb24_interpolate","_bayer_grbg16le_to_rgb24_copy","_bayer_grbg16le_to_rgb24_interpolate","_bayer_grbg16be_to_rgb24_copy","_bayer_grbg16be_to_rgb24_interpolate","_hevc_h_loop_filter_chroma_9","_hevc_v_loop_filter_chroma_9","_hevc_h_loop_filter_chroma_10","_hevc_v_loop_filter_chroma_10","_hevc_h_loop_filter_chroma_12","_hevc_v_loop_filter_chroma_12","_hevc_h_loop_filter_chroma_8","_hevc_v_loop_filter_chroma_8","_worker_func","_sbr_hf_assemble","_sbr_hf_inverse_filter","_ff_h264_idct_add16_9_c","_ff_h264_idct8_add4_9_c","_ff_h264_idct_add8_9_c","_ff_h264_idct_add8_422_9_c","_ff_h264_idct_add16intra_9_c","_h264_v_loop_filter_luma_9_c","_h264_h_loop_filter_luma_9_c","_h264_h_loop_filter_luma_mbaff_9_c","_h264_v_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma422_9_c","_h264_h_loop_filter_chroma_mbaff_9_c","_h264_h_loop_filter_chroma422_mbaff_9_c","_ff_h264_idct_add16_10_c","_ff_h264_idct8_add4_10_c","_ff_h264_idct_add8_10_c","_ff_h264_idct_add8_422_10_c","_ff_h264_idct_add16intra_10_c","_h264_v_loop_filter_luma_10_c","_h264_h_loop_filter_luma_10_c","_h264_h_loop_filter_luma_mbaff_10_c","_h264_v_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma422_10_c","_h264_h_loop_filter_chroma_mbaff_10_c","_h264_h_loop_filter_chroma422_mbaff_10_c","_ff_h264_idct_add16_12_c","_ff_h264_idct8_add4_12_c","_ff_h264_idct_add8_12_c","_ff_h264_idct_add8_422_12_c","_ff_h264_idct_add16intra_12_c","_h264_v_loop_filter_luma_12_c","_h264_h_loop_filter_luma_12_c","_h264_h_loop_filter_luma_mbaff_12_c","_h264_v_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma422_12_c","_h264_h_loop_filter_chroma_mbaff_12_c","_h264_h_loop_filter_chroma422_mbaff_12_c","_ff_h264_idct_add16_14_c","_ff_h264_idct8_add4_14_c","_ff_h264_idct_add8_14_c","_ff_h264_idct_add8_422_14_c","_ff_h264_idct_add16intra_14_c","_h264_v_loop_filter_luma_14_c","_h264_h_loop_filter_luma_14_c","_h264_h_loop_filter_luma_mbaff_14_c","_h264_v_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma422_14_c","_h264_h_loop_filter_chroma_mbaff_14_c","_h264_h_loop_filter_chroma422_mbaff_14_c","_ff_h264_idct_add16_8_c","_ff_h264_idct8_add4_8_c","_ff_h264_idct_add8_8_c","_ff_h264_idct_add8_422_8_c","_ff_h264_idct_add16intra_8_c","_h264_v_loop_filter_luma_8_c","_h264_h_loop_filter_luma_8_c","_h264_h_loop_filter_luma_mbaff_8_c","_h264_v_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma422_8_c","_h264_h_loop_filter_chroma_mbaff_8_c","_h264_h_loop_filter_chroma422_mbaff_8_c","_postrotate_c","_sbr_hf_g_filt_c","_ps_hybrid_analysis_c","_ps_stereo_interpolate_c","_ps_stereo_interpolate_ipdopd_c","_vector_fmul_window_c","_vector_fmul_add_c",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,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,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,0,0,0,0,0,0],vr=[0,"jsCall_viiiiidd_0","jsCall_viiiiidd_1","jsCall_viiiiidd_2","jsCall_viiiiidd_3","jsCall_viiiiidd_4","jsCall_viiiiidd_5","jsCall_viiiiidd_6","jsCall_viiiiidd_7","jsCall_viiiiidd_8","jsCall_viiiiidd_9","jsCall_viiiiidd_10","jsCall_viiiiidd_11","jsCall_viiiiidd_12","jsCall_viiiiidd_13","jsCall_viiiiidd_14","jsCall_viiiiidd_15","jsCall_viiiiidd_16","jsCall_viiiiidd_17","jsCall_viiiiidd_18","jsCall_viiiiidd_19","jsCall_viiiiidd_20","jsCall_viiiiidd_21","jsCall_viiiiidd_22","jsCall_viiiiidd_23","jsCall_viiiiidd_24","jsCall_viiiiidd_25","jsCall_viiiiidd_26","jsCall_viiiiidd_27","jsCall_viiiiidd_28","jsCall_viiiiidd_29","jsCall_viiiiidd_30","jsCall_viiiiidd_31","jsCall_viiiiidd_32","jsCall_viiiiidd_33","jsCall_viiiiidd_34",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,0],yr=[0,"jsCall_viiiiii_0","jsCall_viiiiii_1","jsCall_viiiiii_2","jsCall_viiiiii_3","jsCall_viiiiii_4","jsCall_viiiiii_5","jsCall_viiiiii_6","jsCall_viiiiii_7","jsCall_viiiiii_8","jsCall_viiiiii_9","jsCall_viiiiii_10","jsCall_viiiiii_11","jsCall_viiiiii_12","jsCall_viiiiii_13","jsCall_viiiiii_14","jsCall_viiiiii_15","jsCall_viiiiii_16","jsCall_viiiiii_17","jsCall_viiiiii_18","jsCall_viiiiii_19","jsCall_viiiiii_20","jsCall_viiiiii_21","jsCall_viiiiii_22","jsCall_viiiiii_23","jsCall_viiiiii_24","jsCall_viiiiii_25","jsCall_viiiiii_26","jsCall_viiiiii_27","jsCall_viiiiii_28","jsCall_viiiiii_29","jsCall_viiiiii_30","jsCall_viiiiii_31","jsCall_viiiiii_32","jsCall_viiiiii_33","jsCall_viiiiii_34","_read_geobtag","_read_apic","_read_chapter","_read_priv","_ff_hyscale_fast_c","_bswap16Y_c","_read_ya16le_gray_c","_read_ya16be_gray_c","_read_ayuv64le_Y_c","_yuy2ToY_c","_uyvyToY_c","_bgr24ToY_c","_bgr16leToY_c","_bgr16beToY_c","_bgr15leToY_c","_bgr15beToY_c","_bgr12leToY_c","_bgr12beToY_c","_rgb24ToY_c","_rgb16leToY_c","_rgb16beToY_c","_rgb15leToY_c","_rgb15beToY_c","_rgb12leToY_c","_rgb12beToY_c","_palToY_c","_monoblack2Y_c","_monowhite2Y_c","_bgr32ToY_c","_bgr321ToY_c","_rgb32ToY_c","_rgb321ToY_c","_rgb48BEToY_c","_rgb48LEToY_c","_bgr48BEToY_c","_bgr48LEToY_c","_rgb64BEToY_c","_rgb64LEToY_c","_bgr64BEToY_c","_bgr64LEToY_c","_p010LEToY_c","_p010BEToY_c","_grayf32ToY16_c","_grayf32ToY16_bswap_c","_rgba64leToA_c","_rgba64beToA_c","_rgbaToA_c","_abgrToA_c","_read_ya16le_alpha_c","_read_ya16be_alpha_c","_read_ayuv64le_A_c","_palToA_c","_put_pcm_9","_hevc_h_loop_filter_luma_9","_hevc_v_loop_filter_luma_9","_put_pcm_10","_hevc_h_loop_filter_luma_10","_hevc_v_loop_filter_luma_10","_put_pcm_12","_hevc_h_loop_filter_luma_12","_hevc_v_loop_filter_luma_12","_put_pcm_8","_hevc_h_loop_filter_luma_8","_hevc_v_loop_filter_luma_8","_pred_dc_9","_pred_angular_0_9","_pred_angular_1_9","_pred_angular_2_9","_pred_angular_3_9","_pred_dc_10","_pred_angular_0_10","_pred_angular_1_10","_pred_angular_2_10","_pred_angular_3_10","_pred_dc_12","_pred_angular_0_12","_pred_angular_1_12","_pred_angular_2_12","_pred_angular_3_12","_pred_dc_8","_pred_angular_0_8","_pred_angular_1_8","_pred_angular_2_8","_pred_angular_3_8","_weight_h264_pixels16_9_c","_weight_h264_pixels8_9_c","_weight_h264_pixels4_9_c","_weight_h264_pixels2_9_c","_weight_h264_pixels16_10_c","_weight_h264_pixels8_10_c","_weight_h264_pixels4_10_c","_weight_h264_pixels2_10_c","_weight_h264_pixels16_12_c","_weight_h264_pixels8_12_c","_weight_h264_pixels4_12_c","_weight_h264_pixels2_12_c","_weight_h264_pixels16_14_c","_weight_h264_pixels8_14_c","_weight_h264_pixels4_14_c","_weight_h264_pixels2_14_c","_weight_h264_pixels16_8_c","_weight_h264_pixels8_8_c","_weight_h264_pixels4_8_c","_weight_h264_pixels2_8_c","_sbr_hf_apply_noise_0","_sbr_hf_apply_noise_1","_sbr_hf_apply_noise_2","_sbr_hf_apply_noise_3","_aes_decrypt","_aes_encrypt","_image_copy_plane",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,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,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,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,0],gr=[0,"jsCall_viiiiiifi_0","jsCall_viiiiiifi_1","jsCall_viiiiiifi_2","jsCall_viiiiiifi_3","jsCall_viiiiiifi_4","jsCall_viiiiiifi_5","jsCall_viiiiiifi_6","jsCall_viiiiiifi_7","jsCall_viiiiiifi_8","jsCall_viiiiiifi_9","jsCall_viiiiiifi_10","jsCall_viiiiiifi_11","jsCall_viiiiiifi_12","jsCall_viiiiiifi_13","jsCall_viiiiiifi_14","jsCall_viiiiiifi_15","jsCall_viiiiiifi_16","jsCall_viiiiiifi_17","jsCall_viiiiiifi_18","jsCall_viiiiiifi_19","jsCall_viiiiiifi_20","jsCall_viiiiiifi_21","jsCall_viiiiiifi_22","jsCall_viiiiiifi_23","jsCall_viiiiiifi_24","jsCall_viiiiiifi_25","jsCall_viiiiiifi_26","jsCall_viiiiiifi_27","jsCall_viiiiiifi_28","jsCall_viiiiiifi_29","jsCall_viiiiiifi_30","jsCall_viiiiiifi_31","jsCall_viiiiiifi_32","jsCall_viiiiiifi_33","jsCall_viiiiiifi_34","_ps_decorrelate_c",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],wr=[0,"jsCall_viiiiiii_0","jsCall_viiiiiii_1","jsCall_viiiiiii_2","jsCall_viiiiiii_3","jsCall_viiiiiii_4","jsCall_viiiiiii_5","jsCall_viiiiiii_6","jsCall_viiiiiii_7","jsCall_viiiiiii_8","jsCall_viiiiiii_9","jsCall_viiiiiii_10","jsCall_viiiiiii_11","jsCall_viiiiiii_12","jsCall_viiiiiii_13","jsCall_viiiiiii_14","jsCall_viiiiiii_15","jsCall_viiiiiii_16","jsCall_viiiiiii_17","jsCall_viiiiiii_18","jsCall_viiiiiii_19","jsCall_viiiiiii_20","jsCall_viiiiiii_21","jsCall_viiiiiii_22","jsCall_viiiiiii_23","jsCall_viiiiiii_24","jsCall_viiiiiii_25","jsCall_viiiiiii_26","jsCall_viiiiiii_27","jsCall_viiiiiii_28","jsCall_viiiiiii_29","jsCall_viiiiiii_30","jsCall_viiiiiii_31","jsCall_viiiiiii_32","jsCall_viiiiiii_33","jsCall_viiiiiii_34","_hScale8To15_c","_hScale8To19_c","_hScale16To19_c","_hScale16To15_c","_yuy2ToUV_c","_yvy2ToUV_c","_uyvyToUV_c","_nv12ToUV_c","_nv21ToUV_c","_palToUV_c","_bswap16UV_c","_read_ayuv64le_UV_c","_p010LEToUV_c","_p010BEToUV_c","_p016LEToUV_c","_p016BEToUV_c","_gbr24pToUV_half_c","_rgb64BEToUV_half_c","_rgb64LEToUV_half_c","_bgr64BEToUV_half_c","_bgr64LEToUV_half_c","_rgb48BEToUV_half_c","_rgb48LEToUV_half_c","_bgr48BEToUV_half_c","_bgr48LEToUV_half_c","_bgr32ToUV_half_c","_bgr321ToUV_half_c","_bgr24ToUV_half_c","_bgr16leToUV_half_c","_bgr16beToUV_half_c","_bgr15leToUV_half_c","_bgr15beToUV_half_c","_bgr12leToUV_half_c","_bgr12beToUV_half_c","_rgb32ToUV_half_c","_rgb321ToUV_half_c","_rgb24ToUV_half_c","_rgb16leToUV_half_c","_rgb16beToUV_half_c","_rgb15leToUV_half_c","_rgb15beToUV_half_c","_rgb12leToUV_half_c","_rgb12beToUV_half_c","_rgb64BEToUV_c","_rgb64LEToUV_c","_bgr64BEToUV_c","_bgr64LEToUV_c","_rgb48BEToUV_c","_rgb48LEToUV_c","_bgr48BEToUV_c","_bgr48LEToUV_c","_bgr32ToUV_c","_bgr321ToUV_c","_bgr24ToUV_c","_bgr16leToUV_c","_bgr16beToUV_c","_bgr15leToUV_c","_bgr15beToUV_c","_bgr12leToUV_c","_bgr12beToUV_c","_rgb32ToUV_c","_rgb321ToUV_c","_rgb24ToUV_c","_rgb16leToUV_c","_rgb16beToUV_c","_rgb15leToUV_c","_rgb15beToUV_c","_rgb12leToUV_c","_rgb12beToUV_c","_yuv2p010lX_LE_c","_yuv2p010lX_BE_c","_yuv2p010cX_c","_yuv2planeX_16LE_c","_yuv2planeX_16BE_c","_yuv2p016cX_c","_yuv2planeX_9LE_c","_yuv2planeX_9BE_c","_yuv2planeX_10LE_c","_yuv2planeX_10BE_c","_yuv2planeX_12LE_c","_yuv2planeX_12BE_c","_yuv2planeX_14LE_c","_yuv2planeX_14BE_c","_yuv2planeX_floatBE_c","_yuv2planeX_floatLE_c","_yuv2planeX_8_c","_yuv2nv12cX_c","_sao_edge_filter_9","_put_hevc_pel_pixels_9","_put_hevc_qpel_h_9","_put_hevc_qpel_v_9","_put_hevc_qpel_hv_9","_put_hevc_epel_h_9","_put_hevc_epel_v_9","_put_hevc_epel_hv_9","_sao_edge_filter_10","_put_hevc_pel_pixels_10","_put_hevc_qpel_h_10","_put_hevc_qpel_v_10","_put_hevc_qpel_hv_10","_put_hevc_epel_h_10","_put_hevc_epel_v_10","_put_hevc_epel_hv_10","_sao_edge_filter_12","_put_hevc_pel_pixels_12","_put_hevc_qpel_h_12","_put_hevc_qpel_v_12","_put_hevc_qpel_hv_12","_put_hevc_epel_h_12","_put_hevc_epel_v_12","_put_hevc_epel_hv_12","_sao_edge_filter_8","_put_hevc_pel_pixels_8","_put_hevc_qpel_h_8","_put_hevc_qpel_v_8","_put_hevc_qpel_hv_8","_put_hevc_epel_h_8","_put_hevc_epel_v_8","_put_hevc_epel_hv_8",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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Er=[0,"jsCall_viiiiiiii_0","jsCall_viiiiiiii_1","jsCall_viiiiiiii_2","jsCall_viiiiiiii_3","jsCall_viiiiiiii_4","jsCall_viiiiiiii_5","jsCall_viiiiiiii_6","jsCall_viiiiiiii_7","jsCall_viiiiiiii_8","jsCall_viiiiiiii_9","jsCall_viiiiiiii_10","jsCall_viiiiiiii_11","jsCall_viiiiiiii_12","jsCall_viiiiiiii_13","jsCall_viiiiiiii_14","jsCall_viiiiiiii_15","jsCall_viiiiiiii_16","jsCall_viiiiiiii_17","jsCall_viiiiiiii_18","jsCall_viiiiiiii_19","jsCall_viiiiiiii_20","jsCall_viiiiiiii_21","jsCall_viiiiiiii_22","jsCall_viiiiiiii_23","jsCall_viiiiiiii_24","jsCall_viiiiiiii_25","jsCall_viiiiiiii_26","jsCall_viiiiiiii_27","jsCall_viiiiiiii_28","jsCall_viiiiiiii_29","jsCall_viiiiiiii_30","jsCall_viiiiiiii_31","jsCall_viiiiiiii_32","jsCall_viiiiiiii_33","jsCall_viiiiiiii_34","_ff_hcscale_fast_c","_bayer_bggr8_to_yv12_copy","_bayer_bggr8_to_yv12_interpolate","_bayer_bggr16le_to_yv12_copy","_bayer_bggr16le_to_yv12_interpolate","_bayer_bggr16be_to_yv12_copy","_bayer_bggr16be_to_yv12_interpolate","_bayer_rggb8_to_yv12_copy","_bayer_rggb8_to_yv12_interpolate","_bayer_rggb16le_to_yv12_copy","_bayer_rggb16le_to_yv12_interpolate","_bayer_rggb16be_to_yv12_copy","_bayer_rggb16be_to_yv12_interpolate","_bayer_gbrg8_to_yv12_copy","_bayer_gbrg8_to_yv12_interpolate","_bayer_gbrg16le_to_yv12_copy","_bayer_gbrg16le_to_yv12_interpolate","_bayer_gbrg16be_to_yv12_copy","_bayer_gbrg16be_to_yv12_interpolate","_bayer_grbg8_to_yv12_copy","_bayer_grbg8_to_yv12_interpolate","_bayer_grbg16le_to_yv12_copy","_bayer_grbg16le_to_yv12_interpolate","_bayer_grbg16be_to_yv12_copy","_bayer_grbg16be_to_yv12_interpolate","_sao_band_filter_9","_put_hevc_pel_uni_pixels_9","_put_hevc_qpel_uni_h_9","_put_hevc_qpel_uni_v_9","_put_hevc_qpel_uni_hv_9","_put_hevc_epel_uni_h_9","_put_hevc_epel_uni_v_9","_put_hevc_epel_uni_hv_9","_sao_band_filter_10","_put_hevc_pel_uni_pixels_10","_put_hevc_qpel_uni_h_10","_put_hevc_qpel_uni_v_10","_put_hevc_qpel_uni_hv_10","_put_hevc_epel_uni_h_10","_put_hevc_epel_uni_v_10","_put_hevc_epel_uni_hv_10","_sao_band_filter_12","_put_hevc_pel_uni_pixels_12","_put_hevc_qpel_uni_h_12","_put_hevc_qpel_uni_v_12","_put_hevc_qpel_uni_hv_12","_put_hevc_epel_uni_h_12","_put_hevc_epel_uni_v_12","_put_hevc_epel_uni_hv_12","_sao_band_filter_8","_put_hevc_pel_uni_pixels_8","_put_hevc_qpel_uni_h_8","_put_hevc_qpel_uni_v_8","_put_hevc_qpel_uni_hv_8","_put_hevc_epel_uni_h_8","_put_hevc_epel_uni_v_8","_put_hevc_epel_uni_hv_8","_biweight_h264_pixels16_9_c","_biweight_h264_pixels8_9_c","_biweight_h264_pixels4_9_c","_biweight_h264_pixels2_9_c","_biweight_h264_pixels16_10_c","_biweight_h264_pixels8_10_c","_biweight_h264_pixels4_10_c","_biweight_h264_pixels2_10_c","_biweight_h264_pixels16_12_c","_biweight_h264_pixels8_12_c","_biweight_h264_pixels4_12_c","_biweight_h264_pixels2_12_c","_biweight_h264_pixels16_14_c","_biweight_h264_pixels8_14_c","_biweight_h264_pixels4_14_c","_biweight_h264_pixels2_14_c","_biweight_h264_pixels16_8_c","_biweight_h264_pixels8_8_c","_biweight_h264_pixels4_8_c","_biweight_h264_pixels2_8_c",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Cr=[0,"jsCall_viiiiiiiid_0","jsCall_viiiiiiiid_1","jsCall_viiiiiiiid_2","jsCall_viiiiiiiid_3","jsCall_viiiiiiiid_4","jsCall_viiiiiiiid_5","jsCall_viiiiiiiid_6","jsCall_viiiiiiiid_7","jsCall_viiiiiiiid_8","jsCall_viiiiiiiid_9","jsCall_viiiiiiiid_10","jsCall_viiiiiiiid_11","jsCall_viiiiiiiid_12","jsCall_viiiiiiiid_13","jsCall_viiiiiiiid_14","jsCall_viiiiiiiid_15","jsCall_viiiiiiiid_16","jsCall_viiiiiiiid_17","jsCall_viiiiiiiid_18","jsCall_viiiiiiiid_19","jsCall_viiiiiiiid_20","jsCall_viiiiiiiid_21","jsCall_viiiiiiiid_22","jsCall_viiiiiiiid_23","jsCall_viiiiiiiid_24","jsCall_viiiiiiiid_25","jsCall_viiiiiiiid_26","jsCall_viiiiiiiid_27","jsCall_viiiiiiiid_28","jsCall_viiiiiiiid_29","jsCall_viiiiiiiid_30","jsCall_viiiiiiiid_31","jsCall_viiiiiiiid_32","jsCall_viiiiiiiid_33","jsCall_viiiiiiiid_34",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,0],Sr=[0,"jsCall_viiiiiiiidi_0","jsCall_viiiiiiiidi_1","jsCall_viiiiiiiidi_2","jsCall_viiiiiiiidi_3","jsCall_viiiiiiiidi_4","jsCall_viiiiiiiidi_5","jsCall_viiiiiiiidi_6","jsCall_viiiiiiiidi_7","jsCall_viiiiiiiidi_8","jsCall_viiiiiiiidi_9","jsCall_viiiiiiiidi_10","jsCall_viiiiiiiidi_11","jsCall_viiiiiiiidi_12","jsCall_viiiiiiiidi_13","jsCall_viiiiiiiidi_14","jsCall_viiiiiiiidi_15","jsCall_viiiiiiiidi_16","jsCall_viiiiiiiidi_17","jsCall_viiiiiiiidi_18","jsCall_viiiiiiiidi_19","jsCall_viiiiiiiidi_20","jsCall_viiiiiiiidi_21","jsCall_viiiiiiiidi_22","jsCall_viiiiiiiidi_23","jsCall_viiiiiiiidi_24","jsCall_viiiiiiiidi_25","jsCall_viiiiiiiidi_26","jsCall_viiiiiiiidi_27","jsCall_viiiiiiiidi_28","jsCall_viiiiiiiidi_29","jsCall_viiiiiiiidi_30","jsCall_viiiiiiiidi_31","jsCall_viiiiiiiidi_32","jsCall_viiiiiiiidi_33","jsCall_viiiiiiiidi_34",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,0],jr=[0,"jsCall_viiiiiiiii_0","jsCall_viiiiiiiii_1","jsCall_viiiiiiiii_2","jsCall_viiiiiiiii_3","jsCall_viiiiiiiii_4","jsCall_viiiiiiiii_5","jsCall_viiiiiiiii_6","jsCall_viiiiiiiii_7","jsCall_viiiiiiiii_8","jsCall_viiiiiiiii_9","jsCall_viiiiiiiii_10","jsCall_viiiiiiiii_11","jsCall_viiiiiiiii_12","jsCall_viiiiiiiii_13","jsCall_viiiiiiiii_14","jsCall_viiiiiiiii_15","jsCall_viiiiiiiii_16","jsCall_viiiiiiiii_17","jsCall_viiiiiiiii_18","jsCall_viiiiiiiii_19","jsCall_viiiiiiiii_20","jsCall_viiiiiiiii_21","jsCall_viiiiiiiii_22","jsCall_viiiiiiiii_23","jsCall_viiiiiiiii_24","jsCall_viiiiiiiii_25","jsCall_viiiiiiiii_26","jsCall_viiiiiiiii_27","jsCall_viiiiiiiii_28","jsCall_viiiiiiiii_29","jsCall_viiiiiiiii_30","jsCall_viiiiiiiii_31","jsCall_viiiiiiiii_32","jsCall_viiiiiiiii_33","jsCall_viiiiiiiii_34","_yuv2rgba32_full_1_c","_yuv2rgbx32_full_1_c","_yuv2argb32_full_1_c","_yuv2xrgb32_full_1_c","_yuv2bgra32_full_1_c","_yuv2bgrx32_full_1_c","_yuv2abgr32_full_1_c","_yuv2xbgr32_full_1_c","_yuv2rgba64le_full_1_c","_yuv2rgbx64le_full_1_c","_yuv2rgba64be_full_1_c","_yuv2rgbx64be_full_1_c","_yuv2bgra64le_full_1_c","_yuv2bgrx64le_full_1_c","_yuv2bgra64be_full_1_c","_yuv2bgrx64be_full_1_c","_yuv2rgb24_full_1_c","_yuv2bgr24_full_1_c","_yuv2rgb48le_full_1_c","_yuv2bgr48le_full_1_c","_yuv2rgb48be_full_1_c","_yuv2bgr48be_full_1_c","_yuv2bgr4_byte_full_1_c","_yuv2rgb4_byte_full_1_c","_yuv2bgr8_full_1_c","_yuv2rgb8_full_1_c","_yuv2rgbx64le_1_c","_yuv2rgba64le_1_c","_yuv2rgbx64be_1_c","_yuv2rgba64be_1_c","_yuv2bgrx64le_1_c","_yuv2bgra64le_1_c","_yuv2bgrx64be_1_c","_yuv2bgra64be_1_c","_yuv2rgba32_1_c","_yuv2rgbx32_1_c","_yuv2rgba32_1_1_c","_yuv2rgbx32_1_1_c","_yuv2rgb16_1_c","_yuv2rgb15_1_c","_yuv2rgb12_1_c","_yuv2rgb8_1_c","_yuv2rgb4_1_c","_yuv2rgb4b_1_c","_yuv2rgb48le_1_c","_yuv2rgb48be_1_c","_yuv2bgr48le_1_c","_yuv2bgr48be_1_c","_yuv2rgb24_1_c","_yuv2bgr24_1_c","_yuv2monowhite_1_c","_yuv2monoblack_1_c","_yuv2yuyv422_1_c","_yuv2yvyu422_1_c","_yuv2uyvy422_1_c","_yuv2ya8_1_c","_yuv2ya16le_1_c","_yuv2ya16be_1_c","_yuy2toyv12_c","_put_hevc_pel_bi_pixels_9","_put_hevc_qpel_bi_h_9","_put_hevc_qpel_bi_v_9","_put_hevc_qpel_bi_hv_9","_put_hevc_epel_bi_h_9","_put_hevc_epel_bi_v_9","_put_hevc_epel_bi_hv_9","_put_hevc_pel_bi_pixels_10","_put_hevc_qpel_bi_h_10","_put_hevc_qpel_bi_v_10","_put_hevc_qpel_bi_hv_10","_put_hevc_epel_bi_h_10","_put_hevc_epel_bi_v_10","_put_hevc_epel_bi_hv_10","_put_hevc_pel_bi_pixels_12","_put_hevc_qpel_bi_h_12","_put_hevc_qpel_bi_v_12","_put_hevc_qpel_bi_hv_12","_put_hevc_epel_bi_h_12","_put_hevc_epel_bi_v_12","_put_hevc_epel_bi_hv_12","_put_hevc_pel_bi_pixels_8","_put_hevc_qpel_bi_h_8","_put_hevc_qpel_bi_v_8","_put_hevc_qpel_bi_hv_8","_put_hevc_epel_bi_h_8","_put_hevc_epel_bi_v_8","_put_hevc_epel_bi_hv_8",0,0,0,0,0],Tr=[0,"jsCall_viiiiiiiiii_0","jsCall_viiiiiiiiii_1","jsCall_viiiiiiiiii_2","jsCall_viiiiiiiiii_3","jsCall_viiiiiiiiii_4","jsCall_viiiiiiiiii_5","jsCall_viiiiiiiiii_6","jsCall_viiiiiiiiii_7","jsCall_viiiiiiiiii_8","jsCall_viiiiiiiiii_9","jsCall_viiiiiiiiii_10","jsCall_viiiiiiiiii_11","jsCall_viiiiiiiiii_12","jsCall_viiiiiiiiii_13","jsCall_viiiiiiiiii_14","jsCall_viiiiiiiiii_15","jsCall_viiiiiiiiii_16","jsCall_viiiiiiiiii_17","jsCall_viiiiiiiiii_18","jsCall_viiiiiiiiii_19","jsCall_viiiiiiiiii_20","jsCall_viiiiiiiiii_21","jsCall_viiiiiiiiii_22","jsCall_viiiiiiiiii_23","jsCall_viiiiiiiiii_24","jsCall_viiiiiiiiii_25","jsCall_viiiiiiiiii_26","jsCall_viiiiiiiiii_27","jsCall_viiiiiiiiii_28","jsCall_viiiiiiiiii_29","jsCall_viiiiiiiiii_30","jsCall_viiiiiiiiii_31","jsCall_viiiiiiiiii_32","jsCall_viiiiiiiiii_33","jsCall_viiiiiiiiii_34","_yuv2rgba32_full_2_c","_yuv2rgbx32_full_2_c","_yuv2argb32_full_2_c","_yuv2xrgb32_full_2_c","_yuv2bgra32_full_2_c","_yuv2bgrx32_full_2_c","_yuv2abgr32_full_2_c","_yuv2xbgr32_full_2_c","_yuv2rgba64le_full_2_c","_yuv2rgbx64le_full_2_c","_yuv2rgba64be_full_2_c","_yuv2rgbx64be_full_2_c","_yuv2bgra64le_full_2_c","_yuv2bgrx64le_full_2_c","_yuv2bgra64be_full_2_c","_yuv2bgrx64be_full_2_c","_yuv2rgb24_full_2_c","_yuv2bgr24_full_2_c","_yuv2rgb48le_full_2_c","_yuv2bgr48le_full_2_c","_yuv2rgb48be_full_2_c","_yuv2bgr48be_full_2_c","_yuv2bgr4_byte_full_2_c","_yuv2rgb4_byte_full_2_c","_yuv2bgr8_full_2_c","_yuv2rgb8_full_2_c","_yuv2rgbx64le_2_c","_yuv2rgba64le_2_c","_yuv2rgbx64be_2_c","_yuv2rgba64be_2_c","_yuv2bgrx64le_2_c","_yuv2bgra64le_2_c","_yuv2bgrx64be_2_c","_yuv2bgra64be_2_c","_yuv2rgba32_2_c","_yuv2rgbx32_2_c","_yuv2rgba32_1_2_c","_yuv2rgbx32_1_2_c","_yuv2rgb16_2_c","_yuv2rgb15_2_c","_yuv2rgb12_2_c","_yuv2rgb8_2_c","_yuv2rgb4_2_c","_yuv2rgb4b_2_c","_yuv2rgb48le_2_c","_yuv2rgb48be_2_c","_yuv2bgr48le_2_c","_yuv2bgr48be_2_c","_yuv2rgb24_2_c","_yuv2bgr24_2_c","_yuv2monowhite_2_c","_yuv2monoblack_2_c","_yuv2yuyv422_2_c","_yuv2yvyu422_2_c","_yuv2uyvy422_2_c","_yuv2ya8_2_c","_yuv2ya16le_2_c","_yuv2ya16be_2_c","_vu9_to_vu12_c","_yvu9_to_yuy2_c","_ff_emulated_edge_mc_8","_ff_emulated_edge_mc_16",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,0,0,0],Ar=[0,"jsCall_viiiiiiiiiii_0","jsCall_viiiiiiiiiii_1","jsCall_viiiiiiiiiii_2","jsCall_viiiiiiiiiii_3","jsCall_viiiiiiiiiii_4","jsCall_viiiiiiiiiii_5","jsCall_viiiiiiiiiii_6","jsCall_viiiiiiiiiii_7","jsCall_viiiiiiiiiii_8","jsCall_viiiiiiiiiii_9","jsCall_viiiiiiiiiii_10","jsCall_viiiiiiiiiii_11","jsCall_viiiiiiiiiii_12","jsCall_viiiiiiiiiii_13","jsCall_viiiiiiiiiii_14","jsCall_viiiiiiiiiii_15","jsCall_viiiiiiiiiii_16","jsCall_viiiiiiiiiii_17","jsCall_viiiiiiiiiii_18","jsCall_viiiiiiiiiii_19","jsCall_viiiiiiiiiii_20","jsCall_viiiiiiiiiii_21","jsCall_viiiiiiiiiii_22","jsCall_viiiiiiiiiii_23","jsCall_viiiiiiiiiii_24","jsCall_viiiiiiiiiii_25","jsCall_viiiiiiiiiii_26","jsCall_viiiiiiiiiii_27","jsCall_viiiiiiiiiii_28","jsCall_viiiiiiiiiii_29","jsCall_viiiiiiiiiii_30","jsCall_viiiiiiiiiii_31","jsCall_viiiiiiiiiii_32","jsCall_viiiiiiiiiii_33","jsCall_viiiiiiiiiii_34","_put_hevc_pel_uni_w_pixels_9","_put_hevc_qpel_uni_w_h_9","_put_hevc_qpel_uni_w_v_9","_put_hevc_qpel_uni_w_hv_9","_put_hevc_epel_uni_w_h_9","_put_hevc_epel_uni_w_v_9","_put_hevc_epel_uni_w_hv_9","_put_hevc_pel_uni_w_pixels_10","_put_hevc_qpel_uni_w_h_10","_put_hevc_qpel_uni_w_v_10","_put_hevc_qpel_uni_w_hv_10","_put_hevc_epel_uni_w_h_10","_put_hevc_epel_uni_w_v_10","_put_hevc_epel_uni_w_hv_10","_put_hevc_pel_uni_w_pixels_12","_put_hevc_qpel_uni_w_h_12","_put_hevc_qpel_uni_w_v_12","_put_hevc_qpel_uni_w_hv_12","_put_hevc_epel_uni_w_h_12","_put_hevc_epel_uni_w_v_12","_put_hevc_epel_uni_w_hv_12","_put_hevc_pel_uni_w_pixels_8","_put_hevc_qpel_uni_w_h_8","_put_hevc_qpel_uni_w_v_8","_put_hevc_qpel_uni_w_hv_8","_put_hevc_epel_uni_w_h_8","_put_hevc_epel_uni_w_v_8","_put_hevc_epel_uni_w_hv_8"],xr=[0,"jsCall_viiiiiiiiiiii_0","jsCall_viiiiiiiiiiii_1","jsCall_viiiiiiiiiiii_2","jsCall_viiiiiiiiiiii_3","jsCall_viiiiiiiiiiii_4","jsCall_viiiiiiiiiiii_5","jsCall_viiiiiiiiiiii_6","jsCall_viiiiiiiiiiii_7","jsCall_viiiiiiiiiiii_8","jsCall_viiiiiiiiiiii_9","jsCall_viiiiiiiiiiii_10","jsCall_viiiiiiiiiiii_11","jsCall_viiiiiiiiiiii_12","jsCall_viiiiiiiiiiii_13","jsCall_viiiiiiiiiiii_14","jsCall_viiiiiiiiiiii_15","jsCall_viiiiiiiiiiii_16","jsCall_viiiiiiiiiiii_17","jsCall_viiiiiiiiiiii_18","jsCall_viiiiiiiiiiii_19","jsCall_viiiiiiiiiiii_20","jsCall_viiiiiiiiiiii_21","jsCall_viiiiiiiiiiii_22","jsCall_viiiiiiiiiiii_23","jsCall_viiiiiiiiiiii_24","jsCall_viiiiiiiiiiii_25","jsCall_viiiiiiiiiiii_26","jsCall_viiiiiiiiiiii_27","jsCall_viiiiiiiiiiii_28","jsCall_viiiiiiiiiiii_29","jsCall_viiiiiiiiiiii_30","jsCall_viiiiiiiiiiii_31","jsCall_viiiiiiiiiiii_32","jsCall_viiiiiiiiiiii_33","jsCall_viiiiiiiiiiii_34","_yuv2rgba32_full_X_c","_yuv2rgbx32_full_X_c","_yuv2argb32_full_X_c","_yuv2xrgb32_full_X_c","_yuv2bgra32_full_X_c","_yuv2bgrx32_full_X_c","_yuv2abgr32_full_X_c","_yuv2xbgr32_full_X_c","_yuv2rgba64le_full_X_c","_yuv2rgbx64le_full_X_c","_yuv2rgba64be_full_X_c","_yuv2rgbx64be_full_X_c","_yuv2bgra64le_full_X_c","_yuv2bgrx64le_full_X_c","_yuv2bgra64be_full_X_c","_yuv2bgrx64be_full_X_c","_yuv2rgb24_full_X_c","_yuv2bgr24_full_X_c","_yuv2rgb48le_full_X_c","_yuv2bgr48le_full_X_c","_yuv2rgb48be_full_X_c","_yuv2bgr48be_full_X_c","_yuv2bgr4_byte_full_X_c","_yuv2rgb4_byte_full_X_c","_yuv2bgr8_full_X_c","_yuv2rgb8_full_X_c","_yuv2gbrp_full_X_c","_yuv2gbrp16_full_X_c","_yuv2rgbx64le_X_c","_yuv2rgba64le_X_c","_yuv2rgbx64be_X_c","_yuv2rgba64be_X_c","_yuv2bgrx64le_X_c","_yuv2bgra64le_X_c","_yuv2bgrx64be_X_c","_yuv2bgra64be_X_c","_yuv2rgba32_X_c","_yuv2rgbx32_X_c","_yuv2rgba32_1_X_c","_yuv2rgbx32_1_X_c","_yuv2rgb16_X_c","_yuv2rgb15_X_c","_yuv2rgb12_X_c","_yuv2rgb8_X_c","_yuv2rgb4_X_c","_yuv2rgb4b_X_c","_yuv2rgb48le_X_c","_yuv2rgb48be_X_c","_yuv2bgr48le_X_c","_yuv2bgr48be_X_c","_yuv2rgb24_X_c","_yuv2bgr24_X_c","_yuv2monowhite_X_c","_yuv2ayuv64le_X_c","_yuv2monoblack_X_c","_yuv2yuyv422_X_c","_yuv2yvyu422_X_c","_yuv2uyvy422_X_c","_yuv2ya8_X_c","_yuv2ya16le_X_c","_yuv2ya16be_X_c","_sao_edge_restore_0_9","_sao_edge_restore_1_9","_sao_edge_restore_0_10","_sao_edge_restore_1_10","_sao_edge_restore_0_12","_sao_edge_restore_1_12","_sao_edge_restore_0_8","_sao_edge_restore_1_8",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Mr=[0,"jsCall_viiiiiiiiiiiiii_0","jsCall_viiiiiiiiiiiiii_1","jsCall_viiiiiiiiiiiiii_2","jsCall_viiiiiiiiiiiiii_3","jsCall_viiiiiiiiiiiiii_4","jsCall_viiiiiiiiiiiiii_5","jsCall_viiiiiiiiiiiiii_6","jsCall_viiiiiiiiiiiiii_7","jsCall_viiiiiiiiiiiiii_8","jsCall_viiiiiiiiiiiiii_9","jsCall_viiiiiiiiiiiiii_10","jsCall_viiiiiiiiiiiiii_11","jsCall_viiiiiiiiiiiiii_12","jsCall_viiiiiiiiiiiiii_13","jsCall_viiiiiiiiiiiiii_14","jsCall_viiiiiiiiiiiiii_15","jsCall_viiiiiiiiiiiiii_16","jsCall_viiiiiiiiiiiiii_17","jsCall_viiiiiiiiiiiiii_18","jsCall_viiiiiiiiiiiiii_19","jsCall_viiiiiiiiiiiiii_20","jsCall_viiiiiiiiiiiiii_21","jsCall_viiiiiiiiiiiiii_22","jsCall_viiiiiiiiiiiiii_23","jsCall_viiiiiiiiiiiiii_24","jsCall_viiiiiiiiiiiiii_25","jsCall_viiiiiiiiiiiiii_26","jsCall_viiiiiiiiiiiiii_27","jsCall_viiiiiiiiiiiiii_28","jsCall_viiiiiiiiiiiiii_29","jsCall_viiiiiiiiiiiiii_30","jsCall_viiiiiiiiiiiiii_31","jsCall_viiiiiiiiiiiiii_32","jsCall_viiiiiiiiiiiiii_33","jsCall_viiiiiiiiiiiiii_34","_put_hevc_pel_bi_w_pixels_9","_put_hevc_qpel_bi_w_h_9","_put_hevc_qpel_bi_w_v_9","_put_hevc_qpel_bi_w_hv_9","_put_hevc_epel_bi_w_h_9","_put_hevc_epel_bi_w_v_9","_put_hevc_epel_bi_w_hv_9","_put_hevc_pel_bi_w_pixels_10","_put_hevc_qpel_bi_w_h_10","_put_hevc_qpel_bi_w_v_10","_put_hevc_qpel_bi_w_hv_10","_put_hevc_epel_bi_w_h_10","_put_hevc_epel_bi_w_v_10","_put_hevc_epel_bi_w_hv_10","_put_hevc_pel_bi_w_pixels_12","_put_hevc_qpel_bi_w_h_12","_put_hevc_qpel_bi_w_v_12","_put_hevc_qpel_bi_w_hv_12","_put_hevc_epel_bi_w_h_12","_put_hevc_epel_bi_w_v_12","_put_hevc_epel_bi_w_hv_12","_put_hevc_pel_bi_w_pixels_8","_put_hevc_qpel_bi_w_h_8","_put_hevc_qpel_bi_w_v_8","_put_hevc_qpel_bi_w_hv_8","_put_hevc_epel_bi_w_h_8","_put_hevc_epel_bi_w_v_8","_put_hevc_epel_bi_w_hv_8"],kr={dd:zi,did:Hi,didd:Vi,fii:Yi,fiii:qi,ii:Xi,iid:Wi,iidiiii:Gi,iii:Ki,iiii:Qi,iiiii:Zi,iiiiii:Ji,iiiiiii:$i,iiiiiiii:er,iiiiij:tr,iiiji:ir,iiijjji:rr,jiiij:nr,jiiji:ar,jiji:sr,v:or,vdiidiiiii:lr,vi:fr,vii:ur,viidi:cr,viifi:hr,viii:dr,viiii:_r,viiiid:pr,viiiifii:mr,viiiii:br,viiiiidd:vr,viiiiii:yr,viiiiiifi:gr,viiiiiii:wr,viiiiiiii:Er,viiiiiiiid:Cr,viiiiiiiidi:Sr,viiiiiiiii:jr,viiiiiiiiii:Tr,viiiiiiiiiii:Ar,viiiiiiiiiiii:xr,viiiiiiiiiiiiii:Mr};function Pr(e){Ie(e,"dd");}function Ir(e){Ie(e,"did");}function Rr(e){Ie(e,"didd");}function Ur(e){Ie(e,"fii");}function Dr(e){Ie(e,"fiii");}function Fr(e){Ie(e,"ii");}function Or(e){Ie(e,"iid");}function Lr(e){Ie(e,"iidiiii");}function Br(e){Ie(e,"iii");}function Nr(e){Ie(e,"iiii");}function zr(e){Ie(e,"iiiii");}function Hr(e){Ie(e,"iiiiii");}function Vr(e){Ie(e,"iiiiiii");}function Yr(e){Ie(e,"iiiiiiii");}function qr(e){Ie(e,"iiiiij");}function Xr(e){Ie(e,"iiiji");}function Wr(e){Ie(e,"iiijjji");}function Gr(e){Ie(e,"jiiij");}function Kr(e){Ie(e,"jiiji");}function Qr(e){Ie(e,"jiji");}function Zr(e){Ie(e,"v");}function Jr(e){Ie(e,"vdiidiiiii");}function $r(e){Ie(e,"vi");}function en(e){Ie(e,"vii");}function tn(e){Ie(e,"viidi");}function rn(e){Ie(e,"viifi");}function nn(e){Ie(e,"viii");}function an(e){Ie(e,"viiii");}function sn(e){Ie(e,"viiiid");}function on(e){Ie(e,"viiiifii");}function ln(e){Ie(e,"viiiii");}function fn(e){Ie(e,"viiiiidd");}function un(e){Ie(e,"viiiiii");}function cn(e){Ie(e,"viiiiiifi");}function hn(e){Ie(e,"viiiiiii");}function dn(e){Ie(e,"viiiiiiii");}function _n(e){Ie(e,"viiiiiiiid");}function pn(e){Ie(e,"viiiiiiiidi");}function mn(e){Ie(e,"viiiiiiiii");}function bn(e){Ie(e,"viiiiiiiiii");}function vn(e){Ie(e,"viiiiiiiiiii");}function yn(e){Ie(e,"viiiiiiiiiiii");}function gn(e){Ie(e,"viiiiiiiiiiiiii");}function wn(e,t){return F[e](t);}function En(e,t,i){return F[e](t,i);}function Cn(e,t,i,r){return F[e](t,i,r);}function Sn(e,t,i){return F[e](t,i);}function jn(e,t,i,r){return F[e](t,i,r);}function Tn(e,t){return F[e](t);}function An(e,t,i){return F[e](t,i);}function xn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s);}function Mn(e,t,i){return F[e](t,i);}function kn(e,t,i,r){return F[e](t,i,r);}function Pn(e,t,i,r,n){return F[e](t,i,r,n);}function In(e,t,i,r,n,a){return F[e](t,i,r,n,a);}function Rn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s);}function Un(e,t,i,r,n,a,s,o){return F[e](t,i,r,n,a,s,o);}function Dn(e,t,i,r,n,a){return F[e](t,i,r,n,a);}function Fn(e,t,i,r,n){return F[e](t,i,r,n);}function On(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s);}function Ln(e,t,i,r,n){return F[e](t,i,r,n);}function Bn(e,t,i,r,n){return F[e](t,i,r,n);}function Nn(e,t,i,r){return F[e](t,i,r);}function zn(e){F[e]();}function Hn(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f);}function Vn(e,t){F[e](t);}function Yn(e,t,i){F[e](t,i);}function qn(e,t,i,r,n){F[e](t,i,r,n);}function Xn(e,t,i,r,n){F[e](t,i,r,n);}function Wn(e,t,i,r){F[e](t,i,r);}function Gn(e,t,i,r,n){F[e](t,i,r,n);}function Kn(e,t,i,r,n,a){F[e](t,i,r,n,a);}function Qn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o);}function Zn(e,t,i,r,n,a){F[e](t,i,r,n,a);}function Jn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o);}function $n(e,t,i,r,n,a,s){F[e](t,i,r,n,a,s);}function ea(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l);}function ta(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o);}function ia(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l);}function ra(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f);}function na(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u);}function aa(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f);}function sa(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u);}function oa(e,t,i,r,n,a,s,o,l,f,u,c){F[e](t,i,r,n,a,s,o,l,f,u,c);}function la(e,t,i,r,n,a,s,o,l,f,u,c,h){F[e](t,i,r,n,a,s,o,l,f,u,c,h);}function fa(e,t,i,r,n,a,s,o,l,f,u,c,h,d,_){F[e](t,i,r,n,a,s,o,l,f,u,c,h,d,_);}var ua={},ca={___buildEnvironment:Et,___lock:Ct,___syscall221:Ft,___syscall3:Ot,___syscall5:Lt,___unlock:Bt,___wasi_fd_close:zt,___wasi_fd_fdstat_get:Vt,___wasi_fd_seek:qt,___wasi_fd_write:Wt,__emscripten_fetch_free:Gt,__memory_base:1024,__table_base:0,_abort:Kt,_clock:Qt,_clock_gettime:$t,_emscripten_asm_const_i:pt,_emscripten_get_heap_size:ei,_emscripten_is_main_browser_thread:ti,_emscripten_memcpy_big:Ci,_emscripten_resize_heap:ri,_emscripten_start_fetch:fi,_fabs:ui,_getenv:ci,_gettimeofday:hi,_gmtime_r:_i,_llvm_exp2_f64:mi,_llvm_log2_f32:bi,_llvm_stackrestore:vi,_llvm_stacksave:yi,_llvm_trunc_f64:gi,_localtime_r:Ei,_nanosleep:ji,_pthread_cond_destroy:Ti,_pthread_cond_init:Ai,_pthread_create:xi,_pthread_join:Mi,_strftime:Di,_sysconf:Fi,_time:Oi,abortStackOverflow:Pe,getTempRet0:H,jsCall_dd:wn,jsCall_did:En,jsCall_didd:Cn,jsCall_fii:Sn,jsCall_fiii:jn,jsCall_ii:Tn,jsCall_iid:An,jsCall_iidiiii:xn,jsCall_iii:Mn,jsCall_iiii:kn,jsCall_iiiii:Pn,jsCall_iiiiii:In,jsCall_iiiiiii:Rn,jsCall_iiiiiiii:Un,jsCall_iiiiij:Dn,jsCall_iiiji:Fn,jsCall_iiijjji:On,jsCall_jiiij:Ln,jsCall_jiiji:Bn,jsCall_jiji:Nn,jsCall_v:zn,jsCall_vdiidiiiii:Hn,jsCall_vi:Vn,jsCall_vii:Yn,jsCall_viidi:qn,jsCall_viifi:Xn,jsCall_viii:Wn,jsCall_viiii:Gn,jsCall_viiiid:Kn,jsCall_viiiifii:Qn,jsCall_viiiii:Zn,jsCall_viiiiidd:Jn,jsCall_viiiiii:$n,jsCall_viiiiiifi:ea,jsCall_viiiiiii:ta,jsCall_viiiiiiii:ia,jsCall_viiiiiiiid:ra,jsCall_viiiiiiiidi:na,jsCall_viiiiiiiii:aa,jsCall_viiiiiiiiii:sa,jsCall_viiiiiiiiiii:oa,jsCall_viiiiiiiiiiii:la,jsCall_viiiiiiiiiiiiii:fa,memory:N,nullFunc_dd:Pr,nullFunc_did:Ir,nullFunc_didd:Rr,nullFunc_fii:Ur,nullFunc_fiii:Dr,nullFunc_ii:Fr,nullFunc_iid:Or,nullFunc_iidiiii:Lr,nullFunc_iii:Br,nullFunc_iiii:Nr,nullFunc_iiiii:zr,nullFunc_iiiiii:Hr,nullFunc_iiiiiii:Vr,nullFunc_iiiiiiii:Yr,nullFunc_iiiiij:qr,nullFunc_iiiji:Xr,nullFunc_iiijjji:Wr,nullFunc_jiiij:Gr,nullFunc_jiiji:Kr,nullFunc_jiji:Qr,nullFunc_v:Zr,nullFunc_vdiidiiiii:Jr,nullFunc_vi:$r,nullFunc_vii:en,nullFunc_viidi:tn,nullFunc_viifi:rn,nullFunc_viii:nn,nullFunc_viiii:an,nullFunc_viiiid:sn,nullFunc_viiiifii:on,nullFunc_viiiii:ln,nullFunc_viiiiidd:fn,nullFunc_viiiiii:un,nullFunc_viiiiiifi:cn,nullFunc_viiiiiii:hn,nullFunc_viiiiiiii:dn,nullFunc_viiiiiiiid:_n,nullFunc_viiiiiiiidi:pn,nullFunc_viiiiiiiii:mn,nullFunc_viiiiiiiiii:bn,nullFunc_viiiiiiiiiii:vn,nullFunc_viiiiiiiiiiii:yn,nullFunc_viiiiiiiiiiiiii:gn,table:Y},ha=d.asm(ua,ca,ue);d.asm=ha;d._AVSniffHttpFlvInit=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffHttpFlvInit.apply(null,arguments);},d._AVSniffStreamInit=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffStreamInit.apply(null,arguments);};var da,_a=d.___emscripten_environ_constructor=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___emscripten_environ_constructor.apply(null,arguments);},pa=(d.___errno_location=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___errno_location.apply(null,arguments);},d.__get_daylight=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_daylight.apply(null,arguments);}),ma=d.__get_timezone=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_timezone.apply(null,arguments);},ba=d.__get_tzname=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_tzname.apply(null,arguments);},va=(d._closeVideo=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._closeVideo.apply(null,arguments);},d._decodeCodecContext=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeCodecContext.apply(null,arguments);},d._decodeHttpFlvVideoFrame=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeHttpFlvVideoFrame.apply(null,arguments);},d._decodeVideoFrame=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeVideoFrame.apply(null,arguments);},d._demuxBox=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._demuxBox.apply(null,arguments);},d._exitMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitMissile.apply(null,arguments);},d._exitTsMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitTsMissile.apply(null,arguments);},d._fflush=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._fflush.apply(null,arguments);},d._free=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._free.apply(null,arguments);}),ya=(d._getAudioCodecID=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getAudioCodecID.apply(null,arguments);},d._getExtensionInfo=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getExtensionInfo.apply(null,arguments);},d._getMediaInfo=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getMediaInfo.apply(null,arguments);},d._getPPS=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPS.apply(null,arguments);},d._getPPSLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPSLen.apply(null,arguments);},d._getPacket=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPacket.apply(null,arguments);},d._getSEI=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEI.apply(null,arguments);},d._getSEILen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEILen.apply(null,arguments);},d._getSPS=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPS.apply(null,arguments);},d._getSPSLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPSLen.apply(null,arguments);},d._getSniffHttpFlvPkg=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkg.apply(null,arguments);},d._getSniffHttpFlvPkgNoCheckProbe=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkgNoCheckProbe.apply(null,arguments);},d._getSniffStreamPkg=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkg.apply(null,arguments);},d._getSniffStreamPkgNoCheckProbe=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkgNoCheckProbe.apply(null,arguments);},d._getVLC=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLC.apply(null,arguments);},d._getVLCLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLCLen.apply(null,arguments);},d._getVPS=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPS.apply(null,arguments);},d._getVPSLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPSLen.apply(null,arguments);},d._getVideoCodecID=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVideoCodecID.apply(null,arguments);},d._initMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initMissile.apply(null,arguments);},d._initTsMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initTsMissile.apply(null,arguments);},d._initializeDecoder=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDecoder.apply(null,arguments);},d._initializeDemuxer=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDemuxer.apply(null,arguments);},d._initializeSniffHttpFlvModule=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModule.apply(null,arguments);},d._initializeSniffHttpFlvModuleWithAOpt=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModuleWithAOpt.apply(null,arguments);},d._initializeSniffStreamModule=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModule.apply(null,arguments);},d._initializeSniffStreamModuleWithAOpt=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModuleWithAOpt.apply(null,arguments);},d._main=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._main.apply(null,arguments);},d._malloc=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._malloc.apply(null,arguments);}),ga=(d._pushSniffHttpFlvData=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffHttpFlvData.apply(null,arguments);},d._pushSniffStreamData=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffStreamData.apply(null,arguments);},d._registerPlayer=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._registerPlayer.apply(null,arguments);},d._release=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._release.apply(null,arguments);},d._releaseSniffHttpFlv=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffHttpFlv.apply(null,arguments);},d._releaseSniffStream=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffStream.apply(null,arguments);},d._setCodecType=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._setCodecType.apply(null,arguments);},d.establishStackSpace=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.establishStackSpace.apply(null,arguments);},d.stackAlloc=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackAlloc.apply(null,arguments);}),wa=d.stackRestore=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackRestore.apply(null,arguments);},Ea=d.stackSave=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackSave.apply(null,arguments);},Ca=(d.dynCall_v=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_v.apply(null,arguments);},d.dynCall_vi=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_vi.apply(null,arguments);});function Sa(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e;}d.asm=ha,Object.getOwnPropertyDescriptor(d,"intArrayFromString")||(d.intArrayFromString=function(){at("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"intArrayToString")||(d.intArrayToString=function(){at("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),d.ccall=G,d.cwrap=K,Object.getOwnPropertyDescriptor(d,"setValue")||(d.setValue=function(){at("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getValue")||(d.getValue=function(){at("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"allocate")||(d.allocate=function(){at("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getMemory")||(d.getMemory=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"AsciiToString")||(d.AsciiToString=function(){at("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stringToAscii")||(d.stringToAscii=function(){at("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"UTF8ArrayToString")||(d.UTF8ArrayToString=function(){at("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"UTF8ToString")||(d.UTF8ToString=function(){at("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stringToUTF8Array")||(d.stringToUTF8Array=function(){at("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stringToUTF8")||(d.stringToUTF8=function(){at("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF8")||(d.lengthBytesUTF8=function(){at("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"UTF16ToString")||(d.UTF16ToString=function(){at("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stringToUTF16")||(d.stringToUTF16=function(){at("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF16")||(d.lengthBytesUTF16=function(){at("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"UTF32ToString")||(d.UTF32ToString=function(){at("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stringToUTF32")||(d.stringToUTF32=function(){at("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF32")||(d.lengthBytesUTF32=function(){at("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"allocateUTF8")||(d.allocateUTF8=function(){at("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stackTrace")||(d.stackTrace=function(){at("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addOnPreRun")||(d.addOnPreRun=function(){at("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addOnInit")||(d.addOnInit=function(){at("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addOnPreMain")||(d.addOnPreMain=function(){at("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addOnExit")||(d.addOnExit=function(){at("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addOnPostRun")||(d.addOnPostRun=function(){at("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"writeStringToMemory")||(d.writeStringToMemory=function(){at("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"writeArrayToMemory")||(d.writeArrayToMemory=function(){at("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"writeAsciiToMemory")||(d.writeAsciiToMemory=function(){at("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addRunDependency")||(d.addRunDependency=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"removeRunDependency")||(d.removeRunDependency=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"ENV")||(d.ENV=function(){at("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"FS")||(d.FS=function(){at("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"FS_createFolder")||(d.FS_createFolder=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createPath")||(d.FS_createPath=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createDataFile")||(d.FS_createDataFile=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createPreloadedFile")||(d.FS_createPreloadedFile=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createLazyFile")||(d.FS_createLazyFile=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createLink")||(d.FS_createLink=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createDevice")||(d.FS_createDevice=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_unlink")||(d.FS_unlink=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"GL")||(d.GL=function(){at("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"dynamicAlloc")||(d.dynamicAlloc=function(){at("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"loadDynamicLibrary")||(d.loadDynamicLibrary=function(){at("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"loadWebAssemblyModule")||(d.loadWebAssemblyModule=function(){at("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getLEB")||(d.getLEB=function(){at("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getFunctionTables")||(d.getFunctionTables=function(){at("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"alignFunctionTables")||(d.alignFunctionTables=function(){at("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"registerFunctions")||(d.registerFunctions=function(){at("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),d.addFunction=O,Object.getOwnPropertyDescriptor(d,"removeFunction")||(d.removeFunction=function(){at("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getFuncWrapper")||(d.getFuncWrapper=function(){at("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"prettyPrint")||(d.prettyPrint=function(){at("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"makeBigInt")||(d.makeBigInt=function(){at("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"dynCall")||(d.dynCall=function(){at("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getCompilerSetting")||(d.getCompilerSetting=function(){at("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stackSave")||(d.stackSave=function(){at("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stackRestore")||(d.stackRestore=function(){at("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stackAlloc")||(d.stackAlloc=function(){at("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"establishStackSpace")||(d.establishStackSpace=function(){at("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"print")||(d.print=function(){at("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"printErr")||(d.printErr=function(){at("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getTempRet0")||(d.getTempRet0=function(){at("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"setTempRet0")||(d.setTempRet0=function(){at("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"callMain")||(d.callMain=function(){at("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"abort")||(d.abort=function(){at("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"Pointer_stringify")||(d.Pointer_stringify=function(){at("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"warnOnce")||(d.warnOnce=function(){at("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"ALLOC_NORMAL")||Object.defineProperty(d,"ALLOC_NORMAL",{configurable:!0,get:function get(){at("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(d,"ALLOC_STACK")||Object.defineProperty(d,"ALLOC_STACK",{configurable:!0,get:function get(){at("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(d,"ALLOC_DYNAMIC")||Object.defineProperty(d,"ALLOC_DYNAMIC",{configurable:!0,get:function get(){at("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(d,"ALLOC_NONE")||Object.defineProperty(d,"ALLOC_NONE",{configurable:!0,get:function get(){at("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(d,"calledRun")||Object.defineProperty(d,"calledRun",{configurable:!0,get:function get(){at("'calledRun' 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");}});function ja(e){X(0==Je,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),X(0==Ue.length,"cannot call main when preRun functions remain to be called");var t=(e=e||[]).length+1,i=ga(4*(t+1));pe[i>>2]=oe(m);for(var r=1;r>2)+r]=oe(e[r-1]);}pe[(i>>2)+t]=0;try{xa(d._main(t,i),!0);}catch(e){if(e instanceof Sa)return;if("SimulateInfiniteLoop"==e)return void(B=!0);var n=e;e&&"object"===u(e)&&e.stack&&(n=[e,e.stack]),k("exception thrown: "+n),b(1,e);}finally{!0;}}function Ta(e){function t(){da||(da=!0,q||(ze(),He(),d.onRuntimeInitialized&&d.onRuntimeInitialized(),Ma&&ja(e),Ye()));}e=e||p,Je>0||(Me(),Ne(),Je>0||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("");},1),t();},1)):t(),ke()));}function Aa(){var e=M,t=k,i=!1;M=k=function k(e){i=!0;};try{var r=d._fflush;r&&r(0),["stdout","stderr"].forEach(function(e){var t=Ut.analyzePath("/dev/"+e);if(t){var r=t.object.rdev,n=At.ttys[r];n&&n.output&&n.output.length&&(i=!0);}});}catch(e){}M=e,k=t,i&&R("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.");}function xa(e,t){Aa(),t&&B&&0===e||(B?t||k("exit("+e+") called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)"):(q=!0,e,Ve(),d.onExit&&d.onExit(e)),b(e,new Sa(e)));}if(et=function e(){da||Ta(),da||(et=e);},d.run=Ta,d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;){d.preInit.pop()();}var Ma=!0;d.noInitialRun&&(Ma=!1),B=!0,Ta(),t.exports=d;}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/src/decoder");},{_process:158,buffer:66,crypto:75,fs:64,path:150}],2:[function(e,t,i){"use strict";var r=i;r.bignum=e("bn.js"),r.define=e("./asn1/api").define,r.base=e("./asn1/base"),r.constants=e("./asn1/constants"),r.decoders=e("./asn1/decoders"),r.encoders=e("./asn1/encoders");},{"./asn1/api":3,"./asn1/base":5,"./asn1/constants":9,"./asn1/decoders":11,"./asn1/encoders":14,"bn.js":16}],3:[function(e,t,i){"use strict";var r=e("./encoders"),n=e("./decoders"),a=e("inherits");function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={};}i.define=function(e,t){return new s(e,t);},s.prototype._createNamed=function(e){var t=this.name;function i(e){this._initNamed(e,t);}return a(i,e),i.prototype._initNamed=function(t,i){e.call(this,t,i);},new i(this);},s.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n[e])),this.decoders[e];},s.prototype.decode=function(e,t,i){return this._getDecoder(t).decode(e,i);},s.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e];},s.prototype.encode=function(e,t,i){return this._getEncoder(t).encode(e,i);};},{"./decoders":11,"./encoders":14,inherits:136}],4:[function(e,t,i){"use strict";var r=e("inherits"),n=e("../base/reporter").Reporter,a=e("safer-buffer").Buffer;function s(e,t){n.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer");}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return o.isEncoderBuffer(e)||(e=new o(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=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+_typeof(e));this.value=e,this.length=e.length;}}r(s,n),i.DecoderBuffer=s,s.isDecoderBuffer=function(e){if(e instanceof s)return!0;return"object"==_typeof(e)&&a.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw;},s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)};},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t;},s.prototype.isEmpty=function(){return this.offset===this.length;},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun");},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var i=new s(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i;},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length);},i.EncoderBuffer=o,o.isEncoderBuffer=function(e){if(e instanceof o)return!0;return"object"==_typeof(e)&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join;},o.prototype.join=function(e,t){return e||(e=a.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,t),t+=i.length;}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e;};},{"../base/reporter":7,inherits:136,"safer-buffer":185}],5:[function(e,t,i){"use strict";var r=i;r.Reporter=e("./reporter").Reporter,r.DecoderBuffer=e("./buffer").DecoderBuffer,r.EncoderBuffer=e("./buffer").EncoderBuffer,r.Node=e("./node");},{"./buffer":4,"./node":6,"./reporter":7}],6:[function(e,t,i){"use strict";var r=e("../base/reporter").Reporter,n=e("../base/buffer").EncoderBuffer,a=e("../base/buffer").DecoderBuffer,s=e("minimalistic-assert"),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function f(e,t,i){var r={};this._baseState=r,r.name=i,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());}t.exports=f;var u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){var e=this._baseState,t={};u.forEach(function(i){t[i]=e[i];});var i=new this.constructor(t.parent);return i._baseState=t,i;},f.prototype._wrap=function(){var e=this._baseState;l.forEach(function(t){this[t]=function(){var i=new this.constructor(this);return e.children.push(i),i[t].apply(i,arguments);};},this);},f.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");},f.prototype._useArgs=function(e){var t=this._baseState,i=e.filter(function(e){return e instanceof this.constructor;},this);e=e.filter(function(e){return!(e instanceof this.constructor);},this),0!==i.length&&(s(null===t.children),t.children=i,i.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(i){i==(0|i)&&(i|=0);var r=e[i];t[r]=i;}),t;}));},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){f.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc);};}),o.forEach(function(e){f.prototype[e]=function(){var t=this._baseState,i=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(i),this;};}),f.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this;},f.prototype.optional=function(){return this._baseState.optional=!0,this;},f.prototype.def=function(e){var t=this._baseState;return s(null===t["default"]),t["default"]=e,t.optional=!0,this;},f.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this;},f.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this;},f.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this;},f.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this;},f.prototype.any=function(){return this._baseState.any=!0,this;},f.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;},f.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this;},f.prototype._decode=function(e,t){var i=this._baseState;if(null===i.parent)return e.wrapResult(i.children[0]._decode(e,t));var r,n=i["default"],s=!0,o=null;if(null!==i.key&&(o=e.enterKey(i.key)),i.optional){var _r2=null;if(null!==i.explicit?_r2=i.explicit:null!==i.implicit?_r2=i.implicit:null!==i.tag&&(_r2=i.tag),null!==_r2||i.any){if(s=this._peekTag(e,_r2,i.any),e.isError(s))return s;}else{var _r3=e.save();try{null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t),s=!0;}catch(e){s=!1;}e.restore(_r3);}}if(i.obj&&s&&(r=e.enterObject()),s){if(null!==i.explicit){var _t2=this._decodeTag(e,i.explicit);if(e.isError(_t2))return _t2;e=_t2;}var _r4=e.offset;if(null===i.use&&null===i.choice){var _t3;i.any&&(_t3=e.save());var _r5=this._decodeTag(e,null!==i.implicit?i.implicit:i.tag,i.any);if(e.isError(_r5))return _r5;i.any?n=e.raw(_t3):e=_r5;}if(t&&t.track&&null!==i.tag&&t.track(e.path(),_r4,e.length,"tagged"),t&&t.track&&null!==i.tag&&t.track(e.path(),e.offset,e.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach(function(i){i._decode(e,t);}),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){var _r6=new a(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(_r6,t);}}return i.obj&&s&&(n=e.leaveObject(r)),null===i.key||null===n&&!0!==s?null!==o&&e.exitKey(o):e.leaveKey(o,i.key,n),n;},f.prototype._decodeGeneric=function(e,t,i){var r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],i):/str$/.test(e)?this._decodeStr(t,e,i):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],i):"objid"===e?this._decodeObjid(t,null,null,i):"gentime"===e||"utctime"===e?this._decodeTime(t,e,i):"null_"===e?this._decodeNull(t,i):"bool"===e?this._decodeBool(t,i):"objDesc"===e?this._decodeStr(t,e,i):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,i):t.error("unknown tag: "+e);},f.prototype._getUse=function(e,t){var i=this._baseState;return i.useDecoder=this._use(e,t),s(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder;},f.prototype._decodeChoice=function(e,t){var i=this._baseState;var r=null,n=!1;return Object.keys(i.choice).some(function(a){var s=e.save(),o=i.choice[a];try{var _i2=o._decode(e,t);if(e.isError(_i2))return!1;r={type:a,value:_i2},n=!0;}catch(t){return e.restore(s),!1;}return!0;},this),n?r:e.error("Choice not matched");},f.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter);},f.prototype._encode=function(e,t,i){var r=this._baseState;if(null!==r["default"]&&r["default"]===e)return;var n=this._encodeValue(e,t,i);return void 0===n||this._skipDefault(n,t,i)?void 0:n;},f.prototype._encodeValue=function(e,t,i){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new r());var a=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n["default"])return;e=n["default"];}var s=null,o=!1;if(n.any)a=this._createEncoderBuffer(e);else if(n.choice)a=this._encodeChoice(e,t);else if(n.contains)s=this._getUse(n.contains,i)._encode(e,t),o=!0;else if(n.children)s=n.children.map(function(i){if("null_"===i._baseState.tag)return i._encode(null,t,e);if(null===i._baseState.key)return t.error("Child should have a key");var r=t.enterKey(i._baseState.key);if("object"!=_typeof(e))return t.error("Child expected, but input is not object");var n=i._encode(e[i._baseState.key],t,e);return t.leaveKey(r),n;},this).filter(function(e){return e;}),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var _i3=this.clone();_i3._baseState.implicit=null,s=this._createEncoderBuffer(e.map(function(i){var r=this._baseState;return this._getUse(r.args[0],e)._encode(i,t);},_i3));}else null!==n.use?a=this._getUse(n.use,i)._encode(e,t):(s=this._encodePrimitive(n.tag,e),o=!0);if(!n.any&&null===n.choice){var _e3=null!==n.implicit?n.implicit:n.tag,_i4=null===n.implicit?"universal":"context";null===_e3?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(a=this._encodeComposite(_e3,o,_i4,s));}return null!==n.explicit&&(a=this._encodeComposite(n.explicit,!1,"context",a)),a;},f.prototype._encodeChoice=function(e,t){var i=this._baseState,r=i.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(e.value,t);},f.prototype._encodePrimitive=function(e,t){var i=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&i.args)return this._encodeObjid(t,i.reverseArgs[0],i.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,i.args&&i.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e);},f.prototype._isNumstr=function(e){return /^[0-9 ]*$/.test(e);},f.prototype._isPrintstr=function(e){return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(e);};},{"../base/buffer":4,"../base/reporter":7,"minimalistic-assert":142}],7:[function(e,t,i){"use strict";var r=e("inherits");function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]};}function a(e,t){this.path=e,this.rethrow(t);}i.Reporter=n,n.prototype.isError=function(e){return e instanceof a;},n.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length};},n.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen);},n.prototype.enterKey=function(e){return this._reporterState.path.push(e);},n.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1);},n.prototype.leaveKey=function(e,t,i){var r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=i);},n.prototype.path=function(){return this._reporterState.path.join("/");},n.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t;},n.prototype.leaveObject=function(e){var t=this._reporterState,i=t.obj;return t.obj=e,i;},n.prototype.error=function(e){var t;var i=this._reporterState,r=e instanceof a;if(t=r?e:new a(i.path.map(function(e){return"["+JSON.stringify(e)+"]";}).join(""),e.message||e,e.stack),!i.options.partial)throw t;return r||i.errors.push(t),t;},n.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e;},r(a,Error),a.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message);}catch(e){this.stack=e.stack;}return this;};},{inherits:136}],8:[function(e,t,i){"use strict";function r(e){var t={};return Object.keys(e).forEach(function(i){(0|i)==i&&(i|=0);var r=e[i];t[r]=i;}),t;}i.tagClass={0:"universal",1:"application",2:"context",3:"private"},i.tagClassByName=r(i.tagClass),i.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"},i.tagByName=r(i.tag);},{}],9:[function(e,t,i){"use strict";var r=i;r._reverse=function(e){var t={};return Object.keys(e).forEach(function(i){(0|i)==i&&(i|=0);var r=e[i];t[r]=i;}),t;},r.der=e("./der");},{"./der":8}],10:[function(e,t,i){"use strict";var r=e("inherits"),n=e("bn.js"),a=e("../base/buffer").DecoderBuffer,s=e("../base/node"),o=e("../constants/der");function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f(),this.tree._init(e.body);}function f(e){s.call(this,"der",e);}function u(e,t){var i=e.readUInt8(t);if(e.isError(i))return i;var r=o.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){var _r7=i;for(i=0;128==(128&_r7);){if(_r7=e.readUInt8(t),e.isError(_r7))return _r7;i<<=7,i|=127&_r7;}}else i&=31;return{cls:r,primitive:n,tag:i,tagStr:o.tag[i]};}function c(e,t,i){var r=e.readUInt8(i);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;var n=127&r;if(n>4)return e.error("length octect is too long");r=0;for(var _t4=0;_t4=31)return r.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=s.tagClassByName[i||"universal"]<<6,n;}(e,t,i,this.reporter);if(r.length<128){var _e7=n.alloc(2);return _e7[0]=a,_e7[1]=r.length,this._createEncoderBuffer([_e7,r]);}var o=1;for(var _e8=r.length;_e8>=256;_e8>>=8){o++;}var l=n.alloc(2+o);l[0]=a,l[1]=128|o;for(var _e9=1+o,_t12=r.length;_t12>0;_e9--,_t12>>=8){l[_e9]=255&_t12;}return this._createEncoderBuffer([l,r]);},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){var _t13=n.alloc(2*e.length);for(var _i7=0;_i7=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1]);}var r=0;for(var _t16=0;_t16=128;_i8>>=7){r++;}}var a=n.alloc(r);var s=a.length-1;for(var _t17=e.length-1;_t17>=0;_t17--){var _i9=e[_t17];for(a[s--]=127&_i9;(_i9>>=7)>0;){a[s--]=128|127&_i9;}}return this._createEncoderBuffer(a);},l.prototype._encodeTime=function(e,t){var i;var r=new Date(e);return"gentime"===t?i=[f(r.getUTCFullYear()),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?i=[f(r.getUTCFullYear()%100),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(i,"octstr");},l.prototype._encodeNull=function(){return this._createEncoderBuffer("");},l.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&&!n.isBuffer(e)){var _t18=e.toArray();!e.sign&&128&_t18[0]&&_t18.unshift(0),e=n.from(_t18);}if(n.isBuffer(e)){var _t19=e.length;0===e.length&&_t19++;var _i10=n.alloc(_t19);return e.copy(_i10),0===e.length&&(_i10[0]=0),this._createEncoderBuffer(_i10);}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);var i=1;for(var _t20=e;_t20>=256;_t20>>=8){i++;}var r=new Array(i);for(var _t21=r.length-1;_t21>=0;_t21--){r[_t21]=255&e,e>>=8;}return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(n.from(r));},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0);},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree;},l.prototype._skipDefault=function(e,t,i){var r=this._baseState;var n;if(null===r["default"])return!1;var a=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r["default"],t,i).join()),a.length!==r.defaultBuffer.length)return!1;for(n=0;n=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s;}return r;}function l(e,t,i,r){for(var n=0,a=Math.min(e.length,i),s=t;s=49?o-49+10:o>=17?o-17+10:o;}return n;}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,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==_typeof(e))return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),t,i);},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i);},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3){s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);}else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6){n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);}i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this.strip();},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t){r++;}r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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?"";};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,c=67108863&l,h=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=h;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+c)/67108864|0,c=67108863&s;}i.words[f]=0|c,l=0|u;}return 0!==l?i.words[f]=0|l:i.length--,i.strip();}a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?f[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--);}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;){i="0"+i;}return 0!==this.negative&&(i="-"+i),i;}if(e===(0|e)&&e>=2&&e<=36){var h=u[e],d=c[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modn(d).toString(e);i=(_=_.idivn(d)).isZero()?p+i:f[h-p.length]+p+i;}for(this.isZero()&&(i="0"+i);i.length%t!=0;){i="0"+i;}return 0!==this.negative&&(i="-"+i),i;}r(!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&&r(!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 r(void 0!==s),this.toArrayLike(s,e,t);},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t);},a.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var s,o,l="le"===t,f=new e(a),u=this.clone();if(l){for(o=0;!u.isZero();o++){s=u.andln(255),u.iushrn(8),f[o]=s;}for(;o=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t;},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i;},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip();},a.prototype.notn=function(e){return this.clone().inotn(e);},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;}for(;0!==n&&a>>26;}if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;}for(;0!==a&&s>26,this.words[s]=67108863&t;}if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,X=0|o[2],W=8191&X,G=X>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],ce=8191&ue,he=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(c,z))|0)+((8191&(n=(n=Math.imul(c,H))+Math.imul(h,z)|0))<<13)|0;f=((a=Math.imul(h,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(c,Y)|0)|0)+((8191&(n=(n=n+Math.imul(c,q)|0)+Math.imul(h,Y)|0))<<13)|0;f=((a=a+Math.imul(h,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(h,W)|0))<<13)|0;f=((a=a+Math.imul(h,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,W)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,Z)|0)+Math.imul(h,Q)|0))<<13)|0;f=((a=a+Math.imul(h,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,W)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,W)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,ee)|0)+Math.imul(h,$)|0))<<13)|0;f=((a=a+Math.imul(h,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,W)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(c,ie)|0)|0)+((8191&(n=(n=n+Math.imul(c,re)|0)+Math.imul(h,ie)|0))<<13)|0;f=((a=a+Math.imul(h,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,W)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(c,ae)|0)|0)+((8191&(n=(n=n+Math.imul(c,se)|0)+Math.imul(h,ae)|0))<<13)|0;f=((a=a+Math.imul(h,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,W)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(c,le)|0)|0)+((8191&(n=(n=n+Math.imul(c,fe)|0)+Math.imul(h,le)|0))<<13)|0;f=((a=a+Math.imul(h,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,W)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(c,ce)|0)|0)+((8191&(n=(n=n+Math.imul(c,he)|0)+Math.imul(h,ce)|0))<<13)|0;f=((a=a+Math.imul(h,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,ce)|0,n=(n=n+Math.imul(_,he)|0)+Math.imul(p,ce)|0,a=a+Math.imul(p,he)|0;var je=(f+(r=r+Math.imul(c,_e)|0)|0)+((8191&(n=(n=n+Math.imul(c,pe)|0)+Math.imul(h,_e)|0))<<13)|0;f=((a=a+Math.imul(h,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,W)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,ce)|0,n=(n=n+Math.imul(b,he)|0)+Math.imul(v,ce)|0,a=a+Math.imul(v,he)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,W),n=(n=Math.imul(L,G))+Math.imul(B,W)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,ce)|0,n=(n=n+Math.imul(g,he)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,he)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,ce)|0,n=(n=n+Math.imul(C,he)|0)+Math.imul(S,ce)|0,a=a+Math.imul(S,he)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,ce)|0,n=(n=n+Math.imul(T,he)|0)+Math.imul(A,ce)|0,a=a+Math.imul(A,he)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,ce)|0,n=(n=n+Math.imul(M,he)|0)+Math.imul(k,ce)|0,a=a+Math.imul(k,he)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(R,ce)|0,a=a+Math.imul(R,he)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,ce)|0,n=(n=n+Math.imul(D,he)|0)+Math.imul(F,ce)|0,a=a+Math.imul(F,he)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,ce),n=(n=Math.imul(L,he))+Math.imul(B,ce)|0,a=Math.imul(B,he);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i;};function _(e,t,i){return new p().mulp(e,t,i);}function p(e,t){this.x=e,this.y=t;}Math.imul||(d=h),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):i<63?h(this,e,t):i<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863;}i.words[a]=o,r=s,s=n;}return 0!==r?i.words[a]=r:i.length--,i.strip();}(this,e,t):_(this,e,t);},p.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;}return r;},p.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1){n++;}return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;}for(s=2*t;s>=26,t+=n/67108864|0,t+=a>>>26,this.words[i]=67108863&a;}return 0!==t&&(this.words[i]=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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n;}return t;}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i;}s&&(this.words[t]=s,this.length++);}if(0!==n){for(t=this.length-1;t>=0;t--){this.words[t+n]=this.words[t];}for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var c=0|this.words[f];this.words[f]=u<<26-a|c>>>a,u=c&o;}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip();},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i);},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++){this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;}return this.length=Math.max(this.length,t+1),this;},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a;}for(;n>26,this.words[n+i]=67108863&a;}if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;}return this.negative=1,this.strip();},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;c--){var h=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(h=Math.min(h/s|0,67108863),r._ishlnsubmul(n,h,c);0!==r.negative;){h--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);}o&&(o.words[c]=h);}return o&&o.strip(),r.strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r};},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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);var n,s,o;},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);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){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--){i=(t*i+(0|this.words[n]))%e;}return i;},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e;}return this.strip();},a.prototype.divn=function(e){return this.clone().idivn(e);},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();){t.iushrn(1),i.iushrn(1),++f;}for(var u=i.clone(),c=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1){;}if(h>0)for(t.iushrn(h);h-->0;){(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(c)),n.iushrn(1),s.iushrn(1);}for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1){;}if(_>0)for(i.iushrn(_);_-->0;){(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(c)),o.iushrn(1),l.iushrn(1);}t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s));}return{a:o,b:l,gcd:i.iushln(f)};},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1){;}if(f>0)for(t.iushrn(f);f-->0;){s.isOdd()&&s.iadd(l),s.iushrn(1);}for(var c=0,h=1;0==(i.words[0]&h)&&c<26;++c,h<<=1){;}if(c>0)for(i.iushrn(c);c-->0;){o.isOdd()&&o.iadd(l),o.iushrn(1);}t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s));}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n;},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++){t.iushrn(1),i.iushrn(1);}for(;;){for(;t.isEven();){t.iushrn(1);}for(;i.isEven();){i.iushrn(1);}var n=t.cmp(i);if(n<0){var a=t;t=i,i=a;}else if(0===n||0===i.cmpn(1))break;t.isub(i);}return i.iushln(r);},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o;}return 0!==a&&(this.words[s]=a,this.length++),this;},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0];},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 E(e);},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e);},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e);},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e);},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e);},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e);},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e);},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e);},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e);},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e);},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this);},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this);},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this);},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this);},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this);},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e);};var m={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function g(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function E(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t;}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null;}function C(e){E.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);}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e;},b.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength();}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i;},b.prototype.split=function(e,t){e.iushrn(this.n,0,t);},b.prototype.imulK=function(e){return e.imul(this.k);},n(v,b),v.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a;}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9;},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r;}return 0!==t&&(e.words[e.length++]=t),e;},a._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v();else if("p224"===e)t=new y();else if("p192"===e)t=new g();else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w();}return m[e]=t,t;},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers");},E.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers");},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this);},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this);},E.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this);},E.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i;},E.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this);},E.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i;},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t));},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t));},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t));},E.prototype.isqr=function(e){return this.imul(e,e.clone());},E.prototype.sqr=function(e){return this.mul(e,e);},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i);}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);){s++,n.iushrn(1);}r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);){u.redIAdd(l);}for(var c=this.pow(u,n),h=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++){p=p.redSqr();}r(m<_);var b=this.pow(c,new a(1).iushln(_-m-1));h=h.redMul(b),c=b.redSqr(),d=d.redMul(c),_=m;}return h;},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t);},E.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var c=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==c||0!==s?(s<<=1,s|=c,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0;}l=26;}return n;},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t;},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t;},a.mont=function(e){return new C(e);},n(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift));},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t;},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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);},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this);},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this);};}(void 0===t||t,this);},{buffer:20}],17:[function(e,t,i){"use strict";i.byteLength=function(e){var t=f(e),i=t[0],r=t[1];return 3*(i+r)/4-r;},i.toByteArray=function(e){var t,i,r=f(e),s=r[0],o=r[1],l=new a(function(e,t,i){return 3*(t+i)/4-i;}(0,s,o)),u=0,c=o>0?s-4:s;for(i=0;i>16&255,l[u++]=t>>8&255,l[u++]=255&t;}2===o&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,l[u++]=255&t);1===o&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l;},i.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],s=0,o=i-n;so?o:s+16383));}1===n?(t=e[i-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("");};for(var r=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4];}function u(e,t,i){for(var n,a,s=[],o=t;o>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);}return s.join("");}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63;},{}],18:[function(e,t,i){!function(t,i){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed");}function n(e,t){e.super_=t;var i=function i(){};i.prototype=t.prototype,e.prototype=new i(),e.prototype.constructor=e;}function a(e,t,i){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"));}var s;"object"==_typeof(t)?t.exports=a:i.BN=a,a.BN=a,a.wordSize=26;try{s=e("buffer").Buffer;}catch(e){}function o(e,t,i){for(var n=0,a=Math.min(e.length,i),s=0,o=t;o=49&&f<=54?f-49+10:f>=17&&f<=22?f-17+10:f,s|=l;}return r(!(240&s),"Invalid character in "+e),n;}function l(e,t,i,n){for(var a=0,s=0,o=Math.min(e.length,i),l=t;l=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&s0?e:t;},a.min=function(e,t){return e.cmp(t)<0?e:t;},a.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==_typeof(e))return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this._strip(),"le"===i&&this._initArray(this.toArray(),t,i);},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i);},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3){s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);}else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6){n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);}i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this._strip();},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t){r++;}r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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;},"undefined"!=typeof Symbol&&"function"==typeof Symbol["for"])try{a.prototype[Symbol["for"]("nodejs.util.inspect.custom")]=u;}catch(e){a.prototype.inspect=u;}else a.prototype.inspect=u;function u(){return(this.red?"";}var c=["","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"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?c[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--);}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;){i="0"+i;}return 0!==this.negative&&(i="-"+i),i;}if(e===(0|e)&&e>=2&&e<=36){var f=h[e],u=d[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modrn(u).toString(e);i=(_=_.idivn(u)).isZero()?p+i:c[f-p.length]+p+i;}for(this.isZero()&&(i="0"+i);i.length%t!=0;){i="0"+i;}return 0!==this.negative&&(i="-"+i),i;}r(!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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e;},a.prototype.toJSON=function(){return this.toString(16,2);},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t);}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t);};function _(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,c=67108863&l,h=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=h;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+c)/67108864|0,c=67108863&s;}i.words[f]=0|c,l=0|u;}return 0!==l?i.words[f]=0|l:i.length--,i._strip();}a.prototype.toArrayLike=function(e,t,i){this._strip();var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t);}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,n),s;},a.prototype._toArrayLikeLE=function(e,t){for(var i=0,r=0,n=0,a=0;n>8&255),i>16&255),6===a?(i>24&255),r=0,a=0):(r=s>>>24,a+=2);}if(i=0&&(e[i--]=s>>8&255),i>=0&&(e[i--]=s>>16&255),6===a?(i>=0&&(e[i--]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2);}if(i>=0)for(e[i--]=r;i>=0;){e[i--]=0;}},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e);}:a.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t;},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i;},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip();},a.prototype.notn=function(e){return this.clone().inotn(e);},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;}for(;0!==n&&a>>26;}if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;}for(;0!==a&&s>26,this.words[s]=67108863&t;}if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,X=0|o[2],W=8191&X,G=X>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],ce=8191&ue,he=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(c,z))|0)+((8191&(n=(n=Math.imul(c,H))+Math.imul(h,z)|0))<<13)|0;f=((a=Math.imul(h,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(c,Y)|0)|0)+((8191&(n=(n=n+Math.imul(c,q)|0)+Math.imul(h,Y)|0))<<13)|0;f=((a=a+Math.imul(h,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(h,W)|0))<<13)|0;f=((a=a+Math.imul(h,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,W)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,Z)|0)+Math.imul(h,Q)|0))<<13)|0;f=((a=a+Math.imul(h,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,W)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,W)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,ee)|0)+Math.imul(h,$)|0))<<13)|0;f=((a=a+Math.imul(h,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,W)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(c,ie)|0)|0)+((8191&(n=(n=n+Math.imul(c,re)|0)+Math.imul(h,ie)|0))<<13)|0;f=((a=a+Math.imul(h,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,W)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(c,ae)|0)|0)+((8191&(n=(n=n+Math.imul(c,se)|0)+Math.imul(h,ae)|0))<<13)|0;f=((a=a+Math.imul(h,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,W)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(c,le)|0)|0)+((8191&(n=(n=n+Math.imul(c,fe)|0)+Math.imul(h,le)|0))<<13)|0;f=((a=a+Math.imul(h,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,W)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(c,ce)|0)|0)+((8191&(n=(n=n+Math.imul(c,he)|0)+Math.imul(h,ce)|0))<<13)|0;f=((a=a+Math.imul(h,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,ce)|0,n=(n=n+Math.imul(_,he)|0)+Math.imul(p,ce)|0,a=a+Math.imul(p,he)|0;var je=(f+(r=r+Math.imul(c,_e)|0)|0)+((8191&(n=(n=n+Math.imul(c,pe)|0)+Math.imul(h,_e)|0))<<13)|0;f=((a=a+Math.imul(h,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,W)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,ce)|0,n=(n=n+Math.imul(b,he)|0)+Math.imul(v,ce)|0,a=a+Math.imul(v,he)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,W),n=(n=Math.imul(L,G))+Math.imul(B,W)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,ce)|0,n=(n=n+Math.imul(g,he)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,he)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,ce)|0,n=(n=n+Math.imul(C,he)|0)+Math.imul(S,ce)|0,a=a+Math.imul(S,he)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,ce)|0,n=(n=n+Math.imul(T,he)|0)+Math.imul(A,ce)|0,a=a+Math.imul(A,he)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,ce)|0,n=(n=n+Math.imul(M,he)|0)+Math.imul(k,ce)|0,a=a+Math.imul(k,he)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(R,ce)|0,a=a+Math.imul(R,he)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,ce)|0,n=(n=n+Math.imul(D,he)|0)+Math.imul(F,ce)|0,a=a+Math.imul(F,he)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,ce),n=(n=Math.imul(L,he))+Math.imul(B,ce)|0,a=Math.imul(B,he);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i;};function m(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863;}i.words[a]=o,r=s,s=n;}return 0!==r?i.words[a]=r:i.length--,i._strip();}function b(e,t,i){return m(e,t,i);}function v(e,t){this.x=e,this.y=t;}Math.imul||(p=_),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):i<63?_(this,e,t):i<1024?m(this,e,t):b(this,e,t);},v.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;}return r;},v.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1){n++;}return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;}for(s=2*t;s>=26,i+=a/67108864|0,i+=s>>>26,this.words[n]=67108863&s;}return 0!==i&&(this.words[n]=i,this.length++),t?this.ineg():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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n&1;}return t;}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i;}s&&(this.words[t]=s,this.length++);}if(0!==n){for(t=this.length-1;t>=0;t--){this.words[t+n]=this.words[t];}for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var c=0|this.words[f];this.words[f]=u<<26-a|c>>>a,u=c&o;}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip();},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i);},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++){this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;}return this.length=Math.max(this.length,t+1),this;},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a;}for(;n>26,this.words[n+i]=67108863&a;}if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;}return this.negative=1,this._strip();},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;c--){var h=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(h=Math.min(h/s|0,67108863),r._ishlnsubmul(n,h,c);0!==r.negative;){h--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);}o&&(o.words[c]=h);}return o&&o._strip(),r._strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r};},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,s,o;},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1);},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=(1<<26)%e,n=0,a=this.length-1;a>=0;a--){n=(i*n+(0|this.words[a]))%e;}return t?-n:n;},a.prototype.modn=function(e){return this.modrn(e);},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var a=(0|this.words[n])+67108864*i;this.words[n]=a/e|0,i=a%e;}return this._strip(),t?this.ineg():this;},a.prototype.divn=function(e){return this.clone().idivn(e);},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();){t.iushrn(1),i.iushrn(1),++f;}for(var u=i.clone(),c=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1){;}if(h>0)for(t.iushrn(h);h-->0;){(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(c)),n.iushrn(1),s.iushrn(1);}for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1){;}if(_>0)for(i.iushrn(_);_-->0;){(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(c)),o.iushrn(1),l.iushrn(1);}t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s));}return{a:o,b:l,gcd:i.iushln(f)};},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1){;}if(f>0)for(t.iushrn(f);f-->0;){s.isOdd()&&s.iadd(l),s.iushrn(1);}for(var c=0,h=1;0==(i.words[0]&h)&&c<26;++c,h<<=1){;}if(c>0)for(i.iushrn(c);c-->0;){o.isOdd()&&o.iadd(l),o.iushrn(1);}t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s));}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n;},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++){t.iushrn(1),i.iushrn(1);}for(;;){for(;t.isEven();){t.iushrn(1);}for(;i.isEven();){i.iushrn(1);}var n=t.cmp(i);if(n<0){var a=t;t=i,i=a;}else if(0===n||0===i.cmpn(1))break;t.isub(i);}return i.iushln(r);},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o;}return 0!==a&&(this.words[s]=a,this.length++),this;},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0];},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 j(e);},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e);},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e);},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e);},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e);},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e);},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e);},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e);},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e);},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e);},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this);},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this);},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this);},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this);},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this);},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e);};var y={k256:null,p224:null,p192:null,p25519:null};function g(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 w(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function E(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function C(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function j(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t;}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null;}function T(e){j.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);}g.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e;},g.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength();}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i;},g.prototype.split=function(e,t){e.iushrn(this.n,0,t);},g.prototype.imulK=function(e){return e.imul(this.k);},n(w,g),w.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a;}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9;},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r;}return 0!==t&&(e.words[e.length++]=t),e;},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w();else if("p224"===e)t=new E();else if("p192"===e)t=new C();else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S();}return y[e]=t,t;},j.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers");},j.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers");},j.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e);},j.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this);},j.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this);},j.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i;},j.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this);},j.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i;},j.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t));},j.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t));},j.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t));},j.prototype.isqr=function(e){return this.imul(e,e.clone());},j.prototype.sqr=function(e){return this.mul(e,e);},j.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i);}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);){s++,n.iushrn(1);}r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);){u.redIAdd(l);}for(var c=this.pow(u,n),h=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++){p=p.redSqr();}r(m<_);var b=this.pow(c,new a(1).iushln(_-m-1));h=h.redMul(b),c=b.redSqr(),d=d.redMul(c),_=m;}return h;},j.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t);},j.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var c=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==c||0!==s?(s<<=1,s|=c,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0;}l=26;}return n;},j.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t;},j.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t;},a.mont=function(e){return new T(e);},n(T,j),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift));},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t;},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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);},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this);},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this);};}(void 0===t||t,this);},{buffer:20}],19:[function(e,t,i){var r;function n(e){this.rand=e;}if(t.exports=function(e){return r||(r=new n(null)),r.generate(e);},t.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e);},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i>>24]^u[_>>>16&255]^c[p>>>8&255]^h[255&m]^t[b++],s=f[_>>>24]^u[p>>>16&255]^c[m>>>8&255]^h[255&d]^t[b++],o=f[p>>>24]^u[m>>>16&255]^c[d>>>8&255]^h[255&_]^t[b++],l=f[m>>>24]^u[d>>>16&255]^c[_>>>8&255]^h[255&p]^t[b++],d=a,_=s,p=o,m=l;}return a=(r[d>>>24]<<24|r[_>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[b++],s=(r[_>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&d])^t[b++],o=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[d>>>8&255]<<8|r[255&_])^t[b++],l=(r[m>>>24]<<24|r[d>>>16&255]<<16|r[_>>>8&255]<<8|r[255&p])^t[b++],[a>>>=0,s>>>=0,o>>>=0,l>>>=0];}var o=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++){e[t]=t<128?t<<1:t<<1^283;}for(var i=[],r=[],n=[[],[],[],[]],a=[[],[],[],[]],s=0,o=0,l=0;l<256;++l){var f=o^o<<1^o<<2^o<<3^o<<4;f=f>>>8^255&f^99,i[s]=f,r[f]=s;var u=e[s],c=e[u],h=e[c],d=257*e[f]^16843008*f;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*h^65537*c^257*u^16843008*s,a[0][f]=d<<24|d>>>8,a[1][f]=d<<16|d>>>16,a[2][f]=d<<8|d>>>24,a[3][f]=d,0===s?s=o=1:(s=u^e[e[e[h^u]]],o^=e[e[o]]);}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:a};}();function f(e){this._key=n(e),this._reset();}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var e=this._key,t=e.length,i=t+6,r=4*(i+1),n=[],a=0;a>>24,s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s],s^=o[a/t|0]<<24):t>6&&a%t==4&&(s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s]),n[a]=n[a-t]^s;}for(var f=[],u=0;u>>24]]^l.INV_SUB_MIX[1][l.SBOX[h>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[h>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&h]];}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=f;},f.prototype.encryptBlockRaw=function(e){return s(e=n(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds);},f.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),i=r.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[1],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[3],12),i;},f.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var i=s(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),a=r.allocUnsafe(16);return a.writeUInt32BE(i[0],0),a.writeUInt32BE(i[3],4),a.writeUInt32BE(i[2],8),a.writeUInt32BE(i[1],12),a;},f.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key);},t.exports.AES=f;},{"safe-buffer":184}],22:[function(e,t,i){var r=e("./aes"),n=e("safe-buffer").Buffer,a=e("cipher-base"),s=e("inherits"),o=e("./ghash"),l=e("buffer-xor"),f=e("./incr32");function u(e,t,i,s){a.call(this);var l=n.alloc(4,0);this._cipher=new r.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new o(u),i=function(e,t,i){if(12===t.length)return e._finID=n.concat([t,n.from([0,0,0,1])]),n.concat([t,n.from([0,0,0,2])]);var r=new o(i),a=t.length,s=a%16;r.update(t),s&&(s=16-s,r.update(n.alloc(s,0))),r.update(n.alloc(8,0));var l=8*a,u=n.alloc(8);u.writeUIntBE(l,0,8),r.update(u),e._finID=r.state;var c=n.from(e._finID);return f(c),c;}(this,i,u),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1;}s(u,a),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=n.alloc(t,0),this._ghash.update(t));}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i;},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash["final"](8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var i=0;e.length!==t.length&&i++;for(var r=Math.min(e.length,t.length),n=0;n16)throw new Error("unable to decrypt data");var i=-1;for(;++i16)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;},c.prototype.flush=function(){if(this.cache.length)return this.cache;},i.createDecipher=function(e,t){var i=a[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=f(t,!1,i.key,i.iv);return h(e,r.key,r.iv);},i.createDecipheriv=h;},{"./aes":21,"./authCipher":22,"./modes":34,"./streamCipher":37,"cipher-base":67,evp_bytestokey:105,inherits:136,"safe-buffer":184}],25:[function(e,t,i){var r=e("./modes"),n=e("./authCipher"),a=e("safe-buffer").Buffer,s=e("./streamCipher"),o=e("cipher-base"),l=e("./aes"),f=e("evp_bytestokey");function u(e,t,i){o.call(this),this._cache=new h(),this._cipher=new l.AES(t),this._prev=a.from(i),this._mode=e,this._autopadding=!0;}e("inherits")(u,o),u.prototype._update=function(e){var t,i;this._cache.add(e);for(var r=[];t=this._cache.get();){i=this._mode.encrypt(this,t),r.push(i);}return a.concat(r);};var c=a.alloc(16,16);function h(){this.cache=a.allocUnsafe(0);}function d(e,t,i){var o=r[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=a.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof i&&(i=a.from(i)),"GCM"!==o.mode&&i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new s(o.module,t,i):"auth"===o.type?new n(o.module,t,i):new u(o.module,t,i);}u.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(c))throw this._cipher.scrub(),new Error("data not multiple of block length");},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this;},h.prototype.add=function(e){this.cache=a.concat([this.cache,e]);},h.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;},h.prototype.flush=function(){for(var e=16-this.cache.length,t=a.allocUnsafe(e),i=-1;++i>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t;}function s(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0);}s.prototype.ghash=function(e){for(var t=-1;++t0;t--){r[t]=r[t]>>>1|(1&r[t-1])<<31;}r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24);}this.state=a(n);},s.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;){t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t);}},s.prototype["final"]=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(a([0,e,0,t])),this.state;},t.exports=s;},{"safe-buffer":184}],27:[function(e,t,i){t.exports=function(e){for(var t,i=e.length;i--;){if(255!==(t=e.readUInt8(i))){t++,e.writeUInt8(t,i);break;}e.writeUInt8(0,i);}};},{}],28:[function(e,t,i){var r=e("buffer-xor");i.encrypt=function(e,t){var i=r(t,e._prev);return e._prev=e._cipher.encryptBlock(i),e._prev;},i.decrypt=function(e,t){var i=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return r(n,i);};},{"buffer-xor":65}],29:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("buffer-xor");function a(e,t,i){var a=t.length,s=n(t,e._cache);return e._cache=e._cache.slice(a),e._prev=r.concat([e._prev,i?t:s]),s;}i.encrypt=function(e,t,i){for(var n,s=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){s=r.concat([s,a(e,t,i)]);break;}n=e._cache.length,s=r.concat([s,a(e,t.slice(0,n),i)]),t=t.slice(n);}return s;};},{"buffer-xor":65,"safe-buffer":184}],30:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t,i){for(var r,n,s=-1,o=0;++s<8;){r=t&1<<7-s?128:0,o+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^r))>>s%8,e._prev=a(e._prev,i?r:n);}return o;}function a(e,t){var i=e.length,n=-1,a=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++n>7;}return a;}i.encrypt=function(e,t,i){for(var a=t.length,s=r.allocUnsafe(a),o=-1;++o=0||!i.umod(e.prime1)||!i.umod(e.prime2);){i=new r(n(t));}return i;}t.exports=a,a.getr=s;}).call(this,e("buffer").Buffer);},{"bn.js":42,buffer:66,randombytes:166}],42:[function(e,t,i){arguments[4][16][0].apply(i,arguments);},{buffer:20,dup:16}],43:[function(e,t,i){t.exports=e("./browser/algorithms.json");},{"./browser/algorithms.json":44}],44:[function(e,t,i){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"}};},{}],45:[function(e,t,i){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"};},{}],46:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hash"),a=e("readable-stream"),s=e("inherits"),o=e("./sign"),l=e("./verify"),f=e("./algorithms.json");function u(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign;}function c(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign;}function h(e){return new u(e);}function d(e){return new c(e);}Object.keys(f).forEach(function(e){f[e].id=r.from(f[e].id,"hex"),f[e.toLowerCase()]=f[e];}),s(u,a.Writable),u.prototype._write=function(e,t,i){this._hash.update(e),i();},u.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this;},u.prototype.sign=function(e,t){this.end();var i=this._hash.digest(),r=o(i,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r;},s(c,a.Writable),c.prototype._write=function(e,t,i){this._hash.update(e),i();},c.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this;},c.prototype.verify=function(e,t,i){"string"==typeof t&&(t=r.from(t,i)),this.end();var n=this._hash.digest();return l(t,n,e,this._signType,this._tag);},t.exports={Sign:h,Verify:d,createSign:h,createVerify:d};},{"./algorithms.json":44,"./sign":47,"./verify":48,"create-hash":71,inherits:136,"readable-stream":63,"safe-buffer":184}],47:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hmac"),a=e("browserify-rsa"),s=e("elliptic").ec,o=e("bn.js"),l=e("parse-asn1"),f=e("./curves.json");function u(e,t,i,a){if((e=r.from(e.toArray())).length0&&i.ishrn(r),i;}function h(e,t,i){var a,s;do{for(a=r.alloc(0);8*a.length=t)throw new Error("invalid sig");}t.exports=function(e,t,i,f,u){var c=s(i);if("ec"===c.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=o[i.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var n=new a(r),s=i.data.subjectPrivateKey.data;return n.verify(t,e,s);}(e,t,c);}if("dsa"===c.type){if("dsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=i.data.p,a=i.data.q,o=i.data.g,f=i.data.pub_key,u=s.signature.decode(e,"der"),c=u.s,h=u.r;l(c,a),l(h,a);var d=n.mont(r),_=c.invm(a);return 0===o.toRed(d).redPow(new n(t).mul(_).mod(a)).fromRed().mul(f.toRed(d).redPow(h.mul(_).mod(a)).fromRed()).mod(r).mod(a).cmp(h);}(e,t,c);}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");t=r.concat([u,t]);for(var h=c.modulus.byteLength(),d=[1],_=0;t.length+d.length+22?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0]);}return"of ".concat(t," ").concat(String(e));}n("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"';},TypeError),n("ERR_INVALID_ARG_TYPE",function(e,t,i){var r,n,s,o;if("string"==typeof t&&(n="not ",t.substr(!s||s<0?0:+s,n.length)===n)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t;}(e," argument"))o="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,i){return"number"!=typeof i&&(i=0),!(i+t.length>e.length)&&-1!==e.indexOf(t,i);}(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"));}return o+=". Received type ".concat(_typeof(i));},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented";}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed";}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e;},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r;},{}],50:[function(e,t,i){(function(i){"use strict";var r=Object.keys||function(e){var t=[];for(var i in e){t.push(i);}return t;};t.exports=f;var n=e("./_stream_readable"),a=e("./_stream_writable");e("inherits")(f,n);for(var s=r(a.prototype),o=0;o0){if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e);}(t)),r)s.endEmitted?E(e,new w()):A(e,s,t,!0);else if(s.ended)E(e,new y());else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):P(e,s)):A(e,s,t,!1);}}else r||(s.reading=!1,P(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e;}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));}function M(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(k,e));}function k(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e);}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t));}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume();}function U(e){f("readable nexttick read 0"),e.read(0);}function D(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0);}function F(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read();){;}}function O(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):i=t.buffer.consume(e,t.decoder),i);var i;}function L(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(B,t,e));}function B(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var i=t._writableState;(!i||i.autoDestroy&&i.finished)&&t.destroy();}}function N(e,t){for(var i=0,r=e.length;i=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):M(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&L(this),null;var r,n=t.needReadable;return f("need readable",n),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&L(this)),null!==r&&this.emit("data",r),r;},j.prototype._read=function(e){E(this,new g("_read()"));},j.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);}n.pipesCount+=1,f("pipe count=%d opts=%j",n.pipesCount,t);var s=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?l:m;function o(t,i){f("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f("cleanup"),e.removeListener("close",_),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),r.removeListener("end",l),r.removeListener("end",m),r.removeListener("data",h),c=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u());}function l(){f("onend"),e.end();}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",o);var u=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,F(e));};}(r);e.on("drain",u);var c=!1;function h(t){f("ondata");var i=e.write(t);f("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==N(n.pipes,e))&&!c&&(f("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause());}function d(t){f("onerror",t),m(),e.removeListener("error",d),0===a(e,"error")&&E(e,t);}function _(){e.removeListener("finish",p),m();}function p(){f("onfinish"),e.removeListener("close",_),m();}function m(){f("unpipe"),r.unpipe(e);}return r.on("data",h),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i);}(e,"error",d),e.once("close",_),e.once("finish",p),e.emit("pipe",r),n.flowing||(f("pipe resume"),r.resume()),e;},j.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,f("on readable",n.length,n.reading),n.length?M(this):n.reading||i.nextTick(U,this))),r;},j.prototype.addListener=j.prototype.on,j.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(R,this),r;},j.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(R,this),t;},j.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t));}(this,e)),e.paused=!1,this;},j.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this;},j.prototype.wrap=function(e){var t=this,i=this._readableState,r=!1;for(var n in e.on("end",function(){if(f("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e);}t.push(null);}),e.on("data",function(n){(f("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(t.push(n)||(r=!0,e.pause()));}),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-1))throw new w(e);return this._writableState.defaultEncoding=e,this;},Object.defineProperty(j.prototype,"writableBuffer",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer();}}),Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function get(){return this._writableState.highWaterMark;}}),j.prototype._write=function(e,t,i){i(new p("_write()"));},j.prototype._writev=null,j.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1;}(this,n,r),this;},Object.defineProperty(j.prototype,"writableLength",{enumerable:!1,get:function get(){return this._writableState.length;}}),Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function get(){return void 0!==this._writableState&&this._writableState.destroyed;},set:function set(e){this._writableState&&(this._writableState.destroyed=e);}}),j.prototype.destroy=c.destroy,j.prototype._undestroy=c.undestroy,j.prototype._destroy=function(e,t){t(e);};}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{"../errors":49,"./_stream_duplex":50,"./internal/streams/destroy":57,"./internal/streams/state":61,"./internal/streams/stream":62,_process:158,buffer:66,inherits:136,"util-deprecate":197}],55:[function(e,t,i){(function(i){"use strict";var r;function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e;}var a=e("./end-of-stream"),s=Symbol("lastResolve"),o=Symbol("lastReject"),l=Symbol("error"),f=Symbol("ended"),u=Symbol("lastPromise"),c=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t};}function _(e){var t=e[s];if(null!==t){var i=e[h].read();null!==i&&(e[u]=null,e[s]=null,e[o]=null,t(d(i,!1)));}}function p(e){i.nextTick(_,e);}var m=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((n(r={get stream(){return this[h];},next:function next(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise(function(t,r){i.nextTick(function(){e[l]?r(e[l]):t(d(void 0,!0));});});var r,n=this[u];if(n)r=new Promise(function(e,t){return function(i,r){e.then(function(){t[f]?i(d(void 0,!0)):t[c](i,r);},r);};}(n,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(d(a,!1));r=new Promise(this[c]);}return this[u]=r,r;}},Symbol.asyncIterator,function(){return this;}),n(r,"return",function(){var e=this;return new Promise(function(t,i){e[h].destroy(null,function(e){e?i(e):t(d(void 0,!0));});});}),r),m);t.exports=function(e){var t,i=Object.create(b,(n(t={},h,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,o,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,f,{value:e._readableState.endEmitted,writable:!0}),n(t,c,{value:function value(e,t){var r=i[h].read();r?(i[u]=null,i[s]=null,i[o]=null,e(d(r,!1))):(i[s]=e,i[o]=t);},writable:!0}),t));return i[u]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=i[o];return null!==t&&(i[u]=null,i[s]=null,i[o]=null,t(e)),void(i[l]=e);}var r=i[s];null!==r&&(i[u]=null,i[s]=null,i[o]=null,r(d(void 0,!0))),i[f]=!0;}),e.on("readable",p.bind(null,i)),i;};}).call(this,e("_process"));},{"./end-of-stream":58,_process:158}],56:[function(e,t,i){"use strict";function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable;})),i.push.apply(i,r);}return i;}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e;}function a(e,t){for(var i=0;i0?this.tail.next=t:this.head=t,this.tail=t,++this.length;}},{key:"unshift",value:function value(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length;}},{key:"shift",value:function value(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e;}}},{key:"clear",value:function value(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function value(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;){i+=e+t.data;}return i;}},{key:"concat",value:function value(e){if(0===this.length)return s.alloc(0);for(var t,i,r,n=s.allocUnsafe(e>>>0),a=this.head,o=0;a;){t=a.data,i=n,r=o,s.prototype.copy.call(t,i,r),o+=a.data.length,a=a.next;}return n;}},{key:"consume",value:function value(e,t){var i;return en.length?n.length:e;if(a===n.length?r+=n:r+=n.slice(0,e),0==(e-=a)){a===n.length?(++i,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(a));break;}++i;}return this.length-=i,r;}},{key:"_getBuffer",value:function value(e){var t=s.allocUnsafe(e),i=this.head,r=1;for(i.data.copy(t),e-=i.data.length;i=i.next;){var n=i.data,a=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,a),0==(e-=a)){a===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(a));break;}++r;}return this.length-=r,t;}},{key:l,value:function value(e,t){return o(this,function(e){for(var t=1;t0,function(e){r||(r=e),e&&s.forEach(f),a||(s.forEach(f),n(r));});});return t.reduce(u);};},{"../../../errors":49,"./end-of-stream":58}],61:[function(e,t,i){"use strict";var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function getHighWaterMark(e,t,i,n){var a=function(e,t,i){return null!=e.highWaterMark?e.highWaterMark:t?e[i]:null;}(t,n,i);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(n?i:"highWaterMark",a);return Math.floor(a);}return e.objectMode?16:16384;}};},{"../../../errors":49}],62:[function(e,t,i){t.exports=e("events").EventEmitter;},{events:104}],63:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js"),i.finished=e("./lib/internal/streams/end-of-stream.js"),i.pipeline=e("./lib/internal/streams/pipeline.js");},{"./lib/_stream_duplex.js":50,"./lib/_stream_passthrough.js":51,"./lib/_stream_readable.js":52,"./lib/_stream_transform.js":53,"./lib/_stream_writable.js":54,"./lib/internal/streams/end-of-stream.js":58,"./lib/internal/streams/pipeline.js":60}],64:[function(e,t,i){arguments[4][20][0].apply(i,arguments);},{dup:20}],65:[function(e,t,i){(function(e){t.exports=function(t,i){for(var r=Math.min(t.length,i.length),n=new e(r),a=0;a1&&(m=i.argv[1].replace(/\\/g,"/")),p=i.argv.slice(2),void 0!==t&&(t.exports=d),i.on("uncaughtException",function(e){if(!(e instanceof Sa))throw e;}),i.on("unhandledRejection",at),b=function b(e){i.exit(e);},d.inspect=function(){return"[Emscripten Module object]";};else if(E)"undefined"!=typeof read&&(C=function C(e){return read(e);}),S=function S(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(W("object"===u(t=read(e,"binary"))),t);},"undefined"!=typeof scriptArgs?p=scriptArgs:void 0!==arguments&&(p=arguments),"function"==typeof quit&&(b=function b(e){quit(e);}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print);else{if(!v&&!y)throw new Error("environment detection error");y?A=self.location.href:document.currentScript&&(A=document.currentScript.src),A=0!==A.indexOf("blob:")?A.substr(0,A.lastIndexOf("/")+1):"",C=function C(e){var t=new XMLHttpRequest();return t.open("GET",e,!1),t.send(null),t.responseText;},y&&(S=function S(e){var t=new XMLHttpRequest();return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response);}),function(e,t,i){var r=new XMLHttpRequest();r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):i();},r.onerror=i,r.send(null);},function(e){document.title=e;};}var M=d.print||console.log.bind(console),k=d.printErr||console.warn.bind(console);for(h in _){_.hasOwnProperty(h)&&(d[h]=_[h]);}function P(e){W(Te);var t=pe[Te>>2],i=t+e+15&-16;return i>ei()&&at("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly"),pe[Te>>2]=i,t;}function I(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 W(t%8==0,"getNativeTypeSize invalid bits "+t+", type "+e),t/8;}return 0;}}function R(e){R.shown||(R.shown={}),R.shown[e]||(R.shown[e]=1,k(e));}_=null,d.arguments&&(p=d.arguments),Object.getOwnPropertyDescriptor(d,"arguments")||Object.defineProperty(d,"arguments",{configurable:!0,get:function get(){at("Module.arguments has been replaced with plain arguments_");}}),d.thisProgram&&(m=d.thisProgram),Object.getOwnPropertyDescriptor(d,"thisProgram")||Object.defineProperty(d,"thisProgram",{configurable:!0,get:function get(){at("Module.thisProgram has been replaced with plain thisProgram");}}),d.quit&&(b=d.quit),Object.getOwnPropertyDescriptor(d,"quit")||Object.defineProperty(d,"quit",{configurable:!0,get:function get(){at("Module.quit has been replaced with plain quit_");}}),W(void 0===d.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.read,"Module.read option was removed (modify read_ in JS)"),W(void 0===d.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),W(void 0===d.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),W(void 0===d.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),Object.getOwnPropertyDescriptor(d,"read")||Object.defineProperty(d,"read",{configurable:!0,get:function get(){at("Module.read has been replaced with plain read_");}}),Object.getOwnPropertyDescriptor(d,"readAsync")||Object.defineProperty(d,"readAsync",{configurable:!0,get:function get(){at("Module.readAsync has been replaced with plain readAsync");}}),Object.getOwnPropertyDescriptor(d,"readBinary")||Object.defineProperty(d,"readBinary",{configurable:!0,get:function get(){at("Module.readBinary has been replaced with plain readBinary");}}),Ea=wa=ga=function ga(){at("cannot use the stack before compiled code is ready to run, and has provided stack access");};var U={"f64-rem":function f64Rem(e,t){return e%t;},"debugger":function _debugger(){}},D=1,F=new Array(35);function O(e,t){W(void 0!==e);for(var i=0;i<35;i++){if(!F[i])return F[i]=e,D+i;}throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.";}var L,B,N,z=0,H=function H(){return z;};function V(e,t,i,r){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":he[e>>0]=t;break;case"i16":de[e>>1]=t;break;case"i32":pe[e>>2]=t;break;case"i64":ft=[t>>>0,(lt=t,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[e>>2]=ft[0],pe[e+4>>2]=ft[1];break;case"float":be[e>>2]=t;break;case"double":ve[e>>3]=t;break;default:at("invalid type for setValue: "+i);}}d.wasmBinary&&(L=d.wasmBinary),Object.getOwnPropertyDescriptor(d,"wasmBinary")||Object.defineProperty(d,"wasmBinary",{configurable:!0,get:function get(){at("Module.wasmBinary has been replaced with plain wasmBinary");}}),d.noExitRuntime&&(B=d.noExitRuntime),Object.getOwnPropertyDescriptor(d,"noExitRuntime")||Object.defineProperty(d,"noExitRuntime",{configurable:!0,get:function get(){at("Module.noExitRuntime has been replaced with plain noExitRuntime");}}),"object"!==("undefined"==typeof WebAssembly?"undefined":u(WebAssembly))&&at("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Y=new WebAssembly.Table({initial:4416,element:"anyfunc"}),q=!1;function W(e,t){e||at("Assertion failed: "+t);}function X(e){var t=d["_"+e];return W(t,"Cannot call unknown function "+e+", make sure it is exported"),t;}function G(e,t,i,r,n){var a={string:function string(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);ne(e,t=ga(i),i);}return t;},array:function array(e){var t=ga(e.length);return le(e,t),t;}};var s=X(e),o=[],l=0;if(W("array"!==t,'Return type should not be "array".'),r)for(var f=0;f>2]=0;}for(l=s+a;r>0]=0;}return s;}if("i8"===o)return e.subarray||e.slice?ce.set(e,s):ce.set(new Uint8Array(e),s),s;for(var f,u,h,c=0;c=r);){++n;}if(n-t>16&&e.subarray&&ee)return ee.decode(e.subarray(t,n));for(var a="";t>10,56320|1023&f);}}else a+=String.fromCharCode((31&s)<<6|o);}else a+=String.fromCharCode(s);}return a;}function ie(e,t){return e?te(ce,e,t):"";}function re(e,t,i,r){if(!(r>0))return 0;for(var n=i,a=i+r-1,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(o<=127){if(i>=a)break;t[i++]=o;}else if(o<=2047){if(i+1>=a)break;t[i++]=192|o>>6,t[i++]=128|63&o;}else if(o<=65535){if(i+2>=a)break;t[i++]=224|o>>12,t[i++]=128|o>>6&63,t[i++]=128|63&o;}else{if(i+3>=a)break;o>=2097152&&R("Invalid Unicode code point 0x"+o.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[i++]=240|o>>18,t[i++]=128|o>>12&63,t[i++]=128|o>>6&63,t[i++]=128|63&o;}}return t[i]=0,i-n;}function ne(e,t,i){return W("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),re(e,ce,t,i);}function ae(e){for(var t=0,i=0;i=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++i)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4;}return t;}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function se(e){var t=ae(e)+1,i=ya(t);return i&&re(e,he,i,t),i;}function oe(e){var t=ae(e)+1,i=ga(t);return re(e,he,i,t),i;}function le(e,t){W(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),he.set(e,t);}function fe(e,t,i){for(var r=0;r>0]=e.charCodeAt(r);}i||(he[t>>0]=0);}var ue,he,ce,de,_e,pe,me,be,ve,ye=16384,ge=65536;function we(e,t){return e%t>0&&(e+=t-e%t),e;}function Ee(e){ue=e,d.HEAP8=he=new Int8Array(e),d.HEAP16=de=new Int16Array(e),d.HEAP32=pe=new Int32Array(e),d.HEAPU8=ce=new Uint8Array(e),d.HEAPU16=_e=new Uint16Array(e),d.HEAPU32=me=new Uint32Array(e),d.HEAPF32=be=new Float32Array(e),d.HEAPF64=ve=new Float64Array(e);}var Ce=1127056,Se=6369936,je=6369936,Te=1126832;W(Ce%16==0,"stack must start aligned"),W(je%16==0,"heap must start aligned");var Ae=5242880;d.TOTAL_STACK&&W(Ae===d.TOTAL_STACK,"the stack size can no longer be determined at runtime");var xe=d.TOTAL_MEMORY||1073741824;function Me(){W(0==(3&Se)),me[(Se>>2)-1]=34821223,me[(Se>>2)-2]=2310721022,pe[0]=1668509029;}function ke(){var e=me[(Se>>2)-1],t=me[(Se>>2)-2];34821223==e&&2310721022==t||at("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==pe[0]&&at("Runtime error: The application has corrupted its heap memory area (address zero)!");}function Pe(e){at("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(Se-Ea()+e)+" bytes available!");}function Ie(e,t){var i="";for(var r in kr){var n=kr[r];n[e]&&(i+='as sig "'+r+'" pointing to function '+n[e]+", ");}at("Invalid function pointer "+e+" called with signature '"+t+"'. 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). This pointer might make sense in another type signature: "+i);}function Re(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?d.dynCall_v(i):d.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg);}else t();}}Object.getOwnPropertyDescriptor(d,"TOTAL_MEMORY")||Object.defineProperty(d,"TOTAL_MEMORY",{configurable:!0,get:function get(){at("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY");}}),W(xe>=Ae,"TOTAL_MEMORY should be larger than TOTAL_STACK, was "+xe+"! (TOTAL_STACK="+Ae+")"),W("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"),(N=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:xe/ge}))&&(ue=N.buffer),W((xe=ue.byteLength)%ge==0),Ee(ue),pe[Te>>2]=je,function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!";}();var Ue=[],De=[],Fe=[],Oe=[],Le=!1,Be=!1;function Ne(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;){qe(d.preRun.shift());}Re(Ue);}function ze(){ke(),W(!Le),Le=!0,d.noFSInit||Ut.init.initialized||Ut.init(),At.init(),Re(De);}function He(){ke(),Ut.ignorePermissions=!1,Re(Fe);}function Ve(){ke(),Be=!0;}function Ye(){if(ke(),d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;){We(d.postRun.shift());}Re(Oe);}function qe(e){Ue.unshift(e);}function We(e){Oe.unshift(e);}W(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),W(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),W(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),W(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var Xe=Math.abs,Ge=Math.ceil,Ke=Math.floor,Qe=Math.min,Ze=Math.trunc,Je=0,$e=null,et=null,tt={};function it(e){for(var t=e;;){if(!tt[e])return e;e=t+Math.random();}return e;}function rt(e){Je++,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(W(!tt[e]),tt[e]=1,null===$e&&"undefined"!=typeof setInterval&&($e=setInterval(function(){if(q)return clearInterval($e),void($e=null);var e=!1;for(var t in tt){e||(e=!0,k("still waiting on run dependencies:")),k("dependency: "+t);}e&&k("(end of list)");},1e4))):k("warning: run dependency added without ID");}function nt(e){if(Je--,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(W(tt[e]),delete tt[e]):k("warning: run dependency removed without ID"),0==Je&&(null!==$e&&(clearInterval($e),$e=null),et)){var t=et;et=null,t();}}function at(e){d.onAbort&&d.onAbort(e),M(e+=""),k(e),q=!0,1;throw"abort("+e+") at "+gt();}d.preloadedImages={},d.preloadedAudios={},c||qe(function(){"undefined"!=typeof SharedArrayBuffer&&(rt("pthreads"),PThread.allocateUnusedWorkers(5,function(){nt("pthreads");}));});var st="data:application/octet-stream;base64,";function ot(e){return String.prototype.startsWith?e.startsWith(st):0===e.indexOf(st);}var lt,ft,ut="missile-v20211009.wasm";function ht(){try{if(L)return new Uint8Array(L);if(S)return S(ut);throw"both async and sync fetching of the wasm failed";}catch(e){at(e);}}function ct(){return L||!v&&!y||"function"!=typeof fetch?new Promise(function(e,t){e(ht());}):fetch(ut,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ut+"'";return e.arrayBuffer();})["catch"](function(){return ht();});}function dt(){var e={env:ha,wasi_unstable:ha,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:U};function t(e,t){var i=e.exports;d.asm=i,nt("wasm-instantiate");}rt("wasm-instantiate");var i=d;function r(e){W(d===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance);}function n(t){return ct().then(function(t){return WebAssembly.instantiate(t,e);}).then(t,function(e){k("failed to asynchronously prepare wasm: "+e),at(e);});}if(d.instantiateWasm)try{return d.instantiateWasm(e,t);}catch(e){return k("Module.instantiateWasm callback failed with error: "+e),!1;}return function(){if(L||"function"!=typeof WebAssembly.instantiateStreaming||ot(ut)||"function"!=typeof fetch)return n(r);fetch(ut,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,e).then(r,function(e){k("wasm streaming compile failed: "+e),k("falling back to ArrayBuffer instantiation"),n(r);});});}(),{};}ot(ut)||(ut=x(ut)),d.asm=dt;var _t=[function(){"undefined"!=typeof window?window.dispatchEvent(new CustomEvent("wasmLoaded")):r.onWASMLoaded&&r.onWASMLoaded();}];function pt(e){return _t[e]();}De.push({func:function func(){_a();}});var mt=1127040;function bt(e){return R("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e;}function vt(e){return e.replace(/\b__Z[\w\d_]+/g,function(e){var t=bt(e);return e===t?e:t+" ["+e+"]";});}function yt(){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 gt(){var e=yt();return d.extraStackTrace&&(e+="\n"+d.extraStackTrace()),vt(e);}W(mt%8==0);var wt={};function Et(e){var t,i;Et.called?(i=pe[e>>2],t=pe[i>>2]):(Et.called=!0,wt.USER="web_user",wt.LOGNAME="web_user",wt.PATH="/",wt.PWD="/",wt.HOME="/home/web_user",wt.LANG=("object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",wt._=m,t=$(1024),i=$(256),pe[i>>2]=t,pe[e>>2]=i);var r=[],n=0;for(var a in wt){if("string"==typeof wt[a]){var s=a+"="+wt[a];r.push(s),n+=s.length;}}if(n>1024)throw new Error("Environment size exceeded TOTAL_ENV_SIZE!");for(var o=0;o>2]=t,t+=s.length+1;}pe[i+4*r.length>>2]=0;}function Ct(){}function St(e){return d.___errno_location?pe[d.___errno_location()>>2]=e:k("failed to set errno from JS"),e;}var jt={splitPath:function splitPath(e){return /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);},normalizeArray:function normalizeArray(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--);}if(t)for(;i;i--){e.unshift("..");}return e;},normalize:function normalize(e){var t="/"===e.charAt(0),i="/"===e.substr(-1);return(e=jt.normalizeArray(e.split("/").filter(function(e){return!!e;}),!t).join("/"))||t||(e="."),e&&i&&(e+="/"),(t?"/":"")+e;},dirname:function dirname(e){var t=jt.splitPath(e),i=t[0],r=t[1];return i||r?(r&&(r=r.substr(0,r.length-1)),i+r):".";},basename:function basename(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1);},extname:function extname(e){return jt.splitPath(e)[3];},join:function join(){var e=Array.prototype.slice.call(arguments,0);return jt.normalize(e.join("/"));},join2:function join2(e,t){return jt.normalize(e+"/"+t);}},Tt={resolve:function resolve(){for(var e="",t=!1,i=arguments.length-1;i>=-1&&!t;i--){var r=i>=0?arguments[i]:Ut.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t="/"===r.charAt(0);}return(t?"/":"")+(e=jt.normalizeArray(e.split("/").filter(function(e){return!!e;}),!t).join("/"))||".";},relative:function relative(e,t){function i(e){for(var t=0;t=0&&""===e[i];i--){;}return t>i?[]:e.slice(t,i-t+1);}e=Tt.resolve(e).substr(1),t=Tt.resolve(t).substr(1);for(var r=i(e.split("/")),n=i(t.split("/")),a=Math.min(r.length,n.length),s=a,o=0;o0?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=Ni(t,!0);}return e.input.shift();},put_char:function put_char(e,t){null===t||10===t?(M(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t);},flush:function flush(e){e.output&&e.output.length>0&&(M(te(e.output,0)),e.output=[]);}},default_tty1_ops:{put_char:function put_char(e,t){null===t||10===t?(k(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t);},flush:function flush(e){e.output&&e.output.length>0&&(k(te(e.output,0)),e.output=[]);}}},xt={ops_table:null,mount:function mount(e){return xt.createNode(null,"/",16895,0);},createNode:function createNode(e,t,i,r){if(Ut.isBlkdev(i)||Ut.isFIFO(i))throw new Ut.ErrnoError(63);xt.ops_table||(xt.ops_table={dir:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,lookup:xt.node_ops.lookup,mknod:xt.node_ops.mknod,rename:xt.node_ops.rename,unlink:xt.node_ops.unlink,rmdir:xt.node_ops.rmdir,readdir:xt.node_ops.readdir,symlink:xt.node_ops.symlink},stream:{llseek:xt.stream_ops.llseek}},file:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:{llseek:xt.stream_ops.llseek,read:xt.stream_ops.read,write:xt.stream_ops.write,allocate:xt.stream_ops.allocate,mmap:xt.stream_ops.mmap,msync:xt.stream_ops.msync}},link:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,readlink:xt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:Ut.chrdev_stream_ops}});var n=Ut.createNode(e,t,i,r);return Ut.isDir(n.mode)?(n.node_ops=xt.ops_table.dir.node,n.stream_ops=xt.ops_table.dir.stream,n.contents={}):Ut.isFile(n.mode)?(n.node_ops=xt.ops_table.file.node,n.stream_ops=xt.ops_table.file.stream,n.usedBytes=0,n.contents=null):Ut.isLink(n.mode)?(n.node_ops=xt.ops_table.link.node,n.stream_ops=xt.ops_table.link.stream):Ut.isChrdev(n.mode)&&(n.node_ops=xt.ops_table.chrdev.node,n.stream_ops=xt.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n),n;},getFileDataAsRegularArray:function getFileDataAsRegularArray(e){if(e.contents&&e.contents.subarray){for(var t=[],i=0;i=t)){t=Math.max(t,i*(i<1048576?2:1.125)|0),0!=i&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0);}},resizeFileStorage:function resizeFileStorage(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var i=e.contents;return e.contents=new Uint8Array(new ArrayBuffer(t)),i&&e.contents.set(i.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=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-n,r);if(W(s>=0),s>8&&a.subarray)t.set(a.subarray(n,n+s),i);else for(var o=0;o0||n+rs.timestamp)&&(n.push(i),r++);});var a=[];if(Object.keys(t.entries).forEach(function(i){t.entries[i];e.entries[i]||(a.push(i),r++);}),!r)return i(null);var s=!1,o=("remote"===e.type?e.db:t.db).transaction([Mt.DB_STORE_NAME],"readwrite"),l=o.objectStore(Mt.DB_STORE_NAME);function f(e){if(e&&!s)return s=!0,i(e);}o.onerror=function(e){f(this.error),e.preventDefault();},o.oncomplete=function(e){s||i(null);},n.sort().forEach(function(e){"local"===t.type?Mt.loadRemoteEntry(l,e,function(t,i){if(t)return f(t);Mt.storeLocalEntry(e,i,f);}):Mt.loadLocalEntry(e,function(t,i){if(t)return f(t);Mt.storeRemoteEntry(l,e,i,f);});}),a.sort().reverse().forEach(function(e){"local"===t.type?Mt.removeLocalEntry(e,f):Mt.removeRemoteEntry(l,e,f);});}},kt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Pt={isWindows:!1,staticInit:function staticInit(){Pt.isWindows=!!i.platform.match(/^win/);var e=i.binding("constants");e.fs&&(e=e.fs),Pt.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 bufferFrom(e){return n.alloc?n.from(e):new n(e);},convertNodeCode:function convertNodeCode(e){var t=e.code;return W(t in kt),kt[t];},mount:function mount(e){return W(w),Pt.createNode(null,"/",Pt.getMode(e.opts.root),0);},createNode:function createNode(e,t,i,r){if(!Ut.isDir(i)&&!Ut.isFile(i)&&!Ut.isLink(i))throw new Ut.ErrnoError(28);var n=Ut.createNode(e,t,i);return n.node_ops=Pt.node_ops,n.stream_ops=Pt.stream_ops,n;},getMode:function getMode(e){var t;try{t=Li.lstatSync(e),Pt.isWindows&&(t.mode=t.mode|(292&t.mode)>>2);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}return t.mode;},realPath:function realPath(e){for(var t=[];e.parent!==e;){t.push(e.name),e=e.parent;}return t.push(e.mount.opts.root),t.reverse(),jt.join.apply(null,t);},flagsForNode:function flagsForNode(e){e&=-2097153,e&=-2049,e&=-32769,e&=-524289;var t=0;for(var i in Pt.flagsForNodeMap){e&i&&(t|=Pt.flagsForNodeMap[i],e^=i);}if(e)throw new Ut.ErrnoError(28);return t;},node_ops:{getattr:function getattr(e){var t,i=Pt.realPath(e);try{t=Li.lstatSync(i);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}return Pt.isWindows&&!t.blksize&&(t.blksize=4096),Pt.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 setattr(e,t){var i=Pt.realPath(e);try{if(void 0!==t.mode&&(Li.chmodSync(i,t.mode),e.mode=t.mode),void 0!==t.timestamp){var r=new Date(t.timestamp);Li.utimesSync(i,r,r);}void 0!==t.size&&Li.truncateSync(i,t.size);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},lookup:function lookup(e,t){var i=jt.join2(Pt.realPath(e),t),r=Pt.getMode(i);return Pt.createNode(e,t,r);},mknod:function mknod(e,t,i,r){var n=Pt.createNode(e,t,i,r),a=Pt.realPath(n);try{Ut.isDir(n.mode)?Li.mkdirSync(a,n.mode):Li.writeFileSync(a,"",{mode:n.mode});}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}return n;},rename:function rename(e,t,i){var r=Pt.realPath(e),n=jt.join2(Pt.realPath(t),i);try{Li.renameSync(r,n);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},unlink:function unlink(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.unlinkSync(i);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},rmdir:function rmdir(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.rmdirSync(i);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},readdir:function readdir(e){var t=Pt.realPath(e);try{return Li.readdirSync(t);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},symlink:function symlink(e,t,i){var r=jt.join2(Pt.realPath(e),t);try{Li.symlinkSync(i,r);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},readlink:function readlink(e){var t=Pt.realPath(e);try{return t=Li.readlinkSync(t),t=Bi.relative(Bi.resolve(e.mount.opts.root),t);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}}},stream_ops:{open:function open(e){var t=Pt.realPath(e.node);try{Ut.isFile(e.node.mode)&&(e.nfd=Li.openSync(t,Pt.flagsForNode(e.flags)));}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},close:function close(e){try{Ut.isFile(e.node.mode)&&e.nfd&&Li.closeSync(e.nfd);}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},read:function read(e,t,i,r,n){if(0===r)return 0;try{return Li.readSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n);}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},write:function write(e,t,i,r,n){try{return Li.writeSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n);}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e));}},llseek:function llseek(e,t,i){var r=t;if(1===i)r+=e.position;else if(2===i&&Ut.isFile(e.node.mode))try{r+=Li.fstatSync(e.nfd).size;}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e));}if(r<0)throw new Ut.ErrnoError(28);return r;}}},It={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function mount(e){W(y),It.reader||(It.reader=new FileReaderSync());var t=It.createNode(null,"/",It.DIR_MODE,0),i={};function r(e){for(var r=e.split("/"),n=t,a=0;a=e.node.size)return 0;var a=e.node.contents.slice(n,n+r),s=It.reader.readAsArrayBuffer(a);return t.set(new Uint8Array(s),i),a.size;},write:function write(e,t,i,r,n){throw new Ut.ErrnoError(29);},llseek:function llseek(e,t,i){var r=t;if(1===i?r+=e.position:2===i&&Ut.isFile(e.node.mode)&&(r+=e.node.size),r<0)throw new Ut.ErrnoError(28);return r;}}},Rt={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Ut={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 handleFSError(e){if(!(e instanceof Ut.ErrnoError))throw e+" : "+gt();return St(e.errno);},lookupPath:function lookupPath(e,t){if(t=t||{},!(e=Tt.resolve(Ut.cwd(),e)))return{path:"",node:null};var i={follow_mount:!0,recurse_count:0};for(var r in i){void 0===t[r]&&(t[r]=i[r]);}if(t.recurse_count>8)throw new Ut.ErrnoError(32);for(var n=jt.normalizeArray(e.split("/").filter(function(e){return!!e;}),!1),a=Ut.root,s="/",o=0;o40)throw new Ut.ErrnoError(32);}}return{path:s,node:a};},getPath:function getPath(e){for(var t;;){if(Ut.isRoot(e)){var i=e.mount.mountpoint;return t?"/"!==i[i.length-1]?i+"/"+t:i+t:i;}t=t?e.name+"/"+t:e.name,e=e.parent;}},hashName:function hashName(e,t){for(var i=0,r=0;r>>0)%Ut.nameTable.length;},hashAddNode:function hashAddNode(e){var t=Ut.hashName(e.parent.id,e.name);e.name_next=Ut.nameTable[t],Ut.nameTable[t]=e;},hashRemoveNode:function hashRemoveNode(e){var t=Ut.hashName(e.parent.id,e.name);if(Ut.nameTable[t]===e)Ut.nameTable[t]=e.name_next;else for(var i=Ut.nameTable[t];i;){if(i.name_next===e){i.name_next=e.name_next;break;}i=i.name_next;}},lookupNode:function lookupNode(e,t){var i=Ut.mayLookup(e);if(i)throw new Ut.ErrnoError(i,e);for(var r=Ut.hashName(e.id,t),n=Ut.nameTable[r];n;n=n.name_next){var a=n.name;if(n.parent.id===e.id&&a===t)return n;}return Ut.lookup(e,t);},createNode:function createNode(e,t,i,r){if(!Ut.FSNode){Ut.FSNode=function(e,t,i,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ut.nextInode++,this.name=t,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=r;},Ut.FSNode.prototype={};Object.defineProperties(Ut.FSNode.prototype,{read:{get:function get(){return 365==(365&this.mode);},set:function set(e){e?this.mode|=365:this.mode&=-366;}},write:{get:function get(){return 146==(146&this.mode);},set:function set(e){e?this.mode|=146:this.mode&=-147;}},isFolder:{get:function get(){return Ut.isDir(this.mode);}},isDevice:{get:function get(){return Ut.isChrdev(this.mode);}}});}var n=new Ut.FSNode(e,t,i,r);return Ut.hashAddNode(n),n;},destroyNode:function destroyNode(e){Ut.hashRemoveNode(e);},isRoot:function isRoot(e){return e===e.parent;},isMountpoint:function isMountpoint(e){return!!e.mounted;},isFile:function isFile(e){return 32768==(61440&e);},isDir:function isDir(e){return 16384==(61440&e);},isLink:function isLink(e){return 40960==(61440&e);},isChrdev:function isChrdev(e){return 8192==(61440&e);},isBlkdev:function isBlkdev(e){return 24576==(61440&e);},isFIFO:function isFIFO(e){return 4096==(61440&e);},isSocket:function isSocket(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 modeStringToFlags(e){var t=Ut.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t;},flagsToPermissionString:function flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t;},nodePermissions:function nodePermissions(e,t){return Ut.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2;},mayLookup:function mayLookup(e){var t=Ut.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2);},mayCreate:function mayCreate(e,t){try{Ut.lookupNode(e,t);return 20;}catch(e){}return Ut.nodePermissions(e,"wx");},mayDelete:function mayDelete(e,t,i){var r;try{r=Ut.lookupNode(e,t);}catch(e){return e.errno;}var n=Ut.nodePermissions(e,"wx");if(n)return n;if(i){if(!Ut.isDir(r.mode))return 54;if(Ut.isRoot(r)||Ut.getPath(r)===Ut.cwd())return 10;}else if(Ut.isDir(r.mode))return 31;return 0;},mayOpen:function mayOpen(e,t){return e?Ut.isLink(e.mode)?32:Ut.isDir(e.mode)&&("r"!==Ut.flagsToPermissionString(t)||512&t)?31:Ut.nodePermissions(e,Ut.flagsToPermissionString(t)):44;},MAX_OPEN_FDS:4096,nextfd:function nextfd(e,t){e=e||0,t=t||Ut.MAX_OPEN_FDS;for(var i=e;i<=t;i++){if(!Ut.streams[i])return i;}throw new Ut.ErrnoError(33);},getStream:function getStream(e){return Ut.streams[e];},createStream:function createStream(e,t,i){Ut.FSStream||(Ut.FSStream=function(){},Ut.FSStream.prototype={},Object.defineProperties(Ut.FSStream.prototype,{object:{get:function get(){return this.node;},set:function set(e){this.node=e;}},isRead:{get:function get(){return 1!=(2097155&this.flags);}},isWrite:{get:function get(){return 0!=(2097155&this.flags);}},isAppend:{get:function get(){return 1024&this.flags;}}}));var r=new Ut.FSStream();for(var n in e){r[n]=e[n];}e=r;var a=Ut.nextfd(t,i);return e.fd=a,Ut.streams[a]=e,e;},closeStream:function closeStream(e){Ut.streams[e]=null;},chrdev_stream_ops:{open:function open(e){var t=Ut.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e);},llseek:function llseek(){throw new Ut.ErrnoError(70);}},major:function major(e){return e>>8;},minor:function minor(e){return 255&e;},makedev:function makedev(e,t){return e<<8|t;},registerDevice:function registerDevice(e,t){Ut.devices[e]={stream_ops:t};},getDevice:function getDevice(e){return Ut.devices[e];},getMounts:function getMounts(e){for(var t=[],i=[e];i.length;){var r=i.pop();t.push(r),i.push.apply(i,r.mounts);}return t;},syncfs:function syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Ut.syncFSRequests++,Ut.syncFSRequests>1&&Ut.syncFSRequests;var i=Ut.getMounts(Ut.root.mount),r=0;function n(e){return W(Ut.syncFSRequests>0),Ut.syncFSRequests--,t(e);}function a(e){if(e)return a.errored?void 0:(a.errored=!0,n(e));++r>=i.length&&n(null);}i.forEach(function(t){if(!t.type.syncfs)return a(null);t.type.syncfs(t,e,a);});},mount:function mount(e,t,i){var r,n="/"===i,a=!i;if(n&&Ut.root)throw new Ut.ErrnoError(10);if(!n&&!a){var s=Ut.lookupPath(i,{follow_mount:!1});if(i=s.path,r=s.node,Ut.isMountpoint(r))throw new Ut.ErrnoError(10);if(!Ut.isDir(r.mode))throw new Ut.ErrnoError(54);}var o={type:e,opts:t,mountpoint:i,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,n?Ut.root=l:r&&(r.mounted=o,r.mount&&r.mount.mounts.push(o)),l;},unmount:function unmount(e){var t=Ut.lookupPath(e,{follow_mount:!1});if(!Ut.isMountpoint(t.node))throw new Ut.ErrnoError(28);var i=t.node,r=i.mounted,n=Ut.getMounts(r);Object.keys(Ut.nameTable).forEach(function(e){for(var t=Ut.nameTable[e];t;){var i=t.name_next;-1!==n.indexOf(t.mount)&&Ut.destroyNode(t),t=i;}}),i.mounted=null;var a=i.mount.mounts.indexOf(r);W(-1!==a),i.mount.mounts.splice(a,1);},lookup:function lookup(e,t){return e.node_ops.lookup(e,t);},mknod:function mknod(e,t,i){var r=Ut.lookupPath(e,{parent:!0}).node,n=jt.basename(e);if(!n||"."===n||".."===n)throw new Ut.ErrnoError(28);var a=Ut.mayCreate(r,n);if(a)throw new Ut.ErrnoError(a);if(!r.node_ops.mknod)throw new Ut.ErrnoError(63);return r.node_ops.mknod(r,n,t,i);},create:function create(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Ut.mknod(e,t,0);},mkdir:function mkdir(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Ut.mknod(e,t,0);},mkdirTree:function mkdirTree(e,t){for(var i=e.split("/"),r="",n=0;nthis.length-1||e<0)){var t=e%this.chunkSize,i=e/this.chunkSize|0;return this.getter(i)[t];}},a.prototype.setDataGetter=function(e){this.getter=e;},a.prototype.cacheLength=function(){var e=new XMLHttpRequest();if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,s=1048576;n||(s=r);var o=this;o.setDataGetter(function(e){var t=e*s,n=(e+1)*s-1;if(n=Math.min(n,r-1),void 0===o.chunks[e]&&(o.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var n=new XMLHttpRequest();if(n.open("GET",i,!1),r!==s&&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 "+i+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):Ni(n.responseText||"",!0);}(t,n)),void 0===o.chunks[e])throw new Error("doXHR failed!");return o.chunks[e];}),!a&&r||(s=r=1,r=this.getter(0).length,s=r),this._length=r,this._chunkSize=s,this.lengthKnown=!0;},"undefined"!=typeof XMLHttpRequest){if(!y)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new a();Object.defineProperties(s,{length:{get:function get(){return this.lengthKnown||this.cacheLength(),this._length;}},chunkSize:{get:function get(){return this.lengthKnown||this.cacheLength(),this._chunkSize;}}});var o={isDevice:!1,contents:s};}else o={isDevice:!1,url:i};var l=Ut.createFile(e,t,o,r,n);o.contents?l.contents=o.contents:o.url&&(l.contents=null,l.url=o.url),Object.defineProperties(l,{usedBytes:{get:function get(){return this.contents.length;}}});var f={};return Object.keys(l.stream_ops).forEach(function(e){var t=l.stream_ops[e];f[e]=function(){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);return t.apply(null,arguments);};}),f.read=function(e,t,i,r,n){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);var a=e.node.contents;if(n>=a.length)return 0;var s=Math.min(a.length-n,r);if(W(s>=0),a.slice)for(var o=0;o>2]=r.dev,pe[i+4>>2]=0,pe[i+8>>2]=r.ino,pe[i+12>>2]=r.mode,pe[i+16>>2]=r.nlink,pe[i+20>>2]=r.uid,pe[i+24>>2]=r.gid,pe[i+28>>2]=r.rdev,pe[i+32>>2]=0,ft=[r.size>>>0,(lt=r.size,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+40>>2]=ft[0],pe[i+44>>2]=ft[1],pe[i+48>>2]=4096,pe[i+52>>2]=r.blocks,pe[i+56>>2]=r.atime.getTime()/1e3|0,pe[i+60>>2]=0,pe[i+64>>2]=r.mtime.getTime()/1e3|0,pe[i+68>>2]=0,pe[i+72>>2]=r.ctime.getTime()/1e3|0,pe[i+76>>2]=0,ft=[r.ino>>>0,(lt=r.ino,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+80>>2]=ft[0],pe[i+84>>2]=ft[1],0;},doMsync:function doMsync(e,t,i,r){var n=new Uint8Array(ce.subarray(e,e+i));Ut.msync(t,n,0,i,r);},doMkdir:function doMkdir(e,t){return"/"===(e=jt.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),Ut.mkdir(e,t,0),0;},doMknod:function doMknod(e,t,i){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28;}return Ut.mknod(e,t,i),0;},doReadlink:function doReadlink(e,t,i){if(i<=0)return-28;var r=Ut.readlink(e),n=Math.min(i,ae(r)),a=he[t+n];return ne(r,t,i+1),he[t+n]=a,n;},doAccess:function doAccess(e,t){if(-8&t)return-28;var i;if(!(i=Ut.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&Ut.nodePermissions(i,r)?-2:0;},doDup:function doDup(e,t,i){var r=Ut.getStream(i);return r&&Ut.close(r),Ut.open(e,t,0,i,i).fd;},doReadv:function doReadv(e,t,i,r){for(var n=0,a=0;a>2],o=pe[t+(8*a+4)>>2],l=Ut.read(e,he,s,o,r);if(l<0)return-1;if(n+=l,l>2],o=pe[t+(8*a+4)>>2],l=Ut.write(e,he,s,o,r);if(l<0)return-1;n+=l;}return n;},varargs:0,get:function get(e){return Dt.varargs+=4,pe[Dt.varargs-4>>2];},getStr:function getStr(){return ie(Dt.get());},getStreamFromFD:function getStreamFromFD(e){void 0===e&&(e=Dt.get());var t=Ut.getStream(e);if(!t)throw new Ut.ErrnoError(8);return t;},get64:function get64(){var e=Dt.get(),t=Dt.get();return W(e>=0?0===t:-1===t),e;},getZero:function getZero(){W(0===Dt.get());}};function Ft(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD();switch(Dt.get()){case 0:return(r=Dt.get())<0?-28:Ut.open(i.path,i.flags,0,r).fd;case 1:case 2:return 0;case 3:return i.flags;case 4:var r=Dt.get();return i.flags|=r,0;case 12:r=Dt.get();return de[r+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return St(28),-1;default:return-28;}}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno;}}function Ot(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD(),r=Dt.get(),n=Dt.get();return Ut.read(i,he,r,n);}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno;}}function Lt(e,t){Dt.varargs=t;try{var i=Dt.getStr(),r=Dt.get(),n=Dt.get();return Ut.open(i,r,n).fd;}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno;}}function Bt(){}function Nt(e){try{var t=Dt.getStreamFromFD(e);return Ut.close(t),0;}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno;}}function zt(){return Nt.apply(null,arguments);}function Ht(e,t){try{var i=Dt.getStreamFromFD(e),r=i.tty?2:Ut.isDir(i.mode)?3:Ut.isLink(i.mode)?7:4;return he[t>>0]=r,0;}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno;}}function Vt(){return Ht.apply(null,arguments);}function Yt(e,t,i,r,n){try{var a=Dt.getStreamFromFD(e),s=4294967296*i+(t>>>0);return s<=-9007199254740992||s>=9007199254740992?-61:(Ut.llseek(a,s,r),ft=[a.position>>>0,(lt=a.position,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[n>>2]=ft[0],pe[n+4>>2]=ft[1],a.getdents&&0===s&&0===r&&(a.getdents=null),0);}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno;}}function qt(){return Yt.apply(null,arguments);}function Wt(e,t,i,r){try{var n=Dt.getStreamFromFD(e),a=Dt.doWritev(n,t,i);return pe[r>>2]=a,0;}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno;}}function Xt(){return Wt.apply(null,arguments);}function Gt(e){delete ni.xhrs[e-1];}function Kt(){at();}function Qt(){return void 0===Qt.start&&(Qt.start=Date.now()),1e3*(Date.now()-Qt.start)|0;}function Zt(){at();}function Jt(){return g||"undefined"!=typeof dateNow||"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now;}function $t(e,t){var i;if(0===e)i=Date.now();else{if(1!==e||!Jt())return St(28),-1;i=Zt();}return pe[t>>2]=i/1e3|0,pe[t+4>>2]=i%1e3*1e3*1e3|0,0;}function ei(){return he.length;}function ti(){return!y;}function ii(e){try{return N.grow(e-ue.byteLength+65535>>16),Ee(N.buffer),1;}catch(t){console.error("emscripten_realloc_buffer: Attempted to grow heap from "+ue.byteLength+" bytes to "+e+" bytes, but got error: "+t);}}function ri(e){var t=ei();W(e>t);if(e>2147418112)return k("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147418112 bytes!"),!1;for(var i=Math.max(t,16777216);i>2]=t,me[e+4>>2]=t/4294967296|0;},openDatabase:function openDatabase(e,t,i,r){try{var n=indexedDB.open(e,t);}catch(e){return r(e);}n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains("FILES")&&t.deleteObjectStore("FILES"),t.createObjectStore("FILES");},n.onsuccess=function(e){i(e.target.result);},n.onerror=function(e){r(e);};},staticInit:function staticInit(){var e="undefined"==typeof ENVIRONMENT_IS_FETCH_WORKER;ni.openDatabase("emscripten_filesystem",1,function(t){ni.dbInstance=t,e&&nt("library_fetch_init");},function(){ni.dbInstance=!1,e&&nt("library_fetch_init");}),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||rt("library_fetch_init");}};function ai(e,t,i,r,n){var a=me[e+8>>2];if(a){var s=ie(a),o=e+112,l=ie(o);l||(l="GET");me[o+32>>2];var f=me[o+52>>2],u=me[o+56>>2],h=!!me[o+60>>2],c=(me[o+64>>2],me[o+68>>2]),d=me[o+72>>2],_=me[o+76>>2],p=me[o+80>>2],m=me[o+84>>2],b=me[o+88>>2],v=!!(1&f),y=!!(2&f),g=!!(64&f),w=c?ie(c):void 0,E=d?ie(d):void 0,C=p?ie(p):void 0,S=new XMLHttpRequest();if(S.withCredentials=h,S.open(l,s,!g,w,E),g||(S.timeout=u),S.url_=s,W(!y,"streaming uses moz-chunked-arraybuffer which is no longer supported; TODO: rewrite using fetch()"),S.responseType="arraybuffer",p&&S.overrideMimeType(C),_)for(;;){var j=me[_>>2];if(!j)break;var T=me[_+4>>2];if(!T)break;_+=8;var A=ie(j),x=ie(T);S.setRequestHeader(A,x);}ni.xhrs.push(S);var M=ni.xhrs.length;me[e+0>>2]=M;var k=m&&b?ce.slice(m,m+b):null;S.onload=function(r){var n=S.response?S.response.byteLength:0,a=0,s=0;v&&!y&&(a=ya(s=n),ce.set(new Uint8Array(S.response),a)),me[e+12>>2]=a,ni.setu64(e+16,s),ni.setu64(e+24,0),n&&ni.setu64(e+32,n),_e[e+40>>1]=S.readyState,4===S.readyState&&0===S.status&&(S.status=n>0?200:404),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),S.status>=200&&S.status<300?t&&t(e,S,r):i&&i(e,S,r);},S.onerror=function(t){var r=S.status;4===S.readyState&&0===r&&(r=404),me[e+12>>2]=0,ni.setu64(e+16,0),ni.setu64(e+24,0),ni.setu64(e+32,0),_e[e+40>>1]=S.readyState,_e[e+42>>1]=r,i&&i(e,S,t);},S.ontimeout=function(t){i&&i(e,S,t);},S.onprogress=function(t){var i=v&&y&&S.response?S.response.byteLength:0,n=0;v&&y&&(n=ya(i),ce.set(new Uint8Array(S.response),n)),me[e+12>>2]=n,ni.setu64(e+16,i),ni.setu64(e+24,t.loaded-i),ni.setu64(e+32,t.total),_e[e+40>>1]=S.readyState,S.readyState>=3&&0===S.status&&t.loaded>0&&(S.status=200),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),r&&r(e,S,t);},S.onreadystatechange=function(t){_e[e+40>>1]=S.readyState,S.readyState>=2&&(_e[e+42>>1]=S.status),n&&n(e,S,t);};try{S.send(k);}catch(t){i&&i(e,S,t);}}else i(e,0,"no url specified!");}function si(e,t,i,r,n){if(e){var a=me[t+112+64>>2];a||(a=me[t+8>>2]);var s=ie(a);try{var o=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(i,s);o.onsuccess=function(e){_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),r(t,0,s);},o.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=413,ne("Payload Too Large",t+44,64),n(t,0,e);};}catch(e){n(t,0,e);}}else n(t,0,"IndexedDB not available!");}function oi(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readonly").objectStore("FILES").get(a);s.onsuccess=function(e){if(e.target.result){var n=e.target.result,a=n.byteLength||n.length,s=ya(a);ce.set(new Uint8Array(n),s),me[t+12>>2]=s,ni.setu64(t+16,a),ni.setu64(t+24,0),ni.setu64(t+32,a),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,n);}else _e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,"no data");},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e);};}catch(e){r(t,0,e);}}else r(t,0,"IndexedDB not available!");}function li(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readwrite").objectStore("FILES")["delete"](a);s.onsuccess=function(e){var r=e.target.result;me[t+12>>2]=0,ni.setu64(t+16,0),ni.setu64(t+24,0),ni.setu64(t+32,0),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,r);},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e);};}catch(e){r(t,0,e);}}else r(t,0,"IndexedDB not available!");}function fi(e,t,i,r,n){void 0!==B&&(B=!0);var a=e+112,s=ie(a),o=me[a+36>>2],l=me[a+40>>2],f=me[a+44>>2],u=me[a+48>>2],h=me[a+52>>2],c=!!(4&h),d=!!(32&h),_=!!(16&h),p=function p(e,i,r){o?Ca(o,e):t&&t(e);},m=function m(e,t,i){f?Ca(f,e):r&&r(e);},b=function b(e,t,r){l?Ca(l,e):i&&i(e);},v=function v(e,t,i){u?Ca(u,e):n&&n(e);},y=function y(e,i,r){si(ni.dbInstance,e,i.response,function(e,i,r){o?Ca(o,e):t&&t(e);},function(e,i,r){o?Ca(o,e):t&&t(e);});};if("EM_IDB_STORE"===s){var g=me[a+84>>2];si(ni.dbInstance,e,ce.slice(g,g+me[a+88>>2]),p,b);}else if("EM_IDB_DELETE"===s)li(ni.dbInstance,e,p,b);else if(_){if(d)return 0;ai(e,c?y:p,b,m,v);}else oi(ni.dbInstance,e,p,d?b:c?function(e,t,i){ai(e,y,b,m,v);}:function(e,t,i){ai(e,p,b,m,v);});return e;}var ui=Xe;function hi(e){return 0===e?0:(e=ie(e),wt.hasOwnProperty(e)?(hi.ret&&va(hi.ret),hi.ret=se(wt[e]),hi.ret):0);}function ci(e){var t=Date.now();return pe[e>>2]=t/1e3|0,pe[e+4>>2]=t%1e3*1e3|0,0;}var di=(ne("GMT",1126928,4),1126928);function _i(e,t){var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getUTCSeconds(),pe[t+4>>2]=i.getUTCMinutes(),pe[t+8>>2]=i.getUTCHours(),pe[t+12>>2]=i.getUTCDate(),pe[t+16>>2]=i.getUTCMonth(),pe[t+20>>2]=i.getUTCFullYear()-1900,pe[t+24>>2]=i.getUTCDay(),pe[t+36>>2]=0,pe[t+32>>2]=0;var r=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),n=(i.getTime()-r)/864e5|0;return pe[t+28>>2]=n,pe[t+40>>2]=di,t;}function pi(e){return Math.pow(2,e);}function mi(e){return pi(e);}function bi(e){return Math.log(e)/Math.LN2;}function vi(e){var t=yi,i=t.LLVM_SAVEDSTACKS[e];t.LLVM_SAVEDSTACKS.splice(e,1),wa(i);}function yi(){var e=yi;return e.LLVM_SAVEDSTACKS||(e.LLVM_SAVEDSTACKS=[]),e.LLVM_SAVEDSTACKS.push(Ea()),e.LLVM_SAVEDSTACKS.length-1;}var gi=Ze;function wi(){if(!wi.called){wi.called=!0,pe[ma()>>2]=60*new Date().getTimezoneOffset();var e=new Date().getFullYear(),t=new Date(e,0,1),i=new Date(e,6,1);pe[pa()>>2]=Number(t.getTimezoneOffset()!=i.getTimezoneOffset());var r=o(t),n=o(i),a=J(Ni(r),"i8",Q),s=J(Ni(n),"i8",Q);i.getTimezoneOffset()>2]=a,pe[ba()+4>>2]=s):(pe[ba()>>2]=s,pe[ba()+4>>2]=a);}function o(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT";}}function Ei(e,t){wi();var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getSeconds(),pe[t+4>>2]=i.getMinutes(),pe[t+8>>2]=i.getHours(),pe[t+12>>2]=i.getDate(),pe[t+16>>2]=i.getMonth(),pe[t+20>>2]=i.getFullYear()-1900,pe[t+24>>2]=i.getDay();var r=new Date(i.getFullYear(),0,1),n=(i.getTime()-r.getTime())/864e5|0;pe[t+28>>2]=n,pe[t+36>>2]=-60*i.getTimezoneOffset();var a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),s=r.getTimezoneOffset(),o=0|(a!=s&&i.getTimezoneOffset()==Math.min(s,a));pe[t+32>>2]=o;var l=pe[ba()+(o?4:0)>>2];return pe[t+40>>2]=l,t;}function Ci(e,t,i){ce.set(ce.subarray(t,t+i),e);}function Si(e){var t=e/1e3;if((v||y)&&self.performance&&self.performance.now)for(var i=self.performance.now();self.performance.now()-i>2],r=pe[e+4>>2];return r<0||r>999999999||i<0?(St(28),-1):(0!==t&&(pe[t>>2]=0,pe[t+4>>2]=0),Si(1e6*i+r/1e3));}function Ti(){return 0;}function Ai(){return 0;}function xi(){return 6;}function Mi(){}function ki(e){return e%4==0&&(e%100!=0||e%400==0);}function Pi(e,t){for(var i=0,r=0;r<=t;i+=e[r++]){;}return i;}var Ii=[31,29,31,30,31,30,31,31,30,31,30,31],Ri=[31,28,31,30,31,30,31,31,30,31,30,31];function Ui(e,t){for(var i=new Date(e.getTime());t>0;){var r=ki(i.getFullYear()),n=i.getMonth(),a=(r?Ii:Ri)[n];if(!(t>a-i.getDate()))return i.setDate(i.getDate()+t),i;t-=a-i.getDate()+1,i.setDate(1),n<11?i.setMonth(n+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1));}return i;}function Di(e,t,i,r){var n=pe[r+40>>2],a={tm_sec:pe[r>>2],tm_min:pe[r+4>>2],tm_hour:pe[r+8>>2],tm_mday:pe[r+12>>2],tm_mon:pe[r+16>>2],tm_year:pe[r+20>>2],tm_wday:pe[r+24>>2],tm_yday:pe[r+28>>2],tm_isdst:pe[r+32>>2],tm_gmtoff:pe[r+36>>2],tm_zone:n?ie(n):""},s=ie(i),o={"%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","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in o){s=s.replace(new RegExp(l,"g"),o[l]);}var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(e,t,i){for(var r="number"==typeof e?e.toString():e||"";r.length0?1:0;}var r;return 0===(r=i(e.getFullYear()-t.getFullYear()))&&0===(r=i(e.getMonth()-t.getMonth()))&&(r=i(e.getDate()-t.getDate())),r;}function _(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 p(e){var t=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday),i=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),n=_(i),a=_(r);return d(n,t)<=0?d(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1;}var m={"%a":function a(e){return f[e.tm_wday].substring(0,3);},"%A":function A(e){return f[e.tm_wday];},"%b":function b(e){return u[e.tm_mon].substring(0,3);},"%B":function B(e){return u[e.tm_mon];},"%C":function C(e){return c((e.tm_year+1900)/100|0,2);},"%d":function d(e){return c(e.tm_mday,2);},"%e":function e(_e2){return h(_e2.tm_mday,2," ");},"%g":function g(e){return p(e).toString().substring(2);},"%G":function G(e){return p(e);},"%H":function H(e){return c(e.tm_hour,2);},"%I":function I(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),c(t,2);},"%j":function j(e){return c(e.tm_mday+Pi(ki(e.tm_year+1900)?Ii:Ri,e.tm_mon-1),3);},"%m":function m(e){return c(e.tm_mon+1,2);},"%M":function M(e){return c(e.tm_min,2);},"%n":function n(){return"\n";},"%p":function p(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM";},"%S":function S(e){return c(e.tm_sec,2);},"%t":function t(){return"\t";},"%u":function u(e){return e.tm_wday||7;},"%U":function U(e){var t=new Date(e.tm_year+1900,0,1),i=0===t.getDay()?t:Ui(t,7-t.getDay()),r=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(d(i,r)<0){var n=Pi(ki(r.getFullYear())?Ii:Ri,r.getMonth()-1)-31,a=31-i.getDate()+n+r.getDate();return c(Math.ceil(a/7),2);}return 0===d(i,t)?"01":"00";},"%V":function V(e){var t,i=new Date(e.tm_year+1900,0,4),r=new Date(e.tm_year+1901,0,4),n=_(i),a=_(r),s=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday);return d(s,n)<0?"53":d(a,s)<=0?"01":(t=n.getFullYear()=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(i?"+":"-")+String("0000"+t).slice(-4);},"%Z":function Z(e){return e.tm_zone;},"%%":function _(){return"%";}};for(var l in m){s.indexOf(l)>=0&&(s=s.replace(new RegExp(l,"g"),m[l](a)));}var b=Ni(s,!1);return b.length>t?0:(le(b,e),b.length-1);}function Fi(e){switch(e){case 30:return ye;case 85:return 2147418112/ye;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.hardwareConcurrency||1;}return St(28),-1;}function Oi(e){var t=Date.now()/1e3|0;return e&&(pe[e>>2]=t),t;}if(Ut.staticInit(),w){var Li=e("fs"),Bi=e("path");Pt.staticInit();}function Ni(e,t,i){var r=i>0?i:ae(e)+1,n=new Array(r),a=re(e,n,0,n.length);return t&&(n.length=a),n;}Zt=g?function(){var e=i.hrtime();return 1e3*e[0]+e[1]/1e6;}:"undefined"!=typeof dateNow?dateNow:"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now?function(){return performance.now();}:Date.now,ni.staticInit();var zi=[0,"jsCall_dd_0","jsCall_dd_1","jsCall_dd_2","jsCall_dd_3","jsCall_dd_4","jsCall_dd_5","jsCall_dd_6","jsCall_dd_7","jsCall_dd_8","jsCall_dd_9","jsCall_dd_10","jsCall_dd_11","jsCall_dd_12","jsCall_dd_13","jsCall_dd_14","jsCall_dd_15","jsCall_dd_16","jsCall_dd_17","jsCall_dd_18","jsCall_dd_19","jsCall_dd_20","jsCall_dd_21","jsCall_dd_22","jsCall_dd_23","jsCall_dd_24","jsCall_dd_25","jsCall_dd_26","jsCall_dd_27","jsCall_dd_28","jsCall_dd_29","jsCall_dd_30","jsCall_dd_31","jsCall_dd_32","jsCall_dd_33","jsCall_dd_34","_sinh","_cosh","_tanh","_sin","_cos","_tan","_atan","_asin","_acos","_exp","_log","_fabs","_etime",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Hi=[0,"jsCall_did_0","jsCall_did_1","jsCall_did_2","jsCall_did_3","jsCall_did_4","jsCall_did_5","jsCall_did_6","jsCall_did_7","jsCall_did_8","jsCall_did_9","jsCall_did_10","jsCall_did_11","jsCall_did_12","jsCall_did_13","jsCall_did_14","jsCall_did_15","jsCall_did_16","jsCall_did_17","jsCall_did_18","jsCall_did_19","jsCall_did_20","jsCall_did_21","jsCall_did_22","jsCall_did_23","jsCall_did_24","jsCall_did_25","jsCall_did_26","jsCall_did_27","jsCall_did_28","jsCall_did_29","jsCall_did_30","jsCall_did_31","jsCall_did_32","jsCall_did_33","jsCall_did_34",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,0],Vi=[0,"jsCall_didd_0","jsCall_didd_1","jsCall_didd_2","jsCall_didd_3","jsCall_didd_4","jsCall_didd_5","jsCall_didd_6","jsCall_didd_7","jsCall_didd_8","jsCall_didd_9","jsCall_didd_10","jsCall_didd_11","jsCall_didd_12","jsCall_didd_13","jsCall_didd_14","jsCall_didd_15","jsCall_didd_16","jsCall_didd_17","jsCall_didd_18","jsCall_didd_19","jsCall_didd_20","jsCall_didd_21","jsCall_didd_22","jsCall_didd_23","jsCall_didd_24","jsCall_didd_25","jsCall_didd_26","jsCall_didd_27","jsCall_didd_28","jsCall_didd_29","jsCall_didd_30","jsCall_didd_31","jsCall_didd_32","jsCall_didd_33","jsCall_didd_34",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,0],Yi=[0,"jsCall_fii_0","jsCall_fii_1","jsCall_fii_2","jsCall_fii_3","jsCall_fii_4","jsCall_fii_5","jsCall_fii_6","jsCall_fii_7","jsCall_fii_8","jsCall_fii_9","jsCall_fii_10","jsCall_fii_11","jsCall_fii_12","jsCall_fii_13","jsCall_fii_14","jsCall_fii_15","jsCall_fii_16","jsCall_fii_17","jsCall_fii_18","jsCall_fii_19","jsCall_fii_20","jsCall_fii_21","jsCall_fii_22","jsCall_fii_23","jsCall_fii_24","jsCall_fii_25","jsCall_fii_26","jsCall_fii_27","jsCall_fii_28","jsCall_fii_29","jsCall_fii_30","jsCall_fii_31","jsCall_fii_32","jsCall_fii_33","jsCall_fii_34","_sbr_sum_square_c",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],qi=[0,"jsCall_fiii_0","jsCall_fiii_1","jsCall_fiii_2","jsCall_fiii_3","jsCall_fiii_4","jsCall_fiii_5","jsCall_fiii_6","jsCall_fiii_7","jsCall_fiii_8","jsCall_fiii_9","jsCall_fiii_10","jsCall_fiii_11","jsCall_fiii_12","jsCall_fiii_13","jsCall_fiii_14","jsCall_fiii_15","jsCall_fiii_16","jsCall_fiii_17","jsCall_fiii_18","jsCall_fiii_19","jsCall_fiii_20","jsCall_fiii_21","jsCall_fiii_22","jsCall_fiii_23","jsCall_fiii_24","jsCall_fiii_25","jsCall_fiii_26","jsCall_fiii_27","jsCall_fiii_28","jsCall_fiii_29","jsCall_fiii_30","jsCall_fiii_31","jsCall_fiii_32","jsCall_fiii_33","jsCall_fiii_34","_avpriv_scalarproduct_float_c",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],Wi=[0,"jsCall_ii_0","jsCall_ii_1","jsCall_ii_2","jsCall_ii_3","jsCall_ii_4","jsCall_ii_5","jsCall_ii_6","jsCall_ii_7","jsCall_ii_8","jsCall_ii_9","jsCall_ii_10","jsCall_ii_11","jsCall_ii_12","jsCall_ii_13","jsCall_ii_14","jsCall_ii_15","jsCall_ii_16","jsCall_ii_17","jsCall_ii_18","jsCall_ii_19","jsCall_ii_20","jsCall_ii_21","jsCall_ii_22","jsCall_ii_23","jsCall_ii_24","jsCall_ii_25","jsCall_ii_26","jsCall_ii_27","jsCall_ii_28","jsCall_ii_29","jsCall_ii_30","jsCall_ii_31","jsCall_ii_32","jsCall_ii_33","jsCall_ii_34","_av_default_item_name","_ff_avio_child_class_next","_flv_probe","_flv_read_header","_flv_read_close","_live_flv_probe","_mov_probe","_mov_read_header","_mov_read_close","_mpegts_probe","_mpegts_read_header","_mpegts_read_close","_format_to_name","_format_child_class_next","_get_category","_urlcontext_to_name","_ff_urlcontext_child_class_next","_sws_context_to_name","_ff_bsf_child_class_next","_hevc_mp4toannexb_init","_hevc_init_thread_copy","_hevc_decode_init","_hevc_decode_free","_context_to_name","_codec_child_class_next","_get_category_2282","_aac_decode_init","_aac_decode_close","_init","___stdio_close","___emscripten_stdout_close","_releaseSniffStreamFunc","_hflv_releaseFunc","_hflv_getBufferLength","_initializeDecoderFunc","__getFrame","_closeVideoFunc","_releaseFunc","_initializeDemuxerFunc","_getPacketFunc","_releaseDemuxerFunc","_io_short_seek","_avio_rb16","_avio_rl16","_av_buffer_allocz","_frame_worker_thread","_av_buffer_alloc","_thread_worker",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Xi=[0,"jsCall_iid_0","jsCall_iid_1","jsCall_iid_2","jsCall_iid_3","jsCall_iid_4","jsCall_iid_5","jsCall_iid_6","jsCall_iid_7","jsCall_iid_8","jsCall_iid_9","jsCall_iid_10","jsCall_iid_11","jsCall_iid_12","jsCall_iid_13","jsCall_iid_14","jsCall_iid_15","jsCall_iid_16","jsCall_iid_17","jsCall_iid_18","jsCall_iid_19","jsCall_iid_20","jsCall_iid_21","jsCall_iid_22","jsCall_iid_23","jsCall_iid_24","jsCall_iid_25","jsCall_iid_26","jsCall_iid_27","jsCall_iid_28","jsCall_iid_29","jsCall_iid_30","jsCall_iid_31","jsCall_iid_32","jsCall_iid_33","jsCall_iid_34","_seekBufferFunc",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],Gi=[0,"jsCall_iidiiii_0","jsCall_iidiiii_1","jsCall_iidiiii_2","jsCall_iidiiii_3","jsCall_iidiiii_4","jsCall_iidiiii_5","jsCall_iidiiii_6","jsCall_iidiiii_7","jsCall_iidiiii_8","jsCall_iidiiii_9","jsCall_iidiiii_10","jsCall_iidiiii_11","jsCall_iidiiii_12","jsCall_iidiiii_13","jsCall_iidiiii_14","jsCall_iidiiii_15","jsCall_iidiiii_16","jsCall_iidiiii_17","jsCall_iidiiii_18","jsCall_iidiiii_19","jsCall_iidiiii_20","jsCall_iidiiii_21","jsCall_iidiiii_22","jsCall_iidiiii_23","jsCall_iidiiii_24","jsCall_iidiiii_25","jsCall_iidiiii_26","jsCall_iidiiii_27","jsCall_iidiiii_28","jsCall_iidiiii_29","jsCall_iidiiii_30","jsCall_iidiiii_31","jsCall_iidiiii_32","jsCall_iidiiii_33","jsCall_iidiiii_34","_fmt_fp",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],Ki=[0,"jsCall_iii_0","jsCall_iii_1","jsCall_iii_2","jsCall_iii_3","jsCall_iii_4","jsCall_iii_5","jsCall_iii_6","jsCall_iii_7","jsCall_iii_8","jsCall_iii_9","jsCall_iii_10","jsCall_iii_11","jsCall_iii_12","jsCall_iii_13","jsCall_iii_14","jsCall_iii_15","jsCall_iii_16","jsCall_iii_17","jsCall_iii_18","jsCall_iii_19","jsCall_iii_20","jsCall_iii_21","jsCall_iii_22","jsCall_iii_23","jsCall_iii_24","jsCall_iii_25","jsCall_iii_26","jsCall_iii_27","jsCall_iii_28","jsCall_iii_29","jsCall_iii_30","jsCall_iii_31","jsCall_iii_32","jsCall_iii_33","jsCall_iii_34","_ff_avio_child_next","_flv_read_packet","_mov_read_packet","_mpegts_read_packet","_mpegts_raw_read_packet","_format_child_next","_urlcontext_child_next","_bsf_child_next","_hevc_mp4toannexb_filter","_hevc_update_thread_context","_null_filter","_codec_child_next","_initSniffStreamFunc","_hflv_initFunc","_hflv_getPacketFunc","_io_read_pause","_descriptor_compare","_hls_decode_entry","_avcodec_default_get_format","_ff_startcode_find_candidate_c","_color_table_compare",0,0,0,0,0,0,0],Qi=[0,"jsCall_iiii_0","jsCall_iiii_1","jsCall_iiii_2","jsCall_iiii_3","jsCall_iiii_4","jsCall_iiii_5","jsCall_iiii_6","jsCall_iiii_7","jsCall_iiii_8","jsCall_iiii_9","jsCall_iiii_10","jsCall_iiii_11","jsCall_iiii_12","jsCall_iiii_13","jsCall_iiii_14","jsCall_iiii_15","jsCall_iiii_16","jsCall_iiii_17","jsCall_iiii_18","jsCall_iiii_19","jsCall_iiii_20","jsCall_iiii_21","jsCall_iiii_22","jsCall_iiii_23","jsCall_iiii_24","jsCall_iiii_25","jsCall_iiii_26","jsCall_iiii_27","jsCall_iiii_28","jsCall_iiii_29","jsCall_iiii_30","jsCall_iiii_31","jsCall_iiii_32","jsCall_iiii_33","jsCall_iiii_34","_mov_read_aclr","_mov_read_avid","_mov_read_ares","_mov_read_avss","_mov_read_av1c","_mov_read_chpl","_mov_read_stco","_mov_read_colr","_mov_read_ctts","_mov_read_default","_mov_read_dpxe","_mov_read_dref","_mov_read_elst","_mov_read_enda","_mov_read_fiel","_mov_read_adrm","_mov_read_ftyp","_mov_read_glbl","_mov_read_hdlr","_mov_read_ilst","_mov_read_jp2h","_mov_read_mdat","_mov_read_mdhd","_mov_read_meta","_mov_read_moof","_mov_read_moov","_mov_read_mvhd","_mov_read_svq3","_mov_read_alac","_mov_read_pasp","_mov_read_sidx","_mov_read_stps","_mov_read_strf","_mov_read_stsc","_mov_read_stsd","_mov_read_stss","_mov_read_stsz","_mov_read_stts","_mov_read_tkhd","_mov_read_tfdt","_mov_read_tfhd","_mov_read_trak","_mov_read_tmcd","_mov_read_chap","_mov_read_trex","_mov_read_trun","_mov_read_wave","_mov_read_esds","_mov_read_dac3","_mov_read_dec3","_mov_read_ddts","_mov_read_wide","_mov_read_wfex","_mov_read_cmov","_mov_read_chan","_mov_read_dvc1","_mov_read_sbgp","_mov_read_uuid","_mov_read_targa_y216","_mov_read_free","_mov_read_custom","_mov_read_frma","_mov_read_senc","_mov_read_saiz","_mov_read_saio","_mov_read_pssh","_mov_read_schm","_mov_read_tenc","_mov_read_dfla","_mov_read_st3d","_mov_read_sv3d","_mov_read_dops","_mov_read_smdm","_mov_read_coll","_mov_read_vpcc","_mov_read_mdcv","_mov_read_clli","_h264_split","_hevc_split","___stdio_write","_sn_write","_read_stream_live","_read_stream_vod","_getSniffStreamPacketFunc","_hflv_read_stream_live","_setCodecTypeFunc","_read_packet","_io_write_packet","_io_read_packet","_dyn_buf_write","_mov_read_keys","_mov_read_udta_string","_avcodec_default_get_buffer2","_do_read",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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Zi=[0,"jsCall_iiiii_0","jsCall_iiiii_1","jsCall_iiiii_2","jsCall_iiiii_3","jsCall_iiiii_4","jsCall_iiiii_5","jsCall_iiiii_6","jsCall_iiiii_7","jsCall_iiiii_8","jsCall_iiiii_9","jsCall_iiiii_10","jsCall_iiiii_11","jsCall_iiiii_12","jsCall_iiiii_13","jsCall_iiiii_14","jsCall_iiiii_15","jsCall_iiiii_16","jsCall_iiiii_17","jsCall_iiiii_18","jsCall_iiiii_19","jsCall_iiiii_20","jsCall_iiiii_21","jsCall_iiiii_22","jsCall_iiiii_23","jsCall_iiiii_24","jsCall_iiiii_25","jsCall_iiiii_26","jsCall_iiiii_27","jsCall_iiiii_28","jsCall_iiiii_29","jsCall_iiiii_30","jsCall_iiiii_31","jsCall_iiiii_32","jsCall_iiiii_33","jsCall_iiiii_34","_hevc_decode_frame","_aac_decode_frame","_hflv_pushBufferFunc","_demuxBoxFunc","_mov_metadata_int8_no_padding","_mov_metadata_track_or_disc_number","_mov_metadata_gnre","_mov_metadata_int8_bypass_padding","_lum_planar_vscale","_chr_planar_vscale","_any_vscale","_packed_vscale","_gamma_convert","_lum_convert","_lum_h_scale","_chr_convert","_chr_h_scale","_no_chr_scale","_hls_decode_entry_wpp",0,0,0,0,0,0,0,0,0],Ji=[0,"jsCall_iiiiii_0","jsCall_iiiiii_1","jsCall_iiiiii_2","jsCall_iiiiii_3","jsCall_iiiiii_4","jsCall_iiiiii_5","jsCall_iiiiii_6","jsCall_iiiiii_7","jsCall_iiiiii_8","jsCall_iiiiii_9","jsCall_iiiiii_10","jsCall_iiiiii_11","jsCall_iiiiii_12","jsCall_iiiiii_13","jsCall_iiiiii_14","jsCall_iiiiii_15","jsCall_iiiiii_16","jsCall_iiiiii_17","jsCall_iiiiii_18","jsCall_iiiiii_19","jsCall_iiiiii_20","jsCall_iiiiii_21","jsCall_iiiiii_22","jsCall_iiiiii_23","jsCall_iiiiii_24","jsCall_iiiiii_25","jsCall_iiiiii_26","jsCall_iiiiii_27","jsCall_iiiiii_28","jsCall_iiiiii_29","jsCall_iiiiii_30","jsCall_iiiiii_31","jsCall_iiiiii_32","jsCall_iiiiii_33","jsCall_iiiiii_34","_pushBufferFunc","_decodeCodecContextFunc","_io_open_default","_avcodec_default_execute2","_thread_execute2","_sbr_lf_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],$i=[0,"jsCall_iiiiiii_0","jsCall_iiiiiii_1","jsCall_iiiiiii_2","jsCall_iiiiiii_3","jsCall_iiiiiii_4","jsCall_iiiiiii_5","jsCall_iiiiiii_6","jsCall_iiiiiii_7","jsCall_iiiiiii_8","jsCall_iiiiiii_9","jsCall_iiiiiii_10","jsCall_iiiiiii_11","jsCall_iiiiiii_12","jsCall_iiiiiii_13","jsCall_iiiiiii_14","jsCall_iiiiiii_15","jsCall_iiiiiii_16","jsCall_iiiiiii_17","jsCall_iiiiiii_18","jsCall_iiiiiii_19","jsCall_iiiiiii_20","jsCall_iiiiiii_21","jsCall_iiiiiii_22","jsCall_iiiiiii_23","jsCall_iiiiiii_24","jsCall_iiiiiii_25","jsCall_iiiiiii_26","jsCall_iiiiiii_27","jsCall_iiiiiii_28","jsCall_iiiiiii_29","jsCall_iiiiiii_30","jsCall_iiiiiii_31","jsCall_iiiiiii_32","jsCall_iiiiiii_33","jsCall_iiiiiii_34","_h264_parse","_hevc_parse","_hflv_decodeVideoFrameFunc","_avcodec_default_execute","_thread_execute","_sbr_x_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],er=[0,"jsCall_iiiiiiii_0","jsCall_iiiiiiii_1","jsCall_iiiiiiii_2","jsCall_iiiiiiii_3","jsCall_iiiiiiii_4","jsCall_iiiiiiii_5","jsCall_iiiiiiii_6","jsCall_iiiiiiii_7","jsCall_iiiiiiii_8","jsCall_iiiiiiii_9","jsCall_iiiiiiii_10","jsCall_iiiiiiii_11","jsCall_iiiiiiii_12","jsCall_iiiiiiii_13","jsCall_iiiiiiii_14","jsCall_iiiiiiii_15","jsCall_iiiiiiii_16","jsCall_iiiiiiii_17","jsCall_iiiiiiii_18","jsCall_iiiiiiii_19","jsCall_iiiiiiii_20","jsCall_iiiiiiii_21","jsCall_iiiiiiii_22","jsCall_iiiiiiii_23","jsCall_iiiiiiii_24","jsCall_iiiiiiii_25","jsCall_iiiiiiii_26","jsCall_iiiiiiii_27","jsCall_iiiiiiii_28","jsCall_iiiiiiii_29","jsCall_iiiiiiii_30","jsCall_iiiiiiii_31","jsCall_iiiiiiii_32","jsCall_iiiiiiii_33","jsCall_iiiiiiii_34","_decodeVideoFrameFunc","_setSniffStreamCodecTypeFunc","_hflv_setSniffStreamCodecTypeFunc","_swscale","_ff_sws_alphablendaway","_yuv2rgb_c_32","_yuva2rgba_c","_yuv2rgb_c_bgr48","_yuv2rgb_c_48","_yuva2argb_c","_yuv2rgb_c_24_rgb","_yuv2rgb_c_24_bgr","_yuv2rgb_c_16_ordered_dither","_yuv2rgb_c_15_ordered_dither","_yuv2rgb_c_12_ordered_dither","_yuv2rgb_c_8_ordered_dither","_yuv2rgb_c_4_ordered_dither","_yuv2rgb_c_4b_ordered_dither","_yuv2rgb_c_1_ordered_dither","_planarToP01xWrapper","_planar8ToP01xleWrapper","_yvu9ToYv12Wrapper","_bgr24ToYv12Wrapper","_rgbToRgbWrapper","_planarRgbToplanarRgbWrapper","_planarRgbToRgbWrapper","_planarRgbaToRgbWrapper","_Rgb16ToPlanarRgb16Wrapper","_planarRgb16ToRgb16Wrapper","_rgbToPlanarRgbWrapper","_bayer_to_rgb24_wrapper","_bayer_to_yv12_wrapper","_bswap_16bpc","_palToRgbWrapper","_yuv422pToYuy2Wrapper","_yuv422pToUyvyWrapper","_uint_y_to_float_y_wrapper","_float_y_to_uint_y_wrapper","_planarToYuy2Wrapper","_planarToUyvyWrapper","_yuyvToYuv420Wrapper","_uyvyToYuv420Wrapper","_yuyvToYuv422Wrapper","_uyvyToYuv422Wrapper","_packedCopyWrapper","_planarCopyWrapper","_planarToNv12Wrapper","_planarToNv24Wrapper","_nv12ToPlanarWrapper","_nv24ToPlanarWrapper",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],tr=[0,"jsCall_iiiiij_0","jsCall_iiiiij_1","jsCall_iiiiij_2","jsCall_iiiiij_3","jsCall_iiiiij_4","jsCall_iiiiij_5","jsCall_iiiiij_6","jsCall_iiiiij_7","jsCall_iiiiij_8","jsCall_iiiiij_9","jsCall_iiiiij_10","jsCall_iiiiij_11","jsCall_iiiiij_12","jsCall_iiiiij_13","jsCall_iiiiij_14","jsCall_iiiiij_15","jsCall_iiiiij_16","jsCall_iiiiij_17","jsCall_iiiiij_18","jsCall_iiiiij_19","jsCall_iiiiij_20","jsCall_iiiiij_21","jsCall_iiiiij_22","jsCall_iiiiij_23","jsCall_iiiiij_24","jsCall_iiiiij_25","jsCall_iiiiij_26","jsCall_iiiiij_27","jsCall_iiiiij_28","jsCall_iiiiij_29","jsCall_iiiiij_30","jsCall_iiiiij_31","jsCall_iiiiij_32","jsCall_iiiiij_33","jsCall_iiiiij_34","_mpegts_push_data",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],ir=[0,"jsCall_iiiji_0","jsCall_iiiji_1","jsCall_iiiji_2","jsCall_iiiji_3","jsCall_iiiji_4","jsCall_iiiji_5","jsCall_iiiji_6","jsCall_iiiji_7","jsCall_iiiji_8","jsCall_iiiji_9","jsCall_iiiji_10","jsCall_iiiji_11","jsCall_iiiji_12","jsCall_iiiji_13","jsCall_iiiji_14","jsCall_iiiji_15","jsCall_iiiji_16","jsCall_iiiji_17","jsCall_iiiji_18","jsCall_iiiji_19","jsCall_iiiji_20","jsCall_iiiji_21","jsCall_iiiji_22","jsCall_iiiji_23","jsCall_iiiji_24","jsCall_iiiji_25","jsCall_iiiji_26","jsCall_iiiji_27","jsCall_iiiji_28","jsCall_iiiji_29","jsCall_iiiji_30","jsCall_iiiji_31","jsCall_iiiji_32","jsCall_iiiji_33","jsCall_iiiji_34","_flv_read_seek","_mov_read_seek",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],rr=[0,"jsCall_iiijjji_0","jsCall_iiijjji_1","jsCall_iiijjji_2","jsCall_iiijjji_3","jsCall_iiijjji_4","jsCall_iiijjji_5","jsCall_iiijjji_6","jsCall_iiijjji_7","jsCall_iiijjji_8","jsCall_iiijjji_9","jsCall_iiijjji_10","jsCall_iiijjji_11","jsCall_iiijjji_12","jsCall_iiijjji_13","jsCall_iiijjji_14","jsCall_iiijjji_15","jsCall_iiijjji_16","jsCall_iiijjji_17","jsCall_iiijjji_18","jsCall_iiijjji_19","jsCall_iiijjji_20","jsCall_iiijjji_21","jsCall_iiijjji_22","jsCall_iiijjji_23","jsCall_iiijjji_24","jsCall_iiijjji_25","jsCall_iiijjji_26","jsCall_iiijjji_27","jsCall_iiijjji_28","jsCall_iiijjji_29","jsCall_iiijjji_30","jsCall_iiijjji_31","jsCall_iiijjji_32","jsCall_iiijjji_33","jsCall_iiijjji_34",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,0],nr=[0,"jsCall_jiiij_0","jsCall_jiiij_1","jsCall_jiiij_2","jsCall_jiiij_3","jsCall_jiiij_4","jsCall_jiiij_5","jsCall_jiiij_6","jsCall_jiiij_7","jsCall_jiiij_8","jsCall_jiiij_9","jsCall_jiiij_10","jsCall_jiiij_11","jsCall_jiiij_12","jsCall_jiiij_13","jsCall_jiiij_14","jsCall_jiiij_15","jsCall_jiiij_16","jsCall_jiiij_17","jsCall_jiiij_18","jsCall_jiiij_19","jsCall_jiiij_20","jsCall_jiiij_21","jsCall_jiiij_22","jsCall_jiiij_23","jsCall_jiiij_24","jsCall_jiiij_25","jsCall_jiiij_26","jsCall_jiiij_27","jsCall_jiiij_28","jsCall_jiiij_29","jsCall_jiiij_30","jsCall_jiiij_31","jsCall_jiiij_32","jsCall_jiiij_33","jsCall_jiiij_34","_mpegts_get_dts",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],ar=[0,"jsCall_jiiji_0","jsCall_jiiji_1","jsCall_jiiji_2","jsCall_jiiji_3","jsCall_jiiji_4","jsCall_jiiji_5","jsCall_jiiji_6","jsCall_jiiji_7","jsCall_jiiji_8","jsCall_jiiji_9","jsCall_jiiji_10","jsCall_jiiji_11","jsCall_jiiji_12","jsCall_jiiji_13","jsCall_jiiji_14","jsCall_jiiji_15","jsCall_jiiji_16","jsCall_jiiji_17","jsCall_jiiji_18","jsCall_jiiji_19","jsCall_jiiji_20","jsCall_jiiji_21","jsCall_jiiji_22","jsCall_jiiji_23","jsCall_jiiji_24","jsCall_jiiji_25","jsCall_jiiji_26","jsCall_jiiji_27","jsCall_jiiji_28","jsCall_jiiji_29","jsCall_jiiji_30","jsCall_jiiji_31","jsCall_jiiji_32","jsCall_jiiji_33","jsCall_jiiji_34","_io_read_seek",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],sr=[0,"jsCall_jiji_0","jsCall_jiji_1","jsCall_jiji_2","jsCall_jiji_3","jsCall_jiji_4","jsCall_jiji_5","jsCall_jiji_6","jsCall_jiji_7","jsCall_jiji_8","jsCall_jiji_9","jsCall_jiji_10","jsCall_jiji_11","jsCall_jiji_12","jsCall_jiji_13","jsCall_jiji_14","jsCall_jiji_15","jsCall_jiji_16","jsCall_jiji_17","jsCall_jiji_18","jsCall_jiji_19","jsCall_jiji_20","jsCall_jiji_21","jsCall_jiji_22","jsCall_jiji_23","jsCall_jiji_24","jsCall_jiji_25","jsCall_jiji_26","jsCall_jiji_27","jsCall_jiji_28","jsCall_jiji_29","jsCall_jiji_30","jsCall_jiji_31","jsCall_jiji_32","jsCall_jiji_33","jsCall_jiji_34","___stdio_seek","___emscripten_stdout_seek","_seek_in_buffer","_io_seek","_dyn_buf_seek",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],or=[0,"jsCall_v_0","jsCall_v_1","jsCall_v_2","jsCall_v_3","jsCall_v_4","jsCall_v_5","jsCall_v_6","jsCall_v_7","jsCall_v_8","jsCall_v_9","jsCall_v_10","jsCall_v_11","jsCall_v_12","jsCall_v_13","jsCall_v_14","jsCall_v_15","jsCall_v_16","jsCall_v_17","jsCall_v_18","jsCall_v_19","jsCall_v_20","jsCall_v_21","jsCall_v_22","jsCall_v_23","jsCall_v_24","jsCall_v_25","jsCall_v_26","jsCall_v_27","jsCall_v_28","jsCall_v_29","jsCall_v_30","jsCall_v_31","jsCall_v_32","jsCall_v_33","jsCall_v_34","_init_ff_cos_tabs_16","_init_ff_cos_tabs_32","_init_ff_cos_tabs_64","_init_ff_cos_tabs_128","_init_ff_cos_tabs_256","_init_ff_cos_tabs_512","_init_ff_cos_tabs_1024","_init_ff_cos_tabs_2048","_init_ff_cos_tabs_4096","_init_ff_cos_tabs_8192","_init_ff_cos_tabs_16384","_init_ff_cos_tabs_32768","_init_ff_cos_tabs_65536","_init_ff_cos_tabs_131072","_introduce_mine","_introduceMineFunc","_av_format_init_next","_av_codec_init_static","_av_codec_init_next","_aac_static_table_init","_AV_CRC_8_ATM_init_table_once","_AV_CRC_8_EBU_init_table_once","_AV_CRC_16_ANSI_init_table_once","_AV_CRC_16_CCITT_init_table_once","_AV_CRC_24_IEEE_init_table_once","_AV_CRC_32_IEEE_init_table_once","_AV_CRC_32_IEEE_LE_init_table_once","_AV_CRC_16_ANSI_LE_init_table_once"],lr=[0,"jsCall_vdiidiiiii_0","jsCall_vdiidiiiii_1","jsCall_vdiidiiiii_2","jsCall_vdiidiiiii_3","jsCall_vdiidiiiii_4","jsCall_vdiidiiiii_5","jsCall_vdiidiiiii_6","jsCall_vdiidiiiii_7","jsCall_vdiidiiiii_8","jsCall_vdiidiiiii_9","jsCall_vdiidiiiii_10","jsCall_vdiidiiiii_11","jsCall_vdiidiiiii_12","jsCall_vdiidiiiii_13","jsCall_vdiidiiiii_14","jsCall_vdiidiiiii_15","jsCall_vdiidiiiii_16","jsCall_vdiidiiiii_17","jsCall_vdiidiiiii_18","jsCall_vdiidiiiii_19","jsCall_vdiidiiiii_20","jsCall_vdiidiiiii_21","jsCall_vdiidiiiii_22","jsCall_vdiidiiiii_23","jsCall_vdiidiiiii_24","jsCall_vdiidiiiii_25","jsCall_vdiidiiiii_26","jsCall_vdiidiiiii_27","jsCall_vdiidiiiii_28","jsCall_vdiidiiiii_29","jsCall_vdiidiiiii_30","jsCall_vdiidiiiii_31","jsCall_vdiidiiiii_32","jsCall_vdiidiiiii_33","jsCall_vdiidiiiii_34",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,0],fr=[0,"jsCall_vi_0","jsCall_vi_1","jsCall_vi_2","jsCall_vi_3","jsCall_vi_4","jsCall_vi_5","jsCall_vi_6","jsCall_vi_7","jsCall_vi_8","jsCall_vi_9","jsCall_vi_10","jsCall_vi_11","jsCall_vi_12","jsCall_vi_13","jsCall_vi_14","jsCall_vi_15","jsCall_vi_16","jsCall_vi_17","jsCall_vi_18","jsCall_vi_19","jsCall_vi_20","jsCall_vi_21","jsCall_vi_22","jsCall_vi_23","jsCall_vi_24","jsCall_vi_25","jsCall_vi_26","jsCall_vi_27","jsCall_vi_28","jsCall_vi_29","jsCall_vi_30","jsCall_vi_31","jsCall_vi_32","jsCall_vi_33","jsCall_vi_34","_free_geobtag","_free_apic","_free_chapter","_free_priv","_hevc_decode_flush","_flush","_h264_close","_hevc_parser_close","_fft4","_fft8","_fft16","_fft32","_fft64","_fft128","_fft256","_fft512","_fft1024","_fft2048","_fft4096","_fft8192","_fft16384","_fft32768","_fft65536","_fft131072","_logRequest_downloadSucceeded","_logRequest_downloadFailed","_downloadSucceeded","_downloadFailed","_transform_4x4_luma_9","_idct_4x4_dc_9","_idct_8x8_dc_9","_idct_16x16_dc_9","_idct_32x32_dc_9","_transform_4x4_luma_10","_idct_4x4_dc_10","_idct_8x8_dc_10","_idct_16x16_dc_10","_idct_32x32_dc_10","_transform_4x4_luma_12","_idct_4x4_dc_12","_idct_8x8_dc_12","_idct_16x16_dc_12","_idct_32x32_dc_12","_transform_4x4_luma_8","_idct_4x4_dc_8","_idct_8x8_dc_8","_idct_16x16_dc_8","_idct_32x32_dc_8","_main_function","_sbr_sum64x5_c","_sbr_neg_odd_64_c","_sbr_qmf_pre_shuffle_c",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,0,0,0,0,0,0,0,0,0,0,0,0,0],ur=[0,"jsCall_vii_0","jsCall_vii_1","jsCall_vii_2","jsCall_vii_3","jsCall_vii_4","jsCall_vii_5","jsCall_vii_6","jsCall_vii_7","jsCall_vii_8","jsCall_vii_9","jsCall_vii_10","jsCall_vii_11","jsCall_vii_12","jsCall_vii_13","jsCall_vii_14","jsCall_vii_15","jsCall_vii_16","jsCall_vii_17","jsCall_vii_18","jsCall_vii_19","jsCall_vii_20","jsCall_vii_21","jsCall_vii_22","jsCall_vii_23","jsCall_vii_24","jsCall_vii_25","jsCall_vii_26","jsCall_vii_27","jsCall_vii_28","jsCall_vii_29","jsCall_vii_30","jsCall_vii_31","jsCall_vii_32","jsCall_vii_33","jsCall_vii_34","_io_close_default","_lumRangeFromJpeg_c","_lumRangeToJpeg_c","_lumRangeFromJpeg16_c","_lumRangeToJpeg16_c","_decode_data_free","_dequant_9","_idct_4x4_9","_idct_8x8_9","_idct_16x16_9","_idct_32x32_9","_dequant_10","_idct_4x4_10","_idct_8x8_10","_idct_16x16_10","_idct_32x32_10","_dequant_12","_idct_4x4_12","_idct_8x8_12","_idct_16x16_12","_idct_32x32_12","_dequant_8","_idct_4x4_8","_idct_8x8_8","_idct_16x16_8","_idct_32x32_8","_imdct_and_windowing","_apply_ltp","_update_ltp","_imdct_and_windowing_ld","_imdct_and_windowing_eld","_imdct_and_windowing_960","_ff_h264_chroma_dc_dequant_idct_9_c","_ff_h264_chroma422_dc_dequant_idct_9_c","_ff_h264_chroma_dc_dequant_idct_10_c","_ff_h264_chroma422_dc_dequant_idct_10_c","_ff_h264_chroma_dc_dequant_idct_12_c","_ff_h264_chroma422_dc_dequant_idct_12_c","_ff_h264_chroma_dc_dequant_idct_14_c","_ff_h264_chroma422_dc_dequant_idct_14_c","_ff_h264_chroma_dc_dequant_idct_8_c","_ff_h264_chroma422_dc_dequant_idct_8_c","_hevc_pps_free","_sbr_qmf_post_shuffle_c","_sbr_qmf_deint_neg_c","_sbr_autocorrelate_c","_fft_permute_c","_fft_calc_c","_av_buffer_default_free","_pool_release_buffer","_sha1_transform","_sha256_transform","_pop_arg_long_double",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,0,0,0,0,0,0,0,0,0,0,0,0],hr=[0,"jsCall_viidi_0","jsCall_viidi_1","jsCall_viidi_2","jsCall_viidi_3","jsCall_viidi_4","jsCall_viidi_5","jsCall_viidi_6","jsCall_viidi_7","jsCall_viidi_8","jsCall_viidi_9","jsCall_viidi_10","jsCall_viidi_11","jsCall_viidi_12","jsCall_viidi_13","jsCall_viidi_14","jsCall_viidi_15","jsCall_viidi_16","jsCall_viidi_17","jsCall_viidi_18","jsCall_viidi_19","jsCall_viidi_20","jsCall_viidi_21","jsCall_viidi_22","jsCall_viidi_23","jsCall_viidi_24","jsCall_viidi_25","jsCall_viidi_26","jsCall_viidi_27","jsCall_viidi_28","jsCall_viidi_29","jsCall_viidi_30","jsCall_viidi_31","jsCall_viidi_32","jsCall_viidi_33","jsCall_viidi_34","_vector_dmac_scalar_c","_vector_dmul_scalar_c",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],cr=[0,"jsCall_viifi_0","jsCall_viifi_1","jsCall_viifi_2","jsCall_viifi_3","jsCall_viifi_4","jsCall_viifi_5","jsCall_viifi_6","jsCall_viifi_7","jsCall_viifi_8","jsCall_viifi_9","jsCall_viifi_10","jsCall_viifi_11","jsCall_viifi_12","jsCall_viifi_13","jsCall_viifi_14","jsCall_viifi_15","jsCall_viifi_16","jsCall_viifi_17","jsCall_viifi_18","jsCall_viifi_19","jsCall_viifi_20","jsCall_viifi_21","jsCall_viifi_22","jsCall_viifi_23","jsCall_viifi_24","jsCall_viifi_25","jsCall_viifi_26","jsCall_viifi_27","jsCall_viifi_28","jsCall_viifi_29","jsCall_viifi_30","jsCall_viifi_31","jsCall_viifi_32","jsCall_viifi_33","jsCall_viifi_34","_vector_fmac_scalar_c","_vector_fmul_scalar_c",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],dr=[0,"jsCall_viii_0","jsCall_viii_1","jsCall_viii_2","jsCall_viii_3","jsCall_viii_4","jsCall_viii_5","jsCall_viii_6","jsCall_viii_7","jsCall_viii_8","jsCall_viii_9","jsCall_viii_10","jsCall_viii_11","jsCall_viii_12","jsCall_viii_13","jsCall_viii_14","jsCall_viii_15","jsCall_viii_16","jsCall_viii_17","jsCall_viii_18","jsCall_viii_19","jsCall_viii_20","jsCall_viii_21","jsCall_viii_22","jsCall_viii_23","jsCall_viii_24","jsCall_viii_25","jsCall_viii_26","jsCall_viii_27","jsCall_viii_28","jsCall_viii_29","jsCall_viii_30","jsCall_viii_31","jsCall_viii_32","jsCall_viii_33","jsCall_viii_34","_avcHandleFrame","_handleFrame","_sdt_cb","_pat_cb","_pmt_cb","_scte_data_cb","_m4sl_cb","_chrRangeFromJpeg_c","_chrRangeToJpeg_c","_chrRangeFromJpeg16_c","_chrRangeToJpeg16_c","_rgb15to16_c","_rgb15tobgr24_c","_rgb15to32_c","_rgb16tobgr24_c","_rgb16to32_c","_rgb16to15_c","_rgb24tobgr16_c","_rgb24tobgr15_c","_rgb24tobgr32_c","_rgb32to16_c","_rgb32to15_c","_rgb32tobgr24_c","_rgb24to15_c","_rgb24to16_c","_rgb24tobgr24_c","_shuffle_bytes_0321_c","_shuffle_bytes_2103_c","_shuffle_bytes_1230_c","_shuffle_bytes_3012_c","_shuffle_bytes_3210_c","_rgb32tobgr16_c","_rgb32tobgr15_c","_rgb48tobgr48_bswap","_rgb48tobgr64_bswap","_rgb48to64_bswap","_rgb64to48_bswap","_rgb48tobgr48_nobswap","_rgb48tobgr64_nobswap","_rgb48to64_nobswap","_rgb64tobgr48_nobswap","_rgb64tobgr48_bswap","_rgb64to48_nobswap","_rgb12to15","_rgb15to24","_rgb16to24","_rgb32to24","_rgb24to32","_rgb12tobgr12","_rgb15tobgr15","_rgb16tobgr15","_rgb15tobgr16","_rgb16tobgr16","_rgb15tobgr32","_rgb16tobgr32","_add_residual4x4_9","_add_residual8x8_9","_add_residual16x16_9","_add_residual32x32_9","_transform_rdpcm_9","_add_residual4x4_10","_add_residual8x8_10","_add_residual16x16_10","_add_residual32x32_10","_transform_rdpcm_10","_add_residual4x4_12","_add_residual8x8_12","_add_residual16x16_12","_add_residual32x32_12","_transform_rdpcm_12","_add_residual4x4_8","_add_residual8x8_8","_add_residual16x16_8","_add_residual32x32_8","_transform_rdpcm_8","_just_return","_bswap_buf","_bswap16_buf","_ff_h264_add_pixels4_16_c","_ff_h264_add_pixels4_8_c","_ff_h264_add_pixels8_16_c","_ff_h264_add_pixels8_8_c","_ff_h264_idct_add_9_c","_ff_h264_idct8_add_9_c","_ff_h264_idct_dc_add_9_c","_ff_h264_idct8_dc_add_9_c","_ff_h264_luma_dc_dequant_idct_9_c","_ff_h264_idct_add_10_c","_ff_h264_idct8_add_10_c","_ff_h264_idct_dc_add_10_c","_ff_h264_idct8_dc_add_10_c","_ff_h264_luma_dc_dequant_idct_10_c","_ff_h264_idct_add_12_c","_ff_h264_idct8_add_12_c","_ff_h264_idct_dc_add_12_c","_ff_h264_idct8_dc_add_12_c","_ff_h264_luma_dc_dequant_idct_12_c","_ff_h264_idct_add_14_c","_ff_h264_idct8_add_14_c","_ff_h264_idct_dc_add_14_c","_ff_h264_idct8_dc_add_14_c","_ff_h264_luma_dc_dequant_idct_14_c","_ff_h264_idct_add_8_c","_ff_h264_idct8_add_8_c","_ff_h264_idct_dc_add_8_c","_ff_h264_idct8_dc_add_8_c","_ff_h264_luma_dc_dequant_idct_8_c","_sbr_qmf_deint_bfly_c","_ps_add_squares_c","_ff_imdct_calc_c","_ff_imdct_half_c","_ff_mdct_calc_c","_butterflies_float_c",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,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,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,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],_r=[0,"jsCall_viiii_0","jsCall_viiii_1","jsCall_viiii_2","jsCall_viiii_3","jsCall_viiii_4","jsCall_viiii_5","jsCall_viiii_6","jsCall_viiii_7","jsCall_viiii_8","jsCall_viiii_9","jsCall_viiii_10","jsCall_viiii_11","jsCall_viiii_12","jsCall_viiii_13","jsCall_viiii_14","jsCall_viiii_15","jsCall_viiii_16","jsCall_viiii_17","jsCall_viiii_18","jsCall_viiii_19","jsCall_viiii_20","jsCall_viiii_21","jsCall_viiii_22","jsCall_viiii_23","jsCall_viiii_24","jsCall_viiii_25","jsCall_viiii_26","jsCall_viiii_27","jsCall_viiii_28","jsCall_viiii_29","jsCall_viiii_30","jsCall_viiii_31","jsCall_viiii_32","jsCall_viiii_33","jsCall_viiii_34","_planar_rgb9le_to_y","_planar_rgb10le_to_a","_planar_rgb10le_to_y","_planar_rgb12le_to_a","_planar_rgb12le_to_y","_planar_rgb14le_to_y","_planar_rgb16le_to_a","_planar_rgb16le_to_y","_planar_rgb9be_to_y","_planar_rgb10be_to_a","_planar_rgb10be_to_y","_planar_rgb12be_to_a","_planar_rgb12be_to_y","_planar_rgb14be_to_y","_planar_rgb16be_to_a","_planar_rgb16be_to_y","_planar_rgb_to_a","_planar_rgb_to_y","_gray8aToPacked32","_gray8aToPacked32_1","_gray8aToPacked24","_sws_convertPalette8ToPacked32","_sws_convertPalette8ToPacked24","_intra_pred_2_9","_intra_pred_3_9","_intra_pred_4_9","_intra_pred_5_9","_pred_planar_0_9","_pred_planar_1_9","_pred_planar_2_9","_pred_planar_3_9","_intra_pred_2_10","_intra_pred_3_10","_intra_pred_4_10","_intra_pred_5_10","_pred_planar_0_10","_pred_planar_1_10","_pred_planar_2_10","_pred_planar_3_10","_intra_pred_2_12","_intra_pred_3_12","_intra_pred_4_12","_intra_pred_5_12","_pred_planar_0_12","_pred_planar_1_12","_pred_planar_2_12","_pred_planar_3_12","_intra_pred_2_8","_intra_pred_3_8","_intra_pred_4_8","_intra_pred_5_8","_pred_planar_0_8","_pred_planar_1_8","_pred_planar_2_8","_pred_planar_3_8","_apply_tns","_windowing_and_mdct_ltp","_h264_v_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_mbaff_intra_9_c","_h264_v_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma422_intra_9_c","_h264_h_loop_filter_chroma_mbaff_intra_9_c","_h264_h_loop_filter_chroma422_mbaff_intra_9_c","_h264_v_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_mbaff_intra_10_c","_h264_v_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma422_intra_10_c","_h264_h_loop_filter_chroma_mbaff_intra_10_c","_h264_h_loop_filter_chroma422_mbaff_intra_10_c","_h264_v_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_mbaff_intra_12_c","_h264_v_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma422_intra_12_c","_h264_h_loop_filter_chroma_mbaff_intra_12_c","_h264_h_loop_filter_chroma422_mbaff_intra_12_c","_h264_v_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_mbaff_intra_14_c","_h264_v_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma422_intra_14_c","_h264_h_loop_filter_chroma_mbaff_intra_14_c","_h264_h_loop_filter_chroma422_mbaff_intra_14_c","_h264_v_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_mbaff_intra_8_c","_h264_v_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma422_intra_8_c","_h264_h_loop_filter_chroma_mbaff_intra_8_c","_h264_h_loop_filter_chroma422_mbaff_intra_8_c","_fft15_c","_mdct15","_imdct15_half","_ps_mul_pair_single_c","_ps_hybrid_analysis_ileave_c","_ps_hybrid_synthesis_deint_c","_vector_fmul_c","_vector_dmul_c","_vector_fmul_reverse_c","_av_log_default_callback",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,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,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,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,0,0,0,0,0],pr=[0,"jsCall_viiiid_0","jsCall_viiiid_1","jsCall_viiiid_2","jsCall_viiiid_3","jsCall_viiiid_4","jsCall_viiiid_5","jsCall_viiiid_6","jsCall_viiiid_7","jsCall_viiiid_8","jsCall_viiiid_9","jsCall_viiiid_10","jsCall_viiiid_11","jsCall_viiiid_12","jsCall_viiiid_13","jsCall_viiiid_14","jsCall_viiiid_15","jsCall_viiiid_16","jsCall_viiiid_17","jsCall_viiiid_18","jsCall_viiiid_19","jsCall_viiiid_20","jsCall_viiiid_21","jsCall_viiiid_22","jsCall_viiiid_23","jsCall_viiiid_24","jsCall_viiiid_25","jsCall_viiiid_26","jsCall_viiiid_27","jsCall_viiiid_28","jsCall_viiiid_29","jsCall_viiiid_30","jsCall_viiiid_31","jsCall_viiiid_32","jsCall_viiiid_33","jsCall_viiiid_34",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,0],mr=[0,"jsCall_viiiifii_0","jsCall_viiiifii_1","jsCall_viiiifii_2","jsCall_viiiifii_3","jsCall_viiiifii_4","jsCall_viiiifii_5","jsCall_viiiifii_6","jsCall_viiiifii_7","jsCall_viiiifii_8","jsCall_viiiifii_9","jsCall_viiiifii_10","jsCall_viiiifii_11","jsCall_viiiifii_12","jsCall_viiiifii_13","jsCall_viiiifii_14","jsCall_viiiifii_15","jsCall_viiiifii_16","jsCall_viiiifii_17","jsCall_viiiifii_18","jsCall_viiiifii_19","jsCall_viiiifii_20","jsCall_viiiifii_21","jsCall_viiiifii_22","jsCall_viiiifii_23","jsCall_viiiifii_24","jsCall_viiiifii_25","jsCall_viiiifii_26","jsCall_viiiifii_27","jsCall_viiiifii_28","jsCall_viiiifii_29","jsCall_viiiifii_30","jsCall_viiiifii_31","jsCall_viiiifii_32","jsCall_viiiifii_33","jsCall_viiiifii_34","_sbr_hf_gen_c",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],br=[0,"jsCall_viiiii_0","jsCall_viiiii_1","jsCall_viiiii_2","jsCall_viiiii_3","jsCall_viiiii_4","jsCall_viiiii_5","jsCall_viiiii_6","jsCall_viiiii_7","jsCall_viiiii_8","jsCall_viiiii_9","jsCall_viiiii_10","jsCall_viiiii_11","jsCall_viiiii_12","jsCall_viiiii_13","jsCall_viiiii_14","jsCall_viiiii_15","jsCall_viiiii_16","jsCall_viiiii_17","jsCall_viiiii_18","jsCall_viiiii_19","jsCall_viiiii_20","jsCall_viiiii_21","jsCall_viiiii_22","jsCall_viiiii_23","jsCall_viiiii_24","jsCall_viiiii_25","jsCall_viiiii_26","jsCall_viiiii_27","jsCall_viiiii_28","jsCall_viiiii_29","jsCall_viiiii_30","jsCall_viiiii_31","jsCall_viiiii_32","jsCall_viiiii_33","jsCall_viiiii_34","_planar_rgb9le_to_uv","_planar_rgb10le_to_uv","_planar_rgb12le_to_uv","_planar_rgb14le_to_uv","_planar_rgb16le_to_uv","_planar_rgb9be_to_uv","_planar_rgb10be_to_uv","_planar_rgb12be_to_uv","_planar_rgb14be_to_uv","_planar_rgb16be_to_uv","_planar_rgb_to_uv","_yuv2p010l1_LE_c","_yuv2p010l1_BE_c","_yuv2plane1_16LE_c","_yuv2plane1_16BE_c","_yuv2plane1_9LE_c","_yuv2plane1_9BE_c","_yuv2plane1_10LE_c","_yuv2plane1_10BE_c","_yuv2plane1_12LE_c","_yuv2plane1_12BE_c","_yuv2plane1_14LE_c","_yuv2plane1_14BE_c","_yuv2plane1_floatBE_c","_yuv2plane1_floatLE_c","_yuv2plane1_8_c","_bayer_bggr8_to_rgb24_copy","_bayer_bggr8_to_rgb24_interpolate","_bayer_bggr16le_to_rgb24_copy","_bayer_bggr16le_to_rgb24_interpolate","_bayer_bggr16be_to_rgb24_copy","_bayer_bggr16be_to_rgb24_interpolate","_bayer_rggb8_to_rgb24_copy","_bayer_rggb8_to_rgb24_interpolate","_bayer_rggb16le_to_rgb24_copy","_bayer_rggb16le_to_rgb24_interpolate","_bayer_rggb16be_to_rgb24_copy","_bayer_rggb16be_to_rgb24_interpolate","_bayer_gbrg8_to_rgb24_copy","_bayer_gbrg8_to_rgb24_interpolate","_bayer_gbrg16le_to_rgb24_copy","_bayer_gbrg16le_to_rgb24_interpolate","_bayer_gbrg16be_to_rgb24_copy","_bayer_gbrg16be_to_rgb24_interpolate","_bayer_grbg8_to_rgb24_copy","_bayer_grbg8_to_rgb24_interpolate","_bayer_grbg16le_to_rgb24_copy","_bayer_grbg16le_to_rgb24_interpolate","_bayer_grbg16be_to_rgb24_copy","_bayer_grbg16be_to_rgb24_interpolate","_hevc_h_loop_filter_chroma_9","_hevc_v_loop_filter_chroma_9","_hevc_h_loop_filter_chroma_10","_hevc_v_loop_filter_chroma_10","_hevc_h_loop_filter_chroma_12","_hevc_v_loop_filter_chroma_12","_hevc_h_loop_filter_chroma_8","_hevc_v_loop_filter_chroma_8","_worker_func","_sbr_hf_assemble","_sbr_hf_inverse_filter","_ff_h264_idct_add16_9_c","_ff_h264_idct8_add4_9_c","_ff_h264_idct_add8_9_c","_ff_h264_idct_add8_422_9_c","_ff_h264_idct_add16intra_9_c","_h264_v_loop_filter_luma_9_c","_h264_h_loop_filter_luma_9_c","_h264_h_loop_filter_luma_mbaff_9_c","_h264_v_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma422_9_c","_h264_h_loop_filter_chroma_mbaff_9_c","_h264_h_loop_filter_chroma422_mbaff_9_c","_ff_h264_idct_add16_10_c","_ff_h264_idct8_add4_10_c","_ff_h264_idct_add8_10_c","_ff_h264_idct_add8_422_10_c","_ff_h264_idct_add16intra_10_c","_h264_v_loop_filter_luma_10_c","_h264_h_loop_filter_luma_10_c","_h264_h_loop_filter_luma_mbaff_10_c","_h264_v_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma422_10_c","_h264_h_loop_filter_chroma_mbaff_10_c","_h264_h_loop_filter_chroma422_mbaff_10_c","_ff_h264_idct_add16_12_c","_ff_h264_idct8_add4_12_c","_ff_h264_idct_add8_12_c","_ff_h264_idct_add8_422_12_c","_ff_h264_idct_add16intra_12_c","_h264_v_loop_filter_luma_12_c","_h264_h_loop_filter_luma_12_c","_h264_h_loop_filter_luma_mbaff_12_c","_h264_v_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma422_12_c","_h264_h_loop_filter_chroma_mbaff_12_c","_h264_h_loop_filter_chroma422_mbaff_12_c","_ff_h264_idct_add16_14_c","_ff_h264_idct8_add4_14_c","_ff_h264_idct_add8_14_c","_ff_h264_idct_add8_422_14_c","_ff_h264_idct_add16intra_14_c","_h264_v_loop_filter_luma_14_c","_h264_h_loop_filter_luma_14_c","_h264_h_loop_filter_luma_mbaff_14_c","_h264_v_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma422_14_c","_h264_h_loop_filter_chroma_mbaff_14_c","_h264_h_loop_filter_chroma422_mbaff_14_c","_ff_h264_idct_add16_8_c","_ff_h264_idct8_add4_8_c","_ff_h264_idct_add8_8_c","_ff_h264_idct_add8_422_8_c","_ff_h264_idct_add16intra_8_c","_h264_v_loop_filter_luma_8_c","_h264_h_loop_filter_luma_8_c","_h264_h_loop_filter_luma_mbaff_8_c","_h264_v_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma422_8_c","_h264_h_loop_filter_chroma_mbaff_8_c","_h264_h_loop_filter_chroma422_mbaff_8_c","_postrotate_c","_sbr_hf_g_filt_c","_ps_hybrid_analysis_c","_ps_stereo_interpolate_c","_ps_stereo_interpolate_ipdopd_c","_vector_fmul_window_c","_vector_fmul_add_c",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,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,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,0,0,0,0,0,0],vr=[0,"jsCall_viiiiidd_0","jsCall_viiiiidd_1","jsCall_viiiiidd_2","jsCall_viiiiidd_3","jsCall_viiiiidd_4","jsCall_viiiiidd_5","jsCall_viiiiidd_6","jsCall_viiiiidd_7","jsCall_viiiiidd_8","jsCall_viiiiidd_9","jsCall_viiiiidd_10","jsCall_viiiiidd_11","jsCall_viiiiidd_12","jsCall_viiiiidd_13","jsCall_viiiiidd_14","jsCall_viiiiidd_15","jsCall_viiiiidd_16","jsCall_viiiiidd_17","jsCall_viiiiidd_18","jsCall_viiiiidd_19","jsCall_viiiiidd_20","jsCall_viiiiidd_21","jsCall_viiiiidd_22","jsCall_viiiiidd_23","jsCall_viiiiidd_24","jsCall_viiiiidd_25","jsCall_viiiiidd_26","jsCall_viiiiidd_27","jsCall_viiiiidd_28","jsCall_viiiiidd_29","jsCall_viiiiidd_30","jsCall_viiiiidd_31","jsCall_viiiiidd_32","jsCall_viiiiidd_33","jsCall_viiiiidd_34",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,0],yr=[0,"jsCall_viiiiii_0","jsCall_viiiiii_1","jsCall_viiiiii_2","jsCall_viiiiii_3","jsCall_viiiiii_4","jsCall_viiiiii_5","jsCall_viiiiii_6","jsCall_viiiiii_7","jsCall_viiiiii_8","jsCall_viiiiii_9","jsCall_viiiiii_10","jsCall_viiiiii_11","jsCall_viiiiii_12","jsCall_viiiiii_13","jsCall_viiiiii_14","jsCall_viiiiii_15","jsCall_viiiiii_16","jsCall_viiiiii_17","jsCall_viiiiii_18","jsCall_viiiiii_19","jsCall_viiiiii_20","jsCall_viiiiii_21","jsCall_viiiiii_22","jsCall_viiiiii_23","jsCall_viiiiii_24","jsCall_viiiiii_25","jsCall_viiiiii_26","jsCall_viiiiii_27","jsCall_viiiiii_28","jsCall_viiiiii_29","jsCall_viiiiii_30","jsCall_viiiiii_31","jsCall_viiiiii_32","jsCall_viiiiii_33","jsCall_viiiiii_34","_read_geobtag","_read_apic","_read_chapter","_read_priv","_ff_hyscale_fast_c","_bswap16Y_c","_read_ya16le_gray_c","_read_ya16be_gray_c","_read_ayuv64le_Y_c","_yuy2ToY_c","_uyvyToY_c","_bgr24ToY_c","_bgr16leToY_c","_bgr16beToY_c","_bgr15leToY_c","_bgr15beToY_c","_bgr12leToY_c","_bgr12beToY_c","_rgb24ToY_c","_rgb16leToY_c","_rgb16beToY_c","_rgb15leToY_c","_rgb15beToY_c","_rgb12leToY_c","_rgb12beToY_c","_palToY_c","_monoblack2Y_c","_monowhite2Y_c","_bgr32ToY_c","_bgr321ToY_c","_rgb32ToY_c","_rgb321ToY_c","_rgb48BEToY_c","_rgb48LEToY_c","_bgr48BEToY_c","_bgr48LEToY_c","_rgb64BEToY_c","_rgb64LEToY_c","_bgr64BEToY_c","_bgr64LEToY_c","_p010LEToY_c","_p010BEToY_c","_grayf32ToY16_c","_grayf32ToY16_bswap_c","_rgba64leToA_c","_rgba64beToA_c","_rgbaToA_c","_abgrToA_c","_read_ya16le_alpha_c","_read_ya16be_alpha_c","_read_ayuv64le_A_c","_palToA_c","_put_pcm_9","_hevc_h_loop_filter_luma_9","_hevc_v_loop_filter_luma_9","_put_pcm_10","_hevc_h_loop_filter_luma_10","_hevc_v_loop_filter_luma_10","_put_pcm_12","_hevc_h_loop_filter_luma_12","_hevc_v_loop_filter_luma_12","_put_pcm_8","_hevc_h_loop_filter_luma_8","_hevc_v_loop_filter_luma_8","_pred_dc_9","_pred_angular_0_9","_pred_angular_1_9","_pred_angular_2_9","_pred_angular_3_9","_pred_dc_10","_pred_angular_0_10","_pred_angular_1_10","_pred_angular_2_10","_pred_angular_3_10","_pred_dc_12","_pred_angular_0_12","_pred_angular_1_12","_pred_angular_2_12","_pred_angular_3_12","_pred_dc_8","_pred_angular_0_8","_pred_angular_1_8","_pred_angular_2_8","_pred_angular_3_8","_weight_h264_pixels16_9_c","_weight_h264_pixels8_9_c","_weight_h264_pixels4_9_c","_weight_h264_pixels2_9_c","_weight_h264_pixels16_10_c","_weight_h264_pixels8_10_c","_weight_h264_pixels4_10_c","_weight_h264_pixels2_10_c","_weight_h264_pixels16_12_c","_weight_h264_pixels8_12_c","_weight_h264_pixels4_12_c","_weight_h264_pixels2_12_c","_weight_h264_pixels16_14_c","_weight_h264_pixels8_14_c","_weight_h264_pixels4_14_c","_weight_h264_pixels2_14_c","_weight_h264_pixels16_8_c","_weight_h264_pixels8_8_c","_weight_h264_pixels4_8_c","_weight_h264_pixels2_8_c","_sbr_hf_apply_noise_0","_sbr_hf_apply_noise_1","_sbr_hf_apply_noise_2","_sbr_hf_apply_noise_3","_aes_decrypt","_aes_encrypt","_image_copy_plane",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,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,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,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,0],gr=[0,"jsCall_viiiiiifi_0","jsCall_viiiiiifi_1","jsCall_viiiiiifi_2","jsCall_viiiiiifi_3","jsCall_viiiiiifi_4","jsCall_viiiiiifi_5","jsCall_viiiiiifi_6","jsCall_viiiiiifi_7","jsCall_viiiiiifi_8","jsCall_viiiiiifi_9","jsCall_viiiiiifi_10","jsCall_viiiiiifi_11","jsCall_viiiiiifi_12","jsCall_viiiiiifi_13","jsCall_viiiiiifi_14","jsCall_viiiiiifi_15","jsCall_viiiiiifi_16","jsCall_viiiiiifi_17","jsCall_viiiiiifi_18","jsCall_viiiiiifi_19","jsCall_viiiiiifi_20","jsCall_viiiiiifi_21","jsCall_viiiiiifi_22","jsCall_viiiiiifi_23","jsCall_viiiiiifi_24","jsCall_viiiiiifi_25","jsCall_viiiiiifi_26","jsCall_viiiiiifi_27","jsCall_viiiiiifi_28","jsCall_viiiiiifi_29","jsCall_viiiiiifi_30","jsCall_viiiiiifi_31","jsCall_viiiiiifi_32","jsCall_viiiiiifi_33","jsCall_viiiiiifi_34","_ps_decorrelate_c",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],wr=[0,"jsCall_viiiiiii_0","jsCall_viiiiiii_1","jsCall_viiiiiii_2","jsCall_viiiiiii_3","jsCall_viiiiiii_4","jsCall_viiiiiii_5","jsCall_viiiiiii_6","jsCall_viiiiiii_7","jsCall_viiiiiii_8","jsCall_viiiiiii_9","jsCall_viiiiiii_10","jsCall_viiiiiii_11","jsCall_viiiiiii_12","jsCall_viiiiiii_13","jsCall_viiiiiii_14","jsCall_viiiiiii_15","jsCall_viiiiiii_16","jsCall_viiiiiii_17","jsCall_viiiiiii_18","jsCall_viiiiiii_19","jsCall_viiiiiii_20","jsCall_viiiiiii_21","jsCall_viiiiiii_22","jsCall_viiiiiii_23","jsCall_viiiiiii_24","jsCall_viiiiiii_25","jsCall_viiiiiii_26","jsCall_viiiiiii_27","jsCall_viiiiiii_28","jsCall_viiiiiii_29","jsCall_viiiiiii_30","jsCall_viiiiiii_31","jsCall_viiiiiii_32","jsCall_viiiiiii_33","jsCall_viiiiiii_34","_hScale8To15_c","_hScale8To19_c","_hScale16To19_c","_hScale16To15_c","_yuy2ToUV_c","_yvy2ToUV_c","_uyvyToUV_c","_nv12ToUV_c","_nv21ToUV_c","_palToUV_c","_bswap16UV_c","_read_ayuv64le_UV_c","_p010LEToUV_c","_p010BEToUV_c","_p016LEToUV_c","_p016BEToUV_c","_gbr24pToUV_half_c","_rgb64BEToUV_half_c","_rgb64LEToUV_half_c","_bgr64BEToUV_half_c","_bgr64LEToUV_half_c","_rgb48BEToUV_half_c","_rgb48LEToUV_half_c","_bgr48BEToUV_half_c","_bgr48LEToUV_half_c","_bgr32ToUV_half_c","_bgr321ToUV_half_c","_bgr24ToUV_half_c","_bgr16leToUV_half_c","_bgr16beToUV_half_c","_bgr15leToUV_half_c","_bgr15beToUV_half_c","_bgr12leToUV_half_c","_bgr12beToUV_half_c","_rgb32ToUV_half_c","_rgb321ToUV_half_c","_rgb24ToUV_half_c","_rgb16leToUV_half_c","_rgb16beToUV_half_c","_rgb15leToUV_half_c","_rgb15beToUV_half_c","_rgb12leToUV_half_c","_rgb12beToUV_half_c","_rgb64BEToUV_c","_rgb64LEToUV_c","_bgr64BEToUV_c","_bgr64LEToUV_c","_rgb48BEToUV_c","_rgb48LEToUV_c","_bgr48BEToUV_c","_bgr48LEToUV_c","_bgr32ToUV_c","_bgr321ToUV_c","_bgr24ToUV_c","_bgr16leToUV_c","_bgr16beToUV_c","_bgr15leToUV_c","_bgr15beToUV_c","_bgr12leToUV_c","_bgr12beToUV_c","_rgb32ToUV_c","_rgb321ToUV_c","_rgb24ToUV_c","_rgb16leToUV_c","_rgb16beToUV_c","_rgb15leToUV_c","_rgb15beToUV_c","_rgb12leToUV_c","_rgb12beToUV_c","_yuv2p010lX_LE_c","_yuv2p010lX_BE_c","_yuv2p010cX_c","_yuv2planeX_16LE_c","_yuv2planeX_16BE_c","_yuv2p016cX_c","_yuv2planeX_9LE_c","_yuv2planeX_9BE_c","_yuv2planeX_10LE_c","_yuv2planeX_10BE_c","_yuv2planeX_12LE_c","_yuv2planeX_12BE_c","_yuv2planeX_14LE_c","_yuv2planeX_14BE_c","_yuv2planeX_floatBE_c","_yuv2planeX_floatLE_c","_yuv2planeX_8_c","_yuv2nv12cX_c","_sao_edge_filter_9","_put_hevc_pel_pixels_9","_put_hevc_qpel_h_9","_put_hevc_qpel_v_9","_put_hevc_qpel_hv_9","_put_hevc_epel_h_9","_put_hevc_epel_v_9","_put_hevc_epel_hv_9","_sao_edge_filter_10","_put_hevc_pel_pixels_10","_put_hevc_qpel_h_10","_put_hevc_qpel_v_10","_put_hevc_qpel_hv_10","_put_hevc_epel_h_10","_put_hevc_epel_v_10","_put_hevc_epel_hv_10","_sao_edge_filter_12","_put_hevc_pel_pixels_12","_put_hevc_qpel_h_12","_put_hevc_qpel_v_12","_put_hevc_qpel_hv_12","_put_hevc_epel_h_12","_put_hevc_epel_v_12","_put_hevc_epel_hv_12","_sao_edge_filter_8","_put_hevc_pel_pixels_8","_put_hevc_qpel_h_8","_put_hevc_qpel_v_8","_put_hevc_qpel_hv_8","_put_hevc_epel_h_8","_put_hevc_epel_v_8","_put_hevc_epel_hv_8",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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Er=[0,"jsCall_viiiiiiii_0","jsCall_viiiiiiii_1","jsCall_viiiiiiii_2","jsCall_viiiiiiii_3","jsCall_viiiiiiii_4","jsCall_viiiiiiii_5","jsCall_viiiiiiii_6","jsCall_viiiiiiii_7","jsCall_viiiiiiii_8","jsCall_viiiiiiii_9","jsCall_viiiiiiii_10","jsCall_viiiiiiii_11","jsCall_viiiiiiii_12","jsCall_viiiiiiii_13","jsCall_viiiiiiii_14","jsCall_viiiiiiii_15","jsCall_viiiiiiii_16","jsCall_viiiiiiii_17","jsCall_viiiiiiii_18","jsCall_viiiiiiii_19","jsCall_viiiiiiii_20","jsCall_viiiiiiii_21","jsCall_viiiiiiii_22","jsCall_viiiiiiii_23","jsCall_viiiiiiii_24","jsCall_viiiiiiii_25","jsCall_viiiiiiii_26","jsCall_viiiiiiii_27","jsCall_viiiiiiii_28","jsCall_viiiiiiii_29","jsCall_viiiiiiii_30","jsCall_viiiiiiii_31","jsCall_viiiiiiii_32","jsCall_viiiiiiii_33","jsCall_viiiiiiii_34","_ff_hcscale_fast_c","_bayer_bggr8_to_yv12_copy","_bayer_bggr8_to_yv12_interpolate","_bayer_bggr16le_to_yv12_copy","_bayer_bggr16le_to_yv12_interpolate","_bayer_bggr16be_to_yv12_copy","_bayer_bggr16be_to_yv12_interpolate","_bayer_rggb8_to_yv12_copy","_bayer_rggb8_to_yv12_interpolate","_bayer_rggb16le_to_yv12_copy","_bayer_rggb16le_to_yv12_interpolate","_bayer_rggb16be_to_yv12_copy","_bayer_rggb16be_to_yv12_interpolate","_bayer_gbrg8_to_yv12_copy","_bayer_gbrg8_to_yv12_interpolate","_bayer_gbrg16le_to_yv12_copy","_bayer_gbrg16le_to_yv12_interpolate","_bayer_gbrg16be_to_yv12_copy","_bayer_gbrg16be_to_yv12_interpolate","_bayer_grbg8_to_yv12_copy","_bayer_grbg8_to_yv12_interpolate","_bayer_grbg16le_to_yv12_copy","_bayer_grbg16le_to_yv12_interpolate","_bayer_grbg16be_to_yv12_copy","_bayer_grbg16be_to_yv12_interpolate","_sao_band_filter_9","_put_hevc_pel_uni_pixels_9","_put_hevc_qpel_uni_h_9","_put_hevc_qpel_uni_v_9","_put_hevc_qpel_uni_hv_9","_put_hevc_epel_uni_h_9","_put_hevc_epel_uni_v_9","_put_hevc_epel_uni_hv_9","_sao_band_filter_10","_put_hevc_pel_uni_pixels_10","_put_hevc_qpel_uni_h_10","_put_hevc_qpel_uni_v_10","_put_hevc_qpel_uni_hv_10","_put_hevc_epel_uni_h_10","_put_hevc_epel_uni_v_10","_put_hevc_epel_uni_hv_10","_sao_band_filter_12","_put_hevc_pel_uni_pixels_12","_put_hevc_qpel_uni_h_12","_put_hevc_qpel_uni_v_12","_put_hevc_qpel_uni_hv_12","_put_hevc_epel_uni_h_12","_put_hevc_epel_uni_v_12","_put_hevc_epel_uni_hv_12","_sao_band_filter_8","_put_hevc_pel_uni_pixels_8","_put_hevc_qpel_uni_h_8","_put_hevc_qpel_uni_v_8","_put_hevc_qpel_uni_hv_8","_put_hevc_epel_uni_h_8","_put_hevc_epel_uni_v_8","_put_hevc_epel_uni_hv_8","_biweight_h264_pixels16_9_c","_biweight_h264_pixels8_9_c","_biweight_h264_pixels4_9_c","_biweight_h264_pixels2_9_c","_biweight_h264_pixels16_10_c","_biweight_h264_pixels8_10_c","_biweight_h264_pixels4_10_c","_biweight_h264_pixels2_10_c","_biweight_h264_pixels16_12_c","_biweight_h264_pixels8_12_c","_biweight_h264_pixels4_12_c","_biweight_h264_pixels2_12_c","_biweight_h264_pixels16_14_c","_biweight_h264_pixels8_14_c","_biweight_h264_pixels4_14_c","_biweight_h264_pixels2_14_c","_biweight_h264_pixels16_8_c","_biweight_h264_pixels8_8_c","_biweight_h264_pixels4_8_c","_biweight_h264_pixels2_8_c",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Cr=[0,"jsCall_viiiiiiiid_0","jsCall_viiiiiiiid_1","jsCall_viiiiiiiid_2","jsCall_viiiiiiiid_3","jsCall_viiiiiiiid_4","jsCall_viiiiiiiid_5","jsCall_viiiiiiiid_6","jsCall_viiiiiiiid_7","jsCall_viiiiiiiid_8","jsCall_viiiiiiiid_9","jsCall_viiiiiiiid_10","jsCall_viiiiiiiid_11","jsCall_viiiiiiiid_12","jsCall_viiiiiiiid_13","jsCall_viiiiiiiid_14","jsCall_viiiiiiiid_15","jsCall_viiiiiiiid_16","jsCall_viiiiiiiid_17","jsCall_viiiiiiiid_18","jsCall_viiiiiiiid_19","jsCall_viiiiiiiid_20","jsCall_viiiiiiiid_21","jsCall_viiiiiiiid_22","jsCall_viiiiiiiid_23","jsCall_viiiiiiiid_24","jsCall_viiiiiiiid_25","jsCall_viiiiiiiid_26","jsCall_viiiiiiiid_27","jsCall_viiiiiiiid_28","jsCall_viiiiiiiid_29","jsCall_viiiiiiiid_30","jsCall_viiiiiiiid_31","jsCall_viiiiiiiid_32","jsCall_viiiiiiiid_33","jsCall_viiiiiiiid_34",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,0],Sr=[0,"jsCall_viiiiiiiidi_0","jsCall_viiiiiiiidi_1","jsCall_viiiiiiiidi_2","jsCall_viiiiiiiidi_3","jsCall_viiiiiiiidi_4","jsCall_viiiiiiiidi_5","jsCall_viiiiiiiidi_6","jsCall_viiiiiiiidi_7","jsCall_viiiiiiiidi_8","jsCall_viiiiiiiidi_9","jsCall_viiiiiiiidi_10","jsCall_viiiiiiiidi_11","jsCall_viiiiiiiidi_12","jsCall_viiiiiiiidi_13","jsCall_viiiiiiiidi_14","jsCall_viiiiiiiidi_15","jsCall_viiiiiiiidi_16","jsCall_viiiiiiiidi_17","jsCall_viiiiiiiidi_18","jsCall_viiiiiiiidi_19","jsCall_viiiiiiiidi_20","jsCall_viiiiiiiidi_21","jsCall_viiiiiiiidi_22","jsCall_viiiiiiiidi_23","jsCall_viiiiiiiidi_24","jsCall_viiiiiiiidi_25","jsCall_viiiiiiiidi_26","jsCall_viiiiiiiidi_27","jsCall_viiiiiiiidi_28","jsCall_viiiiiiiidi_29","jsCall_viiiiiiiidi_30","jsCall_viiiiiiiidi_31","jsCall_viiiiiiiidi_32","jsCall_viiiiiiiidi_33","jsCall_viiiiiiiidi_34",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,0],jr=[0,"jsCall_viiiiiiiii_0","jsCall_viiiiiiiii_1","jsCall_viiiiiiiii_2","jsCall_viiiiiiiii_3","jsCall_viiiiiiiii_4","jsCall_viiiiiiiii_5","jsCall_viiiiiiiii_6","jsCall_viiiiiiiii_7","jsCall_viiiiiiiii_8","jsCall_viiiiiiiii_9","jsCall_viiiiiiiii_10","jsCall_viiiiiiiii_11","jsCall_viiiiiiiii_12","jsCall_viiiiiiiii_13","jsCall_viiiiiiiii_14","jsCall_viiiiiiiii_15","jsCall_viiiiiiiii_16","jsCall_viiiiiiiii_17","jsCall_viiiiiiiii_18","jsCall_viiiiiiiii_19","jsCall_viiiiiiiii_20","jsCall_viiiiiiiii_21","jsCall_viiiiiiiii_22","jsCall_viiiiiiiii_23","jsCall_viiiiiiiii_24","jsCall_viiiiiiiii_25","jsCall_viiiiiiiii_26","jsCall_viiiiiiiii_27","jsCall_viiiiiiiii_28","jsCall_viiiiiiiii_29","jsCall_viiiiiiiii_30","jsCall_viiiiiiiii_31","jsCall_viiiiiiiii_32","jsCall_viiiiiiiii_33","jsCall_viiiiiiiii_34","_yuv2rgba32_full_1_c","_yuv2rgbx32_full_1_c","_yuv2argb32_full_1_c","_yuv2xrgb32_full_1_c","_yuv2bgra32_full_1_c","_yuv2bgrx32_full_1_c","_yuv2abgr32_full_1_c","_yuv2xbgr32_full_1_c","_yuv2rgba64le_full_1_c","_yuv2rgbx64le_full_1_c","_yuv2rgba64be_full_1_c","_yuv2rgbx64be_full_1_c","_yuv2bgra64le_full_1_c","_yuv2bgrx64le_full_1_c","_yuv2bgra64be_full_1_c","_yuv2bgrx64be_full_1_c","_yuv2rgb24_full_1_c","_yuv2bgr24_full_1_c","_yuv2rgb48le_full_1_c","_yuv2bgr48le_full_1_c","_yuv2rgb48be_full_1_c","_yuv2bgr48be_full_1_c","_yuv2bgr4_byte_full_1_c","_yuv2rgb4_byte_full_1_c","_yuv2bgr8_full_1_c","_yuv2rgb8_full_1_c","_yuv2rgbx64le_1_c","_yuv2rgba64le_1_c","_yuv2rgbx64be_1_c","_yuv2rgba64be_1_c","_yuv2bgrx64le_1_c","_yuv2bgra64le_1_c","_yuv2bgrx64be_1_c","_yuv2bgra64be_1_c","_yuv2rgba32_1_c","_yuv2rgbx32_1_c","_yuv2rgba32_1_1_c","_yuv2rgbx32_1_1_c","_yuv2rgb16_1_c","_yuv2rgb15_1_c","_yuv2rgb12_1_c","_yuv2rgb8_1_c","_yuv2rgb4_1_c","_yuv2rgb4b_1_c","_yuv2rgb48le_1_c","_yuv2rgb48be_1_c","_yuv2bgr48le_1_c","_yuv2bgr48be_1_c","_yuv2rgb24_1_c","_yuv2bgr24_1_c","_yuv2monowhite_1_c","_yuv2monoblack_1_c","_yuv2yuyv422_1_c","_yuv2yvyu422_1_c","_yuv2uyvy422_1_c","_yuv2ya8_1_c","_yuv2ya16le_1_c","_yuv2ya16be_1_c","_yuy2toyv12_c","_put_hevc_pel_bi_pixels_9","_put_hevc_qpel_bi_h_9","_put_hevc_qpel_bi_v_9","_put_hevc_qpel_bi_hv_9","_put_hevc_epel_bi_h_9","_put_hevc_epel_bi_v_9","_put_hevc_epel_bi_hv_9","_put_hevc_pel_bi_pixels_10","_put_hevc_qpel_bi_h_10","_put_hevc_qpel_bi_v_10","_put_hevc_qpel_bi_hv_10","_put_hevc_epel_bi_h_10","_put_hevc_epel_bi_v_10","_put_hevc_epel_bi_hv_10","_put_hevc_pel_bi_pixels_12","_put_hevc_qpel_bi_h_12","_put_hevc_qpel_bi_v_12","_put_hevc_qpel_bi_hv_12","_put_hevc_epel_bi_h_12","_put_hevc_epel_bi_v_12","_put_hevc_epel_bi_hv_12","_put_hevc_pel_bi_pixels_8","_put_hevc_qpel_bi_h_8","_put_hevc_qpel_bi_v_8","_put_hevc_qpel_bi_hv_8","_put_hevc_epel_bi_h_8","_put_hevc_epel_bi_v_8","_put_hevc_epel_bi_hv_8",0,0,0,0,0],Tr=[0,"jsCall_viiiiiiiiii_0","jsCall_viiiiiiiiii_1","jsCall_viiiiiiiiii_2","jsCall_viiiiiiiiii_3","jsCall_viiiiiiiiii_4","jsCall_viiiiiiiiii_5","jsCall_viiiiiiiiii_6","jsCall_viiiiiiiiii_7","jsCall_viiiiiiiiii_8","jsCall_viiiiiiiiii_9","jsCall_viiiiiiiiii_10","jsCall_viiiiiiiiii_11","jsCall_viiiiiiiiii_12","jsCall_viiiiiiiiii_13","jsCall_viiiiiiiiii_14","jsCall_viiiiiiiiii_15","jsCall_viiiiiiiiii_16","jsCall_viiiiiiiiii_17","jsCall_viiiiiiiiii_18","jsCall_viiiiiiiiii_19","jsCall_viiiiiiiiii_20","jsCall_viiiiiiiiii_21","jsCall_viiiiiiiiii_22","jsCall_viiiiiiiiii_23","jsCall_viiiiiiiiii_24","jsCall_viiiiiiiiii_25","jsCall_viiiiiiiiii_26","jsCall_viiiiiiiiii_27","jsCall_viiiiiiiiii_28","jsCall_viiiiiiiiii_29","jsCall_viiiiiiiiii_30","jsCall_viiiiiiiiii_31","jsCall_viiiiiiiiii_32","jsCall_viiiiiiiiii_33","jsCall_viiiiiiiiii_34","_yuv2rgba32_full_2_c","_yuv2rgbx32_full_2_c","_yuv2argb32_full_2_c","_yuv2xrgb32_full_2_c","_yuv2bgra32_full_2_c","_yuv2bgrx32_full_2_c","_yuv2abgr32_full_2_c","_yuv2xbgr32_full_2_c","_yuv2rgba64le_full_2_c","_yuv2rgbx64le_full_2_c","_yuv2rgba64be_full_2_c","_yuv2rgbx64be_full_2_c","_yuv2bgra64le_full_2_c","_yuv2bgrx64le_full_2_c","_yuv2bgra64be_full_2_c","_yuv2bgrx64be_full_2_c","_yuv2rgb24_full_2_c","_yuv2bgr24_full_2_c","_yuv2rgb48le_full_2_c","_yuv2bgr48le_full_2_c","_yuv2rgb48be_full_2_c","_yuv2bgr48be_full_2_c","_yuv2bgr4_byte_full_2_c","_yuv2rgb4_byte_full_2_c","_yuv2bgr8_full_2_c","_yuv2rgb8_full_2_c","_yuv2rgbx64le_2_c","_yuv2rgba64le_2_c","_yuv2rgbx64be_2_c","_yuv2rgba64be_2_c","_yuv2bgrx64le_2_c","_yuv2bgra64le_2_c","_yuv2bgrx64be_2_c","_yuv2bgra64be_2_c","_yuv2rgba32_2_c","_yuv2rgbx32_2_c","_yuv2rgba32_1_2_c","_yuv2rgbx32_1_2_c","_yuv2rgb16_2_c","_yuv2rgb15_2_c","_yuv2rgb12_2_c","_yuv2rgb8_2_c","_yuv2rgb4_2_c","_yuv2rgb4b_2_c","_yuv2rgb48le_2_c","_yuv2rgb48be_2_c","_yuv2bgr48le_2_c","_yuv2bgr48be_2_c","_yuv2rgb24_2_c","_yuv2bgr24_2_c","_yuv2monowhite_2_c","_yuv2monoblack_2_c","_yuv2yuyv422_2_c","_yuv2yvyu422_2_c","_yuv2uyvy422_2_c","_yuv2ya8_2_c","_yuv2ya16le_2_c","_yuv2ya16be_2_c","_vu9_to_vu12_c","_yvu9_to_yuy2_c","_ff_emulated_edge_mc_8","_ff_emulated_edge_mc_16",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,0,0,0],Ar=[0,"jsCall_viiiiiiiiiii_0","jsCall_viiiiiiiiiii_1","jsCall_viiiiiiiiiii_2","jsCall_viiiiiiiiiii_3","jsCall_viiiiiiiiiii_4","jsCall_viiiiiiiiiii_5","jsCall_viiiiiiiiiii_6","jsCall_viiiiiiiiiii_7","jsCall_viiiiiiiiiii_8","jsCall_viiiiiiiiiii_9","jsCall_viiiiiiiiiii_10","jsCall_viiiiiiiiiii_11","jsCall_viiiiiiiiiii_12","jsCall_viiiiiiiiiii_13","jsCall_viiiiiiiiiii_14","jsCall_viiiiiiiiiii_15","jsCall_viiiiiiiiiii_16","jsCall_viiiiiiiiiii_17","jsCall_viiiiiiiiiii_18","jsCall_viiiiiiiiiii_19","jsCall_viiiiiiiiiii_20","jsCall_viiiiiiiiiii_21","jsCall_viiiiiiiiiii_22","jsCall_viiiiiiiiiii_23","jsCall_viiiiiiiiiii_24","jsCall_viiiiiiiiiii_25","jsCall_viiiiiiiiiii_26","jsCall_viiiiiiiiiii_27","jsCall_viiiiiiiiiii_28","jsCall_viiiiiiiiiii_29","jsCall_viiiiiiiiiii_30","jsCall_viiiiiiiiiii_31","jsCall_viiiiiiiiiii_32","jsCall_viiiiiiiiiii_33","jsCall_viiiiiiiiiii_34","_put_hevc_pel_uni_w_pixels_9","_put_hevc_qpel_uni_w_h_9","_put_hevc_qpel_uni_w_v_9","_put_hevc_qpel_uni_w_hv_9","_put_hevc_epel_uni_w_h_9","_put_hevc_epel_uni_w_v_9","_put_hevc_epel_uni_w_hv_9","_put_hevc_pel_uni_w_pixels_10","_put_hevc_qpel_uni_w_h_10","_put_hevc_qpel_uni_w_v_10","_put_hevc_qpel_uni_w_hv_10","_put_hevc_epel_uni_w_h_10","_put_hevc_epel_uni_w_v_10","_put_hevc_epel_uni_w_hv_10","_put_hevc_pel_uni_w_pixels_12","_put_hevc_qpel_uni_w_h_12","_put_hevc_qpel_uni_w_v_12","_put_hevc_qpel_uni_w_hv_12","_put_hevc_epel_uni_w_h_12","_put_hevc_epel_uni_w_v_12","_put_hevc_epel_uni_w_hv_12","_put_hevc_pel_uni_w_pixels_8","_put_hevc_qpel_uni_w_h_8","_put_hevc_qpel_uni_w_v_8","_put_hevc_qpel_uni_w_hv_8","_put_hevc_epel_uni_w_h_8","_put_hevc_epel_uni_w_v_8","_put_hevc_epel_uni_w_hv_8"],xr=[0,"jsCall_viiiiiiiiiiii_0","jsCall_viiiiiiiiiiii_1","jsCall_viiiiiiiiiiii_2","jsCall_viiiiiiiiiiii_3","jsCall_viiiiiiiiiiii_4","jsCall_viiiiiiiiiiii_5","jsCall_viiiiiiiiiiii_6","jsCall_viiiiiiiiiiii_7","jsCall_viiiiiiiiiiii_8","jsCall_viiiiiiiiiiii_9","jsCall_viiiiiiiiiiii_10","jsCall_viiiiiiiiiiii_11","jsCall_viiiiiiiiiiii_12","jsCall_viiiiiiiiiiii_13","jsCall_viiiiiiiiiiii_14","jsCall_viiiiiiiiiiii_15","jsCall_viiiiiiiiiiii_16","jsCall_viiiiiiiiiiii_17","jsCall_viiiiiiiiiiii_18","jsCall_viiiiiiiiiiii_19","jsCall_viiiiiiiiiiii_20","jsCall_viiiiiiiiiiii_21","jsCall_viiiiiiiiiiii_22","jsCall_viiiiiiiiiiii_23","jsCall_viiiiiiiiiiii_24","jsCall_viiiiiiiiiiii_25","jsCall_viiiiiiiiiiii_26","jsCall_viiiiiiiiiiii_27","jsCall_viiiiiiiiiiii_28","jsCall_viiiiiiiiiiii_29","jsCall_viiiiiiiiiiii_30","jsCall_viiiiiiiiiiii_31","jsCall_viiiiiiiiiiii_32","jsCall_viiiiiiiiiiii_33","jsCall_viiiiiiiiiiii_34","_yuv2rgba32_full_X_c","_yuv2rgbx32_full_X_c","_yuv2argb32_full_X_c","_yuv2xrgb32_full_X_c","_yuv2bgra32_full_X_c","_yuv2bgrx32_full_X_c","_yuv2abgr32_full_X_c","_yuv2xbgr32_full_X_c","_yuv2rgba64le_full_X_c","_yuv2rgbx64le_full_X_c","_yuv2rgba64be_full_X_c","_yuv2rgbx64be_full_X_c","_yuv2bgra64le_full_X_c","_yuv2bgrx64le_full_X_c","_yuv2bgra64be_full_X_c","_yuv2bgrx64be_full_X_c","_yuv2rgb24_full_X_c","_yuv2bgr24_full_X_c","_yuv2rgb48le_full_X_c","_yuv2bgr48le_full_X_c","_yuv2rgb48be_full_X_c","_yuv2bgr48be_full_X_c","_yuv2bgr4_byte_full_X_c","_yuv2rgb4_byte_full_X_c","_yuv2bgr8_full_X_c","_yuv2rgb8_full_X_c","_yuv2gbrp_full_X_c","_yuv2gbrp16_full_X_c","_yuv2rgbx64le_X_c","_yuv2rgba64le_X_c","_yuv2rgbx64be_X_c","_yuv2rgba64be_X_c","_yuv2bgrx64le_X_c","_yuv2bgra64le_X_c","_yuv2bgrx64be_X_c","_yuv2bgra64be_X_c","_yuv2rgba32_X_c","_yuv2rgbx32_X_c","_yuv2rgba32_1_X_c","_yuv2rgbx32_1_X_c","_yuv2rgb16_X_c","_yuv2rgb15_X_c","_yuv2rgb12_X_c","_yuv2rgb8_X_c","_yuv2rgb4_X_c","_yuv2rgb4b_X_c","_yuv2rgb48le_X_c","_yuv2rgb48be_X_c","_yuv2bgr48le_X_c","_yuv2bgr48be_X_c","_yuv2rgb24_X_c","_yuv2bgr24_X_c","_yuv2monowhite_X_c","_yuv2ayuv64le_X_c","_yuv2monoblack_X_c","_yuv2yuyv422_X_c","_yuv2yvyu422_X_c","_yuv2uyvy422_X_c","_yuv2ya8_X_c","_yuv2ya16le_X_c","_yuv2ya16be_X_c","_sao_edge_restore_0_9","_sao_edge_restore_1_9","_sao_edge_restore_0_10","_sao_edge_restore_1_10","_sao_edge_restore_0_12","_sao_edge_restore_1_12","_sao_edge_restore_0_8","_sao_edge_restore_1_8",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Mr=[0,"jsCall_viiiiiiiiiiiiii_0","jsCall_viiiiiiiiiiiiii_1","jsCall_viiiiiiiiiiiiii_2","jsCall_viiiiiiiiiiiiii_3","jsCall_viiiiiiiiiiiiii_4","jsCall_viiiiiiiiiiiiii_5","jsCall_viiiiiiiiiiiiii_6","jsCall_viiiiiiiiiiiiii_7","jsCall_viiiiiiiiiiiiii_8","jsCall_viiiiiiiiiiiiii_9","jsCall_viiiiiiiiiiiiii_10","jsCall_viiiiiiiiiiiiii_11","jsCall_viiiiiiiiiiiiii_12","jsCall_viiiiiiiiiiiiii_13","jsCall_viiiiiiiiiiiiii_14","jsCall_viiiiiiiiiiiiii_15","jsCall_viiiiiiiiiiiiii_16","jsCall_viiiiiiiiiiiiii_17","jsCall_viiiiiiiiiiiiii_18","jsCall_viiiiiiiiiiiiii_19","jsCall_viiiiiiiiiiiiii_20","jsCall_viiiiiiiiiiiiii_21","jsCall_viiiiiiiiiiiiii_22","jsCall_viiiiiiiiiiiiii_23","jsCall_viiiiiiiiiiiiii_24","jsCall_viiiiiiiiiiiiii_25","jsCall_viiiiiiiiiiiiii_26","jsCall_viiiiiiiiiiiiii_27","jsCall_viiiiiiiiiiiiii_28","jsCall_viiiiiiiiiiiiii_29","jsCall_viiiiiiiiiiiiii_30","jsCall_viiiiiiiiiiiiii_31","jsCall_viiiiiiiiiiiiii_32","jsCall_viiiiiiiiiiiiii_33","jsCall_viiiiiiiiiiiiii_34","_put_hevc_pel_bi_w_pixels_9","_put_hevc_qpel_bi_w_h_9","_put_hevc_qpel_bi_w_v_9","_put_hevc_qpel_bi_w_hv_9","_put_hevc_epel_bi_w_h_9","_put_hevc_epel_bi_w_v_9","_put_hevc_epel_bi_w_hv_9","_put_hevc_pel_bi_w_pixels_10","_put_hevc_qpel_bi_w_h_10","_put_hevc_qpel_bi_w_v_10","_put_hevc_qpel_bi_w_hv_10","_put_hevc_epel_bi_w_h_10","_put_hevc_epel_bi_w_v_10","_put_hevc_epel_bi_w_hv_10","_put_hevc_pel_bi_w_pixels_12","_put_hevc_qpel_bi_w_h_12","_put_hevc_qpel_bi_w_v_12","_put_hevc_qpel_bi_w_hv_12","_put_hevc_epel_bi_w_h_12","_put_hevc_epel_bi_w_v_12","_put_hevc_epel_bi_w_hv_12","_put_hevc_pel_bi_w_pixels_8","_put_hevc_qpel_bi_w_h_8","_put_hevc_qpel_bi_w_v_8","_put_hevc_qpel_bi_w_hv_8","_put_hevc_epel_bi_w_h_8","_put_hevc_epel_bi_w_v_8","_put_hevc_epel_bi_w_hv_8"],kr={dd:zi,did:Hi,didd:Vi,fii:Yi,fiii:qi,ii:Wi,iid:Xi,iidiiii:Gi,iii:Ki,iiii:Qi,iiiii:Zi,iiiiii:Ji,iiiiiii:$i,iiiiiiii:er,iiiiij:tr,iiiji:ir,iiijjji:rr,jiiij:nr,jiiji:ar,jiji:sr,v:or,vdiidiiiii:lr,vi:fr,vii:ur,viidi:hr,viifi:cr,viii:dr,viiii:_r,viiiid:pr,viiiifii:mr,viiiii:br,viiiiidd:vr,viiiiii:yr,viiiiiifi:gr,viiiiiii:wr,viiiiiiii:Er,viiiiiiiid:Cr,viiiiiiiidi:Sr,viiiiiiiii:jr,viiiiiiiiii:Tr,viiiiiiiiiii:Ar,viiiiiiiiiiii:xr,viiiiiiiiiiiiii:Mr};function Pr(e){Ie(e,"dd");}function Ir(e){Ie(e,"did");}function Rr(e){Ie(e,"didd");}function Ur(e){Ie(e,"fii");}function Dr(e){Ie(e,"fiii");}function Fr(e){Ie(e,"ii");}function Or(e){Ie(e,"iid");}function Lr(e){Ie(e,"iidiiii");}function Br(e){Ie(e,"iii");}function Nr(e){Ie(e,"iiii");}function zr(e){Ie(e,"iiiii");}function Hr(e){Ie(e,"iiiiii");}function Vr(e){Ie(e,"iiiiiii");}function Yr(e){Ie(e,"iiiiiiii");}function qr(e){Ie(e,"iiiiij");}function Wr(e){Ie(e,"iiiji");}function Xr(e){Ie(e,"iiijjji");}function Gr(e){Ie(e,"jiiij");}function Kr(e){Ie(e,"jiiji");}function Qr(e){Ie(e,"jiji");}function Zr(e){Ie(e,"v");}function Jr(e){Ie(e,"vdiidiiiii");}function $r(e){Ie(e,"vi");}function en(e){Ie(e,"vii");}function tn(e){Ie(e,"viidi");}function rn(e){Ie(e,"viifi");}function nn(e){Ie(e,"viii");}function an(e){Ie(e,"viiii");}function sn(e){Ie(e,"viiiid");}function on(e){Ie(e,"viiiifii");}function ln(e){Ie(e,"viiiii");}function fn(e){Ie(e,"viiiiidd");}function un(e){Ie(e,"viiiiii");}function hn(e){Ie(e,"viiiiiifi");}function cn(e){Ie(e,"viiiiiii");}function dn(e){Ie(e,"viiiiiiii");}function _n(e){Ie(e,"viiiiiiiid");}function pn(e){Ie(e,"viiiiiiiidi");}function mn(e){Ie(e,"viiiiiiiii");}function bn(e){Ie(e,"viiiiiiiiii");}function vn(e){Ie(e,"viiiiiiiiiii");}function yn(e){Ie(e,"viiiiiiiiiiii");}function gn(e){Ie(e,"viiiiiiiiiiiiii");}function wn(e,t){return F[e](t);}function En(e,t,i){return F[e](t,i);}function Cn(e,t,i,r){return F[e](t,i,r);}function Sn(e,t,i){return F[e](t,i);}function jn(e,t,i,r){return F[e](t,i,r);}function Tn(e,t){return F[e](t);}function An(e,t,i){return F[e](t,i);}function xn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s);}function Mn(e,t,i){return F[e](t,i);}function kn(e,t,i,r){return F[e](t,i,r);}function Pn(e,t,i,r,n){return F[e](t,i,r,n);}function In(e,t,i,r,n,a){return F[e](t,i,r,n,a);}function Rn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s);}function Un(e,t,i,r,n,a,s,o){return F[e](t,i,r,n,a,s,o);}function Dn(e,t,i,r,n,a){return F[e](t,i,r,n,a);}function Fn(e,t,i,r,n){return F[e](t,i,r,n);}function On(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s);}function Ln(e,t,i,r,n){return F[e](t,i,r,n);}function Bn(e,t,i,r,n){return F[e](t,i,r,n);}function Nn(e,t,i,r){return F[e](t,i,r);}function zn(e){F[e]();}function Hn(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f);}function Vn(e,t){F[e](t);}function Yn(e,t,i){F[e](t,i);}function qn(e,t,i,r,n){F[e](t,i,r,n);}function Wn(e,t,i,r,n){F[e](t,i,r,n);}function Xn(e,t,i,r){F[e](t,i,r);}function Gn(e,t,i,r,n){F[e](t,i,r,n);}function Kn(e,t,i,r,n,a){F[e](t,i,r,n,a);}function Qn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o);}function Zn(e,t,i,r,n,a){F[e](t,i,r,n,a);}function Jn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o);}function $n(e,t,i,r,n,a,s){F[e](t,i,r,n,a,s);}function ea(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l);}function ta(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o);}function ia(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l);}function ra(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f);}function na(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u);}function aa(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f);}function sa(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u);}function oa(e,t,i,r,n,a,s,o,l,f,u,h){F[e](t,i,r,n,a,s,o,l,f,u,h);}function la(e,t,i,r,n,a,s,o,l,f,u,h,c){F[e](t,i,r,n,a,s,o,l,f,u,h,c);}function fa(e,t,i,r,n,a,s,o,l,f,u,h,c,d,_){F[e](t,i,r,n,a,s,o,l,f,u,h,c,d,_);}var ua={},ha={___buildEnvironment:Et,___lock:Ct,___syscall221:Ft,___syscall3:Ot,___syscall5:Lt,___unlock:Bt,___wasi_fd_close:zt,___wasi_fd_fdstat_get:Vt,___wasi_fd_seek:qt,___wasi_fd_write:Xt,__emscripten_fetch_free:Gt,__memory_base:1024,__table_base:0,_abort:Kt,_clock:Qt,_clock_gettime:$t,_emscripten_asm_const_i:pt,_emscripten_get_heap_size:ei,_emscripten_is_main_browser_thread:ti,_emscripten_memcpy_big:Ci,_emscripten_resize_heap:ri,_emscripten_start_fetch:fi,_fabs:ui,_getenv:hi,_gettimeofday:ci,_gmtime_r:_i,_llvm_exp2_f64:mi,_llvm_log2_f32:bi,_llvm_stackrestore:vi,_llvm_stacksave:yi,_llvm_trunc_f64:gi,_localtime_r:Ei,_nanosleep:ji,_pthread_cond_destroy:Ti,_pthread_cond_init:Ai,_pthread_create:xi,_pthread_join:Mi,_strftime:Di,_sysconf:Fi,_time:Oi,abortStackOverflow:Pe,getTempRet0:H,jsCall_dd:wn,jsCall_did:En,jsCall_didd:Cn,jsCall_fii:Sn,jsCall_fiii:jn,jsCall_ii:Tn,jsCall_iid:An,jsCall_iidiiii:xn,jsCall_iii:Mn,jsCall_iiii:kn,jsCall_iiiii:Pn,jsCall_iiiiii:In,jsCall_iiiiiii:Rn,jsCall_iiiiiiii:Un,jsCall_iiiiij:Dn,jsCall_iiiji:Fn,jsCall_iiijjji:On,jsCall_jiiij:Ln,jsCall_jiiji:Bn,jsCall_jiji:Nn,jsCall_v:zn,jsCall_vdiidiiiii:Hn,jsCall_vi:Vn,jsCall_vii:Yn,jsCall_viidi:qn,jsCall_viifi:Wn,jsCall_viii:Xn,jsCall_viiii:Gn,jsCall_viiiid:Kn,jsCall_viiiifii:Qn,jsCall_viiiii:Zn,jsCall_viiiiidd:Jn,jsCall_viiiiii:$n,jsCall_viiiiiifi:ea,jsCall_viiiiiii:ta,jsCall_viiiiiiii:ia,jsCall_viiiiiiiid:ra,jsCall_viiiiiiiidi:na,jsCall_viiiiiiiii:aa,jsCall_viiiiiiiiii:sa,jsCall_viiiiiiiiiii:oa,jsCall_viiiiiiiiiiii:la,jsCall_viiiiiiiiiiiiii:fa,memory:N,nullFunc_dd:Pr,nullFunc_did:Ir,nullFunc_didd:Rr,nullFunc_fii:Ur,nullFunc_fiii:Dr,nullFunc_ii:Fr,nullFunc_iid:Or,nullFunc_iidiiii:Lr,nullFunc_iii:Br,nullFunc_iiii:Nr,nullFunc_iiiii:zr,nullFunc_iiiiii:Hr,nullFunc_iiiiiii:Vr,nullFunc_iiiiiiii:Yr,nullFunc_iiiiij:qr,nullFunc_iiiji:Wr,nullFunc_iiijjji:Xr,nullFunc_jiiij:Gr,nullFunc_jiiji:Kr,nullFunc_jiji:Qr,nullFunc_v:Zr,nullFunc_vdiidiiiii:Jr,nullFunc_vi:$r,nullFunc_vii:en,nullFunc_viidi:tn,nullFunc_viifi:rn,nullFunc_viii:nn,nullFunc_viiii:an,nullFunc_viiiid:sn,nullFunc_viiiifii:on,nullFunc_viiiii:ln,nullFunc_viiiiidd:fn,nullFunc_viiiiii:un,nullFunc_viiiiiifi:hn,nullFunc_viiiiiii:cn,nullFunc_viiiiiiii:dn,nullFunc_viiiiiiiid:_n,nullFunc_viiiiiiiidi:pn,nullFunc_viiiiiiiii:mn,nullFunc_viiiiiiiiii:bn,nullFunc_viiiiiiiiiii:vn,nullFunc_viiiiiiiiiiii:yn,nullFunc_viiiiiiiiiiiiii:gn,table:Y},ca=d.asm(ua,ha,ue);d.asm=ca;d._AVSniffHttpFlvInit=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffHttpFlvInit.apply(null,arguments);},d._AVSniffStreamInit=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffStreamInit.apply(null,arguments);};var da,_a=d.___emscripten_environ_constructor=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___emscripten_environ_constructor.apply(null,arguments);},pa=(d.___errno_location=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___errno_location.apply(null,arguments);},d.__get_daylight=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_daylight.apply(null,arguments);}),ma=d.__get_timezone=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_timezone.apply(null,arguments);},ba=d.__get_tzname=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_tzname.apply(null,arguments);},va=(d._closeVideo=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._closeVideo.apply(null,arguments);},d._decodeCodecContext=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeCodecContext.apply(null,arguments);},d._decodeHttpFlvVideoFrame=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeHttpFlvVideoFrame.apply(null,arguments);},d._decodeVideoFrame=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeVideoFrame.apply(null,arguments);},d._demuxBox=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._demuxBox.apply(null,arguments);},d._exitMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitMissile.apply(null,arguments);},d._exitTsMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitTsMissile.apply(null,arguments);},d._fflush=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._fflush.apply(null,arguments);},d._free=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._free.apply(null,arguments);}),ya=(d._getAudioCodecID=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getAudioCodecID.apply(null,arguments);},d._getBufferLengthApi=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getBufferLengthApi.apply(null,arguments);},d._getExtensionInfo=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getExtensionInfo.apply(null,arguments);},d._getMediaInfo=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getMediaInfo.apply(null,arguments);},d._getPPS=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPS.apply(null,arguments);},d._getPPSLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPSLen.apply(null,arguments);},d._getPacket=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPacket.apply(null,arguments);},d._getSEI=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEI.apply(null,arguments);},d._getSEILen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEILen.apply(null,arguments);},d._getSPS=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPS.apply(null,arguments);},d._getSPSLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPSLen.apply(null,arguments);},d._getSniffHttpFlvPkg=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkg.apply(null,arguments);},d._getSniffHttpFlvPkgNoCheckProbe=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkgNoCheckProbe.apply(null,arguments);},d._getSniffStreamPkg=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkg.apply(null,arguments);},d._getSniffStreamPkgNoCheckProbe=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkgNoCheckProbe.apply(null,arguments);},d._getVLC=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLC.apply(null,arguments);},d._getVLCLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLCLen.apply(null,arguments);},d._getVPS=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPS.apply(null,arguments);},d._getVPSLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPSLen.apply(null,arguments);},d._getVideoCodecID=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVideoCodecID.apply(null,arguments);},d._initMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initMissile.apply(null,arguments);},d._initTsMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initTsMissile.apply(null,arguments);},d._initializeDecoder=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDecoder.apply(null,arguments);},d._initializeDemuxer=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDemuxer.apply(null,arguments);},d._initializeSniffHttpFlvModule=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModule.apply(null,arguments);},d._initializeSniffHttpFlvModuleWithAOpt=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModuleWithAOpt.apply(null,arguments);},d._initializeSniffStreamModule=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModule.apply(null,arguments);},d._initializeSniffStreamModuleWithAOpt=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModuleWithAOpt.apply(null,arguments);},d._main=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._main.apply(null,arguments);},d._malloc=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._malloc.apply(null,arguments);}),ga=(d._pushSniffHttpFlvData=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffHttpFlvData.apply(null,arguments);},d._pushSniffStreamData=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffStreamData.apply(null,arguments);},d._registerPlayer=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._registerPlayer.apply(null,arguments);},d._release=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._release.apply(null,arguments);},d._releaseHttpFLV=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseHttpFLV.apply(null,arguments);},d._releaseSniffHttpFlv=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffHttpFlv.apply(null,arguments);},d._releaseSniffStream=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffStream.apply(null,arguments);},d._setCodecType=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._setCodecType.apply(null,arguments);},d.establishStackSpace=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.establishStackSpace.apply(null,arguments);},d.stackAlloc=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackAlloc.apply(null,arguments);}),wa=d.stackRestore=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackRestore.apply(null,arguments);},Ea=d.stackSave=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackSave.apply(null,arguments);},Ca=(d.dynCall_v=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_v.apply(null,arguments);},d.dynCall_vi=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_vi.apply(null,arguments);});function Sa(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e;}d.asm=ca,Object.getOwnPropertyDescriptor(d,"intArrayFromString")||(d.intArrayFromString=function(){at("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"intArrayToString")||(d.intArrayToString=function(){at("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),d.ccall=G,d.cwrap=K,Object.getOwnPropertyDescriptor(d,"setValue")||(d.setValue=function(){at("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getValue")||(d.getValue=function(){at("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"allocate")||(d.allocate=function(){at("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getMemory")||(d.getMemory=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"AsciiToString")||(d.AsciiToString=function(){at("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stringToAscii")||(d.stringToAscii=function(){at("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"UTF8ArrayToString")||(d.UTF8ArrayToString=function(){at("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"UTF8ToString")||(d.UTF8ToString=function(){at("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stringToUTF8Array")||(d.stringToUTF8Array=function(){at("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stringToUTF8")||(d.stringToUTF8=function(){at("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF8")||(d.lengthBytesUTF8=function(){at("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"UTF16ToString")||(d.UTF16ToString=function(){at("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stringToUTF16")||(d.stringToUTF16=function(){at("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF16")||(d.lengthBytesUTF16=function(){at("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"UTF32ToString")||(d.UTF32ToString=function(){at("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stringToUTF32")||(d.stringToUTF32=function(){at("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF32")||(d.lengthBytesUTF32=function(){at("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"allocateUTF8")||(d.allocateUTF8=function(){at("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stackTrace")||(d.stackTrace=function(){at("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addOnPreRun")||(d.addOnPreRun=function(){at("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addOnInit")||(d.addOnInit=function(){at("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addOnPreMain")||(d.addOnPreMain=function(){at("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addOnExit")||(d.addOnExit=function(){at("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addOnPostRun")||(d.addOnPostRun=function(){at("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"writeStringToMemory")||(d.writeStringToMemory=function(){at("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"writeArrayToMemory")||(d.writeArrayToMemory=function(){at("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"writeAsciiToMemory")||(d.writeAsciiToMemory=function(){at("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"addRunDependency")||(d.addRunDependency=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"removeRunDependency")||(d.removeRunDependency=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"ENV")||(d.ENV=function(){at("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"FS")||(d.FS=function(){at("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"FS_createFolder")||(d.FS_createFolder=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createPath")||(d.FS_createPath=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createDataFile")||(d.FS_createDataFile=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createPreloadedFile")||(d.FS_createPreloadedFile=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createLazyFile")||(d.FS_createLazyFile=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createLink")||(d.FS_createLink=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_createDevice")||(d.FS_createDevice=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"FS_unlink")||(d.FS_unlink=function(){at("'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");}),Object.getOwnPropertyDescriptor(d,"GL")||(d.GL=function(){at("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"dynamicAlloc")||(d.dynamicAlloc=function(){at("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"loadDynamicLibrary")||(d.loadDynamicLibrary=function(){at("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"loadWebAssemblyModule")||(d.loadWebAssemblyModule=function(){at("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getLEB")||(d.getLEB=function(){at("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getFunctionTables")||(d.getFunctionTables=function(){at("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"alignFunctionTables")||(d.alignFunctionTables=function(){at("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"registerFunctions")||(d.registerFunctions=function(){at("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),d.addFunction=O,Object.getOwnPropertyDescriptor(d,"removeFunction")||(d.removeFunction=function(){at("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getFuncWrapper")||(d.getFuncWrapper=function(){at("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"prettyPrint")||(d.prettyPrint=function(){at("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"makeBigInt")||(d.makeBigInt=function(){at("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"dynCall")||(d.dynCall=function(){at("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getCompilerSetting")||(d.getCompilerSetting=function(){at("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stackSave")||(d.stackSave=function(){at("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stackRestore")||(d.stackRestore=function(){at("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"stackAlloc")||(d.stackAlloc=function(){at("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"establishStackSpace")||(d.establishStackSpace=function(){at("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"print")||(d.print=function(){at("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"printErr")||(d.printErr=function(){at("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"getTempRet0")||(d.getTempRet0=function(){at("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"setTempRet0")||(d.setTempRet0=function(){at("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"callMain")||(d.callMain=function(){at("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"abort")||(d.abort=function(){at("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"Pointer_stringify")||(d.Pointer_stringify=function(){at("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"warnOnce")||(d.warnOnce=function(){at("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(d,"ALLOC_NORMAL")||Object.defineProperty(d,"ALLOC_NORMAL",{configurable:!0,get:function get(){at("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(d,"ALLOC_STACK")||Object.defineProperty(d,"ALLOC_STACK",{configurable:!0,get:function get(){at("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(d,"ALLOC_DYNAMIC")||Object.defineProperty(d,"ALLOC_DYNAMIC",{configurable:!0,get:function get(){at("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(d,"ALLOC_NONE")||Object.defineProperty(d,"ALLOC_NONE",{configurable:!0,get:function get(){at("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(d,"calledRun")||Object.defineProperty(d,"calledRun",{configurable:!0,get:function get(){at("'calledRun' 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");}});function ja(e){W(0==Je,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),W(0==Ue.length,"cannot call main when preRun functions remain to be called");var t=(e=e||[]).length+1,i=ga(4*(t+1));pe[i>>2]=oe(m);for(var r=1;r>2)+r]=oe(e[r-1]);}pe[(i>>2)+t]=0;try{xa(d._main(t,i),!0);}catch(e){if(e instanceof Sa)return;if("SimulateInfiniteLoop"==e)return void(B=!0);var n=e;e&&"object"===u(e)&&e.stack&&(n=[e,e.stack]),k("exception thrown: "+n),b(1,e);}finally{!0;}}function Ta(e){function t(){da||(da=!0,q||(ze(),He(),d.onRuntimeInitialized&&d.onRuntimeInitialized(),Ma&&ja(e),Ye()));}e=e||p,Je>0||(Me(),Ne(),Je>0||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("");},1),t();},1)):t(),ke()));}function Aa(){var e=M,t=k,i=!1;M=k=function k(e){i=!0;};try{var r=d._fflush;r&&r(0),["stdout","stderr"].forEach(function(e){var t=Ut.analyzePath("/dev/"+e);if(t){var r=t.object.rdev,n=At.ttys[r];n&&n.output&&n.output.length&&(i=!0);}});}catch(e){}M=e,k=t,i&&R("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.");}function xa(e,t){Aa(),t&&B&&0===e||(B?t||k("exit("+e+") called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)"):(q=!0,e,Ve(),d.onExit&&d.onExit(e)),b(e,new Sa(e)));}if(et=function e(){da||Ta(),da||(et=e);},d.run=Ta,d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;){d.preInit.pop()();}var Ma=!0;d.noInitialRun&&(Ma=!1),B=!0,Ta(),t.exports=d;}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/src/decoder");},{_process:158,buffer:66,crypto:75,fs:64,path:150}],2:[function(e,t,i){"use strict";var r=i;r.bignum=e("bn.js"),r.define=e("./asn1/api").define,r.base=e("./asn1/base"),r.constants=e("./asn1/constants"),r.decoders=e("./asn1/decoders"),r.encoders=e("./asn1/encoders");},{"./asn1/api":3,"./asn1/base":5,"./asn1/constants":9,"./asn1/decoders":11,"./asn1/encoders":14,"bn.js":16}],3:[function(e,t,i){"use strict";var r=e("./encoders"),n=e("./decoders"),a=e("inherits");function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={};}i.define=function(e,t){return new s(e,t);},s.prototype._createNamed=function(e){var t=this.name;function i(e){this._initNamed(e,t);}return a(i,e),i.prototype._initNamed=function(t,i){e.call(this,t,i);},new i(this);},s.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n[e])),this.decoders[e];},s.prototype.decode=function(e,t,i){return this._getDecoder(t).decode(e,i);},s.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e];},s.prototype.encode=function(e,t,i){return this._getEncoder(t).encode(e,i);};},{"./decoders":11,"./encoders":14,inherits:136}],4:[function(e,t,i){"use strict";var r=e("inherits"),n=e("../base/reporter").Reporter,a=e("safer-buffer").Buffer;function s(e,t){n.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer");}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return o.isEncoderBuffer(e)||(e=new o(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=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+_typeof(e));this.value=e,this.length=e.length;}}r(s,n),i.DecoderBuffer=s,s.isDecoderBuffer=function(e){if(e instanceof s)return!0;return"object"==_typeof(e)&&a.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw;},s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)};},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t;},s.prototype.isEmpty=function(){return this.offset===this.length;},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun");},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var i=new s(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i;},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length);},i.EncoderBuffer=o,o.isEncoderBuffer=function(e){if(e instanceof o)return!0;return"object"==_typeof(e)&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join;},o.prototype.join=function(e,t){return e||(e=a.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,t),t+=i.length;}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e;};},{"../base/reporter":7,inherits:136,"safer-buffer":185}],5:[function(e,t,i){"use strict";var r=i;r.Reporter=e("./reporter").Reporter,r.DecoderBuffer=e("./buffer").DecoderBuffer,r.EncoderBuffer=e("./buffer").EncoderBuffer,r.Node=e("./node");},{"./buffer":4,"./node":6,"./reporter":7}],6:[function(e,t,i){"use strict";var r=e("../base/reporter").Reporter,n=e("../base/buffer").EncoderBuffer,a=e("../base/buffer").DecoderBuffer,s=e("minimalistic-assert"),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function f(e,t,i){var r={};this._baseState=r,r.name=i,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());}t.exports=f;var u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){var e=this._baseState,t={};u.forEach(function(i){t[i]=e[i];});var i=new this.constructor(t.parent);return i._baseState=t,i;},f.prototype._wrap=function(){var e=this._baseState;l.forEach(function(t){this[t]=function(){var i=new this.constructor(this);return e.children.push(i),i[t].apply(i,arguments);};},this);},f.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");},f.prototype._useArgs=function(e){var t=this._baseState,i=e.filter(function(e){return e instanceof this.constructor;},this);e=e.filter(function(e){return!(e instanceof this.constructor);},this),0!==i.length&&(s(null===t.children),t.children=i,i.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(i){i==(0|i)&&(i|=0);var r=e[i];t[r]=i;}),t;}));},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){f.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc);};}),o.forEach(function(e){f.prototype[e]=function(){var t=this._baseState,i=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(i),this;};}),f.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this;},f.prototype.optional=function(){return this._baseState.optional=!0,this;},f.prototype.def=function(e){var t=this._baseState;return s(null===t["default"]),t["default"]=e,t.optional=!0,this;},f.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this;},f.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this;},f.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this;},f.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this;},f.prototype.any=function(){return this._baseState.any=!0,this;},f.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;},f.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this;},f.prototype._decode=function(e,t){var i=this._baseState;if(null===i.parent)return e.wrapResult(i.children[0]._decode(e,t));var r,n=i["default"],s=!0,o=null;if(null!==i.key&&(o=e.enterKey(i.key)),i.optional){var _r2=null;if(null!==i.explicit?_r2=i.explicit:null!==i.implicit?_r2=i.implicit:null!==i.tag&&(_r2=i.tag),null!==_r2||i.any){if(s=this._peekTag(e,_r2,i.any),e.isError(s))return s;}else{var _r3=e.save();try{null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t),s=!0;}catch(e){s=!1;}e.restore(_r3);}}if(i.obj&&s&&(r=e.enterObject()),s){if(null!==i.explicit){var _t2=this._decodeTag(e,i.explicit);if(e.isError(_t2))return _t2;e=_t2;}var _r4=e.offset;if(null===i.use&&null===i.choice){var _t3;i.any&&(_t3=e.save());var _r5=this._decodeTag(e,null!==i.implicit?i.implicit:i.tag,i.any);if(e.isError(_r5))return _r5;i.any?n=e.raw(_t3):e=_r5;}if(t&&t.track&&null!==i.tag&&t.track(e.path(),_r4,e.length,"tagged"),t&&t.track&&null!==i.tag&&t.track(e.path(),e.offset,e.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach(function(i){i._decode(e,t);}),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){var _r6=new a(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(_r6,t);}}return i.obj&&s&&(n=e.leaveObject(r)),null===i.key||null===n&&!0!==s?null!==o&&e.exitKey(o):e.leaveKey(o,i.key,n),n;},f.prototype._decodeGeneric=function(e,t,i){var r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],i):/str$/.test(e)?this._decodeStr(t,e,i):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],i):"objid"===e?this._decodeObjid(t,null,null,i):"gentime"===e||"utctime"===e?this._decodeTime(t,e,i):"null_"===e?this._decodeNull(t,i):"bool"===e?this._decodeBool(t,i):"objDesc"===e?this._decodeStr(t,e,i):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,i):t.error("unknown tag: "+e);},f.prototype._getUse=function(e,t){var i=this._baseState;return i.useDecoder=this._use(e,t),s(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder;},f.prototype._decodeChoice=function(e,t){var i=this._baseState;var r=null,n=!1;return Object.keys(i.choice).some(function(a){var s=e.save(),o=i.choice[a];try{var _i2=o._decode(e,t);if(e.isError(_i2))return!1;r={type:a,value:_i2},n=!0;}catch(t){return e.restore(s),!1;}return!0;},this),n?r:e.error("Choice not matched");},f.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter);},f.prototype._encode=function(e,t,i){var r=this._baseState;if(null!==r["default"]&&r["default"]===e)return;var n=this._encodeValue(e,t,i);return void 0===n||this._skipDefault(n,t,i)?void 0:n;},f.prototype._encodeValue=function(e,t,i){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new r());var a=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n["default"])return;e=n["default"];}var s=null,o=!1;if(n.any)a=this._createEncoderBuffer(e);else if(n.choice)a=this._encodeChoice(e,t);else if(n.contains)s=this._getUse(n.contains,i)._encode(e,t),o=!0;else if(n.children)s=n.children.map(function(i){if("null_"===i._baseState.tag)return i._encode(null,t,e);if(null===i._baseState.key)return t.error("Child should have a key");var r=t.enterKey(i._baseState.key);if("object"!=_typeof(e))return t.error("Child expected, but input is not object");var n=i._encode(e[i._baseState.key],t,e);return t.leaveKey(r),n;},this).filter(function(e){return e;}),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var _i3=this.clone();_i3._baseState.implicit=null,s=this._createEncoderBuffer(e.map(function(i){var r=this._baseState;return this._getUse(r.args[0],e)._encode(i,t);},_i3));}else null!==n.use?a=this._getUse(n.use,i)._encode(e,t):(s=this._encodePrimitive(n.tag,e),o=!0);if(!n.any&&null===n.choice){var _e3=null!==n.implicit?n.implicit:n.tag,_i4=null===n.implicit?"universal":"context";null===_e3?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(a=this._encodeComposite(_e3,o,_i4,s));}return null!==n.explicit&&(a=this._encodeComposite(n.explicit,!1,"context",a)),a;},f.prototype._encodeChoice=function(e,t){var i=this._baseState,r=i.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(e.value,t);},f.prototype._encodePrimitive=function(e,t){var i=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&i.args)return this._encodeObjid(t,i.reverseArgs[0],i.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,i.args&&i.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e);},f.prototype._isNumstr=function(e){return /^[0-9 ]*$/.test(e);},f.prototype._isPrintstr=function(e){return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(e);};},{"../base/buffer":4,"../base/reporter":7,"minimalistic-assert":142}],7:[function(e,t,i){"use strict";var r=e("inherits");function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]};}function a(e,t){this.path=e,this.rethrow(t);}i.Reporter=n,n.prototype.isError=function(e){return e instanceof a;},n.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length};},n.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen);},n.prototype.enterKey=function(e){return this._reporterState.path.push(e);},n.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1);},n.prototype.leaveKey=function(e,t,i){var r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=i);},n.prototype.path=function(){return this._reporterState.path.join("/");},n.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t;},n.prototype.leaveObject=function(e){var t=this._reporterState,i=t.obj;return t.obj=e,i;},n.prototype.error=function(e){var t;var i=this._reporterState,r=e instanceof a;if(t=r?e:new a(i.path.map(function(e){return"["+JSON.stringify(e)+"]";}).join(""),e.message||e,e.stack),!i.options.partial)throw t;return r||i.errors.push(t),t;},n.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e;},r(a,Error),a.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message);}catch(e){this.stack=e.stack;}return this;};},{inherits:136}],8:[function(e,t,i){"use strict";function r(e){var t={};return Object.keys(e).forEach(function(i){(0|i)==i&&(i|=0);var r=e[i];t[r]=i;}),t;}i.tagClass={0:"universal",1:"application",2:"context",3:"private"},i.tagClassByName=r(i.tagClass),i.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"},i.tagByName=r(i.tag);},{}],9:[function(e,t,i){"use strict";var r=i;r._reverse=function(e){var t={};return Object.keys(e).forEach(function(i){(0|i)==i&&(i|=0);var r=e[i];t[r]=i;}),t;},r.der=e("./der");},{"./der":8}],10:[function(e,t,i){"use strict";var r=e("inherits"),n=e("bn.js"),a=e("../base/buffer").DecoderBuffer,s=e("../base/node"),o=e("../constants/der");function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f(),this.tree._init(e.body);}function f(e){s.call(this,"der",e);}function u(e,t){var i=e.readUInt8(t);if(e.isError(i))return i;var r=o.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){var _r7=i;for(i=0;128==(128&_r7);){if(_r7=e.readUInt8(t),e.isError(_r7))return _r7;i<<=7,i|=127&_r7;}}else i&=31;return{cls:r,primitive:n,tag:i,tagStr:o.tag[i]};}function h(e,t,i){var r=e.readUInt8(i);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;var n=127&r;if(n>4)return e.error("length octect is too long");r=0;for(var _t4=0;_t4=31)return r.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=s.tagClassByName[i||"universal"]<<6,n;}(e,t,i,this.reporter);if(r.length<128){var _e7=n.alloc(2);return _e7[0]=a,_e7[1]=r.length,this._createEncoderBuffer([_e7,r]);}var o=1;for(var _e8=r.length;_e8>=256;_e8>>=8){o++;}var l=n.alloc(2+o);l[0]=a,l[1]=128|o;for(var _e9=1+o,_t12=r.length;_t12>0;_e9--,_t12>>=8){l[_e9]=255&_t12;}return this._createEncoderBuffer([l,r]);},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){var _t13=n.alloc(2*e.length);for(var _i7=0;_i7=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1]);}var r=0;for(var _t16=0;_t16=128;_i8>>=7){r++;}}var a=n.alloc(r);var s=a.length-1;for(var _t17=e.length-1;_t17>=0;_t17--){var _i9=e[_t17];for(a[s--]=127&_i9;(_i9>>=7)>0;){a[s--]=128|127&_i9;}}return this._createEncoderBuffer(a);},l.prototype._encodeTime=function(e,t){var i;var r=new Date(e);return"gentime"===t?i=[f(r.getUTCFullYear()),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?i=[f(r.getUTCFullYear()%100),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(i,"octstr");},l.prototype._encodeNull=function(){return this._createEncoderBuffer("");},l.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&&!n.isBuffer(e)){var _t18=e.toArray();!e.sign&&128&_t18[0]&&_t18.unshift(0),e=n.from(_t18);}if(n.isBuffer(e)){var _t19=e.length;0===e.length&&_t19++;var _i10=n.alloc(_t19);return e.copy(_i10),0===e.length&&(_i10[0]=0),this._createEncoderBuffer(_i10);}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);var i=1;for(var _t20=e;_t20>=256;_t20>>=8){i++;}var r=new Array(i);for(var _t21=r.length-1;_t21>=0;_t21--){r[_t21]=255&e,e>>=8;}return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(n.from(r));},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0);},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree;},l.prototype._skipDefault=function(e,t,i){var r=this._baseState;var n;if(null===r["default"])return!1;var a=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r["default"],t,i).join()),a.length!==r.defaultBuffer.length)return!1;for(n=0;n=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s;}return r;}function l(e,t,i,r){for(var n=0,a=Math.min(e.length,i),s=t;s=49?o-49+10:o>=17?o-17+10:o;}return n;}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,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==_typeof(e))return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),t,i);},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i);},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3){s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);}else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6){n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);}i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this.strip();},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t){r++;}r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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?"";};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,h=67108863&l,c=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=c;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+h)/67108864|0,h=67108863&s;}i.words[f]=0|h,l=0|u;}return 0!==l?i.words[f]=0|l:i.length--,i.strip();}a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?f[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--);}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;){i="0"+i;}return 0!==this.negative&&(i="-"+i),i;}if(e===(0|e)&&e>=2&&e<=36){var c=u[e],d=h[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modn(d).toString(e);i=(_=_.idivn(d)).isZero()?p+i:f[c-p.length]+p+i;}for(this.isZero()&&(i="0"+i);i.length%t!=0;){i="0"+i;}return 0!==this.negative&&(i="-"+i),i;}r(!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&&r(!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 r(void 0!==s),this.toArrayLike(s,e,t);},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t);},a.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var s,o,l="le"===t,f=new e(a),u=this.clone();if(l){for(o=0;!u.isZero();o++){s=u.andln(255),u.iushrn(8),f[o]=s;}for(;o=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t;},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i;},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip();},a.prototype.notn=function(e){return this.clone().inotn(e);},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;}for(;0!==n&&a>>26;}if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;}for(;0!==a&&s>26,this.words[s]=67108863&t;}if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,W=0|o[2],X=8191&W,G=W>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],he=8191&ue,ce=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(h,z))|0)+((8191&(n=(n=Math.imul(h,H))+Math.imul(c,z)|0))<<13)|0;f=((a=Math.imul(c,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(h,Y)|0)|0)+((8191&(n=(n=n+Math.imul(h,q)|0)+Math.imul(c,Y)|0))<<13)|0;f=((a=a+Math.imul(c,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(h,X)|0)|0)+((8191&(n=(n=n+Math.imul(h,G)|0)+Math.imul(c,X)|0))<<13)|0;f=((a=a+Math.imul(c,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,X)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(h,Q)|0)|0)+((8191&(n=(n=n+Math.imul(h,Z)|0)+Math.imul(c,Q)|0))<<13)|0;f=((a=a+Math.imul(c,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,X)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(h,$)|0)|0)+((8191&(n=(n=n+Math.imul(h,ee)|0)+Math.imul(c,$)|0))<<13)|0;f=((a=a+Math.imul(c,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,X)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(h,ie)|0)|0)+((8191&(n=(n=n+Math.imul(h,re)|0)+Math.imul(c,ie)|0))<<13)|0;f=((a=a+Math.imul(c,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,X)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(h,ae)|0)|0)+((8191&(n=(n=n+Math.imul(h,se)|0)+Math.imul(c,ae)|0))<<13)|0;f=((a=a+Math.imul(c,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,X)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,X)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(h,le)|0)|0)+((8191&(n=(n=n+Math.imul(h,fe)|0)+Math.imul(c,le)|0))<<13)|0;f=((a=a+Math.imul(c,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,X)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(h,he)|0)|0)+((8191&(n=(n=n+Math.imul(h,ce)|0)+Math.imul(c,he)|0))<<13)|0;f=((a=a+Math.imul(c,ce)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,he)|0,n=(n=n+Math.imul(_,ce)|0)+Math.imul(p,he)|0,a=a+Math.imul(p,ce)|0;var je=(f+(r=r+Math.imul(h,_e)|0)|0)+((8191&(n=(n=n+Math.imul(h,pe)|0)+Math.imul(c,_e)|0))<<13)|0;f=((a=a+Math.imul(c,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,X)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,X)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,he)|0,n=(n=n+Math.imul(b,ce)|0)+Math.imul(v,he)|0,a=a+Math.imul(v,ce)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,X),n=(n=Math.imul(L,G))+Math.imul(B,X)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,he)|0,n=(n=n+Math.imul(g,ce)|0)+Math.imul(w,he)|0,a=a+Math.imul(w,ce)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,he)|0,n=(n=n+Math.imul(C,ce)|0)+Math.imul(S,he)|0,a=a+Math.imul(S,ce)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,he)|0,n=(n=n+Math.imul(T,ce)|0)+Math.imul(A,he)|0,a=a+Math.imul(A,ce)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,he)|0,n=(n=n+Math.imul(M,ce)|0)+Math.imul(k,he)|0,a=a+Math.imul(k,ce)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,he)|0,n=(n=n+Math.imul(I,ce)|0)+Math.imul(R,he)|0,a=a+Math.imul(R,ce)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,he)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(F,he)|0,a=a+Math.imul(F,ce)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,he),n=(n=Math.imul(L,ce))+Math.imul(B,he)|0,a=Math.imul(B,ce);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i;};function _(e,t,i){return new p().mulp(e,t,i);}function p(e,t){this.x=e,this.y=t;}Math.imul||(d=c),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):i<63?c(this,e,t):i<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863;}i.words[a]=o,r=s,s=n;}return 0!==r?i.words[a]=r:i.length--,i.strip();}(this,e,t):_(this,e,t);},p.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;}return r;},p.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1){n++;}return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;}for(s=2*t;s>=26,t+=n/67108864|0,t+=a>>>26,this.words[i]=67108863&a;}return 0!==t&&(this.words[i]=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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n;}return t;}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i;}s&&(this.words[t]=s,this.length++);}if(0!==n){for(t=this.length-1;t>=0;t--){this.words[t+n]=this.words[t];}for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var h=0|this.words[f];this.words[f]=u<<26-a|h>>>a,u=h&o;}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip();},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i);},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++){this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;}return this.length=Math.max(this.length,t+1),this;},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a;}for(;n>26,this.words[n+i]=67108863&a;}if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;}return this.negative=1,this.strip();},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;h--){var c=67108864*(0|r.words[n.length+h])+(0|r.words[n.length+h-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,h);0!==r.negative;){c--,r.negative=0,r._ishlnsubmul(n,1,h),r.isZero()||(r.negative^=1);}o&&(o.words[h]=c);}return o&&o.strip(),r.strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r};},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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);var n,s,o;},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);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){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--){i=(t*i+(0|this.words[n]))%e;}return i;},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e;}return this.strip();},a.prototype.divn=function(e){return this.clone().idivn(e);},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();){t.iushrn(1),i.iushrn(1),++f;}for(var u=i.clone(),h=t.clone();!t.isZero();){for(var c=0,d=1;0==(t.words[0]&d)&&c<26;++c,d<<=1){;}if(c>0)for(t.iushrn(c);c-->0;){(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(h)),n.iushrn(1),s.iushrn(1);}for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1){;}if(_>0)for(i.iushrn(_);_-->0;){(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(h)),o.iushrn(1),l.iushrn(1);}t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s));}return{a:o,b:l,gcd:i.iushln(f)};},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1){;}if(f>0)for(t.iushrn(f);f-->0;){s.isOdd()&&s.iadd(l),s.iushrn(1);}for(var h=0,c=1;0==(i.words[0]&c)&&h<26;++h,c<<=1){;}if(h>0)for(i.iushrn(h);h-->0;){o.isOdd()&&o.iadd(l),o.iushrn(1);}t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s));}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n;},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++){t.iushrn(1),i.iushrn(1);}for(;;){for(;t.isEven();){t.iushrn(1);}for(;i.isEven();){i.iushrn(1);}var n=t.cmp(i);if(n<0){var a=t;t=i,i=a;}else if(0===n||0===i.cmpn(1))break;t.isub(i);}return i.iushln(r);},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o;}return 0!==a&&(this.words[s]=a,this.length++),this;},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0];},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 E(e);},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e);},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e);},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e);},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e);},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e);},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e);},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e);},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e);},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e);},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this);},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this);},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this);},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this);},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this);},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e);};var m={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function g(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function E(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t;}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null;}function C(e){E.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);}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e;},b.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength();}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i;},b.prototype.split=function(e,t){e.iushrn(this.n,0,t);},b.prototype.imulK=function(e){return e.imul(this.k);},n(v,b),v.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a;}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9;},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r;}return 0!==t&&(e.words[e.length++]=t),e;},a._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v();else if("p224"===e)t=new y();else if("p192"===e)t=new g();else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w();}return m[e]=t,t;},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers");},E.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers");},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this);},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this);},E.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this);},E.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i;},E.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this);},E.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i;},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t));},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t));},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t));},E.prototype.isqr=function(e){return this.imul(e,e.clone());},E.prototype.sqr=function(e){return this.mul(e,e);},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i);}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);){s++,n.iushrn(1);}r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);){u.redIAdd(l);}for(var h=this.pow(u,n),c=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++){p=p.redSqr();}r(m<_);var b=this.pow(h,new a(1).iushln(_-m-1));c=c.redMul(b),h=b.redSqr(),d=d.redMul(h),_=m;}return c;},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t);},E.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var h=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==h||0!==s?(s<<=1,s|=h,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0;}l=26;}return n;},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t;},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t;},a.mont=function(e){return new C(e);},n(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift));},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t;},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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);},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this);},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this);};}(void 0===t||t,this);},{buffer:20}],17:[function(e,t,i){"use strict";i.byteLength=function(e){var t=f(e),i=t[0],r=t[1];return 3*(i+r)/4-r;},i.toByteArray=function(e){var t,i,r=f(e),s=r[0],o=r[1],l=new a(function(e,t,i){return 3*(t+i)/4-i;}(0,s,o)),u=0,h=o>0?s-4:s;for(i=0;i>16&255,l[u++]=t>>8&255,l[u++]=255&t;}2===o&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,l[u++]=255&t);1===o&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l;},i.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],s=0,o=i-n;so?o:s+16383));}1===n?(t=e[i-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("");};for(var r=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4];}function u(e,t,i){for(var n,a,s=[],o=t;o>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);}return s.join("");}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63;},{}],18:[function(e,t,i){!function(t,i){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed");}function n(e,t){e.super_=t;var i=function i(){};i.prototype=t.prototype,e.prototype=new i(),e.prototype.constructor=e;}function a(e,t,i){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"));}var s;"object"==_typeof(t)?t.exports=a:i.BN=a,a.BN=a,a.wordSize=26;try{s=e("buffer").Buffer;}catch(e){}function o(e,t,i){for(var n=0,a=Math.min(e.length,i),s=0,o=t;o=49&&f<=54?f-49+10:f>=17&&f<=22?f-17+10:f,s|=l;}return r(!(240&s),"Invalid character in "+e),n;}function l(e,t,i,n){for(var a=0,s=0,o=Math.min(e.length,i),l=t;l=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&s0?e:t;},a.min=function(e,t){return e.cmp(t)<0?e:t;},a.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==_typeof(e))return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this._strip(),"le"===i&&this._initArray(this.toArray(),t,i);},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i);},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3){s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);}else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6){n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);}i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this._strip();},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t){r++;}r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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;},"undefined"!=typeof Symbol&&"function"==typeof Symbol["for"])try{a.prototype[Symbol["for"]("nodejs.util.inspect.custom")]=u;}catch(e){a.prototype.inspect=u;}else a.prototype.inspect=u;function u(){return(this.red?"";}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?h[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--);}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;){i="0"+i;}return 0!==this.negative&&(i="-"+i),i;}if(e===(0|e)&&e>=2&&e<=36){var f=c[e],u=d[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modrn(u).toString(e);i=(_=_.idivn(u)).isZero()?p+i:h[f-p.length]+p+i;}for(this.isZero()&&(i="0"+i);i.length%t!=0;){i="0"+i;}return 0!==this.negative&&(i="-"+i),i;}r(!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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e;},a.prototype.toJSON=function(){return this.toString(16,2);},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t);}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t);};function _(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,h=67108863&l,c=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=c;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+h)/67108864|0,h=67108863&s;}i.words[f]=0|h,l=0|u;}return 0!==l?i.words[f]=0|l:i.length--,i._strip();}a.prototype.toArrayLike=function(e,t,i){this._strip();var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t);}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,n),s;},a.prototype._toArrayLikeLE=function(e,t){for(var i=0,r=0,n=0,a=0;n>8&255),i>16&255),6===a?(i>24&255),r=0,a=0):(r=s>>>24,a+=2);}if(i=0&&(e[i--]=s>>8&255),i>=0&&(e[i--]=s>>16&255),6===a?(i>=0&&(e[i--]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2);}if(i>=0)for(e[i--]=r;i>=0;){e[i--]=0;}},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e);}:a.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t;},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i;},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip();},a.prototype.notn=function(e){return this.clone().inotn(e);},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;}for(;0!==n&&a>>26;}if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;}for(;0!==a&&s>26,this.words[s]=67108863&t;}if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,W=0|o[2],X=8191&W,G=W>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],he=8191&ue,ce=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(h,z))|0)+((8191&(n=(n=Math.imul(h,H))+Math.imul(c,z)|0))<<13)|0;f=((a=Math.imul(c,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(h,Y)|0)|0)+((8191&(n=(n=n+Math.imul(h,q)|0)+Math.imul(c,Y)|0))<<13)|0;f=((a=a+Math.imul(c,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(h,X)|0)|0)+((8191&(n=(n=n+Math.imul(h,G)|0)+Math.imul(c,X)|0))<<13)|0;f=((a=a+Math.imul(c,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,X)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(h,Q)|0)|0)+((8191&(n=(n=n+Math.imul(h,Z)|0)+Math.imul(c,Q)|0))<<13)|0;f=((a=a+Math.imul(c,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,X)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(h,$)|0)|0)+((8191&(n=(n=n+Math.imul(h,ee)|0)+Math.imul(c,$)|0))<<13)|0;f=((a=a+Math.imul(c,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,X)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(h,ie)|0)|0)+((8191&(n=(n=n+Math.imul(h,re)|0)+Math.imul(c,ie)|0))<<13)|0;f=((a=a+Math.imul(c,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,X)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(h,ae)|0)|0)+((8191&(n=(n=n+Math.imul(h,se)|0)+Math.imul(c,ae)|0))<<13)|0;f=((a=a+Math.imul(c,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,X)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,X)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(h,le)|0)|0)+((8191&(n=(n=n+Math.imul(h,fe)|0)+Math.imul(c,le)|0))<<13)|0;f=((a=a+Math.imul(c,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,X)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(h,he)|0)|0)+((8191&(n=(n=n+Math.imul(h,ce)|0)+Math.imul(c,he)|0))<<13)|0;f=((a=a+Math.imul(c,ce)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,he)|0,n=(n=n+Math.imul(_,ce)|0)+Math.imul(p,he)|0,a=a+Math.imul(p,ce)|0;var je=(f+(r=r+Math.imul(h,_e)|0)|0)+((8191&(n=(n=n+Math.imul(h,pe)|0)+Math.imul(c,_e)|0))<<13)|0;f=((a=a+Math.imul(c,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,X)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,X)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,he)|0,n=(n=n+Math.imul(b,ce)|0)+Math.imul(v,he)|0,a=a+Math.imul(v,ce)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,X),n=(n=Math.imul(L,G))+Math.imul(B,X)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,he)|0,n=(n=n+Math.imul(g,ce)|0)+Math.imul(w,he)|0,a=a+Math.imul(w,ce)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,he)|0,n=(n=n+Math.imul(C,ce)|0)+Math.imul(S,he)|0,a=a+Math.imul(S,ce)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,he)|0,n=(n=n+Math.imul(T,ce)|0)+Math.imul(A,he)|0,a=a+Math.imul(A,ce)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,he)|0,n=(n=n+Math.imul(M,ce)|0)+Math.imul(k,he)|0,a=a+Math.imul(k,ce)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,he)|0,n=(n=n+Math.imul(I,ce)|0)+Math.imul(R,he)|0,a=a+Math.imul(R,ce)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,he)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(F,he)|0,a=a+Math.imul(F,ce)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,he),n=(n=Math.imul(L,ce))+Math.imul(B,he)|0,a=Math.imul(B,ce);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i;};function m(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863;}i.words[a]=o,r=s,s=n;}return 0!==r?i.words[a]=r:i.length--,i._strip();}function b(e,t,i){return m(e,t,i);}function v(e,t){this.x=e,this.y=t;}Math.imul||(p=_),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):i<63?_(this,e,t):i<1024?m(this,e,t):b(this,e,t);},v.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;}return r;},v.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1){n++;}return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;}for(s=2*t;s>=26,i+=a/67108864|0,i+=s>>>26,this.words[n]=67108863&s;}return 0!==i&&(this.words[n]=i,this.length++),t?this.ineg():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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n&1;}return t;}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i;}s&&(this.words[t]=s,this.length++);}if(0!==n){for(t=this.length-1;t>=0;t--){this.words[t+n]=this.words[t];}for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var h=0|this.words[f];this.words[f]=u<<26-a|h>>>a,u=h&o;}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip();},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i);},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++){this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;}return this.length=Math.max(this.length,t+1),this;},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a;}for(;n>26,this.words[n+i]=67108863&a;}if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;}return this.negative=1,this._strip();},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;h--){var c=67108864*(0|r.words[n.length+h])+(0|r.words[n.length+h-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,h);0!==r.negative;){c--,r.negative=0,r._ishlnsubmul(n,1,h),r.isZero()||(r.negative^=1);}o&&(o.words[h]=c);}return o&&o._strip(),r._strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r};},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,s,o;},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1);},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=(1<<26)%e,n=0,a=this.length-1;a>=0;a--){n=(i*n+(0|this.words[a]))%e;}return t?-n:n;},a.prototype.modn=function(e){return this.modrn(e);},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var a=(0|this.words[n])+67108864*i;this.words[n]=a/e|0,i=a%e;}return this._strip(),t?this.ineg():this;},a.prototype.divn=function(e){return this.clone().idivn(e);},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();){t.iushrn(1),i.iushrn(1),++f;}for(var u=i.clone(),h=t.clone();!t.isZero();){for(var c=0,d=1;0==(t.words[0]&d)&&c<26;++c,d<<=1){;}if(c>0)for(t.iushrn(c);c-->0;){(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(h)),n.iushrn(1),s.iushrn(1);}for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1){;}if(_>0)for(i.iushrn(_);_-->0;){(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(h)),o.iushrn(1),l.iushrn(1);}t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s));}return{a:o,b:l,gcd:i.iushln(f)};},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1){;}if(f>0)for(t.iushrn(f);f-->0;){s.isOdd()&&s.iadd(l),s.iushrn(1);}for(var h=0,c=1;0==(i.words[0]&c)&&h<26;++h,c<<=1){;}if(h>0)for(i.iushrn(h);h-->0;){o.isOdd()&&o.iadd(l),o.iushrn(1);}t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s));}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n;},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++){t.iushrn(1),i.iushrn(1);}for(;;){for(;t.isEven();){t.iushrn(1);}for(;i.isEven();){i.iushrn(1);}var n=t.cmp(i);if(n<0){var a=t;t=i,i=a;}else if(0===n||0===i.cmpn(1))break;t.isub(i);}return i.iushln(r);},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o;}return 0!==a&&(this.words[s]=a,this.length++),this;},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0];},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 j(e);},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e);},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e);},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e);},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e);},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e);},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e);},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e);},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e);},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e);},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this);},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this);},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this);},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this);},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this);},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e);};var y={k256:null,p224:null,p192:null,p25519:null};function g(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 w(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function E(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function C(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function j(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t;}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null;}function T(e){j.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);}g.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e;},g.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength();}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i;},g.prototype.split=function(e,t){e.iushrn(this.n,0,t);},g.prototype.imulK=function(e){return e.imul(this.k);},n(w,g),w.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a;}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9;},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r;}return 0!==t&&(e.words[e.length++]=t),e;},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w();else if("p224"===e)t=new E();else if("p192"===e)t=new C();else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S();}return y[e]=t,t;},j.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers");},j.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers");},j.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e);},j.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this);},j.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this);},j.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i;},j.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this);},j.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i;},j.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t));},j.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t));},j.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t));},j.prototype.isqr=function(e){return this.imul(e,e.clone());},j.prototype.sqr=function(e){return this.mul(e,e);},j.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i);}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);){s++,n.iushrn(1);}r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);){u.redIAdd(l);}for(var h=this.pow(u,n),c=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++){p=p.redSqr();}r(m<_);var b=this.pow(h,new a(1).iushln(_-m-1));c=c.redMul(b),h=b.redSqr(),d=d.redMul(h),_=m;}return c;},j.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t);},j.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var h=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==h||0!==s?(s<<=1,s|=h,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0;}l=26;}return n;},j.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t;},j.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t;},a.mont=function(e){return new T(e);},n(T,j),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift));},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t;},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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);},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this);},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this);};}(void 0===t||t,this);},{buffer:20}],19:[function(e,t,i){var r;function n(e){this.rand=e;}if(t.exports=function(e){return r||(r=new n(null)),r.generate(e);},t.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e);},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i>>24]^u[_>>>16&255]^h[p>>>8&255]^c[255&m]^t[b++],s=f[_>>>24]^u[p>>>16&255]^h[m>>>8&255]^c[255&d]^t[b++],o=f[p>>>24]^u[m>>>16&255]^h[d>>>8&255]^c[255&_]^t[b++],l=f[m>>>24]^u[d>>>16&255]^h[_>>>8&255]^c[255&p]^t[b++],d=a,_=s,p=o,m=l;}return a=(r[d>>>24]<<24|r[_>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[b++],s=(r[_>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&d])^t[b++],o=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[d>>>8&255]<<8|r[255&_])^t[b++],l=(r[m>>>24]<<24|r[d>>>16&255]<<16|r[_>>>8&255]<<8|r[255&p])^t[b++],[a>>>=0,s>>>=0,o>>>=0,l>>>=0];}var o=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++){e[t]=t<128?t<<1:t<<1^283;}for(var i=[],r=[],n=[[],[],[],[]],a=[[],[],[],[]],s=0,o=0,l=0;l<256;++l){var f=o^o<<1^o<<2^o<<3^o<<4;f=f>>>8^255&f^99,i[s]=f,r[f]=s;var u=e[s],h=e[u],c=e[h],d=257*e[f]^16843008*f;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*c^65537*h^257*u^16843008*s,a[0][f]=d<<24|d>>>8,a[1][f]=d<<16|d>>>16,a[2][f]=d<<8|d>>>24,a[3][f]=d,0===s?s=o=1:(s=u^e[e[e[c^u]]],o^=e[e[o]]);}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:a};}();function f(e){this._key=n(e),this._reset();}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var e=this._key,t=e.length,i=t+6,r=4*(i+1),n=[],a=0;a>>24,s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s],s^=o[a/t|0]<<24):t>6&&a%t==4&&(s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s]),n[a]=n[a-t]^s;}for(var f=[],u=0;u>>24]]^l.INV_SUB_MIX[1][l.SBOX[c>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[c>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&c]];}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=f;},f.prototype.encryptBlockRaw=function(e){return s(e=n(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds);},f.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),i=r.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[1],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[3],12),i;},f.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var i=s(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),a=r.allocUnsafe(16);return a.writeUInt32BE(i[0],0),a.writeUInt32BE(i[3],4),a.writeUInt32BE(i[2],8),a.writeUInt32BE(i[1],12),a;},f.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key);},t.exports.AES=f;},{"safe-buffer":184}],22:[function(e,t,i){var r=e("./aes"),n=e("safe-buffer").Buffer,a=e("cipher-base"),s=e("inherits"),o=e("./ghash"),l=e("buffer-xor"),f=e("./incr32");function u(e,t,i,s){a.call(this);var l=n.alloc(4,0);this._cipher=new r.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new o(u),i=function(e,t,i){if(12===t.length)return e._finID=n.concat([t,n.from([0,0,0,1])]),n.concat([t,n.from([0,0,0,2])]);var r=new o(i),a=t.length,s=a%16;r.update(t),s&&(s=16-s,r.update(n.alloc(s,0))),r.update(n.alloc(8,0));var l=8*a,u=n.alloc(8);u.writeUIntBE(l,0,8),r.update(u),e._finID=r.state;var h=n.from(e._finID);return f(h),h;}(this,i,u),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1;}s(u,a),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=n.alloc(t,0),this._ghash.update(t));}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i;},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash["final"](8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var i=0;e.length!==t.length&&i++;for(var r=Math.min(e.length,t.length),n=0;n16)throw new Error("unable to decrypt data");var i=-1;for(;++i16)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;},h.prototype.flush=function(){if(this.cache.length)return this.cache;},i.createDecipher=function(e,t){var i=a[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=f(t,!1,i.key,i.iv);return c(e,r.key,r.iv);},i.createDecipheriv=c;},{"./aes":21,"./authCipher":22,"./modes":34,"./streamCipher":37,"cipher-base":67,evp_bytestokey:105,inherits:136,"safe-buffer":184}],25:[function(e,t,i){var r=e("./modes"),n=e("./authCipher"),a=e("safe-buffer").Buffer,s=e("./streamCipher"),o=e("cipher-base"),l=e("./aes"),f=e("evp_bytestokey");function u(e,t,i){o.call(this),this._cache=new c(),this._cipher=new l.AES(t),this._prev=a.from(i),this._mode=e,this._autopadding=!0;}e("inherits")(u,o),u.prototype._update=function(e){var t,i;this._cache.add(e);for(var r=[];t=this._cache.get();){i=this._mode.encrypt(this,t),r.push(i);}return a.concat(r);};var h=a.alloc(16,16);function c(){this.cache=a.allocUnsafe(0);}function d(e,t,i){var o=r[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=a.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof i&&(i=a.from(i)),"GCM"!==o.mode&&i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new s(o.module,t,i):"auth"===o.type?new n(o.module,t,i):new u(o.module,t,i);}u.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(h))throw this._cipher.scrub(),new Error("data not multiple of block length");},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this;},c.prototype.add=function(e){this.cache=a.concat([this.cache,e]);},c.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;},c.prototype.flush=function(){for(var e=16-this.cache.length,t=a.allocUnsafe(e),i=-1;++i>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t;}function s(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0);}s.prototype.ghash=function(e){for(var t=-1;++t0;t--){r[t]=r[t]>>>1|(1&r[t-1])<<31;}r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24);}this.state=a(n);},s.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;){t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t);}},s.prototype["final"]=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(a([0,e,0,t])),this.state;},t.exports=s;},{"safe-buffer":184}],27:[function(e,t,i){t.exports=function(e){for(var t,i=e.length;i--;){if(255!==(t=e.readUInt8(i))){t++,e.writeUInt8(t,i);break;}e.writeUInt8(0,i);}};},{}],28:[function(e,t,i){var r=e("buffer-xor");i.encrypt=function(e,t){var i=r(t,e._prev);return e._prev=e._cipher.encryptBlock(i),e._prev;},i.decrypt=function(e,t){var i=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return r(n,i);};},{"buffer-xor":65}],29:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("buffer-xor");function a(e,t,i){var a=t.length,s=n(t,e._cache);return e._cache=e._cache.slice(a),e._prev=r.concat([e._prev,i?t:s]),s;}i.encrypt=function(e,t,i){for(var n,s=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){s=r.concat([s,a(e,t,i)]);break;}n=e._cache.length,s=r.concat([s,a(e,t.slice(0,n),i)]),t=t.slice(n);}return s;};},{"buffer-xor":65,"safe-buffer":184}],30:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t,i){for(var r,n,s=-1,o=0;++s<8;){r=t&1<<7-s?128:0,o+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^r))>>s%8,e._prev=a(e._prev,i?r:n);}return o;}function a(e,t){var i=e.length,n=-1,a=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++n>7;}return a;}i.encrypt=function(e,t,i){for(var a=t.length,s=r.allocUnsafe(a),o=-1;++o=0||!i.umod(e.prime1)||!i.umod(e.prime2);){i=new r(n(t));}return i;}t.exports=a,a.getr=s;}).call(this,e("buffer").Buffer);},{"bn.js":42,buffer:66,randombytes:166}],42:[function(e,t,i){arguments[4][16][0].apply(i,arguments);},{buffer:20,dup:16}],43:[function(e,t,i){t.exports=e("./browser/algorithms.json");},{"./browser/algorithms.json":44}],44:[function(e,t,i){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"}};},{}],45:[function(e,t,i){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"};},{}],46:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hash"),a=e("readable-stream"),s=e("inherits"),o=e("./sign"),l=e("./verify"),f=e("./algorithms.json");function u(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign;}function h(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign;}function c(e){return new u(e);}function d(e){return new h(e);}Object.keys(f).forEach(function(e){f[e].id=r.from(f[e].id,"hex"),f[e.toLowerCase()]=f[e];}),s(u,a.Writable),u.prototype._write=function(e,t,i){this._hash.update(e),i();},u.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this;},u.prototype.sign=function(e,t){this.end();var i=this._hash.digest(),r=o(i,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r;},s(h,a.Writable),h.prototype._write=function(e,t,i){this._hash.update(e),i();},h.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this;},h.prototype.verify=function(e,t,i){"string"==typeof t&&(t=r.from(t,i)),this.end();var n=this._hash.digest();return l(t,n,e,this._signType,this._tag);},t.exports={Sign:c,Verify:d,createSign:c,createVerify:d};},{"./algorithms.json":44,"./sign":47,"./verify":48,"create-hash":71,inherits:136,"readable-stream":63,"safe-buffer":184}],47:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hmac"),a=e("browserify-rsa"),s=e("elliptic").ec,o=e("bn.js"),l=e("parse-asn1"),f=e("./curves.json");function u(e,t,i,a){if((e=r.from(e.toArray())).length0&&i.ishrn(r),i;}function c(e,t,i){var a,s;do{for(a=r.alloc(0);8*a.length=t)throw new Error("invalid sig");}t.exports=function(e,t,i,f,u){var h=s(i);if("ec"===h.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=o[i.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var n=new a(r),s=i.data.subjectPrivateKey.data;return n.verify(t,e,s);}(e,t,h);}if("dsa"===h.type){if("dsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=i.data.p,a=i.data.q,o=i.data.g,f=i.data.pub_key,u=s.signature.decode(e,"der"),h=u.s,c=u.r;l(h,a),l(c,a);var d=n.mont(r),_=h.invm(a);return 0===o.toRed(d).redPow(new n(t).mul(_).mod(a)).fromRed().mul(f.toRed(d).redPow(c.mul(_).mod(a)).fromRed()).mod(r).mod(a).cmp(c);}(e,t,h);}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");t=r.concat([u,t]);for(var c=h.modulus.byteLength(),d=[1],_=0;t.length+d.length+22?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0]);}return"of ".concat(t," ").concat(String(e));}n("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"';},TypeError),n("ERR_INVALID_ARG_TYPE",function(e,t,i){var r,n,s,o;if("string"==typeof t&&(n="not ",t.substr(!s||s<0?0:+s,n.length)===n)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t;}(e," argument"))o="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,i){return"number"!=typeof i&&(i=0),!(i+t.length>e.length)&&-1!==e.indexOf(t,i);}(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"));}return o+=". Received type ".concat(_typeof(i));},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented";}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed";}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e;},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r;},{}],50:[function(e,t,i){(function(i){"use strict";var r=Object.keys||function(e){var t=[];for(var i in e){t.push(i);}return t;};t.exports=f;var n=e("./_stream_readable"),a=e("./_stream_writable");e("inherits")(f,n);for(var s=r(a.prototype),o=0;o0){if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e);}(t)),r)s.endEmitted?E(e,new w()):A(e,s,t,!0);else if(s.ended)E(e,new y());else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):P(e,s)):A(e,s,t,!1);}}else r||(s.reading=!1,P(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e;}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));}function M(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(k,e));}function k(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e);}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t));}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume();}function U(e){f("readable nexttick read 0"),e.read(0);}function D(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0);}function F(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read();){;}}function O(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):i=t.buffer.consume(e,t.decoder),i);var i;}function L(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(B,t,e));}function B(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var i=t._writableState;(!i||i.autoDestroy&&i.finished)&&t.destroy();}}function N(e,t){for(var i=0,r=e.length;i=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):M(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&L(this),null;var r,n=t.needReadable;return f("need readable",n),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&L(this)),null!==r&&this.emit("data",r),r;},j.prototype._read=function(e){E(this,new g("_read()"));},j.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);}n.pipesCount+=1,f("pipe count=%d opts=%j",n.pipesCount,t);var s=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?l:m;function o(t,i){f("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f("cleanup"),e.removeListener("close",_),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),r.removeListener("end",l),r.removeListener("end",m),r.removeListener("data",c),h=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u());}function l(){f("onend"),e.end();}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",o);var u=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,F(e));};}(r);e.on("drain",u);var h=!1;function c(t){f("ondata");var i=e.write(t);f("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==N(n.pipes,e))&&!h&&(f("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause());}function d(t){f("onerror",t),m(),e.removeListener("error",d),0===a(e,"error")&&E(e,t);}function _(){e.removeListener("finish",p),m();}function p(){f("onfinish"),e.removeListener("close",_),m();}function m(){f("unpipe"),r.unpipe(e);}return r.on("data",c),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i);}(e,"error",d),e.once("close",_),e.once("finish",p),e.emit("pipe",r),n.flowing||(f("pipe resume"),r.resume()),e;},j.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,f("on readable",n.length,n.reading),n.length?M(this):n.reading||i.nextTick(U,this))),r;},j.prototype.addListener=j.prototype.on,j.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(R,this),r;},j.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(R,this),t;},j.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t));}(this,e)),e.paused=!1,this;},j.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this;},j.prototype.wrap=function(e){var t=this,i=this._readableState,r=!1;for(var n in e.on("end",function(){if(f("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e);}t.push(null);}),e.on("data",function(n){(f("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(t.push(n)||(r=!0,e.pause()));}),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-1))throw new w(e);return this._writableState.defaultEncoding=e,this;},Object.defineProperty(j.prototype,"writableBuffer",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer();}}),Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function get(){return this._writableState.highWaterMark;}}),j.prototype._write=function(e,t,i){i(new p("_write()"));},j.prototype._writev=null,j.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1;}(this,n,r),this;},Object.defineProperty(j.prototype,"writableLength",{enumerable:!1,get:function get(){return this._writableState.length;}}),Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function get(){return void 0!==this._writableState&&this._writableState.destroyed;},set:function set(e){this._writableState&&(this._writableState.destroyed=e);}}),j.prototype.destroy=h.destroy,j.prototype._undestroy=h.undestroy,j.prototype._destroy=function(e,t){t(e);};}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{"../errors":49,"./_stream_duplex":50,"./internal/streams/destroy":57,"./internal/streams/state":61,"./internal/streams/stream":62,_process:158,buffer:66,inherits:136,"util-deprecate":197}],55:[function(e,t,i){(function(i){"use strict";var r;function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e;}var a=e("./end-of-stream"),s=Symbol("lastResolve"),o=Symbol("lastReject"),l=Symbol("error"),f=Symbol("ended"),u=Symbol("lastPromise"),h=Symbol("handlePromise"),c=Symbol("stream");function d(e,t){return{value:e,done:t};}function _(e){var t=e[s];if(null!==t){var i=e[c].read();null!==i&&(e[u]=null,e[s]=null,e[o]=null,t(d(i,!1)));}}function p(e){i.nextTick(_,e);}var m=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((n(r={get stream(){return this[c];},next:function next(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[c].destroyed)return new Promise(function(t,r){i.nextTick(function(){e[l]?r(e[l]):t(d(void 0,!0));});});var r,n=this[u];if(n)r=new Promise(function(e,t){return function(i,r){e.then(function(){t[f]?i(d(void 0,!0)):t[h](i,r);},r);};}(n,this));else{var a=this[c].read();if(null!==a)return Promise.resolve(d(a,!1));r=new Promise(this[h]);}return this[u]=r,r;}},Symbol.asyncIterator,function(){return this;}),n(r,"return",function(){var e=this;return new Promise(function(t,i){e[c].destroy(null,function(e){e?i(e):t(d(void 0,!0));});});}),r),m);t.exports=function(e){var t,i=Object.create(b,(n(t={},c,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,o,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,f,{value:e._readableState.endEmitted,writable:!0}),n(t,h,{value:function value(e,t){var r=i[c].read();r?(i[u]=null,i[s]=null,i[o]=null,e(d(r,!1))):(i[s]=e,i[o]=t);},writable:!0}),t));return i[u]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=i[o];return null!==t&&(i[u]=null,i[s]=null,i[o]=null,t(e)),void(i[l]=e);}var r=i[s];null!==r&&(i[u]=null,i[s]=null,i[o]=null,r(d(void 0,!0))),i[f]=!0;}),e.on("readable",p.bind(null,i)),i;};}).call(this,e("_process"));},{"./end-of-stream":58,_process:158}],56:[function(e,t,i){"use strict";function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable;})),i.push.apply(i,r);}return i;}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e;}function a(e,t){for(var i=0;i0?this.tail.next=t:this.head=t,this.tail=t,++this.length;}},{key:"unshift",value:function value(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length;}},{key:"shift",value:function value(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e;}}},{key:"clear",value:function value(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function value(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;){i+=e+t.data;}return i;}},{key:"concat",value:function value(e){if(0===this.length)return s.alloc(0);for(var t,i,r,n=s.allocUnsafe(e>>>0),a=this.head,o=0;a;){t=a.data,i=n,r=o,s.prototype.copy.call(t,i,r),o+=a.data.length,a=a.next;}return n;}},{key:"consume",value:function value(e,t){var i;return en.length?n.length:e;if(a===n.length?r+=n:r+=n.slice(0,e),0==(e-=a)){a===n.length?(++i,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(a));break;}++i;}return this.length-=i,r;}},{key:"_getBuffer",value:function value(e){var t=s.allocUnsafe(e),i=this.head,r=1;for(i.data.copy(t),e-=i.data.length;i=i.next;){var n=i.data,a=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,a),0==(e-=a)){a===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(a));break;}++r;}return this.length-=r,t;}},{key:l,value:function value(e,t){return o(this,function(e){for(var t=1;t0,function(e){r||(r=e),e&&s.forEach(f),a||(s.forEach(f),n(r));});});return t.reduce(u);};},{"../../../errors":49,"./end-of-stream":58}],61:[function(e,t,i){"use strict";var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function getHighWaterMark(e,t,i,n){var a=function(e,t,i){return null!=e.highWaterMark?e.highWaterMark:t?e[i]:null;}(t,n,i);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(n?i:"highWaterMark",a);return Math.floor(a);}return e.objectMode?16:16384;}};},{"../../../errors":49}],62:[function(e,t,i){t.exports=e("events").EventEmitter;},{events:104}],63:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js"),i.finished=e("./lib/internal/streams/end-of-stream.js"),i.pipeline=e("./lib/internal/streams/pipeline.js");},{"./lib/_stream_duplex.js":50,"./lib/_stream_passthrough.js":51,"./lib/_stream_readable.js":52,"./lib/_stream_transform.js":53,"./lib/_stream_writable.js":54,"./lib/internal/streams/end-of-stream.js":58,"./lib/internal/streams/pipeline.js":60}],64:[function(e,t,i){arguments[4][20][0].apply(i,arguments);},{dup:20}],65:[function(e,t,i){(function(e){t.exports=function(t,i){for(var r=Math.min(t.length,i.length),n=new e(r),a=0;a * @license MIT - */"use strict";var r=e("base64-js"),n=e("ieee754");i.Buffer=t,i.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e);},i.INSPECT_MAX_BYTES=50;function a(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=new Uint8Array(e);return i.__proto__=t.prototype,i;}function t(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e);}return s(e,t,i);}function s(e,i,r){if("string"==typeof e)return function(e,i){"string"==typeof i&&""!==i||(i="utf8");if(!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var r=0|c(e,i),n=a(r),s=n.write(e,i);s!==r&&(n=n.slice(0,s));return n;}(e,i);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof(e));if(L(e,ArrayBuffer)||e&&L(e.buffer,ArrayBuffer))return function(e,i,r){if(i<0||e.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e;}function c(e,i){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||L(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+_typeof(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var a=!1;;){switch(i){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(a)return n?-1:D(e).length;i=(""+i).toLowerCase(),a=!0;}}}function h(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;){switch(e){case"hex":return T(this,t,i);case"utf8":case"utf-8":return C(this,t,i);case"ascii":return S(this,t,i);case"latin1":case"binary":return j(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0;}}}function d(e,t,i){var r=e[t];e[t]=e[i],e[i]=r;}function _(e,i,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),B(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1;}else if(r<0){if(!a)return-1;r=0;}if("string"==typeof i&&(i=t.from(i,n)),t.isBuffer(i))return 0===i.length?-1:p(e,i,r,n,a);if("number"==typeof i)return i&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,i,r):Uint8Array.prototype.lastIndexOf.call(e,i,r):p(e,[i],r,n,a);throw new TypeError("val must be string, number or Buffer");}function p(e,t,i,r,n){var a,s=1,o=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,l/=2,i/=2;}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s);}if(n){var u=-1;for(a=i;ao&&(i=o-l),a=i;a>=0;a--){for(var c=!0,h=0;hn&&(r=n):r=n;var a=t.length;r>a/2&&(r=a/2);for(var s=0;s>8,n=i%256,a.push(n),a.push(r);}return a;}(t,e.length-i),e,i,r);}function E(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i));}function C(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n239?4:f>223?3:f>191?2:1;if(n+c<=i)switch(c){case 1:f<128&&(u=f);break;case 2:128==(192&(a=e[n+1]))&&(l=(31&f)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],s=e[n+2],128==(192&a)&&128==(192&s)&&(l=(15&f)<<12|(63&a)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],s=e[n+2],o=e[n+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(l=(15&f)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&l<1114112&&(u=l);}null===u?(u=65533,c=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=c;}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var i="",r=0;for(;rt&&(e+=" ... "),"";},t.prototype.compare=function(e,i,r,n,a){if(L(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_typeof(e));if(void 0===i&&(i=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),i<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&i>=r)return 0;if(n>=a)return-1;if(i>=r)return 1;if(this===e)return 0;for(var s=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(i>>>=0),l=Math.min(s,o),f=this.slice(n,a),u=e.slice(i,r),c=0;c>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0);}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;){switch(r){case"hex":return m(this,e,t,i);case"utf8":case"utf-8":return b(this,e,t,i);case"ascii":return v(this,e,t,i);case"latin1":case"binary":return y(this,e,t,i);case"base64":return g(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0;}}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)};};function S(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;nr)&&(i=r);for(var n="",a=t;ai)throw new RangeError("Trying to access beyond buffer length");}function M(e,i,r,n,a,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>a||ie.length)throw new RangeError("Index out of range");}function k(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range");}function P(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,4),n.write(e,t,i,r,23,4),i+4;}function I(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,8),n.write(e,t,i,r,52,8),i+8;}t.prototype.slice=function(e,i){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(i=void 0===i?r:~~i)<0?(i+=r)<0&&(i=0):i>r&&(i=r),i>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);){r+=this[e+--t]*n;}return r;},t.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e];},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8;},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1];},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3];},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3]);},t.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a=(n*=128)&&(r-=Math.pow(2,8*t)),r;},t.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=t,n=1,a=this[e+--r];r>0&&(n*=256);){a+=this[e+--r]*n;}return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a;},t.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e];},t.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i;},t.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i;},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24;},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3];},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!0,23,4);},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!1,23,4);},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!0,52,8);},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!1,52,8);},t.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t>>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);){this[t+n]=e/a&255;}return t+i;},t.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,255,0),this[t]=255&e,t+1;},t.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2;},t.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2;},t.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4;},t.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4;},t.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n);}var a=0,s=1,o=0;for(this[t]=255&e;++a>0)-o&255;}return t+i;},t.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n);}var a=i-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);){e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;}return t+i;},t.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1;},t.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2;},t.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2;},t.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4;},t.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4;},t.prototype.writeFloatLE=function(e,t,i){return P(this,e,t,!0,i);},t.prototype.writeFloatBE=function(e,t,i){return P(this,e,t,!1,i);},t.prototype.writeDoubleLE=function(e,t,i){return I(this,e,t,!0,i);},t.prototype.writeDoubleBE=function(e,t,i){return I(this,e,t,!1,i);},t.prototype.copy=function(e,i,r,n){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),i>=e.length&&(i=e.length),i||(i=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-i=0;--s){e[s+i]=this[s+r];}else Uint8Array.prototype.set.call(e,this.subarray(r,n),i);return a;},t.prototype.fill=function(e,i,r,n){if("string"==typeof e){if("string"==typeof i?(n=i,i=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var a=e.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(e=a);}}else"number"==typeof e&&(e&=255);if(i<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=i;s55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue;}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue;}n=i;continue;}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue;}i=65536+(n-55296<<10|i-56320);}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i);}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128);}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128);}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128);}}return a;}function F(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;){e+="=";}return e;}(e));}function O(e,t,i,r){for(var n=0;n=t.length||n>=e.length);++n){t[n+i]=e[n];}return n;}function L(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name;}function B(e){return e!=e;}}).call(this,e("buffer").Buffer);},{"base64-js":17,buffer:66,ieee754:135}],67:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("stream").Transform,a=e("string_decoder").StringDecoder;function s(e){n.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;}e("inherits")(s,n),s.prototype.update=function(e,t,i){"string"==typeof e&&(e=r.from(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n);},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state");},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state");},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state");},s.prototype._transform=function(e,t,i){var r;try{this.hashMode?this._update(e):this.push(this._update(e));}catch(e){r=e;}finally{i(r);}},s.prototype._flush=function(e){var t;try{this.push(this.__final());}catch(e){t=e;}e(t);},s.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t;},s.prototype._toString=function(e,t,i){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return i&&(r+=this._decoder.end()),r;},t.exports=s;},{inherits:136,"safe-buffer":184,stream:194,string_decoder:195}],68:[function(e,t,i){(function(e){function t(e){return Object.prototype.toString.call(e);}i.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e);},i.isBoolean=function(e){return"boolean"==typeof e;},i.isNull=function(e){return null===e;},i.isNullOrUndefined=function(e){return null==e;},i.isNumber=function(e){return"number"==typeof e;},i.isString=function(e){return"string"==typeof e;},i.isSymbol=function(e){return"symbol"==_typeof(e);},i.isUndefined=function(e){return void 0===e;},i.isRegExp=function(e){return"[object RegExp]"===t(e);},i.isObject=function(e){return"object"==_typeof(e)&&null!==e;},i.isDate=function(e){return"[object Date]"===t(e);},i.isError=function(e){return"[object Error]"===t(e)||e instanceof Error;},i.isFunction=function(e){return"function"==typeof e;},i.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==_typeof(e)||void 0===e;},i.isBuffer=e.isBuffer;}).call(this,{isBuffer:e("../../is-buffer/index.js")});},{"../../is-buffer/index.js":137}],69:[function(e,t,i){(function(i){var r=e("elliptic"),n=e("bn.js");t.exports=function(e){return new s(e);};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0;}function o(e,t,r){Array.isArray(e)||(e=e.toArray());var n=new i(e);if(r&&n.lengthi)?t=("rmd160"===e?new l():f(e)).update(t).digest():t.length64?t=e(t):t.length<64&&(t=n.concat([t,s],64));for(var i=this._ipad=n.allocUnsafe(64),r=this._opad=n.allocUnsafe(64),o=0;o<64;o++){i[o]=54^t[o],r[o]=92^t[o];}this._hash=[i];}r(o,a),o.prototype._update=function(e){this._hash.push(e);},o.prototype._final=function(){var e=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,e]));},t.exports=o;},{"cipher-base":67,inherits:136,"safe-buffer":184}],75:[function(e,t,i){"use strict";i.randomBytes=i.rng=i.pseudoRandomBytes=i.prng=e("randombytes"),i.createHash=i.Hash=e("create-hash"),i.createHmac=i.Hmac=e("create-hmac");var r=e("browserify-sign/algos"),n=Object.keys(r),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);i.getHashes=function(){return a;};var s=e("pbkdf2");i.pbkdf2=s.pbkdf2,i.pbkdf2Sync=s.pbkdf2Sync;var o=e("browserify-cipher");i.Cipher=o.Cipher,i.createCipher=o.createCipher,i.Cipheriv=o.Cipheriv,i.createCipheriv=o.createCipheriv,i.Decipher=o.Decipher,i.createDecipher=o.createDecipher,i.Decipheriv=o.Decipheriv,i.createDecipheriv=o.createDecipheriv,i.getCiphers=o.getCiphers,i.listCiphers=o.listCiphers;var l=e("diffie-hellman");i.DiffieHellmanGroup=l.DiffieHellmanGroup,i.createDiffieHellmanGroup=l.createDiffieHellmanGroup,i.getDiffieHellman=l.getDiffieHellman,i.createDiffieHellman=l.createDiffieHellman,i.DiffieHellman=l.DiffieHellman;var f=e("browserify-sign");i.createSign=f.createSign,i.Sign=f.Sign,i.createVerify=f.createVerify,i.Verify=f.Verify,i.createECDH=e("create-ecdh");var u=e("public-encrypt");i.publicEncrypt=u.publicEncrypt,i.privateEncrypt=u.privateEncrypt,i.publicDecrypt=u.publicDecrypt,i.privateDecrypt=u.privateDecrypt;var c=e("randomfill");i.randomFill=c.randomFill,i.randomFillSync=c.randomFillSync,i.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"));},i.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":38,"browserify-sign":46,"browserify-sign/algos":43,"create-ecdh":69,"create-hash":71,"create-hmac":73,"diffie-hellman":82,pbkdf2:151,"public-encrypt":159,randombytes:166,randomfill:167}],76:[function(e,t,i){"use strict";i.utils=e("./des/utils"),i.Cipher=e("./des/cipher"),i.DES=e("./des/des"),i.CBC=e("./des/cbc"),i.EDE=e("./des/ede");},{"./des/cbc":77,"./des/cipher":78,"./des/des":79,"./des/ede":80,"./des/utils":81}],77:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a={};function s(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t0;r--){t+=this._buffer(e,t),i+=this._flushBuffer(n,i);}return t+=this._buffer(e,t),n;},n.prototype["final"]=function(e){var t,i;return e&&(t=this.update(e)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(i):i;},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];i=a.r28shl(i,o),n=a.r28shl(n,o),a.pc2(i,n,e.keys,s);}},l.prototype._update=function(e,t,i,r){var n=this._desState,s=a.readUInt32BE(e,t),o=a.readUInt32BE(e,t+4);a.ip(s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,s,o,n.tmp,0):this._decrypt(n,s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],a.writeUInt32BE(i,s,r),a.writeUInt32BE(i,o,r+4);},l.prototype._pad=function(e,t){for(var i=e.length-t,r=t;r>>0,s=h;}a.rip(o,s,r,n);},l.prototype._decrypt=function(e,t,i,r,n){for(var s=i,o=t,l=e.keys.length-2;l>=0;l-=2){var f=e.keys[l],u=e.keys[l+1];a.expand(s,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1];var c=a.substitute(f,u),h=s;s=(o^a.permute(c))>>>0,o=h;}a.rip(s,o,r,n);};},{"./cipher":78,"./utils":81,inherits:136,"minimalistic-assert":142}],80:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a=e("./cipher"),s=e("./des");function o(e,t){r.equal(t.length,24,"Invalid key length");var i=t.slice(0,8),n=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i})];}function l(e){a.call(this,e);var t=new o(this.type,this.options.key);this._edeState=t;}n(l,a),t.exports=l,l.create=function(e){return new l(e);},l.prototype._update=function(e,t,i,r){var n=this._edeState;n.ciphers[0]._update(e,t,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r);},l.prototype._pad=s.prototype._pad,l.prototype._unpad=s.prototype._unpad;},{"./cipher":78,"./des":79,inherits:136,"minimalistic-assert":142}],81:[function(e,t,i){"use strict";i.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0;},i.writeUInt32BE=function(e,t,i){e[0+i]=t>>>24,e[1+i]=t>>>16&255,e[2+i]=t>>>8&255,e[3+i]=255&t;},i.ip=function(e,t,i,r){for(var n=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8){n<<=1,n|=t>>>o+s&1;}for(o=0;o<=24;o+=8){n<<=1,n|=e>>>o+s&1;}}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8){a<<=1,a|=t>>>o+s&1;}for(o=1;o<=25;o+=8){a<<=1,a|=e>>>o+s&1;}}i[r+0]=n>>>0,i[r+1]=a>>>0;},i.rip=function(e,t,i,r){for(var n=0,a=0,s=0;s<4;s++){for(var o=24;o>=0;o-=8){n<<=1,n|=t>>>o+s&1,n<<=1,n|=e>>>o+s&1;}}for(s=4;s<8;s++){for(o=24;o>=0;o-=8){a<<=1,a|=t>>>o+s&1,a<<=1,a|=e>>>o+s&1;}}i[r+0]=n>>>0,i[r+1]=a>>>0;},i.pc1=function(e,t,i,r){for(var n=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8){n<<=1,n|=t>>o+s&1;}for(o=0;o<=24;o+=8){n<<=1,n|=e>>o+s&1;}}for(o=0;o<=24;o+=8){n<<=1,n|=t>>o+s&1;}for(s=1;s<=3;s++){for(o=0;o<=24;o+=8){a<<=1,a|=t>>o+s&1;}for(o=0;o<=24;o+=8){a<<=1,a|=e>>o+s&1;}}for(o=0;o<=24;o+=8){a<<=1,a|=e>>o+s&1;}i[r+0]=n>>>0,i[r+1]=a>>>0;},i.r28shl=function(e,t){return e<>>28-t;};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];i.pc2=function(e,t,i,n){for(var a=0,s=0,o=r.length>>>1,l=0;l>>r[l]&1;}for(l=o;l>>r[l]&1;}i[n+0]=a>>>0,i[n+1]=s>>>0;},i.expand=function(e,t,i){var r=0,n=0;r=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4){r<<=6,r|=e>>>a&63;}for(a=11;a>=3;a-=4){n|=e>>>a&63,n<<=6;}n|=(31&e)<<1|e>>>31,t[i+0]=r>>>0,t[i+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];i.substitute=function(e,t){for(var i=0,r=0;r<4;r++){i<<=4,i|=n[64*r+(e>>>18-6*r&63)];}for(r=0;r<4;r++){i<<=4,i|=n[256+64*r+(t>>>18-6*r&63)];}return i>>>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];i.permute=function(e){for(var t=0,i=0;i>>a[i]&1;}return t>>>0;},i.padSplit=function(e,t,i){for(var r=e.toString(2);r.lengthe;){i.ishrn(1);}if(i.isEven()&&i.iadd(o),i.testn(1)||i.iadd(l),t.cmp(l)){if(!t.cmp(f))for(;i.mod(u).cmp(c);){i.iadd(d);}}else for(;i.mod(a).cmp(h);){i.iadd(d);}if(m(_=i.shrn(1))&&m(i)&&b(_)&&b(i)&&s.test(_)&&s.test(i))return i;}}},{"bn.js":86,"miller-rabin":140,randombytes:166}],85:[function(e,t,i){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"}};},{}],86:[function(e,t,i){arguments[4][16][0].apply(i,arguments);},{buffer:20,dup:16}],87:[function(e,t,i){"use strict";var r=i;r.version=e("../package.json").version,r.utils=e("./elliptic/utils"),r.rand=e("brorand"),r.curve=e("./elliptic/curve"),r.curves=e("./elliptic/curves"),r.ec=e("./elliptic/ec"),r.eddsa=e("./elliptic/eddsa");},{"../package.json":103,"./elliptic/curve":90,"./elliptic/curves":93,"./elliptic/ec":94,"./elliptic/eddsa":97,"./elliptic/utils":101,brorand:19}],88:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.getNAF,s=n.getJSF,o=n.assert;function l(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red));}function f(e,t){this.curve=e,this.type=t,this.precomputed=null;}t.exports=l,l.prototype.point=function(){throw new Error("Not implemented");},l.prototype.validate=function(){throw new Error("Not implemented");},l.prototype._fixedNafMul=function(e,t){o(e.precomputed);var i=e._getDoubles(),r=a(t,1,this._bitLength),n=(1<=l;t--){f=(f<<1)+r[t];}s.push(f);}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),h=n;h>0;h--){for(l=0;l=0;f--){for(t=0;f>=0&&0===s[f];f--){t++;}if(f>=0&&t++,l=l.dblp(t),f<0)break;var u=s[f];o(0!==u),l="affine"===e.type?u>0?l.mixedAdd(n[u-1>>1]):l.mixedAdd(n[-u-1>>1].neg()):u>0?l.add(n[u-1>>1]):l.add(n[-u-1>>1].neg());}return"affine"===e.type?l.toP():l;},l.prototype._wnafMulAdd=function(e,t,i,r,n){for(var o=this._wnafT1,l=this._wnafT2,f=this._wnafT3,u=0,c=0;c=1;c-=2){var d=c-1,_=c;if(1===o[d]&&1===o[_]){var p=[t[d],null,null,t[_]];0===t[d].y.cmp(t[_].y)?(p[1]=t[d].add(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg())):0===t[d].y.cmp(t[_].y.redNeg())?(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].add(t[_].neg())):(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],b=s(i[d],i[_]);u=Math.max(b[0].length,u),f[d]=new Array(u),f[_]=new Array(u);for(var v=0;v=0;c--){for(var C=0;c>=0;){var S=!0;for(v=0;v=0&&C++,w=w.dblp(C),c<0)break;for(v=0;v0?j=l[v][T-1>>1]:T<0&&(j=l[v][-T-1>>1].neg()),w="affine"===j.type?w.mixedAdd(j):w.add(j));}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step);},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n":"";},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c));},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),s=a.redSub(i),o=r.redSub(t),l=n.redMul(s),f=a.redMul(o),u=n.redMul(o),c=s.redMul(a);return this.curve.point(l,f,c,u);},f.prototype._projDbl=function(){var e,t,i,r=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var s=(f=this.curve._mulA(n)).redAdd(a);if(this.zOne)e=r.redSub(n).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(f.redSub(a)),i=s.redSqr().redSub(s).redSub(s);else{var o=this.z.redSqr(),l=s.redSub(o).redISub(o);e=r.redSub(n).redISub(a).redMul(l),t=s.redMul(f.redSub(a)),i=s.redMul(l);}}else{var f=n.redAdd(a);o=this.curve._mulC(this.z).redSqr(),l=f.redSub(o).redSub(o);e=this.curve._mulC(r.redISub(f)).redMul(l),t=this.curve._mulC(f).redMul(n.redISub(a)),i=f.redMul(l);}return this.curve.point(e,t,i);},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl();},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=i.redSub(t),s=n.redSub(r),o=n.redAdd(r),l=i.redAdd(t),f=a.redMul(s),u=o.redMul(l),c=a.redMul(l),h=s.redMul(o);return this.curve.point(f,u,h,c);},f.prototype._projAdd=function(e){var t,i,r=this.z.redMul(e.z),n=r.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(s),l=n.redSub(o),f=n.redAdd(o),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),c=r.redMul(l).redMul(u);return this.curve.twisted?(t=r.redMul(f).redMul(s.redSub(this.curve._mulA(a))),i=l.redMul(f)):(t=r.redMul(f).redMul(s.redSub(a)),i=this.curve._mulC(l).redMul(f)),this.curve.point(c,t,i);},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e);},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e);},f.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1);},f.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0);},f.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;},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg());},f.prototype.getX=function(){return this.normalize(),this.x.fromRed();},f.prototype.getY=function(){return this.normalize(),this.y.fromRed();},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY());},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0;}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add;},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],90:[function(e,t,i){"use strict";var r=i;r.base=e("./base"),r["short"]=e("./short"),r.mont=e("./mont"),r.edwards=e("./edwards");},{"./base":88,"./edwards":89,"./mont":91,"./short":92}],91:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("inherits"),a=e("./base"),s=e("../utils");function o(e){a.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two));}function l(e,t,i){a.BasePoint.call(this,e,"projective"),null===t&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)));}n(o,a),t.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),r=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r);},n(l,a.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1);},o.prototype.point=function(e,t){return new l(this,e,t);},o.prototype.pointFromJSON=function(e){return l.fromJSON(this,e);},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength());},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one);},l.prototype.inspect=function(){return this.isInfinity()?"":"";},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0);},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),r=e.redMul(t),n=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n);},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve");},l.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(i),s=n.redMul(r),o=t.z.redMul(a.redAdd(s).redSqr()),l=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,l);},l.prototype.mul=function(e){for(var t=e.clone(),i=this,r=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1)){n.push(t.andln(1));}for(var a=n.length-1;a>=0;a--){0===n[a]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());}return r;},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve");},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve");},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX());},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this;},l.prototype.getX=function(){return this.normalize(),this.x.fromRed();};},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],92:[function(e,t,i){"use strict";var r=e("../utils"),n=e("bn.js"),a=e("inherits"),s=e("./base"),o=r.assert;function l(e){s.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=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 f(e,t,i,r){s.BasePoint.call(this,e,"affine"),null===t&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(i,16),r&&(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 u(e,t,i,r){s.BasePoint.call(this,e,"jacobian"),null===t&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(i,16),this.z=new n(r,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;}a(l,s),t.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,i;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red);}if(e.lambda)i=new n(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?i=a[0]:(i=a[1],o(0===this.g.mul(i).x.cmp(this.g.x.redMul(t))));}return{beta:t,lambda:i,basis:e.basis?e.basis.map(function(e){return{a:new n(e.a,16),b:new n(e.b,16)};}):this._getEndoBasis(i)};}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),i=new n(2).toRed(t).redInvm(),r=i.redNeg(),a=new n(3).toRed(t).redNeg().redSqrt().redMul(i);return[r.redAdd(a).fromRed(),r.redSub(a).fromRed()];},l.prototype._getEndoBasis=function(e){for(var t,i,r,a,s,o,l,f,u,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),_=new n(1),p=new n(0),m=new n(0),b=new n(1),v=0;0!==h.cmpn(0);){var y=d.div(h);f=d.sub(y.mul(h)),u=m.sub(y.mul(_));var g=b.sub(y.mul(p));if(!r&&f.cmp(c)<0)t=l.neg(),i=_,r=f.neg(),a=u;else if(r&&2==++v)break;l=f,d=h,h=f,m=_,_=u,b=p,p=g;}s=f.neg(),o=u;var w=r.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(w)>=0&&(s=t,o=i),r.negative&&(r=r.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:r,b:a},{a:s,b:o}];},l.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],r=t[1],n=r.b.mul(e).divRound(this.n),a=i.b.neg().mul(e).divRound(this.n),s=n.mul(i.a),o=a.mul(r.a),l=n.mul(i.b),f=a.mul(r.b);return{k1:e.sub(s).sub(o),k2:l.add(f).neg()};},l.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r);},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,r=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0);},l.prototype._endoWnafMulAdd=function(e,t,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,a=0;a":"";},f.prototype.isInfinity=function(){return this.inf;},f.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 i=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r);},f.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,i=this.x.redSqr(),r=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(r),a=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s);},f.prototype.getX=function(){return this.x.fromRed();},f.prototype.getY=function(){return this.y.fromRed();},f.prototype.mul=function(e){return e=new n(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e);},f.prototype.mulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2);},f.prototype.jmulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0);},f.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));},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,r=function r(e){return e.neg();};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}};}return t;},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one);},a(u,s.BasePoint),l.prototype.jpoint=function(e,t,i){return new u(this,e,t,i);},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(i,r);},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z);},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(i),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(i.redMul(this.z)),o=r.redSub(n),l=a.redSub(s);if(0===o.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),c=r.redMul(f),h=l.redSqr().redIAdd(u).redISub(c).redISub(c),d=l.redMul(c.redISub(h)).redISub(a.redMul(u)),_=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(h,d,_);},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,r=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),s=i.redSub(r),o=n.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),f=l.redMul(s),u=i.redMul(l),c=o.redSqr().redIAdd(f).redISub(u).redISub(u),h=o.redMul(u.redISub(c)).redISub(n.redMul(f)),d=this.z.redMul(s);return this.curve.jpoint(c,h,d);},u.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,i=0;i=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0;}},u.prototype.inspect=function(){return this.isInfinity()?"":"";},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0);};},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],93:[function(e,t,i){"use strict";var r,n=i,a=e("hash.js"),s=e("./curve"),o=e("./utils").assert;function l(e){"short"===e.type?this.curve=new s["short"](e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O");}function f(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function get(){var i=new l(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:i}),i;}});}n.PresetCurve=l,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=e("./precomputed/secp256k1");}catch(e){r=void 0;}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]});},{"./curve":90,"./precomputed/secp256k1":100,"./utils":101,"hash.js":122}],94:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("hmac-drbg"),a=e("../utils"),s=e("../curves"),o=e("brorand"),l=a.assert,f=e("./key"),u=e("./signature");function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(l(s.hasOwnProperty(e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash;}t.exports=c,c.prototype.keyPair=function(e){return new f(this,e);},c.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t);},c.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t);},c.prototype.genKeyPair=function(e){e||(e={});for(var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),a=this.n.sub(new r(2));;){var s=new r(t.generate(i));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s);}},c.prototype._truncateToN=function(e,t){var i=8*e.byteLength()-this.n.bitLength();return i>0&&(e=e.ushrn(i)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e;},c.prototype.sign=function(e,t,i,a){"object"==_typeof(i)&&(a=i,i=null),a||(a={}),t=this.keyFromPrivate(t,i),e=this._truncateToN(new r(e,16));for(var s=this.n.byteLength(),o=t.getPrivate().toArray("be",s),l=e.toArray("be",s),f=new n({hash:this.hash,entropy:o,nonce:l,pers:a.pers,persEnc:a.persEnc||"utf8"}),c=this.n.sub(new r(1)),h=0;;h++){var d=a.k?a.k(h):new r(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(c)>=0)){var _=this.g.mul(d);if(!_.isInfinity()){var p=_.getX(),m=p.umod(this.n);if(0!==m.cmpn(0)){var b=d.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(_.getY().isOdd()?1:0)|(0!==p.cmp(m)?2:0);return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new u({r:m,s:b,recoveryParam:v});}}}}}},c.prototype.verify=function(e,t,i,n){e=this._truncateToN(new r(e,16)),i=this.keyFromPublic(i,n);var a=(t=new u(t,"hex")).r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,l=s.invm(this.n),f=l.mul(e).umod(this.n),c=l.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(f,i.getPublic(),c)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(f,i.getPublic(),c)).isInfinity()&&0===o.getX().umod(this.n).cmp(a);},c.prototype.recoverPubKey=function(e,t,i,n){l((3&i)===i,"The recovery param is more than two bits"),t=new u(t,n);var a=this.n,s=new r(e),o=t.r,f=t.s,c=1&i,h=i>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");o=h?this.curve.pointFromX(o.add(this.curve.n),c):this.curve.pointFromX(o,c);var d=t.r.invm(a),_=a.sub(s).mul(d).umod(a),p=f.mul(d).umod(a);return this.g.mulAdd(_,o,p);},c.prototype.getKeyRecoveryParam=function(e,t,i,r){if(null!==(t=new u(t,r)).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(i))return n;}throw new Error("Unable to find valid recovery factor");};},{"../curves":93,"../utils":101,"./key":95,"./signature":96,"bn.js":102,brorand:19,"hmac-drbg":134}],95:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils").assert;function a(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);}t.exports=a,a.fromPublic=function(e,t,i){return t instanceof a?t:new a(e,{pub:t,pubEnc:i});},a.fromPrivate=function(e,t,i){return t instanceof a?t:new a(e,{priv:t,privEnc:i});},a.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"};},a.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;},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv;},a.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n);},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(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);},a.prototype.derive=function(e){return e.mul(this.priv).getX();},a.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i);},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this);},a.prototype.inspect=function(){return"";};},{"../utils":101,"bn.js":102}],96:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(a(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam);}function o(){this.place=0;}function l(e,t){var i=e[t.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,a=0,s=t.place;a>>=0;}return!(n<=127)&&(t.place=s,n);}function f(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|i);--i;){e.push(t>>>(i<<3)&255);}e.push(t);}}t.exports=s,s.prototype._importDER=function(e,t){e=n.toArray(e,t);var i=new o();if(48!==e[i.place++])return!1;var a=l(e,i);if(!1===a)return!1;if(a+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var s=l(e,i);if(!1===s)return!1;var f=e.slice(i.place,s+i.place);if(i.place+=s,2!==e[i.place++])return!1;var u=l(e,i);if(!1===u)return!1;if(e.length!==u+i.place)return!1;var c=e.slice(i.place,u+i.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1);}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1);}return this.r=new r(f),this.s=new r(c),this.recoveryParam=null,!0;},s.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&i[0]&&(i=[0].concat(i)),t=f(t),i=f(i);!(i[0]||128&i[1]);){i=i.slice(1);}var r=[2];u(r,t.length),(r=r.concat(t)).push(2),u(r,i.length);var a=r.concat(i),s=[48];return u(s,a.length),s=s.concat(a),n.encode(s,e);};},{"../utils":101,"bn.js":102}],97:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("../curves"),a=e("../utils"),s=a.assert,o=a.parseBytes,l=e("./key"),f=e("./signature");function u(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=n[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512;}t.exports=u,u.prototype.sign=function(e,t){e=o(e);var i=this.keyFromSecret(t),r=this.hashInt(i.messagePrefix(),e),n=this.g.mul(r),a=this.encodePoint(n),s=this.hashInt(a,i.pubBytes(),e).mul(i.priv()),l=r.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:l,Rencoded:a});},u.prototype.verify=function(e,t,i){e=o(e),t=this.makeSignature(t);var r=this.keyFromPublic(i),n=this.hashInt(t.Rencoded(),r.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(r.pub().mul(n)).eq(a);},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(n>>1)-1?(n>>1)-l:l,a.isubn(o)):o=0,r[s]=o,a.iushrn(1);}return r;},r.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var r=0,n=0;e.cmpn(-r)>0||t.cmpn(-n)>0;){var a,s,o,l=e.andln(3)+r&3,f=t.andln(3)+n&3;if(3===l&&(l=-1),3===f&&(f=-1),0==(1&l))a=0;else a=3!==(o=e.andln(7)+r&7)&&5!==o||2!==f?l:-l;if(i[0].push(a),0==(1&f))s=0;else s=3!==(o=t.andln(7)+n&7)&&5!==o||2!==l?f:-f;i[1].push(s),2*r===a+1&&(r=1-r),2*n===s+1&&(n=1-n),e.iushrn(1),t.iushrn(1);}return i;},r.cachedProperty=function(e,t,i){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this);};},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e;},r.intFromLE=function(e){return new n(e,"hex","le");};},{"bn.js":102,"minimalistic-assert":142,"minimalistic-crypto-utils":143}],102:[function(e,t,i){arguments[4][16][0].apply(i,arguments);},{buffer:20,dup:16}],103:[function(e,t,i){t.exports={_args:[["elliptic@6.5.3","/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer"]],_from:"elliptic@6.5.3",_id:"elliptic@6.5.3",_inBundle:!1,_integrity:"sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.5.3",name:"elliptic",escapedName:"elliptic",rawSpec:"6.5.3",saveSpec:null,fetchSpec:"6.5.3"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",_spec:"6.5.3",_where:"/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},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"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^3.0.8",grunt:"^1.0.4","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":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.10.3",mocha:"^6.2.2"},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.5.3"};},{}],104:[function(e,t,i){var r=Object.create||function(e){var t=function t(){};return t.prototype=e,new t();},n=Object.keys||function(e){var t=[];for(var i in e){Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);}return i;},a=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments);};};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var o,l=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),o=0===f.x;}catch(e){o=!1;}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners;}function c(e,t,i){if(t)e.call(i);else for(var r=e.length,n=w(e,r),a=0;a0&&o.length>a){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,"object"==(typeof console==="undefined"?"undefined":_typeof(console))&&console.warn&&(l.name,l.message);}}else o=s[t]=i,++e._eventsCount;return e;}function b(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l;}if(!(i=s[e]))return!1;var f="function"==typeof i;switch(r=arguments.length){case 1:c(i,f,this);break;case 2:h(i,f,this,arguments[1]);break;case 3:d(i,f,this,arguments[1],arguments[2]);break;case 4:_(i,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),a=1;a=0;s--){if(i[s]===t||i[s].listener===t){o=i[s].listener,a=s;break;}}if(a<0)return this;0===a?i.shift():function(e,t){for(var i=t,r=i+1,n=e.length;r=0;a--){this.removeListener(e,t[a]);}return this;},s.prototype.listeners=function(e){return y(this,e,!0);},s.prototype.rawListeners=function(e){return y(this,e,!1);},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t);},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[];};},{}],105:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("md5.js");t.exports=function(e,t,i,a){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=i/8,o=r.alloc(s),l=r.alloc(a||0),f=r.alloc(0);s>0||a>0;){var u=new n();u.update(f),u.update(e),t&&u.update(t),f=u.digest();var c=0;if(s>0){var h=o.length-s;c=Math.min(s,f.length),f.copy(o,h,0,c),s-=c;}if(c0){var d=l.length-a,_=Math.min(a,f.length-c);f.copy(l,d,c,c+_),a-=_;}}return f.fill(0),{key:o,iv:l};};},{"md5.js":139,"safe-buffer":184}],106:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("readable-stream").Transform;function a(e){n.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1;}e("inherits")(a,n),a.prototype._transform=function(e,t,i){var r=null;try{this.update(e,t);}catch(e){r=e;}i(r);},a.prototype._flush=function(e){var t=null;try{this.push(this.digest());}catch(e){t=e;}e(t);},a.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer");}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var i=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var a=this._blockOffset;a0;++s){this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);}return this;},a.prototype._update=function(){throw new Error("_update is not implemented");},a.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 i=0;i<4;++i){this._length[i]=0;}return t;},a.prototype._digest=function(){throw new Error("_digest is not implemented");},t.exports=a;},{inherits:136,"readable-stream":121,"safe-buffer":184}],107:[function(e,t,i){arguments[4][49][0].apply(i,arguments);},{dup:49}],108:[function(e,t,i){arguments[4][50][0].apply(i,arguments);},{"./_stream_readable":110,"./_stream_writable":112,_process:158,dup:50,inherits:136}],109:[function(e,t,i){arguments[4][51][0].apply(i,arguments);},{"./_stream_transform":111,dup:51,inherits:136}],110:[function(e,t,i){arguments[4][52][0].apply(i,arguments);},{"../errors":107,"./_stream_duplex":108,"./internal/streams/async_iterator":113,"./internal/streams/buffer_list":114,"./internal/streams/destroy":115,"./internal/streams/from":117,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:52,events:104,inherits:136,"string_decoder/":195,util:20}],111:[function(e,t,i){arguments[4][53][0].apply(i,arguments);},{"../errors":107,"./_stream_duplex":108,dup:53,inherits:136}],112:[function(e,t,i){arguments[4][54][0].apply(i,arguments);},{"../errors":107,"./_stream_duplex":108,"./internal/streams/destroy":115,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:54,inherits:136,"util-deprecate":197}],113:[function(e,t,i){arguments[4][55][0].apply(i,arguments);},{"./end-of-stream":116,_process:158,dup:55}],114:[function(e,t,i){arguments[4][56][0].apply(i,arguments);},{buffer:66,dup:56,util:20}],115:[function(e,t,i){arguments[4][57][0].apply(i,arguments);},{_process:158,dup:57}],116:[function(e,t,i){arguments[4][58][0].apply(i,arguments);},{"../../../errors":107,dup:58}],117:[function(e,t,i){arguments[4][59][0].apply(i,arguments);},{dup:59}],118:[function(e,t,i){arguments[4][60][0].apply(i,arguments);},{"../../../errors":107,"./end-of-stream":116,dup:60}],119:[function(e,t,i){arguments[4][61][0].apply(i,arguments);},{"../../../errors":107,dup:61}],120:[function(e,t,i){arguments[4][62][0].apply(i,arguments);},{dup:62,events:104}],121:[function(e,t,i){arguments[4][63][0].apply(i,arguments);},{"./lib/_stream_duplex.js":108,"./lib/_stream_passthrough.js":109,"./lib/_stream_readable.js":110,"./lib/_stream_transform.js":111,"./lib/_stream_writable.js":112,"./lib/internal/streams/end-of-stream.js":116,"./lib/internal/streams/pipeline.js":118,dup:63}],122:[function(e,t,i){var r=i;r.utils=e("./hash/utils"),r.common=e("./hash/common"),r.sha=e("./hash/sha"),r.ripemd=e("./hash/ripemd"),r.hmac=e("./hash/hmac"),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160;},{"./hash/common":123,"./hash/hmac":124,"./hash/ripemd":125,"./hash/sha":126,"./hash/utils":133}],123:[function(e,t,i){"use strict";var r=e("./utils"),n=e("minimalistic-assert");function a(){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;}i.BlockHash=a,a.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-i,this.endian);for(var n=0;n>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e;}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,a=8;athis.blockSize&&(e=new this.Hash().update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t>>3;},i.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10;};},{"../utils":133}],133:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits");function a(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1));}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0;}function o(e){return 1===e.length?"0"+e:e;}function l(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;}i.inherits=n,i.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"==typeof e){if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>6|192,i[r++]=63&s|128):a(e,n)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++n)),i[r++]=s>>18|240,i[r++]=s>>12&63|128,i[r++]=s>>6&63|128,i[r++]=63&s|128):(i[r++]=s>>12|224,i[r++]=s>>6&63|128,i[r++]=63&s|128);}}else for(n=0;n>>0;}return s;},i.split32=function(e,t){for(var i=new Array(4*e.length),r=0,n=0;r>>24,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=255&a):(i[n+3]=a>>>24,i[n+2]=a>>>16&255,i[n+1]=a>>>8&255,i[n]=255&a);}return i;},i.rotr32=function(e,t){return e>>>t|e<<32-t;},i.rotl32=function(e,t){return e<>>32-t;},i.sum32=function(e,t){return e+t>>>0;},i.sum32_3=function(e,t,i){return e+t+i>>>0;},i.sum32_4=function(e,t,i,r){return e+t+i+r>>>0;},i.sum32_5=function(e,t,i,r,n){return e+t+i+r+n>>>0;},i.sum64=function(e,t,i,r){var n=e[t],a=r+e[t+1]>>>0,s=(a>>0,e[t+1]=a;},i.sum64_hi=function(e,t,i,r){return(t+r>>>0>>0;},i.sum64_lo=function(e,t,i,r){return t+r>>>0;},i.sum64_4_hi=function(e,t,i,r,n,a,s,o){var l=0,f=t;return l+=(f=f+r>>>0)>>0)>>0)>>0;},i.sum64_4_lo=function(e,t,i,r,n,a,s,o){return t+r+a+o>>>0;},i.sum64_5_hi=function(e,t,i,r,n,a,s,o,l,f){var u=0,c=t;return u+=(c=c+r>>>0)>>0)>>0)>>0)>>0;},i.sum64_5_lo=function(e,t,i,r,n,a,s,o,l,f){return t+r+a+o+f>>>0;},i.rotr64_hi=function(e,t,i){return(t<<32-i|e>>>i)>>>0;},i.rotr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0;},i.shr64_hi=function(e,t,i){return e>>>i;},i.shr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0;};},{inherits:136,"minimalistic-assert":142}],134:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("minimalistic-crypto-utils"),a=e("minimalistic-assert");function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex"),i=n.toArray(e.nonce,e.nonceEnc||"hex"),r=n.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,i,r);}t.exports=s,s.prototype._init=function(e,t,i){var r=e.concat(t).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1;},s.prototype.generate=function(e,t,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=i,i=t,t=null),i&&(i=n.toArray(i,r||"hex"),this._update(i));for(var a=[];a.length>1,u=-7,c=i?n-1:0,h=i?-1:1,d=e[t+c];for(c+=h,a=d&(1<<-u)-1,d>>=-u,u+=o;u>0;a=256*a+e[t+c],c+=h,u-=8){;}for(s=a&(1<<-u)-1,a>>=-u,u+=r;u>0;s=256*s+e[t+c],c+=h,u-=8){;}if(0===a)a=1-f;else{if(a===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),a-=f;}return(d?-1:1)*s*Math.pow(2,a-r);},i.write=function(e,t,i,r,n,a){var s,o,l,f=8*a-n-1,u=(1<>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,_=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+c>=1?h/l:h*Math.pow(2,1-c))*l>=2&&(s++,l/=2),s+c>=u?(o=0,s=u):s+c>=1?(o=(t*l-1)*Math.pow(2,n),s+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,n),s=0));n>=8;e[i+d]=255&o,d+=_,o/=256,n-=8){;}for(s=s<0;e[i+d]=255&s,d+=_,s/=256,f-=8){;}e[i+d-_]|=128*p;};},{}],136:[function(e,t,i){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:t.exports=function(e,t){if(t){e.super_=t;var i=function i(){};i.prototype=t.prototype,e.prototype=new i(),e.prototype.constructor=e;}};},{}],137:[function(e,t,i){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e);}/*! + */"use strict";var r=e("base64-js"),n=e("ieee754");i.Buffer=t,i.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e);},i.INSPECT_MAX_BYTES=50;function a(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=new Uint8Array(e);return i.__proto__=t.prototype,i;}function t(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e);}return s(e,t,i);}function s(e,i,r){if("string"==typeof e)return function(e,i){"string"==typeof i&&""!==i||(i="utf8");if(!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var r=0|h(e,i),n=a(r),s=n.write(e,i);s!==r&&(n=n.slice(0,s));return n;}(e,i);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof(e));if(L(e,ArrayBuffer)||e&&L(e.buffer,ArrayBuffer))return function(e,i,r){if(i<0||e.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e;}function h(e,i){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||L(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+_typeof(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var a=!1;;){switch(i){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(a)return n?-1:D(e).length;i=(""+i).toLowerCase(),a=!0;}}}function c(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;){switch(e){case"hex":return T(this,t,i);case"utf8":case"utf-8":return C(this,t,i);case"ascii":return S(this,t,i);case"latin1":case"binary":return j(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0;}}}function d(e,t,i){var r=e[t];e[t]=e[i],e[i]=r;}function _(e,i,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),B(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1;}else if(r<0){if(!a)return-1;r=0;}if("string"==typeof i&&(i=t.from(i,n)),t.isBuffer(i))return 0===i.length?-1:p(e,i,r,n,a);if("number"==typeof i)return i&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,i,r):Uint8Array.prototype.lastIndexOf.call(e,i,r):p(e,[i],r,n,a);throw new TypeError("val must be string, number or Buffer");}function p(e,t,i,r,n){var a,s=1,o=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,l/=2,i/=2;}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s);}if(n){var u=-1;for(a=i;ao&&(i=o-l),a=i;a>=0;a--){for(var h=!0,c=0;cn&&(r=n):r=n;var a=t.length;r>a/2&&(r=a/2);for(var s=0;s>8,n=i%256,a.push(n),a.push(r);}return a;}(t,e.length-i),e,i,r);}function E(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i));}function C(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n239?4:f>223?3:f>191?2:1;if(n+h<=i)switch(h){case 1:f<128&&(u=f);break;case 2:128==(192&(a=e[n+1]))&&(l=(31&f)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],s=e[n+2],128==(192&a)&&128==(192&s)&&(l=(15&f)<<12|(63&a)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],s=e[n+2],o=e[n+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(l=(15&f)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&l<1114112&&(u=l);}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=h;}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var i="",r=0;for(;rt&&(e+=" ... "),"";},t.prototype.compare=function(e,i,r,n,a){if(L(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_typeof(e));if(void 0===i&&(i=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),i<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&i>=r)return 0;if(n>=a)return-1;if(i>=r)return 1;if(this===e)return 0;for(var s=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(i>>>=0),l=Math.min(s,o),f=this.slice(n,a),u=e.slice(i,r),h=0;h>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0);}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;){switch(r){case"hex":return m(this,e,t,i);case"utf8":case"utf-8":return b(this,e,t,i);case"ascii":return v(this,e,t,i);case"latin1":case"binary":return y(this,e,t,i);case"base64":return g(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0;}}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)};};function S(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;nr)&&(i=r);for(var n="",a=t;ai)throw new RangeError("Trying to access beyond buffer length");}function M(e,i,r,n,a,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>a||ie.length)throw new RangeError("Index out of range");}function k(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range");}function P(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,4),n.write(e,t,i,r,23,4),i+4;}function I(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,8),n.write(e,t,i,r,52,8),i+8;}t.prototype.slice=function(e,i){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(i=void 0===i?r:~~i)<0?(i+=r)<0&&(i=0):i>r&&(i=r),i>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);){r+=this[e+--t]*n;}return r;},t.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e];},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8;},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1];},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3];},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3]);},t.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a=(n*=128)&&(r-=Math.pow(2,8*t)),r;},t.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=t,n=1,a=this[e+--r];r>0&&(n*=256);){a+=this[e+--r]*n;}return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a;},t.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e];},t.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i;},t.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i;},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24;},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3];},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!0,23,4);},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!1,23,4);},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!0,52,8);},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!1,52,8);},t.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t>>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);){this[t+n]=e/a&255;}return t+i;},t.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,255,0),this[t]=255&e,t+1;},t.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2;},t.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2;},t.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4;},t.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4;},t.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n);}var a=0,s=1,o=0;for(this[t]=255&e;++a>0)-o&255;}return t+i;},t.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n);}var a=i-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);){e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;}return t+i;},t.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1;},t.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2;},t.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2;},t.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4;},t.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4;},t.prototype.writeFloatLE=function(e,t,i){return P(this,e,t,!0,i);},t.prototype.writeFloatBE=function(e,t,i){return P(this,e,t,!1,i);},t.prototype.writeDoubleLE=function(e,t,i){return I(this,e,t,!0,i);},t.prototype.writeDoubleBE=function(e,t,i){return I(this,e,t,!1,i);},t.prototype.copy=function(e,i,r,n){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),i>=e.length&&(i=e.length),i||(i=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-i=0;--s){e[s+i]=this[s+r];}else Uint8Array.prototype.set.call(e,this.subarray(r,n),i);return a;},t.prototype.fill=function(e,i,r,n){if("string"==typeof e){if("string"==typeof i?(n=i,i=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var a=e.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(e=a);}}else"number"==typeof e&&(e&=255);if(i<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=i;s55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue;}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue;}n=i;continue;}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue;}i=65536+(n-55296<<10|i-56320);}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i);}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128);}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128);}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128);}}return a;}function F(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;){e+="=";}return e;}(e));}function O(e,t,i,r){for(var n=0;n=t.length||n>=e.length);++n){t[n+i]=e[n];}return n;}function L(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name;}function B(e){return e!=e;}}).call(this,e("buffer").Buffer);},{"base64-js":17,buffer:66,ieee754:135}],67:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("stream").Transform,a=e("string_decoder").StringDecoder;function s(e){n.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;}e("inherits")(s,n),s.prototype.update=function(e,t,i){"string"==typeof e&&(e=r.from(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n);},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state");},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state");},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state");},s.prototype._transform=function(e,t,i){var r;try{this.hashMode?this._update(e):this.push(this._update(e));}catch(e){r=e;}finally{i(r);}},s.prototype._flush=function(e){var t;try{this.push(this.__final());}catch(e){t=e;}e(t);},s.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t;},s.prototype._toString=function(e,t,i){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return i&&(r+=this._decoder.end()),r;},t.exports=s;},{inherits:136,"safe-buffer":184,stream:194,string_decoder:195}],68:[function(e,t,i){(function(e){function t(e){return Object.prototype.toString.call(e);}i.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e);},i.isBoolean=function(e){return"boolean"==typeof e;},i.isNull=function(e){return null===e;},i.isNullOrUndefined=function(e){return null==e;},i.isNumber=function(e){return"number"==typeof e;},i.isString=function(e){return"string"==typeof e;},i.isSymbol=function(e){return"symbol"==_typeof(e);},i.isUndefined=function(e){return void 0===e;},i.isRegExp=function(e){return"[object RegExp]"===t(e);},i.isObject=function(e){return"object"==_typeof(e)&&null!==e;},i.isDate=function(e){return"[object Date]"===t(e);},i.isError=function(e){return"[object Error]"===t(e)||e instanceof Error;},i.isFunction=function(e){return"function"==typeof e;},i.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==_typeof(e)||void 0===e;},i.isBuffer=e.isBuffer;}).call(this,{isBuffer:e("../../is-buffer/index.js")});},{"../../is-buffer/index.js":137}],69:[function(e,t,i){(function(i){var r=e("elliptic"),n=e("bn.js");t.exports=function(e){return new s(e);};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0;}function o(e,t,r){Array.isArray(e)||(e=e.toArray());var n=new i(e);if(r&&n.lengthi)?t=("rmd160"===e?new l():f(e)).update(t).digest():t.length64?t=e(t):t.length<64&&(t=n.concat([t,s],64));for(var i=this._ipad=n.allocUnsafe(64),r=this._opad=n.allocUnsafe(64),o=0;o<64;o++){i[o]=54^t[o],r[o]=92^t[o];}this._hash=[i];}r(o,a),o.prototype._update=function(e){this._hash.push(e);},o.prototype._final=function(){var e=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,e]));},t.exports=o;},{"cipher-base":67,inherits:136,"safe-buffer":184}],75:[function(e,t,i){"use strict";i.randomBytes=i.rng=i.pseudoRandomBytes=i.prng=e("randombytes"),i.createHash=i.Hash=e("create-hash"),i.createHmac=i.Hmac=e("create-hmac");var r=e("browserify-sign/algos"),n=Object.keys(r),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);i.getHashes=function(){return a;};var s=e("pbkdf2");i.pbkdf2=s.pbkdf2,i.pbkdf2Sync=s.pbkdf2Sync;var o=e("browserify-cipher");i.Cipher=o.Cipher,i.createCipher=o.createCipher,i.Cipheriv=o.Cipheriv,i.createCipheriv=o.createCipheriv,i.Decipher=o.Decipher,i.createDecipher=o.createDecipher,i.Decipheriv=o.Decipheriv,i.createDecipheriv=o.createDecipheriv,i.getCiphers=o.getCiphers,i.listCiphers=o.listCiphers;var l=e("diffie-hellman");i.DiffieHellmanGroup=l.DiffieHellmanGroup,i.createDiffieHellmanGroup=l.createDiffieHellmanGroup,i.getDiffieHellman=l.getDiffieHellman,i.createDiffieHellman=l.createDiffieHellman,i.DiffieHellman=l.DiffieHellman;var f=e("browserify-sign");i.createSign=f.createSign,i.Sign=f.Sign,i.createVerify=f.createVerify,i.Verify=f.Verify,i.createECDH=e("create-ecdh");var u=e("public-encrypt");i.publicEncrypt=u.publicEncrypt,i.privateEncrypt=u.privateEncrypt,i.publicDecrypt=u.publicDecrypt,i.privateDecrypt=u.privateDecrypt;var h=e("randomfill");i.randomFill=h.randomFill,i.randomFillSync=h.randomFillSync,i.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"));},i.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":38,"browserify-sign":46,"browserify-sign/algos":43,"create-ecdh":69,"create-hash":71,"create-hmac":73,"diffie-hellman":82,pbkdf2:151,"public-encrypt":159,randombytes:166,randomfill:167}],76:[function(e,t,i){"use strict";i.utils=e("./des/utils"),i.Cipher=e("./des/cipher"),i.DES=e("./des/des"),i.CBC=e("./des/cbc"),i.EDE=e("./des/ede");},{"./des/cbc":77,"./des/cipher":78,"./des/des":79,"./des/ede":80,"./des/utils":81}],77:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a={};function s(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t0;r--){t+=this._buffer(e,t),i+=this._flushBuffer(n,i);}return t+=this._buffer(e,t),n;},n.prototype["final"]=function(e){var t,i;return e&&(t=this.update(e)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(i):i;},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];i=a.r28shl(i,o),n=a.r28shl(n,o),a.pc2(i,n,e.keys,s);}},l.prototype._update=function(e,t,i,r){var n=this._desState,s=a.readUInt32BE(e,t),o=a.readUInt32BE(e,t+4);a.ip(s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,s,o,n.tmp,0):this._decrypt(n,s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],a.writeUInt32BE(i,s,r),a.writeUInt32BE(i,o,r+4);},l.prototype._pad=function(e,t){for(var i=e.length-t,r=t;r>>0,s=c;}a.rip(o,s,r,n);},l.prototype._decrypt=function(e,t,i,r,n){for(var s=i,o=t,l=e.keys.length-2;l>=0;l-=2){var f=e.keys[l],u=e.keys[l+1];a.expand(s,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1];var h=a.substitute(f,u),c=s;s=(o^a.permute(h))>>>0,o=c;}a.rip(s,o,r,n);};},{"./cipher":78,"./utils":81,inherits:136,"minimalistic-assert":142}],80:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a=e("./cipher"),s=e("./des");function o(e,t){r.equal(t.length,24,"Invalid key length");var i=t.slice(0,8),n=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i})];}function l(e){a.call(this,e);var t=new o(this.type,this.options.key);this._edeState=t;}n(l,a),t.exports=l,l.create=function(e){return new l(e);},l.prototype._update=function(e,t,i,r){var n=this._edeState;n.ciphers[0]._update(e,t,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r);},l.prototype._pad=s.prototype._pad,l.prototype._unpad=s.prototype._unpad;},{"./cipher":78,"./des":79,inherits:136,"minimalistic-assert":142}],81:[function(e,t,i){"use strict";i.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0;},i.writeUInt32BE=function(e,t,i){e[0+i]=t>>>24,e[1+i]=t>>>16&255,e[2+i]=t>>>8&255,e[3+i]=255&t;},i.ip=function(e,t,i,r){for(var n=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8){n<<=1,n|=t>>>o+s&1;}for(o=0;o<=24;o+=8){n<<=1,n|=e>>>o+s&1;}}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8){a<<=1,a|=t>>>o+s&1;}for(o=1;o<=25;o+=8){a<<=1,a|=e>>>o+s&1;}}i[r+0]=n>>>0,i[r+1]=a>>>0;},i.rip=function(e,t,i,r){for(var n=0,a=0,s=0;s<4;s++){for(var o=24;o>=0;o-=8){n<<=1,n|=t>>>o+s&1,n<<=1,n|=e>>>o+s&1;}}for(s=4;s<8;s++){for(o=24;o>=0;o-=8){a<<=1,a|=t>>>o+s&1,a<<=1,a|=e>>>o+s&1;}}i[r+0]=n>>>0,i[r+1]=a>>>0;},i.pc1=function(e,t,i,r){for(var n=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8){n<<=1,n|=t>>o+s&1;}for(o=0;o<=24;o+=8){n<<=1,n|=e>>o+s&1;}}for(o=0;o<=24;o+=8){n<<=1,n|=t>>o+s&1;}for(s=1;s<=3;s++){for(o=0;o<=24;o+=8){a<<=1,a|=t>>o+s&1;}for(o=0;o<=24;o+=8){a<<=1,a|=e>>o+s&1;}}for(o=0;o<=24;o+=8){a<<=1,a|=e>>o+s&1;}i[r+0]=n>>>0,i[r+1]=a>>>0;},i.r28shl=function(e,t){return e<>>28-t;};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];i.pc2=function(e,t,i,n){for(var a=0,s=0,o=r.length>>>1,l=0;l>>r[l]&1;}for(l=o;l>>r[l]&1;}i[n+0]=a>>>0,i[n+1]=s>>>0;},i.expand=function(e,t,i){var r=0,n=0;r=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4){r<<=6,r|=e>>>a&63;}for(a=11;a>=3;a-=4){n|=e>>>a&63,n<<=6;}n|=(31&e)<<1|e>>>31,t[i+0]=r>>>0,t[i+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];i.substitute=function(e,t){for(var i=0,r=0;r<4;r++){i<<=4,i|=n[64*r+(e>>>18-6*r&63)];}for(r=0;r<4;r++){i<<=4,i|=n[256+64*r+(t>>>18-6*r&63)];}return i>>>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];i.permute=function(e){for(var t=0,i=0;i>>a[i]&1;}return t>>>0;},i.padSplit=function(e,t,i){for(var r=e.toString(2);r.lengthe;){i.ishrn(1);}if(i.isEven()&&i.iadd(o),i.testn(1)||i.iadd(l),t.cmp(l)){if(!t.cmp(f))for(;i.mod(u).cmp(h);){i.iadd(d);}}else for(;i.mod(a).cmp(c);){i.iadd(d);}if(m(_=i.shrn(1))&&m(i)&&b(_)&&b(i)&&s.test(_)&&s.test(i))return i;}}},{"bn.js":86,"miller-rabin":140,randombytes:166}],85:[function(e,t,i){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"}};},{}],86:[function(e,t,i){arguments[4][16][0].apply(i,arguments);},{buffer:20,dup:16}],87:[function(e,t,i){"use strict";var r=i;r.version=e("../package.json").version,r.utils=e("./elliptic/utils"),r.rand=e("brorand"),r.curve=e("./elliptic/curve"),r.curves=e("./elliptic/curves"),r.ec=e("./elliptic/ec"),r.eddsa=e("./elliptic/eddsa");},{"../package.json":103,"./elliptic/curve":90,"./elliptic/curves":93,"./elliptic/ec":94,"./elliptic/eddsa":97,"./elliptic/utils":101,brorand:19}],88:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.getNAF,s=n.getJSF,o=n.assert;function l(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red));}function f(e,t){this.curve=e,this.type=t,this.precomputed=null;}t.exports=l,l.prototype.point=function(){throw new Error("Not implemented");},l.prototype.validate=function(){throw new Error("Not implemented");},l.prototype._fixedNafMul=function(e,t){o(e.precomputed);var i=e._getDoubles(),r=a(t,1,this._bitLength),n=(1<=l;t--){f=(f<<1)+r[t];}s.push(f);}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),c=n;c>0;c--){for(l=0;l=0;f--){for(t=0;f>=0&&0===s[f];f--){t++;}if(f>=0&&t++,l=l.dblp(t),f<0)break;var u=s[f];o(0!==u),l="affine"===e.type?u>0?l.mixedAdd(n[u-1>>1]):l.mixedAdd(n[-u-1>>1].neg()):u>0?l.add(n[u-1>>1]):l.add(n[-u-1>>1].neg());}return"affine"===e.type?l.toP():l;},l.prototype._wnafMulAdd=function(e,t,i,r,n){for(var o=this._wnafT1,l=this._wnafT2,f=this._wnafT3,u=0,h=0;h=1;h-=2){var d=h-1,_=h;if(1===o[d]&&1===o[_]){var p=[t[d],null,null,t[_]];0===t[d].y.cmp(t[_].y)?(p[1]=t[d].add(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg())):0===t[d].y.cmp(t[_].y.redNeg())?(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].add(t[_].neg())):(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],b=s(i[d],i[_]);u=Math.max(b[0].length,u),f[d]=new Array(u),f[_]=new Array(u);for(var v=0;v=0;h--){for(var C=0;h>=0;){var S=!0;for(v=0;v=0&&C++,w=w.dblp(C),h<0)break;for(v=0;v0?j=l[v][T-1>>1]:T<0&&(j=l[v][-T-1>>1].neg()),w="affine"===j.type?w.mixedAdd(j):w.add(j));}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step);},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n":"";},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c));},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),s=a.redSub(i),o=r.redSub(t),l=n.redMul(s),f=a.redMul(o),u=n.redMul(o),h=s.redMul(a);return this.curve.point(l,f,h,u);},f.prototype._projDbl=function(){var e,t,i,r=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var s=(f=this.curve._mulA(n)).redAdd(a);if(this.zOne)e=r.redSub(n).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(f.redSub(a)),i=s.redSqr().redSub(s).redSub(s);else{var o=this.z.redSqr(),l=s.redSub(o).redISub(o);e=r.redSub(n).redISub(a).redMul(l),t=s.redMul(f.redSub(a)),i=s.redMul(l);}}else{var f=n.redAdd(a);o=this.curve._mulC(this.z).redSqr(),l=f.redSub(o).redSub(o);e=this.curve._mulC(r.redISub(f)).redMul(l),t=this.curve._mulC(f).redMul(n.redISub(a)),i=f.redMul(l);}return this.curve.point(e,t,i);},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl();},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=i.redSub(t),s=n.redSub(r),o=n.redAdd(r),l=i.redAdd(t),f=a.redMul(s),u=o.redMul(l),h=a.redMul(l),c=s.redMul(o);return this.curve.point(f,u,c,h);},f.prototype._projAdd=function(e){var t,i,r=this.z.redMul(e.z),n=r.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(s),l=n.redSub(o),f=n.redAdd(o),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),h=r.redMul(l).redMul(u);return this.curve.twisted?(t=r.redMul(f).redMul(s.redSub(this.curve._mulA(a))),i=l.redMul(f)):(t=r.redMul(f).redMul(s.redSub(a)),i=this.curve._mulC(l).redMul(f)),this.curve.point(h,t,i);},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e);},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e);},f.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1);},f.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0);},f.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;},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg());},f.prototype.getX=function(){return this.normalize(),this.x.fromRed();},f.prototype.getY=function(){return this.normalize(),this.y.fromRed();},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY());},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0;}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add;},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],90:[function(e,t,i){"use strict";var r=i;r.base=e("./base"),r["short"]=e("./short"),r.mont=e("./mont"),r.edwards=e("./edwards");},{"./base":88,"./edwards":89,"./mont":91,"./short":92}],91:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("inherits"),a=e("./base"),s=e("../utils");function o(e){a.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two));}function l(e,t,i){a.BasePoint.call(this,e,"projective"),null===t&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)));}n(o,a),t.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),r=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r);},n(l,a.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1);},o.prototype.point=function(e,t){return new l(this,e,t);},o.prototype.pointFromJSON=function(e){return l.fromJSON(this,e);},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength());},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one);},l.prototype.inspect=function(){return this.isInfinity()?"":"";},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0);},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),r=e.redMul(t),n=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n);},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve");},l.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(i),s=n.redMul(r),o=t.z.redMul(a.redAdd(s).redSqr()),l=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,l);},l.prototype.mul=function(e){for(var t=e.clone(),i=this,r=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1)){n.push(t.andln(1));}for(var a=n.length-1;a>=0;a--){0===n[a]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());}return r;},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve");},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve");},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX());},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this;},l.prototype.getX=function(){return this.normalize(),this.x.fromRed();};},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],92:[function(e,t,i){"use strict";var r=e("../utils"),n=e("bn.js"),a=e("inherits"),s=e("./base"),o=r.assert;function l(e){s.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=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 f(e,t,i,r){s.BasePoint.call(this,e,"affine"),null===t&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(i,16),r&&(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 u(e,t,i,r){s.BasePoint.call(this,e,"jacobian"),null===t&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(i,16),this.z=new n(r,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;}a(l,s),t.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,i;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red);}if(e.lambda)i=new n(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?i=a[0]:(i=a[1],o(0===this.g.mul(i).x.cmp(this.g.x.redMul(t))));}return{beta:t,lambda:i,basis:e.basis?e.basis.map(function(e){return{a:new n(e.a,16),b:new n(e.b,16)};}):this._getEndoBasis(i)};}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),i=new n(2).toRed(t).redInvm(),r=i.redNeg(),a=new n(3).toRed(t).redNeg().redSqrt().redMul(i);return[r.redAdd(a).fromRed(),r.redSub(a).fromRed()];},l.prototype._getEndoBasis=function(e){for(var t,i,r,a,s,o,l,f,u,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),c=e,d=this.n.clone(),_=new n(1),p=new n(0),m=new n(0),b=new n(1),v=0;0!==c.cmpn(0);){var y=d.div(c);f=d.sub(y.mul(c)),u=m.sub(y.mul(_));var g=b.sub(y.mul(p));if(!r&&f.cmp(h)<0)t=l.neg(),i=_,r=f.neg(),a=u;else if(r&&2==++v)break;l=f,d=c,c=f,m=_,_=u,b=p,p=g;}s=f.neg(),o=u;var w=r.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(w)>=0&&(s=t,o=i),r.negative&&(r=r.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:r,b:a},{a:s,b:o}];},l.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],r=t[1],n=r.b.mul(e).divRound(this.n),a=i.b.neg().mul(e).divRound(this.n),s=n.mul(i.a),o=a.mul(r.a),l=n.mul(i.b),f=a.mul(r.b);return{k1:e.sub(s).sub(o),k2:l.add(f).neg()};},l.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r);},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,r=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0);},l.prototype._endoWnafMulAdd=function(e,t,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,a=0;a":"";},f.prototype.isInfinity=function(){return this.inf;},f.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 i=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r);},f.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,i=this.x.redSqr(),r=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(r),a=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s);},f.prototype.getX=function(){return this.x.fromRed();},f.prototype.getY=function(){return this.y.fromRed();},f.prototype.mul=function(e){return e=new n(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e);},f.prototype.mulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2);},f.prototype.jmulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0);},f.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));},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,r=function r(e){return e.neg();};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}};}return t;},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one);},a(u,s.BasePoint),l.prototype.jpoint=function(e,t,i){return new u(this,e,t,i);},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(i,r);},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z);},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(i),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(i.redMul(this.z)),o=r.redSub(n),l=a.redSub(s);if(0===o.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),h=r.redMul(f),c=l.redSqr().redIAdd(u).redISub(h).redISub(h),d=l.redMul(h.redISub(c)).redISub(a.redMul(u)),_=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(c,d,_);},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,r=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),s=i.redSub(r),o=n.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),f=l.redMul(s),u=i.redMul(l),h=o.redSqr().redIAdd(f).redISub(u).redISub(u),c=o.redMul(u.redISub(h)).redISub(n.redMul(f)),d=this.z.redMul(s);return this.curve.jpoint(h,c,d);},u.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,i=0;i=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0;}},u.prototype.inspect=function(){return this.isInfinity()?"":"";},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0);};},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],93:[function(e,t,i){"use strict";var r,n=i,a=e("hash.js"),s=e("./curve"),o=e("./utils").assert;function l(e){"short"===e.type?this.curve=new s["short"](e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O");}function f(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function get(){var i=new l(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:i}),i;}});}n.PresetCurve=l,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=e("./precomputed/secp256k1");}catch(e){r=void 0;}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]});},{"./curve":90,"./precomputed/secp256k1":100,"./utils":101,"hash.js":122}],94:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("hmac-drbg"),a=e("../utils"),s=e("../curves"),o=e("brorand"),l=a.assert,f=e("./key"),u=e("./signature");function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(l(s.hasOwnProperty(e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash;}t.exports=h,h.prototype.keyPair=function(e){return new f(this,e);},h.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t);},h.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t);},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),a=this.n.sub(new r(2));;){var s=new r(t.generate(i));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s);}},h.prototype._truncateToN=function(e,t){var i=8*e.byteLength()-this.n.bitLength();return i>0&&(e=e.ushrn(i)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e;},h.prototype.sign=function(e,t,i,a){"object"==_typeof(i)&&(a=i,i=null),a||(a={}),t=this.keyFromPrivate(t,i),e=this._truncateToN(new r(e,16));for(var s=this.n.byteLength(),o=t.getPrivate().toArray("be",s),l=e.toArray("be",s),f=new n({hash:this.hash,entropy:o,nonce:l,pers:a.pers,persEnc:a.persEnc||"utf8"}),h=this.n.sub(new r(1)),c=0;;c++){var d=a.k?a.k(c):new r(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(h)>=0)){var _=this.g.mul(d);if(!_.isInfinity()){var p=_.getX(),m=p.umod(this.n);if(0!==m.cmpn(0)){var b=d.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(_.getY().isOdd()?1:0)|(0!==p.cmp(m)?2:0);return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new u({r:m,s:b,recoveryParam:v});}}}}}},h.prototype.verify=function(e,t,i,n){e=this._truncateToN(new r(e,16)),i=this.keyFromPublic(i,n);var a=(t=new u(t,"hex")).r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,l=s.invm(this.n),f=l.mul(e).umod(this.n),h=l.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(f,i.getPublic(),h)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(f,i.getPublic(),h)).isInfinity()&&0===o.getX().umod(this.n).cmp(a);},h.prototype.recoverPubKey=function(e,t,i,n){l((3&i)===i,"The recovery param is more than two bits"),t=new u(t,n);var a=this.n,s=new r(e),o=t.r,f=t.s,h=1&i,c=i>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");o=c?this.curve.pointFromX(o.add(this.curve.n),h):this.curve.pointFromX(o,h);var d=t.r.invm(a),_=a.sub(s).mul(d).umod(a),p=f.mul(d).umod(a);return this.g.mulAdd(_,o,p);},h.prototype.getKeyRecoveryParam=function(e,t,i,r){if(null!==(t=new u(t,r)).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(i))return n;}throw new Error("Unable to find valid recovery factor");};},{"../curves":93,"../utils":101,"./key":95,"./signature":96,"bn.js":102,brorand:19,"hmac-drbg":134}],95:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils").assert;function a(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);}t.exports=a,a.fromPublic=function(e,t,i){return t instanceof a?t:new a(e,{pub:t,pubEnc:i});},a.fromPrivate=function(e,t,i){return t instanceof a?t:new a(e,{priv:t,privEnc:i});},a.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"};},a.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;},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv;},a.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n);},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(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);},a.prototype.derive=function(e){return e.mul(this.priv).getX();},a.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i);},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this);},a.prototype.inspect=function(){return"";};},{"../utils":101,"bn.js":102}],96:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(a(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam);}function o(){this.place=0;}function l(e,t){var i=e[t.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,a=0,s=t.place;a>>=0;}return!(n<=127)&&(t.place=s,n);}function f(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|i);--i;){e.push(t>>>(i<<3)&255);}e.push(t);}}t.exports=s,s.prototype._importDER=function(e,t){e=n.toArray(e,t);var i=new o();if(48!==e[i.place++])return!1;var a=l(e,i);if(!1===a)return!1;if(a+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var s=l(e,i);if(!1===s)return!1;var f=e.slice(i.place,s+i.place);if(i.place+=s,2!==e[i.place++])return!1;var u=l(e,i);if(!1===u)return!1;if(e.length!==u+i.place)return!1;var h=e.slice(i.place,u+i.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1);}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1);}return this.r=new r(f),this.s=new r(h),this.recoveryParam=null,!0;},s.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&i[0]&&(i=[0].concat(i)),t=f(t),i=f(i);!(i[0]||128&i[1]);){i=i.slice(1);}var r=[2];u(r,t.length),(r=r.concat(t)).push(2),u(r,i.length);var a=r.concat(i),s=[48];return u(s,a.length),s=s.concat(a),n.encode(s,e);};},{"../utils":101,"bn.js":102}],97:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("../curves"),a=e("../utils"),s=a.assert,o=a.parseBytes,l=e("./key"),f=e("./signature");function u(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=n[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512;}t.exports=u,u.prototype.sign=function(e,t){e=o(e);var i=this.keyFromSecret(t),r=this.hashInt(i.messagePrefix(),e),n=this.g.mul(r),a=this.encodePoint(n),s=this.hashInt(a,i.pubBytes(),e).mul(i.priv()),l=r.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:l,Rencoded:a});},u.prototype.verify=function(e,t,i){e=o(e),t=this.makeSignature(t);var r=this.keyFromPublic(i),n=this.hashInt(t.Rencoded(),r.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(r.pub().mul(n)).eq(a);},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(n>>1)-1?(n>>1)-l:l,a.isubn(o)):o=0,r[s]=o,a.iushrn(1);}return r;},r.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var r=0,n=0;e.cmpn(-r)>0||t.cmpn(-n)>0;){var a,s,o,l=e.andln(3)+r&3,f=t.andln(3)+n&3;if(3===l&&(l=-1),3===f&&(f=-1),0==(1&l))a=0;else a=3!==(o=e.andln(7)+r&7)&&5!==o||2!==f?l:-l;if(i[0].push(a),0==(1&f))s=0;else s=3!==(o=t.andln(7)+n&7)&&5!==o||2!==l?f:-f;i[1].push(s),2*r===a+1&&(r=1-r),2*n===s+1&&(n=1-n),e.iushrn(1),t.iushrn(1);}return i;},r.cachedProperty=function(e,t,i){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this);};},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e;},r.intFromLE=function(e){return new n(e,"hex","le");};},{"bn.js":102,"minimalistic-assert":142,"minimalistic-crypto-utils":143}],102:[function(e,t,i){arguments[4][16][0].apply(i,arguments);},{buffer:20,dup:16}],103:[function(e,t,i){t.exports={_args:[["elliptic@6.5.3","/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer"]],_from:"elliptic@6.5.3",_id:"elliptic@6.5.3",_inBundle:!1,_integrity:"sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.5.3",name:"elliptic",escapedName:"elliptic",rawSpec:"6.5.3",saveSpec:null,fetchSpec:"6.5.3"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",_spec:"6.5.3",_where:"/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},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"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^3.0.8",grunt:"^1.0.4","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":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.10.3",mocha:"^6.2.2"},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.5.3"};},{}],104:[function(e,t,i){var r=Object.create||function(e){var t=function t(){};return t.prototype=e,new t();},n=Object.keys||function(e){var t=[];for(var i in e){Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);}return i;},a=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments);};};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var o,l=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),o=0===f.x;}catch(e){o=!1;}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners;}function h(e,t,i){if(t)e.call(i);else for(var r=e.length,n=w(e,r),a=0;a0&&o.length>a){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,"object"==(typeof console==="undefined"?"undefined":_typeof(console))&&console.warn&&(l.name,l.message);}}else o=s[t]=i,++e._eventsCount;return e;}function b(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l;}if(!(i=s[e]))return!1;var f="function"==typeof i;switch(r=arguments.length){case 1:h(i,f,this);break;case 2:c(i,f,this,arguments[1]);break;case 3:d(i,f,this,arguments[1],arguments[2]);break;case 4:_(i,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),a=1;a=0;s--){if(i[s]===t||i[s].listener===t){o=i[s].listener,a=s;break;}}if(a<0)return this;0===a?i.shift():function(e,t){for(var i=t,r=i+1,n=e.length;r=0;a--){this.removeListener(e,t[a]);}return this;},s.prototype.listeners=function(e){return y(this,e,!0);},s.prototype.rawListeners=function(e){return y(this,e,!1);},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t);},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[];};},{}],105:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("md5.js");t.exports=function(e,t,i,a){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=i/8,o=r.alloc(s),l=r.alloc(a||0),f=r.alloc(0);s>0||a>0;){var u=new n();u.update(f),u.update(e),t&&u.update(t),f=u.digest();var h=0;if(s>0){var c=o.length-s;h=Math.min(s,f.length),f.copy(o,c,0,h),s-=h;}if(h0){var d=l.length-a,_=Math.min(a,f.length-h);f.copy(l,d,h,h+_),a-=_;}}return f.fill(0),{key:o,iv:l};};},{"md5.js":139,"safe-buffer":184}],106:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("readable-stream").Transform;function a(e){n.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1;}e("inherits")(a,n),a.prototype._transform=function(e,t,i){var r=null;try{this.update(e,t);}catch(e){r=e;}i(r);},a.prototype._flush=function(e){var t=null;try{this.push(this.digest());}catch(e){t=e;}e(t);},a.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer");}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var i=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var a=this._blockOffset;a0;++s){this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);}return this;},a.prototype._update=function(){throw new Error("_update is not implemented");},a.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 i=0;i<4;++i){this._length[i]=0;}return t;},a.prototype._digest=function(){throw new Error("_digest is not implemented");},t.exports=a;},{inherits:136,"readable-stream":121,"safe-buffer":184}],107:[function(e,t,i){arguments[4][49][0].apply(i,arguments);},{dup:49}],108:[function(e,t,i){arguments[4][50][0].apply(i,arguments);},{"./_stream_readable":110,"./_stream_writable":112,_process:158,dup:50,inherits:136}],109:[function(e,t,i){arguments[4][51][0].apply(i,arguments);},{"./_stream_transform":111,dup:51,inherits:136}],110:[function(e,t,i){arguments[4][52][0].apply(i,arguments);},{"../errors":107,"./_stream_duplex":108,"./internal/streams/async_iterator":113,"./internal/streams/buffer_list":114,"./internal/streams/destroy":115,"./internal/streams/from":117,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:52,events:104,inherits:136,"string_decoder/":195,util:20}],111:[function(e,t,i){arguments[4][53][0].apply(i,arguments);},{"../errors":107,"./_stream_duplex":108,dup:53,inherits:136}],112:[function(e,t,i){arguments[4][54][0].apply(i,arguments);},{"../errors":107,"./_stream_duplex":108,"./internal/streams/destroy":115,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:54,inherits:136,"util-deprecate":197}],113:[function(e,t,i){arguments[4][55][0].apply(i,arguments);},{"./end-of-stream":116,_process:158,dup:55}],114:[function(e,t,i){arguments[4][56][0].apply(i,arguments);},{buffer:66,dup:56,util:20}],115:[function(e,t,i){arguments[4][57][0].apply(i,arguments);},{_process:158,dup:57}],116:[function(e,t,i){arguments[4][58][0].apply(i,arguments);},{"../../../errors":107,dup:58}],117:[function(e,t,i){arguments[4][59][0].apply(i,arguments);},{dup:59}],118:[function(e,t,i){arguments[4][60][0].apply(i,arguments);},{"../../../errors":107,"./end-of-stream":116,dup:60}],119:[function(e,t,i){arguments[4][61][0].apply(i,arguments);},{"../../../errors":107,dup:61}],120:[function(e,t,i){arguments[4][62][0].apply(i,arguments);},{dup:62,events:104}],121:[function(e,t,i){arguments[4][63][0].apply(i,arguments);},{"./lib/_stream_duplex.js":108,"./lib/_stream_passthrough.js":109,"./lib/_stream_readable.js":110,"./lib/_stream_transform.js":111,"./lib/_stream_writable.js":112,"./lib/internal/streams/end-of-stream.js":116,"./lib/internal/streams/pipeline.js":118,dup:63}],122:[function(e,t,i){var r=i;r.utils=e("./hash/utils"),r.common=e("./hash/common"),r.sha=e("./hash/sha"),r.ripemd=e("./hash/ripemd"),r.hmac=e("./hash/hmac"),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160;},{"./hash/common":123,"./hash/hmac":124,"./hash/ripemd":125,"./hash/sha":126,"./hash/utils":133}],123:[function(e,t,i){"use strict";var r=e("./utils"),n=e("minimalistic-assert");function a(){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;}i.BlockHash=a,a.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-i,this.endian);for(var n=0;n>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e;}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,a=8;athis.blockSize&&(e=new this.Hash().update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t>>3;},i.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10;};},{"../utils":133}],133:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits");function a(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1));}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0;}function o(e){return 1===e.length?"0"+e:e;}function l(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;}i.inherits=n,i.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"==typeof e){if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>6|192,i[r++]=63&s|128):a(e,n)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++n)),i[r++]=s>>18|240,i[r++]=s>>12&63|128,i[r++]=s>>6&63|128,i[r++]=63&s|128):(i[r++]=s>>12|224,i[r++]=s>>6&63|128,i[r++]=63&s|128);}}else for(n=0;n>>0;}return s;},i.split32=function(e,t){for(var i=new Array(4*e.length),r=0,n=0;r>>24,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=255&a):(i[n+3]=a>>>24,i[n+2]=a>>>16&255,i[n+1]=a>>>8&255,i[n]=255&a);}return i;},i.rotr32=function(e,t){return e>>>t|e<<32-t;},i.rotl32=function(e,t){return e<>>32-t;},i.sum32=function(e,t){return e+t>>>0;},i.sum32_3=function(e,t,i){return e+t+i>>>0;},i.sum32_4=function(e,t,i,r){return e+t+i+r>>>0;},i.sum32_5=function(e,t,i,r,n){return e+t+i+r+n>>>0;},i.sum64=function(e,t,i,r){var n=e[t],a=r+e[t+1]>>>0,s=(a>>0,e[t+1]=a;},i.sum64_hi=function(e,t,i,r){return(t+r>>>0>>0;},i.sum64_lo=function(e,t,i,r){return t+r>>>0;},i.sum64_4_hi=function(e,t,i,r,n,a,s,o){var l=0,f=t;return l+=(f=f+r>>>0)>>0)>>0)>>0;},i.sum64_4_lo=function(e,t,i,r,n,a,s,o){return t+r+a+o>>>0;},i.sum64_5_hi=function(e,t,i,r,n,a,s,o,l,f){var u=0,h=t;return u+=(h=h+r>>>0)>>0)>>0)>>0)>>0;},i.sum64_5_lo=function(e,t,i,r,n,a,s,o,l,f){return t+r+a+o+f>>>0;},i.rotr64_hi=function(e,t,i){return(t<<32-i|e>>>i)>>>0;},i.rotr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0;},i.shr64_hi=function(e,t,i){return e>>>i;},i.shr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0;};},{inherits:136,"minimalistic-assert":142}],134:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("minimalistic-crypto-utils"),a=e("minimalistic-assert");function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex"),i=n.toArray(e.nonce,e.nonceEnc||"hex"),r=n.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,i,r);}t.exports=s,s.prototype._init=function(e,t,i){var r=e.concat(t).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1;},s.prototype.generate=function(e,t,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=i,i=t,t=null),i&&(i=n.toArray(i,r||"hex"),this._update(i));for(var a=[];a.length>1,u=-7,h=i?n-1:0,c=i?-1:1,d=e[t+h];for(h+=c,a=d&(1<<-u)-1,d>>=-u,u+=o;u>0;a=256*a+e[t+h],h+=c,u-=8){;}for(s=a&(1<<-u)-1,a>>=-u,u+=r;u>0;s=256*s+e[t+h],h+=c,u-=8){;}if(0===a)a=1-f;else{if(a===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),a-=f;}return(d?-1:1)*s*Math.pow(2,a-r);},i.write=function(e,t,i,r,n,a){var s,o,l,f=8*a-n-1,u=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,_=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?c/l:c*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=u?(o=0,s=u):s+h>=1?(o=(t*l-1)*Math.pow(2,n),s+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,n),s=0));n>=8;e[i+d]=255&o,d+=_,o/=256,n-=8){;}for(s=s<0;e[i+d]=255&s,d+=_,s/=256,f-=8){;}e[i+d-_]|=128*p;};},{}],136:[function(e,t,i){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:t.exports=function(e,t){if(t){e.super_=t;var i=function i(){};i.prototype=t.prototype,e.prototype=new i(),e.prototype.constructor=e;}};},{}],137:[function(e,t,i){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e);}/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT - */t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0));}(e)||!!e._isBuffer);};},{}],138:[function(e,t,i){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e);};},{}],139:[function(e,t,i){"use strict";var r=e("inherits"),n=e("hash-base"),a=e("safe-buffer").Buffer,s=new Array(16);function o(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878;}function l(e,t){return e<>>32-t;}function f(e,t,i,r,n,a,s){return l(e+(t&i|~t&r)+n+a|0,s)+t|0;}function u(e,t,i,r,n,a,s){return l(e+(t&r|i&~r)+n+a|0,s)+t|0;}function c(e,t,i,r,n,a,s){return l(e+(t^i^r)+n+a|0,s)+t|0;}function h(e,t,i,r,n,a,s){return l(e+(i^(t|~r))+n+a|0,s)+t|0;}r(o,n),o.prototype._update=function(){for(var e=s,t=0;t<16;++t){e[t]=this._block.readInt32LE(4*t);}var i=this._a,r=this._b,n=this._c,a=this._d;i=f(i,r,n,a,e[0],3614090360,7),a=f(a,i,r,n,e[1],3905402710,12),n=f(n,a,i,r,e[2],606105819,17),r=f(r,n,a,i,e[3],3250441966,22),i=f(i,r,n,a,e[4],4118548399,7),a=f(a,i,r,n,e[5],1200080426,12),n=f(n,a,i,r,e[6],2821735955,17),r=f(r,n,a,i,e[7],4249261313,22),i=f(i,r,n,a,e[8],1770035416,7),a=f(a,i,r,n,e[9],2336552879,12),n=f(n,a,i,r,e[10],4294925233,17),r=f(r,n,a,i,e[11],2304563134,22),i=f(i,r,n,a,e[12],1804603682,7),a=f(a,i,r,n,e[13],4254626195,12),n=f(n,a,i,r,e[14],2792965006,17),i=u(i,r=f(r,n,a,i,e[15],1236535329,22),n,a,e[1],4129170786,5),a=u(a,i,r,n,e[6],3225465664,9),n=u(n,a,i,r,e[11],643717713,14),r=u(r,n,a,i,e[0],3921069994,20),i=u(i,r,n,a,e[5],3593408605,5),a=u(a,i,r,n,e[10],38016083,9),n=u(n,a,i,r,e[15],3634488961,14),r=u(r,n,a,i,e[4],3889429448,20),i=u(i,r,n,a,e[9],568446438,5),a=u(a,i,r,n,e[14],3275163606,9),n=u(n,a,i,r,e[3],4107603335,14),r=u(r,n,a,i,e[8],1163531501,20),i=u(i,r,n,a,e[13],2850285829,5),a=u(a,i,r,n,e[2],4243563512,9),n=u(n,a,i,r,e[7],1735328473,14),i=c(i,r=u(r,n,a,i,e[12],2368359562,20),n,a,e[5],4294588738,4),a=c(a,i,r,n,e[8],2272392833,11),n=c(n,a,i,r,e[11],1839030562,16),r=c(r,n,a,i,e[14],4259657740,23),i=c(i,r,n,a,e[1],2763975236,4),a=c(a,i,r,n,e[4],1272893353,11),n=c(n,a,i,r,e[7],4139469664,16),r=c(r,n,a,i,e[10],3200236656,23),i=c(i,r,n,a,e[13],681279174,4),a=c(a,i,r,n,e[0],3936430074,11),n=c(n,a,i,r,e[3],3572445317,16),r=c(r,n,a,i,e[6],76029189,23),i=c(i,r,n,a,e[9],3654602809,4),a=c(a,i,r,n,e[12],3873151461,11),n=c(n,a,i,r,e[15],530742520,16),i=h(i,r=c(r,n,a,i,e[2],3299628645,23),n,a,e[0],4096336452,6),a=h(a,i,r,n,e[7],1126891415,10),n=h(n,a,i,r,e[14],2878612391,15),r=h(r,n,a,i,e[5],4237533241,21),i=h(i,r,n,a,e[12],1700485571,6),a=h(a,i,r,n,e[3],2399980690,10),n=h(n,a,i,r,e[10],4293915773,15),r=h(r,n,a,i,e[1],2240044497,21),i=h(i,r,n,a,e[8],1873313359,6),a=h(a,i,r,n,e[15],4264355552,10),n=h(n,a,i,r,e[6],2734768916,15),r=h(r,n,a,i,e[13],1309151649,21),i=h(i,r,n,a,e[4],4149444226,6),a=h(a,i,r,n,e[11],3174756917,10),n=h(n,a,i,r,e[2],718787259,15),r=h(r,n,a,i,e[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+a|0;},o.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=a.allocUnsafe(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=o;},{"hash-base":106,inherits:136,"safe-buffer":184}],140:[function(e,t,i){var r=e("bn.js"),n=e("brorand");function a(e){this.rand=e||new n.Rand();}t.exports=a,a.create=function(e){return new a(e);},a.prototype._randbelow=function(e){var t=e.bitLength(),i=Math.ceil(t/8);do{var n=new r(this.rand.generate(i));}while(n.cmp(e)>=0);return n;},a.prototype._randrange=function(e,t){var i=t.sub(e);return e.add(this._randbelow(i));},a.prototype.test=function(e,t,i){var n=e.bitLength(),a=r.mont(e),s=new r(1).toRed(a);t||(t=Math.max(1,n/48|0));for(var o=e.subn(1),l=0;!o.testn(l);l++){;}for(var f=e.shrn(l),u=o.toRed(a);t>0;t--){var c=this._randrange(new r(2),o);i&&i(c);var h=c.toRed(a).redPow(f);if(0!==h.cmp(s)&&0!==h.cmp(u)){for(var d=1;d0;t--){var u=this._randrange(new r(2),s),c=e.gcd(u);if(0!==c.cmpn(1))return c;var h=u.toRed(n).redPow(l);if(0!==h.cmp(a)&&0!==h.cmp(f)){for(var d=1;d>8,s=255&n;a?i.push(a,s):i.push(s);}return i;},r.zero2=n,r.toHex=a,r.encode=function(e,t){return"hex"===t?a(e):e;};},{}],144:[function(e,t,i){var r,n,a=(r=new Date(),n=4,{setLogLevel:function setLogLevel(e){n=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4);},debug:function debug(e,t){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+a.getDurationString(new Date()-r,1e3)+"]","["+e+"]",t);},log:function log(e,t){this.debug(e.msg);},info:function info(e,t){2>=n&&console.info("["+a.getDurationString(new Date()-r,1e3)+"]","["+e+"]",t);},warn:function warn(e,t){3>=n&&a.getDurationString(new Date()-r,1e3);},error:function error(e,t){4>=n&&console.error("["+a.getDurationString(new Date()-r,1e3)+"]","["+e+"]",t);}});a.getDurationString=function(e,t){var i;function r(e,t){for(var i=(""+e).split(".");i[0].length0){for(var i="",r=0;r0&&(i+=","),i+="["+a.getDurationString(e.start(r))+","+a.getDurationString(e.end(r))+"]";}return i;}return"(empty)";},void 0!==i&&(i.Log=a);var s=function s(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0;};s.prototype.getPosition=function(){return this.position;},s.prototype.getEndPosition=function(){return this.buffer.byteLength;},s.prototype.getLength=function(){return this.buffer.byteLength;},s.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0;},s.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition();},s.prototype.readAnyInt=function(e,t){var i=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:i=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:i=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";i=this.dataview.getUint8(this.position)<<16,i|=this.dataview.getUint8(this.position)<<8,i|=this.dataview.getUint8(this.position);break;case 4:i=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";i=this.dataview.getUint32(this.position)<<32,i|=this.dataview.getUint32(this.position);break;default:throw"readInt method not implemented for size: "+e;}return this.position+=e,i;}throw"Not enough bytes in buffer";},s.prototype.readUint8=function(){return this.readAnyInt(1,!1);},s.prototype.readUint16=function(){return this.readAnyInt(2,!1);},s.prototype.readUint24=function(){return this.readAnyInt(3,!1);},s.prototype.readUint32=function(){return this.readAnyInt(4,!1);},s.prototype.readUint64=function(){return this.readAnyInt(8,!1);},s.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",i=0;ithis._byteLength&&(this._byteLength=t);else{for(i<1&&(i=1);t>i;){i*=2;}var r=new ArrayBuffer(i),n=new Uint8Array(this._buffer);new Uint8Array(r,0,n.length).set(n),this.buffer=r,this._byteLength=t;}}},o.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),i=new Uint8Array(this._buffer,0,t.length);t.set(i),this.buffer=e;}},o.BIG_ENDIAN=!1,o.LITTLE_ENDIAN=!0,o.prototype._byteLength=0,Object.defineProperty(o.prototype,"byteLength",{get:function get(){return this._byteLength-this._byteOffset;}}),Object.defineProperty(o.prototype,"buffer",{get:function get(){return this._trimAlloc(),this._buffer;},set:function set(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength;}}),Object.defineProperty(o.prototype,"byteOffset",{get:function get(){return this._byteOffset;},set:function set(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength;}}),Object.defineProperty(o.prototype,"dataView",{get:function get(){return this._dataView;},set:function set(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength;}}),o.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t;},o.prototype.isEof=function(){return this.position>=this._byteLength;},o.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t;},o.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Int32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Int16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t;},o.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Uint32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Uint16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t;},o.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var i=new Float64Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Float32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t;},o.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t;},o.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e;},o.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t;},o.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t;},o.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e;},o.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t;},o.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t;},o.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,o.memcpy=function(e,t,i,r,n){var a=new Uint8Array(e,t,n),s=new Uint8Array(i,r,n);a.set(s);},o.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e);},o.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e);},o.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i=0;in;r--,n++){var a=t[n];t[n]=t[r],t[r]=a;}}return e;},o.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],i=0;i>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e);},o.prototype.adjustUint32=function(e,t){var i=this.position;this.seek(e),this.writeUint32(t),this.seek(i);},o.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var i=new Int32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i;},o.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var i=new Int16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i;},o.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t;},o.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i;},o.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i;},o.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var i=new Float64Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=8*e,i;},o.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var i=new Float32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i;};var f=function f(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0);};(f.prototype=new o(new ArrayBuffer(),0,o.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1));},ArrayBuffer.concat=function(e,t){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),e.byteLength),i.buffer;},f.prototype.reduceBuffer=function(e,t,i){var r;return(r=new Uint8Array(i)).set(new Uint8Array(e,t,i)),r.buffer.fileStart=e.fileStart+t,r.buffer.usedBytes=0,r.buffer;},f.prototype.insertBuffer=function(e){for(var t=!0,i=0;ir.byteLength){this.buffers.splice(i,1),i--;continue;}a.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring");}else e.fileStart+e.byteLength<=r.fileStart||(e=this.reduceBuffer(e,0,r.fileStart-e.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(i,0,e),0===i&&(this.buffer=e);t=!1;break;}if(e.fileStart0)){t=!1;break;}e=this.reduceBuffer(e,n,s);}}t&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===i&&(this.buffer=e));},f.prototype.logBufferLevel=function(e){var t,i,r,n,s,o=[],l="";for(r=0,n=0,t=0;t0&&(l+=s.end-1+"]");var f=e?a.info:a.debug;0===this.buffers.length?f("MultiBufferStream","No more buffer in memory"):f("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+r+"/"+n+" bytes): "+l);},f.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0;}return!1;}return!1;},f.prototype.findPosition=function(e,t,i){var r,n=null,s=-1;for(r=!0===e?0:this.bufferIndex;r=t?(a.debug("MultiBufferStream","Found position in existing buffer #"+s),s):-1;},f.prototype.findEndContiguousBuf=function(e){var t,i,r,n=void 0!==e?e:this.bufferIndex;if(i=this.buffers[n],this.buffers.length>n+1)for(t=n+1;t>3;return 31===r&&i.data.length>=2&&(r=32+((7&i.data[0])<<3)+((224&i.data[1])>>5)),r;}return null;},i.DecoderConfigDescriptor=function(e){i.Descriptor.call(this,4,e);},i.DecoderConfigDescriptor.prototype=new i.Descriptor(),i.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e);},i.DecoderSpecificInfo=function(e){i.Descriptor.call(this,5,e);},i.DecoderSpecificInfo.prototype=new i.Descriptor(),i.SLConfigDescriptor=function(e){i.Descriptor.call(this,6,e);},i.SLConfigDescriptor.prototype=new i.Descriptor(),this;};void 0!==i&&(i.MPEG4DescriptorParser=u);var c={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function initialize(){c.FullBox.prototype=new c.Box(),c.ContainerBox.prototype=new c.Box(),c.SampleEntry.prototype=new c.Box(),c.TrackGroupTypeBox.prototype=new c.FullBox(),c.BASIC_BOXES.forEach(function(e){c.createBoxCtor(e);}),c.FULL_BOXES.forEach(function(e){c.createFullBoxCtor(e);}),c.CONTAINER_BOXES.forEach(function(e){c.createContainerBoxCtor(e[0],null,e[1]);});},Box:function Box(e,t,i){this.type=e,this.size=t,this.uuid=i;},FullBox:function FullBox(e,t,i){c.Box.call(this,e,t,i),this.flags=0,this.version=0;},ContainerBox:function ContainerBox(e,t,i){c.Box.call(this,e,t,i),this.boxes=[];},SampleEntry:function SampleEntry(e,t,i,r){c.ContainerBox.call(this,e,t),this.hdr_size=i,this.start=r;},SampleGroupEntry:function SampleGroupEntry(e){this.grouping_type=e;},TrackGroupTypeBox:function TrackGroupTypeBox(e,t){c.FullBox.call(this,e,t);},createBoxCtor:function createBoxCtor(e,t){c.boxCodes.push(e),c[e+"Box"]=function(t){c.Box.call(this,e,t);},c[e+"Box"].prototype=new c.Box(),t&&(c[e+"Box"].prototype.parse=t);},createFullBoxCtor:function createFullBoxCtor(e,t){c[e+"Box"]=function(t){c.FullBox.call(this,e,t);},c[e+"Box"].prototype=new c.FullBox(),c[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e);};},addSubBoxArrays:function addSubBoxArrays(e){if(e){this.subBoxNames=e;for(var t=e.length,i=0;ii?(a.error("BoxParser","Box of type '"+u+"' has a size "+f+" greater than its container size "+i),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):o+f>e.getEndPosition()?(e.seek(o),a.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):t?{code:c.OK,type:u,size:f,hdr_size:l,start:o}:(c[u+"Box"]?r=new c[u+"Box"](f):"uuid"!==u?(a.warn("BoxParser","Unknown box type: '"+u+"'"),(r=new c.Box(u,f)).has_unparsed_data=!0):c.UUIDBoxes[s]?r=new c.UUIDBoxes[s](f):(a.warn("BoxParser","Unknown uuid type: '"+s+"'"),(r=new c.Box(u,f)).uuid=s,r.has_unparsed_data=!0),r.hdr_size=l,r.start=o,r.write===c.Box.prototype.write&&"mdat"!==r.type&&(a.info("BoxParser","'"+h+"' box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(e)),r.parse(e),(n=e.getPosition()-(r.start+r.size))<0?(a.warn("BoxParser","Parsing of box '"+h+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),e.seek(r.start+r.size)):n>0&&(a.error("BoxParser","Parsing of box '"+h+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),e.seek(r.start+r.size)),{code:c.OK,box:r,size:r.size});},c.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size);},c.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size;},c.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size;},c.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4;},c.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size);},c.ContainerBox.prototype.parse=function(e){for(var t,i;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96);},c.SAMPLE_ENTRY_TYPE_VISUAL="Visual",c.SAMPLE_ENTRY_TYPE_AUDIO="Audio",c.SAMPLE_ENTRY_TYPE_HINT="Hint",c.SAMPLE_ENTRY_TYPE_METADATA="Metadata",c.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",c.SAMPLE_ENTRY_TYPE_SYSTEM="System",c.SAMPLE_ENTRY_TYPE_TEXT="Text",c.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8;},c.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size);},c.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size;},c.SampleEntry.prototype.parseFooter=function(e){c.ContainerBox.prototype.parse.call(this,e);},c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_HINT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e);}),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e);}),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT,"enct"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA,"encm"),c.createBoxCtor("av1C",function(e){var t=e.readUint8();if(t>>7&!1)a.error("av1C marker problem");else if(this.version=127&t,1===this.version){if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void a.error("av1C reserved_2 parsing problem");var i=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(i);}else a.error("av1C reserved_1 parsing problem");}else a.error("av1C version "+this.version+" not supported");}),c.createBoxCtor("avcC",function(e){var t,i;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),i=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(i));}),c.createBoxCtor("btrt",function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32();}),c.createBoxCtor("clap",function(e){this.cleanApertureWidthN=e.readUint32(),this.cleanApertureWidthD=e.readUint32(),this.cleanApertureHeightN=e.readUint32(),this.cleanApertureHeightD=e.readUint32(),this.horizOffN=e.readUint32(),this.horizOffD=e.readUint32(),this.vertOffN=e.readUint32(),this.vertOffD=e.readUint32();}),c.createBoxCtor("clli",function(e){this.max_content_light_level=e.readUint16(),this.max_pic_average_light_level=e.readUint16();}),c.createFullBoxCtor("co64",function(e){var t,i;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(i=0;i>7;}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4));}),c.createFullBoxCtor("cprt",function(e){this.parseLanguage(e),this.notice=e.readCString();}),c.createFullBoxCtor("cslg",function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32());}),c.createFullBoxCtor("ctts",function(e){var t,i;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(i=0;i>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|i>>6&3,this.acmod=i>>3&7,this.lfeon=i>>2&1,this.bit_rate_code=3&i|r>>5&7;}),c.createBoxCtor("dec3",function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var i=0;i>6,r.bsid=n>>1&31,r.bsmod=(1&n)<<4|a>>4&15,r.acmod=a>>1&7,r.lfeon=1&a,r.num_dep_sub=s>>1&15,r.num_dep_sub>0&&(r.chan_loc=(1&s)<<8|e.readUint8());}}),c.createFullBoxCtor("dfLa",function(e){var t=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var r=e.readUint8(),n=Math.min(127&r,i.length-1);if(n?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(i[n]),128&r)break;}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")";}),c.createBoxCtor("dimm",function(e){this.bytessent=e.readUint64();}),c.createBoxCtor("dmax",function(e){this.time=e.readUint32();}),c.createBoxCtor("dmed",function(e){this.bytessent=e.readUint64();}),c.createFullBoxCtor("dref",function(e){var t,i;this.entries=[];for(var r=e.readUint32(),n=0;n=4;){this.compatible_brands[i]=e.readString(4),t-=4,i++;}}),c.createFullBoxCtor("hdlr",function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)));}),c.createBoxCtor("hvcC",function(e){var t,i,r,n;this.configurationVersion=e.readUint8(),n=e.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),n=e.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var a=e.readUint8();for(t=0;t>7,s.nalu_type=63&n;var o=e.readUint16();for(i=0;i>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var i=0;if(this.version<2)i=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";i=e.readUint32();}for(var r=0;r=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()));}),c.createFullBoxCtor("ipma",function(e){var t,i;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?s.property_index=(127&a)<<8|e.readUint8():s.property_index=127&a;}}}),c.createFullBoxCtor("iref",function(e){var t,i;for(this.references=[];e.getPosition()>7,r.assignment_type=127&n,r.assignment_type){case 0:r.grouping_type=e.readString(4);break;case 1:r.grouping_type=e.readString(4),r.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:r.sub_track_id=e.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type");}}}),c.createBoxCtor("maxr",function(e){this.period=e.readUint32(),this.bytes=e.readUint32();}),c.createBoxCtor("mdcv",function(e){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=e.readUint16(),this.display_primaries[0].y=e.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=e.readUint16(),this.display_primaries[1].y=e.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=e.readUint16(),this.display_primaries[2].y=e.readUint16(),this.white_point={},this.white_point.x=e.readUint16(),this.white_point.y=e.readUint16(),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32();}),c.createFullBoxCtor("mdhd",function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16();}),c.createFullBoxCtor("mehd",function(e){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32();}),c.createFullBoxCtor("meta",function(e){this.boxes=[],c.ContainerBox.prototype.parse.call(this,e);}),c.createFullBoxCtor("mfhd",function(e){this.sequence_number=e.readUint32();}),c.createFullBoxCtor("mfro",function(e){this._size=e.readUint32();}),c.createFullBoxCtor("mvhd",function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32();}),c.createBoxCtor("npck",function(e){this.packetssent=e.readUint32();}),c.createBoxCtor("nump",function(e){this.packetssent=e.readUint64();}),c.createFullBoxCtor("padb",function(e){var t=e.readUint32();this.padbits=[];for(var i=0;i0){var t=e.readUint32();this.kid=[];for(var i=0;i0&&(this.data=e.readUint8Array(r));}),c.createFullBoxCtor("clef",function(e){this.width=e.readUint32(),this.height=e.readUint32();}),c.createFullBoxCtor("enof",function(e){this.width=e.readUint32(),this.height=e.readUint32();}),c.createFullBoxCtor("prof",function(e){this.width=e.readUint32(),this.height=e.readUint32();}),c.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),c.createBoxCtor("rtp ",function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4);}),c.createFullBoxCtor("saio",function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var i=0;i>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var i=e.readUint8(),r=0;r>7,this.num_leading_samples=127&t;}),c.createSampleGroupCtor("rash",function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=c.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size));}),c.createSampleGroupCtor("stsa",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),c.createSampleGroupCtor("sync",function(e){var t=e.readUint8();this.NAL_unit_type=63&t;}),c.createSampleGroupCtor("tele",function(e){var t=e.readUint8();this.level_independently_decodable=t>>7;}),c.createSampleGroupCtor("tsas",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),c.createSampleGroupCtor("tscl",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),c.createSampleGroupCtor("vipr",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),c.createFullBoxCtor("sbgp",function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),i=0;i>6,this.sample_depends_on[r]=t>>4&3,this.sample_is_depended_on[r]=t>>2&3,this.sample_has_redundancy[r]=3&t;}}),c.createFullBoxCtor("senc"),c.createFullBoxCtor("sgpd",function(e){this.grouping_type=e.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),i=0;i>31&1,r.referenced_size=2147483647&n,r.subsegment_duration=e.readUint32(),n=e.readUint32(),r.starts_with_SAP=n>>31&1,r.SAP_type=n>>28&7,r.SAP_delta_time=268435455&n;}}),c.SingleItemTypeReferenceBox=function(e,t,i,r){c.Box.call(this,e,t),this.hdr_size=i,this.start=r;},c.SingleItemTypeReferenceBox.prototype=new c.Box(),c.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var i=0;i>4&15,this.sample_sizes[t+1]=15&r;}else if(8===this.field_size)for(t=0;t0)for(i=0;i>4&15,this.default_skip_byte_block=15&t;}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=c.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size));}),c.createFullBoxCtor("tfdt",function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32();}),c.createFullBoxCtor("tfhd",function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0;}),c.createFullBoxCtor("tfra",function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var i=e.readUint32(),r=0;r>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32();}),c.createBoxCtor("tmax",function(e){this.time=e.readUint32();}),c.createBoxCtor("tmin",function(e){this.time=e.readUint32();}),c.createBoxCtor("totl",function(e){this.bytessent=e.readUint32();}),c.createBoxCtor("tpay",function(e){this.bytessent=e.readUint32();}),c.createBoxCtor("tpyl",function(e){this.bytessent=e.readUint64();}),c.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32();},c.createTrackGroupCtor("msrc"),c.TrackReferenceTypeBox=function(e,t,i,r){c.Box.call(this,e,t),this.hdr_size=i,this.start=r;},c.TrackReferenceTypeBox.prototype=new c.Box(),c.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4);},c.trefBox.prototype.parse=function(e){for(var t,i;e.getPosition()t&&this.flags&c.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var i=0;i0&&(this.location=e.readCString());}),c.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");}),c.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(e){this.system_id=c.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t));}),c.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),c.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=c.parseHex16(e);}),c.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize));}),c.createBoxCtor("vttC",function(e){this.text=e.readString(this.size-this.hdr_size);}),c.SampleEntry.prototype.isVideo=function(){return!1;},c.SampleEntry.prototype.isAudio=function(){return!1;},c.SampleEntry.prototype.isSubtitle=function(){return!1;},c.SampleEntry.prototype.isMetadata=function(){return!1;},c.SampleEntry.prototype.isHint=function(){return!1;},c.SampleEntry.prototype.getCodec=function(){return this.type.replace(".","");},c.SampleEntry.prototype.getWidth=function(){return"";},c.SampleEntry.prototype.getHeight=function(){return"";},c.SampleEntry.prototype.getChannelCount=function(){return"";},c.SampleEntry.prototype.getSampleRate=function(){return"";},c.SampleEntry.prototype.getSampleSize=function(){return"";},c.VisualSampleEntry.prototype.isVideo=function(){return!0;},c.VisualSampleEntry.prototype.getWidth=function(){return this.width;},c.VisualSampleEntry.prototype.getHeight=function(){return this.height;},c.AudioSampleEntry.prototype.isAudio=function(){return!0;},c.AudioSampleEntry.prototype.getChannelCount=function(){return this.channel_count;},c.AudioSampleEntry.prototype.getSampleRate=function(){return this.samplerate;},c.AudioSampleEntry.prototype.getSampleSize=function(){return this.samplesize;},c.SubtitleSampleEntry.prototype.isSubtitle=function(){return!0;},c.MetadataSampleEntry.prototype.isMetadata=function(){return!0;},c.decimalToHex=function(e,t){var i=Number(e).toString(16);for(t=null==t?t=2:t;i.length>=1;}t+=c.decimalToHex(r,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var n=!1,a="";for(e=5;e>=0;e--){(this.hvcC.general_constraint_indicator[e]||n)&&(a="."+c.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+a,n=!0);}t+=a;}return t;},c.mp4aSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),i=this.esds.esd.getAudioConfig();return e+"."+c.decimalToHex(t)+(i?"."+i:"");}return e;},c.stxtSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e;},c.av01SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this);return 2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+this.av1C.seq_level_idx_0+(this.av1C.seq_tier_0?"H":"M")+"."+e;},c.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>l?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>l&&e.writeUint64(this.size);},c.FullBox.prototype.writeHeader=function(e){this.size+=4,c.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags);},c.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data));},c.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1-1||e[i]instanceof c.Box||t[i]instanceof c.Box||void 0===e[i]||void 0===t[i]||"function"==typeof e[i]||"function"==typeof t[i]||e.subBoxNames&&e.subBoxNames.indexOf(i.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(i.slice(0,4))>-1||"data"===i||"start"===i||"size"===i||"creation_time"===i||"modification_time"===i||c.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1||e[i]===t[i]))return!1;}return!0;},c.boxEqual=function(e,t){if(!c.boxEqualFields(e,t))return!1;for(var i=0;i=t?e:new Array(t-e.length+1).join(i)+e;}function n(e){var t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),n=Math.floor(e-3600*t-60*i),a=Math.floor(1e3*(e-3600*t-60*i-n));return r(t,2)+":"+r(i,2)+":"+r(n,2)+"."+r(a,3);}for(var a=this.parseSample(i),s="",o=0;o1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1);},p.prototype.setExtractionOptions=function(e,t,i){var r=this.getTrackById(e);if(r){var n={};this.extractedTracks.push(n),n.id=e,n.user=t,n.trak=r,r.nextSample=0,n.nb_samples=1e3,n.samples=[],i&&i.nbSamples&&(n.nb_samples=i.nbSamples);}},p.prototype.unsetExtractionOptions=function(e){for(var t=-1,i=0;i-1&&this.extractedTracks.splice(t,1);},p.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return;}if(this.saveParsePosition&&this.saveParsePosition(),(e=c.parseOneBox(this.stream,!1)).code===c.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return;}return;}var i;switch(i="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),i){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[i]&&a.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=t;}this.updateUsedBytes&&this.updateUsedBytes(t,e);}},p.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1));},p.prototype.appendBuffer=function(e,t){var i;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(i=this.nextSeekPosition,this.nextSeekPosition=void 0):i=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(i=this.stream.getEndFilePositionAfter(i))):i=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+i),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i;},p.prototype.getInfo=function(){var e,t,i,r,n,a={},s=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(a.hasMoov=!0,a.duration=this.moov.mvhd.duration,a.timescale=this.moov.mvhd.timescale,a.isFragmented=null!=this.moov.mvex,a.isFragmented&&this.moov.mvex.mehd&&(a.fragment_duration=this.moov.mvex.mehd.fragment_duration),a.isProgressive=this.isProgressive,a.hasIOD=null!=this.moov.iods,a.brands=[],a.brands.push(this.ftyp.major_brand),a.brands=a.brands.concat(this.ftyp.compatible_brands),a.created=new Date(s+1e3*this.moov.mvhd.creation_time),a.modified=new Date(s+1e3*this.moov.mvhd.modification_time),a.tracks=[],a.audioTracks=[],a.videoTracks=[],a.subtitleTracks=[],a.metadataTracks=[],a.hintTracks=[],a.otherTracks=[],e=0;e0?a.mime+='video/mp4; codecs="':a.audioTracks&&a.audioTracks.length>0?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e=i.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+r.id+" for samples ["+Math.max(0,i.nextSample-r.nb_samples)+","+(i.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(r.id,r.user,r.segmentStream.buffer,i.nextSample,e||i.nextSample>=i.samples.length),r.segmentStream=null,r!==this.fragmentedTracks[t]))break;}}if(null!==this.onSamples)for(t=0;t=i.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+s.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(s.id,s.user,s.samples),s.samples=[],s!==this.extractedTracks[t]))break;}}}},p.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null;},p.prototype.getBoxes=function(e,t){var i=[];return p._sweep.call(this,e,i,t),i;},p._sweep=function(e,t,i){for(var r in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;p._sweep.call(this.boxes[r],e,t,i);}},p.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0;},p.prototype.getTrackSample=function(e,t){var i=this.getTrackById(e);return this.getSample(i,t);},p.prototype.releaseUsedSamples=function(e,t){var i=0,r=this.getTrackById(e);r.lastValidSample||(r.lastValidSample=0);for(var n=r.lastValidSample;ne*n.timescale){f=r-1;break;}t&&n.is_sync&&(l=r);}for(t&&(f=l),e=i.samples[f].cts,i.nextSample=f;i.samples[f].alreadyRead===i.samples[f].size&&i.samples[f+1];){f++;}return s=i.samples[f].offset+i.samples[f].alreadyRead,a.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+a.getDurationString(e,o)+" and offset: "+s),{offset:s,time:e/o};},p.prototype.seek=function(e,t){var i,r,n,s=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(n=0;n-1){s=o;break;}}}switch(s){case"Visual":n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24);break;case"Audio":n.add("smhd").set("balance",t.balance||0),a.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":switch(n.add("sthd"),t.type){case"stpp":a.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");}break;case"Metadata":case"System":default:n.add("nmhd");}t.description&&a.addBox(t.description),t.description_boxes&&t.description_boxes.forEach(function(e){a.addBox(e);}),n.add("dinf").add("dref").addEntry(new c["url Box"]().set("flags",1));var u=n.add("stbl");return u.add("stsd").addEntry(a),u.add("stts").set("sample_counts",[]).set("sample_deltas",[]),u.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),u.add("stco").set("chunk_offsets",[]),u.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(i),t.id;}},c.Box.prototype.computeSize=function(e){var t=e||new o();t.endianness=o.BIG_ENDIAN,this.write(t);},p.prototype.addSample=function(e,t,i){var r=i||{},n={},a=this.getTrackById(e);if(null!==a){n.number=a.samples.length,n.track_id=a.tkhd.track_id,n.timescale=a.mdia.mdhd.timescale,n.description_index=r.sample_description_index?r.sample_description_index-1:0,n.description=a.mdia.minf.stbl.stsd.entries[n.description_index],n.data=t,n.size=t.length,n.alreadyRead=n.size,n.duration=r.duration||1,n.cts=r.cts||0,n.dts=r.dts||0,n.is_sync=r.is_sync||!1,n.is_leading=r.is_leading||0,n.depends_on=r.depends_on||0,n.is_depended_on=r.is_depended_on||0,n.has_redundancy=r.has_redundancy||0,n.degradation_priority=r.degradation_priority||0,n.offset=0,n.subsamples=r.subsamples,a.samples.push(n),a.samples_size+=n.size,a.samples_duration+=n.duration,this.processSamples();var s=p.createSingleSampleMoof(n);return this.addBox(s),s.computeSize(),s.trafs[0].truns[0].data_offset=s.size+8,this.add("mdat").data=t,n;}},p.createSingleSampleMoof=function(e){var t=new c.moofBox();t.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=t.add("traf");return i.add("tfhd").set("track_id",e.track_id).set("flags",c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts),i.add("trun").set("flags",c.TRUN_FLAGS_DATA_OFFSET|c.TRUN_FLAGS_DURATION|c.TRUN_FLAGS_SIZE|c.TRUN_FLAGS_FLAGS|c.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[0]).set("sample_composition_time_offset",[e.cts-e.dts]),t;},p.prototype.lastMoofIndex=0,p.prototype.samplesDataSize=0,p.prototype.resetTables=function(){var e,t,i,r,n,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=n[s].grouping_type+"/0",(o=new f(n[s].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=o));}}else for(s=0;s=2&&(l=r[s].grouping_type+"/0",o=new f(r[s].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=o));}},p.setSampleGroupProperties=function(e,t,i,r){var n,a;for(n in t.sample_groups=[],r){var s;if(t.sample_groups[n]={},t.sample_groups[n].grouping_type=r[n].grouping_type,t.sample_groups[n].grouping_type_parameter=r[n].grouping_type_parameter,i>=r[n].last_sample_in_run&&(r[n].last_sample_in_run<0&&(r[n].last_sample_in_run=0),r[n].entry_index++,r[n].entry_index<=r[n].sbgp.entries.length-1&&(r[n].last_sample_in_run+=r[n].sbgp.entries[r[n].entry_index].sample_count)),r[n].entry_index<=r[n].sbgp.entries.length-1?t.sample_groups[n].group_description_index=r[n].sbgp.entries[r[n].entry_index].group_description_index:t.sample_groups[n].group_description_index=-1,0!==t.sample_groups[n].group_description_index)s=r[n].fragment_description?r[n].fragment_description:r[n].description,t.sample_groups[n].group_description_index>0?(a=t.sample_groups[n].group_description_index>65535?(t.sample_groups[n].group_description_index>>16)-1:t.sample_groups[n].group_description_index-1,s&&a>=0&&(t.sample_groups[n].description=s.entries[a])):s&&s.version>=2&&s.default_group_description_index>0&&(t.sample_groups[n].description=s.entries[s.default_group_description_index-1]);}},p.process_sdtp=function(e,t,i){t&&(e?(t.is_leading=e.is_leading[i],t.depends_on=e.sample_depends_on[i],t.is_depended_on=e.sample_is_depended_on[i],t.has_redundancy=e.sample_has_redundancy[i]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0));},p.prototype.buildSampleLists=function(){var e,t;for(e=0;ey&&(g++,y<0&&(y=0),y+=a.sample_counts[g]),t>0?(e.samples[t-1].duration=a.sample_deltas[g],e.samples_duration+=e.samples[t-1].duration,T.dts=e.samples[t-1].dts+e.samples[t-1].duration):T.dts=0,s?(t>=w&&(E++,w<0&&(w=0),w+=s.sample_counts[E]),T.cts=e.samples[t].dts+s.sample_offsets[E]):T.cts=T.dts,o?(t==o.sample_numbers[C]-1?(T.is_sync=!0,C++):(T.is_sync=!1,T.degradation_priority=0),f&&f.entries[S].sample_delta+j==t+1&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta,S++)):T.is_sync=!0,p.process_sdtp(e.mdia.minf.stbl.sdtp,T,T.number),T.degradation_priority=h?h.priority[t]:0,f&&f.entries[S].sample_delta+j==t&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta),(u.length>0||c.length>0)&&p.setSampleGroupProperties(e,T,t,e.sample_groups_info);}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration);}},p.prototype.updateSampleLists=function(){var e,t,i,r,n,a,s,o,l,f,u,h,d,_,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&p.initSampleGroups(h,u,u.sbgps,h.mdia.minf.stbl.sgpds,u.sgpds),t=0;t0?_.dts=h.samples[h.samples.length-2].dts+h.samples[h.samples.length-2].duration:(u.tfdt?_.dts=u.tfdt.baseMediaDecodeTime:_.dts=0,h.first_traf_merged=!0),_.cts=_.dts,b.flags&c.TRUN_FLAGS_CTS_OFFSET&&(_.cts=_.dts+b.sample_composition_time_offset[i]),m=s,b.flags&c.TRUN_FLAGS_FLAGS?m=b.sample_flags[i]:0===i&&b.flags&c.TRUN_FLAGS_FIRST_FLAG&&(m=b.first_sample_flags),_.is_sync=!(m>>16&1),_.is_leading=m>>26&3,_.depends_on=m>>24&3,_.is_depended_on=m>>22&3,_.has_redundancy=m>>20&3,_.degradation_priority=65535&m;var v=!!(u.tfhd.flags&c.TFHD_FLAG_BASE_DATA_OFFSET),y=!!(u.tfhd.flags&c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),g=!!(b.flags&c.TRUN_FLAGS_DATA_OFFSET),w=0;w=v?u.tfhd.base_data_offset:y||0===t?f.start:o,_.offset=0===t&&0===i?g?w+b.data_offset:w:o,o=_.offset+_.size,(u.sbgps.length>0||u.sgpds.length>0||h.mdia.minf.stbl.sbgps.length>0||h.mdia.minf.stbl.sgpds.length>0)&&p.setSampleGroupProperties(h,_,_.number_in_traf,u.sample_groups_info);}}if(u.subs){h.has_fragment_subsamples=!0;var E=u.first_sample_index;for(t=0;t-1))return null;var s=(i=this.stream.buffers[n]).byteLength-(r.offset+r.alreadyRead-i.fileStart);if(r.size-r.alreadyRead<=s)return a.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+(r.size-r.alreadyRead)+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,r.size-r.alreadyRead),i.usedBytes+=r.size-r.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead=r.size,r;if(0===s)return null;a.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+s+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,s),r.alreadyRead+=s,i.usedBytes+=s,this.stream.logBufferLevel();}},p.prototype.releaseSample=function(e,t){var i=e.samples[t];return i.data?(this.samplesDataSize-=i.size,i.data=null,i.alreadyRead=0,i.size):0;},p.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize;},p.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec();}return t;},p.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(i.protection=n.ipro.protections[n.iinf.item_infos[e].protection_index-1]),n.iinf.item_infos[e].item_type?i.type=n.iinf.item_infos[e].item_type:i.type="mime",i.content_type=n.iinf.item_infos[e].content_type,i.content_encoding=n.iinf.item_infos[e].content_encoding;}if(n.iloc)for(e=0;e0){var h=n.iprp.ipco.boxes[c.property_index-1];i.properties[h.type]=h,i.properties.boxes.push(h);}}}}}},p.prototype.getItem=function(e){var t,i;if(!this.meta)return null;if(!(i=this.items[e]).data&&i.size)i.data=new Uint8Array(i.size),i.alreadyRead=0,this.itemsDataSize+=i.size,a.debug("ISOFile","Allocating item #"+e+" of size "+i.size+" (total: "+this.itemsDataSize+")");else if(i.alreadyRead===i.size)return i;for(var r=0;r-1))return null;var l=(t=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-t.fileStart);if(!(n.length-n.alreadyRead<=l))return a.debug("ISOFile","Getting item #"+e+" extent #"+r+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+l+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,l),n.alreadyRead+=l,i.alreadyRead+=l,t.usedBytes+=l,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+e+" extent #"+r+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,n.length-n.alreadyRead),t.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length;}}return i.alreadyRead===i.size?i:null;},p.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var i=0;i0?this.moov.traks[e].samples[0].duration:0),t.push(r);}return t;},c.Box.prototype.printHeader=function(e){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type);},c.FullBox.prototype.printHeader=function(e){this.size+=4,c.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags);},c.Box.prototype.print=function(e){this.printHeader(e);},c.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id);},c.tkhdBox.prototype.print=function(e){c.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height);};var m={createFile:function createFile(e,t){var i=void 0===e||e,r=new p(t);return r.discardMdatData=!i,r;}};void 0!==i&&(i.createFile=m.createFile);},{}],145:[function(e,t,i){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"};},{}],146:[function(e,t,i){"use strict";var r=e("asn1.js");i.certificate=e("./certificate");var n=r.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"]());});i.RSAPrivateKey=n;var a=r.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus")["int"](),this.key("publicExponent")["int"]());});i.RSAPublicKey=a;var s=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr());});i.PublicKey=s;var o=r.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());}),l=r.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version")["int"](),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr());});i.PrivateKey=l;var f=r.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());});i.EncryptedPrivateKey=f;var u=r.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"]());});i.DSAPrivateKey=u,i.DSAparam=r.define("DSAparam",function(){this["int"]();});var c=r.define("ECPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr());});i.ECPrivateKey=c;var h=r.define("ECParameters",function(){this.choice({namedCurve:this.objid()});});i.signature=r.define("signature",function(){this.seq().obj(this.key("r")["int"](),this.key("s")["int"]());});},{"./certificate":147,"asn1.js":2}],147:[function(e,t,i){"use strict";var r=e("asn1.js"),n=r.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()});}),a=r.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any());}),s=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional());}),o=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr());}),l=r.define("RelativeDistinguishedName",function(){this.setof(a);}),f=r.define("RDNSequence",function(){this.seqof(l);}),u=r.define("Name",function(){this.choice({rdnSequence:this.use(f)});}),c=r.define("Validity",function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n));}),h=r.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr());}),d=r.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0)["int"]().optional(),this.key("serialNumber")["int"](),this.key("signature").use(s),this.key("issuer").use(u),this.key("validity").use(c),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional());}),_=r.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr());});t.exports=_;},{"asn1.js":2}],148:[function(e,t,i){var r=/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,s=e("evp_bytestokey"),o=e("browserify-aes"),l=e("safe-buffer").Buffer;t.exports=function(e,t){var i,f=e.toString(),u=f.match(r);if(u){var c="aes"+u[1],h=l.from(u[2],"hex"),d=l.from(u[3].replace(/[\r\n]/g,""),"base64"),_=s(t,h.slice(0,8),parseInt(u[1],10)).key,p=[],m=o.createDecipheriv(c,_,h);p.push(m.update(d)),p.push(m["final"]()),i=l.concat(p);}else{var b=f.match(a);i=l.from(b[2].replace(/[\r\n]/g,""),"base64");}return{tag:f.match(n)[1],data:i};};},{"browserify-aes":23,evp_bytestokey:105,"safe-buffer":184}],149:[function(e,t,i){var r=e("./asn1"),n=e("./aesid.json"),a=e("./fixProc"),s=e("browserify-aes"),o=e("pbkdf2"),l=e("safe-buffer").Buffer;function f(e){var t;"object"!=_typeof(e)||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var i,f,u=a(e,t),c=u.tag,h=u.data;switch(c){case"CERTIFICATE":f=r.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=r.PublicKey.decode(h,"der")),i=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=r.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+i);}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=n[e.algorithm.decrypt.cipher.algo.join(".")],f=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,c=parseInt(a.split("-")[1],10)/8,h=o.pbkdf2Sync(t,i,r,c,"sha1"),d=s.createDecipheriv(a,h,f),_=[];return _.push(d.update(u)),_.push(d["final"]()),l.concat(_);}(h=r.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(i=(f=r.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:r.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=r.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+i);}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=r.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+c);}}t.exports=f,f.signature=r.signature;},{"./aesid.json":145,"./asn1":146,"./fixProc":148,"browserify-aes":23,pbkdf2:151,"safe-buffer":184}],150:[function(e,t,i){(function(e){function t(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--);}if(t)for(;i--;i){e.unshift("..");}return e;}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],r=0;r=-1&&!n;a--){var s=a>=0?arguments[a]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(i=s+"/"+i,n="/"===s.charAt(0));}return(n?"/":"")+(i=t(r(i.split("/"),function(e){return!!e;}),!n).join("/"))||".";},i.normalize=function(e){var a=i.isAbsolute(e),s="/"===n(e,-1);return(e=t(r(e.split("/"),function(e){return!!e;}),!a).join("/"))||a||(e="."),e&&s&&(e+="/"),(a?"/":"")+e;},i.isAbsolute=function(e){return"/"===e.charAt(0);},i.join=function(){var e=Array.prototype.slice.call(arguments,0);return i.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e;}).join("/"));},i.relative=function(e,t){function r(e){for(var t=0;t=0&&""===e[i];i--){;}return t>i?[]:e.slice(t,i-t+1);}e=i.resolve(e).substr(1),t=i.resolve(t).substr(1);for(var n=r(e.split("/")),a=r(t.split("/")),s=Math.min(n.length,a.length),o=s,l=0;l=1;--a){if(47===(t=e.charCodeAt(a))){if(!n){r=a;break;}}else n=!1;}return-1===r?i?"/":".":i&&1===r?"/":e.slice(0,r);},i.basename=function(e,t){var i=function(e){"string"!=typeof e&&(e+="");var t,i=0,r=-1,n=!0;for(t=e.length-1;t>=0;--t){if(47===e.charCodeAt(t)){if(!n){i=t+1;break;}}else-1===r&&(n=!1,r=t+1);}return-1===r?"":e.slice(i,r);}(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i;},i.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,i=0,r=-1,n=!0,a=0,s=e.length-1;s>=0;--s){var o=e.charCodeAt(s);if(47!==o)-1===r&&(n=!1,r=s+1),46===o?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!n){i=s+1;break;}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===i+1?"":e.slice(t,r);};var n="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i);}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i);};}).call(this,e("_process"));},{_process:158}],151:[function(e,t,i){i.pbkdf2=e("./lib/async"),i.pbkdf2Sync=e("./lib/sync");},{"./lib/async":152,"./lib/sync":155}],152:[function(e,t,i){(function(i,r){var n,a=e("safe-buffer").Buffer,s=e("./precondition"),o=e("./default-encoding"),l=e("./sync"),f=e("./to-buffer"),u=r.crypto&&r.crypto.subtle,c={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function d(e,t,i,r,n){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:i,hash:{name:n}},e,r<<3);}).then(function(e){return a.from(e);});}t.exports=function(e,t,_,p,m,b){"function"==typeof m&&(b=m,m=void 0);var v=c[(m=m||"sha1").toLowerCase()];if(!v||"function"!=typeof r.Promise)return i.nextTick(function(){var i;try{i=l(e,t,_,p,m);}catch(e){return b(e);}b(null,i);});if(s(_,p),e=f(e,o,"Password"),t=f(t,o,"Salt"),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then(function(e){i.nextTick(function(){t(null,e);});},function(e){i.nextTick(function(){t(e);});});}(function(e){if(r.process&&!r.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var t=d(n=n||a.alloc(8),n,10,128,e).then(function(){return!0;})["catch"](function(){return!1;});return h[e]=t,t;}(v).then(function(i){return i?d(e,t,_,p,v):l(e,t,_,p,m);}),b);};}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{"./default-encoding":153,"./precondition":154,"./sync":155,"./to-buffer":156,_process:158,"safe-buffer":184}],153:[function(e,t,i){(function(e){var i;if(e.browser)i="utf-8";else if(e.version){i=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";}else i="utf-8";t.exports=i;}).call(this,e("_process"));},{_process:158}],154:[function(e,t,i){var r=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>r||t!=t)throw new TypeError("Bad key length");};},{}],155:[function(e,t,i){var r=e("create-hash/md5"),n=e("ripemd160"),a=e("sha.js"),s=e("safe-buffer").Buffer,o=e("./precondition"),l=e("./default-encoding"),f=e("./to-buffer"),u=s.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,i){var o=function(e){function t(t){return a(e).update(t).digest();}return"rmd160"===e||"ripemd160"===e?function(e){return new n().update(e).digest();}:"md5"===e?r:t;}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=o(t):t.length1)for(var i=1;i_||new s(t).cmp(d.modulus)>=0)throw new Error("decryption error");h=i?f(new s(t),d):o(t,d);var p=u.alloc(_-h.length);if(h=u.concat([p,h],_),4===c)return function(e,t){var i=e.modulus.byteLength(),r=l("sha1").update(u.alloc(0)).digest(),s=r.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,s+1),f=t.slice(s+1),c=a(o,n(f,s)),h=a(f,n(c,i-s-1));if(function(e,t){e=u.from(e),t=u.from(t);var i=0,r=e.length;e.length!==t.length&&(i++,r=Math.min(e.length,t.length));var n=-1;for(;++n=t.length){a++;break;}}var s=t.slice(2,n-1);("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&a++;s.length<8&&a++;if(a)throw new Error("decryption error");return t.slice(n);}(0,h,i);if(3===c)return h;throw new Error("unknown padding");};},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,"safe-buffer":184}],163:[function(e,t,i){var r=e("parse-asn1"),n=e("randombytes"),a=e("create-hash"),s=e("./mgf"),o=e("./xor"),l=e("bn.js"),f=e("./withPublic"),u=e("browserify-rsa"),c=e("safe-buffer").Buffer;t.exports=function(e,t,i){var h;h=e.padding?e.padding:i?1:4;var d,_=r(e);if(4===h)d=function(e,t){var i=e.modulus.byteLength(),r=t.length,f=a("sha1").update(c.alloc(0)).digest(),u=f.length,h=2*u;if(r>i-h-2)throw new Error("message too long");var d=c.alloc(i-r-h-2),_=i-u-1,p=n(u),m=o(c.concat([f,d,c.alloc(1,1),t],_),s(p,_)),b=o(p,s(m,u));return new l(c.concat([c.alloc(1),b,m],i));}(_,t);else if(1===h)d=function(e,t,i){var r,a=t.length,s=e.modulus.byteLength();if(a>s-11)throw new Error("message too long");r=i?c.alloc(s-a-3,255):function(e){var t,i=c.allocUnsafe(e),r=0,a=n(2*e),s=0;for(;r=0)throw new Error("data too long for modulus");}return i?u(d,_):f(d,_);};},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,randombytes:166,"safe-buffer":184}],164:[function(e,t,i){var r=e("bn.js"),n=e("safe-buffer").Buffer;t.exports=function(e,t){return n.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray());};},{"bn.js":161,"safe-buffer":184}],165:[function(e,t,i){t.exports=function(e,t){for(var i=e.length,r=-1;++r4294967295)throw new RangeError("requested too many random bytes");var r=n.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;su||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range");}function h(e,t,i){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>i||e>l)throw new RangeError("buffer too small");}function d(e,i,r,n){if(t.browser){var a=e.buffer,o=new Uint8Array(a,i,r);return f.getRandomValues(o),n?void t.nextTick(function(){n(null,e);}):e;}if(!n)return s(r).copy(e,i),e;s(r,function(t,r){if(t)return n(t);r.copy(e,i),n(null,e);});}f&&f.getRandomValues||!t.browser?(i.randomFill=function(e,t,i,n){if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)n=t,t=0,i=e.length;else if("function"==typeof i)n=i,i=e.length-t;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return c(t,e.length),h(i,t,e.length),d(e,t,i,n);},i.randomFillSync=function(e,t,i){void 0===t&&(t=0);if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');c(t,e.length),void 0===i&&(i=e.length-t);return h(i,t,e.length),d(e,t,i);}):(i.randomFill=n,i.randomFillSync=n);}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{_process:158,randombytes:166,"safe-buffer":184}],168:[function(e,t,i){t.exports=e("./lib/_stream_duplex.js");},{"./lib/_stream_duplex.js":169}],169:[function(e,t,i){"use strict";var r=e("process-nextick-args"),n=Object.keys||function(e){var t=[];for(var i in e){t.push(i);}return t;};t.exports=c;var a=Object.create(e("core-util-is"));a.inherits=e("inherits");var s=e("./_stream_readable"),o=e("./_stream_writable");a.inherits(c,s);for(var l=n(o.prototype),f=0;f0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e);}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):j(e,s)):w(e,s,t,!1))):r||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e;}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));}function C(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(S,e):S(e));}function S(e){d("emit readable"),e.emit("readable"),M(e);}function j(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(T,e,t));}function T(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;ea.length?a.length:e;if(s===a.length?n+=a:n+=a.slice(0,e),0===(e-=s)){s===a.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(s));break;}++r;}return t.length-=r,n;}(e,t):function(e,t){var i=f.allocUnsafe(e),r=t.head,n=1;r.data.copy(i),e-=r.data.length;for(;r=r.next;){var a=r.data,s=e>a.length?a.length:e;if(a.copy(i,i.length-e,0,s),0===(e-=s)){s===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break;}++n;}return t.length-=n,i;}(e,t);return r;}(e,t.buffer,t.decoder),i);var i;}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(I,t,e));}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"));}function R(e,t){for(var i=0,r=e.length;i=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):C(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&P(this),null;var r,n=t.needReadable;return d("need readable",n),(0===t.length||t.length-e0?k(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&P(this)),null!==r&&this.emit("data",r),r;},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"));},y.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e);}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,t);var l=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:y;function f(t,i){d("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",c),e.removeListener("error",m),e.removeListener("unpipe",f),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",p),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||c());}function u(){d("onend"),e.end();}a.endEmitted?n.nextTick(l):r.once("end",l),e.on("unpipe",f);var c=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e));};}(r);e.on("drain",c);var h=!1;var _=!1;function p(t){d("ondata"),_=!1,!1!==e.write(t)||_||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==R(a.pipes,e))&&!h&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,_=!0),r.pause());}function m(t){d("onerror",t),y(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t);}function b(){e.removeListener("finish",v),y();}function v(){d("onfinish"),e.removeListener("close",b),y();}function y(){d("unpipe"),r.unpipe(e);}return r.on("data",p),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i);}(e,"error",m),e.once("close",b),e.once("finish",v),e.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),e;},y.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a-1?n:a.nextTick;v.WritableState=b;var f=Object.create(e("core-util-is"));f.inherits=e("inherits");var u={deprecate:e("util-deprecate")},c=e("./internal/streams/stream"),h=e("safe-buffer").Buffer,d=r.Uint8Array||function(){};var _,p=e("./internal/streams/destroy");function m(){}function b(t,i){o=o||e("./_stream_duplex"),t=t||{};var r=i instanceof o;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,f=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(f||0===f)?f:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0;}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?(a.nextTick(n,r),a.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(n(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t));}(e,i,r,t,n);else{var s=E(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||w(e,i),r?l(g,e,i,s,n):g(e,i,s,n);}}(i,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 s(this);}function v(t){if(o=o||e("./_stream_duplex"),!(_.call(v,this)||this instanceof o))return new v(t);this._writableState=new b(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"])),c.call(this);}function y(e,t,i,r,n,a,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1;}function g(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));}(e,t),t.pendingcb--,r(),S(e,t);}function w(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),a=t.corkedRequestsFree;a.entry=i;for(var o=0,l=!0;i;){n[o]=i,i.isBuf||(l=!1),i=i.next,o+=1;}n.allBuffers=l,y(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0;}else{for(;i;){var f=i.chunk,u=i.encoding,c=i.callback;if(y(e,t,!1,t.objectMode?1:f.length,f,u,c),i=i.next,t.bufferedRequestCount--,t.writing)break;}null===i&&(t.lastBufferedRequest=null);}t.bufferedRequest=i,t.bufferProcessing=!1;}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing;}function C(e,t){e._final(function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),S(e,t);});}function S(e,t){var i=E(t);return i&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")));}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i;}f.inherits(v,c),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;){t.push(e),e=e.next;}return t;},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer();},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function value(e){return!!_.call(this,e)||this===v&&e&&e._writableState instanceof b;}})):_=function _(e){return e instanceof this;},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));},v.prototype.write=function(e,t,i){var r,n=this._writableState,s=!1,o=!n.objectMode&&(r=e,h.isBuffer(r)||r instanceof d);return o&&!h.isBuffer(e)&&(e=function(e){return h.from(e);}(e)),"function"==typeof t&&(i=t,t=null),o?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof i&&(i=m),n.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),a.nextTick(t,i);}(this,i):(o||function(e,t,i,r){var n=!0,s=!1;return null===i?s=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),a.nextTick(r,s),n=!1),n;}(this,n,e,i))&&(n.pendingcb++,s=function(e,t,i,r,n,a){if(!i){var s=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,i));return t;}(t,r,n);r!==s&&(i=!0,n="buffer",r=s);}var o=t.objectMode?1:r.length;t.length+=o;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this;},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function get(){return this._writableState.highWaterMark;}}),v.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"));},v.prototype._writev=null,v.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,S(e,t),i&&(t.finished?a.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1;}(this,r,i);},Object.defineProperty(v.prototype,"destroyed",{get:function get(){return void 0!==this._writableState&&this._writableState.destroyed;},set:function set(e){this._writableState&&(this._writableState.destroyed=e);}}),v.prototype.destroy=p.destroy,v.prototype._undestroy=p.undestroy,v.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":169,"./internal/streams/destroy":175,"./internal/streams/stream":176,_process:158,"core-util-is":68,inherits:136,"process-nextick-args":157,"safe-buffer":177,timers:196,"util-deprecate":197}],174:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.head=null,this.tail=null,this.length=0;}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length;},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length;},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e;}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0;},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;){i+=e+t.data;}return i;},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,i,n,a=r.allocUnsafe(e>>>0),s=this.head,o=0;s;){t=s.data,i=a,n=o,t.copy(i,n),o+=s.data.length,s=s.next;}return a;},e;}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e;});},{"safe-buffer":177,util:20}],175:[function(e,t,i){"use strict";var r=e("process-nextick-args");function n(e,t){e.emit("error",t);}t.exports={destroy:function destroy(e,t){var i=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(n,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(n,i,e),i._writableState&&(i._writableState.errorEmitted=!0)):t&&t(e);}),this);},undestroy:function undestroy(){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);}};},{"process-nextick-args":157}],176:[function(e,t,i){arguments[4][62][0].apply(i,arguments);},{dup:62,events:104}],177:[function(e,t,i){var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e){t[i]=e[i];}}function s(e,t,i){return n(e,t,i);}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i);},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r;},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e);},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e);};},{buffer:66}],178:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=r.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;}};function a(e){var t;switch(this.encoding=function(e){var t=function(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;}}}(e);if("string"!=typeof t&&(r.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e;}(e),this.encoding){case"utf16le":this.text=l,this.end=f,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=u,this.end=c,t=3;break;default:return this.write=h,void(this.end=d);}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t);}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2;}function o(e){var t=this.lastTotal-this.lastNeed,i=function(e,t,i){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,"�";}}(this,e);return void 0!==i?i: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 l(e,t){if((e.length-t)%2==0){var i=e.toString("utf16le",t);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1);}return i;}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i);}return t;}function u(e,t){var i=(e.length-t)%3;return 0===i?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?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-i));}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t;}function h(e){return e.toString(this.encoding);}function d(e){return e&&e.length?this.write(e):"";}i.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0;}else i=0;return i=0)return n>0&&(e.lastNeed=n-1),n;if(--r=0)return n>0&&(e.lastNeed=n-2),n;if(--r=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0;}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var r=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r);},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":177}],179:[function(e,t,i){t.exports=e("./readable").PassThrough;},{"./readable":180}],180:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js");},{"./lib/_stream_duplex.js":169,"./lib/_stream_passthrough.js":170,"./lib/_stream_readable.js":171,"./lib/_stream_transform.js":172,"./lib/_stream_writable.js":173}],181:[function(e,t,i){t.exports=e("./readable").Transform;},{"./readable":180}],182:[function(e,t,i){t.exports=e("./lib/_stream_writable.js");},{"./lib/_stream_writable.js":173}],183:[function(e,t,i){"use strict";var r=e("buffer").Buffer,n=e("inherits"),a=e("hash-base"),s=new Array(16),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],c=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520;}function _(e,t){return e<>>32-t;}function p(e,t,i,r,n,a,s,o){return _(e+(t^i^r)+a+s|0,o)+n|0;}function m(e,t,i,r,n,a,s,o){return _(e+(t&i|~t&r)+a+s|0,o)+n|0;}function b(e,t,i,r,n,a,s,o){return _(e+((t|~i)^r)+a+s|0,o)+n|0;}function v(e,t,i,r,n,a,s,o){return _(e+(t&r|i&~r)+a+s|0,o)+n|0;}function y(e,t,i,r,n,a,s,o){return _(e+(t^(i|~r))+a+s|0,o)+n|0;}n(d,a),d.prototype._update=function(){for(var e=s,t=0;t<16;++t){e[t]=this._block.readInt32LE(4*t);}for(var i=0|this._a,r=0|this._b,n=0|this._c,a=0|this._d,d=0|this._e,g=0|this._a,w=0|this._b,E=0|this._c,C=0|this._d,S=0|this._e,j=0;j<80;j+=1){var T,A;j<16?(T=p(i,r,n,a,d,e[o[j]],c[0],f[j]),A=y(g,w,E,C,S,e[l[j]],h[0],u[j])):j<32?(T=m(i,r,n,a,d,e[o[j]],c[1],f[j]),A=v(g,w,E,C,S,e[l[j]],h[1],u[j])):j<48?(T=b(i,r,n,a,d,e[o[j]],c[2],f[j]),A=b(g,w,E,C,S,e[l[j]],h[2],u[j])):j<64?(T=v(i,r,n,a,d,e[o[j]],c[3],f[j]),A=m(g,w,E,C,S,e[l[j]],h[3],u[j])):(T=y(i,r,n,a,d,e[o[j]],c[4],f[j]),A=p(g,w,E,C,S,e[l[j]],h[4],u[j])),i=d,d=a,a=_(n,10),n=r,r=T,g=S,S=C,C=_(E,10),E=w,w=A;}var x=this._b+n+C|0;this._b=this._c+a+S|0,this._c=this._d+d+g|0,this._d=this._e+i+w|0,this._e=this._a+r+E|0,this._a=x;},d.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=r.alloc?r.alloc(20):new r(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=d;},{buffer:66,"hash-base":106,inherits:136}],184:[function(e,t,i){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e){t[i]=e[i];}}function s(e,t,i){return n(e,t,i);}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),s.prototype=Object.create(n.prototype),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i);},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r;},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e);},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e);};},{buffer:66}],185:[function(e,t,i){(function(i){"use strict";var r,n=e("buffer"),a=n.Buffer,s={};for(r in n){n.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(s[r]=n[r]);}var o=s.Buffer={};for(r in a){a.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(o[r]=a[r]);}if(s.Buffer.prototype=a.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(e,t,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+_typeof(e));if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof(e));return a(e,t,i);}),o.alloc||(o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+_typeof(e));if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=a(e);return t&&0!==t.length?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r;}),!s.kStringMaxLength)try{s.kStringMaxLength=i.binding("buffer").kStringMaxLength;}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),t.exports=s;}).call(this,e("_process"));},{_process:158,buffer:66}],186:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0;}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var i=this._block,n=this._blockSize,a=e.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4);}this._update(this._block);var a=this._hash();return e?a.toString(e):a;},n.prototype._update=function(){throw new Error("_update must be implemented by subclass");},t.exports=n;},{"safe-buffer":184}],187:[function(e,t,i){(i=t.exports=function(e){e=e.toLowerCase();var t=i[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t();}).sha=e("./sha"),i.sha1=e("./sha1"),i.sha224=e("./sha224"),i.sha256=e("./sha256"),i.sha384=e("./sha384"),i.sha512=e("./sha512");},{"./sha":188,"./sha1":189,"./sha224":190,"./sha256":191,"./sha384":192,"./sha512":193}],188:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56);}function f(e){return e<<30|e>>>2;}function u(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r;}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this;},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,c=0;c<16;++c){i[c]=e.readInt32BE(4*c);}for(;c<80;++c){i[c]=i[c-3]^i[c-8]^i[c-14]^i[c-16];}for(var h=0;h<80;++h){var d=~~(h/20),_=0|((t=r)<<5|t>>>27)+u(d,n,a,o)+l+i[h]+s[d];l=o,o=a,a=f(n),n=r,r=_;}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0;},l.prototype._hash=function(){var e=a.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=l;},{"./hash":186,inherits:136,"safe-buffer":184}],189:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56);}function f(e){return e<<5|e>>>27;}function u(e){return e<<30|e>>>2;}function c(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r;}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this;},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,h=0;h<16;++h){i[h]=e.readInt32BE(4*h);}for(;h<80;++h){i[h]=(t=i[h-3]^i[h-8]^i[h-14]^i[h-16])<<1|t>>>31;}for(var d=0;d<80;++d){var _=~~(d/20),p=f(r)+c(_,n,a,o)+l+i[d]+s[_]|0;l=o,o=a,a=u(n),n=r,r=p;}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0;},l.prototype._hash=function(){var e=a.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=l;},{"./hash":186,inherits:136,"safe-buffer":184}],190:[function(e,t,i){var r=e("inherits"),n=e("./sha256"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(64);function l(){this.init(),this._w=o,a.call(this,64,56);}r(l,n),l.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;},l.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=l;},{"./hash":186,"./sha256":191,inherits:136,"safe-buffer":184}],191:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],o=new Array(64);function l(){this.init(),this._w=o,n.call(this,64,56);}function f(e,t,i){return i^e&(t^i);}function u(e,t,i){return e&t|i&(e|t);}function c(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10);}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7);}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3;}r(l,n),l.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;},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,_=0|this._f,p=0|this._g,m=0|this._h,b=0;b<16;++b){i[b]=e.readInt32BE(4*b);}for(;b<64;++b){i[b]=0|(((t=i[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+i[b-7]+d(i[b-15])+i[b-16];}for(var v=0;v<64;++v){var y=m+h(l)+f(l,_,p)+s[v]+i[v]|0,g=c(r)+u(r,n,a)|0;m=p,p=_,_=l,l=o+y|0,o=a,a=n,n=r,r=y+g|0;}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0,this._f=_+this._f|0,this._g=p+this._g|0,this._h=m+this._h|0;},l.prototype._hash=function(){var e=a.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=l;},{"./hash":186,inherits:136,"safe-buffer":184}],192:[function(e,t,i){var r=e("inherits"),n=e("./sha512"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(160);function l(){this.init(),this._w=o,a.call(this,128,112);}r(l,n),l.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;},l.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4);}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e;},t.exports=l;},{"./hash":186,"./sha512":193,inherits:136,"safe-buffer":184}],193:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=new Array(160);function l(){this.init(),this._w=o,n.call(this,128,112);}function f(e,t,i){return i^e&(t^i);}function u(e,t,i){return e&t|i&(e|t);}function c(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25);}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23);}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7;}function _(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25);}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6;}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26);}function b(e,t){return e>>>0>>0?1:0;}r(l,n),l.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;},l.prototype._update=function(e){for(var t=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,a=0|this._dh,o=0|this._eh,l=0|this._fh,v=0|this._gh,y=0|this._hh,g=0|this._al,w=0|this._bl,E=0|this._cl,C=0|this._dl,S=0|this._el,j=0|this._fl,T=0|this._gl,A=0|this._hl,x=0;x<32;x+=2){t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);}for(;x<160;x+=2){var M=t[x-30],k=t[x-30+1],P=d(M,k),I=_(k,M),R=p(M=t[x-4],k=t[x-4+1]),U=m(k,M),D=t[x-14],F=t[x-14+1],O=t[x-32],L=t[x-32+1],B=I+F|0,N=P+D+b(B,I)|0;N=(N=N+R+b(B=B+U|0,U)|0)+O+b(B=B+L|0,L)|0,t[x]=N,t[x+1]=B;}for(var z=0;z<160;z+=2){N=t[z],B=t[z+1];var H=u(i,r,n),V=u(g,w,E),Y=c(i,g),q=c(g,i),X=h(o,S),W=h(S,o),G=s[z],K=s[z+1],Q=f(o,l,v),Z=f(S,j,T),J=A+W|0,$=y+X+b(J,A)|0;$=($=($=$+Q+b(J=J+Z|0,Z)|0)+G+b(J=J+K|0,K)|0)+N+b(J=J+B|0,B)|0;var ee=q+V|0,te=Y+H+b(ee,q)|0;y=v,A=T,v=l,T=j,l=o,j=S,o=a+$+b(S=C+J|0,C)|0,a=n,C=E,n=r,E=w,r=i,w=g,i=$+te+b(g=J+ee|0,J)|0;}this._al=this._al+g|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+C|0,this._el=this._el+S|0,this._fl=this._fl+j|0,this._gl=this._gl+T|0,this._hl=this._hl+A|0,this._ah=this._ah+i+b(this._al,g)|0,this._bh=this._bh+r+b(this._bl,w)|0,this._ch=this._ch+n+b(this._cl,E)|0,this._dh=this._dh+a+b(this._dl,C)|0,this._eh=this._eh+o+b(this._el,S)|0,this._fh=this._fh+l+b(this._fl,j)|0,this._gh=this._gh+v+b(this._gl,T)|0,this._hh=this._hh+y+b(this._hl,A)|0;},l.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4);}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e;},t.exports=l;},{"./hash":186,inherits:136,"safe-buffer":184}],194:[function(e,t,i){t.exports=n;var r=e("events").EventEmitter;function n(){r.call(this);}e("inherits")(n,r),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause();}function a(){i.readable&&i.resume&&i.resume();}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",o),i.on("close",l));var s=!1;function o(){s||(s=!0,e.end());}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy());}function f(e){if(u(),0===r.listenerCount(this,"error"))throw e;}function u(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",o),i.removeListener("close",l),i.removeListener("error",f),e.removeListener("error",f),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u);}return i.on("error",f),e.on("error",f),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e;};},{events:104,inherits:136,"readable-stream/duplex.js":168,"readable-stream/passthrough.js":179,"readable-stream/readable.js":180,"readable-stream/transform.js":181,"readable-stream/writable.js":182}],195:[function(e,t,i){arguments[4][178][0].apply(i,arguments);},{dup:178,"safe-buffer":184}],196:[function(e,t,i){(function(t,r){var n=e("process/browser.js").nextTick,a=Function.prototype.apply,s=Array.prototype.slice,o={},l=0;function f(e,t){this._id=e,this._clearFn=t;}i.setTimeout=function(){return new f(a.call(setTimeout,window,arguments),clearTimeout);},i.setInterval=function(){return new f(a.call(setInterval,window,arguments),clearInterval);},i.clearTimeout=i.clearInterval=function(e){e.close();},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id);},i.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t;},i.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1;},i._unrefActive=i.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout();},t));},i.setImmediate="function"==typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&s.call(arguments,1);return o[t]=!0,n(function(){o[t]&&(r?e.apply(null,r):e.call(null),i.clearImmediate(t));}),t;},i.clearImmediate="function"==typeof r?r:function(e){delete o[e];};}).call(this,e("timers").setImmediate,e("timers").clearImmediate);},{"process/browser.js":158,timers:196}],197:[function(e,t,i){(function(e){function i(t){try{if(!e.localStorage)return!1;}catch(e){return!1;}var i=e.localStorage[t];return null!=i&&"true"===String(i).toLowerCase();}t.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")&&console.trace(t),r=!0;}return e.apply(this,arguments);};};}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{}],198:[function(e,t,i){"use strict";t.exports={DEFAILT_WEBGL_PLAY_ID:"glplayer",PLAYER_IN_TYPE_MP4:"mp4",PLAYER_IN_TYPE_FLV:"flv",PLAYER_IN_TYPE_HTTPFLV:"httpflv",PLAYER_IN_TYPE_RAW_265:"raw265",PLAYER_IN_TYPE_TS:"ts",PLAYER_IN_TYPE_MPEGTS:"mpegts",PLAYER_IN_TYPE_M3U8:"hls",PLAYER_IN_TYPE_M3U8_VOD:"m3u8",PLAYER_IN_TYPE_M3U8_LIVE:"hls",APPEND_TYPE_STREAM:0,APPEND_TYPE_FRAME:1,APPEND_TYPE_SEQUENCE:2,DEFAULT_WIDTH:600,DEFAULT_HEIGHT:600,DEFAULT_FPS:25,DEFAULT_FRAME_DUR:40,DEFAULT_FIXED:!1,DEFAULT_SAMPLERATE:44100,DEFAULT_CHANNELS:2,DEFAULT_CONSU_SAMPLE_LEN:20,PLAYER_MODE_VOD:"vod",PLAYER_MODE_NOTIME_LIVE:"live",AUDIO_MODE_ONCE:"ONCE",AUDIO_MODE_SWAP:"SWAP",DEFAULT_STRING_LIVE:"LIVE",CODEC_H265:0,CODEC_H264:1,PLAYER_CORE_TYPE_DEFAULT:0,PLAYER_CORE_TYPE_CNATIVE:1,V_CODEC_NAME_HEVC:265,V_CODEC_NAME_AVC:264,V_CODEC_NAME_UNKN:500,A_CODEC_NAME_AAC:112,A_CODEC_NAME_MP3:113,A_CODEC_NAME_UNKN:500,CACHE_NO_LOADCACHE:192,CACHE_WITH_PLAY_SIGN:193,CACHE_WITH_NOPLAY_SIGN:194};},{}],199:[function(e,t,i){"use strict";var r=window.AudioContext||window.webkitAudioContext,n=e("../consts"),a=function a(){return new Date().getTime();};t.exports=function(e){var t={options:{sampleRate:e.sampleRate||n.DEFAULT_SAMPLERATE,appendType:e.appendType||n.APPEND_TYPE_STREAM,playMode:e.playMode||n.AUDIO_MODE_SWAP},sourceChannel:-1,audioCtx:new r({latencyHint:"interactive",sampleRate:e.sampleRate}),gainNode:null,sourceList:[],startStatus:!1,sampleQueue:[],nextBuffer:null,playTimestamp:0,playStartTime:0,durationMs:-1,voice:1,onLoadCache:null,resetStartParam:function resetStartParam(){t.playTimestamp=0,t.playStartTime=0;},setOnLoadCache:function setOnLoadCache(e){t.onLoadCache=e;},setDurationMs:function setDurationMs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e;},setVoice:function setVoice(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.voice=e,t.gainNode.gain.value=e;},getAlignVPTS:function getAlignVPTS(){return t.playTimestamp+(a()-t.playStartTime)/1e3;},swapSource:function swapSource(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==t.startStatus)return null;if(e<0||e>=t.sourceList.length)return null;if(i<0||i>=t.sourceList.length)return null;try{t.sourceChannel===e&&null!==t.sourceList[e]&&(t.sourceList[e].disconnect(t.gainNode),t.sourceList[e]=null);}catch(e){}t.sourceChannel=i;var r=t.decodeSample(i,e);-2==r&&(t.getAlignVPTS()>=t.durationMs/1e3-.04?t.pause():null!==t.onLoadCache&&t.onLoadCache());},addSample:function addSample(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!(null==e||!e||null==e)&&(0==t.sampleQueue.length&&(t.seekPos=e.pts),t.sampleQueue.push(e),!0);},runNextBuffer:function runNextBuffer(){window.setInterval(function(){if(!(null!=t.nextBuffer||t.sampleQueue.length0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){t.swapSource(e,i);}),0==t.sampleQueue.length)return-2;if(t.sourceList[e].buffer)return t.sourceList[e],t.sourceList[i],t.gainNode,t.swapSource(e,i),0;if(null==t.nextBuffer||t.nextBuffer.data.length<1)return t.sourceList[e].context.state,t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0,t.sourceList[e].stop(),t.sourceList[e].context.state,1;var r=t.nextBuffer.data.buffer;t.playTimestamp=t.nextBuffer.pts,t.playStartTime=a();try{t.audioCtx.decodeAudioData(r,function(i){null!==t.sourceList[e]&&(t.sourceList[e].buffer=i,t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0);},function(e){});}catch(e){return t.nextBuffer=null,-3;}return t.nextBuffer=null,0;},decodeWholeSamples:function decodeWholeSamples(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(t.sourceChannel=e,e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){}),0==t.sampleQueue.length)return-2;for(var i=null,r=null,a=0;a=2){var s=i.length/2;a=new Float32Array(s);for(var o=0,l=0;l0&&s()-this._start_time>=this._now_seg_dur&&(s(),this._start_time,this._now_seg_dur,this._start_time=-1,this._now_seg_dur=-1),s(),this._start_time<0)if(new Date(),null!==this._pcm_array_buf&&this._pcm_array_buf.length>this._push_start_idx){this._swapStartPlay=!1;var e=this._push_start_idx+this._once_pop_len;e>this._pcm_array_buf.length&&(e=this._pcm_array_buf.length);var t=this._pcm_array_buf.slice(this._push_start_idx,e);this._push_start_idx+=t.length,this._now_seg_dur=1*t.length/this._sample_rate*1e3,t.length,this._sample_rate,this._now_seg_dur;var i=this._ctx.createBuffer(1,t.length,this._sample_rate);t.length,new Date(),i.copyToChannel(t,0),this._active_node=this._ctx.createBufferSource(),this._active_node.buffer=i,this._active_node.connect(this._gain),this._start_time=s(),this._active_node.start(0);}else setTimeout(this.readingLoopWithF32,1);}}])&&r(t.prototype,i),o&&r(t,o),e;}();i.AudioPcmPlayer=o;},{"../consts":198}],201:[function(e,t,i){"use strict";var r=e("../consts"),n=[{format:"mp4",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"mov",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"flv",value:"flv",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"m3u8",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"m3u",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"ts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"mpegts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"hevc",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"h265",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT}];t.exports={frameDataAlignCrop:function frameDataAlignCrop(e,t,i,r,n,a,s,o){if(0==e-r)return[a,s,o];for(var l=r*n,f=l/4,u=new Uint8Array(l),c=new Uint8Array(f),h=new Uint8Array(f),d=r,_=r/2,p=0;p=0)return i.value;}return n[0].value;},GetFormatPlayCore:function GetFormatPlayCore(e){for(var t=0;t0&&void 0!==arguments[0]&&arguments[0];this.showScreen=e,this.canvas&&(e?this.canvas.setAttribute("hidden",!0):this.canvas.removeAttribute("hidden"));}},{key:"getCachePTS",value:function value(){return 1!==this.config.ignoreAudio&&this.audioWAudio?Math.max(this.vCachePTS,this.aCachePTS):this.vCachePTS;}},{key:"getMaxPTS",value:function value(){return Math.max(this.vCachePTS,this.aCachePTS);}},{key:"isPlayingState",value:function value(){return this.isPlaying;}},{key:"pushDone",value:function value(){this.pushEOF=!0;}},{key:"_clearDecInterval",value:function value(){this.decVFrameInterval&&window.clearInterval(this.decVFrameInterval),this.decVFrameInterval=null;}},{key:"_checkPlayFinished",value:function value(){return!(this.config.playMode!==u.PLAYER_MODE_VOD||!(!0===this.bufRecvStat&&(this.playPTS>=this.bufLastVDTS||this.audioWAudio&&this.playPTS>=this.bufLastADTS)||this.duration-this.playPTS0&&(this.isPlaying=!0);var t=0,i=0,r=0;this.config.playMode===u.PLAYER_MODE_NOTIME_LIVE?this.playFrameInterval=window.setInterval(function(){if(e._videoQueue.length>0){var t=e._videoQueue.shift();t.pts,l.renderFrame(e.yuv,t.data_y,t.data_u,t.data_v,t.line1,t.height);}},1e3*this.frameDur):this.playFrameInterval=window.setInterval(function(){if(i=h(),e._videoQueue.length>0&&i-t>=e.frameTime-r){var n=e._videoQueue.shift(),a=0;if(e.isNewSeek||null===e.audioWAudio||void 0===e.audioWAudio||(a=1e3*(n.pts-e.audioWAudio.getAlignVPTS()),e.playPTS=Math.max(e.audioWAudio.getAlignVPTS(),e.playPTS)),t=i,h(),e.playPTS=Math.max(n.pts,e.playPTS),e.isNewSeek&&e.seekTarget-e.frameDur>n.pts)return void(r=e.frameTime);if(e.isNewSeek&&(e.audioWAudio&&e.audioWAudio.setVoice(e.audioVoice),e.audioWAudio&&e.audioWAudio.play(),r=0,e.isNewSeek=!1,e.seekTarget=0),e.showScreen?e.onRender&&e.onRender(n.line1,n.height,n.data_y,n.data_u,n.data_v):(n.pts,l.renderFrame(e.yuv,n.data_y,n.data_u,n.data_v,n.line1,n.height)),e.onPlayingTime&&e.onPlayingTime(n.pts),!e.isNewSeek&&e.audioWAudio&&(a<0&&-1*a<=e.frameTime||a>=0)){if(e.config.playMode===u.PLAYER_MODE_VOD)if(n.pts>=e.duration)e.onLoadCacheFinshed&&e.onLoadCacheFinshed(),e.onPlayingFinish&&e.onPlayingFinish(),e._clearDecInterval(),e.pause();else if(e._checkPlayFinished())return;r=h()-i;}else!e.isNewSeek&&e.audioWAudio&&(a<0&&e.frameTime,r=e.frameTime);}e._checkPlayFinished();},1);}this.isNewSeek||this.audioWAudio&&this.audioWAudio.play();}},{key:"pause",value:function value(){this.isPlaying=!1,this._pause();}},{key:"_pause",value:function value(){this.playFrameInterval&&window.clearInterval(this.playFrameInterval),this.playFrameInterval=null,this.audioWAudio&&this.audioWAudio.pause();}},{key:"seek",value:function value(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.openFrameCall=!1,this.pause(),this._clearDecInterval(),null!==this.avFeedVideoInterval&&(window.clearInterval(this.avFeedVideoInterval),this.avFeedVideoInterval=null),null!==this.avFeedAudioInterval&&(window.clearInterval(this.avFeedAudioInterval),this.avFeedAudioInterval=null),this.yuvMaxTime=0,this.playVPipe.length=0,this._videoQueue.length=0,this.audioWAudio&&this.audioWAudio.stop(),e&&e(),this.isNewSeek=!0,this.avSeekVState=!0,this.seekTarget=i.seekTime,null!==this.audioWAudio&&void 0!==this.audioWAudio&&(this.audioWAudio.setVoice(0),this.audioWAudio.resetStartParam(),this.audioWAudio.stop()),this._avFeedData(i.seekTime),setTimeout(function(){t.yuvMaxTime=0,t._videoQueue.length=0,t.openFrameCall=!0,t.frameCallTag+=1,t._decVFrameIntervalFunc();},1e3);}},{key:"setVoice",value:function value(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e);}},{key:"cacheIsFull",value:function value(){return this._videoQueue.length>=50;}},{key:"_checkDisplaySize",value:function value(e,t,i){var r=t-e,n=this.config.width+Math.ceil(r/2),a=t/this.config.width>i/this.config.height,s=(n/t).toFixed(2),o=(this.config.height/i).toFixed(2),l=a?s:o,f=this.config.fixed,u=f?n:parseInt(t*l),c=f?this.config.height:parseInt(i*l);if(this.canvas.offsetWidth!=u||this.canvas.offsetHeight!=c){var h=parseInt((this.canvasBox.offsetHeight-c)/2),d=parseInt((this.canvasBox.offsetWidth-u)/2);h=h<0?0:h,d=d<0?0:d,this.canvas.style.marginTop=h+"px",this.canvas.style.marginLeft=d+"px",this.canvas.style.width=u+"px",this.canvas.style.height=c+"px";}return this.isCheckDisplay=!0,[u,c];}},{key:"_createYUVCanvas",value:function value(){this.canvasBox=document.querySelector("#"+this.config.playerId),this.canvasBox.style.overflow="hidden",this.canvas=document.createElement("canvas"),this.canvas.style.width=this.canvasBox.clientWidth+"px",this.canvas.style.height=this.canvasBox.clientHeight+"px",this.canvas.style.top="0px",this.canvas.style.left="0px",this.canvasBox.appendChild(this.canvas),this.yuv=l.setupCanvas(this.canvas,{preserveDrawingBuffer:!1});}},{key:"_avRecvPackets",value:function value(){var e=this;this.bufObject.cleanPipeline(),null!==this.avRecvInterval&&(window.clearInterval(this.avRecvInterval),this.avRecvInterval=null),!0===this.config.checkProbe?this.avRecvInterval=window.setInterval(function(){a.cwrap("getSniffStreamPkg","number",["number"])(e.corePtr),e._avCheckRecvFinish();},5):this.avRecvInterval=window.setInterval(function(){a.cwrap("getSniffStreamPkgNoCheckProbe","number",["number"])(e.corePtr),e._avCheckRecvFinish();},5),this._avFeedData(0,!1);}},{key:"_avCheckRecvFinish",value:function value(){this.config.playMode===u.PLAYER_MODE_VOD&&this.duration-this.getMaxPTS()=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),t.play(),window.clearInterval(i),i=null);},10);return!0;}},{key:"_afterAvFeedSeekToStartWithUnFinBuffer",value:function value(e){var t=this,i=window.setInterval(function(){t._videoQueue.length,t._videoQueue.length>=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),!1===t.reFull?t.play():t.reFull=!1,window.clearInterval(i),i=null);},10);return!0;}},{key:"_avFeedData",value:function value(e){var t=this;if(this.playVPipe.length=0,this.audioWAudio&&this.audioWAudio.cleanQueue(),e<=0&&!1===this.bufOK){var i=0;if(this.avFeedVideoInterval=window.setInterval(function(){var r=t.bufObject.videoBuffer.length;if(r-1>i||t.duration-t.getMaxPTS()0){for(var a=0;a0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.bufLastVDTS,t.bufObject.videoBuffer,t.playVPipe);}else t.config.playMode===u.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.duration,t.bufObject.videoBuffer,t.playVPipe);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===u.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithFinishedBuffer(e),t.avSeekVState=!1));},5),void 0!==this.audioWAudio&&null!==this.audioWAudio&&this.config.ignoreAudio<1){var r=0;this.avFeedAudioInterval=window.setInterval(function(){var e=t.bufObject.audioBuffer.length;if(e-1>r||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer);}else t.config.playMode===u.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer);},5);}}else{var n=this.bufObject.seekIDR(e),a=parseInt(n,10);this.playPTS=0;var o=a;if(this.avFeedVideoInterval=window.setInterval(function(){var i=t.bufObject.videoBuffer.length;if(i-1>o||t.duration-t.getMaxPTS()0){for(var n=0;n0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null);}else t.config.playMode===u.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===u.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithUnFinBuffer(e),t.avSeekVState=!1));},5),this.audioWAudio&&this.config.ignoreAudio<1){var l=parseInt(e,10);this.avFeedAudioInterval=window.setInterval(function(){var e=t.bufObject.audioBuffer.length;if(e-1>l||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null);}else t.config.playMode===u.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null);},5);}}}},{key:"_probeFinCallback",value:function value(e,t,i,r,n,s,o,l,c){var h=this;this._createYUVCanvas(),u.V_CODEC_NAME_HEVC,this.config.fps=1*r,this.frameTime=1e3/this.config.fps,this.width=t,this.height=i,this.frameDur=1/this.config.fps,this.duration=e-this.frameDur,this.vCodecID=l,this.config.sampleRate=s,this.channels=o,this.audioIdx=n,this.duration<0&&(this.config.playMode=u.PLAYER_MODE_NOTIME_LIVE,this.frameTime,this.frameDur);for(var d=a.HEAPU8.subarray(c,c+10),_=0;_=0&&this.config.ignoreAudio<1?(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.audioWAudio=f({sampleRate:s,appendType:u.APPEND_TYPE_FRAME}),this.audioWAudio.setDurationMs(1e3*e),this.onLoadCache&&this.audioWAudio.setOnLoadCache(function(){if(h.retryAuSampleNo,h.retryAuSampleNo<=5){h.pause(),h.onLoadCache&&h.onLoadCache();var e=window.setInterval(function(){return h.retryAuSampleNo,h.audioWAudio.sampleQueue.length,h.audioWAudio.sampleQueue.length>2?(h.onLoadCacheFinshed&&h.onLoadCacheFinshed(),h.play(),h.retryAuSampleNo=0,window.clearInterval(e),void(e=null)):(h.retryAuSampleNo+=1,h.retryAuSampleNo>5?(h.play(),h.onLoadCacheFinshed&&h.onLoadCacheFinshed(),window.clearInterval(e),void(e=null)):void 0);},1e3);}})):this.audioNone=!0,this._avRecvPackets(),this._decVFrameIntervalFunc()),this.onProbeFinish&&this.onProbeFinish();}},{key:"_ptsFixed2",value:function value(e){return Math.ceil(100*e)/100;}},{key:"_naluCallback",value:function value(e,t,i,r,n,s,o){var l=this._ptsFixed2(s),f=a.HEAPU8.subarray(e,e+t),u=new Uint8Array(f);this.bufObject.appendFrameWithDts(l,o,u,!0,i),this.bufLastVDTS=Math.max(o,this.bufLastVDTS),this.vCachePTS=Math.max(l,this.vCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS());}},{key:"_samplesCallback",value:function value(e,t,i,r){}},{key:"_aacFrameCallback",value:function value(e,t,i,r,n){var s=this._ptsFixed2(n);if(this.audioWAudio){var o=new Uint8Array(7+i),l=a.HEAPU8.subarray(e,e+7);o.set(l,0);var f=a.HEAPU8.subarray(t,t+i);o.set(f,7),this.bufObject.appendFrame(s,o,!1,!0),this.bufLastADTS=Math.max(s,this.bufLastADTS),this.aCachePTS=Math.max(s,this.aCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS());}}},{key:"_decVFrameIntervalFunc",value:function value(){var e=this;null==this.decVFrameInterval&&(this.decVFrameInterval=window.setInterval(function(){if(e._videoQueue.length<50&&e.playVPipe.length>0){var t=e.playVPipe.shift(),i=t.data,r=a._malloc(i.length);a.HEAP8.set(i,r);var n=parseInt(1e3*t.pts,10),s=parseInt(1e3*t.dts,10);e.yuvMaxTime=Math.max(t.pts,e.yuvMaxTime),a.cwrap("decodeVideoFrame","number",["number","number","number","number","number"])(e.corePtr,r,i.length,n,s,e.frameCallTag),a._free(r),r=null;}},10));}},{key:"_frameCallback",value:function value(e,t,i,r,n,s,o,f,u,c){if(this._videoQueue.length,!(!1===this.openFrameCall||c!==this.frameCallTag||u>this.yuvMaxTime+this.frameDur||this.isNewSeek&&this.seekTarget-u>3*this.frameDur)){var h=this._videoQueue.length;if(this.canvas.width==r&&this.canvas.height==f||(this.canvas.width=r,this.canvas.height=f,this.isCheckDisplay)||this._checkDisplaySize(o,r,f),!(this.playPTS>u)){var _=a.HEAPU8.subarray(e,e+r*f),p=a.HEAPU8.subarray(t,t+n*f/2),m=a.HEAPU8.subarray(i,i+s*f/2),b=new Uint8Array(_),v=new Uint8Array(p),y=new Uint8Array(m);this.config.readyShow&&(l.renderFrame(this.yuv,b,v,y,r,f),this.config.readyShow=!1,this.onReadyShowDone&&this.onReadyShowDone());var g=new d(b,v,y,r,n,s,o,f,u);if(h<=0||u>this._videoQueue[h-1].pts)this._videoQueue.push(g);else if(uthis._videoQueue[w].pts&&w+10&&void 0!==arguments[0]?arguments[0]:60,t={limit:e,yuvCache:[],appendCacheByCacheYuv:function appendCacheByCacheYuv(e){e.pts;return t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.OVERFLOW:(t.yuvCache.push(e),t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL);},getState:function getState(){return t.yuvCache.length<=0?CACHE_APPEND_STATUS_CODE.NULL:t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL;},cleanPipeline:function cleanPipeline(){t.yuvCache.length=0;},vYuv:function vYuv(){return t.yuvCache.length<=0?null:t.yuvCache.shift();}};return t;};}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{"./cacheYuv":204}],204:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i>1;return n.indexOf(t);},GET_NALU_TYPE:function GET_NALU_TYPE(e){var t=(126&e)>>1;if(t>=1&&t<=9)return r.DEFINE_P_FRAME;if(t>=16&&t<=21)return r.DEFINE_KEY_FRAME;var i=n.indexOf(t);return i>=0?n[i]:r.DEFINE_OTHERS_FRAME;},PACK_NALU:function PACK_NALU(e){var t=e.nalu,i=e.vlc.vlc;null==t.vps&&(t.vps=new Uint8Array());var r=new Uint8Array(t.vps.length+t.sps.length+t.pps.length+t.sei.length+i.length);return r.set(t.vps,0),r.set(t.sps,t.vps.length),r.set(t.pps,t.vps.length+t.sps.length),r.set(t.sei,t.vps.length+t.sps.length+t.pps.length),r.set(i,t.vps.length+t.sps.length+t.pps.length+t.sei.length),r;}};},{"./hevc-header":205}],207:[function(e,t,i){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t0&&void 0!==arguments[0]&&arguments[0];null!=t&&(t.showScreen=e,t.canvas&&(e?t.canvas.setAttribute("hidden",!0):t.canvas.removeAttribute("hidden")));},setSize:function setSize(e,i){t.config.width=e||f.DEFAULT_WIDTH,t.config.height=i||f.DEFAULT_HEIGHT;},setFrameRate:function setFrameRate(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:25;t.config.fps=e,t.config.frameDurMs=1e3/e;},setDurationMs:function setDurationMs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e,0==t.config.audioNone&&t.audio.setDurationMs(e);},setPlayingCall:function setPlayingCall(e){t.onPlayingTime=e;},setVoice:function setVoice(e){t.realVolume=e,0==t.config.audioNone&&t.audio.setVoice(t.realVolume);},isPlayingState:function isPlayingState(){return t.isPlaying||t.isCaching===f.CACHE_WITH_PLAY_SIGN;},appendAACFrame:function appendAACFrame(e){t.audio.addSample(e),t.aCachePTS=Math.max(e.pts,t.aCachePTS);},appendHevcFrame:function appendHevcFrame(e){var i;t.config.appendHevcType==f.APPEND_TYPE_STREAM?t.stream=new Uint8Array((i=r(t.stream)).concat.apply(i,r(e))):t.config.appendHevcType==f.APPEND_TYPE_FRAME&&(t.frameList.push(e),t.vCachePTS=Math.max(e.pts,t.vCachePTS));},getCachePTS:function getCachePTS(){return Math.max(t.vCachePTS,t.aCachePTS);},endAudio:function endAudio(){0==t.config.audioNone&&t.audio.stop();},cleanSample:function cleanSample(){0==t.config.audioNone&&t.audio.cleanQueue();},cleanVideoQueue:function cleanVideoQueue(){t.config.appendHevcType==f.APPEND_TYPE_STREAM?t.stream=new Uint8Array():t.config.appendHevcType==f.APPEND_TYPE_FRAME&&(t.frameList=[],t.frameList.length=0);},cleanCacheYUV:function cleanCacheYUV(){t.cacheYuvBuf.cleanPipeline();},pause:function pause(){t.loop&&window.clearInterval(t.loop),t.loop=null,0==t.config.audioNone&&t.audio.pause(),t.isPlaying=!1,t.isCaching===f.CACHE_WITH_PLAY_SIGN&&(t.isCaching=f.CACHE_WITH_NOPLAY_SIGN);},checkFinished:function checkFinished(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.PLAYER_MODE_VOD;return e==f.PLAYER_MODE_VOD&&t.cacheYuvBuf.yuvCache.length<=0&&(t.videoPTS.toFixed(1)>=(t.durationMs-t.config.frameDurMs)/1e3||t.noCacheFrame>=10)&&(null!=t.onPlayingFinish&&(f.PLAYER_MODE_VOD,t.frameList.length,t.cacheYuvBuf.yuvCache.length,t.videoPTS.toFixed(1),t.durationMs,t.config.frameDurMs,t.noCacheFrame,t.onPlayingFinish()),!0);},clearAllCache:function clearAllCache(){t.nowPacket=null,t.vCachePTS=0,t.aCachePTS=0,t.cleanSample(),t.cleanVideoQueue(),t.cleanCacheYUV();},seek:function seek(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.isPlaying;t.pause(),t.stopCacheThread(),t.clearAllCache(),e&&e(),t.isNewSeek=!0,t.flushDecoder=1,t.videoPTS=parseInt(i.seekTime);var n={seekPos:i.seekTime||-1,mode:i.mode||f.PLAYER_MODE_VOD,accurateSeek:i.accurateSeek||!0,seekEvent:i.seekEvent||!0,realPlay:r};t.cacheThread(),t.play(n);},getNalu1Packet:function getNalu1Packet(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=null,r=-1;if(t.config.appendHevcType==f.APPEND_TYPE_STREAM)i=t.nextNalu();else{if(t.config.appendHevcType!=f.APPEND_TYPE_FRAME)return null;var n=t.frameList.shift();if(!n)return null;i=n.data,r=n.pts,e&&(t.videoPTS=r);}return{nalBuf:i,pts:r};},decodeNalu1Frame:function decodeNalu1Frame(e,i){var r=n._malloc(e.length);n.HEAP8.set(e,r);var a=parseInt(1e3*i);n.cwrap("decodeCodecContext","number",["number","number","number","number","number"])(t.vcodecerPtr,r,e.length,a,t.flushDecoder);return t.flushDecoder=0,n._free(r),!1;},cacheThread:function cacheThread(){t.cacheLoop=window.setInterval(function(){if(t.cacheYuvBuf.getState()!=CACHE_APPEND_STATUS_CODE.FULL){var e=t.getNalu1Packet(!1);if(null!=e){var i=e.nalBuf,r=e.pts;t.decodeNalu1Frame(i,r,!0);}}},10);},stopCacheThread:function stopCacheThread(){null!==t.cacheLoop&&(window.clearInterval(t.cacheLoop),t.cacheLoop=null);},loadCache:function loadCache(){if(!(t.frameList.length<=3)){var e=t.isPlaying;if(t.cacheYuvBuf.yuvCache.length<=3){t.pause(),null!=t.onLoadCache&&t.onLoadCache(),t.isCaching=e?f.CACHE_WITH_PLAY_SIGN:f.CACHE_WITH_NOPLAY_SIGN;var i=t.frameList.length>30?30:t.frameList.length;null===t.cacheInterval&&(t.cacheInterval=window.setInterval(function(){t.cacheYuvBuf.yuvCache.length>=i&&(null!=t.onLoadCacheFinshed&&t.onLoadCacheFinshed(),window.clearInterval(t.cacheInterval),t.cacheInterval=null,t.isCaching===f.CACHE_WITH_PLAY_SIGN&&t.play(t.playParams),t.isCaching=f.CACHE_NO_LOADCACHE);},40));}}},playFunc:function playFunc(){var e=!1;if(t.playParams.seekEvent||c()-t.calcuteStartTime>=t.frameTime-t.preCostTime){e=!0;var i=!0;if(t.calcuteStartTime=c(),t.config.audioNone)t.playFrameYUV(i,t.playParams.accurateSeek);else{t.fix_poc_err_skip>0&&(t.fix_poc_err_skip--,i=!1);var r=t.videoPTS-t.audio.getAlignVPTS();if(r>0)return void(t.playParams.seekEvent&&!t.config.audioNone&&t.audio.setVoice(0));if(i){if(!(i=-1*r<=1*t.frameTimeSec)){for(var n=parseInt(r/t.frameTimeSec),a=0;a=i&&(t.playFrameYUV(!0,t.playParams.accurateSeek),i+=1);},1);}else t.videoPTS>=t.playParams.seekPos&&!t.isNewSeek||0===t.playParams.seekPos||0===t.playParams.seekPos?(t.frameTime=1e3/t.config.fps,t.frameTimeSec=t.frameTime/1e3,0==t.config.audioNone&&t.audio.play(),t.realVolume=t.config.audioNone?0:t.audio.voice,t.playParams.seekEvent&&(t.fix_poc_err_skip=10),t.loop=window.setInterval(function(){var e=c();t.playFunc(),t.preCostTime=c()-e;},1)):(t.loop=window.setInterval(function(){t.playFrameYUV(!1,t.playParams.accurateSeek),t.checkFinished(t.playParams.mode)?(window.clearInterval(t.loop),t.loop=null):t.videoPTS>=t.playParams.seekPos&&(window.clearInterval(t.loop),t.loop=null,t.play(t.playParams));},1),t.isNewSeek=!1);},stop:function stop(){t.release(),n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr),t.stream=new Uint8Array();},release:function release(){return t.endAudio(),t.cacheLoop&&window.clearInterval(t.cacheLoop),t.cacheLoop=null,t.loop&&window.clearInterval(t.loop),t.loop=null,t.pause(),n.cwrap("release","number",["number"])(t.vcodecerPtr),t.stream=null,t.frameList.length=0,t.durationMs=-1,t.videoPTS=0,t.isPlaying=!1,!0;},nextNalu:function nextNalu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(t.stream.length<=4)return!1;for(var i=-1,r=0;r=t.stream.length){if(-1==i)return!1;var n=t.stream.subarray(i);return t.stream=new Uint8Array(),n;}var a="0 0 1"==t.stream.slice(0,3).join(" "),s="0 0 0 1"==t.stream.slice(0,4).join(" ");if(a||s){if(-1==i)i=r;else{if(e<=1){var o=t.stream.subarray(i,r);return t.stream=t.stream.subarray(r),o;}e-=1;}r+=3;}}return!1;},decodeSendPacket:function decodeSendPacket(e){var i=n._malloc(e.length);n.HEAP8.set(e,i);var r=n.cwrap("decodeSendPacket","number",["number","number","number"])(t.vcodecerPtr,i,e.length);return n._free(i),r;},decodeRecvFrame:function decodeRecvFrame(){return n.cwrap("decodeRecv","number",["number"])(t.vcodecerPtr);},playFrameYUV:function playFrameYUV(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.cacheYuvBuf.vYuv();if(null==r)return t.noCacheFrame+=1,e&&!t.playParams.seekEvent&&t.loadCache(),!1;t.noCacheFrame=0;var n=r.pts;return t.videoPTS=n,(!e&&i||e)&&e&&t.drawImage(r.width,r.height,r.imageBufferY,r.imageBufferB,r.imageBufferR),e&&!t.playParams.seekEvent&&t.isPlaying&&t.loadCache(),!0;},drawImage:function drawImage(e,i,r,n,a){if(t.canvas.width===e&&t.canvas.height==i||(t.canvas.width=e,t.canvas.height=i),t.showScreen&&null!=t.onRender)t.onRender(e,i,r,n,a);else{if(!t.isCheckDisplay)t.checkDisplaySize(e,i);var s=e*i,o=e/2*(i/2),f=new Uint8Array(s+2*o);f.set(r,0),f.set(n,s),f.set(a,s+o),l.renderFrame(t.yuv,r,n,a,e,i);}},debugYUV:function debugYUV(e){t.debugYUVSwitch=!0,t.debugID=e;},checkDisplaySize:function checkDisplaySize(e,i){var r=e/t.config.width>i/t.config.height,n=(t.config.width/e).toFixed(2),a=(t.config.height/i).toFixed(2),s=r?n:a,o=t.config.fixed,l=o?t.config.width:parseInt(e*s),f=o?t.config.height:parseInt(i*s);if(t.canvas.offsetWidth!=l||t.canvas.offsetHeight!=f){var u=parseInt((t.canvasBox.offsetHeight-f)/2),c=parseInt((t.canvasBox.offsetWidth-l)/2);t.canvas.style.marginTop=u+"px",t.canvas.style.marginLeft=c+"px",t.canvas.style.width=l+"px",t.canvas.style.height=f+"px";}return t.isCheckDisplay=!0,[l,f];},makeWasm:function makeWasm(){if(null!=t.config.token){t.vcodecerPtr=n.cwrap("registerPlayer","number",["string","string"])(t.config.token,u.PLAYER_VERSION);var e=n.addFunction(function(e,i,r,a,s,l,f,u,c){var h=n.HEAPU8.subarray(e,e+a*u),d=n.HEAPU8.subarray(i,i+s*u/2),_=n.HEAPU8.subarray(r,r+l*u/2),p=new Uint8Array(h),m=new Uint8Array(d),b=new Uint8Array(_),v=1*c/1e3,y=new o.CacheYuvStruct(v,a,u,p,m,b);t.cacheYuvBuf.appendCacheByCacheYuv(y);});n.cwrap("setCodecType","number",["number","number","number"])(t.vcodecerPtr,t.config.videoCodec,e);n.cwrap("initMissile","number",["number"])(t.vcodecerPtr);n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr);}},makeIt:function makeIt(){var e=document.querySelector("div#"+t.config.playerId),i=document.createElement("canvas");i.style.width=e.clientWidth+"px",i.style.height=e.clientHeight+"px",i.style.top="0px",i.style.left="0px",e.appendChild(i),t.canvasBox=e,t.canvas=i,t.yuv=l.setupCanvas(i,{preserveDrawingBuffer:!1}),0==t.config.audioNone&&(t.audio=a({sampleRate:t.config.sampleRate,appendType:t.config.appendHevcType})),t.isPlayLoadingFinish=1;}};return t.makeWasm(),t.makeIt(),t.cacheThread(),t;};},{"../consts":198,"../render-engine/webgl-420p":219,"../version":222,"./audio-core":199,"./cache":203,"./cacheYuv":204,"./missile.js":1}],208:[function(e,t,i){"use strict";var r=e("./bufferFrame");t.exports=function(){var e={videoBuffer:[],audioBuffer:[],idrIdxBuffer:[],appendFrame:function appendFrame(t,i){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=new r.BufferFrame(t,a,i,n),o=parseInt(t);return n?(e.videoBuffer.length-1>=o?e.videoBuffer[o].push(s):e.videoBuffer.push([s]),a&&!e.idrIdxBuffer.includes(t)&&e.idrIdxBuffer.push(t)):e.audioBuffer.length-1>=o&&null!=e.audioBuffer[o]&&null!=e.audioBuffer[o]?e.audioBuffer[o]&&e.audioBuffer[o].push(s):e.audioBuffer.push([s]),!0;},appendFrameWithDts:function appendFrameWithDts(t,i,n){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=r.ConstructWithDts(t,i,s,n,a),l=parseInt(i);return a?(e.videoBuffer.length-1>=l?e.videoBuffer[l].push(o):e.videoBuffer.push([o]),s&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=l&&null!=e.audioBuffer[l]&&null!=e.audioBuffer[l]?e.audioBuffer[l]&&e.audioBuffer[l].push(o):e.audioBuffer.push([o]),!0;},appendFrameByBufferFrame:function appendFrameByBufferFrame(t){var i=t.pts,r=parseInt(i);return t.video?(e.videoBuffer.length-1>=r?e.videoBuffer[r].push(t):e.videoBuffer.push([t]),isKey&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=r?e.audioBuffer[r].push(t):e.audioBuffer.push([t]),!0;},cleanPipeline:function cleanPipeline(){e.videoBuffer.length=0,e.audioBuffer.length=0;},vFrame:function vFrame(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.videoBuffer.length-1))return e.videoBuffer[t];},aFrame:function aFrame(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.audioBuffer.length-1))return e.audioBuffer[t];},seekIDR:function seekIDR(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e.idrIdxBuffer,e.videoBuffer,t<0)return null;if(e.idrIdxBuffer.includes(t))return t;for(var i=0;it||0===i&&e.idrIdxBuffer[i]>=t){for(var r=1;r>=0;r--){var n=i-r;if(n>=0)return e.idrIdxBuffer[n],e.idrIdxBuffer[n];}return e.idrIdxBuffer[i],j,e.idrIdxBuffer[i];}}}};return e;};},{"./bufferFrame":209}],209:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&i.extensionInfo.vHeight>0&&(i.size.width=i.extensionInfo.vWidth,i.size.height=i.extensionInfo.vHeight)),i.mediaInfo.duration,null!=i.onDemuxed&&i.onDemuxed(i.onReadyOBJ);for(var e=!1;;){var r=i.mpegTsObj.readPacket();if(r.size<=0)break;var n=r.dtime>0?r.dtime:r.ptime;if(!(n<0)){if(0==r.type){n<=i.vPreFramePTS&&(e=!0);var a=l.PACK_NALU(r.layer),o=1==r.keyframe,f=1==e?n+i.vStartTime:n,u=new s.BufferFrame(f,o,a,!0);i.bufObject.appendFrame(u.pts,u.data,!0,u.isKey),i.vPreFramePTS=f,null!=i.onSamples&&i.onSamples(i.onReadyOBJ,u);}else if(n<=i.aPreFramePTS&&(e=!0),"aac"==i.mediaInfo.aCodec)for(var c=r.data,h=0;h=3?(i._onTsReady(e),window.clearInterval(i.timerTsWasm),i.timerTsWasm=null):(i.mpegTsWasmRetryLoadTimes+=1,i.mpegTsObj.initDemuxer());},3e3);}},{key:"_onTsReady",value:function value(e){var t=this;t.hls.fetchM3u8(e),t.mpegTsWasmState=!0,t.timerFeed=window.setInterval(function(){if(t.tsList.length>0&&0==t.lockWait.state)try{var e=t.tsList.shift();if(null!=e){var i=e.streamURI,r=e.streamDur;t.lockWait.state=!0,t.lockWait.lockMember.dur=r,t.mpegTsObj.isLive=t.hls.isLive(),t.mpegTsObj.demuxURL(i);}else console.error("_onTsReady need wait ");}catch(e){console.error("onTsReady ERROR:",e),t.lockWait.state=!1;}},50);}},{key:"release",value:function value(){this.timerFeed&&window.clearInterval(this.timerFeed),this.timerTsWasm&&window.clearInterval(this.timerTsWasm);}},{key:"bindReady",value:function value(e){this.onReadyOBJ=e;}},{key:"popBuffer",value:function value(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1===e?t+1>this.bufObject.videoBuffer.length?null:this.bufObject.vFrame(t):2===e?t+1>this.bufObject.audioBuffer.length?null:this.bufObject.aFrame(t):void 0;}},{key:"getVLen",value:function value(){return this.bufObject.videoBuffer.length;}},{key:"getALen",value:function value(){return this.bufObject.audioBuffer.length;}},{key:"getLastIdx",value:function value(){return this.bufObject.videoBuffer.length-1;}},{key:"getALastIdx",value:function value(){return this.bufObject.audioBuffer.length-1;}},{key:"getACodec",value:function value(){return this.aCodec;}},{key:"getDurationMs",value:function value(){return this.durationMs;}},{key:"getFPS",value:function value(){return this.fps;}},{key:"getSampleRate",value:function value(){return this.sampleRate;}},{key:"getSampleChannel",value:function value(){return this.aChannel;}},{key:"getSize",value:function value(){return this.size;}},{key:"seek",value:function value(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t;}}}])&&r(t.prototype,i),u&&r(t,u),e;}();i.M3u8=u;},{"../consts":198,"../decoder/hevc-imp":206,"./buffer":208,"./bufferFrame":209,"./m3u8base":211,"./mpegts/mpeg.js":215}],211:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i ",t),setTimeout(function(){i.fetchM3u8(e);},500);});}},{key:"_uriParse",value:function value(e){this._preURI="";var t=e.split("//"),i=null,r=null;if(t.length<1)return!1;t.length>1?(i=t[0],r=t[1].split("/"),this._preURI=i+"//"):r=t[0].split("/");for(var n=0;n_&&(o=_);var p=r[f+=1],m=null;m=p.indexOf("http")>=0?p:this._preURI+p,this._slices.indexOf(m)<0&&(this._slices.push(m),this._slices[this._slices.length-1],null!=this.onTransportStream&&this.onTransportStream(m,_));}}}if(this._slices.length>s.hlsSliceLimit&&this._type==n.PLAYER_IN_TYPE_M3U8_LIVE&&(this._slices=this._slices.slice(-1*s.hlsSliceLimit)),null!=this.onFinished){var b={type:this._type,duration:-1};this.onFinished(b);}return o;}},{key:"_readTag",value:function value(e){var t=s.tagParse.exec(e);return null!==t?{key:t[1],value:t[3]}:null;}}])&&r(t.prototype,i),o&&r(t,o),e;}();i.M3u8Base=o;},{"../consts":198}],212:[function(e,t,i){"use strict";var r=e("mp4box"),n=e("../decoder/hevc-header"),a=e("../decoder/hevc-imp"),s=e("./buffer"),o=e("../consts"),l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12,Reserved:13,"frequency is written explictly":15},f=function f(e){for(var t=[],i=0;i1&&void 0!==arguments[1]&&arguments[1],i=null;return t?((i=e)[0]=n.DEFINE_STARTCODE[0],i[1]=n.DEFINE_STARTCODE[1],i[2]=n.DEFINE_STARTCODE[2],i[3]=n.DEFINE_STARTCODE[3]):((i=new Uint8Array(n.DEFINE_STARTCODE.length+e.length)).set(n.DEFINE_STARTCODE,0),i.set(e,n.DEFINE_STARTCODE.length)),i;},u.prototype.setAACAdts=function(e){var t=null,i=this.aacProfile,r=l[this.sampleRate],n=new Uint8Array(7),a=n.length+e.length;return n[0]=255,n[1]=241,n[2]=(i-1<<6)+(r<<2)+0,n[3]=128+(a>>11),n[4]=(2047&a)>>3,n[5]=31+((7&a)<<5),n[6]=252,(t=new Uint8Array(a)).set(n,0),t.set(e,n.length),t;},u.prototype.demux=function(){var e=this;e.seekPos=-1,e.mp4boxfile=r.createFile(),e.movieInfo=null,e.videoCodec=null,e.durationMs=-1,e.fps=-1,e.sampleRate=-1,e.aacProfile=2,e.size={width:-1,height:-1},e.bufObject=s(),e.audioNone=!1,e.naluHeader={vps:null,sps:null,pps:null,sei:null},e.mp4boxfile.onError=function(e){},this.mp4boxfile.onReady=function(t){for(var i in e.movieInfo=t,t.tracks){"VideoHandler"!==t.tracks[i].name&&"video"!==t.tracks[i].type||(t.tracks[i].codec,t.tracks[i].codec.indexOf("hev")>=0||t.tracks[i].codec.indexOf("hvc")>=0?e.videoCodec=o.CODEC_H265:t.tracks[i].codec.indexOf("avc")>=0&&(e.videoCodec=o.CODEC_H264));}var r=-1;if(r=t.videoTracks[0].samples_duration/t.videoTracks[0].timescale,e.durationMs=1e3*r,e.fps=t.videoTracks[0].nb_samples/r,e.seekDiffTime=1/e.fps,e.size.width=t.videoTracks[0].track_width,e.size.height=t.videoTracks[0].track_height,t.audioTracks.length>0){e.sampleRate=t.audioTracks[0].audio.sample_rate;var n=t.audioTracks[0].codec.split(".");e.aacProfile=n[n.length-1];}else e.audioNone=!0;null!=e.onMp4BoxReady&&e.onMp4BoxReady(e.videoCodec),e.videoCodec===o.CODEC_H265?(e.initializeAllSourceBuffers(),e.mp4boxfile.start()):(e.videoCodec,o.CODEC_H264);},e.mp4boxfile.onSamples=function(t,i,r){var s=window.setInterval(function(){for(var i=0;i3?e.naluHeader.sei=e.setStartCode(m[3][0].data,!1):e.naluHeader.sei=new Uint8Array(),e.naluHeader;}else e.videoCodec==o.CODEC_H264&&(e.naluHeader.vps=new Uint8Array(),e.naluHeader.sps=e.setStartCode(d.SPS[0].nalu,!1),e.naluHeader.pps=e.setStartCode(d.PPS[0].nalu,!1),e.naluHeader.sei=new Uint8Array());u[4].toString(16),e.naluHeader.vps[4].toString(16),f(e.naluHeader.vps),f(u);var b=e.setStartCode(u.subarray(0,e.naluHeader.vps.length),!0);if(f(b),u[4]===e.naluHeader.vps[4]){var v=e.naluHeader.vps.length+4,y=e.naluHeader.vps.length+e.naluHeader.sps.length+4,g=e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4;if(e.naluHeader.sei.length<=0&&e.naluHeader.sps.length>0&&u[v]===e.naluHeader.sps[4]&&e.naluHeader.pps.length>0&&u[y]===e.naluHeader.pps[4]&&78===u[g]){u[e.naluHeader.vps.length+4],e.naluHeader.sps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+4],e.naluHeader.pps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4];for(var w=0,E=0;E4&&u[4]===e.naluHeader.sei[4]){var C=u.subarray(0,10),S=new Uint8Array(e.naluHeader.vps.length+C.length);S.set(C,0),S.set(e.naluHeader.vps,C.length),S[3]=1,e.naluHeader.vps=null,e.naluHeader.vps=new Uint8Array(S),S=null,C=null,(u=u.subarray(10))[4],e.naluHeader.vps[4],e.naluHeader.vps;}else if(0===e.naluHeader.sei.length&&78===u[4]){u=e.setStartCode(u,!0);for(var j=0,T=0;T1&&void 0!==arguments[1]?arguments[1]:0;return e.fileStart=t,this.mp4boxfile.appendBuffer(e);},u.prototype.finishBuffer=function(){this.mp4boxfile.flush();},u.prototype.play=function(){},u.prototype.getVideoCoder=function(){return this.videoCodec;},u.prototype.getDurationMs=function(){return this.durationMs;},u.prototype.getFPS=function(){return this.fps;},u.prototype.getSampleRate=function(){return this.sampleRate;},u.prototype.getSize=function(){return this.size;},u.prototype.seek=function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t;}},u.prototype.popBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0;},u.prototype.addBuffer=function(e){var t=e.id;this.mp4boxfile.setExtractionOptions(t);},u.prototype.initializeAllSourceBuffers=function(){if(this.movieInfo){for(var e=this.movieInfo,t=0;t>5);}},{key:"sliceAACFrames",value:function value(e,t){for(var i=[],r=e,n=0;n>4==15){var a=this._getPktLen(t[n+3],t[n+4],t[n+5]);if(a<=0)continue;var s=t.subarray(n,n+a),o=new Uint8Array(a);o.set(s,0),i.push({ptime:r,data:o}),r+=this.frameDurSec,n+=a;}else n+=1;}return i;}}])&&r(t.prototype,i),n&&r(t,n),e;}();i.AACDecoder=n;},{}],215:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i ",e),r=null;})["catch"](function(i){console.error("_demuxerTsInit ERROR fetch ERROR ==> ",i),t._releaseOffset(),t.onDemuxedFailed&&t.onDemuxedFailed(i,e);});}},{key:"_releaseOffset",value:function value(){void 0!==this.offsetDemux&&null!==this.offsetDemux&&(n._free(this.offsetDemux),this.offsetDemux=null);}},{key:"_demuxCore",value:function value(e){this._releaseOffset(),this._refreshDemuxer(),this.offsetDemux=n._malloc(e.length),n.HEAP8.set(e,this.offsetDemux);var t=n.cwrap("demuxBox","number",["number","number","number"])(this.offsetDemux,e.length,this.isLive);n._free(this.offsetDemux),this.offsetDemux=null,t>=0&&(this._setMediaInfo(),this._setExtensionInfo(),null!=this.onDemuxed&&this.onDemuxed());}},{key:"_setMediaInfo",value:function value(){var e=n.cwrap("getMediaInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],o=n.HEAPF64[e/8+1+1],l=n.HEAPF64[e/8+1+1+1],f=n.HEAPF64[e/8+1+1+1+1],u=n.HEAPU32[e/4+2+2+2+2+2];this.mediaAttr.vFps=r,this.mediaAttr.vGop=u,this.mediaAttr.vDuration=o,this.mediaAttr.aDuration=l,this.mediaAttr.duration=f;var c=n.cwrap("getAudioCodecID","number",[])();c>=0?(this.mediaAttr.aCodec=s.CODEC_OFFSET_TABLE[c],this.mediaAttr.sampleRate=t>0?t:s.DEFAULT_SAMPLERATE,this.mediaAttr.sampleChannel=i>=0?i:s.DEFAULT_CHANNEL):(this.mediaAttr.sampleRate=0,this.mediaAttr.sampleChannel=0,this.mediaAttr.audioNone=!0);var h=n.cwrap("getVideoCodecID","number",[])();h>=0&&(this.mediaAttr.vCodec=s.CODEC_OFFSET_TABLE[h]),null==this.aacDec?this.aacDec=new a.AACDecoder(this.mediaAttr):this.aacDec.updateConfig(this.mediaAttr);}},{key:"_setExtensionInfo",value:function value(){var e=n.cwrap("getExtensionInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1];this.extensionInfo.vWidth=t,this.extensionInfo.vHeight=i;}},{key:"readMediaInfo",value:function value(){return this.mediaAttr;}},{key:"readExtensionInfo",value:function value(){return this.extensionInfo;}},{key:"readAudioNone",value:function value(){return this.mediaAttr.audioNone;}},{key:"_readLayer",value:function value(){var e={vps:null,sps:null,pps:null,sei:null},t={vlc:null},i=n.cwrap("getSPSLen","number",[])(),r=n.cwrap("getSPS","number",[])();e.sps=new Uint8Array(i),e.sps.set(n.HEAPU8.subarray(r,r+i),0);var a=n.cwrap("getPPSLen","number",[])(),o=n.cwrap("getPPS","number",[])();e.pps=new Uint8Array(a),e.pps.set(n.HEAPU8.subarray(o,o+a),0);var l=n.cwrap("getSEILen","number",[])(),f=n.cwrap("getSEI","number",[])();e.sei=new Uint8Array(l),e.sei.set(n.HEAPU8.subarray(f,f+l),0);var u=n.cwrap("getVLCLen","number",[])(),c=n.cwrap("getVLC","number",[])();if(t.vlc=new Uint8Array(u),t.vlc.set(n.HEAPU8.subarray(c,c+u),0),this.mediaAttr.vCodec==s.DEF_HEVC||this.mediaAttr.vCodec==s.DEF_H265){var h=n.cwrap("getVPSLen","number",[])(),d=n.cwrap("getVPS","number",[])();e.vps=new Uint8Array(h),e.vps.set(n.HEAPU8.subarray(d,d+h),0);}else this.mediaAttr.vCodec==s.DEF_AVC||(this.mediaAttr.vCodec,s.DEF_H264);return{nalu:e,vlc:t};}},{key:"readPacket",value:function value(){var e=n.cwrap("getPacket","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],a=n.HEAPF64[e/8+1+1],o=n.HEAPU32[e/4+1+1+2+2],l=n.HEAPU32[e/4+1+1+2+2+1],f=n.HEAPU8.subarray(l,l+i),u=this._readLayer();return{type:t,size:i,ptime:r,dtime:a,keyframe:o,src:f,data:1==t&&this.mediaAttr.aCodec==s.DEF_AAC?this.aacDec.sliceAACFrames(r,f):f,layer:u};}},{key:"_refreshDemuxer",value:function value(){this._releaseDemuxer(),this._initDemuxer();}},{key:"_initDemuxer",value:function value(){n.cwrap("initTsMissile","number",[])(),n.cwrap("initializeDemuxer","number",[])();}},{key:"_releaseDemuxer",value:function value(){n.cwrap("exitTsMissile","number",[])();}}])&&r(i.prototype,o),l&&r(i,l),e;}();i.MPEG_JS=o;}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{"../../decoder/missile.js":1,"./consts":213,"./decoder/aac":214}],216:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&e.extensionInfo.vHeight>0&&(e.size.width=e.extensionInfo.vWidth,e.size.height=e.extensionInfo.vHeight);for(var t=null;!((t=e.mpegTsObj.readPacket()).size<=0);){var i=t.dtime;if(0==t.type){var r=s.PACK_NALU(t.layer),n=1==t.keyframe;e.bufObject.appendFrame(i,r,!0,n);}else if("aac"==e.mediaInfo.aCodec)for(var a=t.data,o=0;o0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0;}},{key:"getACodec",value:function value(){return this.aCodec;}},{key:"getAudioNone",value:function value(){return this.mpegTsObj.mediaAttr.audioNone;}},{key:"getDurationMs",value:function value(){return this.durationMs;}},{key:"getFPS",value:function value(){return this.fps;}},{key:"getSampleRate",value:function value(){return this.sampleRate;}},{key:"getSize",value:function value(){return this.size;}},{key:"seek",value:function value(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t;}}}])&&r(t.prototype,i),o&&r(t,o),e;}();i.MpegTs=o;},{"../decoder/hevc-imp":206,"./buffer":208,"./mpegts/mpeg.js":215}],217:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];this.player.setScreen(e);}},{key:"play",value:function value(){if(this.playParam.videoCodec===c.CODEC_H265){var e={seekPos:this._getSeekTarget(),mode:this.playMode,accurateSeek:this.configFormat.accurateSeek,seekEvent:!1,realPlay:!0};this.player.play(e);}else this.player.play();return!0;}},{key:"pause",value:function value(){return this.player.pause(),!0;}},{key:"isPlaying",value:function value(){return this.player.isPlayingState();}},{key:"setVoice",value:function value(e){if(e<0)return!1;this.volume=e,this.player.setVoice(e);}},{key:"getVolume",value:function value(){return this.volume;}},{key:"mediaInfo",value:function value(){return{meta:this.playParam,videoType:this.playMode};}},{key:"_seekHLS",value:function value(e,t,i){setTimeout(function(){t.player.getCachePTS(),t.player.getCachePTS()>e?i():t._seekHLS(e,t,i);},100);}},{key:"seek",value:function value(e){var t=this;this.seekTarget=e,this.onSeekStart&&this.onSeekStart(e),this.timerFeed&&(window.clearInterval(this.timerFeed),this.timerFeed=null);var i=this._getSeekTarget();return this.playParam.videoCodec===c.CODEC_H264&&this.configFormat.type==c.PLAYER_IN_TYPE_MP4?(this.player.seek(e),this.onSeekFinish&&this.onSeekFinish()):this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?this.player.seek(function(){},{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek}):this._seekHLS(e,this,function(){t.player.seek(function(){t.configFormat.type==c.PLAYER_IN_TYPE_MP4?t.mp4Obj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_TS||t.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?t.mpegTsObj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(t.hlsObj.onSamples=null,t.hlsObj.seek(e));var i,r=(i=0,i=t.configFormat.accurateSeek?e:t._getBoxBufSeekIDR(),parseInt(i)),n=parseInt(t._getBoxBufSeekIDR())||0;t._avFeedMP4Data(n,r);},{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek});}),!0;}},{key:"fullScreen",value:function value(){this.autoScreenClose=!0;var e=document.querySelector("#"+this.configFormat.playerId),t=e.getElementsByTagName("canvas")[0];e.style.width=this.screenW+"px",e.style.height=this.screenH+"px";var i=this._checkScreenDisplaySize(this.screenW,this.screenH,this.playParam.size.width,this.playParam.size.height);t.style.marginTop=i[0]+"px",t.style.marginLeft=i[1]+"px",t.style.width=i[2]+"px",t.style.height=i[3]+"px",this._requestFullScreen(e);}},{key:"closeFullScreen",value:function value(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!1===e&&(this.autoScreenClose=!1,this._exitFull());var t=document.querySelector("#"+this.configFormat.playerId),i=t.getElementsByTagName("canvas")[0];t.style.width=this.configFormat.playerW+"px",t.style.height=this.configFormat.playerH+"px";var r=this._checkScreenDisplaySize(this.configFormat.playerW,this.configFormat.playerH,this.playParam.size.width,this.playParam.size.height);i.style.marginTop=r[0]+"px",i.style.marginLeft=r[1]+"px",i.style.width=r[2]+"px",i.style.height=r[3]+"px";}},{key:"_checkScreenDisplaySize",value:function value(e,t,i,r){var n=i/e>r/t,a=(e/i).toFixed(2),s=(t/r).toFixed(2),o=n?a:s,l=this.fixed?e:parseInt(i*o),f=this.fixed?t:parseInt(r*o);return[parseInt((t-f)/2),parseInt((e-l)/2),l,f];}},{key:"_isFullScreen",value:function value(){var e=document.fullscreenElement||document.mozFullscreenElement||document.webkitFullscreenElement;return document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled,null!=e;}},{key:"_requestFullScreen",value:function value(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullScreen();}},{key:"_exitFull",value:function value(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen();}},{key:"_durationText",value:function value(e){if(e<0)return"Play";var t=Math.round(e);return Math.floor(t/3600)+":"+Math.floor(t%3600/60)+":"+Math.floor(t%60);}},{key:"_getSeekTarget",value:function value(){return this.configFormat.accurateSeek?this.seekTarget:this._getBoxBufSeekIDR();}},{key:"_getBoxBufSeekIDR",value:function value(){return this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.mp4Obj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this.mpegTsObj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this.hlsObj.seekPos:void 0;}},{key:"_playControl",value:function value(){this.isPlaying()?this.pause():this.play();}},{key:"_avFeedMP4Data",value:function value(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=parseInt(this.playParam.durationMs/1e3);this.player.clearAllCache(),this.timerFeed=window.setInterval(function(){var a=null,s=null,o=!0,l=!0;if(e.configFormat.type==c.PLAYER_IN_TYPE_MP4?(a=e.mp4Obj.popBuffer(1,t),s=e.mp4Obj.audioNone?null:e.mp4Obj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_TS||e.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?(a=e.mpegTsObj.popBuffer(1,t),s=e.mpegTsObj.getAudioNone()?null:e.mpegTsObj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(a=e.hlsObj.popBuffer(1,t),s=e.hlsObj.audioNone?null:e.hlsObj.popBuffer(2,i),t=e.hlsObj.getLastIdx()&&(o=!1),i=e.hlsObj.getALastIdx()&&(l=!1)),!0===o&&null!=a)for(var f=0;fn)return window.clearInterval(e.timerFeed),e.timerFeed=null,e.player.vCachePTS,e.player.aCachePTS,void(null!=r&&r());},5);}},{key:"_makeMP4Player",value:function value(){null!=this.configFormat.extInfo.core&&null!==this.configFormat.extInfo.core&&this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?this._cDemuxDecoderEntry():this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.configFormat.extInfo.moovStartFlag?this._mp4EntryVodStream():this._mp4Entry():this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this._mpegTsEntry():this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this._m3u8Entry():this.configFormat.type===c.PLAYER_IN_TYPE_RAW_265&&this._raw265Entry();}},{key:"_makeMP4PlayerViewEvent",value:function value(e,t,i,r){var a=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=this;if(this.playParam.durationMs=e,this.playParam.fps=t,this.playParam.sampleRate=i,this.playParam.size=r,this.playParam.audioNone=s,this.playParam.videoCodec=o||c.CODEC_H265,this.playParam,(this.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&this.hlsConf.hlsType==c.PLAYER_IN_TYPE_M3U8_LIVE||this.configFormat.type==c.PLAYER_IN_TYPE_RAW_265)&&(this.playMode=c.PLAYER_MODE_NOTIME_LIVE),l.configFormat.extInfo.autoCrop){var f=document.querySelector("#"+this.configFormat.playerId),u=r.width/r.height,h=this.configFormat.playerW/this.configFormat.playerH;u>h?f.style.height=this.configFormat.playerW/u+"px":u>1,a>>1,i),e.v.fill(n>>1,a>>1,r),e.drawArrays(e.TRIANGLE_STRIP,0,4);},setupCanvas:function setupCanvas(e,t){var i=e.getContext("webgl")||e.getContext("experimental-webgl");if(!i)return i;var n=i.createProgram(),a=["attribute highp vec4 aVertexPosition;","attribute vec2 aTextureCoord;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = aVertexPosition;"," vTextureCoord = aTextureCoord;","}"].join("\n"),s=i.createShader(i.VERTEX_SHADER);i.shaderSource(s,a),i.compileShader(s);var o=["precision highp float;","varying lowp vec2 vTextureCoord;","uniform sampler2D YTexture;","uniform sampler2D UTexture;","uniform sampler2D VTexture;","const mat4 YUV2RGB = mat4","("," 1.1643828125, 0, 1.59602734375, -.87078515625,"," 1.1643828125, -.39176171875, -.81296875, .52959375,"," 1.1643828125, 2.017234375, 0, -1.081390625,"," 0, 0, 0, 1",");","void main(void) {"," gl_FragColor = vec4( texture2D(YTexture, vTextureCoord).x, texture2D(UTexture, vTextureCoord).x, texture2D(VTexture, vTextureCoord).x, 1) * YUV2RGB;","}"].join("\n"),l=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(l,o),i.compileShader(l),i.attachShader(n,s),i.attachShader(n,l),i.linkProgram(n),i.useProgram(n),i.getProgramParameter(n,i.LINK_STATUS);var f=i.getAttribLocation(n,"aVertexPosition");i.enableVertexAttribArray(f);var u=i.getAttribLocation(n,"aTextureCoord");i.enableVertexAttribArray(u);var c=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,c),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0]),i.STATIC_DRAW),i.vertexAttribPointer(f,3,i.FLOAT,!1,0,0);var h=i.createBuffer();return i.bindBuffer(i.ARRAY_BUFFER,h),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),i.STATIC_DRAW),i.vertexAttribPointer(u,2,i.FLOAT,!1,0,0),i.y=new r(i),i.u=new r(i),i.v=new r(i),i.y.bind(0,n,"YTexture"),i.u.bind(1,n,"UTexture"),i.v.bind(2,n,"VTexture"),i;}};},{}],220:[function(e,t,i){(function(e){"use strict";e.STATIC_MEM_wasmDecoderState=-1,e.STATICE_MEM_playerCount=-1,e.STATICE_MEM_playerIndexPtr=0;}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{}],221:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i>>32-t;}function f(e,t,i,r,n,a,s){return l(e+(t&i|~t&r)+n+a|0,s)+t|0;}function u(e,t,i,r,n,a,s){return l(e+(t&r|i&~r)+n+a|0,s)+t|0;}function h(e,t,i,r,n,a,s){return l(e+(t^i^r)+n+a|0,s)+t|0;}function c(e,t,i,r,n,a,s){return l(e+(i^(t|~r))+n+a|0,s)+t|0;}r(o,n),o.prototype._update=function(){for(var e=s,t=0;t<16;++t){e[t]=this._block.readInt32LE(4*t);}var i=this._a,r=this._b,n=this._c,a=this._d;i=f(i,r,n,a,e[0],3614090360,7),a=f(a,i,r,n,e[1],3905402710,12),n=f(n,a,i,r,e[2],606105819,17),r=f(r,n,a,i,e[3],3250441966,22),i=f(i,r,n,a,e[4],4118548399,7),a=f(a,i,r,n,e[5],1200080426,12),n=f(n,a,i,r,e[6],2821735955,17),r=f(r,n,a,i,e[7],4249261313,22),i=f(i,r,n,a,e[8],1770035416,7),a=f(a,i,r,n,e[9],2336552879,12),n=f(n,a,i,r,e[10],4294925233,17),r=f(r,n,a,i,e[11],2304563134,22),i=f(i,r,n,a,e[12],1804603682,7),a=f(a,i,r,n,e[13],4254626195,12),n=f(n,a,i,r,e[14],2792965006,17),i=u(i,r=f(r,n,a,i,e[15],1236535329,22),n,a,e[1],4129170786,5),a=u(a,i,r,n,e[6],3225465664,9),n=u(n,a,i,r,e[11],643717713,14),r=u(r,n,a,i,e[0],3921069994,20),i=u(i,r,n,a,e[5],3593408605,5),a=u(a,i,r,n,e[10],38016083,9),n=u(n,a,i,r,e[15],3634488961,14),r=u(r,n,a,i,e[4],3889429448,20),i=u(i,r,n,a,e[9],568446438,5),a=u(a,i,r,n,e[14],3275163606,9),n=u(n,a,i,r,e[3],4107603335,14),r=u(r,n,a,i,e[8],1163531501,20),i=u(i,r,n,a,e[13],2850285829,5),a=u(a,i,r,n,e[2],4243563512,9),n=u(n,a,i,r,e[7],1735328473,14),i=h(i,r=u(r,n,a,i,e[12],2368359562,20),n,a,e[5],4294588738,4),a=h(a,i,r,n,e[8],2272392833,11),n=h(n,a,i,r,e[11],1839030562,16),r=h(r,n,a,i,e[14],4259657740,23),i=h(i,r,n,a,e[1],2763975236,4),a=h(a,i,r,n,e[4],1272893353,11),n=h(n,a,i,r,e[7],4139469664,16),r=h(r,n,a,i,e[10],3200236656,23),i=h(i,r,n,a,e[13],681279174,4),a=h(a,i,r,n,e[0],3936430074,11),n=h(n,a,i,r,e[3],3572445317,16),r=h(r,n,a,i,e[6],76029189,23),i=h(i,r,n,a,e[9],3654602809,4),a=h(a,i,r,n,e[12],3873151461,11),n=h(n,a,i,r,e[15],530742520,16),i=c(i,r=h(r,n,a,i,e[2],3299628645,23),n,a,e[0],4096336452,6),a=c(a,i,r,n,e[7],1126891415,10),n=c(n,a,i,r,e[14],2878612391,15),r=c(r,n,a,i,e[5],4237533241,21),i=c(i,r,n,a,e[12],1700485571,6),a=c(a,i,r,n,e[3],2399980690,10),n=c(n,a,i,r,e[10],4293915773,15),r=c(r,n,a,i,e[1],2240044497,21),i=c(i,r,n,a,e[8],1873313359,6),a=c(a,i,r,n,e[15],4264355552,10),n=c(n,a,i,r,e[6],2734768916,15),r=c(r,n,a,i,e[13],1309151649,21),i=c(i,r,n,a,e[4],4149444226,6),a=c(a,i,r,n,e[11],3174756917,10),n=c(n,a,i,r,e[2],718787259,15),r=c(r,n,a,i,e[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+a|0;},o.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=a.allocUnsafe(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=o;},{"hash-base":106,inherits:136,"safe-buffer":184}],140:[function(e,t,i){var r=e("bn.js"),n=e("brorand");function a(e){this.rand=e||new n.Rand();}t.exports=a,a.create=function(e){return new a(e);},a.prototype._randbelow=function(e){var t=e.bitLength(),i=Math.ceil(t/8);do{var n=new r(this.rand.generate(i));}while(n.cmp(e)>=0);return n;},a.prototype._randrange=function(e,t){var i=t.sub(e);return e.add(this._randbelow(i));},a.prototype.test=function(e,t,i){var n=e.bitLength(),a=r.mont(e),s=new r(1).toRed(a);t||(t=Math.max(1,n/48|0));for(var o=e.subn(1),l=0;!o.testn(l);l++){;}for(var f=e.shrn(l),u=o.toRed(a);t>0;t--){var h=this._randrange(new r(2),o);i&&i(h);var c=h.toRed(a).redPow(f);if(0!==c.cmp(s)&&0!==c.cmp(u)){for(var d=1;d0;t--){var u=this._randrange(new r(2),s),h=e.gcd(u);if(0!==h.cmpn(1))return h;var c=u.toRed(n).redPow(l);if(0!==c.cmp(a)&&0!==c.cmp(f)){for(var d=1;d>8,s=255&n;a?i.push(a,s):i.push(s);}return i;},r.zero2=n,r.toHex=a,r.encode=function(e,t){return"hex"===t?a(e):e;};},{}],144:[function(e,t,i){var r,n,a=(r=new Date(),n=4,{setLogLevel:function setLogLevel(e){n=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4);},debug:function debug(e,t){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+a.getDurationString(new Date()-r,1e3)+"]","["+e+"]",t);},log:function log(e,t){this.debug(e.msg);},info:function info(e,t){2>=n&&console.info("["+a.getDurationString(new Date()-r,1e3)+"]","["+e+"]",t);},warn:function warn(e,t){3>=n&&a.getDurationString(new Date()-r,1e3);},error:function error(e,t){4>=n&&console.error("["+a.getDurationString(new Date()-r,1e3)+"]","["+e+"]",t);}});a.getDurationString=function(e,t){var i;function r(e,t){for(var i=(""+e).split(".");i[0].length0){for(var i="",r=0;r0&&(i+=","),i+="["+a.getDurationString(e.start(r))+","+a.getDurationString(e.end(r))+"]";}return i;}return"(empty)";},void 0!==i&&(i.Log=a);var s=function s(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0;};s.prototype.getPosition=function(){return this.position;},s.prototype.getEndPosition=function(){return this.buffer.byteLength;},s.prototype.getLength=function(){return this.buffer.byteLength;},s.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0;},s.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition();},s.prototype.readAnyInt=function(e,t){var i=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:i=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:i=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";i=this.dataview.getUint8(this.position)<<16,i|=this.dataview.getUint8(this.position)<<8,i|=this.dataview.getUint8(this.position);break;case 4:i=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";i=this.dataview.getUint32(this.position)<<32,i|=this.dataview.getUint32(this.position);break;default:throw"readInt method not implemented for size: "+e;}return this.position+=e,i;}throw"Not enough bytes in buffer";},s.prototype.readUint8=function(){return this.readAnyInt(1,!1);},s.prototype.readUint16=function(){return this.readAnyInt(2,!1);},s.prototype.readUint24=function(){return this.readAnyInt(3,!1);},s.prototype.readUint32=function(){return this.readAnyInt(4,!1);},s.prototype.readUint64=function(){return this.readAnyInt(8,!1);},s.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",i=0;ithis._byteLength&&(this._byteLength=t);else{for(i<1&&(i=1);t>i;){i*=2;}var r=new ArrayBuffer(i),n=new Uint8Array(this._buffer);new Uint8Array(r,0,n.length).set(n),this.buffer=r,this._byteLength=t;}}},o.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),i=new Uint8Array(this._buffer,0,t.length);t.set(i),this.buffer=e;}},o.BIG_ENDIAN=!1,o.LITTLE_ENDIAN=!0,o.prototype._byteLength=0,Object.defineProperty(o.prototype,"byteLength",{get:function get(){return this._byteLength-this._byteOffset;}}),Object.defineProperty(o.prototype,"buffer",{get:function get(){return this._trimAlloc(),this._buffer;},set:function set(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength;}}),Object.defineProperty(o.prototype,"byteOffset",{get:function get(){return this._byteOffset;},set:function set(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength;}}),Object.defineProperty(o.prototype,"dataView",{get:function get(){return this._dataView;},set:function set(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength;}}),o.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t;},o.prototype.isEof=function(){return this.position>=this._byteLength;},o.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t;},o.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Int32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Int16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t;},o.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Uint32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Uint16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t;},o.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var i=new Float64Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Float32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i;},o.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t;},o.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t;},o.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e;},o.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t;},o.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t;},o.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e;},o.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t;},o.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t;},o.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,o.memcpy=function(e,t,i,r,n){var a=new Uint8Array(e,t,n),s=new Uint8Array(i,r,n);a.set(s);},o.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e);},o.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e);},o.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i=0;in;r--,n++){var a=t[n];t[n]=t[r],t[r]=a;}}return e;},o.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],i=0;i>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e);},o.prototype.adjustUint32=function(e,t){var i=this.position;this.seek(e),this.writeUint32(t),this.seek(i);},o.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var i=new Int32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i;},o.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var i=new Int16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i;},o.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t;},o.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i;},o.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i;},o.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var i=new Float64Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=8*e,i;},o.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var i=new Float32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i;};var f=function f(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0);};(f.prototype=new o(new ArrayBuffer(),0,o.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1));},ArrayBuffer.concat=function(e,t){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),e.byteLength),i.buffer;},f.prototype.reduceBuffer=function(e,t,i){var r;return(r=new Uint8Array(i)).set(new Uint8Array(e,t,i)),r.buffer.fileStart=e.fileStart+t,r.buffer.usedBytes=0,r.buffer;},f.prototype.insertBuffer=function(e){for(var t=!0,i=0;ir.byteLength){this.buffers.splice(i,1),i--;continue;}a.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring");}else e.fileStart+e.byteLength<=r.fileStart||(e=this.reduceBuffer(e,0,r.fileStart-e.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(i,0,e),0===i&&(this.buffer=e);t=!1;break;}if(e.fileStart0)){t=!1;break;}e=this.reduceBuffer(e,n,s);}}t&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===i&&(this.buffer=e));},f.prototype.logBufferLevel=function(e){var t,i,r,n,s,o=[],l="";for(r=0,n=0,t=0;t0&&(l+=s.end-1+"]");var f=e?a.info:a.debug;0===this.buffers.length?f("MultiBufferStream","No more buffer in memory"):f("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+r+"/"+n+" bytes): "+l);},f.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0;}return!1;}return!1;},f.prototype.findPosition=function(e,t,i){var r,n=null,s=-1;for(r=!0===e?0:this.bufferIndex;r=t?(a.debug("MultiBufferStream","Found position in existing buffer #"+s),s):-1;},f.prototype.findEndContiguousBuf=function(e){var t,i,r,n=void 0!==e?e:this.bufferIndex;if(i=this.buffers[n],this.buffers.length>n+1)for(t=n+1;t>3;return 31===r&&i.data.length>=2&&(r=32+((7&i.data[0])<<3)+((224&i.data[1])>>5)),r;}return null;},i.DecoderConfigDescriptor=function(e){i.Descriptor.call(this,4,e);},i.DecoderConfigDescriptor.prototype=new i.Descriptor(),i.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e);},i.DecoderSpecificInfo=function(e){i.Descriptor.call(this,5,e);},i.DecoderSpecificInfo.prototype=new i.Descriptor(),i.SLConfigDescriptor=function(e){i.Descriptor.call(this,6,e);},i.SLConfigDescriptor.prototype=new i.Descriptor(),this;};void 0!==i&&(i.MPEG4DescriptorParser=u);var h={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function initialize(){h.FullBox.prototype=new h.Box(),h.ContainerBox.prototype=new h.Box(),h.SampleEntry.prototype=new h.Box(),h.TrackGroupTypeBox.prototype=new h.FullBox(),h.BASIC_BOXES.forEach(function(e){h.createBoxCtor(e);}),h.FULL_BOXES.forEach(function(e){h.createFullBoxCtor(e);}),h.CONTAINER_BOXES.forEach(function(e){h.createContainerBoxCtor(e[0],null,e[1]);});},Box:function Box(e,t,i){this.type=e,this.size=t,this.uuid=i;},FullBox:function FullBox(e,t,i){h.Box.call(this,e,t,i),this.flags=0,this.version=0;},ContainerBox:function ContainerBox(e,t,i){h.Box.call(this,e,t,i),this.boxes=[];},SampleEntry:function SampleEntry(e,t,i,r){h.ContainerBox.call(this,e,t),this.hdr_size=i,this.start=r;},SampleGroupEntry:function SampleGroupEntry(e){this.grouping_type=e;},TrackGroupTypeBox:function TrackGroupTypeBox(e,t){h.FullBox.call(this,e,t);},createBoxCtor:function createBoxCtor(e,t){h.boxCodes.push(e),h[e+"Box"]=function(t){h.Box.call(this,e,t);},h[e+"Box"].prototype=new h.Box(),t&&(h[e+"Box"].prototype.parse=t);},createFullBoxCtor:function createFullBoxCtor(e,t){h[e+"Box"]=function(t){h.FullBox.call(this,e,t);},h[e+"Box"].prototype=new h.FullBox(),h[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e);};},addSubBoxArrays:function addSubBoxArrays(e){if(e){this.subBoxNames=e;for(var t=e.length,i=0;ii?(a.error("BoxParser","Box of type '"+u+"' has a size "+f+" greater than its container size "+i),{code:h.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):o+f>e.getEndPosition()?(e.seek(o),a.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:h.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):t?{code:h.OK,type:u,size:f,hdr_size:l,start:o}:(h[u+"Box"]?r=new h[u+"Box"](f):"uuid"!==u?(a.warn("BoxParser","Unknown box type: '"+u+"'"),(r=new h.Box(u,f)).has_unparsed_data=!0):h.UUIDBoxes[s]?r=new h.UUIDBoxes[s](f):(a.warn("BoxParser","Unknown uuid type: '"+s+"'"),(r=new h.Box(u,f)).uuid=s,r.has_unparsed_data=!0),r.hdr_size=l,r.start=o,r.write===h.Box.prototype.write&&"mdat"!==r.type&&(a.info("BoxParser","'"+c+"' box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(e)),r.parse(e),(n=e.getPosition()-(r.start+r.size))<0?(a.warn("BoxParser","Parsing of box '"+c+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),e.seek(r.start+r.size)):n>0&&(a.error("BoxParser","Parsing of box '"+c+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),e.seek(r.start+r.size)),{code:h.OK,box:r,size:r.size});},h.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size);},h.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size;},h.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size;},h.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4;},h.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size);},h.ContainerBox.prototype.parse=function(e){for(var t,i;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96);},h.SAMPLE_ENTRY_TYPE_VISUAL="Visual",h.SAMPLE_ENTRY_TYPE_AUDIO="Audio",h.SAMPLE_ENTRY_TYPE_HINT="Hint",h.SAMPLE_ENTRY_TYPE_METADATA="Metadata",h.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",h.SAMPLE_ENTRY_TYPE_SYSTEM="System",h.SAMPLE_ENTRY_TYPE_TEXT="Text",h.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8;},h.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size);},h.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size;},h.SampleEntry.prototype.parseFooter=function(e){h.ContainerBox.prototype.parse.call(this,e);},h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_HINT),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_METADATA),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SUBTITLE),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SYSTEM),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_TEXT),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e);}),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e);}),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_TEXT,"enct"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_METADATA,"encm"),h.createBoxCtor("av1C",function(e){var t=e.readUint8();if(t>>7&!1)a.error("av1C marker problem");else if(this.version=127&t,1===this.version){if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void a.error("av1C reserved_2 parsing problem");var i=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(i);}else a.error("av1C reserved_1 parsing problem");}else a.error("av1C version "+this.version+" not supported");}),h.createBoxCtor("avcC",function(e){var t,i;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),i=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(i));}),h.createBoxCtor("btrt",function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32();}),h.createBoxCtor("clap",function(e){this.cleanApertureWidthN=e.readUint32(),this.cleanApertureWidthD=e.readUint32(),this.cleanApertureHeightN=e.readUint32(),this.cleanApertureHeightD=e.readUint32(),this.horizOffN=e.readUint32(),this.horizOffD=e.readUint32(),this.vertOffN=e.readUint32(),this.vertOffD=e.readUint32();}),h.createBoxCtor("clli",function(e){this.max_content_light_level=e.readUint16(),this.max_pic_average_light_level=e.readUint16();}),h.createFullBoxCtor("co64",function(e){var t,i;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(i=0;i>7;}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4));}),h.createFullBoxCtor("cprt",function(e){this.parseLanguage(e),this.notice=e.readCString();}),h.createFullBoxCtor("cslg",function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32());}),h.createFullBoxCtor("ctts",function(e){var t,i;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(i=0;i>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|i>>6&3,this.acmod=i>>3&7,this.lfeon=i>>2&1,this.bit_rate_code=3&i|r>>5&7;}),h.createBoxCtor("dec3",function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var i=0;i>6,r.bsid=n>>1&31,r.bsmod=(1&n)<<4|a>>4&15,r.acmod=a>>1&7,r.lfeon=1&a,r.num_dep_sub=s>>1&15,r.num_dep_sub>0&&(r.chan_loc=(1&s)<<8|e.readUint8());}}),h.createFullBoxCtor("dfLa",function(e){var t=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var r=e.readUint8(),n=Math.min(127&r,i.length-1);if(n?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(i[n]),128&r)break;}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")";}),h.createBoxCtor("dimm",function(e){this.bytessent=e.readUint64();}),h.createBoxCtor("dmax",function(e){this.time=e.readUint32();}),h.createBoxCtor("dmed",function(e){this.bytessent=e.readUint64();}),h.createFullBoxCtor("dref",function(e){var t,i;this.entries=[];for(var r=e.readUint32(),n=0;n=4;){this.compatible_brands[i]=e.readString(4),t-=4,i++;}}),h.createFullBoxCtor("hdlr",function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)));}),h.createBoxCtor("hvcC",function(e){var t,i,r,n;this.configurationVersion=e.readUint8(),n=e.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),n=e.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var a=e.readUint8();for(t=0;t>7,s.nalu_type=63&n;var o=e.readUint16();for(i=0;i>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var i=0;if(this.version<2)i=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";i=e.readUint32();}for(var r=0;r=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()));}),h.createFullBoxCtor("ipma",function(e){var t,i;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?s.property_index=(127&a)<<8|e.readUint8():s.property_index=127&a;}}}),h.createFullBoxCtor("iref",function(e){var t,i;for(this.references=[];e.getPosition()>7,r.assignment_type=127&n,r.assignment_type){case 0:r.grouping_type=e.readString(4);break;case 1:r.grouping_type=e.readString(4),r.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:r.sub_track_id=e.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type");}}}),h.createBoxCtor("maxr",function(e){this.period=e.readUint32(),this.bytes=e.readUint32();}),h.createBoxCtor("mdcv",function(e){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=e.readUint16(),this.display_primaries[0].y=e.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=e.readUint16(),this.display_primaries[1].y=e.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=e.readUint16(),this.display_primaries[2].y=e.readUint16(),this.white_point={},this.white_point.x=e.readUint16(),this.white_point.y=e.readUint16(),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32();}),h.createFullBoxCtor("mdhd",function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16();}),h.createFullBoxCtor("mehd",function(e){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32();}),h.createFullBoxCtor("meta",function(e){this.boxes=[],h.ContainerBox.prototype.parse.call(this,e);}),h.createFullBoxCtor("mfhd",function(e){this.sequence_number=e.readUint32();}),h.createFullBoxCtor("mfro",function(e){this._size=e.readUint32();}),h.createFullBoxCtor("mvhd",function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32();}),h.createBoxCtor("npck",function(e){this.packetssent=e.readUint32();}),h.createBoxCtor("nump",function(e){this.packetssent=e.readUint64();}),h.createFullBoxCtor("padb",function(e){var t=e.readUint32();this.padbits=[];for(var i=0;i0){var t=e.readUint32();this.kid=[];for(var i=0;i0&&(this.data=e.readUint8Array(r));}),h.createFullBoxCtor("clef",function(e){this.width=e.readUint32(),this.height=e.readUint32();}),h.createFullBoxCtor("enof",function(e){this.width=e.readUint32(),this.height=e.readUint32();}),h.createFullBoxCtor("prof",function(e){this.width=e.readUint32(),this.height=e.readUint32();}),h.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),h.createBoxCtor("rtp ",function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4);}),h.createFullBoxCtor("saio",function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var i=0;i>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var i=e.readUint8(),r=0;r>7,this.num_leading_samples=127&t;}),h.createSampleGroupCtor("rash",function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=h.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size));}),h.createSampleGroupCtor("stsa",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),h.createSampleGroupCtor("sync",function(e){var t=e.readUint8();this.NAL_unit_type=63&t;}),h.createSampleGroupCtor("tele",function(e){var t=e.readUint8();this.level_independently_decodable=t>>7;}),h.createSampleGroupCtor("tsas",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),h.createSampleGroupCtor("tscl",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),h.createSampleGroupCtor("vipr",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),h.createFullBoxCtor("sbgp",function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),i=0;i>6,this.sample_depends_on[r]=t>>4&3,this.sample_is_depended_on[r]=t>>2&3,this.sample_has_redundancy[r]=3&t;}}),h.createFullBoxCtor("senc"),h.createFullBoxCtor("sgpd",function(e){this.grouping_type=e.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),i=0;i>31&1,r.referenced_size=2147483647&n,r.subsegment_duration=e.readUint32(),n=e.readUint32(),r.starts_with_SAP=n>>31&1,r.SAP_type=n>>28&7,r.SAP_delta_time=268435455&n;}}),h.SingleItemTypeReferenceBox=function(e,t,i,r){h.Box.call(this,e,t),this.hdr_size=i,this.start=r;},h.SingleItemTypeReferenceBox.prototype=new h.Box(),h.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var i=0;i>4&15,this.sample_sizes[t+1]=15&r;}else if(8===this.field_size)for(t=0;t0)for(i=0;i>4&15,this.default_skip_byte_block=15&t;}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=h.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size));}),h.createFullBoxCtor("tfdt",function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32();}),h.createFullBoxCtor("tfhd",function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0;}),h.createFullBoxCtor("tfra",function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var i=e.readUint32(),r=0;r>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32();}),h.createBoxCtor("tmax",function(e){this.time=e.readUint32();}),h.createBoxCtor("tmin",function(e){this.time=e.readUint32();}),h.createBoxCtor("totl",function(e){this.bytessent=e.readUint32();}),h.createBoxCtor("tpay",function(e){this.bytessent=e.readUint32();}),h.createBoxCtor("tpyl",function(e){this.bytessent=e.readUint64();}),h.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32();},h.createTrackGroupCtor("msrc"),h.TrackReferenceTypeBox=function(e,t,i,r){h.Box.call(this,e,t),this.hdr_size=i,this.start=r;},h.TrackReferenceTypeBox.prototype=new h.Box(),h.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4);},h.trefBox.prototype.parse=function(e){for(var t,i;e.getPosition()t&&this.flags&h.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&h.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var i=0;i0&&(this.location=e.readCString());}),h.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");}),h.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,function(e){this.system_id=h.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t));}),h.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),h.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=h.parseHex16(e);}),h.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize));}),h.createBoxCtor("vttC",function(e){this.text=e.readString(this.size-this.hdr_size);}),h.SampleEntry.prototype.isVideo=function(){return!1;},h.SampleEntry.prototype.isAudio=function(){return!1;},h.SampleEntry.prototype.isSubtitle=function(){return!1;},h.SampleEntry.prototype.isMetadata=function(){return!1;},h.SampleEntry.prototype.isHint=function(){return!1;},h.SampleEntry.prototype.getCodec=function(){return this.type.replace(".","");},h.SampleEntry.prototype.getWidth=function(){return"";},h.SampleEntry.prototype.getHeight=function(){return"";},h.SampleEntry.prototype.getChannelCount=function(){return"";},h.SampleEntry.prototype.getSampleRate=function(){return"";},h.SampleEntry.prototype.getSampleSize=function(){return"";},h.VisualSampleEntry.prototype.isVideo=function(){return!0;},h.VisualSampleEntry.prototype.getWidth=function(){return this.width;},h.VisualSampleEntry.prototype.getHeight=function(){return this.height;},h.AudioSampleEntry.prototype.isAudio=function(){return!0;},h.AudioSampleEntry.prototype.getChannelCount=function(){return this.channel_count;},h.AudioSampleEntry.prototype.getSampleRate=function(){return this.samplerate;},h.AudioSampleEntry.prototype.getSampleSize=function(){return this.samplesize;},h.SubtitleSampleEntry.prototype.isSubtitle=function(){return!0;},h.MetadataSampleEntry.prototype.isMetadata=function(){return!0;},h.decimalToHex=function(e,t){var i=Number(e).toString(16);for(t=null==t?t=2:t;i.length>=1;}t+=h.decimalToHex(r,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var n=!1,a="";for(e=5;e>=0;e--){(this.hvcC.general_constraint_indicator[e]||n)&&(a="."+h.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+a,n=!0);}t+=a;}return t;},h.mp4aSampleEntry.prototype.getCodec=function(){var e=h.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),i=this.esds.esd.getAudioConfig();return e+"."+h.decimalToHex(t)+(i?"."+i:"");}return e;},h.stxtSampleEntry.prototype.getCodec=function(){var e=h.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e;},h.av01SampleEntry.prototype.getCodec=function(){var e,t=h.SampleEntry.prototype.getCodec.call(this);return 2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+this.av1C.seq_level_idx_0+(this.av1C.seq_tier_0?"H":"M")+"."+e;},h.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>l?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>l&&e.writeUint64(this.size);},h.FullBox.prototype.writeHeader=function(e){this.size+=4,h.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags);},h.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data));},h.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1-1||e[i]instanceof h.Box||t[i]instanceof h.Box||void 0===e[i]||void 0===t[i]||"function"==typeof e[i]||"function"==typeof t[i]||e.subBoxNames&&e.subBoxNames.indexOf(i.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(i.slice(0,4))>-1||"data"===i||"start"===i||"size"===i||"creation_time"===i||"modification_time"===i||h.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1||e[i]===t[i]))return!1;}return!0;},h.boxEqual=function(e,t){if(!h.boxEqualFields(e,t))return!1;for(var i=0;i=t?e:new Array(t-e.length+1).join(i)+e;}function n(e){var t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),n=Math.floor(e-3600*t-60*i),a=Math.floor(1e3*(e-3600*t-60*i-n));return r(t,2)+":"+r(i,2)+":"+r(n,2)+"."+r(a,3);}for(var a=this.parseSample(i),s="",o=0;o1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1);},p.prototype.setExtractionOptions=function(e,t,i){var r=this.getTrackById(e);if(r){var n={};this.extractedTracks.push(n),n.id=e,n.user=t,n.trak=r,r.nextSample=0,n.nb_samples=1e3,n.samples=[],i&&i.nbSamples&&(n.nb_samples=i.nbSamples);}},p.prototype.unsetExtractionOptions=function(e){for(var t=-1,i=0;i-1&&this.extractedTracks.splice(t,1);},p.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return;}if(this.saveParsePosition&&this.saveParsePosition(),(e=h.parseOneBox(this.stream,!1)).code===h.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return;}return;}var i;switch(i="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),i){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[i]&&a.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=t;}this.updateUsedBytes&&this.updateUsedBytes(t,e);}},p.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1));},p.prototype.appendBuffer=function(e,t){var i;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(i=this.nextSeekPosition,this.nextSeekPosition=void 0):i=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(i=this.stream.getEndFilePositionAfter(i))):i=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+i),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i;},p.prototype.getInfo=function(){var e,t,i,r,n,a={},s=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(a.hasMoov=!0,a.duration=this.moov.mvhd.duration,a.timescale=this.moov.mvhd.timescale,a.isFragmented=null!=this.moov.mvex,a.isFragmented&&this.moov.mvex.mehd&&(a.fragment_duration=this.moov.mvex.mehd.fragment_duration),a.isProgressive=this.isProgressive,a.hasIOD=null!=this.moov.iods,a.brands=[],a.brands.push(this.ftyp.major_brand),a.brands=a.brands.concat(this.ftyp.compatible_brands),a.created=new Date(s+1e3*this.moov.mvhd.creation_time),a.modified=new Date(s+1e3*this.moov.mvhd.modification_time),a.tracks=[],a.audioTracks=[],a.videoTracks=[],a.subtitleTracks=[],a.metadataTracks=[],a.hintTracks=[],a.otherTracks=[],e=0;e0?a.mime+='video/mp4; codecs="':a.audioTracks&&a.audioTracks.length>0?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e=i.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+r.id+" for samples ["+Math.max(0,i.nextSample-r.nb_samples)+","+(i.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(r.id,r.user,r.segmentStream.buffer,i.nextSample,e||i.nextSample>=i.samples.length),r.segmentStream=null,r!==this.fragmentedTracks[t]))break;}}if(null!==this.onSamples)for(t=0;t=i.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+s.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(s.id,s.user,s.samples),s.samples=[],s!==this.extractedTracks[t]))break;}}}},p.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null;},p.prototype.getBoxes=function(e,t){var i=[];return p._sweep.call(this,e,i,t),i;},p._sweep=function(e,t,i){for(var r in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;p._sweep.call(this.boxes[r],e,t,i);}},p.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0;},p.prototype.getTrackSample=function(e,t){var i=this.getTrackById(e);return this.getSample(i,t);},p.prototype.releaseUsedSamples=function(e,t){var i=0,r=this.getTrackById(e);r.lastValidSample||(r.lastValidSample=0);for(var n=r.lastValidSample;ne*n.timescale){f=r-1;break;}t&&n.is_sync&&(l=r);}for(t&&(f=l),e=i.samples[f].cts,i.nextSample=f;i.samples[f].alreadyRead===i.samples[f].size&&i.samples[f+1];){f++;}return s=i.samples[f].offset+i.samples[f].alreadyRead,a.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+a.getDurationString(e,o)+" and offset: "+s),{offset:s,time:e/o};},p.prototype.seek=function(e,t){var i,r,n,s=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(n=0;n-1){s=o;break;}}}switch(s){case"Visual":n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24);break;case"Audio":n.add("smhd").set("balance",t.balance||0),a.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":switch(n.add("sthd"),t.type){case"stpp":a.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");}break;case"Metadata":case"System":default:n.add("nmhd");}t.description&&a.addBox(t.description),t.description_boxes&&t.description_boxes.forEach(function(e){a.addBox(e);}),n.add("dinf").add("dref").addEntry(new h["url Box"]().set("flags",1));var u=n.add("stbl");return u.add("stsd").addEntry(a),u.add("stts").set("sample_counts",[]).set("sample_deltas",[]),u.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),u.add("stco").set("chunk_offsets",[]),u.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(i),t.id;}},h.Box.prototype.computeSize=function(e){var t=e||new o();t.endianness=o.BIG_ENDIAN,this.write(t);},p.prototype.addSample=function(e,t,i){var r=i||{},n={},a=this.getTrackById(e);if(null!==a){n.number=a.samples.length,n.track_id=a.tkhd.track_id,n.timescale=a.mdia.mdhd.timescale,n.description_index=r.sample_description_index?r.sample_description_index-1:0,n.description=a.mdia.minf.stbl.stsd.entries[n.description_index],n.data=t,n.size=t.length,n.alreadyRead=n.size,n.duration=r.duration||1,n.cts=r.cts||0,n.dts=r.dts||0,n.is_sync=r.is_sync||!1,n.is_leading=r.is_leading||0,n.depends_on=r.depends_on||0,n.is_depended_on=r.is_depended_on||0,n.has_redundancy=r.has_redundancy||0,n.degradation_priority=r.degradation_priority||0,n.offset=0,n.subsamples=r.subsamples,a.samples.push(n),a.samples_size+=n.size,a.samples_duration+=n.duration,this.processSamples();var s=p.createSingleSampleMoof(n);return this.addBox(s),s.computeSize(),s.trafs[0].truns[0].data_offset=s.size+8,this.add("mdat").data=t,n;}},p.createSingleSampleMoof=function(e){var t=new h.moofBox();t.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=t.add("traf");return i.add("tfhd").set("track_id",e.track_id).set("flags",h.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts),i.add("trun").set("flags",h.TRUN_FLAGS_DATA_OFFSET|h.TRUN_FLAGS_DURATION|h.TRUN_FLAGS_SIZE|h.TRUN_FLAGS_FLAGS|h.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[0]).set("sample_composition_time_offset",[e.cts-e.dts]),t;},p.prototype.lastMoofIndex=0,p.prototype.samplesDataSize=0,p.prototype.resetTables=function(){var e,t,i,r,n,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=n[s].grouping_type+"/0",(o=new f(n[s].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=o));}}else for(s=0;s=2&&(l=r[s].grouping_type+"/0",o=new f(r[s].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=o));}},p.setSampleGroupProperties=function(e,t,i,r){var n,a;for(n in t.sample_groups=[],r){var s;if(t.sample_groups[n]={},t.sample_groups[n].grouping_type=r[n].grouping_type,t.sample_groups[n].grouping_type_parameter=r[n].grouping_type_parameter,i>=r[n].last_sample_in_run&&(r[n].last_sample_in_run<0&&(r[n].last_sample_in_run=0),r[n].entry_index++,r[n].entry_index<=r[n].sbgp.entries.length-1&&(r[n].last_sample_in_run+=r[n].sbgp.entries[r[n].entry_index].sample_count)),r[n].entry_index<=r[n].sbgp.entries.length-1?t.sample_groups[n].group_description_index=r[n].sbgp.entries[r[n].entry_index].group_description_index:t.sample_groups[n].group_description_index=-1,0!==t.sample_groups[n].group_description_index)s=r[n].fragment_description?r[n].fragment_description:r[n].description,t.sample_groups[n].group_description_index>0?(a=t.sample_groups[n].group_description_index>65535?(t.sample_groups[n].group_description_index>>16)-1:t.sample_groups[n].group_description_index-1,s&&a>=0&&(t.sample_groups[n].description=s.entries[a])):s&&s.version>=2&&s.default_group_description_index>0&&(t.sample_groups[n].description=s.entries[s.default_group_description_index-1]);}},p.process_sdtp=function(e,t,i){t&&(e?(t.is_leading=e.is_leading[i],t.depends_on=e.sample_depends_on[i],t.is_depended_on=e.sample_is_depended_on[i],t.has_redundancy=e.sample_has_redundancy[i]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0));},p.prototype.buildSampleLists=function(){var e,t;for(e=0;ey&&(g++,y<0&&(y=0),y+=a.sample_counts[g]),t>0?(e.samples[t-1].duration=a.sample_deltas[g],e.samples_duration+=e.samples[t-1].duration,T.dts=e.samples[t-1].dts+e.samples[t-1].duration):T.dts=0,s?(t>=w&&(E++,w<0&&(w=0),w+=s.sample_counts[E]),T.cts=e.samples[t].dts+s.sample_offsets[E]):T.cts=T.dts,o?(t==o.sample_numbers[C]-1?(T.is_sync=!0,C++):(T.is_sync=!1,T.degradation_priority=0),f&&f.entries[S].sample_delta+j==t+1&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta,S++)):T.is_sync=!0,p.process_sdtp(e.mdia.minf.stbl.sdtp,T,T.number),T.degradation_priority=c?c.priority[t]:0,f&&f.entries[S].sample_delta+j==t&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta),(u.length>0||h.length>0)&&p.setSampleGroupProperties(e,T,t,e.sample_groups_info);}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration);}},p.prototype.updateSampleLists=function(){var e,t,i,r,n,a,s,o,l,f,u,c,d,_,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&p.initSampleGroups(c,u,u.sbgps,c.mdia.minf.stbl.sgpds,u.sgpds),t=0;t0?_.dts=c.samples[c.samples.length-2].dts+c.samples[c.samples.length-2].duration:(u.tfdt?_.dts=u.tfdt.baseMediaDecodeTime:_.dts=0,c.first_traf_merged=!0),_.cts=_.dts,b.flags&h.TRUN_FLAGS_CTS_OFFSET&&(_.cts=_.dts+b.sample_composition_time_offset[i]),m=s,b.flags&h.TRUN_FLAGS_FLAGS?m=b.sample_flags[i]:0===i&&b.flags&h.TRUN_FLAGS_FIRST_FLAG&&(m=b.first_sample_flags),_.is_sync=!(m>>16&1),_.is_leading=m>>26&3,_.depends_on=m>>24&3,_.is_depended_on=m>>22&3,_.has_redundancy=m>>20&3,_.degradation_priority=65535&m;var v=!!(u.tfhd.flags&h.TFHD_FLAG_BASE_DATA_OFFSET),y=!!(u.tfhd.flags&h.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),g=!!(b.flags&h.TRUN_FLAGS_DATA_OFFSET),w=0;w=v?u.tfhd.base_data_offset:y||0===t?f.start:o,_.offset=0===t&&0===i?g?w+b.data_offset:w:o,o=_.offset+_.size,(u.sbgps.length>0||u.sgpds.length>0||c.mdia.minf.stbl.sbgps.length>0||c.mdia.minf.stbl.sgpds.length>0)&&p.setSampleGroupProperties(c,_,_.number_in_traf,u.sample_groups_info);}}if(u.subs){c.has_fragment_subsamples=!0;var E=u.first_sample_index;for(t=0;t-1))return null;var s=(i=this.stream.buffers[n]).byteLength-(r.offset+r.alreadyRead-i.fileStart);if(r.size-r.alreadyRead<=s)return a.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+(r.size-r.alreadyRead)+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,r.size-r.alreadyRead),i.usedBytes+=r.size-r.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead=r.size,r;if(0===s)return null;a.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+s+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,s),r.alreadyRead+=s,i.usedBytes+=s,this.stream.logBufferLevel();}},p.prototype.releaseSample=function(e,t){var i=e.samples[t];return i.data?(this.samplesDataSize-=i.size,i.data=null,i.alreadyRead=0,i.size):0;},p.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize;},p.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec();}return t;},p.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(i.protection=n.ipro.protections[n.iinf.item_infos[e].protection_index-1]),n.iinf.item_infos[e].item_type?i.type=n.iinf.item_infos[e].item_type:i.type="mime",i.content_type=n.iinf.item_infos[e].content_type,i.content_encoding=n.iinf.item_infos[e].content_encoding;}if(n.iloc)for(e=0;e0){var c=n.iprp.ipco.boxes[h.property_index-1];i.properties[c.type]=c,i.properties.boxes.push(c);}}}}}},p.prototype.getItem=function(e){var t,i;if(!this.meta)return null;if(!(i=this.items[e]).data&&i.size)i.data=new Uint8Array(i.size),i.alreadyRead=0,this.itemsDataSize+=i.size,a.debug("ISOFile","Allocating item #"+e+" of size "+i.size+" (total: "+this.itemsDataSize+")");else if(i.alreadyRead===i.size)return i;for(var r=0;r-1))return null;var l=(t=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-t.fileStart);if(!(n.length-n.alreadyRead<=l))return a.debug("ISOFile","Getting item #"+e+" extent #"+r+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+l+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,l),n.alreadyRead+=l,i.alreadyRead+=l,t.usedBytes+=l,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+e+" extent #"+r+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,n.length-n.alreadyRead),t.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length;}}return i.alreadyRead===i.size?i:null;},p.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var i=0;i0?this.moov.traks[e].samples[0].duration:0),t.push(r);}return t;},h.Box.prototype.printHeader=function(e){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type);},h.FullBox.prototype.printHeader=function(e){this.size+=4,h.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags);},h.Box.prototype.print=function(e){this.printHeader(e);},h.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id);},h.tkhdBox.prototype.print=function(e){h.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height);};var m={createFile:function createFile(e,t){var i=void 0===e||e,r=new p(t);return r.discardMdatData=!i,r;}};void 0!==i&&(i.createFile=m.createFile);},{}],145:[function(e,t,i){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"};},{}],146:[function(e,t,i){"use strict";var r=e("asn1.js");i.certificate=e("./certificate");var n=r.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"]());});i.RSAPrivateKey=n;var a=r.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus")["int"](),this.key("publicExponent")["int"]());});i.RSAPublicKey=a;var s=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr());});i.PublicKey=s;var o=r.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());}),l=r.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version")["int"](),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr());});i.PrivateKey=l;var f=r.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());});i.EncryptedPrivateKey=f;var u=r.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"]());});i.DSAPrivateKey=u,i.DSAparam=r.define("DSAparam",function(){this["int"]();});var h=r.define("ECPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(c),this.key("publicKey").optional().explicit(1).bitstr());});i.ECPrivateKey=h;var c=r.define("ECParameters",function(){this.choice({namedCurve:this.objid()});});i.signature=r.define("signature",function(){this.seq().obj(this.key("r")["int"](),this.key("s")["int"]());});},{"./certificate":147,"asn1.js":2}],147:[function(e,t,i){"use strict";var r=e("asn1.js"),n=r.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()});}),a=r.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any());}),s=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional());}),o=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr());}),l=r.define("RelativeDistinguishedName",function(){this.setof(a);}),f=r.define("RDNSequence",function(){this.seqof(l);}),u=r.define("Name",function(){this.choice({rdnSequence:this.use(f)});}),h=r.define("Validity",function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n));}),c=r.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr());}),d=r.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0)["int"]().optional(),this.key("serialNumber")["int"](),this.key("signature").use(s),this.key("issuer").use(u),this.key("validity").use(h),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(c).optional());}),_=r.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr());});t.exports=_;},{"asn1.js":2}],148:[function(e,t,i){var r=/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,s=e("evp_bytestokey"),o=e("browserify-aes"),l=e("safe-buffer").Buffer;t.exports=function(e,t){var i,f=e.toString(),u=f.match(r);if(u){var h="aes"+u[1],c=l.from(u[2],"hex"),d=l.from(u[3].replace(/[\r\n]/g,""),"base64"),_=s(t,c.slice(0,8),parseInt(u[1],10)).key,p=[],m=o.createDecipheriv(h,_,c);p.push(m.update(d)),p.push(m["final"]()),i=l.concat(p);}else{var b=f.match(a);i=l.from(b[2].replace(/[\r\n]/g,""),"base64");}return{tag:f.match(n)[1],data:i};};},{"browserify-aes":23,evp_bytestokey:105,"safe-buffer":184}],149:[function(e,t,i){var r=e("./asn1"),n=e("./aesid.json"),a=e("./fixProc"),s=e("browserify-aes"),o=e("pbkdf2"),l=e("safe-buffer").Buffer;function f(e){var t;"object"!=_typeof(e)||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var i,f,u=a(e,t),h=u.tag,c=u.data;switch(h){case"CERTIFICATE":f=r.certificate.decode(c,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=r.PublicKey.decode(c,"der")),i=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=r.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+i);}case"ENCRYPTED PRIVATE KEY":c=function(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=n[e.algorithm.decrypt.cipher.algo.join(".")],f=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,h=parseInt(a.split("-")[1],10)/8,c=o.pbkdf2Sync(t,i,r,h,"sha1"),d=s.createDecipheriv(a,c,f),_=[];return _.push(d.update(u)),_.push(d["final"]()),l.concat(_);}(c=r.EncryptedPrivateKey.decode(c,"der"),t);case"PRIVATE KEY":switch(i=(f=r.PrivateKey.decode(c,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:r.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=r.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+i);}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(c,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(c,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(c,"der")};case"EC PRIVATE KEY":return{curve:(c=r.ECPrivateKey.decode(c,"der")).parameters.value,privateKey:c.privateKey};default:throw new Error("unknown key type "+h);}}t.exports=f,f.signature=r.signature;},{"./aesid.json":145,"./asn1":146,"./fixProc":148,"browserify-aes":23,pbkdf2:151,"safe-buffer":184}],150:[function(e,t,i){(function(e){function t(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--);}if(t)for(;i--;i){e.unshift("..");}return e;}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],r=0;r=-1&&!n;a--){var s=a>=0?arguments[a]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(i=s+"/"+i,n="/"===s.charAt(0));}return(n?"/":"")+(i=t(r(i.split("/"),function(e){return!!e;}),!n).join("/"))||".";},i.normalize=function(e){var a=i.isAbsolute(e),s="/"===n(e,-1);return(e=t(r(e.split("/"),function(e){return!!e;}),!a).join("/"))||a||(e="."),e&&s&&(e+="/"),(a?"/":"")+e;},i.isAbsolute=function(e){return"/"===e.charAt(0);},i.join=function(){var e=Array.prototype.slice.call(arguments,0);return i.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e;}).join("/"));},i.relative=function(e,t){function r(e){for(var t=0;t=0&&""===e[i];i--){;}return t>i?[]:e.slice(t,i-t+1);}e=i.resolve(e).substr(1),t=i.resolve(t).substr(1);for(var n=r(e.split("/")),a=r(t.split("/")),s=Math.min(n.length,a.length),o=s,l=0;l=1;--a){if(47===(t=e.charCodeAt(a))){if(!n){r=a;break;}}else n=!1;}return-1===r?i?"/":".":i&&1===r?"/":e.slice(0,r);},i.basename=function(e,t){var i=function(e){"string"!=typeof e&&(e+="");var t,i=0,r=-1,n=!0;for(t=e.length-1;t>=0;--t){if(47===e.charCodeAt(t)){if(!n){i=t+1;break;}}else-1===r&&(n=!1,r=t+1);}return-1===r?"":e.slice(i,r);}(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i;},i.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,i=0,r=-1,n=!0,a=0,s=e.length-1;s>=0;--s){var o=e.charCodeAt(s);if(47!==o)-1===r&&(n=!1,r=s+1),46===o?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!n){i=s+1;break;}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===i+1?"":e.slice(t,r);};var n="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i);}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i);};}).call(this,e("_process"));},{_process:158}],151:[function(e,t,i){i.pbkdf2=e("./lib/async"),i.pbkdf2Sync=e("./lib/sync");},{"./lib/async":152,"./lib/sync":155}],152:[function(e,t,i){(function(i,r){var n,a=e("safe-buffer").Buffer,s=e("./precondition"),o=e("./default-encoding"),l=e("./sync"),f=e("./to-buffer"),u=r.crypto&&r.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"},c=[];function d(e,t,i,r,n){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:i,hash:{name:n}},e,r<<3);}).then(function(e){return a.from(e);});}t.exports=function(e,t,_,p,m,b){"function"==typeof m&&(b=m,m=void 0);var v=h[(m=m||"sha1").toLowerCase()];if(!v||"function"!=typeof r.Promise)return i.nextTick(function(){var i;try{i=l(e,t,_,p,m);}catch(e){return b(e);}b(null,i);});if(s(_,p),e=f(e,o,"Password"),t=f(t,o,"Salt"),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then(function(e){i.nextTick(function(){t(null,e);});},function(e){i.nextTick(function(){t(e);});});}(function(e){if(r.process&&!r.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==c[e])return c[e];var t=d(n=n||a.alloc(8),n,10,128,e).then(function(){return!0;})["catch"](function(){return!1;});return c[e]=t,t;}(v).then(function(i){return i?d(e,t,_,p,v):l(e,t,_,p,m);}),b);};}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{"./default-encoding":153,"./precondition":154,"./sync":155,"./to-buffer":156,_process:158,"safe-buffer":184}],153:[function(e,t,i){(function(e){var i;if(e.browser)i="utf-8";else if(e.version){i=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";}else i="utf-8";t.exports=i;}).call(this,e("_process"));},{_process:158}],154:[function(e,t,i){var r=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>r||t!=t)throw new TypeError("Bad key length");};},{}],155:[function(e,t,i){var r=e("create-hash/md5"),n=e("ripemd160"),a=e("sha.js"),s=e("safe-buffer").Buffer,o=e("./precondition"),l=e("./default-encoding"),f=e("./to-buffer"),u=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function c(e,t,i){var o=function(e){function t(t){return a(e).update(t).digest();}return"rmd160"===e||"ripemd160"===e?function(e){return new n().update(e).digest();}:"md5"===e?r:t;}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=o(t):t.length1)for(var i=1;i_||new s(t).cmp(d.modulus)>=0)throw new Error("decryption error");c=i?f(new s(t),d):o(t,d);var p=u.alloc(_-c.length);if(c=u.concat([p,c],_),4===h)return function(e,t){var i=e.modulus.byteLength(),r=l("sha1").update(u.alloc(0)).digest(),s=r.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,s+1),f=t.slice(s+1),h=a(o,n(f,s)),c=a(f,n(h,i-s-1));if(function(e,t){e=u.from(e),t=u.from(t);var i=0,r=e.length;e.length!==t.length&&(i++,r=Math.min(e.length,t.length));var n=-1;for(;++n=t.length){a++;break;}}var s=t.slice(2,n-1);("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&a++;s.length<8&&a++;if(a)throw new Error("decryption error");return t.slice(n);}(0,c,i);if(3===h)return c;throw new Error("unknown padding");};},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,"safe-buffer":184}],163:[function(e,t,i){var r=e("parse-asn1"),n=e("randombytes"),a=e("create-hash"),s=e("./mgf"),o=e("./xor"),l=e("bn.js"),f=e("./withPublic"),u=e("browserify-rsa"),h=e("safe-buffer").Buffer;t.exports=function(e,t,i){var c;c=e.padding?e.padding:i?1:4;var d,_=r(e);if(4===c)d=function(e,t){var i=e.modulus.byteLength(),r=t.length,f=a("sha1").update(h.alloc(0)).digest(),u=f.length,c=2*u;if(r>i-c-2)throw new Error("message too long");var d=h.alloc(i-r-c-2),_=i-u-1,p=n(u),m=o(h.concat([f,d,h.alloc(1,1),t],_),s(p,_)),b=o(p,s(m,u));return new l(h.concat([h.alloc(1),b,m],i));}(_,t);else if(1===c)d=function(e,t,i){var r,a=t.length,s=e.modulus.byteLength();if(a>s-11)throw new Error("message too long");r=i?h.alloc(s-a-3,255):function(e){var t,i=h.allocUnsafe(e),r=0,a=n(2*e),s=0;for(;r=0)throw new Error("data too long for modulus");}return i?u(d,_):f(d,_);};},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,randombytes:166,"safe-buffer":184}],164:[function(e,t,i){var r=e("bn.js"),n=e("safe-buffer").Buffer;t.exports=function(e,t){return n.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray());};},{"bn.js":161,"safe-buffer":184}],165:[function(e,t,i){t.exports=function(e,t){for(var i=e.length,r=-1;++r4294967295)throw new RangeError("requested too many random bytes");var r=n.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;su||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range");}function c(e,t,i){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>i||e>l)throw new RangeError("buffer too small");}function d(e,i,r,n){if(t.browser){var a=e.buffer,o=new Uint8Array(a,i,r);return f.getRandomValues(o),n?void t.nextTick(function(){n(null,e);}):e;}if(!n)return s(r).copy(e,i),e;s(r,function(t,r){if(t)return n(t);r.copy(e,i),n(null,e);});}f&&f.getRandomValues||!t.browser?(i.randomFill=function(e,t,i,n){if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)n=t,t=0,i=e.length;else if("function"==typeof i)n=i,i=e.length-t;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return h(t,e.length),c(i,t,e.length),d(e,t,i,n);},i.randomFillSync=function(e,t,i){void 0===t&&(t=0);if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(t,e.length),void 0===i&&(i=e.length-t);return c(i,t,e.length),d(e,t,i);}):(i.randomFill=n,i.randomFillSync=n);}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{_process:158,randombytes:166,"safe-buffer":184}],168:[function(e,t,i){t.exports=e("./lib/_stream_duplex.js");},{"./lib/_stream_duplex.js":169}],169:[function(e,t,i){"use strict";var r=e("process-nextick-args"),n=Object.keys||function(e){var t=[];for(var i in e){t.push(i);}return t;};t.exports=h;var a=Object.create(e("core-util-is"));a.inherits=e("inherits");var s=e("./_stream_readable"),o=e("./_stream_writable");a.inherits(h,s);for(var l=n(o.prototype),f=0;f0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e);}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):j(e,s)):w(e,s,t,!1))):r||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e;}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));}function C(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(S,e):S(e));}function S(e){d("emit readable"),e.emit("readable"),M(e);}function j(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(T,e,t));}function T(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;ea.length?a.length:e;if(s===a.length?n+=a:n+=a.slice(0,e),0===(e-=s)){s===a.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(s));break;}++r;}return t.length-=r,n;}(e,t):function(e,t){var i=f.allocUnsafe(e),r=t.head,n=1;r.data.copy(i),e-=r.data.length;for(;r=r.next;){var a=r.data,s=e>a.length?a.length:e;if(a.copy(i,i.length-e,0,s),0===(e-=s)){s===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break;}++n;}return t.length-=n,i;}(e,t);return r;}(e,t.buffer,t.decoder),i);var i;}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(I,t,e));}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"));}function R(e,t){for(var i=0,r=e.length;i=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):C(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&P(this),null;var r,n=t.needReadable;return d("need readable",n),(0===t.length||t.length-e0?k(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&P(this)),null!==r&&this.emit("data",r),r;},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"));},y.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e);}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,t);var l=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:y;function f(t,i){d("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",h),e.removeListener("error",m),e.removeListener("unpipe",f),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",p),c=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||h());}function u(){d("onend"),e.end();}a.endEmitted?n.nextTick(l):r.once("end",l),e.on("unpipe",f);var h=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e));};}(r);e.on("drain",h);var c=!1;var _=!1;function p(t){d("ondata"),_=!1,!1!==e.write(t)||_||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==R(a.pipes,e))&&!c&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,_=!0),r.pause());}function m(t){d("onerror",t),y(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t);}function b(){e.removeListener("finish",v),y();}function v(){d("onfinish"),e.removeListener("close",b),y();}function y(){d("unpipe"),r.unpipe(e);}return r.on("data",p),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i);}(e,"error",m),e.once("close",b),e.once("finish",v),e.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),e;},y.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a-1?n:a.nextTick;v.WritableState=b;var f=Object.create(e("core-util-is"));f.inherits=e("inherits");var u={deprecate:e("util-deprecate")},h=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,d=r.Uint8Array||function(){};var _,p=e("./internal/streams/destroy");function m(){}function b(t,i){o=o||e("./_stream_duplex"),t=t||{};var r=i instanceof o;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,f=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(f||0===f)?f:u,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 h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0;}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?(a.nextTick(n,r),a.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(n(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t));}(e,i,r,t,n);else{var s=E(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||w(e,i),r?l(g,e,i,s,n):g(e,i,s,n);}}(i,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 s(this);}function v(t){if(o=o||e("./_stream_duplex"),!(_.call(v,this)||this instanceof o))return new v(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t["final"]&&(this._final=t["final"])),h.call(this);}function y(e,t,i,r,n,a,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1;}function g(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));}(e,t),t.pendingcb--,r(),S(e,t);}function w(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),a=t.corkedRequestsFree;a.entry=i;for(var o=0,l=!0;i;){n[o]=i,i.isBuf||(l=!1),i=i.next,o+=1;}n.allBuffers=l,y(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0;}else{for(;i;){var f=i.chunk,u=i.encoding,h=i.callback;if(y(e,t,!1,t.objectMode?1:f.length,f,u,h),i=i.next,t.bufferedRequestCount--,t.writing)break;}null===i&&(t.lastBufferedRequest=null);}t.bufferedRequest=i,t.bufferProcessing=!1;}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing;}function C(e,t){e._final(function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),S(e,t);});}function S(e,t){var i=E(t);return i&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")));}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i;}f.inherits(v,h),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;){t.push(e),e=e.next;}return t;},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer();},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function value(e){return!!_.call(this,e)||this===v&&e&&e._writableState instanceof b;}})):_=function _(e){return e instanceof this;},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));},v.prototype.write=function(e,t,i){var r,n=this._writableState,s=!1,o=!n.objectMode&&(r=e,c.isBuffer(r)||r instanceof d);return o&&!c.isBuffer(e)&&(e=function(e){return c.from(e);}(e)),"function"==typeof t&&(i=t,t=null),o?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof i&&(i=m),n.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),a.nextTick(t,i);}(this,i):(o||function(e,t,i,r){var n=!0,s=!1;return null===i?s=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),a.nextTick(r,s),n=!1),n;}(this,n,e,i))&&(n.pendingcb++,s=function(e,t,i,r,n,a){if(!i){var s=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,i));return t;}(t,r,n);r!==s&&(i=!0,n="buffer",r=s);}var o=t.objectMode?1:r.length;t.length+=o;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this;},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function get(){return this._writableState.highWaterMark;}}),v.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"));},v.prototype._writev=null,v.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,S(e,t),i&&(t.finished?a.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1;}(this,r,i);},Object.defineProperty(v.prototype,"destroyed",{get:function get(){return void 0!==this._writableState&&this._writableState.destroyed;},set:function set(e){this._writableState&&(this._writableState.destroyed=e);}}),v.prototype.destroy=p.destroy,v.prototype._undestroy=p.undestroy,v.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":169,"./internal/streams/destroy":175,"./internal/streams/stream":176,_process:158,"core-util-is":68,inherits:136,"process-nextick-args":157,"safe-buffer":177,timers:196,"util-deprecate":197}],174:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.head=null,this.tail=null,this.length=0;}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length;},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length;},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e;}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0;},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;){i+=e+t.data;}return i;},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,i,n,a=r.allocUnsafe(e>>>0),s=this.head,o=0;s;){t=s.data,i=a,n=o,t.copy(i,n),o+=s.data.length,s=s.next;}return a;},e;}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e;});},{"safe-buffer":177,util:20}],175:[function(e,t,i){"use strict";var r=e("process-nextick-args");function n(e,t){e.emit("error",t);}t.exports={destroy:function destroy(e,t){var i=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(n,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(n,i,e),i._writableState&&(i._writableState.errorEmitted=!0)):t&&t(e);}),this);},undestroy:function undestroy(){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);}};},{"process-nextick-args":157}],176:[function(e,t,i){arguments[4][62][0].apply(i,arguments);},{dup:62,events:104}],177:[function(e,t,i){var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e){t[i]=e[i];}}function s(e,t,i){return n(e,t,i);}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i);},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r;},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e);},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e);};},{buffer:66}],178:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=r.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;}};function a(e){var t;switch(this.encoding=function(e){var t=function(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;}}}(e);if("string"!=typeof t&&(r.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e;}(e),this.encoding){case"utf16le":this.text=l,this.end=f,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=c,void(this.end=d);}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t);}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2;}function o(e){var t=this.lastTotal-this.lastNeed,i=function(e,t,i){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,"�";}}(this,e);return void 0!==i?i: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 l(e,t){if((e.length-t)%2==0){var i=e.toString("utf16le",t);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1);}return i;}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i);}return t;}function u(e,t){var i=(e.length-t)%3;return 0===i?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?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-i));}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t;}function c(e){return e.toString(this.encoding);}function d(e){return e&&e.length?this.write(e):"";}i.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0;}else i=0;return i=0)return n>0&&(e.lastNeed=n-1),n;if(--r=0)return n>0&&(e.lastNeed=n-2),n;if(--r=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0;}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var r=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r);},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":177}],179:[function(e,t,i){t.exports=e("./readable").PassThrough;},{"./readable":180}],180:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js");},{"./lib/_stream_duplex.js":169,"./lib/_stream_passthrough.js":170,"./lib/_stream_readable.js":171,"./lib/_stream_transform.js":172,"./lib/_stream_writable.js":173}],181:[function(e,t,i){t.exports=e("./readable").Transform;},{"./readable":180}],182:[function(e,t,i){t.exports=e("./lib/_stream_writable.js");},{"./lib/_stream_writable.js":173}],183:[function(e,t,i){"use strict";var r=e("buffer").Buffer,n=e("inherits"),a=e("hash-base"),s=new Array(16),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[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],h=[0,1518500249,1859775393,2400959708,2840853838],c=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520;}function _(e,t){return e<>>32-t;}function p(e,t,i,r,n,a,s,o){return _(e+(t^i^r)+a+s|0,o)+n|0;}function m(e,t,i,r,n,a,s,o){return _(e+(t&i|~t&r)+a+s|0,o)+n|0;}function b(e,t,i,r,n,a,s,o){return _(e+((t|~i)^r)+a+s|0,o)+n|0;}function v(e,t,i,r,n,a,s,o){return _(e+(t&r|i&~r)+a+s|0,o)+n|0;}function y(e,t,i,r,n,a,s,o){return _(e+(t^(i|~r))+a+s|0,o)+n|0;}n(d,a),d.prototype._update=function(){for(var e=s,t=0;t<16;++t){e[t]=this._block.readInt32LE(4*t);}for(var i=0|this._a,r=0|this._b,n=0|this._c,a=0|this._d,d=0|this._e,g=0|this._a,w=0|this._b,E=0|this._c,C=0|this._d,S=0|this._e,j=0;j<80;j+=1){var T,A;j<16?(T=p(i,r,n,a,d,e[o[j]],h[0],f[j]),A=y(g,w,E,C,S,e[l[j]],c[0],u[j])):j<32?(T=m(i,r,n,a,d,e[o[j]],h[1],f[j]),A=v(g,w,E,C,S,e[l[j]],c[1],u[j])):j<48?(T=b(i,r,n,a,d,e[o[j]],h[2],f[j]),A=b(g,w,E,C,S,e[l[j]],c[2],u[j])):j<64?(T=v(i,r,n,a,d,e[o[j]],h[3],f[j]),A=m(g,w,E,C,S,e[l[j]],c[3],u[j])):(T=y(i,r,n,a,d,e[o[j]],h[4],f[j]),A=p(g,w,E,C,S,e[l[j]],c[4],u[j])),i=d,d=a,a=_(n,10),n=r,r=T,g=S,S=C,C=_(E,10),E=w,w=A;}var x=this._b+n+C|0;this._b=this._c+a+S|0,this._c=this._d+d+g|0,this._d=this._e+i+w|0,this._e=this._a+r+E|0,this._a=x;},d.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=r.alloc?r.alloc(20):new r(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=d;},{buffer:66,"hash-base":106,inherits:136}],184:[function(e,t,i){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e){t[i]=e[i];}}function s(e,t,i){return n(e,t,i);}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),s.prototype=Object.create(n.prototype),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i);},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r;},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e);},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e);};},{buffer:66}],185:[function(e,t,i){(function(i){"use strict";var r,n=e("buffer"),a=n.Buffer,s={};for(r in n){n.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(s[r]=n[r]);}var o=s.Buffer={};for(r in a){a.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(o[r]=a[r]);}if(s.Buffer.prototype=a.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(e,t,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+_typeof(e));if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof(e));return a(e,t,i);}),o.alloc||(o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+_typeof(e));if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=a(e);return t&&0!==t.length?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r;}),!s.kStringMaxLength)try{s.kStringMaxLength=i.binding("buffer").kStringMaxLength;}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),t.exports=s;}).call(this,e("_process"));},{_process:158,buffer:66}],186:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0;}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var i=this._block,n=this._blockSize,a=e.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4);}this._update(this._block);var a=this._hash();return e?a.toString(e):a;},n.prototype._update=function(){throw new Error("_update must be implemented by subclass");},t.exports=n;},{"safe-buffer":184}],187:[function(e,t,i){(i=t.exports=function(e){e=e.toLowerCase();var t=i[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t();}).sha=e("./sha"),i.sha1=e("./sha1"),i.sha224=e("./sha224"),i.sha256=e("./sha256"),i.sha384=e("./sha384"),i.sha512=e("./sha512");},{"./sha":188,"./sha1":189,"./sha224":190,"./sha256":191,"./sha384":192,"./sha512":193}],188:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56);}function f(e){return e<<30|e>>>2;}function u(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r;}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this;},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,h=0;h<16;++h){i[h]=e.readInt32BE(4*h);}for(;h<80;++h){i[h]=i[h-3]^i[h-8]^i[h-14]^i[h-16];}for(var c=0;c<80;++c){var d=~~(c/20),_=0|((t=r)<<5|t>>>27)+u(d,n,a,o)+l+i[c]+s[d];l=o,o=a,a=f(n),n=r,r=_;}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0;},l.prototype._hash=function(){var e=a.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=l;},{"./hash":186,inherits:136,"safe-buffer":184}],189:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56);}function f(e){return e<<5|e>>>27;}function u(e){return e<<30|e>>>2;}function h(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r;}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this;},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,c=0;c<16;++c){i[c]=e.readInt32BE(4*c);}for(;c<80;++c){i[c]=(t=i[c-3]^i[c-8]^i[c-14]^i[c-16])<<1|t>>>31;}for(var d=0;d<80;++d){var _=~~(d/20),p=f(r)+h(_,n,a,o)+l+i[d]+s[_]|0;l=o,o=a,a=u(n),n=r,r=p;}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0;},l.prototype._hash=function(){var e=a.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=l;},{"./hash":186,inherits:136,"safe-buffer":184}],190:[function(e,t,i){var r=e("inherits"),n=e("./sha256"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(64);function l(){this.init(),this._w=o,a.call(this,64,56);}r(l,n),l.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;},l.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=l;},{"./hash":186,"./sha256":191,inherits:136,"safe-buffer":184}],191:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],o=new Array(64);function l(){this.init(),this._w=o,n.call(this,64,56);}function f(e,t,i){return i^e&(t^i);}function u(e,t,i){return e&t|i&(e|t);}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10);}function c(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7);}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3;}r(l,n),l.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;},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,_=0|this._f,p=0|this._g,m=0|this._h,b=0;b<16;++b){i[b]=e.readInt32BE(4*b);}for(;b<64;++b){i[b]=0|(((t=i[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+i[b-7]+d(i[b-15])+i[b-16];}for(var v=0;v<64;++v){var y=m+c(l)+f(l,_,p)+s[v]+i[v]|0,g=h(r)+u(r,n,a)|0;m=p,p=_,_=l,l=o+y|0,o=a,a=n,n=r,r=y+g|0;}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0,this._f=_+this._f|0,this._g=p+this._g|0,this._h=m+this._h|0;},l.prototype._hash=function(){var e=a.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=l;},{"./hash":186,inherits:136,"safe-buffer":184}],192:[function(e,t,i){var r=e("inherits"),n=e("./sha512"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(160);function l(){this.init(),this._w=o,a.call(this,128,112);}r(l,n),l.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;},l.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4);}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e;},t.exports=l;},{"./hash":186,"./sha512":193,inherits:136,"safe-buffer":184}],193:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=new Array(160);function l(){this.init(),this._w=o,n.call(this,128,112);}function f(e,t,i){return i^e&(t^i);}function u(e,t,i){return e&t|i&(e|t);}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25);}function c(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23);}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7;}function _(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25);}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6;}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26);}function b(e,t){return e>>>0>>0?1:0;}r(l,n),l.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;},l.prototype._update=function(e){for(var t=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,a=0|this._dh,o=0|this._eh,l=0|this._fh,v=0|this._gh,y=0|this._hh,g=0|this._al,w=0|this._bl,E=0|this._cl,C=0|this._dl,S=0|this._el,j=0|this._fl,T=0|this._gl,A=0|this._hl,x=0;x<32;x+=2){t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);}for(;x<160;x+=2){var M=t[x-30],k=t[x-30+1],P=d(M,k),I=_(k,M),R=p(M=t[x-4],k=t[x-4+1]),U=m(k,M),D=t[x-14],F=t[x-14+1],O=t[x-32],L=t[x-32+1],B=I+F|0,N=P+D+b(B,I)|0;N=(N=N+R+b(B=B+U|0,U)|0)+O+b(B=B+L|0,L)|0,t[x]=N,t[x+1]=B;}for(var z=0;z<160;z+=2){N=t[z],B=t[z+1];var H=u(i,r,n),V=u(g,w,E),Y=h(i,g),q=h(g,i),W=c(o,S),X=c(S,o),G=s[z],K=s[z+1],Q=f(o,l,v),Z=f(S,j,T),J=A+X|0,$=y+W+b(J,A)|0;$=($=($=$+Q+b(J=J+Z|0,Z)|0)+G+b(J=J+K|0,K)|0)+N+b(J=J+B|0,B)|0;var ee=q+V|0,te=Y+H+b(ee,q)|0;y=v,A=T,v=l,T=j,l=o,j=S,o=a+$+b(S=C+J|0,C)|0,a=n,C=E,n=r,E=w,r=i,w=g,i=$+te+b(g=J+ee|0,J)|0;}this._al=this._al+g|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+C|0,this._el=this._el+S|0,this._fl=this._fl+j|0,this._gl=this._gl+T|0,this._hl=this._hl+A|0,this._ah=this._ah+i+b(this._al,g)|0,this._bh=this._bh+r+b(this._bl,w)|0,this._ch=this._ch+n+b(this._cl,E)|0,this._dh=this._dh+a+b(this._dl,C)|0,this._eh=this._eh+o+b(this._el,S)|0,this._fh=this._fh+l+b(this._fl,j)|0,this._gh=this._gh+v+b(this._gl,T)|0,this._hh=this._hh+y+b(this._hl,A)|0;},l.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4);}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e;},t.exports=l;},{"./hash":186,inherits:136,"safe-buffer":184}],194:[function(e,t,i){t.exports=n;var r=e("events").EventEmitter;function n(){r.call(this);}e("inherits")(n,r),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause();}function a(){i.readable&&i.resume&&i.resume();}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",o),i.on("close",l));var s=!1;function o(){s||(s=!0,e.end());}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy());}function f(e){if(u(),0===r.listenerCount(this,"error"))throw e;}function u(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",o),i.removeListener("close",l),i.removeListener("error",f),e.removeListener("error",f),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u);}return i.on("error",f),e.on("error",f),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e;};},{events:104,inherits:136,"readable-stream/duplex.js":168,"readable-stream/passthrough.js":179,"readable-stream/readable.js":180,"readable-stream/transform.js":181,"readable-stream/writable.js":182}],195:[function(e,t,i){arguments[4][178][0].apply(i,arguments);},{dup:178,"safe-buffer":184}],196:[function(e,t,i){(function(t,r){var n=e("process/browser.js").nextTick,a=Function.prototype.apply,s=Array.prototype.slice,o={},l=0;function f(e,t){this._id=e,this._clearFn=t;}i.setTimeout=function(){return new f(a.call(setTimeout,window,arguments),clearTimeout);},i.setInterval=function(){return new f(a.call(setInterval,window,arguments),clearInterval);},i.clearTimeout=i.clearInterval=function(e){e.close();},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id);},i.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t;},i.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1;},i._unrefActive=i.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout();},t));},i.setImmediate="function"==typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&s.call(arguments,1);return o[t]=!0,n(function(){o[t]&&(r?e.apply(null,r):e.call(null),i.clearImmediate(t));}),t;},i.clearImmediate="function"==typeof r?r:function(e){delete o[e];};}).call(this,e("timers").setImmediate,e("timers").clearImmediate);},{"process/browser.js":158,timers:196}],197:[function(e,t,i){(function(e){function i(t){try{if(!e.localStorage)return!1;}catch(e){return!1;}var i=e.localStorage[t];return null!=i&&"true"===String(i).toLowerCase();}t.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")&&console.trace(t),r=!0;}return e.apply(this,arguments);};};}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{}],198:[function(e,t,i){"use strict";t.exports={DEFAILT_WEBGL_PLAY_ID:"glplayer",PLAYER_IN_TYPE_MP4:"mp4",PLAYER_IN_TYPE_FLV:"flv",PLAYER_IN_TYPE_HTTPFLV:"httpflv",PLAYER_IN_TYPE_RAW_265:"raw265",PLAYER_IN_TYPE_TS:"ts",PLAYER_IN_TYPE_MPEGTS:"mpegts",PLAYER_IN_TYPE_M3U8:"hls",PLAYER_IN_TYPE_M3U8_VOD:"m3u8",PLAYER_IN_TYPE_M3U8_LIVE:"hls",APPEND_TYPE_STREAM:0,APPEND_TYPE_FRAME:1,APPEND_TYPE_SEQUENCE:2,DEFAULT_WIDTH:600,DEFAULT_HEIGHT:600,DEFAULT_FPS:25,DEFAULT_FRAME_DUR:40,DEFAULT_FIXED:!1,DEFAULT_SAMPLERATE:44100,DEFAULT_CHANNELS:2,DEFAULT_CONSU_SAMPLE_LEN:20,PLAYER_MODE_VOD:"vod",PLAYER_MODE_NOTIME_LIVE:"live",AUDIO_MODE_ONCE:"ONCE",AUDIO_MODE_SWAP:"SWAP",DEFAULT_STRING_LIVE:"LIVE",CODEC_H265:0,CODEC_H264:1,PLAYER_CORE_TYPE_DEFAULT:0,PLAYER_CORE_TYPE_CNATIVE:1,V_CODEC_NAME_HEVC:265,V_CODEC_NAME_AVC:264,V_CODEC_NAME_UNKN:500,A_CODEC_NAME_AAC:112,A_CODEC_NAME_MP3:113,A_CODEC_NAME_UNKN:500,CACHE_NO_LOADCACHE:192,CACHE_WITH_PLAY_SIGN:193,CACHE_WITH_NOPLAY_SIGN:194};},{}],199:[function(e,t,i){"use strict";var r=window.AudioContext||window.webkitAudioContext,n=e("../consts"),a=e("./av-common");t.exports=function(e){var t={options:{sampleRate:e.sampleRate||n.DEFAULT_SAMPLERATE,appendType:e.appendType||n.APPEND_TYPE_STREAM,playMode:e.playMode||n.AUDIO_MODE_SWAP},sourceChannel:-1,audioCtx:new r({latencyHint:"interactive",sampleRate:e.sampleRate}),gainNode:null,sourceList:[],startStatus:!1,sampleQueue:[],nextBuffer:null,playTimestamp:0,playStartTime:0,durationMs:-1,isLIVE:!1,voice:1,onLoadCache:null,resetStartParam:function resetStartParam(){t.playTimestamp=0,t.playStartTime=0;},setOnLoadCache:function setOnLoadCache(e){t.onLoadCache=e;},setDurationMs:function setDurationMs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e;},setVoice:function setVoice(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.voice=e,t.gainNode.gain.value=e;},getAlignVPTS:function getAlignVPTS(){return t.playTimestamp+(a.GetMsTime()-t.playStartTime)/1e3;},swapSource:function swapSource(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==t.startStatus)return null;if(e<0||e>=t.sourceList.length)return null;if(i<0||i>=t.sourceList.length)return null;try{t.sourceChannel===e&&null!==t.sourceList[e]&&(t.sourceList[e].disconnect(t.gainNode),t.sourceList[e]=null);}catch(t){console.error("[DEFINE ERROR] audioModule disconnect source Index:"+e+" error happened!",t);}t.sourceChannel=i;var r=t.decodeSample(i,e);-2==r&&t.isLIVE&&(t.getAlignVPTS()>=t.durationMs/1e3-.04?t.pause():null!==t.onLoadCache&&t.onLoadCache());},addSample:function addSample(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!(null==e||!e||null==e)&&(0==t.sampleQueue.length&&(t.seekPos=e.pts),t.sampleQueue.push(e),!0);},runNextBuffer:function runNextBuffer(){window.setInterval(function(){if(!(null!=t.nextBuffer||t.sampleQueue.length0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){t.swapSource(e,i);}),0==t.sampleQueue.length)return t.isLIVE?(t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].onended=function(){t.swapSource(e,i);},t.sourceList[e].stop(),0):-2;if(t.sourceList[e].buffer)return t.sourceList[e],t.sourceList[i],t.gainNode,t.swapSource(e,i),0;if(null==t.nextBuffer||t.nextBuffer.data.length<1)return t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0,t.sourceList[e].stop(),1;var r=t.nextBuffer.data.buffer;t.playTimestamp=t.nextBuffer.pts,t.playStartTime=a.GetMsTime();try{t.audioCtx.decodeAudioData(r,function(i){null!==t.sourceList[e]&&(t.sourceList[e].buffer=i,t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0);},function(e){});}catch(e){return t.nextBuffer=null,-3;}return t.nextBuffer=null,0;},decodeWholeSamples:function decodeWholeSamples(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(t.sourceChannel=e,e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){}),0==t.sampleQueue.length)return-2;for(var i=null,r=null,a=0;a=2){var s=i.length/2;a=new Float32Array(s);for(var o=0,l=0;l0&&s()-this._start_time>=this._now_seg_dur&&(s(),this._start_time,this._now_seg_dur,this._start_time=-1,this._now_seg_dur=-1),s(),this._start_time<0)if(new Date(),null!==this._pcm_array_buf&&this._pcm_array_buf.length>this._push_start_idx){this._swapStartPlay=!1;var e=this._push_start_idx+this._once_pop_len;e>this._pcm_array_buf.length&&(e=this._pcm_array_buf.length);var t=this._pcm_array_buf.slice(this._push_start_idx,e);this._push_start_idx+=t.length,this._now_seg_dur=1*t.length/this._sample_rate*1e3,t.length,this._sample_rate,this._now_seg_dur;var i=this._ctx.createBuffer(1,t.length,this._sample_rate);t.length,new Date(),i.copyToChannel(t,0),this._active_node=this._ctx.createBufferSource(),this._active_node.buffer=i,this._active_node.connect(this._gain),this._start_time=s(),this._active_node.start(0);}else setTimeout(this.readingLoopWithF32,1);}}])&&r(t.prototype,i),o&&r(t,o),e;}();i.AudioPcmPlayer=o;},{"../consts":198}],201:[function(e,t,i){"use strict";var r=e("../consts"),n=[{format:"mp4",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"mov",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"flv",value:"flv",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"m3u8",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"m3u",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"ts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"mpegts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"hevc",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"h265",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT}];t.exports={frameDataAlignCrop:function frameDataAlignCrop(e,t,i,r,n,a,s,o){if(0==e-r)return[a,s,o];for(var l=r*n,f=l/4,u=new Uint8Array(l),h=new Uint8Array(f),c=new Uint8Array(f),d=r,_=r/2,p=0;p=0)return i.value;}return n[0].value;},GetFormatPlayCore:function GetFormatPlayCore(e){for(var t=0;tt.config.probeSize&&(n.cwrap("getSniffHttpFlvPkg","number",["number"])(t.AVSniffPtr),t.pushPkg-=1);},5));break;case"fetch-fin":break;case"fetch-error":t.onNetworkError&&t.onNetworkError(i.data);}}},{key:"_checkDisplaySize",value:function value(e,t,i){var r=t-e,n=this.config.width+Math.ceil(r/2),a=t/this.config.width>i/this.config.height,s=(n/t).toFixed(2),o=(this.config.height/i).toFixed(2),l=a?s:o,f=this.config.fixed,u=f?n:parseInt(t*l),h=f?this.config.height:parseInt(i*l);if(this.CanvasObj.offsetWidth!=u||this.CanvasObj.offsetHeight!=h){var c=parseInt((this.canvasBox.offsetHeight-h)/2),d=parseInt((this.canvasBox.offsetWidth-u)/2);c=c<0?0:c,d=d<0?0:d,this.CanvasObj.style.marginTop=c+"px",this.CanvasObj.style.marginLeft=d+"px",this.CanvasObj.style.width=u+"px",this.CanvasObj.style.height=h+"px";}return this.isCheckDisplay=!0,[u,h];}},{key:"_ptsFixed2",value:function value(e){return Math.ceil(100*e)/100;}},{key:"_callbackProbe",value:function value(e,t,i,r,a,s,f,u,h){for(var c=n.HEAPU8.subarray(h,h+10),d=0;d=0&&(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.config.sampleRate=s,this.mediaInfo.sampleRate=s,this.audioWAudio=o({sampleRate:s,appendType:l.APPEND_TYPE_FRAME}),this.audioWAudio.isLIVE=!0),this.onProbeFinish&&this.onProbeFinish();}},{key:"_callbackYUV",value:function value(e,t,i,r,a,s,o,l,f){var u=n.HEAPU8.subarray(e,e+r*l),h=new Uint8Array(u),c=n.HEAPU8.subarray(t,t+a*l/2),d=new Uint8Array(c),_=n.HEAPU8.subarray(i,i+s*l/2),p={bufY:h,bufU:d,bufV:new Uint8Array(_),line_y:r,h:l,pts:f};this.YuvBuf.push(p),this.checkCacheState(),n._free(u),u=null,n._free(c),c=null,n._free(_),_=null,!1===this.readyShowDone&&(this.playYUV(),this.readyShowDone=!0,this.onReadyShowDone&&this.onReadyShowDone());}},{key:"_callbackNALU",value:function value(e,t,i,r,a,s,o){if(!1===this.readyKeyFrame){if(i<=0)return;this.readyKeyFrame=!0;}var l=n.HEAPU8.subarray(e,e+t),f=new Uint8Array(l);this.NaluBuf.push({bufData:f,len:t,isKey:i,w:r,h:a,pts:1e3*s,dts:1e3*o}),n._free(l),l=null;}},{key:"_callbackPCM",value:function value(e){}},{key:"_callbackAAC",value:function value(e,t,i,r,a){var s=this._ptsFixed2(a);if(this.audioWAudio){var o=new Uint8Array(7+i),l=n.HEAPU8.subarray(e,e+7);o.set(l,0);var f=n.HEAPU8.subarray(t,t+i);o.set(f,7);var u={pts:s,data:o};this.audioWAudio.addSample(u),this.checkCacheState();}}},{key:"_decode",value:function value(){var e=this;setTimeout(function(){if(null!==e.workerFetch){var t=e.NaluBuf.shift();if(null!=t){var i=n._malloc(t.bufData.length);n.HEAP8.set(t.bufData,i),n.cwrap("decodeHttpFlvVideoFrame","number",["number","number","number","number","number"])(e.AVSniffPtr,i,t.bufData.length,t.pts,t.dts,0),n._free(i),i=null;}e._decode();}},1);}},{key:"checkCacheState",value:function value(){var e=this.YuvBuf.length>=50&&this.audioWAudio.sampleQueue.length>=50;return!1===this.cache_status&&e&&(this.playInterval&&this.audioWAudio.play(),this.onLoadCacheFinshed&&this.onLoadCacheFinshed(),this.cache_status=!0),e;}},{key:"setVoice",value:function value(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e);}},{key:"release",value:function value(){this.pause(),this.NaluBuf.length=0,this.YuvBuf.length=0,void 0!==this.workerFetch&&null!==this.workerFetch&&this.workerFetch.postMessage({cmd:"stop",data:"stop",msg:"stop"}),this.workerFetch=null,n.cwrap("releaseHttpFLV","number",["number"])(this.AVSniffPtr),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null,this.audioWAudio&&this.audioWAudio.stop(),this.audioWAudio=null;}},{key:"isPlayingState",value:function value(){return null!==this.playInterval&&void 0!==this.playInterval;}},{key:"pause",value:function value(){this.audioWAudio&&this.audioWAudio.pause(),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null;}},{key:"playYUV",value:function value(){if(this.YuvBuf.length>0){var e=this.YuvBuf.shift();return a.renderFrame(this.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h),!0;}return!1;}},{key:"play",value:function value(){var e=this,t=this;if(!1===this.checkCacheState())return this.onLoadCache&&this.onLoadCache(),setTimeout(function(){e.play();},100),!1;if(void 0===this.playInterval||null===this.playInterval){var i=0,r=0,n=0;this.playInterval=setInterval(function(){if(r=s.GetMsTime(),t.cache_status){if(r-i>=t.frameTime-n){var e=t.YuvBuf.shift();if(null!=e&&null!==e){var o=0;null!==t.audioWAudio&&void 0!==t.audioWAudio&&(o=1e3*(e.pts-t.audioWAudio.getAlignVPTS())),n=t.audioWAudio?o<0&&-1*o<=t.frameTime||o>=0?s.GetMsTime()-r+1:t.frameTime:s.GetMsTime()-r+1,a.renderFrame(t.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h);}(t.YuvBuf.length<=0||t.audioWAudio.sampleQueue.length<=0)&&(t.cache_status=!1,t.onLoadCache&&t.onLoadCache(),t.audioWAudio.pause()),i=r;}}else n=t.frameTime;},1),this.audioWAudio&&this.audioWAudio.play();}}},{key:"start",value:function value(e){var t,i,r,s=this;this.workerFetch=new Worker((t=function(){var e=new AbortController(),t=e.signal;self,self.onmessage=function(i){var r=i.data;switch(void 0===r.cmd||null===r.cmd?"":r.cmd){case"start":!function(e){var i=!1;i||(i=!0,fetch(e,{signal:t}).then(function(e){return function e(t){return t.read().then(function(i){if(!i.done){var r=i.value;return self.postMessage({cmd:"fetch-chunk",data:r,msg:"fetch-chunk"}),e(t);}self.postMessage({cmd:"fetch-fin",data:null,msg:"fetch-fin"});});}(e.body.getReader());})["catch"](function(e){e.toString().includes("user aborted")||(console.error("httplive error",e),self.postMessage({cmd:"fetch-error",data:e,msg:"fetch-error"}));}));}(r.data),self.postMessage({cmd:"default",data:"WORKER STARTED",msg:"default"});break;case"stop":e.abort(),self.close();}};}.toString(),i=t.match(/^\s*function\s*\(\s*\)\s*\{(([\s\S](?!\}$))*[\s\S])/),r=[i[1]],window.URL.createObjectURL(new Blob(r,{type:"text/javascript"})))),this.workerFetch.onmessage=function(e){s._workerFetch_onmessage(e,s);},this.workerFetch,this.AVSniffPtr=n.cwrap("AVSniffHttpFlvInit","number",["string","string"])("base64:QXV0aG9yOmNoYW5neWFubG9uZ3xudW1iZXJ3b2xmLEdpdGh1YjpodHRwczovL2dpdGh1Yi5jb20vbnVtYmVyd29sZixFbWFpbDpwb3JzY2hlZ3QyM0Bmb3htYWlsLmNvbSxRUTo1MzEzNjU4NzIsSG9tZVBhZ2U6aHR0cDovL3h2aWRlby52aWRlbyxEaXNjb3JkOm51bWJlcndvbGYjODY5NCx3ZWNoYXI6bnVtYmVyd29sZjExLEJlaWppbmcsV29ya0luOkJhaWR1","0.0.0"),this.AVSniffPtr;var o=n.addFunction(this._callbackProbe.bind(this)),l=n.addFunction(this._callbackYUV.bind(this)),f=n.addFunction(this._callbackNALU.bind(this)),u=n.addFunction(this._callbackPCM.bind(this)),h=n.addFunction(this._callbackAAC.bind(this));n.cwrap("initializeSniffHttpFlvModule","number",["number","number","number","number","number","number"])(this.AVSniffPtr,o,l,f,u,h),this.AVGLObj=a.setupCanvas(this.CanvasObj,{preserveDrawingBuffer:!1}),this.workerFetch.postMessage({cmd:"start",data:e,msg:"start"}),this._decode();}}])&&r(t.prototype,i),f&&r(t,f),e;}();i.CHttpLiveCore=f;},{"../consts":198,"../demuxer/buffer":209,"../demuxer/bufferFrame":210,"../render-engine/webgl-420p":220,"../version":223,"./audio-core":199,"./audio-native-core":200,"./av-common":201,"./cache":204,"./cacheYuv":205,"./missile.js":1}],203:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];this.showScreen=e,this.canvas&&(e?this.canvas.setAttribute("hidden",!0):this.canvas.removeAttribute("hidden"));}},{key:"getCachePTS",value:function value(){return 1!==this.config.ignoreAudio&&this.audioWAudio?Math.max(this.vCachePTS,this.aCachePTS):this.vCachePTS;}},{key:"getMaxPTS",value:function value(){return Math.max(this.vCachePTS,this.aCachePTS);}},{key:"isPlayingState",value:function value(){return this.isPlaying;}},{key:"pushDone",value:function value(){this.pushEOF=!0;}},{key:"_clearDecInterval",value:function value(){this.decVFrameInterval&&window.clearInterval(this.decVFrameInterval),this.decVFrameInterval=null;}},{key:"_checkPlayFinished",value:function value(){return!(this.config.playMode!==h.PLAYER_MODE_VOD||!(!0===this.bufRecvStat&&(this.playPTS>=this.bufLastVDTS||this.audioWAudio&&this.playPTS>=this.bufLastADTS)||this.duration-this.playPTS0&&(this.isPlaying=!0);var t=0,i=0,r=0;this.config.playMode===h.PLAYER_MODE_NOTIME_LIVE?this.playFrameInterval=window.setInterval(function(){if(e._videoQueue.length>0){var t=e._videoQueue.shift();t.pts,l.renderFrame(e.yuv,t.data_y,t.data_u,t.data_v,t.line1,t.height);}},1e3*this.frameDur):this.playFrameInterval=window.setInterval(function(){if(i=f.GetMsTime(),e._videoQueue.length>0&&i-t>=e.frameTime-r){var n=e._videoQueue.shift(),a=0;if(e.isNewSeek||null===e.audioWAudio||void 0===e.audioWAudio||(a=1e3*(n.pts-e.audioWAudio.getAlignVPTS()),e.playPTS=Math.max(e.audioWAudio.getAlignVPTS(),e.playPTS)),t=i,f.GetMsTime(),e.playPTS=Math.max(n.pts,e.playPTS),e.isNewSeek&&e.seekTarget-e.frameDur>n.pts)return void(r=e.frameTime);if(e.isNewSeek&&(e.audioWAudio&&e.audioWAudio.setVoice(e.audioVoice),e.audioWAudio&&e.audioWAudio.play(),r=0,e.isNewSeek=!1,e.seekTarget=0),e.showScreen?e.onRender&&e.onRender(n.line1,n.height,n.data_y,n.data_u,n.data_v):(n.pts,l.renderFrame(e.yuv,n.data_y,n.data_u,n.data_v,n.line1,n.height)),e.onPlayingTime&&e.onPlayingTime(n.pts),!e.isNewSeek&&e.audioWAudio&&(a<0&&-1*a<=e.frameTime||a>=0)){if(e.config.playMode===h.PLAYER_MODE_VOD)if(n.pts>=e.duration)e.onLoadCacheFinshed&&e.onLoadCacheFinshed(),e.onPlayingFinish&&e.onPlayingFinish(),e._clearDecInterval(),e.pause();else if(e._checkPlayFinished())return;r=f.GetMsTime()-i;}else!e.isNewSeek&&e.audioWAudio&&(a<0&&e.frameTime,r=e.frameTime);}e._checkPlayFinished();},1);}this.isNewSeek||this.audioWAudio&&this.audioWAudio.play();}},{key:"pause",value:function value(){this.isPlaying=!1,this._pause();}},{key:"_pause",value:function value(){this.playFrameInterval&&window.clearInterval(this.playFrameInterval),this.playFrameInterval=null,this.audioWAudio&&this.audioWAudio.pause();}},{key:"seek",value:function value(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.openFrameCall=!1,this.pause(),this._clearDecInterval(),null!==this.avFeedVideoInterval&&(window.clearInterval(this.avFeedVideoInterval),this.avFeedVideoInterval=null),null!==this.avFeedAudioInterval&&(window.clearInterval(this.avFeedAudioInterval),this.avFeedAudioInterval=null),this.yuvMaxTime=0,this.playVPipe.length=0,this._videoQueue.length=0,this.audioWAudio&&this.audioWAudio.stop(),e&&e(),this.isNewSeek=!0,this.avSeekVState=!0,this.seekTarget=i.seekTime,null!==this.audioWAudio&&void 0!==this.audioWAudio&&(this.audioWAudio.setVoice(0),this.audioWAudio.resetStartParam(),this.audioWAudio.stop()),this._avFeedData(i.seekTime),setTimeout(function(){t.yuvMaxTime=0,t._videoQueue.length=0,t.openFrameCall=!0,t.frameCallTag+=1,t._decVFrameIntervalFunc();},1e3);}},{key:"setVoice",value:function value(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e);}},{key:"cacheIsFull",value:function value(){return this._videoQueue.length>=50;}},{key:"_checkDisplaySize",value:function value(e,t,i){var r=t-e,n=this.config.width+Math.ceil(r/2),a=t/this.config.width>i/this.config.height,s=(n/t).toFixed(2),o=(this.config.height/i).toFixed(2),l=a?s:o,f=this.config.fixed,u=f?n:parseInt(t*l),h=f?this.config.height:parseInt(i*l);if(this.canvas.offsetWidth!=u||this.canvas.offsetHeight!=h){var c=parseInt((this.canvasBox.offsetHeight-h)/2),d=parseInt((this.canvasBox.offsetWidth-u)/2);c=c<0?0:c,d=d<0?0:d,this.canvas.style.marginTop=c+"px",this.canvas.style.marginLeft=d+"px",this.canvas.style.width=u+"px",this.canvas.style.height=h+"px";}return this.isCheckDisplay=!0,[u,h];}},{key:"_createYUVCanvas",value:function value(){this.canvasBox=document.querySelector("#"+this.config.playerId),this.canvasBox.style.overflow="hidden",this.canvas=document.createElement("canvas"),this.canvas.style.width=this.canvasBox.clientWidth+"px",this.canvas.style.height=this.canvasBox.clientHeight+"px",this.canvas.style.top="0px",this.canvas.style.left="0px",this.canvasBox.appendChild(this.canvas),this.yuv=l.setupCanvas(this.canvas,{preserveDrawingBuffer:!1});}},{key:"_avRecvPackets",value:function value(){var e=this;this.bufObject.cleanPipeline(),null!==this.avRecvInterval&&(window.clearInterval(this.avRecvInterval),this.avRecvInterval=null),!0===this.config.checkProbe?this.avRecvInterval=window.setInterval(function(){a.cwrap("getSniffStreamPkg","number",["number"])(e.corePtr),e._avCheckRecvFinish();},5):this.avRecvInterval=window.setInterval(function(){a.cwrap("getSniffStreamPkgNoCheckProbe","number",["number"])(e.corePtr),e._avCheckRecvFinish();},5),this._avFeedData(0,!1);}},{key:"_avCheckRecvFinish",value:function value(){this.config.playMode===h.PLAYER_MODE_VOD&&this.duration-this.getMaxPTS()=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),t.play(),window.clearInterval(i),i=null);},10);return!0;}},{key:"_afterAvFeedSeekToStartWithUnFinBuffer",value:function value(e){var t=this,i=window.setInterval(function(){t._videoQueue.length,t._videoQueue.length>=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),!1===t.reFull?t.play():t.reFull=!1,window.clearInterval(i),i=null);},10);return!0;}},{key:"_avFeedData",value:function value(e){var t=this;if(this.playVPipe.length=0,this.audioWAudio&&this.audioWAudio.cleanQueue(),e<=0&&!1===this.bufOK){var i=0;if(this.avFeedVideoInterval=window.setInterval(function(){var r=t.bufObject.videoBuffer.length;if(r-1>i||t.duration-t.getMaxPTS()0){for(var a=0;a0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.bufLastVDTS,t.bufObject.videoBuffer,t.playVPipe);}else t.config.playMode===h.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.duration,t.bufObject.videoBuffer,t.playVPipe);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===h.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithFinishedBuffer(e),t.avSeekVState=!1));},5),void 0!==this.audioWAudio&&null!==this.audioWAudio&&this.config.ignoreAudio<1){var r=0;this.avFeedAudioInterval=window.setInterval(function(){var e=t.bufObject.audioBuffer.length;if(e-1>r||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer);}else t.config.playMode===h.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer);},5);}}else{var n=this.bufObject.seekIDR(e),a=parseInt(n,10);this.playPTS=0;var o=a;if(this.avFeedVideoInterval=window.setInterval(function(){var i=t.bufObject.videoBuffer.length;if(i-1>o||t.duration-t.getMaxPTS()0){for(var n=0;n0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null);}else t.config.playMode===h.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===h.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithUnFinBuffer(e),t.avSeekVState=!1));},5),this.audioWAudio&&this.config.ignoreAudio<1){var l=parseInt(e,10);this.avFeedAudioInterval=window.setInterval(function(){var e=t.bufObject.audioBuffer.length;if(e-1>l||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null);}else t.config.playMode===h.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null);},5);}}}},{key:"_probeFinCallback",value:function value(e,t,i,r,n,s,o,l,f){var c=this;this._createYUVCanvas(),h.V_CODEC_NAME_HEVC,this.config.fps=1*r,this.frameTime=1e3/this.config.fps,this.width=t,this.height=i,this.frameDur=1/this.config.fps,this.duration=e-this.frameDur,this.vCodecID=l,this.config.sampleRate=s,this.channels=o,this.audioIdx=n,this.duration<0&&(this.config.playMode=h.PLAYER_MODE_NOTIME_LIVE,this.frameTime,this.frameDur);for(var d=a.HEAPU8.subarray(f,f+10),_=0;_=0&&this.config.ignoreAudio<1?(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.audioWAudio=u({sampleRate:s,appendType:h.APPEND_TYPE_FRAME}),this.audioWAudio.setDurationMs(1e3*e),this.onLoadCache&&this.audioWAudio.setOnLoadCache(function(){if(c.retryAuSampleNo,c.retryAuSampleNo<=5){c.pause(),c.onLoadCache&&c.onLoadCache();var e=window.setInterval(function(){return c.retryAuSampleNo,c.audioWAudio.sampleQueue.length,c.audioWAudio.sampleQueue.length>2?(c.onLoadCacheFinshed&&c.onLoadCacheFinshed(),c.play(),c.retryAuSampleNo=0,window.clearInterval(e),void(e=null)):(c.retryAuSampleNo+=1,c.retryAuSampleNo>5?(c.play(),c.onLoadCacheFinshed&&c.onLoadCacheFinshed(),window.clearInterval(e),void(e=null)):void 0);},1e3);}})):this.audioNone=!0,this._avRecvPackets(),this._decVFrameIntervalFunc()),this.onProbeFinish&&this.onProbeFinish();}},{key:"_ptsFixed2",value:function value(e){return Math.ceil(100*e)/100;}},{key:"_naluCallback",value:function value(e,t,i,r,n,s,o){var l=this._ptsFixed2(s),f=a.HEAPU8.subarray(e,e+t),u=new Uint8Array(f);this.bufObject.appendFrameWithDts(l,o,u,!0,i),this.bufLastVDTS=Math.max(o,this.bufLastVDTS),this.vCachePTS=Math.max(l,this.vCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS());}},{key:"_samplesCallback",value:function value(e,t,i,r){}},{key:"_aacFrameCallback",value:function value(e,t,i,r,n){var s=this._ptsFixed2(n);if(this.audioWAudio){var o=new Uint8Array(7+i),l=a.HEAPU8.subarray(e,e+7);o.set(l,0);var f=a.HEAPU8.subarray(t,t+i);o.set(f,7),this.bufObject.appendFrame(s,o,!1,!0),this.bufLastADTS=Math.max(s,this.bufLastADTS),this.aCachePTS=Math.max(s,this.aCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS());}}},{key:"_decVFrameIntervalFunc",value:function value(){var e=this;null==this.decVFrameInterval&&(this.decVFrameInterval=window.setInterval(function(){if(e._videoQueue.length<50&&e.playVPipe.length>0){var t=e.playVPipe.shift(),i=t.data,r=a._malloc(i.length);a.HEAP8.set(i,r);var n=parseInt(1e3*t.pts,10),s=parseInt(1e3*t.dts,10);e.yuvMaxTime=Math.max(t.pts,e.yuvMaxTime),a.cwrap("decodeVideoFrame","number",["number","number","number","number","number"])(e.corePtr,r,i.length,n,s,e.frameCallTag),a._free(r),r=null;}},10));}},{key:"_frameCallback",value:function value(e,t,i,r,n,s,o,f,u,h){if(this._videoQueue.length,!(!1===this.openFrameCall||h!==this.frameCallTag||u>this.yuvMaxTime+this.frameDur||this.isNewSeek&&this.seekTarget-u>3*this.frameDur)){var c=this._videoQueue.length;if(this.canvas.width==r&&this.canvas.height==f||(this.canvas.width=r,this.canvas.height=f,this.isCheckDisplay)||this._checkDisplaySize(o,r,f),!(this.playPTS>u)){var _=a.HEAPU8.subarray(e,e+r*f),p=a.HEAPU8.subarray(t,t+n*f/2),m=a.HEAPU8.subarray(i,i+s*f/2),b=new Uint8Array(_),v=new Uint8Array(p),y=new Uint8Array(m);this.config.readyShow&&(l.renderFrame(this.yuv,b,v,y,r,f),this.config.readyShow=!1,this.onReadyShowDone&&this.onReadyShowDone());var g=new d(b,v,y,r,n,s,o,f,u);if(c<=0||u>this._videoQueue[c-1].pts)this._videoQueue.push(g);else if(uthis._videoQueue[w].pts&&w+10&&void 0!==arguments[0]?arguments[0]:60,t={limit:e,yuvCache:[],appendCacheByCacheYuv:function appendCacheByCacheYuv(e){e.pts;return t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.OVERFLOW:(t.yuvCache.push(e),t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL);},getState:function getState(){return t.yuvCache.length<=0?CACHE_APPEND_STATUS_CODE.NULL:t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL;},cleanPipeline:function cleanPipeline(){t.yuvCache.length=0;},vYuv:function vYuv(){return t.yuvCache.length<=0?null:t.yuvCache.shift();}};return t;};}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{"./cacheYuv":205}],205:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i>1;return n.indexOf(t);},GET_NALU_TYPE:function GET_NALU_TYPE(e){var t=(126&e)>>1;if(t>=1&&t<=9)return r.DEFINE_P_FRAME;if(t>=16&&t<=21)return r.DEFINE_KEY_FRAME;var i=n.indexOf(t);return i>=0?n[i]:r.DEFINE_OTHERS_FRAME;},PACK_NALU:function PACK_NALU(e){var t=e.nalu,i=e.vlc.vlc;null==t.vps&&(t.vps=new Uint8Array());var r=new Uint8Array(t.vps.length+t.sps.length+t.pps.length+t.sei.length+i.length);return r.set(t.vps,0),r.set(t.sps,t.vps.length),r.set(t.pps,t.vps.length+t.sps.length),r.set(t.sei,t.vps.length+t.sps.length+t.pps.length),r.set(i,t.vps.length+t.sps.length+t.pps.length+t.sei.length),r;}};},{"./hevc-header":206}],208:[function(e,t,i){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t0&&void 0!==arguments[0]&&arguments[0];null!=t&&(t.showScreen=e,t.canvas&&(e?t.canvas.setAttribute("hidden",!0):t.canvas.removeAttribute("hidden")));},setSize:function setSize(e,i){t.config.width=e||u.DEFAULT_WIDTH,t.config.height=i||u.DEFAULT_HEIGHT;},setFrameRate:function setFrameRate(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:25;t.config.fps=e,t.config.frameDurMs=1e3/e;},setDurationMs:function setDurationMs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e,0==t.config.audioNone&&t.audio.setDurationMs(e);},setPlayingCall:function setPlayingCall(e){t.onPlayingTime=e;},setVoice:function setVoice(e){t.realVolume=e,0==t.config.audioNone&&t.audio.setVoice(t.realVolume);},isPlayingState:function isPlayingState(){return t.isPlaying||t.isCaching===u.CACHE_WITH_PLAY_SIGN;},appendAACFrame:function appendAACFrame(e){t.audio.addSample(e),t.aCachePTS=Math.max(e.pts,t.aCachePTS);},appendHevcFrame:function appendHevcFrame(e){var i;t.config.appendHevcType==u.APPEND_TYPE_STREAM?t.stream=new Uint8Array((i=r(t.stream)).concat.apply(i,r(e))):t.config.appendHevcType==u.APPEND_TYPE_FRAME&&(t.frameList.push(e),t.vCachePTS=Math.max(e.pts,t.vCachePTS));},getCachePTS:function getCachePTS(){return Math.max(t.vCachePTS,t.aCachePTS);},endAudio:function endAudio(){0==t.config.audioNone&&t.audio.stop();},cleanSample:function cleanSample(){0==t.config.audioNone&&t.audio.cleanQueue();},cleanVideoQueue:function cleanVideoQueue(){t.config.appendHevcType==u.APPEND_TYPE_STREAM?t.stream=new Uint8Array():t.config.appendHevcType==u.APPEND_TYPE_FRAME&&(t.frameList=[],t.frameList.length=0);},cleanCacheYUV:function cleanCacheYUV(){t.cacheYuvBuf.cleanPipeline();},pause:function pause(){t.loop&&window.clearInterval(t.loop),t.loop=null,0==t.config.audioNone&&t.audio.pause(),t.isPlaying=!1,t.isCaching===u.CACHE_WITH_PLAY_SIGN&&(t.isCaching=u.CACHE_WITH_NOPLAY_SIGN);},checkFinished:function checkFinished(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.PLAYER_MODE_VOD;return e==u.PLAYER_MODE_VOD&&t.cacheYuvBuf.yuvCache.length<=0&&(t.videoPTS.toFixed(1)>=(t.durationMs-t.config.frameDurMs)/1e3||t.noCacheFrame>=10)&&(null!=t.onPlayingFinish&&(u.PLAYER_MODE_VOD,t.frameList.length,t.cacheYuvBuf.yuvCache.length,t.videoPTS.toFixed(1),t.durationMs,t.config.frameDurMs,t.noCacheFrame,t.onPlayingFinish()),!0);},clearAllCache:function clearAllCache(){t.nowPacket=null,t.vCachePTS=0,t.aCachePTS=0,t.cleanSample(),t.cleanVideoQueue(),t.cleanCacheYUV();},seek:function seek(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.isPlaying;t.pause(),t.stopCacheThread(),t.clearAllCache(),e&&e(),t.isNewSeek=!0,t.flushDecoder=1,t.videoPTS=parseInt(i.seekTime);var n={seekPos:i.seekTime||-1,mode:i.mode||u.PLAYER_MODE_VOD,accurateSeek:i.accurateSeek||!0,seekEvent:i.seekEvent||!0,realPlay:r};t.cacheThread(),t.play(n);},getNalu1Packet:function getNalu1Packet(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=null,r=-1;if(t.config.appendHevcType==u.APPEND_TYPE_STREAM)i=t.nextNalu();else{if(t.config.appendHevcType!=u.APPEND_TYPE_FRAME)return null;var n=t.frameList.shift();if(!n)return null;i=n.data,r=n.pts,e&&(t.videoPTS=r);}return{nalBuf:i,pts:r};},decodeNalu1Frame:function decodeNalu1Frame(e,i){var r=n._malloc(e.length);n.HEAP8.set(e,r);var a=parseInt(1e3*i);n.cwrap("decodeCodecContext","number",["number","number","number","number","number"])(t.vcodecerPtr,r,e.length,a,t.flushDecoder);return t.flushDecoder=0,n._free(r),!1;},cacheThread:function cacheThread(){t.cacheLoop=window.setInterval(function(){if(t.cacheYuvBuf.getState()!=CACHE_APPEND_STATUS_CODE.FULL){var e=t.getNalu1Packet(!1);if(null!=e){var i=e.nalBuf,r=e.pts;t.decodeNalu1Frame(i,r,!0);}}},10);},stopCacheThread:function stopCacheThread(){null!==t.cacheLoop&&(window.clearInterval(t.cacheLoop),t.cacheLoop=null);},loadCache:function loadCache(){if(!(t.frameList.length<=3)){var e=t.isPlaying;if(t.cacheYuvBuf.yuvCache.length<=3){t.pause(),null!=t.onLoadCache&&t.onLoadCache(),t.isCaching=e?u.CACHE_WITH_PLAY_SIGN:u.CACHE_WITH_NOPLAY_SIGN;var i=t.frameList.length>30?30:t.frameList.length;null===t.cacheInterval&&(t.cacheInterval=window.setInterval(function(){t.cacheYuvBuf.yuvCache.length>=i&&(null!=t.onLoadCacheFinshed&&t.onLoadCacheFinshed(),window.clearInterval(t.cacheInterval),t.cacheInterval=null,t.isCaching===u.CACHE_WITH_PLAY_SIGN&&t.play(t.playParams),t.isCaching=u.CACHE_NO_LOADCACHE);},40));}}},playFunc:function playFunc(){var e=!1;if(t.playParams.seekEvent||a.GetMsTime()-t.calcuteStartTime>=t.frameTime-t.preCostTime){e=!0;var i=!0;if(t.calcuteStartTime=a.GetMsTime(),t.config.audioNone)t.playFrameYUV(i,t.playParams.accurateSeek);else{t.fix_poc_err_skip>0&&(t.fix_poc_err_skip--,i=!1);var r=t.videoPTS-t.audio.getAlignVPTS();if(r>0)return void(t.playParams.seekEvent&&!t.config.audioNone&&t.audio.setVoice(0));if(i){if(!(i=-1*r<=1*t.frameTimeSec)){for(var n=parseInt(r/t.frameTimeSec),s=0;s=i&&(t.playFrameYUV(!0,t.playParams.accurateSeek),i+=1);},1);}else t.videoPTS>=t.playParams.seekPos&&!t.isNewSeek||0===t.playParams.seekPos||0===t.playParams.seekPos?(t.frameTime=1e3/t.config.fps,t.frameTimeSec=t.frameTime/1e3,0==t.config.audioNone&&t.audio.play(),t.realVolume=t.config.audioNone?0:t.audio.voice,t.playParams.seekEvent&&(t.fix_poc_err_skip=10),t.loop=window.setInterval(function(){var e=a.GetMsTime();t.playFunc(),t.preCostTime=a.GetMsTime()-e;},1)):(t.loop=window.setInterval(function(){t.playFrameYUV(!1,t.playParams.accurateSeek),t.checkFinished(t.playParams.mode)?(window.clearInterval(t.loop),t.loop=null):t.videoPTS>=t.playParams.seekPos&&(window.clearInterval(t.loop),t.loop=null,t.play(t.playParams));},1),t.isNewSeek=!1);},stop:function stop(){t.release(),n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr),t.stream=new Uint8Array();},release:function release(){return t.endAudio(),t.cacheLoop&&window.clearInterval(t.cacheLoop),t.cacheLoop=null,t.loop&&window.clearInterval(t.loop),t.loop=null,t.pause(),n.cwrap("release","number",["number"])(t.vcodecerPtr),t.stream=null,t.frameList.length=0,t.durationMs=-1,t.videoPTS=0,t.isPlaying=!1,!0;},nextNalu:function nextNalu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(t.stream.length<=4)return!1;for(var i=-1,r=0;r=t.stream.length){if(-1==i)return!1;var n=t.stream.subarray(i);return t.stream=new Uint8Array(),n;}var a="0 0 1"==t.stream.slice(0,3).join(" "),s="0 0 0 1"==t.stream.slice(0,4).join(" ");if(a||s){if(-1==i)i=r;else{if(e<=1){var o=t.stream.subarray(i,r);return t.stream=t.stream.subarray(r),o;}e-=1;}r+=3;}}return!1;},decodeSendPacket:function decodeSendPacket(e){var i=n._malloc(e.length);n.HEAP8.set(e,i);var r=n.cwrap("decodeSendPacket","number",["number","number","number"])(t.vcodecerPtr,i,e.length);return n._free(i),r;},decodeRecvFrame:function decodeRecvFrame(){return n.cwrap("decodeRecv","number",["number"])(t.vcodecerPtr);},playFrameYUV:function playFrameYUV(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.cacheYuvBuf.vYuv();if(null==r)return t.noCacheFrame+=1,e&&!t.playParams.seekEvent&&t.loadCache(),!1;t.noCacheFrame=0;var n=r.pts;return t.videoPTS=n,(!e&&i||e)&&e&&t.drawImage(r.width,r.height,r.imageBufferY,r.imageBufferB,r.imageBufferR),e&&!t.playParams.seekEvent&&t.isPlaying&&t.loadCache(),!0;},drawImage:function drawImage(e,i,r,n,a){if(t.canvas.width===e&&t.canvas.height==i||(t.canvas.width=e,t.canvas.height=i),t.showScreen&&null!=t.onRender)t.onRender(e,i,r,n,a);else{if(!t.isCheckDisplay)t.checkDisplaySize(e,i);var s=e*i,o=e/2*(i/2),l=new Uint8Array(s+2*o);l.set(r,0),l.set(n,s),l.set(a,s+o),f.renderFrame(t.yuv,r,n,a,e,i);}},debugYUV:function debugYUV(e){t.debugYUVSwitch=!0,t.debugID=e;},checkDisplaySize:function checkDisplaySize(e,i){var r=e/t.config.width>i/t.config.height,n=(t.config.width/e).toFixed(2),a=(t.config.height/i).toFixed(2),s=r?n:a,o=t.config.fixed,l=o?t.config.width:parseInt(e*s),f=o?t.config.height:parseInt(i*s);if(t.canvas.offsetWidth!=l||t.canvas.offsetHeight!=f){var u=parseInt((t.canvasBox.offsetHeight-f)/2),h=parseInt((t.canvasBox.offsetWidth-l)/2);t.canvas.style.marginTop=u+"px",t.canvas.style.marginLeft=h+"px",t.canvas.style.width=l+"px",t.canvas.style.height=f+"px";}return t.isCheckDisplay=!0,[l,f];},makeWasm:function makeWasm(){if(null!=t.config.token){t.vcodecerPtr=n.cwrap("registerPlayer","number",["string","string"])(t.config.token,h.PLAYER_VERSION);var e=n.addFunction(function(e,i,r,a,s,o,f,u,h){var c=n.HEAPU8.subarray(e,e+a*u),d=n.HEAPU8.subarray(i,i+s*u/2),_=n.HEAPU8.subarray(r,r+o*u/2),p=new Uint8Array(c),m=new Uint8Array(d),b=new Uint8Array(_),v=1*h/1e3,y=new l.CacheYuvStruct(v,a,u,p,m,b);t.cacheYuvBuf.appendCacheByCacheYuv(y);});n.cwrap("setCodecType","number",["number","number","number"])(t.vcodecerPtr,t.config.videoCodec,e);n.cwrap("initMissile","number",["number"])(t.vcodecerPtr);n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr);}},makeIt:function makeIt(){var e=document.querySelector("div#"+t.config.playerId),i=document.createElement("canvas");i.style.width=e.clientWidth+"px",i.style.height=e.clientHeight+"px",i.style.top="0px",i.style.left="0px",e.appendChild(i),t.canvasBox=e,t.canvas=i,t.yuv=f.setupCanvas(i,{preserveDrawingBuffer:!1}),0==t.config.audioNone&&(t.audio=s({sampleRate:t.config.sampleRate,appendType:t.config.appendHevcType})),t.isPlayLoadingFinish=1;}};return t.makeWasm(),t.makeIt(),t.cacheThread(),t;};},{"../consts":198,"../render-engine/webgl-420p":220,"../version":223,"./audio-core":199,"./av-common":201,"./cache":204,"./cacheYuv":205,"./missile.js":1}],209:[function(e,t,i){"use strict";var r=e("./bufferFrame");t.exports=function(){var e={videoBuffer:[],audioBuffer:[],idrIdxBuffer:[],appendFrame:function appendFrame(t,i){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=new r.BufferFrame(t,a,i,n),o=parseInt(t);return n?(e.videoBuffer.length-1>=o?e.videoBuffer[o].push(s):e.videoBuffer.push([s]),a&&!e.idrIdxBuffer.includes(t)&&e.idrIdxBuffer.push(t)):e.audioBuffer.length-1>=o&&null!=e.audioBuffer[o]&&null!=e.audioBuffer[o]?e.audioBuffer[o]&&e.audioBuffer[o].push(s):e.audioBuffer.push([s]),!0;},appendFrameWithDts:function appendFrameWithDts(t,i,n){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=r.ConstructWithDts(t,i,s,n,a),l=parseInt(i);return a?(e.videoBuffer.length-1>=l?e.videoBuffer[l].push(o):e.videoBuffer.push([o]),s&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=l&&null!=e.audioBuffer[l]&&null!=e.audioBuffer[l]?e.audioBuffer[l]&&e.audioBuffer[l].push(o):e.audioBuffer.push([o]),!0;},appendFrameByBufferFrame:function appendFrameByBufferFrame(t){var i=t.pts,r=parseInt(i);return t.video?(e.videoBuffer.length-1>=r?e.videoBuffer[r].push(t):e.videoBuffer.push([t]),isKey&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=r?e.audioBuffer[r].push(t):e.audioBuffer.push([t]),!0;},cleanPipeline:function cleanPipeline(){e.videoBuffer.length=0,e.audioBuffer.length=0;},vFrame:function vFrame(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.videoBuffer.length-1))return e.videoBuffer[t];},aFrame:function aFrame(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.audioBuffer.length-1))return e.audioBuffer[t];},seekIDR:function seekIDR(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e.idrIdxBuffer,e.videoBuffer,t<0)return null;if(e.idrIdxBuffer.includes(t))return t;for(var i=0;it||0===i&&e.idrIdxBuffer[i]>=t){for(var r=1;r>=0;r--){var n=i-r;if(n>=0)return e.idrIdxBuffer[n],e.idrIdxBuffer[n];}return e.idrIdxBuffer[i],j,e.idrIdxBuffer[i];}}}};return e;};},{"./bufferFrame":210}],210:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&i.extensionInfo.vHeight>0&&(i.size.width=i.extensionInfo.vWidth,i.size.height=i.extensionInfo.vHeight)),i.mediaInfo.duration,null!=i.onDemuxed&&i.onDemuxed(i.onReadyOBJ);for(var e=!1;;){var r=i.mpegTsObj.readPacket();if(r.size<=0)break;var n=r.dtime>0?r.dtime:r.ptime;if(!(n<0)){if(0==r.type){n<=i.vPreFramePTS&&(e=!0);var a=l.PACK_NALU(r.layer),o=1==r.keyframe,f=1==e?n+i.vStartTime:n,u=new s.BufferFrame(f,o,a,!0);i.bufObject.appendFrame(u.pts,u.data,!0,u.isKey),i.vPreFramePTS=f,null!=i.onSamples&&i.onSamples(i.onReadyOBJ,u);}else if(n<=i.aPreFramePTS&&(e=!0),"aac"==i.mediaInfo.aCodec)for(var h=r.data,c=0;c=3?(i._onTsReady(e),window.clearInterval(i.timerTsWasm),i.timerTsWasm=null):(i.mpegTsWasmRetryLoadTimes+=1,i.mpegTsObj.initDemuxer());},3e3);}},{key:"_onTsReady",value:function value(e){var t=this;t.hls.fetchM3u8(e),t.mpegTsWasmState=!0,t.timerFeed=window.setInterval(function(){if(t.tsList.length>0&&0==t.lockWait.state)try{var e=t.tsList.shift();if(null!=e){var i=e.streamURI,r=e.streamDur;t.lockWait.state=!0,t.lockWait.lockMember.dur=r,t.mpegTsObj.isLive=t.hls.isLive(),t.mpegTsObj.demuxURL(i);}else console.error("_onTsReady need wait ");}catch(e){console.error("onTsReady ERROR:",e),t.lockWait.state=!1;}},50);}},{key:"release",value:function value(){this.timerFeed&&window.clearInterval(this.timerFeed),this.timerTsWasm&&window.clearInterval(this.timerTsWasm);}},{key:"bindReady",value:function value(e){this.onReadyOBJ=e;}},{key:"popBuffer",value:function value(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1===e?t+1>this.bufObject.videoBuffer.length?null:this.bufObject.vFrame(t):2===e?t+1>this.bufObject.audioBuffer.length?null:this.bufObject.aFrame(t):void 0;}},{key:"getVLen",value:function value(){return this.bufObject.videoBuffer.length;}},{key:"getALen",value:function value(){return this.bufObject.audioBuffer.length;}},{key:"getLastIdx",value:function value(){return this.bufObject.videoBuffer.length-1;}},{key:"getALastIdx",value:function value(){return this.bufObject.audioBuffer.length-1;}},{key:"getACodec",value:function value(){return this.aCodec;}},{key:"getDurationMs",value:function value(){return this.durationMs;}},{key:"getFPS",value:function value(){return this.fps;}},{key:"getSampleRate",value:function value(){return this.sampleRate;}},{key:"getSampleChannel",value:function value(){return this.aChannel;}},{key:"getSize",value:function value(){return this.size;}},{key:"seek",value:function value(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t;}}}])&&r(t.prototype,i),u&&r(t,u),e;}();i.M3u8=u;},{"../consts":198,"../decoder/hevc-imp":207,"./buffer":209,"./bufferFrame":210,"./m3u8base":212,"./mpegts/mpeg.js":216}],212:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i ",t),setTimeout(function(){i.fetchM3u8(e);},500);});}},{key:"_uriParse",value:function value(e){this._preURI="";var t=e.split("//"),i=null,r=null;if(t.length<1)return!1;t.length>1?(i=t[0],r=t[1].split("/"),this._preURI=i+"//"):r=t[0].split("/");for(var n=0;n_&&(o=_);var p=r[f+=1],m=null;m=p.indexOf("http")>=0?p:this._preURI+p,this._slices.indexOf(m)<0&&(this._slices.push(m),this._slices[this._slices.length-1],null!=this.onTransportStream&&this.onTransportStream(m,_));}}}if(this._slices.length>s.hlsSliceLimit&&this._type==n.PLAYER_IN_TYPE_M3U8_LIVE&&(this._slices=this._slices.slice(-1*s.hlsSliceLimit)),null!=this.onFinished){var b={type:this._type,duration:-1};this.onFinished(b);}return o;}},{key:"_readTag",value:function value(e){var t=s.tagParse.exec(e);return null!==t?{key:t[1],value:t[3]}:null;}}])&&r(t.prototype,i),o&&r(t,o),e;}();i.M3u8Base=o;},{"../consts":198}],213:[function(e,t,i){"use strict";var r=e("mp4box"),n=e("../decoder/hevc-header"),a=e("../decoder/hevc-imp"),s=e("./buffer"),o=e("../consts"),l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12,Reserved:13,"frequency is written explictly":15},f=function f(e){for(var t=[],i=0;i1&&void 0!==arguments[1]&&arguments[1],i=null;return t?((i=e)[0]=n.DEFINE_STARTCODE[0],i[1]=n.DEFINE_STARTCODE[1],i[2]=n.DEFINE_STARTCODE[2],i[3]=n.DEFINE_STARTCODE[3]):((i=new Uint8Array(n.DEFINE_STARTCODE.length+e.length)).set(n.DEFINE_STARTCODE,0),i.set(e,n.DEFINE_STARTCODE.length)),i;},u.prototype.setAACAdts=function(e){var t=null,i=this.aacProfile,r=l[this.sampleRate],n=new Uint8Array(7),a=n.length+e.length;return n[0]=255,n[1]=241,n[2]=(i-1<<6)+(r<<2)+0,n[3]=128+(a>>11),n[4]=(2047&a)>>3,n[5]=31+((7&a)<<5),n[6]=252,(t=new Uint8Array(a)).set(n,0),t.set(e,n.length),t;},u.prototype.demux=function(){var e=this;e.seekPos=-1,e.mp4boxfile=r.createFile(),e.movieInfo=null,e.videoCodec=null,e.durationMs=-1,e.fps=-1,e.sampleRate=-1,e.aacProfile=2,e.size={width:-1,height:-1},e.bufObject=s(),e.audioNone=!1,e.naluHeader={vps:null,sps:null,pps:null,sei:null},e.mp4boxfile.onError=function(e){},this.mp4boxfile.onReady=function(t){for(var i in e.movieInfo=t,t.tracks){"VideoHandler"!==t.tracks[i].name&&"video"!==t.tracks[i].type||(t.tracks[i].codec,t.tracks[i].codec.indexOf("hev")>=0||t.tracks[i].codec.indexOf("hvc")>=0?e.videoCodec=o.CODEC_H265:t.tracks[i].codec.indexOf("avc")>=0&&(e.videoCodec=o.CODEC_H264));}var r=-1;if(r=t.videoTracks[0].samples_duration/t.videoTracks[0].timescale,e.durationMs=1e3*r,e.fps=t.videoTracks[0].nb_samples/r,e.seekDiffTime=1/e.fps,e.size.width=t.videoTracks[0].track_width,e.size.height=t.videoTracks[0].track_height,t.audioTracks.length>0){e.sampleRate=t.audioTracks[0].audio.sample_rate;var n=t.audioTracks[0].codec.split(".");e.aacProfile=n[n.length-1];}else e.audioNone=!0;null!=e.onMp4BoxReady&&e.onMp4BoxReady(e.videoCodec),e.videoCodec===o.CODEC_H265?(e.initializeAllSourceBuffers(),e.mp4boxfile.start()):(e.videoCodec,o.CODEC_H264);},e.mp4boxfile.onSamples=function(t,i,r){var s=window.setInterval(function(){for(var i=0;i3?e.naluHeader.sei=e.setStartCode(m[3][0].data,!1):e.naluHeader.sei=new Uint8Array(),e.naluHeader;}else e.videoCodec==o.CODEC_H264&&(e.naluHeader.vps=new Uint8Array(),e.naluHeader.sps=e.setStartCode(d.SPS[0].nalu,!1),e.naluHeader.pps=e.setStartCode(d.PPS[0].nalu,!1),e.naluHeader.sei=new Uint8Array());u[4].toString(16),e.naluHeader.vps[4].toString(16),f(e.naluHeader.vps),f(u);var b=e.setStartCode(u.subarray(0,e.naluHeader.vps.length),!0);if(f(b),u[4]===e.naluHeader.vps[4]){var v=e.naluHeader.vps.length+4,y=e.naluHeader.vps.length+e.naluHeader.sps.length+4,g=e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4;if(e.naluHeader.sei.length<=0&&e.naluHeader.sps.length>0&&u[v]===e.naluHeader.sps[4]&&e.naluHeader.pps.length>0&&u[y]===e.naluHeader.pps[4]&&78===u[g]){u[e.naluHeader.vps.length+4],e.naluHeader.sps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+4],e.naluHeader.pps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4];for(var w=0,E=0;E4&&u[4]===e.naluHeader.sei[4]){var C=u.subarray(0,10),S=new Uint8Array(e.naluHeader.vps.length+C.length);S.set(C,0),S.set(e.naluHeader.vps,C.length),S[3]=1,e.naluHeader.vps=null,e.naluHeader.vps=new Uint8Array(S),S=null,C=null,(u=u.subarray(10))[4],e.naluHeader.vps[4],e.naluHeader.vps;}else if(0===e.naluHeader.sei.length&&78===u[4]){u=e.setStartCode(u,!0);for(var j=0,T=0;T1&&void 0!==arguments[1]?arguments[1]:0;return e.fileStart=t,this.mp4boxfile.appendBuffer(e);},u.prototype.finishBuffer=function(){this.mp4boxfile.flush();},u.prototype.play=function(){},u.prototype.getVideoCoder=function(){return this.videoCodec;},u.prototype.getDurationMs=function(){return this.durationMs;},u.prototype.getFPS=function(){return this.fps;},u.prototype.getSampleRate=function(){return this.sampleRate;},u.prototype.getSize=function(){return this.size;},u.prototype.seek=function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t;}},u.prototype.popBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0;},u.prototype.addBuffer=function(e){var t=e.id;this.mp4boxfile.setExtractionOptions(t);},u.prototype.initializeAllSourceBuffers=function(){if(this.movieInfo){for(var e=this.movieInfo,t=0;t>5);}},{key:"sliceAACFrames",value:function value(e,t){for(var i=[],r=e,n=0;n>4==15){var a=this._getPktLen(t[n+3],t[n+4],t[n+5]);if(a<=0)continue;var s=t.subarray(n,n+a),o=new Uint8Array(a);o.set(s,0),i.push({ptime:r,data:o}),r+=this.frameDurSec,n+=a;}else n+=1;}return i;}}])&&r(t.prototype,i),n&&r(t,n),e;}();i.AACDecoder=n;},{}],216:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i ",e),r=null;})["catch"](function(i){console.error("_demuxerTsInit ERROR fetch ERROR ==> ",i),t._releaseOffset(),t.onDemuxedFailed&&t.onDemuxedFailed(i,e);});}},{key:"_releaseOffset",value:function value(){void 0!==this.offsetDemux&&null!==this.offsetDemux&&(n._free(this.offsetDemux),this.offsetDemux=null);}},{key:"_demuxCore",value:function value(e){this._releaseOffset(),this._refreshDemuxer(),this.offsetDemux=n._malloc(e.length),n.HEAP8.set(e,this.offsetDemux);var t=n.cwrap("demuxBox","number",["number","number","number"])(this.offsetDemux,e.length,this.isLive);n._free(this.offsetDemux),this.offsetDemux=null,t>=0&&(this._setMediaInfo(),this._setExtensionInfo(),null!=this.onDemuxed&&this.onDemuxed());}},{key:"_setMediaInfo",value:function value(){var e=n.cwrap("getMediaInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],o=n.HEAPF64[e/8+1+1],l=n.HEAPF64[e/8+1+1+1],f=n.HEAPF64[e/8+1+1+1+1],u=n.HEAPU32[e/4+2+2+2+2+2];this.mediaAttr.vFps=r,this.mediaAttr.vGop=u,this.mediaAttr.vDuration=o,this.mediaAttr.aDuration=l,this.mediaAttr.duration=f;var h=n.cwrap("getAudioCodecID","number",[])();h>=0?(this.mediaAttr.aCodec=s.CODEC_OFFSET_TABLE[h],this.mediaAttr.sampleRate=t>0?t:s.DEFAULT_SAMPLERATE,this.mediaAttr.sampleChannel=i>=0?i:s.DEFAULT_CHANNEL):(this.mediaAttr.sampleRate=0,this.mediaAttr.sampleChannel=0,this.mediaAttr.audioNone=!0);var c=n.cwrap("getVideoCodecID","number",[])();c>=0&&(this.mediaAttr.vCodec=s.CODEC_OFFSET_TABLE[c]),null==this.aacDec?this.aacDec=new a.AACDecoder(this.mediaAttr):this.aacDec.updateConfig(this.mediaAttr);}},{key:"_setExtensionInfo",value:function value(){var e=n.cwrap("getExtensionInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1];this.extensionInfo.vWidth=t,this.extensionInfo.vHeight=i;}},{key:"readMediaInfo",value:function value(){return this.mediaAttr;}},{key:"readExtensionInfo",value:function value(){return this.extensionInfo;}},{key:"readAudioNone",value:function value(){return this.mediaAttr.audioNone;}},{key:"_readLayer",value:function value(){var e={vps:null,sps:null,pps:null,sei:null},t={vlc:null},i=n.cwrap("getSPSLen","number",[])(),r=n.cwrap("getSPS","number",[])();e.sps=new Uint8Array(i),e.sps.set(n.HEAPU8.subarray(r,r+i),0);var a=n.cwrap("getPPSLen","number",[])(),o=n.cwrap("getPPS","number",[])();e.pps=new Uint8Array(a),e.pps.set(n.HEAPU8.subarray(o,o+a),0);var l=n.cwrap("getSEILen","number",[])(),f=n.cwrap("getSEI","number",[])();e.sei=new Uint8Array(l),e.sei.set(n.HEAPU8.subarray(f,f+l),0);var u=n.cwrap("getVLCLen","number",[])(),h=n.cwrap("getVLC","number",[])();if(t.vlc=new Uint8Array(u),t.vlc.set(n.HEAPU8.subarray(h,h+u),0),this.mediaAttr.vCodec==s.DEF_HEVC||this.mediaAttr.vCodec==s.DEF_H265){var c=n.cwrap("getVPSLen","number",[])(),d=n.cwrap("getVPS","number",[])();e.vps=new Uint8Array(c),e.vps.set(n.HEAPU8.subarray(d,d+c),0);}else this.mediaAttr.vCodec==s.DEF_AVC||(this.mediaAttr.vCodec,s.DEF_H264);return{nalu:e,vlc:t};}},{key:"readPacket",value:function value(){var e=n.cwrap("getPacket","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],a=n.HEAPF64[e/8+1+1],o=n.HEAPU32[e/4+1+1+2+2],l=n.HEAPU32[e/4+1+1+2+2+1],f=n.HEAPU8.subarray(l,l+i),u=this._readLayer();return{type:t,size:i,ptime:r,dtime:a,keyframe:o,src:f,data:1==t&&this.mediaAttr.aCodec==s.DEF_AAC?this.aacDec.sliceAACFrames(r,f):f,layer:u};}},{key:"_refreshDemuxer",value:function value(){this._releaseDemuxer(),this._initDemuxer();}},{key:"_initDemuxer",value:function value(){n.cwrap("initTsMissile","number",[])(),n.cwrap("initializeDemuxer","number",[])();}},{key:"_releaseDemuxer",value:function value(){n.cwrap("exitTsMissile","number",[])();}}])&&r(i.prototype,o),l&&r(i,l),e;}();i.MPEG_JS=o;}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{"../../decoder/missile.js":1,"./consts":214,"./decoder/aac":215}],217:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&e.extensionInfo.vHeight>0&&(e.size.width=e.extensionInfo.vWidth,e.size.height=e.extensionInfo.vHeight);for(var t=null;!((t=e.mpegTsObj.readPacket()).size<=0);){var i=t.dtime;if(0==t.type){var r=s.PACK_NALU(t.layer),n=1==t.keyframe;e.bufObject.appendFrame(i,r,!0,n);}else if("aac"==e.mediaInfo.aCodec)for(var a=t.data,o=0;o0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0;}},{key:"getACodec",value:function value(){return this.aCodec;}},{key:"getAudioNone",value:function value(){return this.mpegTsObj.mediaAttr.audioNone;}},{key:"getDurationMs",value:function value(){return this.durationMs;}},{key:"getFPS",value:function value(){return this.fps;}},{key:"getSampleRate",value:function value(){return this.sampleRate;}},{key:"getSize",value:function value(){return this.size;}},{key:"seek",value:function value(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t;}}}])&&r(t.prototype,i),o&&r(t,o),e;}();i.MpegTs=o;},{"../decoder/hevc-imp":207,"./buffer":209,"./mpegts/mpeg.js":216}],218:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];this.player.setScreen(e);}},{key:"play",value:function value(){if(this.playParam.videoCodec===c.CODEC_H265){var e={seekPos:this._getSeekTarget(),mode:this.playMode,accurateSeek:this.configFormat.accurateSeek,seekEvent:!1,realPlay:!0};this.player.play(e);}else this.player.play();return!0;}},{key:"pause",value:function value(){return this.player.pause(),!0;}},{key:"isPlaying",value:function value(){return this.player.isPlayingState();}},{key:"setVoice",value:function value(e){if(e<0)return!1;this.volume=e,this.player.setVoice(e);}},{key:"getVolume",value:function value(){return this.volume;}},{key:"mediaInfo",value:function value(){return{meta:this.playParam,videoType:this.playMode};}},{key:"_seekHLS",value:function value(e,t,i){setTimeout(function(){t.player.getCachePTS(),t.player.getCachePTS()>e?i():t._seekHLS(e,t,i);},100);}},{key:"seek",value:function value(e){var t=this;this.seekTarget=e,this.onSeekStart&&this.onSeekStart(e),this.timerFeed&&(window.clearInterval(this.timerFeed),this.timerFeed=null);var i=this._getSeekTarget();return this.playParam.videoCodec===c.CODEC_H264&&this.configFormat.type==c.PLAYER_IN_TYPE_MP4?(this.player.seek(e),this.onSeekFinish&&this.onSeekFinish()):this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?(this.pause(),this._seekHLS(e,this,function(){t.player.seek(function(){},{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek});})):this._seekHLS(e,this,function(){t.player.seek(function(){t.configFormat.type==c.PLAYER_IN_TYPE_MP4?t.mp4Obj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_TS||t.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?t.mpegTsObj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(t.hlsObj.onSamples=null,t.hlsObj.seek(e));var i,r=(i=0,i=t.configFormat.accurateSeek?e:t._getBoxBufSeekIDR(),parseInt(i)),n=parseInt(t._getBoxBufSeekIDR())||0;t._avFeedMP4Data(n,r);},{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek});}),!0;}},{key:"fullScreen",value:function value(){this.autoScreenClose=!0;var e=document.querySelector("#"+this.configFormat.playerId),t=e.getElementsByTagName("canvas")[0];e.style.width=this.screenW+"px",e.style.height=this.screenH+"px";var i=this._checkScreenDisplaySize(this.screenW,this.screenH,this.playParam.size.width,this.playParam.size.height);t.style.marginTop=i[0]+"px",t.style.marginLeft=i[1]+"px",t.style.width=i[2]+"px",t.style.height=i[3]+"px",this._requestFullScreen(e);}},{key:"closeFullScreen",value:function value(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!1===e&&(this.autoScreenClose=!1,this._exitFull());var t=document.querySelector("#"+this.configFormat.playerId),i=t.getElementsByTagName("canvas")[0];t.style.width=this.configFormat.playerW+"px",t.style.height=this.configFormat.playerH+"px";var r=this._checkScreenDisplaySize(this.configFormat.playerW,this.configFormat.playerH,this.playParam.size.width,this.playParam.size.height);i.style.marginTop=r[0]+"px",i.style.marginLeft=r[1]+"px",i.style.width=r[2]+"px",i.style.height=r[3]+"px";}},{key:"_checkScreenDisplaySize",value:function value(e,t,i,r){var n=i/e>r/t,a=(e/i).toFixed(2),s=(t/r).toFixed(2),o=n?a:s,l=this.fixed?e:parseInt(i*o),f=this.fixed?t:parseInt(r*o);return[parseInt((t-f)/2),parseInt((e-l)/2),l,f];}},{key:"_isFullScreen",value:function value(){var e=document.fullscreenElement||document.mozFullscreenElement||document.webkitFullscreenElement;return document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled,null!=e;}},{key:"_requestFullScreen",value:function value(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullScreen();}},{key:"_exitFull",value:function value(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen();}},{key:"_durationText",value:function value(e){if(e<0)return"Play";var t=Math.round(e);return Math.floor(t/3600)+":"+Math.floor(t%3600/60)+":"+Math.floor(t%60);}},{key:"_getSeekTarget",value:function value(){return this.configFormat.accurateSeek?this.seekTarget:this._getBoxBufSeekIDR();}},{key:"_getBoxBufSeekIDR",value:function value(){return this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.mp4Obj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this.mpegTsObj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this.hlsObj.seekPos:void 0;}},{key:"_playControl",value:function value(){this.isPlaying()?this.pause():this.play();}},{key:"_avFeedMP4Data",value:function value(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=parseInt(this.playParam.durationMs/1e3);this.player.clearAllCache(),this.timerFeed=window.setInterval(function(){var a=null,s=null,o=!0,l=!0;if(e.configFormat.type==c.PLAYER_IN_TYPE_MP4?(a=e.mp4Obj.popBuffer(1,t),s=e.mp4Obj.audioNone?null:e.mp4Obj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_TS||e.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?(a=e.mpegTsObj.popBuffer(1,t),s=e.mpegTsObj.getAudioNone()?null:e.mpegTsObj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(a=e.hlsObj.popBuffer(1,t),s=e.hlsObj.audioNone?null:e.hlsObj.popBuffer(2,i),t=e.hlsObj.getLastIdx()&&(o=!1),i=e.hlsObj.getALastIdx()&&(l=!1)),!0===o&&null!=a)for(var f=0;fn)return window.clearInterval(e.timerFeed),e.timerFeed=null,e.player.vCachePTS,e.player.aCachePTS,void(null!=r&&r());},5);}},{key:"_makeMP4Player",value:function value(){null!=this.configFormat.extInfo.core&&null!==this.configFormat.extInfo.core&&this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?this._cDemuxDecoderEntry():this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.configFormat.extInfo.moovStartFlag?this._mp4EntryVodStream():this._mp4Entry():this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this._mpegTsEntry():this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this._m3u8Entry():this.configFormat.type===c.PLAYER_IN_TYPE_RAW_265&&this._raw265Entry();}},{key:"_makeMP4PlayerViewEvent",value:function value(e,t,i,r){var a=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=this;if(this.playParam.durationMs=e,this.playParam.fps=t,this.playParam.sampleRate=i,this.playParam.size=r,this.playParam.audioNone=s,this.playParam.videoCodec=o||c.CODEC_H265,this.playParam,(this.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&this.hlsConf.hlsType==c.PLAYER_IN_TYPE_M3U8_LIVE||this.configFormat.type==c.PLAYER_IN_TYPE_RAW_265)&&(this.playMode=c.PLAYER_MODE_NOTIME_LIVE),l.configFormat.extInfo.autoCrop){var f=document.querySelector("#"+this.configFormat.playerId),u=r.width/r.height,h=this.configFormat.playerW/this.configFormat.playerH;u>h?f.style.height=this.configFormat.playerW/u+"px":u>1,a>>1,i),e.v.fill(n>>1,a>>1,r),e.drawArrays(e.TRIANGLE_STRIP,0,4);},setupCanvas:function setupCanvas(e,t){var i=e.getContext("webgl")||e.getContext("experimental-webgl");if(!i)return i;var n=i.createProgram(),a=["attribute highp vec4 aVertexPosition;","attribute vec2 aTextureCoord;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = aVertexPosition;"," vTextureCoord = aTextureCoord;","}"].join("\n"),s=i.createShader(i.VERTEX_SHADER);i.shaderSource(s,a),i.compileShader(s);var o=["precision highp float;","varying lowp vec2 vTextureCoord;","uniform sampler2D YTexture;","uniform sampler2D UTexture;","uniform sampler2D VTexture;","const mat4 YUV2RGB = mat4","("," 1.1643828125, 0, 1.59602734375, -.87078515625,"," 1.1643828125, -.39176171875, -.81296875, .52959375,"," 1.1643828125, 2.017234375, 0, -1.081390625,"," 0, 0, 0, 1",");","void main(void) {"," gl_FragColor = vec4( texture2D(YTexture, vTextureCoord).x, texture2D(UTexture, vTextureCoord).x, texture2D(VTexture, vTextureCoord).x, 1) * YUV2RGB;","}"].join("\n"),l=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(l,o),i.compileShader(l),i.attachShader(n,s),i.attachShader(n,l),i.linkProgram(n),i.useProgram(n),i.getProgramParameter(n,i.LINK_STATUS);var f=i.getAttribLocation(n,"aVertexPosition");i.enableVertexAttribArray(f);var u=i.getAttribLocation(n,"aTextureCoord");i.enableVertexAttribArray(u);var h=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,h),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0]),i.STATIC_DRAW),i.vertexAttribPointer(f,3,i.FLOAT,!1,0,0);var c=i.createBuffer();return i.bindBuffer(i.ARRAY_BUFFER,c),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),i.STATIC_DRAW),i.vertexAttribPointer(u,2,i.FLOAT,!1,0,0),i.y=new r(i),i.u=new r(i),i.v=new r(i),i.y.bind(0,n,"YTexture"),i.u.bind(1,n,"UTexture"),i.v.bind(2,n,"VTexture"),i;}};},{}],221:[function(e,t,i){(function(e){"use strict";e.STATIC_MEM_wasmDecoderState=-1,e.STATICE_MEM_playerCount=-1,e.STATICE_MEM_playerIndexPtr=0;}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{}],222:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i1&&(m=i.argv[1].replace(/\\/g,"/")),p=i.argv.slice(2),void 0!==t&&(t.exports=d),i.on("uncaughtException",(function(e){if(!(e instanceof Sa))throw e})),i.on("unhandledRejection",at),b=function(e){i.exit(e)},d.inspect=function(){return"[Emscripten Module object]"};else if(E)"undefined"!=typeof read&&(C=function(e){return read(e)}),S=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(X("object"===u(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?p=scriptArgs:void 0!==arguments&&(p=arguments),"function"==typeof quit&&(b=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print);else{if(!v&&!y)throw new Error("environment detection error");y?A=self.location.href:document.currentScript&&(A=document.currentScript.src),A=0!==A.indexOf("blob:")?A.substr(0,A.lastIndexOf("/")+1):"",C=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},y&&(S=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),function(e,t,i){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):i()},r.onerror=i,r.send(null)},function(e){document.title=e}}var M=d.print||console.log.bind(console),k=d.printErr||console.warn.bind(console);for(c in _)_.hasOwnProperty(c)&&(d[c]=_[c]);function P(e){X(Te);var t=pe[Te>>2],i=t+e+15&-16;return i>ei()&&at("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly"),pe[Te>>2]=i,t}function I(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 X(t%8==0,"getNativeTypeSize invalid bits "+t+", type "+e),t/8}return 0}}function R(e){R.shown||(R.shown={}),R.shown[e]||(R.shown[e]=1,k(e))}_=null,d.arguments&&(p=d.arguments),Object.getOwnPropertyDescriptor(d,"arguments")||Object.defineProperty(d,"arguments",{configurable:!0,get:function(){at("Module.arguments has been replaced with plain arguments_")}}),d.thisProgram&&(m=d.thisProgram),Object.getOwnPropertyDescriptor(d,"thisProgram")||Object.defineProperty(d,"thisProgram",{configurable:!0,get:function(){at("Module.thisProgram has been replaced with plain thisProgram")}}),d.quit&&(b=d.quit),Object.getOwnPropertyDescriptor(d,"quit")||Object.defineProperty(d,"quit",{configurable:!0,get:function(){at("Module.quit has been replaced with plain quit_")}}),X(void 0===d.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),X(void 0===d.read,"Module.read option was removed (modify read_ in JS)"),X(void 0===d.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),X(void 0===d.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),X(void 0===d.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),Object.getOwnPropertyDescriptor(d,"read")||Object.defineProperty(d,"read",{configurable:!0,get:function(){at("Module.read has been replaced with plain read_")}}),Object.getOwnPropertyDescriptor(d,"readAsync")||Object.defineProperty(d,"readAsync",{configurable:!0,get:function(){at("Module.readAsync has been replaced with plain readAsync")}}),Object.getOwnPropertyDescriptor(d,"readBinary")||Object.defineProperty(d,"readBinary",{configurable:!0,get:function(){at("Module.readBinary has been replaced with plain readBinary")}}),Ea=wa=ga=function(){at("cannot use the stack before compiled code is ready to run, and has provided stack access")};var U={"f64-rem":function(e,t){return e%t},debugger:function(){}},D=1,F=new Array(35);function O(e,t){X(void 0!==e);for(var i=0;i<35;i++)if(!F[i])return F[i]=e,D+i;throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."}var L,B,N,z=0,H=function(){return z};function V(e,t,i,r){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":ce[e>>0]=t;break;case"i16":de[e>>1]=t;break;case"i32":pe[e>>2]=t;break;case"i64":ft=[t>>>0,(lt=t,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[e>>2]=ft[0],pe[e+4>>2]=ft[1];break;case"float":be[e>>2]=t;break;case"double":ve[e>>3]=t;break;default:at("invalid type for setValue: "+i)}}d.wasmBinary&&(L=d.wasmBinary),Object.getOwnPropertyDescriptor(d,"wasmBinary")||Object.defineProperty(d,"wasmBinary",{configurable:!0,get:function(){at("Module.wasmBinary has been replaced with plain wasmBinary")}}),d.noExitRuntime&&(B=d.noExitRuntime),Object.getOwnPropertyDescriptor(d,"noExitRuntime")||Object.defineProperty(d,"noExitRuntime",{configurable:!0,get:function(){at("Module.noExitRuntime has been replaced with plain noExitRuntime")}}),"object"!==("undefined"==typeof WebAssembly?"undefined":u(WebAssembly))&&at("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Y=new WebAssembly.Table({initial:4416,element:"anyfunc"}),q=!1;function X(e,t){e||at("Assertion failed: "+t)}function W(e){var t=d["_"+e];return X(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function G(e,t,i,r,n){var a={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);ne(e,t=ga(i),i)}return t},array:function(e){var t=ga(e.length);return le(e,t),t}};var s=W(e),o=[],l=0;if(X("array"!==t,'Return type should not be "array".'),r)for(var f=0;f>2]=0;for(l=s+a;r>0]=0;return s}if("i8"===o)return e.subarray||e.slice?he.set(e,s):he.set(new Uint8Array(e),s),s;for(var f,u,c,h=0;h=r);)++n;if(n-t>16&&e.subarray&&ee)return ee.decode(e.subarray(t,n));for(var a="";t>10,56320|1023&f)}}else a+=String.fromCharCode((31&s)<<6|o)}else a+=String.fromCharCode(s)}return a}function ie(e,t){return e?te(he,e,t):""}function re(e,t,i,r){if(!(r>0))return 0;for(var n=i,a=i+r-1,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(o<=127){if(i>=a)break;t[i++]=o}else if(o<=2047){if(i+1>=a)break;t[i++]=192|o>>6,t[i++]=128|63&o}else if(o<=65535){if(i+2>=a)break;t[i++]=224|o>>12,t[i++]=128|o>>6&63,t[i++]=128|63&o}else{if(i+3>=a)break;o>=2097152&&R("Invalid Unicode code point 0x"+o.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[i++]=240|o>>18,t[i++]=128|o>>12&63,t[i++]=128|o>>6&63,t[i++]=128|63&o}}return t[i]=0,i-n}function ne(e,t,i){return X("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),re(e,he,t,i)}function ae(e){for(var t=0,i=0;i=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++i)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function se(e){var t=ae(e)+1,i=ya(t);return i&&re(e,ce,i,t),i}function oe(e){var t=ae(e)+1,i=ga(t);return re(e,ce,i,t),i}function le(e,t){X(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),ce.set(e,t)}function fe(e,t,i){for(var r=0;r>0]=e.charCodeAt(r);i||(ce[t>>0]=0)}var ue,ce,he,de,_e,pe,me,be,ve,ye=16384,ge=65536;function we(e,t){return e%t>0&&(e+=t-e%t),e}function Ee(e){ue=e,d.HEAP8=ce=new Int8Array(e),d.HEAP16=de=new Int16Array(e),d.HEAP32=pe=new Int32Array(e),d.HEAPU8=he=new Uint8Array(e),d.HEAPU16=_e=new Uint16Array(e),d.HEAPU32=me=new Uint32Array(e),d.HEAPF32=be=new Float32Array(e),d.HEAPF64=ve=new Float64Array(e)}var Ce=1127120,Se=637e4,je=637e4,Te=1126896;X(Ce%16==0,"stack must start aligned"),X(je%16==0,"heap must start aligned");var Ae=5242880;d.TOTAL_STACK&&X(Ae===d.TOTAL_STACK,"the stack size can no longer be determined at runtime");var xe=d.TOTAL_MEMORY||1073741824;function Me(){X(0==(3&Se)),me[(Se>>2)-1]=34821223,me[(Se>>2)-2]=2310721022,pe[0]=1668509029}function ke(){var e=me[(Se>>2)-1],t=me[(Se>>2)-2];34821223==e&&2310721022==t||at("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==pe[0]&&at("Runtime error: The application has corrupted its heap memory area (address zero)!")}function Pe(e){at("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(Se-Ea()+e)+" bytes available!")}function Ie(e,t){var i="";for(var r in kr){var n=kr[r];n[e]&&(i+='as sig "'+r+'" pointing to function '+n[e]+", ")}at("Invalid function pointer "+e+" called with signature '"+t+"'. 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). This pointer might make sense in another type signature: "+i)}function Re(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?d.dynCall_v(i):d.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}}Object.getOwnPropertyDescriptor(d,"TOTAL_MEMORY")||Object.defineProperty(d,"TOTAL_MEMORY",{configurable:!0,get:function(){at("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY")}}),X(xe>=Ae,"TOTAL_MEMORY should be larger than TOTAL_STACK, was "+xe+"! (TOTAL_STACK="+Ae+")"),X("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"),(N=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:xe/ge}))&&(ue=N.buffer),X((xe=ue.byteLength)%ge==0),Ee(ue),pe[Te>>2]=je,function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!"}();var Ue=[],De=[],Fe=[],Oe=[],Le=!1,Be=!1;function Ne(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)qe(d.preRun.shift());Re(Ue)}function ze(){ke(),X(!Le),Le=!0,d.noFSInit||Ut.init.initialized||Ut.init(),At.init(),Re(De)}function He(){ke(),Ut.ignorePermissions=!1,Re(Fe)}function Ve(){ke(),Be=!0}function Ye(){if(ke(),d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)Xe(d.postRun.shift());Re(Oe)}function qe(e){Ue.unshift(e)}function Xe(e){Oe.unshift(e)}X(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),X(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),X(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),X(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var We=Math.abs,Ge=Math.ceil,Ke=Math.floor,Qe=Math.min,Ze=Math.trunc,Je=0,$e=null,et=null,tt={};function it(e){for(var t=e;;){if(!tt[e])return e;e=t+Math.random()}return e}function rt(e){Je++,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(X(!tt[e]),tt[e]=1,null===$e&&"undefined"!=typeof setInterval&&($e=setInterval((function(){if(q)return clearInterval($e),void($e=null);var e=!1;for(var t in tt)e||(e=!0,k("still waiting on run dependencies:")),k("dependency: "+t);e&&k("(end of list)")}),1e4))):k("warning: run dependency added without ID")}function nt(e){if(Je--,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(X(tt[e]),delete tt[e]):k("warning: run dependency removed without ID"),0==Je&&(null!==$e&&(clearInterval($e),$e=null),et)){var t=et;et=null,t()}}function at(e){d.onAbort&&d.onAbort(e),M(e+=""),k(e),q=!0,1;throw"abort("+e+") at "+gt()}d.preloadedImages={},d.preloadedAudios={},h||qe((function(){"undefined"!=typeof SharedArrayBuffer&&(rt("pthreads"),PThread.allocateUnusedWorkers(5,(function(){nt("pthreads")})))}));var st="data:application/octet-stream;base64,";function ot(e){return String.prototype.startsWith?e.startsWith(st):0===e.indexOf(st)}var lt,ft,ut="missile-v20210925.wasm";function ct(){try{if(L)return new Uint8Array(L);if(S)return S(ut);throw"both async and sync fetching of the wasm failed"}catch(e){at(e)}}function ht(){return L||!v&&!y||"function"!=typeof fetch?new Promise((function(e,t){e(ct())})):fetch(ut,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ut+"'";return e.arrayBuffer()})).catch((function(){return ct()}))}function dt(){var e={env:ca,wasi_unstable:ca,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:U};function t(e,t){var i=e.exports;d.asm=i,nt("wasm-instantiate")}rt("wasm-instantiate");var i=d;function r(e){X(d===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance)}function n(t){return ht().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){k("failed to asynchronously prepare wasm: "+e),at(e)}))}if(d.instantiateWasm)try{return d.instantiateWasm(e,t)}catch(e){return k("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(L||"function"!=typeof WebAssembly.instantiateStreaming||ot(ut)||"function"!=typeof fetch)return n(r);fetch(ut,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){k("wasm streaming compile failed: "+e),k("falling back to ArrayBuffer instantiation"),n(r)}))}))}(),{}}ot(ut)||(ut=x(ut)),d.asm=dt;var _t=[function(){"undefined"!=typeof window?window.dispatchEvent(new CustomEvent("wasmLoaded")):r.onWASMLoaded&&r.onWASMLoaded()}];function pt(e){return _t[e]()}De.push({func:function(){_a()}});var mt=1127104;function bt(e){return R("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function vt(e){return e.replace(/\b__Z[\w\d_]+/g,(function(e){var t=bt(e);return e===t?e:t+" ["+e+"]"}))}function yt(){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 gt(){var e=yt();return d.extraStackTrace&&(e+="\n"+d.extraStackTrace()),vt(e)}X(mt%8==0);var wt={};function Et(e){var t,i;Et.called?(i=pe[e>>2],t=pe[i>>2]):(Et.called=!0,wt.USER="web_user",wt.LOGNAME="web_user",wt.PATH="/",wt.PWD="/",wt.HOME="/home/web_user",wt.LANG=("object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",wt._=m,t=$(1024),i=$(256),pe[i>>2]=t,pe[e>>2]=i);var r=[],n=0;for(var a in wt)if("string"==typeof wt[a]){var s=a+"="+wt[a];r.push(s),n+=s.length}if(n>1024)throw new Error("Environment size exceeded TOTAL_ENV_SIZE!");for(var o=0;o>2]=t,t+=s.length+1}pe[i+4*r.length>>2]=0}function Ct(){}function St(e){return d.___errno_location?pe[d.___errno_location()>>2]=e:k("failed to set errno from JS"),e}var jt={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i;i--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),i="/"===e.substr(-1);return(e=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&i&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=jt.splitPath(e),i=t[0],r=t[1];return i||r?(r&&(r=r.substr(0,r.length-1)),i+r):"."},basename:function(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return jt.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return jt.normalize(e.join("/"))},join2:function(e,t){return jt.normalize(e+"/"+t)}},Tt={resolve:function(){for(var e="",t=!1,i=arguments.length-1;i>=-1&&!t;i--){var r=i>=0?arguments[i]:Ut.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t="/"===r.charAt(0)}return(t?"/":"")+(e=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function i(e){for(var t=0;t=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=Tt.resolve(e).substr(1),t=Tt.resolve(t).substr(1);for(var r=i(e.split("/")),n=i(t.split("/")),a=Math.min(r.length,n.length),s=a,o=0;o0?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=Ni(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(M(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(M(te(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(k(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(k(te(e.output,0)),e.output=[])}}},xt={ops_table:null,mount:function(e){return xt.createNode(null,"/",16895,0)},createNode:function(e,t,i,r){if(Ut.isBlkdev(i)||Ut.isFIFO(i))throw new Ut.ErrnoError(63);xt.ops_table||(xt.ops_table={dir:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,lookup:xt.node_ops.lookup,mknod:xt.node_ops.mknod,rename:xt.node_ops.rename,unlink:xt.node_ops.unlink,rmdir:xt.node_ops.rmdir,readdir:xt.node_ops.readdir,symlink:xt.node_ops.symlink},stream:{llseek:xt.stream_ops.llseek}},file:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:{llseek:xt.stream_ops.llseek,read:xt.stream_ops.read,write:xt.stream_ops.write,allocate:xt.stream_ops.allocate,mmap:xt.stream_ops.mmap,msync:xt.stream_ops.msync}},link:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,readlink:xt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:Ut.chrdev_stream_ops}});var n=Ut.createNode(e,t,i,r);return Ut.isDir(n.mode)?(n.node_ops=xt.ops_table.dir.node,n.stream_ops=xt.ops_table.dir.stream,n.contents={}):Ut.isFile(n.mode)?(n.node_ops=xt.ops_table.file.node,n.stream_ops=xt.ops_table.file.stream,n.usedBytes=0,n.contents=null):Ut.isLink(n.mode)?(n.node_ops=xt.ops_table.link.node,n.stream_ops=xt.ops_table.link.stream):Ut.isChrdev(n.mode)&&(n.node_ops=xt.ops_table.chrdev.node,n.stream_ops=xt.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=[],i=0;i=t)){t=Math.max(t,i*(i<1048576?2:1.125)|0),0!=i&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),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 i=e.contents;return e.contents=new Uint8Array(new ArrayBuffer(t)),i&&e.contents.set(i.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=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-n,r);if(X(s>=0),s>8&&a.subarray)t.set(a.subarray(n,n+s),i);else for(var o=0;o0||n+rs.timestamp)&&(n.push(i),r++)}));var a=[];if(Object.keys(t.entries).forEach((function(i){t.entries[i];e.entries[i]||(a.push(i),r++)})),!r)return i(null);var s=!1,o=("remote"===e.type?e.db:t.db).transaction([Mt.DB_STORE_NAME],"readwrite"),l=o.objectStore(Mt.DB_STORE_NAME);function f(e){if(e&&!s)return s=!0,i(e)}o.onerror=function(e){f(this.error),e.preventDefault()},o.oncomplete=function(e){s||i(null)},n.sort().forEach((function(e){"local"===t.type?Mt.loadRemoteEntry(l,e,(function(t,i){if(t)return f(t);Mt.storeLocalEntry(e,i,f)})):Mt.loadLocalEntry(e,(function(t,i){if(t)return f(t);Mt.storeRemoteEntry(l,e,i,f)}))})),a.sort().reverse().forEach((function(e){"local"===t.type?Mt.removeLocalEntry(e,f):Mt.removeRemoteEntry(l,e,f)}))}},kt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Pt={isWindows:!1,staticInit:function(){Pt.isWindows=!!i.platform.match(/^win/);var e=i.binding("constants");e.fs&&(e=e.fs),Pt.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)},convertNodeCode:function(e){var t=e.code;return X(t in kt),kt[t]},mount:function(e){return X(w),Pt.createNode(null,"/",Pt.getMode(e.opts.root),0)},createNode:function(e,t,i,r){if(!Ut.isDir(i)&&!Ut.isFile(i)&&!Ut.isLink(i))throw new Ut.ErrnoError(28);var n=Ut.createNode(e,t,i);return n.node_ops=Pt.node_ops,n.stream_ops=Pt.stream_ops,n},getMode:function(e){var t;try{t=Li.lstatSync(e),Pt.isWindows&&(t.mode=t.mode|(292&t.mode)>>2)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}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(),jt.join.apply(null,t)},flagsForNode:function(e){e&=-2097153,e&=-2049,e&=-32769,e&=-524289;var t=0;for(var i in Pt.flagsForNodeMap)e&i&&(t|=Pt.flagsForNodeMap[i],e^=i);if(e)throw new Ut.ErrnoError(28);return t},node_ops:{getattr:function(e){var t,i=Pt.realPath(e);try{t=Li.lstatSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}return Pt.isWindows&&!t.blksize&&(t.blksize=4096),Pt.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 i=Pt.realPath(e);try{if(void 0!==t.mode&&(Li.chmodSync(i,t.mode),e.mode=t.mode),void 0!==t.timestamp){var r=new Date(t.timestamp);Li.utimesSync(i,r,r)}void 0!==t.size&&Li.truncateSync(i,t.size)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},lookup:function(e,t){var i=jt.join2(Pt.realPath(e),t),r=Pt.getMode(i);return Pt.createNode(e,t,r)},mknod:function(e,t,i,r){var n=Pt.createNode(e,t,i,r),a=Pt.realPath(n);try{Ut.isDir(n.mode)?Li.mkdirSync(a,n.mode):Li.writeFileSync(a,"",{mode:n.mode})}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}return n},rename:function(e,t,i){var r=Pt.realPath(e),n=jt.join2(Pt.realPath(t),i);try{Li.renameSync(r,n)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},unlink:function(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.unlinkSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},rmdir:function(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.rmdirSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},readdir:function(e){var t=Pt.realPath(e);try{return Li.readdirSync(t)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},symlink:function(e,t,i){var r=jt.join2(Pt.realPath(e),t);try{Li.symlinkSync(i,r)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},readlink:function(e){var t=Pt.realPath(e);try{return t=Li.readlinkSync(t),t=Bi.relative(Bi.resolve(e.mount.opts.root),t)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}}},stream_ops:{open:function(e){var t=Pt.realPath(e.node);try{Ut.isFile(e.node.mode)&&(e.nfd=Li.openSync(t,Pt.flagsForNode(e.flags)))}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},close:function(e){try{Ut.isFile(e.node.mode)&&e.nfd&&Li.closeSync(e.nfd)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},read:function(e,t,i,r,n){if(0===r)return 0;try{return Li.readSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n)}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},write:function(e,t,i,r,n){try{return Li.writeSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n)}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},llseek:function(e,t,i){var r=t;if(1===i)r+=e.position;else if(2===i&&Ut.isFile(e.node.mode))try{r+=Li.fstatSync(e.nfd).size}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}if(r<0)throw new Ut.ErrnoError(28);return r}}},It={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(e){X(y),It.reader||(It.reader=new FileReaderSync);var t=It.createNode(null,"/",It.DIR_MODE,0),i={};function r(e){for(var r=e.split("/"),n=t,a=0;a=e.node.size)return 0;var a=e.node.contents.slice(n,n+r),s=It.reader.readAsArrayBuffer(a);return t.set(new Uint8Array(s),i),a.size},write:function(e,t,i,r,n){throw new Ut.ErrnoError(29)},llseek:function(e,t,i){var r=t;if(1===i?r+=e.position:2===i&&Ut.isFile(e.node.mode)&&(r+=e.node.size),r<0)throw new Ut.ErrnoError(28);return r}}},Rt={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Ut={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 Ut.ErrnoError))throw e+" : "+gt();return St(e.errno)},lookupPath:function(e,t){if(t=t||{},!(e=Tt.resolve(Ut.cwd(),e)))return{path:"",node:null};var i={follow_mount:!0,recurse_count:0};for(var r in i)void 0===t[r]&&(t[r]=i[r]);if(t.recurse_count>8)throw new Ut.ErrnoError(32);for(var n=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),a=Ut.root,s="/",o=0;o40)throw new Ut.ErrnoError(32)}}return{path:s,node:a}},getPath:function(e){for(var t;;){if(Ut.isRoot(e)){var i=e.mount.mountpoint;return t?"/"!==i[i.length-1]?i+"/"+t:i+t:i}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var i=0,r=0;r>>0)%Ut.nameTable.length},hashAddNode:function(e){var t=Ut.hashName(e.parent.id,e.name);e.name_next=Ut.nameTable[t],Ut.nameTable[t]=e},hashRemoveNode:function(e){var t=Ut.hashName(e.parent.id,e.name);if(Ut.nameTable[t]===e)Ut.nameTable[t]=e.name_next;else for(var i=Ut.nameTable[t];i;){if(i.name_next===e){i.name_next=e.name_next;break}i=i.name_next}},lookupNode:function(e,t){var i=Ut.mayLookup(e);if(i)throw new Ut.ErrnoError(i,e);for(var r=Ut.hashName(e.id,t),n=Ut.nameTable[r];n;n=n.name_next){var a=n.name;if(n.parent.id===e.id&&a===t)return n}return Ut.lookup(e,t)},createNode:function(e,t,i,r){if(!Ut.FSNode){Ut.FSNode=function(e,t,i,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ut.nextInode++,this.name=t,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=r},Ut.FSNode.prototype={};Object.defineProperties(Ut.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 Ut.isDir(this.mode)}},isDevice:{get:function(){return Ut.isChrdev(this.mode)}}})}var n=new Ut.FSNode(e,t,i,r);return Ut.hashAddNode(n),n},destroyNode:function(e){Ut.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=Ut.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 Ut.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){var t=Ut.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{Ut.lookupNode(e,t);return 20}catch(e){}return Ut.nodePermissions(e,"wx")},mayDelete:function(e,t,i){var r;try{r=Ut.lookupNode(e,t)}catch(e){return e.errno}var n=Ut.nodePermissions(e,"wx");if(n)return n;if(i){if(!Ut.isDir(r.mode))return 54;if(Ut.isRoot(r)||Ut.getPath(r)===Ut.cwd())return 10}else if(Ut.isDir(r.mode))return 31;return 0},mayOpen:function(e,t){return e?Ut.isLink(e.mode)?32:Ut.isDir(e.mode)&&("r"!==Ut.flagsToPermissionString(t)||512&t)?31:Ut.nodePermissions(e,Ut.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||Ut.MAX_OPEN_FDS;for(var i=e;i<=t;i++)if(!Ut.streams[i])return i;throw new Ut.ErrnoError(33)},getStream:function(e){return Ut.streams[e]},createStream:function(e,t,i){Ut.FSStream||(Ut.FSStream=function(){},Ut.FSStream.prototype={},Object.defineProperties(Ut.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 r=new Ut.FSStream;for(var n in e)r[n]=e[n];e=r;var a=Ut.nextfd(t,i);return e.fd=a,Ut.streams[a]=e,e},closeStream:function(e){Ut.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=Ut.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new Ut.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){Ut.devices[e]={stream_ops:t}},getDevice:function(e){return Ut.devices[e]},getMounts:function(e){for(var t=[],i=[e];i.length;){var r=i.pop();t.push(r),i.push.apply(i,r.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),Ut.syncFSRequests++,Ut.syncFSRequests>1&&Ut.syncFSRequests;var i=Ut.getMounts(Ut.root.mount),r=0;function n(e){return X(Ut.syncFSRequests>0),Ut.syncFSRequests--,t(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,n(e));++r>=i.length&&n(null)}i.forEach((function(t){if(!t.type.syncfs)return a(null);t.type.syncfs(t,e,a)}))},mount:function(e,t,i){var r,n="/"===i,a=!i;if(n&&Ut.root)throw new Ut.ErrnoError(10);if(!n&&!a){var s=Ut.lookupPath(i,{follow_mount:!1});if(i=s.path,r=s.node,Ut.isMountpoint(r))throw new Ut.ErrnoError(10);if(!Ut.isDir(r.mode))throw new Ut.ErrnoError(54)}var o={type:e,opts:t,mountpoint:i,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,n?Ut.root=l:r&&(r.mounted=o,r.mount&&r.mount.mounts.push(o)),l},unmount:function(e){var t=Ut.lookupPath(e,{follow_mount:!1});if(!Ut.isMountpoint(t.node))throw new Ut.ErrnoError(28);var i=t.node,r=i.mounted,n=Ut.getMounts(r);Object.keys(Ut.nameTable).forEach((function(e){for(var t=Ut.nameTable[e];t;){var i=t.name_next;-1!==n.indexOf(t.mount)&&Ut.destroyNode(t),t=i}})),i.mounted=null;var a=i.mount.mounts.indexOf(r);X(-1!==a),i.mount.mounts.splice(a,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,i){var r=Ut.lookupPath(e,{parent:!0}).node,n=jt.basename(e);if(!n||"."===n||".."===n)throw new Ut.ErrnoError(28);var a=Ut.mayCreate(r,n);if(a)throw new Ut.ErrnoError(a);if(!r.node_ops.mknod)throw new Ut.ErrnoError(63);return r.node_ops.mknod(r,n,t,i)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Ut.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Ut.mknod(e,t,0)},mkdirTree:function(e,t){for(var i=e.split("/"),r="",n=0;nthis.length-1||e<0)){var t=e%this.chunkSize,i=e/this.chunkSize|0;return this.getter(i)[t]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,s=1048576;n||(s=r);var o=this;o.setDataGetter((function(e){var t=e*s,n=(e+1)*s-1;if(n=Math.min(n,r-1),void 0===o.chunks[e]&&(o.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",i,!1),r!==s&&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 "+i+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):Ni(n.responseText||"",!0)}(t,n)),void 0===o.chunks[e])throw new Error("doXHR failed!");return o.chunks[e]})),!a&&r||(s=r=1,r=this.getter(0).length,s=r),this._length=r,this._chunkSize=s,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!y)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var o={isDevice:!1,contents:s}}else o={isDevice:!1,url:i};var l=Ut.createFile(e,t,o,r,n);o.contents?l.contents=o.contents:o.url&&(l.contents=null,l.url=o.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var f={};return Object.keys(l.stream_ops).forEach((function(e){var t=l.stream_ops[e];f[e]=function(){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);return t.apply(null,arguments)}})),f.read=function(e,t,i,r,n){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);var a=e.node.contents;if(n>=a.length)return 0;var s=Math.min(a.length-n,r);if(X(s>=0),a.slice)for(var o=0;o>2]=r.dev,pe[i+4>>2]=0,pe[i+8>>2]=r.ino,pe[i+12>>2]=r.mode,pe[i+16>>2]=r.nlink,pe[i+20>>2]=r.uid,pe[i+24>>2]=r.gid,pe[i+28>>2]=r.rdev,pe[i+32>>2]=0,ft=[r.size>>>0,(lt=r.size,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+40>>2]=ft[0],pe[i+44>>2]=ft[1],pe[i+48>>2]=4096,pe[i+52>>2]=r.blocks,pe[i+56>>2]=r.atime.getTime()/1e3|0,pe[i+60>>2]=0,pe[i+64>>2]=r.mtime.getTime()/1e3|0,pe[i+68>>2]=0,pe[i+72>>2]=r.ctime.getTime()/1e3|0,pe[i+76>>2]=0,ft=[r.ino>>>0,(lt=r.ino,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+80>>2]=ft[0],pe[i+84>>2]=ft[1],0},doMsync:function(e,t,i,r){var n=new Uint8Array(he.subarray(e,e+i));Ut.msync(t,n,0,i,r)},doMkdir:function(e,t){return"/"===(e=jt.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),Ut.mkdir(e,t,0),0},doMknod:function(e,t,i){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Ut.mknod(e,t,i),0},doReadlink:function(e,t,i){if(i<=0)return-28;var r=Ut.readlink(e),n=Math.min(i,ae(r)),a=ce[t+n];return ne(r,t,i+1),ce[t+n]=a,n},doAccess:function(e,t){if(-8&t)return-28;var i;if(!(i=Ut.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&Ut.nodePermissions(i,r)?-2:0},doDup:function(e,t,i){var r=Ut.getStream(i);return r&&Ut.close(r),Ut.open(e,t,0,i,i).fd},doReadv:function(e,t,i,r){for(var n=0,a=0;a>2],o=pe[t+(8*a+4)>>2],l=Ut.read(e,ce,s,o,r);if(l<0)return-1;if(n+=l,l>2],o=pe[t+(8*a+4)>>2],l=Ut.write(e,ce,s,o,r);if(l<0)return-1;n+=l}return n},varargs:0,get:function(e){return Dt.varargs+=4,pe[Dt.varargs-4>>2]},getStr:function(){return ie(Dt.get())},getStreamFromFD:function(e){void 0===e&&(e=Dt.get());var t=Ut.getStream(e);if(!t)throw new Ut.ErrnoError(8);return t},get64:function(){var e=Dt.get(),t=Dt.get();return X(e>=0?0===t:-1===t),e},getZero:function(){X(0===Dt.get())}};function Ft(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD();switch(Dt.get()){case 0:return(r=Dt.get())<0?-28:Ut.open(i.path,i.flags,0,r).fd;case 1:case 2:return 0;case 3:return i.flags;case 4:var r=Dt.get();return i.flags|=r,0;case 12:r=Dt.get();return de[r+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return St(28),-1;default:return-28}}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Ot(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD(),r=Dt.get(),n=Dt.get();return Ut.read(i,ce,r,n)}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Lt(e,t){Dt.varargs=t;try{var i=Dt.getStr(),r=Dt.get(),n=Dt.get();return Ut.open(i,r,n).fd}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Bt(){}function Nt(e){try{var t=Dt.getStreamFromFD(e);return Ut.close(t),0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function zt(){return Nt.apply(null,arguments)}function Ht(e,t){try{var i=Dt.getStreamFromFD(e),r=i.tty?2:Ut.isDir(i.mode)?3:Ut.isLink(i.mode)?7:4;return ce[t>>0]=r,0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function Vt(){return Ht.apply(null,arguments)}function Yt(e,t,i,r,n){try{var a=Dt.getStreamFromFD(e),s=4294967296*i+(t>>>0);return s<=-9007199254740992||s>=9007199254740992?-61:(Ut.llseek(a,s,r),ft=[a.position>>>0,(lt=a.position,+We(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[n>>2]=ft[0],pe[n+4>>2]=ft[1],a.getdents&&0===s&&0===r&&(a.getdents=null),0)}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function qt(){return Yt.apply(null,arguments)}function Xt(e,t,i,r){try{var n=Dt.getStreamFromFD(e),a=Dt.doWritev(n,t,i);return pe[r>>2]=a,0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function Wt(){return Xt.apply(null,arguments)}function Gt(e){delete ni.xhrs[e-1]}function Kt(){at()}function Qt(){return void 0===Qt.start&&(Qt.start=Date.now()),1e3*(Date.now()-Qt.start)|0}function Zt(){at()}function Jt(){return g||"undefined"!=typeof dateNow||"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now}function $t(e,t){var i;if(0===e)i=Date.now();else{if(1!==e||!Jt())return St(28),-1;i=Zt()}return pe[t>>2]=i/1e3|0,pe[t+4>>2]=i%1e3*1e3*1e3|0,0}function ei(){return ce.length}function ti(){return!y}function ii(e){try{return N.grow(e-ue.byteLength+65535>>16),Ee(N.buffer),1}catch(t){console.error("emscripten_realloc_buffer: Attempted to grow heap from "+ue.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function ri(e){var t=ei();X(e>t);if(e>2147418112)return k("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147418112 bytes!"),!1;for(var i=Math.max(t,16777216);i>2]=t,me[e+4>>2]=t/4294967296|0},openDatabase:function(e,t,i,r){try{var n=indexedDB.open(e,t)}catch(e){return r(e)}n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains("FILES")&&t.deleteObjectStore("FILES"),t.createObjectStore("FILES")},n.onsuccess=function(e){i(e.target.result)},n.onerror=function(e){r(e)}},staticInit:function(){var e="undefined"==typeof ENVIRONMENT_IS_FETCH_WORKER;ni.openDatabase("emscripten_filesystem",1,(function(t){ni.dbInstance=t,e&&nt("library_fetch_init")}),(function(){ni.dbInstance=!1,e&&nt("library_fetch_init")})),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||rt("library_fetch_init")}};function ai(e,t,i,r,n){var a=me[e+8>>2];if(a){var s=ie(a),o=e+112,l=ie(o);l||(l="GET");me[o+32>>2];var f=me[o+52>>2],u=me[o+56>>2],c=!!me[o+60>>2],h=(me[o+64>>2],me[o+68>>2]),d=me[o+72>>2],_=me[o+76>>2],p=me[o+80>>2],m=me[o+84>>2],b=me[o+88>>2],v=!!(1&f),y=!!(2&f),g=!!(64&f),w=h?ie(h):void 0,E=d?ie(d):void 0,C=p?ie(p):void 0,S=new XMLHttpRequest;if(S.withCredentials=c,S.open(l,s,!g,w,E),g||(S.timeout=u),S.url_=s,X(!y,"streaming uses moz-chunked-arraybuffer which is no longer supported; TODO: rewrite using fetch()"),S.responseType="arraybuffer",p&&S.overrideMimeType(C),_)for(;;){var j=me[_>>2];if(!j)break;var T=me[_+4>>2];if(!T)break;_+=8;var A=ie(j),x=ie(T);S.setRequestHeader(A,x)}ni.xhrs.push(S);var M=ni.xhrs.length;me[e+0>>2]=M;var k=m&&b?he.slice(m,m+b):null;S.onload=function(r){var n=S.response?S.response.byteLength:0,a=0,s=0;v&&!y&&(a=ya(s=n),he.set(new Uint8Array(S.response),a)),me[e+12>>2]=a,ni.setu64(e+16,s),ni.setu64(e+24,0),n&&ni.setu64(e+32,n),_e[e+40>>1]=S.readyState,4===S.readyState&&0===S.status&&(S.status=n>0?200:404),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),S.status>=200&&S.status<300?t&&t(e,S,r):i&&i(e,S,r)},S.onerror=function(t){var r=S.status;4===S.readyState&&0===r&&(r=404),me[e+12>>2]=0,ni.setu64(e+16,0),ni.setu64(e+24,0),ni.setu64(e+32,0),_e[e+40>>1]=S.readyState,_e[e+42>>1]=r,i&&i(e,S,t)},S.ontimeout=function(t){i&&i(e,S,t)},S.onprogress=function(t){var i=v&&y&&S.response?S.response.byteLength:0,n=0;v&&y&&(n=ya(i),he.set(new Uint8Array(S.response),n)),me[e+12>>2]=n,ni.setu64(e+16,i),ni.setu64(e+24,t.loaded-i),ni.setu64(e+32,t.total),_e[e+40>>1]=S.readyState,S.readyState>=3&&0===S.status&&t.loaded>0&&(S.status=200),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),r&&r(e,S,t)},S.onreadystatechange=function(t){_e[e+40>>1]=S.readyState,S.readyState>=2&&(_e[e+42>>1]=S.status),n&&n(e,S,t)};try{S.send(k)}catch(t){i&&i(e,S,t)}}else i(e,0,"no url specified!")}function si(e,t,i,r,n){if(e){var a=me[t+112+64>>2];a||(a=me[t+8>>2]);var s=ie(a);try{var o=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(i,s);o.onsuccess=function(e){_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),r(t,0,s)},o.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=413,ne("Payload Too Large",t+44,64),n(t,0,e)}}catch(e){n(t,0,e)}}else n(t,0,"IndexedDB not available!")}function oi(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readonly").objectStore("FILES").get(a);s.onsuccess=function(e){if(e.target.result){var n=e.target.result,a=n.byteLength||n.length,s=ya(a);he.set(new Uint8Array(n),s),me[t+12>>2]=s,ni.setu64(t+16,a),ni.setu64(t+24,0),ni.setu64(t+32,a),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,n)}else _e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,"no data")},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e)}}catch(e){r(t,0,e)}}else r(t,0,"IndexedDB not available!")}function li(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readwrite").objectStore("FILES").delete(a);s.onsuccess=function(e){var r=e.target.result;me[t+12>>2]=0,ni.setu64(t+16,0),ni.setu64(t+24,0),ni.setu64(t+32,0),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,r)},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e)}}catch(e){r(t,0,e)}}else r(t,0,"IndexedDB not available!")}function fi(e,t,i,r,n){void 0!==B&&(B=!0);var a=e+112,s=ie(a),o=me[a+36>>2],l=me[a+40>>2],f=me[a+44>>2],u=me[a+48>>2],c=me[a+52>>2],h=!!(4&c),d=!!(32&c),_=!!(16&c),p=function(e,i,r){o?Ca(o,e):t&&t(e)},m=function(e,t,i){f?Ca(f,e):r&&r(e)},b=function(e,t,r){l?Ca(l,e):i&&i(e)},v=function(e,t,i){u?Ca(u,e):n&&n(e)},y=function(e,i,r){si(ni.dbInstance,e,i.response,(function(e,i,r){o?Ca(o,e):t&&t(e)}),(function(e,i,r){o?Ca(o,e):t&&t(e)}))};if("EM_IDB_STORE"===s){var g=me[a+84>>2];si(ni.dbInstance,e,he.slice(g,g+me[a+88>>2]),p,b)}else if("EM_IDB_DELETE"===s)li(ni.dbInstance,e,p,b);else if(_){if(d)return 0;ai(e,h?y:p,b,m,v)}else oi(ni.dbInstance,e,p,d?b:h?function(e,t,i){ai(e,y,b,m,v)}:function(e,t,i){ai(e,p,b,m,v)});return e}var ui=We;function ci(e){return 0===e?0:(e=ie(e),wt.hasOwnProperty(e)?(ci.ret&&va(ci.ret),ci.ret=se(wt[e]),ci.ret):0)}function hi(e){var t=Date.now();return pe[e>>2]=t/1e3|0,pe[e+4>>2]=t%1e3*1e3|0,0}var di=(ne("GMT",1126992,4),1126992);function _i(e,t){var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getUTCSeconds(),pe[t+4>>2]=i.getUTCMinutes(),pe[t+8>>2]=i.getUTCHours(),pe[t+12>>2]=i.getUTCDate(),pe[t+16>>2]=i.getUTCMonth(),pe[t+20>>2]=i.getUTCFullYear()-1900,pe[t+24>>2]=i.getUTCDay(),pe[t+36>>2]=0,pe[t+32>>2]=0;var r=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),n=(i.getTime()-r)/864e5|0;return pe[t+28>>2]=n,pe[t+40>>2]=di,t}function pi(e){return Math.pow(2,e)}function mi(e){return pi(e)}function bi(e){return Math.log(e)/Math.LN2}function vi(e){var t=yi,i=t.LLVM_SAVEDSTACKS[e];t.LLVM_SAVEDSTACKS.splice(e,1),wa(i)}function yi(){var e=yi;return e.LLVM_SAVEDSTACKS||(e.LLVM_SAVEDSTACKS=[]),e.LLVM_SAVEDSTACKS.push(Ea()),e.LLVM_SAVEDSTACKS.length-1}var gi=Ze;function wi(){if(!wi.called){wi.called=!0,pe[ma()>>2]=60*(new Date).getTimezoneOffset();var e=(new Date).getFullYear(),t=new Date(e,0,1),i=new Date(e,6,1);pe[pa()>>2]=Number(t.getTimezoneOffset()!=i.getTimezoneOffset());var r=o(t),n=o(i),a=J(Ni(r),"i8",Q),s=J(Ni(n),"i8",Q);i.getTimezoneOffset()>2]=a,pe[ba()+4>>2]=s):(pe[ba()>>2]=s,pe[ba()+4>>2]=a)}function o(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}}function Ei(e,t){wi();var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getSeconds(),pe[t+4>>2]=i.getMinutes(),pe[t+8>>2]=i.getHours(),pe[t+12>>2]=i.getDate(),pe[t+16>>2]=i.getMonth(),pe[t+20>>2]=i.getFullYear()-1900,pe[t+24>>2]=i.getDay();var r=new Date(i.getFullYear(),0,1),n=(i.getTime()-r.getTime())/864e5|0;pe[t+28>>2]=n,pe[t+36>>2]=-60*i.getTimezoneOffset();var a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),s=r.getTimezoneOffset(),o=0|(a!=s&&i.getTimezoneOffset()==Math.min(s,a));pe[t+32>>2]=o;var l=pe[ba()+(o?4:0)>>2];return pe[t+40>>2]=l,t}function Ci(e,t,i){he.set(he.subarray(t,t+i),e)}function Si(e){var t=e/1e3;if((v||y)&&self.performance&&self.performance.now)for(var i=self.performance.now();self.performance.now()-i>2],r=pe[e+4>>2];return r<0||r>999999999||i<0?(St(28),-1):(0!==t&&(pe[t>>2]=0,pe[t+4>>2]=0),Si(1e6*i+r/1e3))}function Ti(){return 0}function Ai(){return 0}function xi(){return 6}function Mi(){}function ki(e){return e%4==0&&(e%100!=0||e%400==0)}function Pi(e,t){for(var i=0,r=0;r<=t;i+=e[r++]);return i}var Ii=[31,29,31,30,31,30,31,31,30,31,30,31],Ri=[31,28,31,30,31,30,31,31,30,31,30,31];function Ui(e,t){for(var i=new Date(e.getTime());t>0;){var r=ki(i.getFullYear()),n=i.getMonth(),a=(r?Ii:Ri)[n];if(!(t>a-i.getDate()))return i.setDate(i.getDate()+t),i;t-=a-i.getDate()+1,i.setDate(1),n<11?i.setMonth(n+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1))}return i}function Di(e,t,i,r){var n=pe[r+40>>2],a={tm_sec:pe[r>>2],tm_min:pe[r+4>>2],tm_hour:pe[r+8>>2],tm_mday:pe[r+12>>2],tm_mon:pe[r+16>>2],tm_year:pe[r+20>>2],tm_wday:pe[r+24>>2],tm_yday:pe[r+28>>2],tm_isdst:pe[r+32>>2],tm_gmtoff:pe[r+36>>2],tm_zone:n?ie(n):""},s=ie(i),o={"%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","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in o)s=s.replace(new RegExp(l,"g"),o[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,t,i){for(var r="number"==typeof e?e.toString():e||"";r.length0?1:0}var r;return 0===(r=i(e.getFullYear()-t.getFullYear()))&&0===(r=i(e.getMonth()-t.getMonth()))&&(r=i(e.getDate()-t.getDate())),r}function _(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 p(e){var t=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday),i=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),n=_(i),a=_(r);return d(n,t)<=0?d(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return f[e.tm_wday].substring(0,3)},"%A":function(e){return f[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return h((e.tm_year+1900)/100|0,2)},"%d":function(e){return h(e.tm_mday,2)},"%e":function(e){return c(e.tm_mday,2," ")},"%g":function(e){return p(e).toString().substring(2)},"%G":function(e){return p(e)},"%H":function(e){return h(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),h(t,2)},"%j":function(e){return h(e.tm_mday+Pi(ki(e.tm_year+1900)?Ii:Ri,e.tm_mon-1),3)},"%m":function(e){return h(e.tm_mon+1,2)},"%M":function(e){return h(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 h(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),i=0===t.getDay()?t:Ui(t,7-t.getDay()),r=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(d(i,r)<0){var n=Pi(ki(r.getFullYear())?Ii:Ri,r.getMonth()-1)-31,a=31-i.getDate()+n+r.getDate();return h(Math.ceil(a/7),2)}return 0===d(i,t)?"01":"00"},"%V":function(e){var t,i=new Date(e.tm_year+1900,0,4),r=new Date(e.tm_year+1901,0,4),n=_(i),a=_(r),s=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday);return d(s,n)<0?"53":d(a,s)<=0?"01":(t=n.getFullYear()=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(i?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in m)s.indexOf(l)>=0&&(s=s.replace(new RegExp(l,"g"),m[l](a)));var b=Ni(s,!1);return b.length>t?0:(le(b,e),b.length-1)}function Fi(e){switch(e){case 30:return ye;case 85:return 2147418112/ye;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.hardwareConcurrency||1}return St(28),-1}function Oi(e){var t=Date.now()/1e3|0;return e&&(pe[e>>2]=t),t}if(Ut.staticInit(),w){var Li=e("fs"),Bi=e("path");Pt.staticInit()}function Ni(e,t,i){var r=i>0?i:ae(e)+1,n=new Array(r),a=re(e,n,0,n.length);return t&&(n.length=a),n}Zt=g?function(){var e=i.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof dateNow?dateNow:"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now?function(){return performance.now()}:Date.now,ni.staticInit();var zi=[0,"jsCall_dd_0","jsCall_dd_1","jsCall_dd_2","jsCall_dd_3","jsCall_dd_4","jsCall_dd_5","jsCall_dd_6","jsCall_dd_7","jsCall_dd_8","jsCall_dd_9","jsCall_dd_10","jsCall_dd_11","jsCall_dd_12","jsCall_dd_13","jsCall_dd_14","jsCall_dd_15","jsCall_dd_16","jsCall_dd_17","jsCall_dd_18","jsCall_dd_19","jsCall_dd_20","jsCall_dd_21","jsCall_dd_22","jsCall_dd_23","jsCall_dd_24","jsCall_dd_25","jsCall_dd_26","jsCall_dd_27","jsCall_dd_28","jsCall_dd_29","jsCall_dd_30","jsCall_dd_31","jsCall_dd_32","jsCall_dd_33","jsCall_dd_34","_sinh","_cosh","_tanh","_sin","_cos","_tan","_atan","_asin","_acos","_exp","_log","_fabs","_etime",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Hi=[0,"jsCall_did_0","jsCall_did_1","jsCall_did_2","jsCall_did_3","jsCall_did_4","jsCall_did_5","jsCall_did_6","jsCall_did_7","jsCall_did_8","jsCall_did_9","jsCall_did_10","jsCall_did_11","jsCall_did_12","jsCall_did_13","jsCall_did_14","jsCall_did_15","jsCall_did_16","jsCall_did_17","jsCall_did_18","jsCall_did_19","jsCall_did_20","jsCall_did_21","jsCall_did_22","jsCall_did_23","jsCall_did_24","jsCall_did_25","jsCall_did_26","jsCall_did_27","jsCall_did_28","jsCall_did_29","jsCall_did_30","jsCall_did_31","jsCall_did_32","jsCall_did_33","jsCall_did_34",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,0],Vi=[0,"jsCall_didd_0","jsCall_didd_1","jsCall_didd_2","jsCall_didd_3","jsCall_didd_4","jsCall_didd_5","jsCall_didd_6","jsCall_didd_7","jsCall_didd_8","jsCall_didd_9","jsCall_didd_10","jsCall_didd_11","jsCall_didd_12","jsCall_didd_13","jsCall_didd_14","jsCall_didd_15","jsCall_didd_16","jsCall_didd_17","jsCall_didd_18","jsCall_didd_19","jsCall_didd_20","jsCall_didd_21","jsCall_didd_22","jsCall_didd_23","jsCall_didd_24","jsCall_didd_25","jsCall_didd_26","jsCall_didd_27","jsCall_didd_28","jsCall_didd_29","jsCall_didd_30","jsCall_didd_31","jsCall_didd_32","jsCall_didd_33","jsCall_didd_34",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,0],Yi=[0,"jsCall_fii_0","jsCall_fii_1","jsCall_fii_2","jsCall_fii_3","jsCall_fii_4","jsCall_fii_5","jsCall_fii_6","jsCall_fii_7","jsCall_fii_8","jsCall_fii_9","jsCall_fii_10","jsCall_fii_11","jsCall_fii_12","jsCall_fii_13","jsCall_fii_14","jsCall_fii_15","jsCall_fii_16","jsCall_fii_17","jsCall_fii_18","jsCall_fii_19","jsCall_fii_20","jsCall_fii_21","jsCall_fii_22","jsCall_fii_23","jsCall_fii_24","jsCall_fii_25","jsCall_fii_26","jsCall_fii_27","jsCall_fii_28","jsCall_fii_29","jsCall_fii_30","jsCall_fii_31","jsCall_fii_32","jsCall_fii_33","jsCall_fii_34","_sbr_sum_square_c",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],qi=[0,"jsCall_fiii_0","jsCall_fiii_1","jsCall_fiii_2","jsCall_fiii_3","jsCall_fiii_4","jsCall_fiii_5","jsCall_fiii_6","jsCall_fiii_7","jsCall_fiii_8","jsCall_fiii_9","jsCall_fiii_10","jsCall_fiii_11","jsCall_fiii_12","jsCall_fiii_13","jsCall_fiii_14","jsCall_fiii_15","jsCall_fiii_16","jsCall_fiii_17","jsCall_fiii_18","jsCall_fiii_19","jsCall_fiii_20","jsCall_fiii_21","jsCall_fiii_22","jsCall_fiii_23","jsCall_fiii_24","jsCall_fiii_25","jsCall_fiii_26","jsCall_fiii_27","jsCall_fiii_28","jsCall_fiii_29","jsCall_fiii_30","jsCall_fiii_31","jsCall_fiii_32","jsCall_fiii_33","jsCall_fiii_34","_avpriv_scalarproduct_float_c",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],Xi=[0,"jsCall_ii_0","jsCall_ii_1","jsCall_ii_2","jsCall_ii_3","jsCall_ii_4","jsCall_ii_5","jsCall_ii_6","jsCall_ii_7","jsCall_ii_8","jsCall_ii_9","jsCall_ii_10","jsCall_ii_11","jsCall_ii_12","jsCall_ii_13","jsCall_ii_14","jsCall_ii_15","jsCall_ii_16","jsCall_ii_17","jsCall_ii_18","jsCall_ii_19","jsCall_ii_20","jsCall_ii_21","jsCall_ii_22","jsCall_ii_23","jsCall_ii_24","jsCall_ii_25","jsCall_ii_26","jsCall_ii_27","jsCall_ii_28","jsCall_ii_29","jsCall_ii_30","jsCall_ii_31","jsCall_ii_32","jsCall_ii_33","jsCall_ii_34","_av_default_item_name","_ff_avio_child_class_next","_flv_probe","_flv_read_header","_flv_read_close","_live_flv_probe","_mov_probe","_mov_read_header","_mov_read_close","_mpegts_probe","_mpegts_read_header","_mpegts_read_close","_format_to_name","_format_child_class_next","_get_category","_urlcontext_to_name","_ff_urlcontext_child_class_next","_sws_context_to_name","_ff_bsf_child_class_next","_hevc_mp4toannexb_init","_hevc_init_thread_copy","_hevc_decode_init","_hevc_decode_free","_context_to_name","_codec_child_class_next","_get_category_2277","_aac_decode_init","_aac_decode_close","_init","___stdio_close","___emscripten_stdout_close","_releaseSniffStreamFunc","_flv_releaseFunc","_initializeDecoderFunc","__getFrame","_closeVideoFunc","_releaseFunc","_initializeDemuxerFunc","_getPacketFunc","_releaseDemuxerFunc","_io_short_seek","_avio_rb16","_avio_rl16","_av_buffer_allocz","_frame_worker_thread","_av_buffer_alloc","_thread_worker",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Wi=[0,"jsCall_iid_0","jsCall_iid_1","jsCall_iid_2","jsCall_iid_3","jsCall_iid_4","jsCall_iid_5","jsCall_iid_6","jsCall_iid_7","jsCall_iid_8","jsCall_iid_9","jsCall_iid_10","jsCall_iid_11","jsCall_iid_12","jsCall_iid_13","jsCall_iid_14","jsCall_iid_15","jsCall_iid_16","jsCall_iid_17","jsCall_iid_18","jsCall_iid_19","jsCall_iid_20","jsCall_iid_21","jsCall_iid_22","jsCall_iid_23","jsCall_iid_24","jsCall_iid_25","jsCall_iid_26","jsCall_iid_27","jsCall_iid_28","jsCall_iid_29","jsCall_iid_30","jsCall_iid_31","jsCall_iid_32","jsCall_iid_33","jsCall_iid_34","_seekBufferFunc",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],Gi=[0,"jsCall_iidiiii_0","jsCall_iidiiii_1","jsCall_iidiiii_2","jsCall_iidiiii_3","jsCall_iidiiii_4","jsCall_iidiiii_5","jsCall_iidiiii_6","jsCall_iidiiii_7","jsCall_iidiiii_8","jsCall_iidiiii_9","jsCall_iidiiii_10","jsCall_iidiiii_11","jsCall_iidiiii_12","jsCall_iidiiii_13","jsCall_iidiiii_14","jsCall_iidiiii_15","jsCall_iidiiii_16","jsCall_iidiiii_17","jsCall_iidiiii_18","jsCall_iidiiii_19","jsCall_iidiiii_20","jsCall_iidiiii_21","jsCall_iidiiii_22","jsCall_iidiiii_23","jsCall_iidiiii_24","jsCall_iidiiii_25","jsCall_iidiiii_26","jsCall_iidiiii_27","jsCall_iidiiii_28","jsCall_iidiiii_29","jsCall_iidiiii_30","jsCall_iidiiii_31","jsCall_iidiiii_32","jsCall_iidiiii_33","jsCall_iidiiii_34","_fmt_fp",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],Ki=[0,"jsCall_iii_0","jsCall_iii_1","jsCall_iii_2","jsCall_iii_3","jsCall_iii_4","jsCall_iii_5","jsCall_iii_6","jsCall_iii_7","jsCall_iii_8","jsCall_iii_9","jsCall_iii_10","jsCall_iii_11","jsCall_iii_12","jsCall_iii_13","jsCall_iii_14","jsCall_iii_15","jsCall_iii_16","jsCall_iii_17","jsCall_iii_18","jsCall_iii_19","jsCall_iii_20","jsCall_iii_21","jsCall_iii_22","jsCall_iii_23","jsCall_iii_24","jsCall_iii_25","jsCall_iii_26","jsCall_iii_27","jsCall_iii_28","jsCall_iii_29","jsCall_iii_30","jsCall_iii_31","jsCall_iii_32","jsCall_iii_33","jsCall_iii_34","_ff_avio_child_next","_flv_read_packet","_mov_read_packet","_mpegts_read_packet","_mpegts_raw_read_packet","_format_child_next","_urlcontext_child_next","_bsf_child_next","_hevc_mp4toannexb_filter","_hevc_update_thread_context","_null_filter","_codec_child_next","_initSniffStreamFunc","_flv_initFunc","_flv_getPacketFunc","_io_read_pause","_descriptor_compare","_hls_decode_entry","_avcodec_default_get_format","_ff_startcode_find_candidate_c","_color_table_compare",0,0,0,0,0,0,0],Qi=[0,"jsCall_iiii_0","jsCall_iiii_1","jsCall_iiii_2","jsCall_iiii_3","jsCall_iiii_4","jsCall_iiii_5","jsCall_iiii_6","jsCall_iiii_7","jsCall_iiii_8","jsCall_iiii_9","jsCall_iiii_10","jsCall_iiii_11","jsCall_iiii_12","jsCall_iiii_13","jsCall_iiii_14","jsCall_iiii_15","jsCall_iiii_16","jsCall_iiii_17","jsCall_iiii_18","jsCall_iiii_19","jsCall_iiii_20","jsCall_iiii_21","jsCall_iiii_22","jsCall_iiii_23","jsCall_iiii_24","jsCall_iiii_25","jsCall_iiii_26","jsCall_iiii_27","jsCall_iiii_28","jsCall_iiii_29","jsCall_iiii_30","jsCall_iiii_31","jsCall_iiii_32","jsCall_iiii_33","jsCall_iiii_34","_mov_read_aclr","_mov_read_avid","_mov_read_ares","_mov_read_avss","_mov_read_av1c","_mov_read_chpl","_mov_read_stco","_mov_read_colr","_mov_read_ctts","_mov_read_default","_mov_read_dpxe","_mov_read_dref","_mov_read_elst","_mov_read_enda","_mov_read_fiel","_mov_read_adrm","_mov_read_ftyp","_mov_read_glbl","_mov_read_hdlr","_mov_read_ilst","_mov_read_jp2h","_mov_read_mdat","_mov_read_mdhd","_mov_read_meta","_mov_read_moof","_mov_read_moov","_mov_read_mvhd","_mov_read_svq3","_mov_read_alac","_mov_read_pasp","_mov_read_sidx","_mov_read_stps","_mov_read_strf","_mov_read_stsc","_mov_read_stsd","_mov_read_stss","_mov_read_stsz","_mov_read_stts","_mov_read_tkhd","_mov_read_tfdt","_mov_read_tfhd","_mov_read_trak","_mov_read_tmcd","_mov_read_chap","_mov_read_trex","_mov_read_trun","_mov_read_wave","_mov_read_esds","_mov_read_dac3","_mov_read_dec3","_mov_read_ddts","_mov_read_wide","_mov_read_wfex","_mov_read_cmov","_mov_read_chan","_mov_read_dvc1","_mov_read_sbgp","_mov_read_uuid","_mov_read_targa_y216","_mov_read_free","_mov_read_custom","_mov_read_frma","_mov_read_senc","_mov_read_saiz","_mov_read_saio","_mov_read_pssh","_mov_read_schm","_mov_read_tenc","_mov_read_dfla","_mov_read_st3d","_mov_read_sv3d","_mov_read_dops","_mov_read_smdm","_mov_read_coll","_mov_read_vpcc","_mov_read_mdcv","_mov_read_clli","_h264_split","_hevc_split","___stdio_write","_sn_write","_read_stream_live","_read_stream_vod","_getSniffStreamPacketFunc","_flv_read_stream_live","_setCodecTypeFunc","_read_packet","_io_write_packet","_io_read_packet","_dyn_buf_write","_mov_read_keys","_mov_read_udta_string","_avcodec_default_get_buffer2","_do_read",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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Zi=[0,"jsCall_iiiii_0","jsCall_iiiii_1","jsCall_iiiii_2","jsCall_iiiii_3","jsCall_iiiii_4","jsCall_iiiii_5","jsCall_iiiii_6","jsCall_iiiii_7","jsCall_iiiii_8","jsCall_iiiii_9","jsCall_iiiii_10","jsCall_iiiii_11","jsCall_iiiii_12","jsCall_iiiii_13","jsCall_iiiii_14","jsCall_iiiii_15","jsCall_iiiii_16","jsCall_iiiii_17","jsCall_iiiii_18","jsCall_iiiii_19","jsCall_iiiii_20","jsCall_iiiii_21","jsCall_iiiii_22","jsCall_iiiii_23","jsCall_iiiii_24","jsCall_iiiii_25","jsCall_iiiii_26","jsCall_iiiii_27","jsCall_iiiii_28","jsCall_iiiii_29","jsCall_iiiii_30","jsCall_iiiii_31","jsCall_iiiii_32","jsCall_iiiii_33","jsCall_iiiii_34","_hevc_decode_frame","_aac_decode_frame","_flv_pushBufferFunc","_demuxBoxFunc","_mov_metadata_int8_no_padding","_mov_metadata_track_or_disc_number","_mov_metadata_gnre","_mov_metadata_int8_bypass_padding","_lum_planar_vscale","_chr_planar_vscale","_any_vscale","_packed_vscale","_gamma_convert","_lum_convert","_lum_h_scale","_chr_convert","_chr_h_scale","_no_chr_scale","_hls_decode_entry_wpp",0,0,0,0,0,0,0,0,0],Ji=[0,"jsCall_iiiiii_0","jsCall_iiiiii_1","jsCall_iiiiii_2","jsCall_iiiiii_3","jsCall_iiiiii_4","jsCall_iiiiii_5","jsCall_iiiiii_6","jsCall_iiiiii_7","jsCall_iiiiii_8","jsCall_iiiiii_9","jsCall_iiiiii_10","jsCall_iiiiii_11","jsCall_iiiiii_12","jsCall_iiiiii_13","jsCall_iiiiii_14","jsCall_iiiiii_15","jsCall_iiiiii_16","jsCall_iiiiii_17","jsCall_iiiiii_18","jsCall_iiiiii_19","jsCall_iiiiii_20","jsCall_iiiiii_21","jsCall_iiiiii_22","jsCall_iiiiii_23","jsCall_iiiiii_24","jsCall_iiiiii_25","jsCall_iiiiii_26","jsCall_iiiiii_27","jsCall_iiiiii_28","jsCall_iiiiii_29","jsCall_iiiiii_30","jsCall_iiiiii_31","jsCall_iiiiii_32","jsCall_iiiiii_33","jsCall_iiiiii_34","_pushBufferFunc","_decodeCodecContextFunc","_io_open_default","_avcodec_default_execute2","_thread_execute2","_sbr_lf_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],$i=[0,"jsCall_iiiiiii_0","jsCall_iiiiiii_1","jsCall_iiiiiii_2","jsCall_iiiiiii_3","jsCall_iiiiiii_4","jsCall_iiiiiii_5","jsCall_iiiiiii_6","jsCall_iiiiiii_7","jsCall_iiiiiii_8","jsCall_iiiiiii_9","jsCall_iiiiiii_10","jsCall_iiiiiii_11","jsCall_iiiiiii_12","jsCall_iiiiiii_13","jsCall_iiiiiii_14","jsCall_iiiiiii_15","jsCall_iiiiiii_16","jsCall_iiiiiii_17","jsCall_iiiiiii_18","jsCall_iiiiiii_19","jsCall_iiiiiii_20","jsCall_iiiiiii_21","jsCall_iiiiiii_22","jsCall_iiiiiii_23","jsCall_iiiiiii_24","jsCall_iiiiiii_25","jsCall_iiiiiii_26","jsCall_iiiiiii_27","jsCall_iiiiiii_28","jsCall_iiiiiii_29","jsCall_iiiiiii_30","jsCall_iiiiiii_31","jsCall_iiiiiii_32","jsCall_iiiiiii_33","jsCall_iiiiiii_34","_h264_parse","_hevc_parse","_flv_decodeVideoFrameFunc","_avcodec_default_execute","_thread_execute","_sbr_x_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],er=[0,"jsCall_iiiiiiii_0","jsCall_iiiiiiii_1","jsCall_iiiiiiii_2","jsCall_iiiiiiii_3","jsCall_iiiiiiii_4","jsCall_iiiiiiii_5","jsCall_iiiiiiii_6","jsCall_iiiiiiii_7","jsCall_iiiiiiii_8","jsCall_iiiiiiii_9","jsCall_iiiiiiii_10","jsCall_iiiiiiii_11","jsCall_iiiiiiii_12","jsCall_iiiiiiii_13","jsCall_iiiiiiii_14","jsCall_iiiiiiii_15","jsCall_iiiiiiii_16","jsCall_iiiiiiii_17","jsCall_iiiiiiii_18","jsCall_iiiiiiii_19","jsCall_iiiiiiii_20","jsCall_iiiiiiii_21","jsCall_iiiiiiii_22","jsCall_iiiiiiii_23","jsCall_iiiiiiii_24","jsCall_iiiiiiii_25","jsCall_iiiiiiii_26","jsCall_iiiiiiii_27","jsCall_iiiiiiii_28","jsCall_iiiiiiii_29","jsCall_iiiiiiii_30","jsCall_iiiiiiii_31","jsCall_iiiiiiii_32","jsCall_iiiiiiii_33","jsCall_iiiiiiii_34","_decodeVideoFrameFunc","_setSniffStreamCodecTypeFunc","_flv_setSniffStreamCodecTypeFunc","_swscale","_ff_sws_alphablendaway","_yuv2rgb_c_32","_yuva2rgba_c","_yuv2rgb_c_bgr48","_yuv2rgb_c_48","_yuva2argb_c","_yuv2rgb_c_24_rgb","_yuv2rgb_c_24_bgr","_yuv2rgb_c_16_ordered_dither","_yuv2rgb_c_15_ordered_dither","_yuv2rgb_c_12_ordered_dither","_yuv2rgb_c_8_ordered_dither","_yuv2rgb_c_4_ordered_dither","_yuv2rgb_c_4b_ordered_dither","_yuv2rgb_c_1_ordered_dither","_planarToP01xWrapper","_planar8ToP01xleWrapper","_yvu9ToYv12Wrapper","_bgr24ToYv12Wrapper","_rgbToRgbWrapper","_planarRgbToplanarRgbWrapper","_planarRgbToRgbWrapper","_planarRgbaToRgbWrapper","_Rgb16ToPlanarRgb16Wrapper","_planarRgb16ToRgb16Wrapper","_rgbToPlanarRgbWrapper","_bayer_to_rgb24_wrapper","_bayer_to_yv12_wrapper","_bswap_16bpc","_palToRgbWrapper","_yuv422pToYuy2Wrapper","_yuv422pToUyvyWrapper","_uint_y_to_float_y_wrapper","_float_y_to_uint_y_wrapper","_planarToYuy2Wrapper","_planarToUyvyWrapper","_yuyvToYuv420Wrapper","_uyvyToYuv420Wrapper","_yuyvToYuv422Wrapper","_uyvyToYuv422Wrapper","_packedCopyWrapper","_planarCopyWrapper","_planarToNv12Wrapper","_planarToNv24Wrapper","_nv12ToPlanarWrapper","_nv24ToPlanarWrapper",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],tr=[0,"jsCall_iiiiij_0","jsCall_iiiiij_1","jsCall_iiiiij_2","jsCall_iiiiij_3","jsCall_iiiiij_4","jsCall_iiiiij_5","jsCall_iiiiij_6","jsCall_iiiiij_7","jsCall_iiiiij_8","jsCall_iiiiij_9","jsCall_iiiiij_10","jsCall_iiiiij_11","jsCall_iiiiij_12","jsCall_iiiiij_13","jsCall_iiiiij_14","jsCall_iiiiij_15","jsCall_iiiiij_16","jsCall_iiiiij_17","jsCall_iiiiij_18","jsCall_iiiiij_19","jsCall_iiiiij_20","jsCall_iiiiij_21","jsCall_iiiiij_22","jsCall_iiiiij_23","jsCall_iiiiij_24","jsCall_iiiiij_25","jsCall_iiiiij_26","jsCall_iiiiij_27","jsCall_iiiiij_28","jsCall_iiiiij_29","jsCall_iiiiij_30","jsCall_iiiiij_31","jsCall_iiiiij_32","jsCall_iiiiij_33","jsCall_iiiiij_34","_mpegts_push_data",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],ir=[0,"jsCall_iiiji_0","jsCall_iiiji_1","jsCall_iiiji_2","jsCall_iiiji_3","jsCall_iiiji_4","jsCall_iiiji_5","jsCall_iiiji_6","jsCall_iiiji_7","jsCall_iiiji_8","jsCall_iiiji_9","jsCall_iiiji_10","jsCall_iiiji_11","jsCall_iiiji_12","jsCall_iiiji_13","jsCall_iiiji_14","jsCall_iiiji_15","jsCall_iiiji_16","jsCall_iiiji_17","jsCall_iiiji_18","jsCall_iiiji_19","jsCall_iiiji_20","jsCall_iiiji_21","jsCall_iiiji_22","jsCall_iiiji_23","jsCall_iiiji_24","jsCall_iiiji_25","jsCall_iiiji_26","jsCall_iiiji_27","jsCall_iiiji_28","jsCall_iiiji_29","jsCall_iiiji_30","jsCall_iiiji_31","jsCall_iiiji_32","jsCall_iiiji_33","jsCall_iiiji_34","_flv_read_seek","_mov_read_seek",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],rr=[0,"jsCall_iiijjji_0","jsCall_iiijjji_1","jsCall_iiijjji_2","jsCall_iiijjji_3","jsCall_iiijjji_4","jsCall_iiijjji_5","jsCall_iiijjji_6","jsCall_iiijjji_7","jsCall_iiijjji_8","jsCall_iiijjji_9","jsCall_iiijjji_10","jsCall_iiijjji_11","jsCall_iiijjji_12","jsCall_iiijjji_13","jsCall_iiijjji_14","jsCall_iiijjji_15","jsCall_iiijjji_16","jsCall_iiijjji_17","jsCall_iiijjji_18","jsCall_iiijjji_19","jsCall_iiijjji_20","jsCall_iiijjji_21","jsCall_iiijjji_22","jsCall_iiijjji_23","jsCall_iiijjji_24","jsCall_iiijjji_25","jsCall_iiijjji_26","jsCall_iiijjji_27","jsCall_iiijjji_28","jsCall_iiijjji_29","jsCall_iiijjji_30","jsCall_iiijjji_31","jsCall_iiijjji_32","jsCall_iiijjji_33","jsCall_iiijjji_34",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,0],nr=[0,"jsCall_jiiij_0","jsCall_jiiij_1","jsCall_jiiij_2","jsCall_jiiij_3","jsCall_jiiij_4","jsCall_jiiij_5","jsCall_jiiij_6","jsCall_jiiij_7","jsCall_jiiij_8","jsCall_jiiij_9","jsCall_jiiij_10","jsCall_jiiij_11","jsCall_jiiij_12","jsCall_jiiij_13","jsCall_jiiij_14","jsCall_jiiij_15","jsCall_jiiij_16","jsCall_jiiij_17","jsCall_jiiij_18","jsCall_jiiij_19","jsCall_jiiij_20","jsCall_jiiij_21","jsCall_jiiij_22","jsCall_jiiij_23","jsCall_jiiij_24","jsCall_jiiij_25","jsCall_jiiij_26","jsCall_jiiij_27","jsCall_jiiij_28","jsCall_jiiij_29","jsCall_jiiij_30","jsCall_jiiij_31","jsCall_jiiij_32","jsCall_jiiij_33","jsCall_jiiij_34","_mpegts_get_dts",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],ar=[0,"jsCall_jiiji_0","jsCall_jiiji_1","jsCall_jiiji_2","jsCall_jiiji_3","jsCall_jiiji_4","jsCall_jiiji_5","jsCall_jiiji_6","jsCall_jiiji_7","jsCall_jiiji_8","jsCall_jiiji_9","jsCall_jiiji_10","jsCall_jiiji_11","jsCall_jiiji_12","jsCall_jiiji_13","jsCall_jiiji_14","jsCall_jiiji_15","jsCall_jiiji_16","jsCall_jiiji_17","jsCall_jiiji_18","jsCall_jiiji_19","jsCall_jiiji_20","jsCall_jiiji_21","jsCall_jiiji_22","jsCall_jiiji_23","jsCall_jiiji_24","jsCall_jiiji_25","jsCall_jiiji_26","jsCall_jiiji_27","jsCall_jiiji_28","jsCall_jiiji_29","jsCall_jiiji_30","jsCall_jiiji_31","jsCall_jiiji_32","jsCall_jiiji_33","jsCall_jiiji_34","_io_read_seek",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],sr=[0,"jsCall_jiji_0","jsCall_jiji_1","jsCall_jiji_2","jsCall_jiji_3","jsCall_jiji_4","jsCall_jiji_5","jsCall_jiji_6","jsCall_jiji_7","jsCall_jiji_8","jsCall_jiji_9","jsCall_jiji_10","jsCall_jiji_11","jsCall_jiji_12","jsCall_jiji_13","jsCall_jiji_14","jsCall_jiji_15","jsCall_jiji_16","jsCall_jiji_17","jsCall_jiji_18","jsCall_jiji_19","jsCall_jiji_20","jsCall_jiji_21","jsCall_jiji_22","jsCall_jiji_23","jsCall_jiji_24","jsCall_jiji_25","jsCall_jiji_26","jsCall_jiji_27","jsCall_jiji_28","jsCall_jiji_29","jsCall_jiji_30","jsCall_jiji_31","jsCall_jiji_32","jsCall_jiji_33","jsCall_jiji_34","___stdio_seek","___emscripten_stdout_seek","_seek_in_buffer","_io_seek","_dyn_buf_seek",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],or=[0,"jsCall_v_0","jsCall_v_1","jsCall_v_2","jsCall_v_3","jsCall_v_4","jsCall_v_5","jsCall_v_6","jsCall_v_7","jsCall_v_8","jsCall_v_9","jsCall_v_10","jsCall_v_11","jsCall_v_12","jsCall_v_13","jsCall_v_14","jsCall_v_15","jsCall_v_16","jsCall_v_17","jsCall_v_18","jsCall_v_19","jsCall_v_20","jsCall_v_21","jsCall_v_22","jsCall_v_23","jsCall_v_24","jsCall_v_25","jsCall_v_26","jsCall_v_27","jsCall_v_28","jsCall_v_29","jsCall_v_30","jsCall_v_31","jsCall_v_32","jsCall_v_33","jsCall_v_34","_init_ff_cos_tabs_16","_init_ff_cos_tabs_32","_init_ff_cos_tabs_64","_init_ff_cos_tabs_128","_init_ff_cos_tabs_256","_init_ff_cos_tabs_512","_init_ff_cos_tabs_1024","_init_ff_cos_tabs_2048","_init_ff_cos_tabs_4096","_init_ff_cos_tabs_8192","_init_ff_cos_tabs_16384","_init_ff_cos_tabs_32768","_init_ff_cos_tabs_65536","_init_ff_cos_tabs_131072","_introduce_mine","_introduceMineFunc","_av_format_init_next","_av_codec_init_static","_av_codec_init_next","_aac_static_table_init","_AV_CRC_8_ATM_init_table_once","_AV_CRC_8_EBU_init_table_once","_AV_CRC_16_ANSI_init_table_once","_AV_CRC_16_CCITT_init_table_once","_AV_CRC_24_IEEE_init_table_once","_AV_CRC_32_IEEE_init_table_once","_AV_CRC_32_IEEE_LE_init_table_once","_AV_CRC_16_ANSI_LE_init_table_once"],lr=[0,"jsCall_vdiidiiiii_0","jsCall_vdiidiiiii_1","jsCall_vdiidiiiii_2","jsCall_vdiidiiiii_3","jsCall_vdiidiiiii_4","jsCall_vdiidiiiii_5","jsCall_vdiidiiiii_6","jsCall_vdiidiiiii_7","jsCall_vdiidiiiii_8","jsCall_vdiidiiiii_9","jsCall_vdiidiiiii_10","jsCall_vdiidiiiii_11","jsCall_vdiidiiiii_12","jsCall_vdiidiiiii_13","jsCall_vdiidiiiii_14","jsCall_vdiidiiiii_15","jsCall_vdiidiiiii_16","jsCall_vdiidiiiii_17","jsCall_vdiidiiiii_18","jsCall_vdiidiiiii_19","jsCall_vdiidiiiii_20","jsCall_vdiidiiiii_21","jsCall_vdiidiiiii_22","jsCall_vdiidiiiii_23","jsCall_vdiidiiiii_24","jsCall_vdiidiiiii_25","jsCall_vdiidiiiii_26","jsCall_vdiidiiiii_27","jsCall_vdiidiiiii_28","jsCall_vdiidiiiii_29","jsCall_vdiidiiiii_30","jsCall_vdiidiiiii_31","jsCall_vdiidiiiii_32","jsCall_vdiidiiiii_33","jsCall_vdiidiiiii_34",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,0],fr=[0,"jsCall_vi_0","jsCall_vi_1","jsCall_vi_2","jsCall_vi_3","jsCall_vi_4","jsCall_vi_5","jsCall_vi_6","jsCall_vi_7","jsCall_vi_8","jsCall_vi_9","jsCall_vi_10","jsCall_vi_11","jsCall_vi_12","jsCall_vi_13","jsCall_vi_14","jsCall_vi_15","jsCall_vi_16","jsCall_vi_17","jsCall_vi_18","jsCall_vi_19","jsCall_vi_20","jsCall_vi_21","jsCall_vi_22","jsCall_vi_23","jsCall_vi_24","jsCall_vi_25","jsCall_vi_26","jsCall_vi_27","jsCall_vi_28","jsCall_vi_29","jsCall_vi_30","jsCall_vi_31","jsCall_vi_32","jsCall_vi_33","jsCall_vi_34","_free_geobtag","_free_apic","_free_chapter","_free_priv","_hevc_decode_flush","_flush","_h264_close","_hevc_parser_close","_fft4","_fft8","_fft16","_fft32","_fft64","_fft128","_fft256","_fft512","_fft1024","_fft2048","_fft4096","_fft8192","_fft16384","_fft32768","_fft65536","_fft131072","_logRequest_downloadSucceeded","_logRequest_downloadFailed","_downloadSucceeded","_downloadFailed","_transform_4x4_luma_9","_idct_4x4_dc_9","_idct_8x8_dc_9","_idct_16x16_dc_9","_idct_32x32_dc_9","_transform_4x4_luma_10","_idct_4x4_dc_10","_idct_8x8_dc_10","_idct_16x16_dc_10","_idct_32x32_dc_10","_transform_4x4_luma_12","_idct_4x4_dc_12","_idct_8x8_dc_12","_idct_16x16_dc_12","_idct_32x32_dc_12","_transform_4x4_luma_8","_idct_4x4_dc_8","_idct_8x8_dc_8","_idct_16x16_dc_8","_idct_32x32_dc_8","_main_function","_sbr_sum64x5_c","_sbr_neg_odd_64_c","_sbr_qmf_pre_shuffle_c",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,0,0,0,0,0,0,0,0,0,0,0,0,0],ur=[0,"jsCall_vii_0","jsCall_vii_1","jsCall_vii_2","jsCall_vii_3","jsCall_vii_4","jsCall_vii_5","jsCall_vii_6","jsCall_vii_7","jsCall_vii_8","jsCall_vii_9","jsCall_vii_10","jsCall_vii_11","jsCall_vii_12","jsCall_vii_13","jsCall_vii_14","jsCall_vii_15","jsCall_vii_16","jsCall_vii_17","jsCall_vii_18","jsCall_vii_19","jsCall_vii_20","jsCall_vii_21","jsCall_vii_22","jsCall_vii_23","jsCall_vii_24","jsCall_vii_25","jsCall_vii_26","jsCall_vii_27","jsCall_vii_28","jsCall_vii_29","jsCall_vii_30","jsCall_vii_31","jsCall_vii_32","jsCall_vii_33","jsCall_vii_34","_io_close_default","_lumRangeFromJpeg_c","_lumRangeToJpeg_c","_lumRangeFromJpeg16_c","_lumRangeToJpeg16_c","_decode_data_free","_dequant_9","_idct_4x4_9","_idct_8x8_9","_idct_16x16_9","_idct_32x32_9","_dequant_10","_idct_4x4_10","_idct_8x8_10","_idct_16x16_10","_idct_32x32_10","_dequant_12","_idct_4x4_12","_idct_8x8_12","_idct_16x16_12","_idct_32x32_12","_dequant_8","_idct_4x4_8","_idct_8x8_8","_idct_16x16_8","_idct_32x32_8","_imdct_and_windowing","_apply_ltp","_update_ltp","_imdct_and_windowing_ld","_imdct_and_windowing_eld","_imdct_and_windowing_960","_ff_h264_chroma_dc_dequant_idct_9_c","_ff_h264_chroma422_dc_dequant_idct_9_c","_ff_h264_chroma_dc_dequant_idct_10_c","_ff_h264_chroma422_dc_dequant_idct_10_c","_ff_h264_chroma_dc_dequant_idct_12_c","_ff_h264_chroma422_dc_dequant_idct_12_c","_ff_h264_chroma_dc_dequant_idct_14_c","_ff_h264_chroma422_dc_dequant_idct_14_c","_ff_h264_chroma_dc_dequant_idct_8_c","_ff_h264_chroma422_dc_dequant_idct_8_c","_hevc_pps_free","_sbr_qmf_post_shuffle_c","_sbr_qmf_deint_neg_c","_sbr_autocorrelate_c","_fft_permute_c","_fft_calc_c","_av_buffer_default_free","_pool_release_buffer","_sha1_transform","_sha256_transform","_pop_arg_long_double",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,0,0,0,0,0,0,0,0,0,0,0,0],cr=[0,"jsCall_viidi_0","jsCall_viidi_1","jsCall_viidi_2","jsCall_viidi_3","jsCall_viidi_4","jsCall_viidi_5","jsCall_viidi_6","jsCall_viidi_7","jsCall_viidi_8","jsCall_viidi_9","jsCall_viidi_10","jsCall_viidi_11","jsCall_viidi_12","jsCall_viidi_13","jsCall_viidi_14","jsCall_viidi_15","jsCall_viidi_16","jsCall_viidi_17","jsCall_viidi_18","jsCall_viidi_19","jsCall_viidi_20","jsCall_viidi_21","jsCall_viidi_22","jsCall_viidi_23","jsCall_viidi_24","jsCall_viidi_25","jsCall_viidi_26","jsCall_viidi_27","jsCall_viidi_28","jsCall_viidi_29","jsCall_viidi_30","jsCall_viidi_31","jsCall_viidi_32","jsCall_viidi_33","jsCall_viidi_34","_vector_dmac_scalar_c","_vector_dmul_scalar_c",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],hr=[0,"jsCall_viifi_0","jsCall_viifi_1","jsCall_viifi_2","jsCall_viifi_3","jsCall_viifi_4","jsCall_viifi_5","jsCall_viifi_6","jsCall_viifi_7","jsCall_viifi_8","jsCall_viifi_9","jsCall_viifi_10","jsCall_viifi_11","jsCall_viifi_12","jsCall_viifi_13","jsCall_viifi_14","jsCall_viifi_15","jsCall_viifi_16","jsCall_viifi_17","jsCall_viifi_18","jsCall_viifi_19","jsCall_viifi_20","jsCall_viifi_21","jsCall_viifi_22","jsCall_viifi_23","jsCall_viifi_24","jsCall_viifi_25","jsCall_viifi_26","jsCall_viifi_27","jsCall_viifi_28","jsCall_viifi_29","jsCall_viifi_30","jsCall_viifi_31","jsCall_viifi_32","jsCall_viifi_33","jsCall_viifi_34","_vector_fmac_scalar_c","_vector_fmul_scalar_c",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],dr=[0,"jsCall_viii_0","jsCall_viii_1","jsCall_viii_2","jsCall_viii_3","jsCall_viii_4","jsCall_viii_5","jsCall_viii_6","jsCall_viii_7","jsCall_viii_8","jsCall_viii_9","jsCall_viii_10","jsCall_viii_11","jsCall_viii_12","jsCall_viii_13","jsCall_viii_14","jsCall_viii_15","jsCall_viii_16","jsCall_viii_17","jsCall_viii_18","jsCall_viii_19","jsCall_viii_20","jsCall_viii_21","jsCall_viii_22","jsCall_viii_23","jsCall_viii_24","jsCall_viii_25","jsCall_viii_26","jsCall_viii_27","jsCall_viii_28","jsCall_viii_29","jsCall_viii_30","jsCall_viii_31","jsCall_viii_32","jsCall_viii_33","jsCall_viii_34","_avcHandleFrame","_handleFrame","_sdt_cb","_pat_cb","_pmt_cb","_scte_data_cb","_m4sl_cb","_chrRangeFromJpeg_c","_chrRangeToJpeg_c","_chrRangeFromJpeg16_c","_chrRangeToJpeg16_c","_rgb15to16_c","_rgb15tobgr24_c","_rgb15to32_c","_rgb16tobgr24_c","_rgb16to32_c","_rgb16to15_c","_rgb24tobgr16_c","_rgb24tobgr15_c","_rgb24tobgr32_c","_rgb32to16_c","_rgb32to15_c","_rgb32tobgr24_c","_rgb24to15_c","_rgb24to16_c","_rgb24tobgr24_c","_shuffle_bytes_0321_c","_shuffle_bytes_2103_c","_shuffle_bytes_1230_c","_shuffle_bytes_3012_c","_shuffle_bytes_3210_c","_rgb32tobgr16_c","_rgb32tobgr15_c","_rgb48tobgr48_bswap","_rgb48tobgr64_bswap","_rgb48to64_bswap","_rgb64to48_bswap","_rgb48tobgr48_nobswap","_rgb48tobgr64_nobswap","_rgb48to64_nobswap","_rgb64tobgr48_nobswap","_rgb64tobgr48_bswap","_rgb64to48_nobswap","_rgb12to15","_rgb15to24","_rgb16to24","_rgb32to24","_rgb24to32","_rgb12tobgr12","_rgb15tobgr15","_rgb16tobgr15","_rgb15tobgr16","_rgb16tobgr16","_rgb15tobgr32","_rgb16tobgr32","_add_residual4x4_9","_add_residual8x8_9","_add_residual16x16_9","_add_residual32x32_9","_transform_rdpcm_9","_add_residual4x4_10","_add_residual8x8_10","_add_residual16x16_10","_add_residual32x32_10","_transform_rdpcm_10","_add_residual4x4_12","_add_residual8x8_12","_add_residual16x16_12","_add_residual32x32_12","_transform_rdpcm_12","_add_residual4x4_8","_add_residual8x8_8","_add_residual16x16_8","_add_residual32x32_8","_transform_rdpcm_8","_just_return","_bswap_buf","_bswap16_buf","_ff_h264_add_pixels4_16_c","_ff_h264_add_pixels4_8_c","_ff_h264_add_pixels8_16_c","_ff_h264_add_pixels8_8_c","_ff_h264_idct_add_9_c","_ff_h264_idct8_add_9_c","_ff_h264_idct_dc_add_9_c","_ff_h264_idct8_dc_add_9_c","_ff_h264_luma_dc_dequant_idct_9_c","_ff_h264_idct_add_10_c","_ff_h264_idct8_add_10_c","_ff_h264_idct_dc_add_10_c","_ff_h264_idct8_dc_add_10_c","_ff_h264_luma_dc_dequant_idct_10_c","_ff_h264_idct_add_12_c","_ff_h264_idct8_add_12_c","_ff_h264_idct_dc_add_12_c","_ff_h264_idct8_dc_add_12_c","_ff_h264_luma_dc_dequant_idct_12_c","_ff_h264_idct_add_14_c","_ff_h264_idct8_add_14_c","_ff_h264_idct_dc_add_14_c","_ff_h264_idct8_dc_add_14_c","_ff_h264_luma_dc_dequant_idct_14_c","_ff_h264_idct_add_8_c","_ff_h264_idct8_add_8_c","_ff_h264_idct_dc_add_8_c","_ff_h264_idct8_dc_add_8_c","_ff_h264_luma_dc_dequant_idct_8_c","_sbr_qmf_deint_bfly_c","_ps_add_squares_c","_ff_imdct_calc_c","_ff_imdct_half_c","_ff_mdct_calc_c","_butterflies_float_c",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,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,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,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],_r=[0,"jsCall_viiii_0","jsCall_viiii_1","jsCall_viiii_2","jsCall_viiii_3","jsCall_viiii_4","jsCall_viiii_5","jsCall_viiii_6","jsCall_viiii_7","jsCall_viiii_8","jsCall_viiii_9","jsCall_viiii_10","jsCall_viiii_11","jsCall_viiii_12","jsCall_viiii_13","jsCall_viiii_14","jsCall_viiii_15","jsCall_viiii_16","jsCall_viiii_17","jsCall_viiii_18","jsCall_viiii_19","jsCall_viiii_20","jsCall_viiii_21","jsCall_viiii_22","jsCall_viiii_23","jsCall_viiii_24","jsCall_viiii_25","jsCall_viiii_26","jsCall_viiii_27","jsCall_viiii_28","jsCall_viiii_29","jsCall_viiii_30","jsCall_viiii_31","jsCall_viiii_32","jsCall_viiii_33","jsCall_viiii_34","_planar_rgb9le_to_y","_planar_rgb10le_to_a","_planar_rgb10le_to_y","_planar_rgb12le_to_a","_planar_rgb12le_to_y","_planar_rgb14le_to_y","_planar_rgb16le_to_a","_planar_rgb16le_to_y","_planar_rgb9be_to_y","_planar_rgb10be_to_a","_planar_rgb10be_to_y","_planar_rgb12be_to_a","_planar_rgb12be_to_y","_planar_rgb14be_to_y","_planar_rgb16be_to_a","_planar_rgb16be_to_y","_planar_rgb_to_a","_planar_rgb_to_y","_gray8aToPacked32","_gray8aToPacked32_1","_gray8aToPacked24","_sws_convertPalette8ToPacked32","_sws_convertPalette8ToPacked24","_intra_pred_2_9","_intra_pred_3_9","_intra_pred_4_9","_intra_pred_5_9","_pred_planar_0_9","_pred_planar_1_9","_pred_planar_2_9","_pred_planar_3_9","_intra_pred_2_10","_intra_pred_3_10","_intra_pred_4_10","_intra_pred_5_10","_pred_planar_0_10","_pred_planar_1_10","_pred_planar_2_10","_pred_planar_3_10","_intra_pred_2_12","_intra_pred_3_12","_intra_pred_4_12","_intra_pred_5_12","_pred_planar_0_12","_pred_planar_1_12","_pred_planar_2_12","_pred_planar_3_12","_intra_pred_2_8","_intra_pred_3_8","_intra_pred_4_8","_intra_pred_5_8","_pred_planar_0_8","_pred_planar_1_8","_pred_planar_2_8","_pred_planar_3_8","_apply_tns","_windowing_and_mdct_ltp","_h264_v_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_mbaff_intra_9_c","_h264_v_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma422_intra_9_c","_h264_h_loop_filter_chroma_mbaff_intra_9_c","_h264_h_loop_filter_chroma422_mbaff_intra_9_c","_h264_v_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_mbaff_intra_10_c","_h264_v_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma422_intra_10_c","_h264_h_loop_filter_chroma_mbaff_intra_10_c","_h264_h_loop_filter_chroma422_mbaff_intra_10_c","_h264_v_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_mbaff_intra_12_c","_h264_v_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma422_intra_12_c","_h264_h_loop_filter_chroma_mbaff_intra_12_c","_h264_h_loop_filter_chroma422_mbaff_intra_12_c","_h264_v_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_mbaff_intra_14_c","_h264_v_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma422_intra_14_c","_h264_h_loop_filter_chroma_mbaff_intra_14_c","_h264_h_loop_filter_chroma422_mbaff_intra_14_c","_h264_v_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_mbaff_intra_8_c","_h264_v_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma422_intra_8_c","_h264_h_loop_filter_chroma_mbaff_intra_8_c","_h264_h_loop_filter_chroma422_mbaff_intra_8_c","_fft15_c","_mdct15","_imdct15_half","_ps_mul_pair_single_c","_ps_hybrid_analysis_ileave_c","_ps_hybrid_synthesis_deint_c","_vector_fmul_c","_vector_dmul_c","_vector_fmul_reverse_c","_av_log_default_callback",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,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,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,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,0,0,0,0,0],pr=[0,"jsCall_viiiid_0","jsCall_viiiid_1","jsCall_viiiid_2","jsCall_viiiid_3","jsCall_viiiid_4","jsCall_viiiid_5","jsCall_viiiid_6","jsCall_viiiid_7","jsCall_viiiid_8","jsCall_viiiid_9","jsCall_viiiid_10","jsCall_viiiid_11","jsCall_viiiid_12","jsCall_viiiid_13","jsCall_viiiid_14","jsCall_viiiid_15","jsCall_viiiid_16","jsCall_viiiid_17","jsCall_viiiid_18","jsCall_viiiid_19","jsCall_viiiid_20","jsCall_viiiid_21","jsCall_viiiid_22","jsCall_viiiid_23","jsCall_viiiid_24","jsCall_viiiid_25","jsCall_viiiid_26","jsCall_viiiid_27","jsCall_viiiid_28","jsCall_viiiid_29","jsCall_viiiid_30","jsCall_viiiid_31","jsCall_viiiid_32","jsCall_viiiid_33","jsCall_viiiid_34",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,0],mr=[0,"jsCall_viiiifii_0","jsCall_viiiifii_1","jsCall_viiiifii_2","jsCall_viiiifii_3","jsCall_viiiifii_4","jsCall_viiiifii_5","jsCall_viiiifii_6","jsCall_viiiifii_7","jsCall_viiiifii_8","jsCall_viiiifii_9","jsCall_viiiifii_10","jsCall_viiiifii_11","jsCall_viiiifii_12","jsCall_viiiifii_13","jsCall_viiiifii_14","jsCall_viiiifii_15","jsCall_viiiifii_16","jsCall_viiiifii_17","jsCall_viiiifii_18","jsCall_viiiifii_19","jsCall_viiiifii_20","jsCall_viiiifii_21","jsCall_viiiifii_22","jsCall_viiiifii_23","jsCall_viiiifii_24","jsCall_viiiifii_25","jsCall_viiiifii_26","jsCall_viiiifii_27","jsCall_viiiifii_28","jsCall_viiiifii_29","jsCall_viiiifii_30","jsCall_viiiifii_31","jsCall_viiiifii_32","jsCall_viiiifii_33","jsCall_viiiifii_34","_sbr_hf_gen_c",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],br=[0,"jsCall_viiiii_0","jsCall_viiiii_1","jsCall_viiiii_2","jsCall_viiiii_3","jsCall_viiiii_4","jsCall_viiiii_5","jsCall_viiiii_6","jsCall_viiiii_7","jsCall_viiiii_8","jsCall_viiiii_9","jsCall_viiiii_10","jsCall_viiiii_11","jsCall_viiiii_12","jsCall_viiiii_13","jsCall_viiiii_14","jsCall_viiiii_15","jsCall_viiiii_16","jsCall_viiiii_17","jsCall_viiiii_18","jsCall_viiiii_19","jsCall_viiiii_20","jsCall_viiiii_21","jsCall_viiiii_22","jsCall_viiiii_23","jsCall_viiiii_24","jsCall_viiiii_25","jsCall_viiiii_26","jsCall_viiiii_27","jsCall_viiiii_28","jsCall_viiiii_29","jsCall_viiiii_30","jsCall_viiiii_31","jsCall_viiiii_32","jsCall_viiiii_33","jsCall_viiiii_34","_planar_rgb9le_to_uv","_planar_rgb10le_to_uv","_planar_rgb12le_to_uv","_planar_rgb14le_to_uv","_planar_rgb16le_to_uv","_planar_rgb9be_to_uv","_planar_rgb10be_to_uv","_planar_rgb12be_to_uv","_planar_rgb14be_to_uv","_planar_rgb16be_to_uv","_planar_rgb_to_uv","_yuv2p010l1_LE_c","_yuv2p010l1_BE_c","_yuv2plane1_16LE_c","_yuv2plane1_16BE_c","_yuv2plane1_9LE_c","_yuv2plane1_9BE_c","_yuv2plane1_10LE_c","_yuv2plane1_10BE_c","_yuv2plane1_12LE_c","_yuv2plane1_12BE_c","_yuv2plane1_14LE_c","_yuv2plane1_14BE_c","_yuv2plane1_floatBE_c","_yuv2plane1_floatLE_c","_yuv2plane1_8_c","_bayer_bggr8_to_rgb24_copy","_bayer_bggr8_to_rgb24_interpolate","_bayer_bggr16le_to_rgb24_copy","_bayer_bggr16le_to_rgb24_interpolate","_bayer_bggr16be_to_rgb24_copy","_bayer_bggr16be_to_rgb24_interpolate","_bayer_rggb8_to_rgb24_copy","_bayer_rggb8_to_rgb24_interpolate","_bayer_rggb16le_to_rgb24_copy","_bayer_rggb16le_to_rgb24_interpolate","_bayer_rggb16be_to_rgb24_copy","_bayer_rggb16be_to_rgb24_interpolate","_bayer_gbrg8_to_rgb24_copy","_bayer_gbrg8_to_rgb24_interpolate","_bayer_gbrg16le_to_rgb24_copy","_bayer_gbrg16le_to_rgb24_interpolate","_bayer_gbrg16be_to_rgb24_copy","_bayer_gbrg16be_to_rgb24_interpolate","_bayer_grbg8_to_rgb24_copy","_bayer_grbg8_to_rgb24_interpolate","_bayer_grbg16le_to_rgb24_copy","_bayer_grbg16le_to_rgb24_interpolate","_bayer_grbg16be_to_rgb24_copy","_bayer_grbg16be_to_rgb24_interpolate","_hevc_h_loop_filter_chroma_9","_hevc_v_loop_filter_chroma_9","_hevc_h_loop_filter_chroma_10","_hevc_v_loop_filter_chroma_10","_hevc_h_loop_filter_chroma_12","_hevc_v_loop_filter_chroma_12","_hevc_h_loop_filter_chroma_8","_hevc_v_loop_filter_chroma_8","_worker_func","_sbr_hf_assemble","_sbr_hf_inverse_filter","_ff_h264_idct_add16_9_c","_ff_h264_idct8_add4_9_c","_ff_h264_idct_add8_9_c","_ff_h264_idct_add8_422_9_c","_ff_h264_idct_add16intra_9_c","_h264_v_loop_filter_luma_9_c","_h264_h_loop_filter_luma_9_c","_h264_h_loop_filter_luma_mbaff_9_c","_h264_v_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma422_9_c","_h264_h_loop_filter_chroma_mbaff_9_c","_h264_h_loop_filter_chroma422_mbaff_9_c","_ff_h264_idct_add16_10_c","_ff_h264_idct8_add4_10_c","_ff_h264_idct_add8_10_c","_ff_h264_idct_add8_422_10_c","_ff_h264_idct_add16intra_10_c","_h264_v_loop_filter_luma_10_c","_h264_h_loop_filter_luma_10_c","_h264_h_loop_filter_luma_mbaff_10_c","_h264_v_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma422_10_c","_h264_h_loop_filter_chroma_mbaff_10_c","_h264_h_loop_filter_chroma422_mbaff_10_c","_ff_h264_idct_add16_12_c","_ff_h264_idct8_add4_12_c","_ff_h264_idct_add8_12_c","_ff_h264_idct_add8_422_12_c","_ff_h264_idct_add16intra_12_c","_h264_v_loop_filter_luma_12_c","_h264_h_loop_filter_luma_12_c","_h264_h_loop_filter_luma_mbaff_12_c","_h264_v_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma422_12_c","_h264_h_loop_filter_chroma_mbaff_12_c","_h264_h_loop_filter_chroma422_mbaff_12_c","_ff_h264_idct_add16_14_c","_ff_h264_idct8_add4_14_c","_ff_h264_idct_add8_14_c","_ff_h264_idct_add8_422_14_c","_ff_h264_idct_add16intra_14_c","_h264_v_loop_filter_luma_14_c","_h264_h_loop_filter_luma_14_c","_h264_h_loop_filter_luma_mbaff_14_c","_h264_v_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma422_14_c","_h264_h_loop_filter_chroma_mbaff_14_c","_h264_h_loop_filter_chroma422_mbaff_14_c","_ff_h264_idct_add16_8_c","_ff_h264_idct8_add4_8_c","_ff_h264_idct_add8_8_c","_ff_h264_idct_add8_422_8_c","_ff_h264_idct_add16intra_8_c","_h264_v_loop_filter_luma_8_c","_h264_h_loop_filter_luma_8_c","_h264_h_loop_filter_luma_mbaff_8_c","_h264_v_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma422_8_c","_h264_h_loop_filter_chroma_mbaff_8_c","_h264_h_loop_filter_chroma422_mbaff_8_c","_postrotate_c","_sbr_hf_g_filt_c","_ps_hybrid_analysis_c","_ps_stereo_interpolate_c","_ps_stereo_interpolate_ipdopd_c","_vector_fmul_window_c","_vector_fmul_add_c",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,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,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,0,0,0,0,0,0],vr=[0,"jsCall_viiiiidd_0","jsCall_viiiiidd_1","jsCall_viiiiidd_2","jsCall_viiiiidd_3","jsCall_viiiiidd_4","jsCall_viiiiidd_5","jsCall_viiiiidd_6","jsCall_viiiiidd_7","jsCall_viiiiidd_8","jsCall_viiiiidd_9","jsCall_viiiiidd_10","jsCall_viiiiidd_11","jsCall_viiiiidd_12","jsCall_viiiiidd_13","jsCall_viiiiidd_14","jsCall_viiiiidd_15","jsCall_viiiiidd_16","jsCall_viiiiidd_17","jsCall_viiiiidd_18","jsCall_viiiiidd_19","jsCall_viiiiidd_20","jsCall_viiiiidd_21","jsCall_viiiiidd_22","jsCall_viiiiidd_23","jsCall_viiiiidd_24","jsCall_viiiiidd_25","jsCall_viiiiidd_26","jsCall_viiiiidd_27","jsCall_viiiiidd_28","jsCall_viiiiidd_29","jsCall_viiiiidd_30","jsCall_viiiiidd_31","jsCall_viiiiidd_32","jsCall_viiiiidd_33","jsCall_viiiiidd_34",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,0],yr=[0,"jsCall_viiiiii_0","jsCall_viiiiii_1","jsCall_viiiiii_2","jsCall_viiiiii_3","jsCall_viiiiii_4","jsCall_viiiiii_5","jsCall_viiiiii_6","jsCall_viiiiii_7","jsCall_viiiiii_8","jsCall_viiiiii_9","jsCall_viiiiii_10","jsCall_viiiiii_11","jsCall_viiiiii_12","jsCall_viiiiii_13","jsCall_viiiiii_14","jsCall_viiiiii_15","jsCall_viiiiii_16","jsCall_viiiiii_17","jsCall_viiiiii_18","jsCall_viiiiii_19","jsCall_viiiiii_20","jsCall_viiiiii_21","jsCall_viiiiii_22","jsCall_viiiiii_23","jsCall_viiiiii_24","jsCall_viiiiii_25","jsCall_viiiiii_26","jsCall_viiiiii_27","jsCall_viiiiii_28","jsCall_viiiiii_29","jsCall_viiiiii_30","jsCall_viiiiii_31","jsCall_viiiiii_32","jsCall_viiiiii_33","jsCall_viiiiii_34","_read_geobtag","_read_apic","_read_chapter","_read_priv","_ff_hyscale_fast_c","_bswap16Y_c","_read_ya16le_gray_c","_read_ya16be_gray_c","_read_ayuv64le_Y_c","_yuy2ToY_c","_uyvyToY_c","_bgr24ToY_c","_bgr16leToY_c","_bgr16beToY_c","_bgr15leToY_c","_bgr15beToY_c","_bgr12leToY_c","_bgr12beToY_c","_rgb24ToY_c","_rgb16leToY_c","_rgb16beToY_c","_rgb15leToY_c","_rgb15beToY_c","_rgb12leToY_c","_rgb12beToY_c","_palToY_c","_monoblack2Y_c","_monowhite2Y_c","_bgr32ToY_c","_bgr321ToY_c","_rgb32ToY_c","_rgb321ToY_c","_rgb48BEToY_c","_rgb48LEToY_c","_bgr48BEToY_c","_bgr48LEToY_c","_rgb64BEToY_c","_rgb64LEToY_c","_bgr64BEToY_c","_bgr64LEToY_c","_p010LEToY_c","_p010BEToY_c","_grayf32ToY16_c","_grayf32ToY16_bswap_c","_rgba64leToA_c","_rgba64beToA_c","_rgbaToA_c","_abgrToA_c","_read_ya16le_alpha_c","_read_ya16be_alpha_c","_read_ayuv64le_A_c","_palToA_c","_put_pcm_9","_hevc_h_loop_filter_luma_9","_hevc_v_loop_filter_luma_9","_put_pcm_10","_hevc_h_loop_filter_luma_10","_hevc_v_loop_filter_luma_10","_put_pcm_12","_hevc_h_loop_filter_luma_12","_hevc_v_loop_filter_luma_12","_put_pcm_8","_hevc_h_loop_filter_luma_8","_hevc_v_loop_filter_luma_8","_pred_dc_9","_pred_angular_0_9","_pred_angular_1_9","_pred_angular_2_9","_pred_angular_3_9","_pred_dc_10","_pred_angular_0_10","_pred_angular_1_10","_pred_angular_2_10","_pred_angular_3_10","_pred_dc_12","_pred_angular_0_12","_pred_angular_1_12","_pred_angular_2_12","_pred_angular_3_12","_pred_dc_8","_pred_angular_0_8","_pred_angular_1_8","_pred_angular_2_8","_pred_angular_3_8","_weight_h264_pixels16_9_c","_weight_h264_pixels8_9_c","_weight_h264_pixels4_9_c","_weight_h264_pixels2_9_c","_weight_h264_pixels16_10_c","_weight_h264_pixels8_10_c","_weight_h264_pixels4_10_c","_weight_h264_pixels2_10_c","_weight_h264_pixels16_12_c","_weight_h264_pixels8_12_c","_weight_h264_pixels4_12_c","_weight_h264_pixels2_12_c","_weight_h264_pixels16_14_c","_weight_h264_pixels8_14_c","_weight_h264_pixels4_14_c","_weight_h264_pixels2_14_c","_weight_h264_pixels16_8_c","_weight_h264_pixels8_8_c","_weight_h264_pixels4_8_c","_weight_h264_pixels2_8_c","_sbr_hf_apply_noise_0","_sbr_hf_apply_noise_1","_sbr_hf_apply_noise_2","_sbr_hf_apply_noise_3","_aes_decrypt","_aes_encrypt","_image_copy_plane",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,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,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,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,0],gr=[0,"jsCall_viiiiiifi_0","jsCall_viiiiiifi_1","jsCall_viiiiiifi_2","jsCall_viiiiiifi_3","jsCall_viiiiiifi_4","jsCall_viiiiiifi_5","jsCall_viiiiiifi_6","jsCall_viiiiiifi_7","jsCall_viiiiiifi_8","jsCall_viiiiiifi_9","jsCall_viiiiiifi_10","jsCall_viiiiiifi_11","jsCall_viiiiiifi_12","jsCall_viiiiiifi_13","jsCall_viiiiiifi_14","jsCall_viiiiiifi_15","jsCall_viiiiiifi_16","jsCall_viiiiiifi_17","jsCall_viiiiiifi_18","jsCall_viiiiiifi_19","jsCall_viiiiiifi_20","jsCall_viiiiiifi_21","jsCall_viiiiiifi_22","jsCall_viiiiiifi_23","jsCall_viiiiiifi_24","jsCall_viiiiiifi_25","jsCall_viiiiiifi_26","jsCall_viiiiiifi_27","jsCall_viiiiiifi_28","jsCall_viiiiiifi_29","jsCall_viiiiiifi_30","jsCall_viiiiiifi_31","jsCall_viiiiiifi_32","jsCall_viiiiiifi_33","jsCall_viiiiiifi_34","_ps_decorrelate_c",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],wr=[0,"jsCall_viiiiiii_0","jsCall_viiiiiii_1","jsCall_viiiiiii_2","jsCall_viiiiiii_3","jsCall_viiiiiii_4","jsCall_viiiiiii_5","jsCall_viiiiiii_6","jsCall_viiiiiii_7","jsCall_viiiiiii_8","jsCall_viiiiiii_9","jsCall_viiiiiii_10","jsCall_viiiiiii_11","jsCall_viiiiiii_12","jsCall_viiiiiii_13","jsCall_viiiiiii_14","jsCall_viiiiiii_15","jsCall_viiiiiii_16","jsCall_viiiiiii_17","jsCall_viiiiiii_18","jsCall_viiiiiii_19","jsCall_viiiiiii_20","jsCall_viiiiiii_21","jsCall_viiiiiii_22","jsCall_viiiiiii_23","jsCall_viiiiiii_24","jsCall_viiiiiii_25","jsCall_viiiiiii_26","jsCall_viiiiiii_27","jsCall_viiiiiii_28","jsCall_viiiiiii_29","jsCall_viiiiiii_30","jsCall_viiiiiii_31","jsCall_viiiiiii_32","jsCall_viiiiiii_33","jsCall_viiiiiii_34","_hScale8To15_c","_hScale8To19_c","_hScale16To19_c","_hScale16To15_c","_yuy2ToUV_c","_yvy2ToUV_c","_uyvyToUV_c","_nv12ToUV_c","_nv21ToUV_c","_palToUV_c","_bswap16UV_c","_read_ayuv64le_UV_c","_p010LEToUV_c","_p010BEToUV_c","_p016LEToUV_c","_p016BEToUV_c","_gbr24pToUV_half_c","_rgb64BEToUV_half_c","_rgb64LEToUV_half_c","_bgr64BEToUV_half_c","_bgr64LEToUV_half_c","_rgb48BEToUV_half_c","_rgb48LEToUV_half_c","_bgr48BEToUV_half_c","_bgr48LEToUV_half_c","_bgr32ToUV_half_c","_bgr321ToUV_half_c","_bgr24ToUV_half_c","_bgr16leToUV_half_c","_bgr16beToUV_half_c","_bgr15leToUV_half_c","_bgr15beToUV_half_c","_bgr12leToUV_half_c","_bgr12beToUV_half_c","_rgb32ToUV_half_c","_rgb321ToUV_half_c","_rgb24ToUV_half_c","_rgb16leToUV_half_c","_rgb16beToUV_half_c","_rgb15leToUV_half_c","_rgb15beToUV_half_c","_rgb12leToUV_half_c","_rgb12beToUV_half_c","_rgb64BEToUV_c","_rgb64LEToUV_c","_bgr64BEToUV_c","_bgr64LEToUV_c","_rgb48BEToUV_c","_rgb48LEToUV_c","_bgr48BEToUV_c","_bgr48LEToUV_c","_bgr32ToUV_c","_bgr321ToUV_c","_bgr24ToUV_c","_bgr16leToUV_c","_bgr16beToUV_c","_bgr15leToUV_c","_bgr15beToUV_c","_bgr12leToUV_c","_bgr12beToUV_c","_rgb32ToUV_c","_rgb321ToUV_c","_rgb24ToUV_c","_rgb16leToUV_c","_rgb16beToUV_c","_rgb15leToUV_c","_rgb15beToUV_c","_rgb12leToUV_c","_rgb12beToUV_c","_yuv2p010lX_LE_c","_yuv2p010lX_BE_c","_yuv2p010cX_c","_yuv2planeX_16LE_c","_yuv2planeX_16BE_c","_yuv2p016cX_c","_yuv2planeX_9LE_c","_yuv2planeX_9BE_c","_yuv2planeX_10LE_c","_yuv2planeX_10BE_c","_yuv2planeX_12LE_c","_yuv2planeX_12BE_c","_yuv2planeX_14LE_c","_yuv2planeX_14BE_c","_yuv2planeX_floatBE_c","_yuv2planeX_floatLE_c","_yuv2planeX_8_c","_yuv2nv12cX_c","_sao_edge_filter_9","_put_hevc_pel_pixels_9","_put_hevc_qpel_h_9","_put_hevc_qpel_v_9","_put_hevc_qpel_hv_9","_put_hevc_epel_h_9","_put_hevc_epel_v_9","_put_hevc_epel_hv_9","_sao_edge_filter_10","_put_hevc_pel_pixels_10","_put_hevc_qpel_h_10","_put_hevc_qpel_v_10","_put_hevc_qpel_hv_10","_put_hevc_epel_h_10","_put_hevc_epel_v_10","_put_hevc_epel_hv_10","_sao_edge_filter_12","_put_hevc_pel_pixels_12","_put_hevc_qpel_h_12","_put_hevc_qpel_v_12","_put_hevc_qpel_hv_12","_put_hevc_epel_h_12","_put_hevc_epel_v_12","_put_hevc_epel_hv_12","_sao_edge_filter_8","_put_hevc_pel_pixels_8","_put_hevc_qpel_h_8","_put_hevc_qpel_v_8","_put_hevc_qpel_hv_8","_put_hevc_epel_h_8","_put_hevc_epel_v_8","_put_hevc_epel_hv_8",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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Er=[0,"jsCall_viiiiiiii_0","jsCall_viiiiiiii_1","jsCall_viiiiiiii_2","jsCall_viiiiiiii_3","jsCall_viiiiiiii_4","jsCall_viiiiiiii_5","jsCall_viiiiiiii_6","jsCall_viiiiiiii_7","jsCall_viiiiiiii_8","jsCall_viiiiiiii_9","jsCall_viiiiiiii_10","jsCall_viiiiiiii_11","jsCall_viiiiiiii_12","jsCall_viiiiiiii_13","jsCall_viiiiiiii_14","jsCall_viiiiiiii_15","jsCall_viiiiiiii_16","jsCall_viiiiiiii_17","jsCall_viiiiiiii_18","jsCall_viiiiiiii_19","jsCall_viiiiiiii_20","jsCall_viiiiiiii_21","jsCall_viiiiiiii_22","jsCall_viiiiiiii_23","jsCall_viiiiiiii_24","jsCall_viiiiiiii_25","jsCall_viiiiiiii_26","jsCall_viiiiiiii_27","jsCall_viiiiiiii_28","jsCall_viiiiiiii_29","jsCall_viiiiiiii_30","jsCall_viiiiiiii_31","jsCall_viiiiiiii_32","jsCall_viiiiiiii_33","jsCall_viiiiiiii_34","_ff_hcscale_fast_c","_bayer_bggr8_to_yv12_copy","_bayer_bggr8_to_yv12_interpolate","_bayer_bggr16le_to_yv12_copy","_bayer_bggr16le_to_yv12_interpolate","_bayer_bggr16be_to_yv12_copy","_bayer_bggr16be_to_yv12_interpolate","_bayer_rggb8_to_yv12_copy","_bayer_rggb8_to_yv12_interpolate","_bayer_rggb16le_to_yv12_copy","_bayer_rggb16le_to_yv12_interpolate","_bayer_rggb16be_to_yv12_copy","_bayer_rggb16be_to_yv12_interpolate","_bayer_gbrg8_to_yv12_copy","_bayer_gbrg8_to_yv12_interpolate","_bayer_gbrg16le_to_yv12_copy","_bayer_gbrg16le_to_yv12_interpolate","_bayer_gbrg16be_to_yv12_copy","_bayer_gbrg16be_to_yv12_interpolate","_bayer_grbg8_to_yv12_copy","_bayer_grbg8_to_yv12_interpolate","_bayer_grbg16le_to_yv12_copy","_bayer_grbg16le_to_yv12_interpolate","_bayer_grbg16be_to_yv12_copy","_bayer_grbg16be_to_yv12_interpolate","_sao_band_filter_9","_put_hevc_pel_uni_pixels_9","_put_hevc_qpel_uni_h_9","_put_hevc_qpel_uni_v_9","_put_hevc_qpel_uni_hv_9","_put_hevc_epel_uni_h_9","_put_hevc_epel_uni_v_9","_put_hevc_epel_uni_hv_9","_sao_band_filter_10","_put_hevc_pel_uni_pixels_10","_put_hevc_qpel_uni_h_10","_put_hevc_qpel_uni_v_10","_put_hevc_qpel_uni_hv_10","_put_hevc_epel_uni_h_10","_put_hevc_epel_uni_v_10","_put_hevc_epel_uni_hv_10","_sao_band_filter_12","_put_hevc_pel_uni_pixels_12","_put_hevc_qpel_uni_h_12","_put_hevc_qpel_uni_v_12","_put_hevc_qpel_uni_hv_12","_put_hevc_epel_uni_h_12","_put_hevc_epel_uni_v_12","_put_hevc_epel_uni_hv_12","_sao_band_filter_8","_put_hevc_pel_uni_pixels_8","_put_hevc_qpel_uni_h_8","_put_hevc_qpel_uni_v_8","_put_hevc_qpel_uni_hv_8","_put_hevc_epel_uni_h_8","_put_hevc_epel_uni_v_8","_put_hevc_epel_uni_hv_8","_biweight_h264_pixels16_9_c","_biweight_h264_pixels8_9_c","_biweight_h264_pixels4_9_c","_biweight_h264_pixels2_9_c","_biweight_h264_pixels16_10_c","_biweight_h264_pixels8_10_c","_biweight_h264_pixels4_10_c","_biweight_h264_pixels2_10_c","_biweight_h264_pixels16_12_c","_biweight_h264_pixels8_12_c","_biweight_h264_pixels4_12_c","_biweight_h264_pixels2_12_c","_biweight_h264_pixels16_14_c","_biweight_h264_pixels8_14_c","_biweight_h264_pixels4_14_c","_biweight_h264_pixels2_14_c","_biweight_h264_pixels16_8_c","_biweight_h264_pixels8_8_c","_biweight_h264_pixels4_8_c","_biweight_h264_pixels2_8_c",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Cr=[0,"jsCall_viiiiiiiid_0","jsCall_viiiiiiiid_1","jsCall_viiiiiiiid_2","jsCall_viiiiiiiid_3","jsCall_viiiiiiiid_4","jsCall_viiiiiiiid_5","jsCall_viiiiiiiid_6","jsCall_viiiiiiiid_7","jsCall_viiiiiiiid_8","jsCall_viiiiiiiid_9","jsCall_viiiiiiiid_10","jsCall_viiiiiiiid_11","jsCall_viiiiiiiid_12","jsCall_viiiiiiiid_13","jsCall_viiiiiiiid_14","jsCall_viiiiiiiid_15","jsCall_viiiiiiiid_16","jsCall_viiiiiiiid_17","jsCall_viiiiiiiid_18","jsCall_viiiiiiiid_19","jsCall_viiiiiiiid_20","jsCall_viiiiiiiid_21","jsCall_viiiiiiiid_22","jsCall_viiiiiiiid_23","jsCall_viiiiiiiid_24","jsCall_viiiiiiiid_25","jsCall_viiiiiiiid_26","jsCall_viiiiiiiid_27","jsCall_viiiiiiiid_28","jsCall_viiiiiiiid_29","jsCall_viiiiiiiid_30","jsCall_viiiiiiiid_31","jsCall_viiiiiiiid_32","jsCall_viiiiiiiid_33","jsCall_viiiiiiiid_34",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,0],Sr=[0,"jsCall_viiiiiiiidi_0","jsCall_viiiiiiiidi_1","jsCall_viiiiiiiidi_2","jsCall_viiiiiiiidi_3","jsCall_viiiiiiiidi_4","jsCall_viiiiiiiidi_5","jsCall_viiiiiiiidi_6","jsCall_viiiiiiiidi_7","jsCall_viiiiiiiidi_8","jsCall_viiiiiiiidi_9","jsCall_viiiiiiiidi_10","jsCall_viiiiiiiidi_11","jsCall_viiiiiiiidi_12","jsCall_viiiiiiiidi_13","jsCall_viiiiiiiidi_14","jsCall_viiiiiiiidi_15","jsCall_viiiiiiiidi_16","jsCall_viiiiiiiidi_17","jsCall_viiiiiiiidi_18","jsCall_viiiiiiiidi_19","jsCall_viiiiiiiidi_20","jsCall_viiiiiiiidi_21","jsCall_viiiiiiiidi_22","jsCall_viiiiiiiidi_23","jsCall_viiiiiiiidi_24","jsCall_viiiiiiiidi_25","jsCall_viiiiiiiidi_26","jsCall_viiiiiiiidi_27","jsCall_viiiiiiiidi_28","jsCall_viiiiiiiidi_29","jsCall_viiiiiiiidi_30","jsCall_viiiiiiiidi_31","jsCall_viiiiiiiidi_32","jsCall_viiiiiiiidi_33","jsCall_viiiiiiiidi_34",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,0],jr=[0,"jsCall_viiiiiiiii_0","jsCall_viiiiiiiii_1","jsCall_viiiiiiiii_2","jsCall_viiiiiiiii_3","jsCall_viiiiiiiii_4","jsCall_viiiiiiiii_5","jsCall_viiiiiiiii_6","jsCall_viiiiiiiii_7","jsCall_viiiiiiiii_8","jsCall_viiiiiiiii_9","jsCall_viiiiiiiii_10","jsCall_viiiiiiiii_11","jsCall_viiiiiiiii_12","jsCall_viiiiiiiii_13","jsCall_viiiiiiiii_14","jsCall_viiiiiiiii_15","jsCall_viiiiiiiii_16","jsCall_viiiiiiiii_17","jsCall_viiiiiiiii_18","jsCall_viiiiiiiii_19","jsCall_viiiiiiiii_20","jsCall_viiiiiiiii_21","jsCall_viiiiiiiii_22","jsCall_viiiiiiiii_23","jsCall_viiiiiiiii_24","jsCall_viiiiiiiii_25","jsCall_viiiiiiiii_26","jsCall_viiiiiiiii_27","jsCall_viiiiiiiii_28","jsCall_viiiiiiiii_29","jsCall_viiiiiiiii_30","jsCall_viiiiiiiii_31","jsCall_viiiiiiiii_32","jsCall_viiiiiiiii_33","jsCall_viiiiiiiii_34","_yuv2rgba32_full_1_c","_yuv2rgbx32_full_1_c","_yuv2argb32_full_1_c","_yuv2xrgb32_full_1_c","_yuv2bgra32_full_1_c","_yuv2bgrx32_full_1_c","_yuv2abgr32_full_1_c","_yuv2xbgr32_full_1_c","_yuv2rgba64le_full_1_c","_yuv2rgbx64le_full_1_c","_yuv2rgba64be_full_1_c","_yuv2rgbx64be_full_1_c","_yuv2bgra64le_full_1_c","_yuv2bgrx64le_full_1_c","_yuv2bgra64be_full_1_c","_yuv2bgrx64be_full_1_c","_yuv2rgb24_full_1_c","_yuv2bgr24_full_1_c","_yuv2rgb48le_full_1_c","_yuv2bgr48le_full_1_c","_yuv2rgb48be_full_1_c","_yuv2bgr48be_full_1_c","_yuv2bgr4_byte_full_1_c","_yuv2rgb4_byte_full_1_c","_yuv2bgr8_full_1_c","_yuv2rgb8_full_1_c","_yuv2rgbx64le_1_c","_yuv2rgba64le_1_c","_yuv2rgbx64be_1_c","_yuv2rgba64be_1_c","_yuv2bgrx64le_1_c","_yuv2bgra64le_1_c","_yuv2bgrx64be_1_c","_yuv2bgra64be_1_c","_yuv2rgba32_1_c","_yuv2rgbx32_1_c","_yuv2rgba32_1_1_c","_yuv2rgbx32_1_1_c","_yuv2rgb16_1_c","_yuv2rgb15_1_c","_yuv2rgb12_1_c","_yuv2rgb8_1_c","_yuv2rgb4_1_c","_yuv2rgb4b_1_c","_yuv2rgb48le_1_c","_yuv2rgb48be_1_c","_yuv2bgr48le_1_c","_yuv2bgr48be_1_c","_yuv2rgb24_1_c","_yuv2bgr24_1_c","_yuv2monowhite_1_c","_yuv2monoblack_1_c","_yuv2yuyv422_1_c","_yuv2yvyu422_1_c","_yuv2uyvy422_1_c","_yuv2ya8_1_c","_yuv2ya16le_1_c","_yuv2ya16be_1_c","_yuy2toyv12_c","_put_hevc_pel_bi_pixels_9","_put_hevc_qpel_bi_h_9","_put_hevc_qpel_bi_v_9","_put_hevc_qpel_bi_hv_9","_put_hevc_epel_bi_h_9","_put_hevc_epel_bi_v_9","_put_hevc_epel_bi_hv_9","_put_hevc_pel_bi_pixels_10","_put_hevc_qpel_bi_h_10","_put_hevc_qpel_bi_v_10","_put_hevc_qpel_bi_hv_10","_put_hevc_epel_bi_h_10","_put_hevc_epel_bi_v_10","_put_hevc_epel_bi_hv_10","_put_hevc_pel_bi_pixels_12","_put_hevc_qpel_bi_h_12","_put_hevc_qpel_bi_v_12","_put_hevc_qpel_bi_hv_12","_put_hevc_epel_bi_h_12","_put_hevc_epel_bi_v_12","_put_hevc_epel_bi_hv_12","_put_hevc_pel_bi_pixels_8","_put_hevc_qpel_bi_h_8","_put_hevc_qpel_bi_v_8","_put_hevc_qpel_bi_hv_8","_put_hevc_epel_bi_h_8","_put_hevc_epel_bi_v_8","_put_hevc_epel_bi_hv_8",0,0,0,0,0],Tr=[0,"jsCall_viiiiiiiiii_0","jsCall_viiiiiiiiii_1","jsCall_viiiiiiiiii_2","jsCall_viiiiiiiiii_3","jsCall_viiiiiiiiii_4","jsCall_viiiiiiiiii_5","jsCall_viiiiiiiiii_6","jsCall_viiiiiiiiii_7","jsCall_viiiiiiiiii_8","jsCall_viiiiiiiiii_9","jsCall_viiiiiiiiii_10","jsCall_viiiiiiiiii_11","jsCall_viiiiiiiiii_12","jsCall_viiiiiiiiii_13","jsCall_viiiiiiiiii_14","jsCall_viiiiiiiiii_15","jsCall_viiiiiiiiii_16","jsCall_viiiiiiiiii_17","jsCall_viiiiiiiiii_18","jsCall_viiiiiiiiii_19","jsCall_viiiiiiiiii_20","jsCall_viiiiiiiiii_21","jsCall_viiiiiiiiii_22","jsCall_viiiiiiiiii_23","jsCall_viiiiiiiiii_24","jsCall_viiiiiiiiii_25","jsCall_viiiiiiiiii_26","jsCall_viiiiiiiiii_27","jsCall_viiiiiiiiii_28","jsCall_viiiiiiiiii_29","jsCall_viiiiiiiiii_30","jsCall_viiiiiiiiii_31","jsCall_viiiiiiiiii_32","jsCall_viiiiiiiiii_33","jsCall_viiiiiiiiii_34","_yuv2rgba32_full_2_c","_yuv2rgbx32_full_2_c","_yuv2argb32_full_2_c","_yuv2xrgb32_full_2_c","_yuv2bgra32_full_2_c","_yuv2bgrx32_full_2_c","_yuv2abgr32_full_2_c","_yuv2xbgr32_full_2_c","_yuv2rgba64le_full_2_c","_yuv2rgbx64le_full_2_c","_yuv2rgba64be_full_2_c","_yuv2rgbx64be_full_2_c","_yuv2bgra64le_full_2_c","_yuv2bgrx64le_full_2_c","_yuv2bgra64be_full_2_c","_yuv2bgrx64be_full_2_c","_yuv2rgb24_full_2_c","_yuv2bgr24_full_2_c","_yuv2rgb48le_full_2_c","_yuv2bgr48le_full_2_c","_yuv2rgb48be_full_2_c","_yuv2bgr48be_full_2_c","_yuv2bgr4_byte_full_2_c","_yuv2rgb4_byte_full_2_c","_yuv2bgr8_full_2_c","_yuv2rgb8_full_2_c","_yuv2rgbx64le_2_c","_yuv2rgba64le_2_c","_yuv2rgbx64be_2_c","_yuv2rgba64be_2_c","_yuv2bgrx64le_2_c","_yuv2bgra64le_2_c","_yuv2bgrx64be_2_c","_yuv2bgra64be_2_c","_yuv2rgba32_2_c","_yuv2rgbx32_2_c","_yuv2rgba32_1_2_c","_yuv2rgbx32_1_2_c","_yuv2rgb16_2_c","_yuv2rgb15_2_c","_yuv2rgb12_2_c","_yuv2rgb8_2_c","_yuv2rgb4_2_c","_yuv2rgb4b_2_c","_yuv2rgb48le_2_c","_yuv2rgb48be_2_c","_yuv2bgr48le_2_c","_yuv2bgr48be_2_c","_yuv2rgb24_2_c","_yuv2bgr24_2_c","_yuv2monowhite_2_c","_yuv2monoblack_2_c","_yuv2yuyv422_2_c","_yuv2yvyu422_2_c","_yuv2uyvy422_2_c","_yuv2ya8_2_c","_yuv2ya16le_2_c","_yuv2ya16be_2_c","_vu9_to_vu12_c","_yvu9_to_yuy2_c","_ff_emulated_edge_mc_8","_ff_emulated_edge_mc_16",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,0,0,0],Ar=[0,"jsCall_viiiiiiiiiii_0","jsCall_viiiiiiiiiii_1","jsCall_viiiiiiiiiii_2","jsCall_viiiiiiiiiii_3","jsCall_viiiiiiiiiii_4","jsCall_viiiiiiiiiii_5","jsCall_viiiiiiiiiii_6","jsCall_viiiiiiiiiii_7","jsCall_viiiiiiiiiii_8","jsCall_viiiiiiiiiii_9","jsCall_viiiiiiiiiii_10","jsCall_viiiiiiiiiii_11","jsCall_viiiiiiiiiii_12","jsCall_viiiiiiiiiii_13","jsCall_viiiiiiiiiii_14","jsCall_viiiiiiiiiii_15","jsCall_viiiiiiiiiii_16","jsCall_viiiiiiiiiii_17","jsCall_viiiiiiiiiii_18","jsCall_viiiiiiiiiii_19","jsCall_viiiiiiiiiii_20","jsCall_viiiiiiiiiii_21","jsCall_viiiiiiiiiii_22","jsCall_viiiiiiiiiii_23","jsCall_viiiiiiiiiii_24","jsCall_viiiiiiiiiii_25","jsCall_viiiiiiiiiii_26","jsCall_viiiiiiiiiii_27","jsCall_viiiiiiiiiii_28","jsCall_viiiiiiiiiii_29","jsCall_viiiiiiiiiii_30","jsCall_viiiiiiiiiii_31","jsCall_viiiiiiiiiii_32","jsCall_viiiiiiiiiii_33","jsCall_viiiiiiiiiii_34","_put_hevc_pel_uni_w_pixels_9","_put_hevc_qpel_uni_w_h_9","_put_hevc_qpel_uni_w_v_9","_put_hevc_qpel_uni_w_hv_9","_put_hevc_epel_uni_w_h_9","_put_hevc_epel_uni_w_v_9","_put_hevc_epel_uni_w_hv_9","_put_hevc_pel_uni_w_pixels_10","_put_hevc_qpel_uni_w_h_10","_put_hevc_qpel_uni_w_v_10","_put_hevc_qpel_uni_w_hv_10","_put_hevc_epel_uni_w_h_10","_put_hevc_epel_uni_w_v_10","_put_hevc_epel_uni_w_hv_10","_put_hevc_pel_uni_w_pixels_12","_put_hevc_qpel_uni_w_h_12","_put_hevc_qpel_uni_w_v_12","_put_hevc_qpel_uni_w_hv_12","_put_hevc_epel_uni_w_h_12","_put_hevc_epel_uni_w_v_12","_put_hevc_epel_uni_w_hv_12","_put_hevc_pel_uni_w_pixels_8","_put_hevc_qpel_uni_w_h_8","_put_hevc_qpel_uni_w_v_8","_put_hevc_qpel_uni_w_hv_8","_put_hevc_epel_uni_w_h_8","_put_hevc_epel_uni_w_v_8","_put_hevc_epel_uni_w_hv_8"],xr=[0,"jsCall_viiiiiiiiiiii_0","jsCall_viiiiiiiiiiii_1","jsCall_viiiiiiiiiiii_2","jsCall_viiiiiiiiiiii_3","jsCall_viiiiiiiiiiii_4","jsCall_viiiiiiiiiiii_5","jsCall_viiiiiiiiiiii_6","jsCall_viiiiiiiiiiii_7","jsCall_viiiiiiiiiiii_8","jsCall_viiiiiiiiiiii_9","jsCall_viiiiiiiiiiii_10","jsCall_viiiiiiiiiiii_11","jsCall_viiiiiiiiiiii_12","jsCall_viiiiiiiiiiii_13","jsCall_viiiiiiiiiiii_14","jsCall_viiiiiiiiiiii_15","jsCall_viiiiiiiiiiii_16","jsCall_viiiiiiiiiiii_17","jsCall_viiiiiiiiiiii_18","jsCall_viiiiiiiiiiii_19","jsCall_viiiiiiiiiiii_20","jsCall_viiiiiiiiiiii_21","jsCall_viiiiiiiiiiii_22","jsCall_viiiiiiiiiiii_23","jsCall_viiiiiiiiiiii_24","jsCall_viiiiiiiiiiii_25","jsCall_viiiiiiiiiiii_26","jsCall_viiiiiiiiiiii_27","jsCall_viiiiiiiiiiii_28","jsCall_viiiiiiiiiiii_29","jsCall_viiiiiiiiiiii_30","jsCall_viiiiiiiiiiii_31","jsCall_viiiiiiiiiiii_32","jsCall_viiiiiiiiiiii_33","jsCall_viiiiiiiiiiii_34","_yuv2rgba32_full_X_c","_yuv2rgbx32_full_X_c","_yuv2argb32_full_X_c","_yuv2xrgb32_full_X_c","_yuv2bgra32_full_X_c","_yuv2bgrx32_full_X_c","_yuv2abgr32_full_X_c","_yuv2xbgr32_full_X_c","_yuv2rgba64le_full_X_c","_yuv2rgbx64le_full_X_c","_yuv2rgba64be_full_X_c","_yuv2rgbx64be_full_X_c","_yuv2bgra64le_full_X_c","_yuv2bgrx64le_full_X_c","_yuv2bgra64be_full_X_c","_yuv2bgrx64be_full_X_c","_yuv2rgb24_full_X_c","_yuv2bgr24_full_X_c","_yuv2rgb48le_full_X_c","_yuv2bgr48le_full_X_c","_yuv2rgb48be_full_X_c","_yuv2bgr48be_full_X_c","_yuv2bgr4_byte_full_X_c","_yuv2rgb4_byte_full_X_c","_yuv2bgr8_full_X_c","_yuv2rgb8_full_X_c","_yuv2gbrp_full_X_c","_yuv2gbrp16_full_X_c","_yuv2rgbx64le_X_c","_yuv2rgba64le_X_c","_yuv2rgbx64be_X_c","_yuv2rgba64be_X_c","_yuv2bgrx64le_X_c","_yuv2bgra64le_X_c","_yuv2bgrx64be_X_c","_yuv2bgra64be_X_c","_yuv2rgba32_X_c","_yuv2rgbx32_X_c","_yuv2rgba32_1_X_c","_yuv2rgbx32_1_X_c","_yuv2rgb16_X_c","_yuv2rgb15_X_c","_yuv2rgb12_X_c","_yuv2rgb8_X_c","_yuv2rgb4_X_c","_yuv2rgb4b_X_c","_yuv2rgb48le_X_c","_yuv2rgb48be_X_c","_yuv2bgr48le_X_c","_yuv2bgr48be_X_c","_yuv2rgb24_X_c","_yuv2bgr24_X_c","_yuv2monowhite_X_c","_yuv2ayuv64le_X_c","_yuv2monoblack_X_c","_yuv2yuyv422_X_c","_yuv2yvyu422_X_c","_yuv2uyvy422_X_c","_yuv2ya8_X_c","_yuv2ya16le_X_c","_yuv2ya16be_X_c","_sao_edge_restore_0_9","_sao_edge_restore_1_9","_sao_edge_restore_0_10","_sao_edge_restore_1_10","_sao_edge_restore_0_12","_sao_edge_restore_1_12","_sao_edge_restore_0_8","_sao_edge_restore_1_8",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Mr=[0,"jsCall_viiiiiiiiiiiiii_0","jsCall_viiiiiiiiiiiiii_1","jsCall_viiiiiiiiiiiiii_2","jsCall_viiiiiiiiiiiiii_3","jsCall_viiiiiiiiiiiiii_4","jsCall_viiiiiiiiiiiiii_5","jsCall_viiiiiiiiiiiiii_6","jsCall_viiiiiiiiiiiiii_7","jsCall_viiiiiiiiiiiiii_8","jsCall_viiiiiiiiiiiiii_9","jsCall_viiiiiiiiiiiiii_10","jsCall_viiiiiiiiiiiiii_11","jsCall_viiiiiiiiiiiiii_12","jsCall_viiiiiiiiiiiiii_13","jsCall_viiiiiiiiiiiiii_14","jsCall_viiiiiiiiiiiiii_15","jsCall_viiiiiiiiiiiiii_16","jsCall_viiiiiiiiiiiiii_17","jsCall_viiiiiiiiiiiiii_18","jsCall_viiiiiiiiiiiiii_19","jsCall_viiiiiiiiiiiiii_20","jsCall_viiiiiiiiiiiiii_21","jsCall_viiiiiiiiiiiiii_22","jsCall_viiiiiiiiiiiiii_23","jsCall_viiiiiiiiiiiiii_24","jsCall_viiiiiiiiiiiiii_25","jsCall_viiiiiiiiiiiiii_26","jsCall_viiiiiiiiiiiiii_27","jsCall_viiiiiiiiiiiiii_28","jsCall_viiiiiiiiiiiiii_29","jsCall_viiiiiiiiiiiiii_30","jsCall_viiiiiiiiiiiiii_31","jsCall_viiiiiiiiiiiiii_32","jsCall_viiiiiiiiiiiiii_33","jsCall_viiiiiiiiiiiiii_34","_put_hevc_pel_bi_w_pixels_9","_put_hevc_qpel_bi_w_h_9","_put_hevc_qpel_bi_w_v_9","_put_hevc_qpel_bi_w_hv_9","_put_hevc_epel_bi_w_h_9","_put_hevc_epel_bi_w_v_9","_put_hevc_epel_bi_w_hv_9","_put_hevc_pel_bi_w_pixels_10","_put_hevc_qpel_bi_w_h_10","_put_hevc_qpel_bi_w_v_10","_put_hevc_qpel_bi_w_hv_10","_put_hevc_epel_bi_w_h_10","_put_hevc_epel_bi_w_v_10","_put_hevc_epel_bi_w_hv_10","_put_hevc_pel_bi_w_pixels_12","_put_hevc_qpel_bi_w_h_12","_put_hevc_qpel_bi_w_v_12","_put_hevc_qpel_bi_w_hv_12","_put_hevc_epel_bi_w_h_12","_put_hevc_epel_bi_w_v_12","_put_hevc_epel_bi_w_hv_12","_put_hevc_pel_bi_w_pixels_8","_put_hevc_qpel_bi_w_h_8","_put_hevc_qpel_bi_w_v_8","_put_hevc_qpel_bi_w_hv_8","_put_hevc_epel_bi_w_h_8","_put_hevc_epel_bi_w_v_8","_put_hevc_epel_bi_w_hv_8"],kr={dd:zi,did:Hi,didd:Vi,fii:Yi,fiii:qi,ii:Xi,iid:Wi,iidiiii:Gi,iii:Ki,iiii:Qi,iiiii:Zi,iiiiii:Ji,iiiiiii:$i,iiiiiiii:er,iiiiij:tr,iiiji:ir,iiijjji:rr,jiiij:nr,jiiji:ar,jiji:sr,v:or,vdiidiiiii:lr,vi:fr,vii:ur,viidi:cr,viifi:hr,viii:dr,viiii:_r,viiiid:pr,viiiifii:mr,viiiii:br,viiiiidd:vr,viiiiii:yr,viiiiiifi:gr,viiiiiii:wr,viiiiiiii:Er,viiiiiiiid:Cr,viiiiiiiidi:Sr,viiiiiiiii:jr,viiiiiiiiii:Tr,viiiiiiiiiii:Ar,viiiiiiiiiiii:xr,viiiiiiiiiiiiii:Mr};function Pr(e){Ie(e,"dd")}function Ir(e){Ie(e,"did")}function Rr(e){Ie(e,"didd")}function Ur(e){Ie(e,"fii")}function Dr(e){Ie(e,"fiii")}function Fr(e){Ie(e,"ii")}function Or(e){Ie(e,"iid")}function Lr(e){Ie(e,"iidiiii")}function Br(e){Ie(e,"iii")}function Nr(e){Ie(e,"iiii")}function zr(e){Ie(e,"iiiii")}function Hr(e){Ie(e,"iiiiii")}function Vr(e){Ie(e,"iiiiiii")}function Yr(e){Ie(e,"iiiiiiii")}function qr(e){Ie(e,"iiiiij")}function Xr(e){Ie(e,"iiiji")}function Wr(e){Ie(e,"iiijjji")}function Gr(e){Ie(e,"jiiij")}function Kr(e){Ie(e,"jiiji")}function Qr(e){Ie(e,"jiji")}function Zr(e){Ie(e,"v")}function Jr(e){Ie(e,"vdiidiiiii")}function $r(e){Ie(e,"vi")}function en(e){Ie(e,"vii")}function tn(e){Ie(e,"viidi")}function rn(e){Ie(e,"viifi")}function nn(e){Ie(e,"viii")}function an(e){Ie(e,"viiii")}function sn(e){Ie(e,"viiiid")}function on(e){Ie(e,"viiiifii")}function ln(e){Ie(e,"viiiii")}function fn(e){Ie(e,"viiiiidd")}function un(e){Ie(e,"viiiiii")}function cn(e){Ie(e,"viiiiiifi")}function hn(e){Ie(e,"viiiiiii")}function dn(e){Ie(e,"viiiiiiii")}function _n(e){Ie(e,"viiiiiiiid")}function pn(e){Ie(e,"viiiiiiiidi")}function mn(e){Ie(e,"viiiiiiiii")}function bn(e){Ie(e,"viiiiiiiiii")}function vn(e){Ie(e,"viiiiiiiiiii")}function yn(e){Ie(e,"viiiiiiiiiiii")}function gn(e){Ie(e,"viiiiiiiiiiiiii")}function wn(e,t){return F[e](t)}function En(e,t,i){return F[e](t,i)}function Cn(e,t,i,r){return F[e](t,i,r)}function Sn(e,t,i){return F[e](t,i)}function jn(e,t,i,r){return F[e](t,i,r)}function Tn(e,t){return F[e](t)}function An(e,t,i){return F[e](t,i)}function xn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Mn(e,t,i){return F[e](t,i)}function kn(e,t,i,r){return F[e](t,i,r)}function Pn(e,t,i,r,n){return F[e](t,i,r,n)}function In(e,t,i,r,n,a){return F[e](t,i,r,n,a)}function Rn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Un(e,t,i,r,n,a,s,o){return F[e](t,i,r,n,a,s,o)}function Dn(e,t,i,r,n,a){return F[e](t,i,r,n,a)}function Fn(e,t,i,r,n){return F[e](t,i,r,n)}function On(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Ln(e,t,i,r,n){return F[e](t,i,r,n)}function Bn(e,t,i,r,n){return F[e](t,i,r,n)}function Nn(e,t,i,r){return F[e](t,i,r)}function zn(e){F[e]()}function Hn(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function Vn(e,t){F[e](t)}function Yn(e,t,i){F[e](t,i)}function qn(e,t,i,r,n){F[e](t,i,r,n)}function Xn(e,t,i,r,n){F[e](t,i,r,n)}function Wn(e,t,i,r){F[e](t,i,r)}function Gn(e,t,i,r,n){F[e](t,i,r,n)}function Kn(e,t,i,r,n,a){F[e](t,i,r,n,a)}function Qn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function Zn(e,t,i,r,n,a){F[e](t,i,r,n,a)}function Jn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function $n(e,t,i,r,n,a,s){F[e](t,i,r,n,a,s)}function ea(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l)}function ta(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function ia(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l)}function ra(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function na(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u)}function aa(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function sa(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u)}function oa(e,t,i,r,n,a,s,o,l,f,u,c){F[e](t,i,r,n,a,s,o,l,f,u,c)}function la(e,t,i,r,n,a,s,o,l,f,u,c,h){F[e](t,i,r,n,a,s,o,l,f,u,c,h)}function fa(e,t,i,r,n,a,s,o,l,f,u,c,h,d,_){F[e](t,i,r,n,a,s,o,l,f,u,c,h,d,_)}var ua={},ca={___buildEnvironment:Et,___lock:Ct,___syscall221:Ft,___syscall3:Ot,___syscall5:Lt,___unlock:Bt,___wasi_fd_close:zt,___wasi_fd_fdstat_get:Vt,___wasi_fd_seek:qt,___wasi_fd_write:Wt,__emscripten_fetch_free:Gt,__memory_base:1024,__table_base:0,_abort:Kt,_clock:Qt,_clock_gettime:$t,_emscripten_asm_const_i:pt,_emscripten_get_heap_size:ei,_emscripten_is_main_browser_thread:ti,_emscripten_memcpy_big:Ci,_emscripten_resize_heap:ri,_emscripten_start_fetch:fi,_fabs:ui,_getenv:ci,_gettimeofday:hi,_gmtime_r:_i,_llvm_exp2_f64:mi,_llvm_log2_f32:bi,_llvm_stackrestore:vi,_llvm_stacksave:yi,_llvm_trunc_f64:gi,_localtime_r:Ei,_nanosleep:ji,_pthread_cond_destroy:Ti,_pthread_cond_init:Ai,_pthread_create:xi,_pthread_join:Mi,_strftime:Di,_sysconf:Fi,_time:Oi,abortStackOverflow:Pe,getTempRet0:H,jsCall_dd:wn,jsCall_did:En,jsCall_didd:Cn,jsCall_fii:Sn,jsCall_fiii:jn,jsCall_ii:Tn,jsCall_iid:An,jsCall_iidiiii:xn,jsCall_iii:Mn,jsCall_iiii:kn,jsCall_iiiii:Pn,jsCall_iiiiii:In,jsCall_iiiiiii:Rn,jsCall_iiiiiiii:Un,jsCall_iiiiij:Dn,jsCall_iiiji:Fn,jsCall_iiijjji:On,jsCall_jiiij:Ln,jsCall_jiiji:Bn,jsCall_jiji:Nn,jsCall_v:zn,jsCall_vdiidiiiii:Hn,jsCall_vi:Vn,jsCall_vii:Yn,jsCall_viidi:qn,jsCall_viifi:Xn,jsCall_viii:Wn,jsCall_viiii:Gn,jsCall_viiiid:Kn,jsCall_viiiifii:Qn,jsCall_viiiii:Zn,jsCall_viiiiidd:Jn,jsCall_viiiiii:$n,jsCall_viiiiiifi:ea,jsCall_viiiiiii:ta,jsCall_viiiiiiii:ia,jsCall_viiiiiiiid:ra,jsCall_viiiiiiiidi:na,jsCall_viiiiiiiii:aa,jsCall_viiiiiiiiii:sa,jsCall_viiiiiiiiiii:oa,jsCall_viiiiiiiiiiii:la,jsCall_viiiiiiiiiiiiii:fa,memory:N,nullFunc_dd:Pr,nullFunc_did:Ir,nullFunc_didd:Rr,nullFunc_fii:Ur,nullFunc_fiii:Dr,nullFunc_ii:Fr,nullFunc_iid:Or,nullFunc_iidiiii:Lr,nullFunc_iii:Br,nullFunc_iiii:Nr,nullFunc_iiiii:zr,nullFunc_iiiiii:Hr,nullFunc_iiiiiii:Vr,nullFunc_iiiiiiii:Yr,nullFunc_iiiiij:qr,nullFunc_iiiji:Xr,nullFunc_iiijjji:Wr,nullFunc_jiiij:Gr,nullFunc_jiiji:Kr,nullFunc_jiji:Qr,nullFunc_v:Zr,nullFunc_vdiidiiiii:Jr,nullFunc_vi:$r,nullFunc_vii:en,nullFunc_viidi:tn,nullFunc_viifi:rn,nullFunc_viii:nn,nullFunc_viiii:an,nullFunc_viiiid:sn,nullFunc_viiiifii:on,nullFunc_viiiii:ln,nullFunc_viiiiidd:fn,nullFunc_viiiiii:un,nullFunc_viiiiiifi:cn,nullFunc_viiiiiii:hn,nullFunc_viiiiiiii:dn,nullFunc_viiiiiiiid:_n,nullFunc_viiiiiiiidi:pn,nullFunc_viiiiiiiii:mn,nullFunc_viiiiiiiiii:bn,nullFunc_viiiiiiiiiii:vn,nullFunc_viiiiiiiiiiii:yn,nullFunc_viiiiiiiiiiiiii:gn,table:Y},ha=d.asm(ua,ca,ue);d.asm=ha;d._AVSniffHttpFlvInit=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffHttpFlvInit.apply(null,arguments)},d._AVSniffStreamInit=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffStreamInit.apply(null,arguments)};var da,_a=d.___emscripten_environ_constructor=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___emscripten_environ_constructor.apply(null,arguments)},pa=(d.___errno_location=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___errno_location.apply(null,arguments)},d.__get_daylight=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_daylight.apply(null,arguments)}),ma=d.__get_timezone=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_timezone.apply(null,arguments)},ba=d.__get_tzname=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_tzname.apply(null,arguments)},va=(d._closeVideo=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._closeVideo.apply(null,arguments)},d._decodeCodecContext=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeCodecContext.apply(null,arguments)},d._decodeHttpFlvVideoFrame=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeHttpFlvVideoFrame.apply(null,arguments)},d._decodeVideoFrame=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeVideoFrame.apply(null,arguments)},d._demuxBox=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._demuxBox.apply(null,arguments)},d._exitMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitMissile.apply(null,arguments)},d._exitTsMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitTsMissile.apply(null,arguments)},d._fflush=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._fflush.apply(null,arguments)},d._free=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._free.apply(null,arguments)}),ya=(d._getAudioCodecID=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getAudioCodecID.apply(null,arguments)},d._getExtensionInfo=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getExtensionInfo.apply(null,arguments)},d._getMediaInfo=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getMediaInfo.apply(null,arguments)},d._getPPS=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPS.apply(null,arguments)},d._getPPSLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPSLen.apply(null,arguments)},d._getPacket=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPacket.apply(null,arguments)},d._getSEI=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEI.apply(null,arguments)},d._getSEILen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEILen.apply(null,arguments)},d._getSPS=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPS.apply(null,arguments)},d._getSPSLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPSLen.apply(null,arguments)},d._getSniffHttpFlvPkg=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkg.apply(null,arguments)},d._getSniffHttpFlvPkgNoCheckProbe=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkgNoCheckProbe.apply(null,arguments)},d._getSniffStreamPkg=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkg.apply(null,arguments)},d._getSniffStreamPkgNoCheckProbe=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkgNoCheckProbe.apply(null,arguments)},d._getVLC=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLC.apply(null,arguments)},d._getVLCLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLCLen.apply(null,arguments)},d._getVPS=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPS.apply(null,arguments)},d._getVPSLen=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPSLen.apply(null,arguments)},d._getVideoCodecID=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVideoCodecID.apply(null,arguments)},d._initMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initMissile.apply(null,arguments)},d._initTsMissile=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initTsMissile.apply(null,arguments)},d._initializeDecoder=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDecoder.apply(null,arguments)},d._initializeDemuxer=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDemuxer.apply(null,arguments)},d._initializeSniffHttpFlvModule=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModule.apply(null,arguments)},d._initializeSniffHttpFlvModuleWithAOpt=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModuleWithAOpt.apply(null,arguments)},d._initializeSniffStreamModule=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModule.apply(null,arguments)},d._initializeSniffStreamModuleWithAOpt=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModuleWithAOpt.apply(null,arguments)},d._main=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._main.apply(null,arguments)},d._malloc=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._malloc.apply(null,arguments)}),ga=(d._pushSniffHttpFlvData=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffHttpFlvData.apply(null,arguments)},d._pushSniffStreamData=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffStreamData.apply(null,arguments)},d._registerPlayer=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._registerPlayer.apply(null,arguments)},d._release=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._release.apply(null,arguments)},d._releaseSniffHttpFlv=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffHttpFlv.apply(null,arguments)},d._releaseSniffStream=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffStream.apply(null,arguments)},d._setCodecType=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._setCodecType.apply(null,arguments)},d.establishStackSpace=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.establishStackSpace.apply(null,arguments)},d.stackAlloc=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackAlloc.apply(null,arguments)}),wa=d.stackRestore=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackRestore.apply(null,arguments)},Ea=d.stackSave=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackSave.apply(null,arguments)},Ca=(d.dynCall_v=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_v.apply(null,arguments)},d.dynCall_vi=function(){return X(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),X(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_vi.apply(null,arguments)});function Sa(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}d.asm=ha,Object.getOwnPropertyDescriptor(d,"intArrayFromString")||(d.intArrayFromString=function(){at("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"intArrayToString")||(d.intArrayToString=function(){at("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),d.ccall=G,d.cwrap=K,Object.getOwnPropertyDescriptor(d,"setValue")||(d.setValue=function(){at("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getValue")||(d.getValue=function(){at("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"allocate")||(d.allocate=function(){at("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getMemory")||(d.getMemory=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"AsciiToString")||(d.AsciiToString=function(){at("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToAscii")||(d.stringToAscii=function(){at("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF8ArrayToString")||(d.UTF8ArrayToString=function(){at("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF8ToString")||(d.UTF8ToString=function(){at("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF8Array")||(d.stringToUTF8Array=function(){at("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF8")||(d.stringToUTF8=function(){at("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF8")||(d.lengthBytesUTF8=function(){at("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF16ToString")||(d.UTF16ToString=function(){at("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF16")||(d.stringToUTF16=function(){at("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF16")||(d.lengthBytesUTF16=function(){at("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF32ToString")||(d.UTF32ToString=function(){at("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF32")||(d.stringToUTF32=function(){at("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF32")||(d.lengthBytesUTF32=function(){at("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"allocateUTF8")||(d.allocateUTF8=function(){at("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackTrace")||(d.stackTrace=function(){at("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPreRun")||(d.addOnPreRun=function(){at("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnInit")||(d.addOnInit=function(){at("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPreMain")||(d.addOnPreMain=function(){at("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnExit")||(d.addOnExit=function(){at("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPostRun")||(d.addOnPostRun=function(){at("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeStringToMemory")||(d.writeStringToMemory=function(){at("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeArrayToMemory")||(d.writeArrayToMemory=function(){at("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeAsciiToMemory")||(d.writeAsciiToMemory=function(){at("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addRunDependency")||(d.addRunDependency=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"removeRunDependency")||(d.removeRunDependency=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"ENV")||(d.ENV=function(){at("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"FS")||(d.FS=function(){at("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"FS_createFolder")||(d.FS_createFolder=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createPath")||(d.FS_createPath=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createDataFile")||(d.FS_createDataFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createPreloadedFile")||(d.FS_createPreloadedFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createLazyFile")||(d.FS_createLazyFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createLink")||(d.FS_createLink=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createDevice")||(d.FS_createDevice=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_unlink")||(d.FS_unlink=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"GL")||(d.GL=function(){at("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"dynamicAlloc")||(d.dynamicAlloc=function(){at("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"loadDynamicLibrary")||(d.loadDynamicLibrary=function(){at("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"loadWebAssemblyModule")||(d.loadWebAssemblyModule=function(){at("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getLEB")||(d.getLEB=function(){at("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getFunctionTables")||(d.getFunctionTables=function(){at("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"alignFunctionTables")||(d.alignFunctionTables=function(){at("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"registerFunctions")||(d.registerFunctions=function(){at("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),d.addFunction=O,Object.getOwnPropertyDescriptor(d,"removeFunction")||(d.removeFunction=function(){at("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getFuncWrapper")||(d.getFuncWrapper=function(){at("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"prettyPrint")||(d.prettyPrint=function(){at("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"makeBigInt")||(d.makeBigInt=function(){at("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"dynCall")||(d.dynCall=function(){at("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getCompilerSetting")||(d.getCompilerSetting=function(){at("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackSave")||(d.stackSave=function(){at("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackRestore")||(d.stackRestore=function(){at("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackAlloc")||(d.stackAlloc=function(){at("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"establishStackSpace")||(d.establishStackSpace=function(){at("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"print")||(d.print=function(){at("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"printErr")||(d.printErr=function(){at("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getTempRet0")||(d.getTempRet0=function(){at("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"setTempRet0")||(d.setTempRet0=function(){at("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"callMain")||(d.callMain=function(){at("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"abort")||(d.abort=function(){at("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"Pointer_stringify")||(d.Pointer_stringify=function(){at("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"warnOnce")||(d.warnOnce=function(){at("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"ALLOC_NORMAL")||Object.defineProperty(d,"ALLOC_NORMAL",{configurable:!0,get:function(){at("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_STACK")||Object.defineProperty(d,"ALLOC_STACK",{configurable:!0,get:function(){at("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_DYNAMIC")||Object.defineProperty(d,"ALLOC_DYNAMIC",{configurable:!0,get:function(){at("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_NONE")||Object.defineProperty(d,"ALLOC_NONE",{configurable:!0,get:function(){at("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"calledRun")||Object.defineProperty(d,"calledRun",{configurable:!0,get:function(){at("'calledRun' 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")}});function ja(e){X(0==Je,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),X(0==Ue.length,"cannot call main when preRun functions remain to be called");var t=(e=e||[]).length+1,i=ga(4*(t+1));pe[i>>2]=oe(m);for(var r=1;r>2)+r]=oe(e[r-1]);pe[(i>>2)+t]=0;try{xa(d._main(t,i),!0)}catch(e){if(e instanceof Sa)return;if("SimulateInfiniteLoop"==e)return void(B=!0);var n=e;e&&"object"===u(e)&&e.stack&&(n=[e,e.stack]),k("exception thrown: "+n),b(1,e)}finally{!0}}function Ta(e){function t(){da||(da=!0,q||(ze(),He(),d.onRuntimeInitialized&&d.onRuntimeInitialized(),Ma&&ja(e),Ye()))}e=e||p,Je>0||(Me(),Ne(),Je>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),t()}),1)):t(),ke()))}function Aa(){var e=M,t=k,i=!1;M=k=function(e){i=!0};try{var r=d._fflush;r&&r(0),["stdout","stderr"].forEach((function(e){var t=Ut.analyzePath("/dev/"+e);if(t){var r=t.object.rdev,n=At.ttys[r];n&&n.output&&n.output.length&&(i=!0)}}))}catch(e){}M=e,k=t,i&&R("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.")}function xa(e,t){Aa(),t&&B&&0===e||(B?t||k("exit("+e+") called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)"):(q=!0,e,Ve(),d.onExit&&d.onExit(e)),b(e,new Sa(e)))}if(et=function e(){da||Ta(),da||(et=e)},d.run=Ta,d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();var Ma=!0;d.noInitialRun&&(Ma=!1),B=!0,Ta(),t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/src/decoder")},{_process:158,buffer:66,crypto:75,fs:64,path:150}],2:[function(e,t,i){"use strict";const r=i;r.bignum=e("bn.js"),r.define=e("./asn1/api").define,r.base=e("./asn1/base"),r.constants=e("./asn1/constants"),r.decoders=e("./asn1/decoders"),r.encoders=e("./asn1/encoders")},{"./asn1/api":3,"./asn1/base":5,"./asn1/constants":9,"./asn1/decoders":11,"./asn1/encoders":14,"bn.js":16}],3:[function(e,t,i){"use strict";const r=e("./encoders"),n=e("./decoders"),a=e("inherits");function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}i.define=function(e,t){return new s(e,t)},s.prototype._createNamed=function(e){const t=this.name;function i(e){this._initNamed(e,t)}return a(i,e),i.prototype._initNamed=function(t,i){e.call(this,t,i)},new i(this)},s.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n[e])),this.decoders[e]},s.prototype.decode=function(e,t,i){return this._getDecoder(t).decode(e,i)},s.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},s.prototype.encode=function(e,t,i){return this._getEncoder(t).encode(e,i)}},{"./decoders":11,"./encoders":14,inherits:136}],4:[function(e,t,i){"use strict";const r=e("inherits"),n=e("../base/reporter").Reporter,a=e("safer-buffer").Buffer;function s(e,t){n.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return o.isEncoderBuffer(e)||(e=new o(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=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(s,n),i.DecoderBuffer=s,s.isDecoderBuffer=function(e){if(e instanceof s)return!0;return"object"==typeof e&&a.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const i=new s(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},i.EncoderBuffer=o,o.isEncoderBuffer=function(e){if(e instanceof o)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},o.prototype.join=function(e,t){return e||(e=a.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(e,t),t+=i.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},{"../base/reporter":7,inherits:136,"safer-buffer":185}],5:[function(e,t,i){"use strict";const r=i;r.Reporter=e("./reporter").Reporter,r.DecoderBuffer=e("./buffer").DecoderBuffer,r.EncoderBuffer=e("./buffer").EncoderBuffer,r.Node=e("./node")},{"./buffer":4,"./node":6,"./reporter":7}],6:[function(e,t,i){"use strict";const r=e("../base/reporter").Reporter,n=e("../base/buffer").EncoderBuffer,a=e("../base/buffer").DecoderBuffer,s=e("minimalistic-assert"),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function f(e,t,i){const r={};this._baseState=r,r.name=i,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())}t.exports=f;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(i){t[i]=e[i]}));const i=new this.constructor(t.parent);return i._baseState=t,i},f.prototype._wrap=function(){const e=this._baseState;l.forEach((function(t){this[t]=function(){const i=new this.constructor(this);return e.children.push(i),i[t].apply(i,arguments)}}),this)},f.prototype._init=function(e){const 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")},f.prototype._useArgs=function(e){const t=this._baseState,i=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==i.length&&(s(null===t.children),t.children=i,i.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;const t={};return Object.keys(e).forEach((function(i){i==(0|i)&&(i|=0);const r=e[i];t[r]=i})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){f.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),o.forEach((function(e){f.prototype[e]=function(){const t=this._baseState,i=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(i),this}})),f.prototype.use=function(e){s(e);const t=this._baseState;return s(null===t.use),t.use=e,this},f.prototype.optional=function(){return this._baseState.optional=!0,this},f.prototype.def=function(e){const t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},f.prototype.explicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},f.prototype.implicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},f.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},f.prototype.key=function(e){const t=this._baseState;return s(null===t.key),t.key=e,this},f.prototype.any=function(){return this._baseState.any=!0,this},f.prototype.choice=function(e){const t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},f.prototype.contains=function(e){const t=this._baseState;return s(null===t.use),t.contains=e,this},f.prototype._decode=function(e,t){const i=this._baseState;if(null===i.parent)return e.wrapResult(i.children[0]._decode(e,t));let r,n=i.default,s=!0,o=null;if(null!==i.key&&(o=e.enterKey(i.key)),i.optional){let r=null;if(null!==i.explicit?r=i.explicit:null!==i.implicit?r=i.implicit:null!==i.tag&&(r=i.tag),null!==r||i.any){if(s=this._peekTag(e,r,i.any),e.isError(s))return s}else{const r=e.save();try{null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(r)}}if(i.obj&&s&&(r=e.enterObject()),s){if(null!==i.explicit){const t=this._decodeTag(e,i.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===i.use&&null===i.choice){let t;i.any&&(t=e.save());const r=this._decodeTag(e,null!==i.implicit?i.implicit:i.tag,i.any);if(e.isError(r))return r;i.any?n=e.raw(t):e=r}if(t&&t.track&&null!==i.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==i.tag&&t.track(e.path(),e.offset,e.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(i){i._decode(e,t)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){const r=new a(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(r,t)}}return i.obj&&s&&(n=e.leaveObject(r)),null===i.key||null===n&&!0!==s?null!==o&&e.exitKey(o):e.leaveKey(o,i.key,n),n},f.prototype._decodeGeneric=function(e,t,i){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],i):/str$/.test(e)?this._decodeStr(t,e,i):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],i):"objid"===e?this._decodeObjid(t,null,null,i):"gentime"===e||"utctime"===e?this._decodeTime(t,e,i):"null_"===e?this._decodeNull(t,i):"bool"===e?this._decodeBool(t,i):"objDesc"===e?this._decodeStr(t,e,i):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,i):t.error("unknown tag: "+e)},f.prototype._getUse=function(e,t){const i=this._baseState;return i.useDecoder=this._use(e,t),s(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},f.prototype._decodeChoice=function(e,t){const i=this._baseState;let r=null,n=!1;return Object.keys(i.choice).some((function(a){const s=e.save(),o=i.choice[a];try{const i=o._decode(e,t);if(e.isError(i))return!1;r={type:a,value:i},n=!0}catch(t){return e.restore(s),!1}return!0}),this),n?r:e.error("Choice not matched")},f.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},f.prototype._encode=function(e,t,i){const r=this._baseState;if(null!==r.default&&r.default===e)return;const n=this._encodeValue(e,t,i);return void 0===n||this._skipDefault(n,t,i)?void 0:n},f.prototype._encodeValue=function(e,t,i){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new r);let a=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}let s=null,o=!1;if(n.any)a=this._createEncoderBuffer(e);else if(n.choice)a=this._encodeChoice(e,t);else if(n.contains)s=this._getUse(n.contains,i)._encode(e,t),o=!0;else if(n.children)s=n.children.map((function(i){if("null_"===i._baseState.tag)return i._encode(null,t,e);if(null===i._baseState.key)return t.error("Child should have a key");const r=t.enterKey(i._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const n=i._encode(e[i._baseState.key],t,e);return t.leaveKey(r),n}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const i=this.clone();i._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(i){const r=this._baseState;return this._getUse(r.args[0],e)._encode(i,t)}),i))}else null!==n.use?a=this._getUse(n.use,i)._encode(e,t):(s=this._encodePrimitive(n.tag,e),o=!0);if(!n.any&&null===n.choice){const e=null!==n.implicit?n.implicit:n.tag,i=null===n.implicit?"universal":"context";null===e?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(a=this._encodeComposite(e,o,i,s))}return null!==n.explicit&&(a=this._encodeComposite(n.explicit,!1,"context",a)),a},f.prototype._encodeChoice=function(e,t){const i=this._baseState,r=i.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(e.value,t)},f.prototype._encodePrimitive=function(e,t){const i=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&i.args)return this._encodeObjid(t,i.reverseArgs[0],i.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,i.args&&i.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},f.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},f.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},{"../base/buffer":4,"../base/reporter":7,"minimalistic-assert":142}],7:[function(e,t,i){"use strict";const r=e("inherits");function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function a(e,t){this.path=e,this.rethrow(t)}i.Reporter=n,n.prototype.isError=function(e){return e instanceof a},n.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,i){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=i)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){const t=this._reporterState,i=t.obj;return t.obj=e,i},n.prototype.error=function(e){let t;const i=this._reporterState,r=e instanceof a;if(t=r?e:new a(i.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!i.options.partial)throw t;return r||i.errors.push(t),t},n.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(a,Error),a.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:136}],8:[function(e,t,i){"use strict";function r(e){const t={};return Object.keys(e).forEach((function(i){(0|i)==i&&(i|=0);const r=e[i];t[r]=i})),t}i.tagClass={0:"universal",1:"application",2:"context",3:"private"},i.tagClassByName=r(i.tagClass),i.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"},i.tagByName=r(i.tag)},{}],9:[function(e,t,i){"use strict";const r=i;r._reverse=function(e){const t={};return Object.keys(e).forEach((function(i){(0|i)==i&&(i|=0);const r=e[i];t[r]=i})),t},r.der=e("./der")},{"./der":8}],10:[function(e,t,i){"use strict";const r=e("inherits"),n=e("bn.js"),a=e("../base/buffer").DecoderBuffer,s=e("../base/node"),o=e("../constants/der");function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){s.call(this,"der",e)}function u(e,t){let i=e.readUInt8(t);if(e.isError(i))return i;const r=o.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){let r=i;for(i=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;i<<=7,i|=127&r}}else i&=31;return{cls:r,primitive:n,tag:i,tagStr:o.tag[i]}}function c(e,t,i){let r=e.readUInt8(i);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const n=127&r;if(n>4)return e.error("length octect is too long");r=0;for(let t=0;t=31)return r.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=s.tagClassByName[i||"universal"]<<6,n}(e,t,i,this.reporter);if(r.length<128){const e=n.alloc(2);return e[0]=a,e[1]=r.length,this._createEncoderBuffer([e,r])}let o=1;for(let e=r.length;e>=256;e>>=8)o++;const l=n.alloc(2+o);l[0]=a,l[1]=128|o;for(let e=1+o,t=r.length;t>0;e--,t>>=8)l[e]=255&t;return this._createEncoderBuffer([l,r])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=n.alloc(2*e.length);for(let i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let t=0;t=128;i>>=7)r++}const a=n.alloc(r);let s=a.length-1;for(let t=e.length-1;t>=0;t--){let i=e[t];for(a[s--]=127&i;(i>>=7)>0;)a[s--]=128|127&i}return this._createEncoderBuffer(a)},l.prototype._encodeTime=function(e,t){let i;const r=new Date(e);return"gentime"===t?i=[f(r.getUTCFullYear()),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?i=[f(r.getUTCFullYear()%100),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(i,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.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&&!n.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=n.from(t)}if(n.isBuffer(e)){let t=e.length;0===e.length&&t++;const i=n.alloc(t);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let i=1;for(let t=e;t>=256;t>>=8)i++;const r=new Array(i);for(let t=r.length-1;t>=0;t--)r[t]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(n.from(r))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,i){const r=this._baseState;let n;if(null===r.default)return!1;const a=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,i).join()),a.length!==r.defaultBuffer.length)return!1;for(n=0;n=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function l(e,t,i,r){for(var n=0,a=Math.min(e.length,i),s=t;s=49?o-49+10:o>=17?o-17+10:o}return n}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,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6)n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,c=67108863&l,h=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=h;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+c)/67108864|0,c=67108863&s}i.words[f]=0|c,l=0|u}return 0!==l?i.words[f]=0|l:i.length--,i.strip()}a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?f[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--)}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var h=u[e],d=c[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modn(d).toString(e);i=(_=_.idivn(d)).isZero()?p+i:f[h-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!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&&r(!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 r(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var s,o,l="le"===t,f=new e(a),u=this.clone();if(l){for(o=0;!u.isZero();o++)s=u.andln(255),u.iushrn(8),f[o]=s;for(;o=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;for(;0!==n&&a>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==a&&s>26,this.words[s]=67108863&t;if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,X=0|o[2],W=8191&X,G=X>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],ce=8191&ue,he=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(c,z))|0)+((8191&(n=(n=Math.imul(c,H))+Math.imul(h,z)|0))<<13)|0;f=((a=Math.imul(h,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(c,Y)|0)|0)+((8191&(n=(n=n+Math.imul(c,q)|0)+Math.imul(h,Y)|0))<<13)|0;f=((a=a+Math.imul(h,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(h,W)|0))<<13)|0;f=((a=a+Math.imul(h,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,W)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,Z)|0)+Math.imul(h,Q)|0))<<13)|0;f=((a=a+Math.imul(h,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,W)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,W)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,ee)|0)+Math.imul(h,$)|0))<<13)|0;f=((a=a+Math.imul(h,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,W)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(c,ie)|0)|0)+((8191&(n=(n=n+Math.imul(c,re)|0)+Math.imul(h,ie)|0))<<13)|0;f=((a=a+Math.imul(h,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,W)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(c,ae)|0)|0)+((8191&(n=(n=n+Math.imul(c,se)|0)+Math.imul(h,ae)|0))<<13)|0;f=((a=a+Math.imul(h,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,W)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(c,le)|0)|0)+((8191&(n=(n=n+Math.imul(c,fe)|0)+Math.imul(h,le)|0))<<13)|0;f=((a=a+Math.imul(h,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,W)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(c,ce)|0)|0)+((8191&(n=(n=n+Math.imul(c,he)|0)+Math.imul(h,ce)|0))<<13)|0;f=((a=a+Math.imul(h,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,ce)|0,n=(n=n+Math.imul(_,he)|0)+Math.imul(p,ce)|0,a=a+Math.imul(p,he)|0;var je=(f+(r=r+Math.imul(c,_e)|0)|0)+((8191&(n=(n=n+Math.imul(c,pe)|0)+Math.imul(h,_e)|0))<<13)|0;f=((a=a+Math.imul(h,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,W)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,ce)|0,n=(n=n+Math.imul(b,he)|0)+Math.imul(v,ce)|0,a=a+Math.imul(v,he)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,W),n=(n=Math.imul(L,G))+Math.imul(B,W)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,ce)|0,n=(n=n+Math.imul(g,he)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,he)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,ce)|0,n=(n=n+Math.imul(C,he)|0)+Math.imul(S,ce)|0,a=a+Math.imul(S,he)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,ce)|0,n=(n=n+Math.imul(T,he)|0)+Math.imul(A,ce)|0,a=a+Math.imul(A,he)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,ce)|0,n=(n=n+Math.imul(M,he)|0)+Math.imul(k,ce)|0,a=a+Math.imul(k,he)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(R,ce)|0,a=a+Math.imul(R,he)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,ce)|0,n=(n=n+Math.imul(D,he)|0)+Math.imul(F,ce)|0,a=a+Math.imul(F,he)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,ce),n=(n=Math.imul(L,he))+Math.imul(B,ce)|0,a=Math.imul(B,he);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i};function _(e,t,i){return(new p).mulp(e,t,i)}function p(e,t){this.x=e,this.y=t}Math.imul||(d=h),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):i<63?h(this,e,t):i<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863}i.words[a]=o,r=s,s=n}return 0!==r?i.words[a]=r:i.length--,i.strip()}(this,e,t):_(this,e,t)},p.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;return r},p.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;for(s=2*t;s>=26,t+=n/67108864|0,t+=a>>>26,this.words[i]=67108863&a}return 0!==t&&(this.words[i]=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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n}return t}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var c=0|this.words[f];this.words[f]=u<<26-a|c>>>a,u=c&o}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a}for(;n>26,this.words[n+i]=67108863&a;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;c--){var h=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(h=Math.min(h/s|0,67108863),r._ishlnsubmul(n,h,c);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);o&&(o.words[c]=h)}return o&&o.strip(),r.strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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);var n,s,o},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);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){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++f;for(var u=i.clone(),c=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(c)),n.iushrn(1),s.iushrn(1);for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1);if(_>0)for(i.iushrn(_);_-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(c)),o.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s))}return{a:o,b:l,gcd:i.iushln(f)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var c=0,h=1;0==(i.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(i.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s))}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var a=t;t=i,i=a}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 E(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){E.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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},n(v,b),v.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new g;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);)u.redIAdd(l);for(var c=this.pow(u,n),h=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++)p=p.redSqr();r(m<_);var b=this.pow(c,new a(1).iushln(_-m-1));h=h.redMul(b),c=b.redSqr(),d=d.redMul(c),_=m}return h},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var c=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==c||0!==s?(s<<=1,s|=c,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0}l=26}return n},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new C(e)},n(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:20}],17:[function(e,t,i){"use strict";i.byteLength=function(e){var t=f(e),i=t[0],r=t[1];return 3*(i+r)/4-r},i.toByteArray=function(e){var t,i,r=f(e),s=r[0],o=r[1],l=new a(function(e,t,i){return 3*(t+i)/4-i}(0,s,o)),u=0,c=o>0?s-4:s;for(i=0;i>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===o&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,l[u++]=255&t);1===o&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},i.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],s=0,o=i-n;so?o:s+16383));1===n?(t=e[i-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function u(e,t,i){for(var n,a,s=[],o=t;o>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],18:[function(e,t,i){!function(t,i){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function a(e,t,i){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var s;"object"==typeof t?t.exports=a:i.BN=a,a.BN=a,a.wordSize=26;try{s=e("buffer").Buffer}catch(e){}function o(e,t,i){for(var n=0,a=Math.min(e.length,i),s=0,o=t;o=49&&f<=54?f-49+10:f>=17&&f<=22?f-17+10:f,s|=l}return r(!(240&s),"Invalid character in "+e),n}function l(e,t,i,n){for(var a=0,s=0,o=Math.min(e.length,i),l=t;l=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&s0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this._strip(),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6)n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this._strip()},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){a.prototype.inspect=u}else a.prototype.inspect=u;function u(){return(this.red?""}var c=["","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"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?c[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--)}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var f=h[e],u=d[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modrn(u).toString(e);i=(_=_.idivn(u)).isZero()?p+i:c[f-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function _(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,c=67108863&l,h=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=h;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+c)/67108864|0,c=67108863&s}i.words[f]=0|c,l=0|u}return 0!==l?i.words[f]=0|l:i.length--,i._strip()}a.prototype.toArrayLike=function(e,t,i){this._strip();var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,n),s},a.prototype._toArrayLikeLE=function(e,t){for(var i=0,r=0,n=0,a=0;n>8&255),i>16&255),6===a?(i>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(i=0&&(e[i--]=s>>8&255),i>=0&&(e[i--]=s>>16&255),6===a?(i>=0&&(e[i--]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(i>=0)for(e[i--]=r;i>=0;)e[i--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;for(;0!==n&&a>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==a&&s>26,this.words[s]=67108863&t;if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,X=0|o[2],W=8191&X,G=X>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],ce=8191&ue,he=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(c,z))|0)+((8191&(n=(n=Math.imul(c,H))+Math.imul(h,z)|0))<<13)|0;f=((a=Math.imul(h,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(c,Y)|0)|0)+((8191&(n=(n=n+Math.imul(c,q)|0)+Math.imul(h,Y)|0))<<13)|0;f=((a=a+Math.imul(h,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(c,W)|0)|0)+((8191&(n=(n=n+Math.imul(c,G)|0)+Math.imul(h,W)|0))<<13)|0;f=((a=a+Math.imul(h,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,W)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,W)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(c,Q)|0)|0)+((8191&(n=(n=n+Math.imul(c,Z)|0)+Math.imul(h,Q)|0))<<13)|0;f=((a=a+Math.imul(h,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,W)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,W)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,ee)|0)+Math.imul(h,$)|0))<<13)|0;f=((a=a+Math.imul(h,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,W)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(c,ie)|0)|0)+((8191&(n=(n=n+Math.imul(c,re)|0)+Math.imul(h,ie)|0))<<13)|0;f=((a=a+Math.imul(h,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,W)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(c,ae)|0)|0)+((8191&(n=(n=n+Math.imul(c,se)|0)+Math.imul(h,ae)|0))<<13)|0;f=((a=a+Math.imul(h,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,W)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(c,le)|0)|0)+((8191&(n=(n=n+Math.imul(c,fe)|0)+Math.imul(h,le)|0))<<13)|0;f=((a=a+Math.imul(h,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,W)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(c,ce)|0)|0)+((8191&(n=(n=n+Math.imul(c,he)|0)+Math.imul(h,ce)|0))<<13)|0;f=((a=a+Math.imul(h,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,ce)|0,n=(n=n+Math.imul(_,he)|0)+Math.imul(p,ce)|0,a=a+Math.imul(p,he)|0;var je=(f+(r=r+Math.imul(c,_e)|0)|0)+((8191&(n=(n=n+Math.imul(c,pe)|0)+Math.imul(h,_e)|0))<<13)|0;f=((a=a+Math.imul(h,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,W)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,ce)|0,n=(n=n+Math.imul(b,he)|0)+Math.imul(v,ce)|0,a=a+Math.imul(v,he)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,W),n=(n=Math.imul(L,G))+Math.imul(B,W)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,ce)|0,n=(n=n+Math.imul(g,he)|0)+Math.imul(w,ce)|0,a=a+Math.imul(w,he)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,ce)|0,n=(n=n+Math.imul(C,he)|0)+Math.imul(S,ce)|0,a=a+Math.imul(S,he)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,ce)|0,n=(n=n+Math.imul(T,he)|0)+Math.imul(A,ce)|0,a=a+Math.imul(A,he)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,ce)|0,n=(n=n+Math.imul(M,he)|0)+Math.imul(k,ce)|0,a=a+Math.imul(k,he)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(R,ce)|0,a=a+Math.imul(R,he)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,ce)|0,n=(n=n+Math.imul(D,he)|0)+Math.imul(F,ce)|0,a=a+Math.imul(F,he)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,ce),n=(n=Math.imul(L,he))+Math.imul(B,ce)|0,a=Math.imul(B,he);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i};function m(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863}i.words[a]=o,r=s,s=n}return 0!==r?i.words[a]=r:i.length--,i._strip()}function b(e,t,i){return m(e,t,i)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=_),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):i<63?_(this,e,t):i<1024?m(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;for(s=2*t;s>=26,i+=a/67108864|0,i+=s>>>26,this.words[n]=67108863&s}return 0!==i&&(this.words[n]=i,this.length++),t?this.ineg():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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n&1}return t}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var c=0|this.words[f];this.words[f]=u<<26-a|c>>>a,u=c&o}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a}for(;n>26,this.words[n+i]=67108863&a;if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;c--){var h=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(h=Math.min(h/s|0,67108863),r._ishlnsubmul(n,h,c);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);o&&(o.words[c]=h)}return o&&o._strip(),r._strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,s,o},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(i*n+(0|this.words[a]))%e;return t?-n:n},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var a=(0|this.words[n])+67108864*i;this.words[n]=a/e|0,i=a%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++f;for(var u=i.clone(),c=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(c)),n.iushrn(1),s.iushrn(1);for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1);if(_>0)for(i.iushrn(_);_-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(c)),o.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s))}return{a:o,b:l,gcd:i.iushln(f)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var c=0,h=1;0==(i.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(i.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s))}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var a=t;t=i,i=a}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 j(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(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 w(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){j.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)}g.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},n(w,g),w.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new E;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},j.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},j.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},j.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},j.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},j.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},j.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},j.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},j.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},j.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},j.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},j.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},j.prototype.isqr=function(e){return this.imul(e,e.clone())},j.prototype.sqr=function(e){return this.mul(e,e)},j.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);)u.redIAdd(l);for(var c=this.pow(u,n),h=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++)p=p.redSqr();r(m<_);var b=this.pow(c,new a(1).iushln(_-m-1));h=h.redMul(b),c=b.redSqr(),d=d.redMul(c),_=m}return h},j.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},j.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var c=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==c||0!==s?(s<<=1,s|=c,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0}l=26}return n},j.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},j.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new T(e)},n(T,j),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:20}],19:[function(e,t,i){var r;function n(e){this.rand=e}if(t.exports=function(e){return r||(r=new n(null)),r.generate(e)},t.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i>>24]^u[_>>>16&255]^c[p>>>8&255]^h[255&m]^t[b++],s=f[_>>>24]^u[p>>>16&255]^c[m>>>8&255]^h[255&d]^t[b++],o=f[p>>>24]^u[m>>>16&255]^c[d>>>8&255]^h[255&_]^t[b++],l=f[m>>>24]^u[d>>>16&255]^c[_>>>8&255]^h[255&p]^t[b++],d=a,_=s,p=o,m=l;return a=(r[d>>>24]<<24|r[_>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[b++],s=(r[_>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&d])^t[b++],o=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[d>>>8&255]<<8|r[255&_])^t[b++],l=(r[m>>>24]<<24|r[d>>>16&255]<<16|r[_>>>8&255]<<8|r[255&p])^t[b++],[a>>>=0,s>>>=0,o>>>=0,l>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var i=[],r=[],n=[[],[],[],[]],a=[[],[],[],[]],s=0,o=0,l=0;l<256;++l){var f=o^o<<1^o<<2^o<<3^o<<4;f=f>>>8^255&f^99,i[s]=f,r[f]=s;var u=e[s],c=e[u],h=e[c],d=257*e[f]^16843008*f;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*h^65537*c^257*u^16843008*s,a[0][f]=d<<24|d>>>8,a[1][f]=d<<16|d>>>16,a[2][f]=d<<8|d>>>24,a[3][f]=d,0===s?s=o=1:(s=u^e[e[e[h^u]]],o^=e[e[o]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:a}}();function f(e){this._key=n(e),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var e=this._key,t=e.length,i=t+6,r=4*(i+1),n=[],a=0;a>>24,s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s],s^=o[a/t|0]<<24):t>6&&a%t==4&&(s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s]),n[a]=n[a-t]^s}for(var f=[],u=0;u>>24]]^l.INV_SUB_MIX[1][l.SBOX[h>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[h>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&h]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(e){return s(e=n(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},f.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),i=r.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[1],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[3],12),i},f.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var i=s(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),a=r.allocUnsafe(16);return a.writeUInt32BE(i[0],0),a.writeUInt32BE(i[3],4),a.writeUInt32BE(i[2],8),a.writeUInt32BE(i[1],12),a},f.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=f},{"safe-buffer":184}],22:[function(e,t,i){var r=e("./aes"),n=e("safe-buffer").Buffer,a=e("cipher-base"),s=e("inherits"),o=e("./ghash"),l=e("buffer-xor"),f=e("./incr32");function u(e,t,i,s){a.call(this);var l=n.alloc(4,0);this._cipher=new r.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new o(u),i=function(e,t,i){if(12===t.length)return e._finID=n.concat([t,n.from([0,0,0,1])]),n.concat([t,n.from([0,0,0,2])]);var r=new o(i),a=t.length,s=a%16;r.update(t),s&&(s=16-s,r.update(n.alloc(s,0))),r.update(n.alloc(8,0));var l=8*a,u=n.alloc(8);u.writeUIntBE(l,0,8),r.update(u),e._finID=r.state;var c=n.from(e._finID);return f(c),c}(this,i,u),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(u,a),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=n.alloc(t,0),this._ghash.update(t))}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var i=0;e.length!==t.length&&i++;for(var r=Math.min(e.length,t.length),n=0;n16)throw new Error("unable to decrypt data");var i=-1;for(;++i16)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},c.prototype.flush=function(){if(this.cache.length)return this.cache},i.createDecipher=function(e,t){var i=a[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=f(t,!1,i.key,i.iv);return h(e,r.key,r.iv)},i.createDecipheriv=h},{"./aes":21,"./authCipher":22,"./modes":34,"./streamCipher":37,"cipher-base":67,evp_bytestokey:105,inherits:136,"safe-buffer":184}],25:[function(e,t,i){var r=e("./modes"),n=e("./authCipher"),a=e("safe-buffer").Buffer,s=e("./streamCipher"),o=e("cipher-base"),l=e("./aes"),f=e("evp_bytestokey");function u(e,t,i){o.call(this),this._cache=new h,this._cipher=new l.AES(t),this._prev=a.from(i),this._mode=e,this._autopadding=!0}e("inherits")(u,o),u.prototype._update=function(e){var t,i;this._cache.add(e);for(var r=[];t=this._cache.get();)i=this._mode.encrypt(this,t),r.push(i);return a.concat(r)};var c=a.alloc(16,16);function h(){this.cache=a.allocUnsafe(0)}function d(e,t,i){var o=r[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=a.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof i&&(i=a.from(i)),"GCM"!==o.mode&&i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new s(o.module,t,i):"auth"===o.type?new n(o.module,t,i):new u(o.module,t,i)}u.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(c))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=a.concat([this.cache,e])},h.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},h.prototype.flush=function(){for(var e=16-this.cache.length,t=a.allocUnsafe(e),i=-1;++i>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=a(n)},s.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(a([0,e,0,t])),this.state},t.exports=s},{"safe-buffer":184}],27:[function(e,t,i){t.exports=function(e){for(var t,i=e.length;i--;){if(255!==(t=e.readUInt8(i))){t++,e.writeUInt8(t,i);break}e.writeUInt8(0,i)}}},{}],28:[function(e,t,i){var r=e("buffer-xor");i.encrypt=function(e,t){var i=r(t,e._prev);return e._prev=e._cipher.encryptBlock(i),e._prev},i.decrypt=function(e,t){var i=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return r(n,i)}},{"buffer-xor":65}],29:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("buffer-xor");function a(e,t,i){var a=t.length,s=n(t,e._cache);return e._cache=e._cache.slice(a),e._prev=r.concat([e._prev,i?t:s]),s}i.encrypt=function(e,t,i){for(var n,s=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){s=r.concat([s,a(e,t,i)]);break}n=e._cache.length,s=r.concat([s,a(e,t.slice(0,n),i)]),t=t.slice(n)}return s}},{"buffer-xor":65,"safe-buffer":184}],30:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t,i){for(var r,n,s=-1,o=0;++s<8;)r=t&1<<7-s?128:0,o+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^r))>>s%8,e._prev=a(e._prev,i?r:n);return o}function a(e,t){var i=e.length,n=-1,a=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++n>7;return a}i.encrypt=function(e,t,i){for(var a=t.length,s=r.allocUnsafe(a),o=-1;++o=0||!i.umod(e.prime1)||!i.umod(e.prime2);)i=new r(n(t));return i}t.exports=a,a.getr=s}).call(this,e("buffer").Buffer)},{"bn.js":42,buffer:66,randombytes:166}],42:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],43:[function(e,t,i){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":44}],44:[function(e,t,i){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"}}},{}],45:[function(e,t,i){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"}},{}],46:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hash"),a=e("readable-stream"),s=e("inherits"),o=e("./sign"),l=e("./verify"),f=e("./algorithms.json");function u(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function c(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new u(e)}function d(e){return new c(e)}Object.keys(f).forEach((function(e){f[e].id=r.from(f[e].id,"hex"),f[e.toLowerCase()]=f[e]})),s(u,a.Writable),u.prototype._write=function(e,t,i){this._hash.update(e),i()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var i=this._hash.digest(),r=o(i,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},s(c,a.Writable),c.prototype._write=function(e,t,i){this._hash.update(e),i()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},c.prototype.verify=function(e,t,i){"string"==typeof t&&(t=r.from(t,i)),this.end();var n=this._hash.digest();return l(t,n,e,this._signType,this._tag)},t.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},{"./algorithms.json":44,"./sign":47,"./verify":48,"create-hash":71,inherits:136,"readable-stream":63,"safe-buffer":184}],47:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hmac"),a=e("browserify-rsa"),s=e("elliptic").ec,o=e("bn.js"),l=e("parse-asn1"),f=e("./curves.json");function u(e,t,i,a){if((e=r.from(e.toArray())).length0&&i.ishrn(r),i}function h(e,t,i){var a,s;do{for(a=r.alloc(0);8*a.length=t)throw new Error("invalid sig")}t.exports=function(e,t,i,f,u){var c=s(i);if("ec"===c.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=o[i.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var n=new a(r),s=i.data.subjectPrivateKey.data;return n.verify(t,e,s)}(e,t,c)}if("dsa"===c.type){if("dsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=i.data.p,a=i.data.q,o=i.data.g,f=i.data.pub_key,u=s.signature.decode(e,"der"),c=u.s,h=u.r;l(c,a),l(h,a);var d=n.mont(r),_=c.invm(a);return 0===o.toRed(d).redPow(new n(t).mul(_).mod(a)).fromRed().mul(f.toRed(d).redPow(h.mul(_).mod(a)).fromRed()).mod(r).mod(a).cmp(h)}(e,t,c)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");t=r.concat([u,t]);for(var h=c.modulus.byteLength(),d=[1],_=0;t.length+d.length+22?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,n,s,o;if("string"==typeof t&&(n="not ",t.substr(!s||s<0?0:+s,n.length)===n)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t}(e," argument"))o="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,i){return"number"!=typeof i&&(i=0),!(i+t.length>e.length)&&-1!==e.indexOf(t,i)}(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return o+=". Received type ".concat(typeof i)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},{}],50:[function(e,t,i){(function(i){"use strict";var r=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=f;var n=e("./_stream_readable"),a=e("./_stream_writable");e("inherits")(f,n);for(var s=r(a.prototype),o=0;o0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),r)s.endEmitted?E(e,new w):A(e,s,t,!0);else if(s.ended)E(e,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):P(e,s)):A(e,s,t,!1)}else r||(s.reading=!1,P(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(k,e))}function k(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function U(e){f("readable nexttick read 0"),e.read(0)}function D(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0)}function F(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):i=t.buffer.consume(e,t.decoder),i);var i}function L(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(B,t,e))}function B(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var i=t._writableState;(!i||i.autoDestroy&&i.finished)&&t.destroy()}}function N(e,t){for(var i=0,r=e.length;i=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):M(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&L(this),null;var r,n=t.needReadable;return f("need readable",n),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&L(this)),null!==r&&this.emit("data",r),r},j.prototype._read=function(e){E(this,new g("_read()"))},j.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,f("pipe count=%d opts=%j",n.pipesCount,t);var s=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?l:m;function o(t,i){f("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f("cleanup"),e.removeListener("close",_),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),r.removeListener("end",l),r.removeListener("end",m),r.removeListener("data",h),c=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){f("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",o);var u=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,F(e))}}(r);e.on("drain",u);var c=!1;function h(t){f("ondata");var i=e.write(t);f("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==N(n.pipes,e))&&!c&&(f("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){f("onerror",t),m(),e.removeListener("error",d),0===a(e,"error")&&E(e,t)}function _(){e.removeListener("finish",p),m()}function p(){f("onfinish"),e.removeListener("close",_),m()}function m(){f("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",d),e.once("close",_),e.once("finish",p),e.emit("pipe",r),n.flowing||(f("pipe resume"),r.resume()),e},j.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,f("on readable",n.length,n.reading),n.length?M(this):n.reading||i.nextTick(U,this))),r},j.prototype.addListener=j.prototype.on,j.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(R,this),r},j.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(R,this),t},j.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}(this,e)),e.paused=!1,this},j.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},j.prototype.wrap=function(e){var t=this,i=this._readableState,r=!1;for(var n in e.on("end",(function(){if(f("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(f("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(t.push(n)||(r=!0,e.pause()))})),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-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(j.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),j.prototype._write=function(e,t,i){i(new p("_write()"))},j.prototype._writev=null,j.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(j.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),j.prototype.destroy=c.destroy,j.prototype._undestroy=c.undestroy,j.prototype._destroy=function(e,t){t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":49,"./_stream_duplex":50,"./internal/streams/destroy":57,"./internal/streams/state":61,"./internal/streams/stream":62,_process:158,buffer:66,inherits:136,"util-deprecate":197}],55:[function(e,t,i){(function(i){"use strict";var r;function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var a=e("./end-of-stream"),s=Symbol("lastResolve"),o=Symbol("lastReject"),l=Symbol("error"),f=Symbol("ended"),u=Symbol("lastPromise"),c=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function _(e){var t=e[s];if(null!==t){var i=e[h].read();null!==i&&(e[u]=null,e[s]=null,e[o]=null,t(d(i,!1)))}}function p(e){i.nextTick(_,e)}var m=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((n(r={get stream(){return this[h]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[l]?r(e[l]):t(d(void 0,!0))}))}));var r,n=this[u];if(n)r=new Promise(function(e,t){return function(i,r){e.then((function(){t[f]?i(d(void 0,!0)):t[c](i,r)}),r)}}(n,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(d(a,!1));r=new Promise(this[c])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),n(r,"return",(function(){var e=this;return new Promise((function(t,i){e[h].destroy(null,(function(e){e?i(e):t(d(void 0,!0))}))}))})),r),m);t.exports=function(e){var t,i=Object.create(b,(n(t={},h,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,o,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,f,{value:e._readableState.endEmitted,writable:!0}),n(t,c,{value:function(e,t){var r=i[h].read();r?(i[u]=null,i[s]=null,i[o]=null,e(d(r,!1))):(i[s]=e,i[o]=t)},writable:!0}),t));return i[u]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=i[o];return null!==t&&(i[u]=null,i[s]=null,i[o]=null,t(e)),void(i[l]=e)}var r=i[s];null!==r&&(i[u]=null,i[s]=null,i[o]=null,r(d(void 0,!0))),i[f]=!0})),e.on("readable",p.bind(null,i)),i}}).call(this,e("_process"))},{"./end-of-stream":58,_process:158}],56:[function(e,t,i){"use strict";function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t){for(var i=0;i0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,i,r,n=s.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,i=n,r=o,s.prototype.copy.call(t,i,r),o+=a.data.length,a=a.next;return n}},{key:"consume",value:function(e,t){var i;return en.length?n.length:e;if(a===n.length?r+=n:r+=n.slice(0,e),0==(e-=a)){a===n.length?(++i,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(a));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),i=this.head,r=1;for(i.data.copy(t),e-=i.data.length;i=i.next;){var n=i.data,a=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,a),0==(e-=a)){a===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return o(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&s.forEach(f),a||(s.forEach(f),n(r))}))}));return t.reduce(u)}},{"../../../errors":49,"./end-of-stream":58}],61:[function(e,t,i){"use strict";var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,i,n){var a=function(e,t,i){return null!=e.highWaterMark?e.highWaterMark:t?e[i]:null}(t,n,i);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(n?i:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},{"../../../errors":49}],62:[function(e,t,i){t.exports=e("events").EventEmitter},{events:104}],63:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js"),i.finished=e("./lib/internal/streams/end-of-stream.js"),i.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":50,"./lib/_stream_passthrough.js":51,"./lib/_stream_readable.js":52,"./lib/_stream_transform.js":53,"./lib/_stream_writable.js":54,"./lib/internal/streams/end-of-stream.js":58,"./lib/internal/streams/pipeline.js":60}],64:[function(e,t,i){arguments[4][20][0].apply(i,arguments)},{dup:20}],65:[function(e,t,i){(function(e){t.exports=function(t,i){for(var r=Math.min(t.length,i.length),n=new e(r),a=0;a - * @license MIT - */ -"use strict";var r=e("base64-js"),n=e("ieee754");i.Buffer=t,i.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},i.INSPECT_MAX_BYTES=50;function a(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=new Uint8Array(e);return i.__proto__=t.prototype,i}function t(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return s(e,t,i)}function s(e,i,r){if("string"==typeof e)return function(e,i){"string"==typeof i&&""!==i||(i="utf8");if(!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var r=0|c(e,i),n=a(r),s=n.write(e,i);s!==r&&(n=n.slice(0,s));return n}(e,i);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(L(e,ArrayBuffer)||e&&L(e.buffer,ArrayBuffer))return function(e,i,r){if(i<0||e.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function c(e,i){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||L(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var a=!1;;)switch(i){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(a)return n?-1:D(e).length;i=(""+i).toLowerCase(),a=!0}}function h(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,i);case"utf8":case"utf-8":return C(this,t,i);case"ascii":return S(this,t,i);case"latin1":case"binary":return j(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function d(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function _(e,i,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),B(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof i&&(i=t.from(i,n)),t.isBuffer(i))return 0===i.length?-1:p(e,i,r,n,a);if("number"==typeof i)return i&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,i,r):Uint8Array.prototype.lastIndexOf.call(e,i,r):p(e,[i],r,n,a);throw new TypeError("val must be string, number or Buffer")}function p(e,t,i,r,n){var a,s=1,o=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,l/=2,i/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){var u=-1;for(a=i;ao&&(i=o-l),a=i;a>=0;a--){for(var c=!0,h=0;hn&&(r=n):r=n;var a=t.length;r>a/2&&(r=a/2);for(var s=0;s>8,n=i%256,a.push(n),a.push(r);return a}(t,e.length-i),e,i,r)}function E(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i))}function C(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n239?4:f>223?3:f>191?2:1;if(n+c<=i)switch(c){case 1:f<128&&(u=f);break;case 2:128==(192&(a=e[n+1]))&&(l=(31&f)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],s=e[n+2],128==(192&a)&&128==(192&s)&&(l=(15&f)<<12|(63&a)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],s=e[n+2],o=e[n+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(l=(15&f)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&l<1114112&&(u=l)}null===u?(u=65533,c=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=c}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var i="",r=0;for(;rt&&(e+=" ... "),""},t.prototype.compare=function(e,i,r,n,a){if(L(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===i&&(i=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),i<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&i>=r)return 0;if(n>=a)return-1;if(i>=r)return 1;if(this===e)return 0;for(var s=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(i>>>=0),l=Math.min(s,o),f=this.slice(n,a),u=e.slice(i,r),c=0;c>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return m(this,e,t,i);case"utf8":case"utf-8":return b(this,e,t,i);case"ascii":return v(this,e,t,i);case"latin1":case"binary":return y(this,e,t,i);case"base64":return g(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;nr)&&(i=r);for(var n="",a=t;ai)throw new RangeError("Trying to access beyond buffer length")}function M(e,i,r,n,a,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>a||ie.length)throw new RangeError("Index out of range")}function k(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function P(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,4),n.write(e,t,i,r,23,4),i+4}function I(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,8),n.write(e,t,i,r,52,8),i+8}t.prototype.slice=function(e,i){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(i=void 0===i?r:~~i)<0?(i+=r)<0&&(i=0):i>r&&(i=r),i>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},t.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a=(n*=128)&&(r-=Math.pow(2,8*t)),r},t.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=t,n=1,a=this[e+--r];r>0&&(n*=256);)a+=this[e+--r]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},t.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t>>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+i},t.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n)}var a=0,s=1,o=0;for(this[t]=255&e;++a>0)-o&255;return t+i},t.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n)}var a=i-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+i},t.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,i){return P(this,e,t,!0,i)},t.prototype.writeFloatBE=function(e,t,i){return P(this,e,t,!1,i)},t.prototype.writeDoubleLE=function(e,t,i){return I(this,e,t,!0,i)},t.prototype.writeDoubleBE=function(e,t,i){return I(this,e,t,!1,i)},t.prototype.copy=function(e,i,r,n){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),i>=e.length&&(i=e.length),i||(i=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-i=0;--s)e[s+i]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),i);return a},t.prototype.fill=function(e,i,r,n){if("string"==typeof e){if("string"==typeof i?(n=i,i=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var a=e.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(e=a)}}else"number"==typeof e&&(e&=255);if(i<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=i;s55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function F(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,i,r){for(var n=0;n=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function L(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function B(e){return e!=e}}).call(this,e("buffer").Buffer)},{"base64-js":17,buffer:66,ieee754:135}],67:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("stream").Transform,a=e("string_decoder").StringDecoder;function s(e){n.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}e("inherits")(s,n),s.prototype.update=function(e,t,i){"string"==typeof e&&(e=r.from(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,i){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{i(r)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,i){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return i&&(r+=this._decoder.end()),r},t.exports=s},{inherits:136,"safe-buffer":184,stream:194,string_decoder:195}],68:[function(e,t,i){(function(e){function t(e){return Object.prototype.toString.call(e)}i.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},i.isBoolean=function(e){return"boolean"==typeof e},i.isNull=function(e){return null===e},i.isNullOrUndefined=function(e){return null==e},i.isNumber=function(e){return"number"==typeof e},i.isString=function(e){return"string"==typeof e},i.isSymbol=function(e){return"symbol"==typeof e},i.isUndefined=function(e){return void 0===e},i.isRegExp=function(e){return"[object RegExp]"===t(e)},i.isObject=function(e){return"object"==typeof e&&null!==e},i.isDate=function(e){return"[object Date]"===t(e)},i.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},i.isFunction=function(e){return"function"==typeof e},i.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},i.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":137}],69:[function(e,t,i){(function(i){var r=e("elliptic"),n=e("bn.js");t.exports=function(e){return new s(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function o(e,t,r){Array.isArray(e)||(e=e.toArray());var n=new i(e);if(r&&n.lengthi)?t=("rmd160"===e?new l:f(e)).update(t).digest():t.length64?t=e(t):t.length<64&&(t=n.concat([t,s],64));for(var i=this._ipad=n.allocUnsafe(64),r=this._opad=n.allocUnsafe(64),o=0;o<64;o++)i[o]=54^t[o],r[o]=92^t[o];this._hash=[i]}r(o,a),o.prototype._update=function(e){this._hash.push(e)},o.prototype._final=function(){var e=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,e]))},t.exports=o},{"cipher-base":67,inherits:136,"safe-buffer":184}],75:[function(e,t,i){"use strict";i.randomBytes=i.rng=i.pseudoRandomBytes=i.prng=e("randombytes"),i.createHash=i.Hash=e("create-hash"),i.createHmac=i.Hmac=e("create-hmac");var r=e("browserify-sign/algos"),n=Object.keys(r),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);i.getHashes=function(){return a};var s=e("pbkdf2");i.pbkdf2=s.pbkdf2,i.pbkdf2Sync=s.pbkdf2Sync;var o=e("browserify-cipher");i.Cipher=o.Cipher,i.createCipher=o.createCipher,i.Cipheriv=o.Cipheriv,i.createCipheriv=o.createCipheriv,i.Decipher=o.Decipher,i.createDecipher=o.createDecipher,i.Decipheriv=o.Decipheriv,i.createDecipheriv=o.createDecipheriv,i.getCiphers=o.getCiphers,i.listCiphers=o.listCiphers;var l=e("diffie-hellman");i.DiffieHellmanGroup=l.DiffieHellmanGroup,i.createDiffieHellmanGroup=l.createDiffieHellmanGroup,i.getDiffieHellman=l.getDiffieHellman,i.createDiffieHellman=l.createDiffieHellman,i.DiffieHellman=l.DiffieHellman;var f=e("browserify-sign");i.createSign=f.createSign,i.Sign=f.Sign,i.createVerify=f.createVerify,i.Verify=f.Verify,i.createECDH=e("create-ecdh");var u=e("public-encrypt");i.publicEncrypt=u.publicEncrypt,i.privateEncrypt=u.privateEncrypt,i.publicDecrypt=u.publicDecrypt,i.privateDecrypt=u.privateDecrypt;var c=e("randomfill");i.randomFill=c.randomFill,i.randomFillSync=c.randomFillSync,i.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},i.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":38,"browserify-sign":46,"browserify-sign/algos":43,"create-ecdh":69,"create-hash":71,"create-hmac":73,"diffie-hellman":82,pbkdf2:151,"public-encrypt":159,randombytes:166,randomfill:167}],76:[function(e,t,i){"use strict";i.utils=e("./des/utils"),i.Cipher=e("./des/cipher"),i.DES=e("./des/des"),i.CBC=e("./des/cbc"),i.EDE=e("./des/ede")},{"./des/cbc":77,"./des/cipher":78,"./des/des":79,"./des/ede":80,"./des/utils":81}],77:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a={};function s(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t0;r--)t+=this._buffer(e,t),i+=this._flushBuffer(n,i);return t+=this._buffer(e,t),n},n.prototype.final=function(e){var t,i;return e&&(t=this.update(e)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(i):i},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];i=a.r28shl(i,o),n=a.r28shl(n,o),a.pc2(i,n,e.keys,s)}},l.prototype._update=function(e,t,i,r){var n=this._desState,s=a.readUInt32BE(e,t),o=a.readUInt32BE(e,t+4);a.ip(s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,s,o,n.tmp,0):this._decrypt(n,s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],a.writeUInt32BE(i,s,r),a.writeUInt32BE(i,o,r+4)},l.prototype._pad=function(e,t){for(var i=e.length-t,r=t;r>>0,s=h}a.rip(o,s,r,n)},l.prototype._decrypt=function(e,t,i,r,n){for(var s=i,o=t,l=e.keys.length-2;l>=0;l-=2){var f=e.keys[l],u=e.keys[l+1];a.expand(s,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1];var c=a.substitute(f,u),h=s;s=(o^a.permute(c))>>>0,o=h}a.rip(s,o,r,n)}},{"./cipher":78,"./utils":81,inherits:136,"minimalistic-assert":142}],80:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a=e("./cipher"),s=e("./des");function o(e,t){r.equal(t.length,24,"Invalid key length");var i=t.slice(0,8),n=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i})]}function l(e){a.call(this,e);var t=new o(this.type,this.options.key);this._edeState=t}n(l,a),t.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,i,r){var n=this._edeState;n.ciphers[0]._update(e,t,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r)},l.prototype._pad=s.prototype._pad,l.prototype._unpad=s.prototype._unpad},{"./cipher":78,"./des":79,inherits:136,"minimalistic-assert":142}],81:[function(e,t,i){"use strict";i.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},i.writeUInt32BE=function(e,t,i){e[0+i]=t>>>24,e[1+i]=t>>>16&255,e[2+i]=t>>>8&255,e[3+i]=255&t},i.ip=function(e,t,i,r){for(var n=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8)n<<=1,n|=t>>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=e>>>o+s&1}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8)a<<=1,a|=t>>>o+s&1;for(o=1;o<=25;o+=8)a<<=1,a|=e>>>o+s&1}i[r+0]=n>>>0,i[r+1]=a>>>0},i.rip=function(e,t,i,r){for(var n=0,a=0,s=0;s<4;s++)for(var o=24;o>=0;o-=8)n<<=1,n|=t>>>o+s&1,n<<=1,n|=e>>>o+s&1;for(s=4;s<8;s++)for(o=24;o>=0;o-=8)a<<=1,a|=t>>>o+s&1,a<<=1,a|=e>>>o+s&1;i[r+0]=n>>>0,i[r+1]=a>>>0},i.pc1=function(e,t,i,r){for(var n=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8)n<<=1,n|=t>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=e>>o+s&1}for(o=0;o<=24;o+=8)n<<=1,n|=t>>o+s&1;for(s=1;s<=3;s++){for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1;for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1}for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1;i[r+0]=n>>>0,i[r+1]=a>>>0},i.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];i.pc2=function(e,t,i,n){for(var a=0,s=0,o=r.length>>>1,l=0;l>>r[l]&1;for(l=o;l>>r[l]&1;i[n+0]=a>>>0,i[n+1]=s>>>0},i.expand=function(e,t,i){var r=0,n=0;r=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)r<<=6,r|=e>>>a&63;for(a=11;a>=3;a-=4)n|=e>>>a&63,n<<=6;n|=(31&e)<<1|e>>>31,t[i+0]=r>>>0,t[i+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];i.substitute=function(e,t){for(var i=0,r=0;r<4;r++){i<<=4,i|=n[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){i<<=4,i|=n[256+64*r+(t>>>18-6*r&63)]}return i>>>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];i.permute=function(e){for(var t=0,i=0;i>>a[i]&1;return t>>>0},i.padSplit=function(e,t,i){for(var r=e.toString(2);r.lengthe;)i.ishrn(1);if(i.isEven()&&i.iadd(o),i.testn(1)||i.iadd(l),t.cmp(l)){if(!t.cmp(f))for(;i.mod(u).cmp(c);)i.iadd(d)}else for(;i.mod(a).cmp(h);)i.iadd(d);if(m(_=i.shrn(1))&&m(i)&&b(_)&&b(i)&&s.test(_)&&s.test(i))return i}}},{"bn.js":86,"miller-rabin":140,randombytes:166}],85:[function(e,t,i){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"}}},{}],86:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],87:[function(e,t,i){"use strict";var r=i;r.version=e("../package.json").version,r.utils=e("./elliptic/utils"),r.rand=e("brorand"),r.curve=e("./elliptic/curve"),r.curves=e("./elliptic/curves"),r.ec=e("./elliptic/ec"),r.eddsa=e("./elliptic/eddsa")},{"../package.json":103,"./elliptic/curve":90,"./elliptic/curves":93,"./elliptic/ec":94,"./elliptic/eddsa":97,"./elliptic/utils":101,brorand:19}],88:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.getNAF,s=n.getJSF,o=n.assert;function l(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}t.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){o(e.precomputed);var i=e._getDoubles(),r=a(t,1,this._bitLength),n=(1<=l;t--)f=(f<<1)+r[t];s.push(f)}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),h=n;h>0;h--){for(l=0;l=0;f--){for(t=0;f>=0&&0===s[f];f--)t++;if(f>=0&&t++,l=l.dblp(t),f<0)break;var u=s[f];o(0!==u),l="affine"===e.type?u>0?l.mixedAdd(n[u-1>>1]):l.mixedAdd(n[-u-1>>1].neg()):u>0?l.add(n[u-1>>1]):l.add(n[-u-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,i,r,n){for(var o=this._wnafT1,l=this._wnafT2,f=this._wnafT3,u=0,c=0;c=1;c-=2){var d=c-1,_=c;if(1===o[d]&&1===o[_]){var p=[t[d],null,null,t[_]];0===t[d].y.cmp(t[_].y)?(p[1]=t[d].add(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg())):0===t[d].y.cmp(t[_].y.redNeg())?(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].add(t[_].neg())):(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],b=s(i[d],i[_]);u=Math.max(b[0].length,u),f[d]=new Array(u),f[_]=new Array(u);for(var v=0;v=0;c--){for(var C=0;c>=0;){var S=!0;for(v=0;v=0&&C++,w=w.dblp(C),c<0)break;for(v=0;v0?j=l[v][T-1>>1]:T<0&&(j=l[v][-T-1>>1].neg()),w="affine"===j.type?w.mixedAdd(j):w.add(j))}}for(c=0;c=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),s=a.redSub(i),o=r.redSub(t),l=n.redMul(s),f=a.redMul(o),u=n.redMul(o),c=s.redMul(a);return this.curve.point(l,f,c,u)},f.prototype._projDbl=function(){var e,t,i,r=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var s=(f=this.curve._mulA(n)).redAdd(a);if(this.zOne)e=r.redSub(n).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(f.redSub(a)),i=s.redSqr().redSub(s).redSub(s);else{var o=this.z.redSqr(),l=s.redSub(o).redISub(o);e=r.redSub(n).redISub(a).redMul(l),t=s.redMul(f.redSub(a)),i=s.redMul(l)}}else{var f=n.redAdd(a);o=this.curve._mulC(this.z).redSqr(),l=f.redSub(o).redSub(o);e=this.curve._mulC(r.redISub(f)).redMul(l),t=this.curve._mulC(f).redMul(n.redISub(a)),i=f.redMul(l)}return this.curve.point(e,t,i)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=i.redSub(t),s=n.redSub(r),o=n.redAdd(r),l=i.redAdd(t),f=a.redMul(s),u=o.redMul(l),c=a.redMul(l),h=s.redMul(o);return this.curve.point(f,u,h,c)},f.prototype._projAdd=function(e){var t,i,r=this.z.redMul(e.z),n=r.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(s),l=n.redSub(o),f=n.redAdd(o),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),c=r.redMul(l).redMul(u);return this.curve.twisted?(t=r.redMul(f).redMul(s.redSub(this.curve._mulA(a))),i=l.redMul(f)):(t=r.redMul(f).redMul(s.redSub(a)),i=this.curve._mulC(l).redMul(f)),this.curve.point(c,t,i)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1)},f.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0)},f.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},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],90:[function(e,t,i){"use strict";var r=i;r.base=e("./base"),r.short=e("./short"),r.mont=e("./mont"),r.edwards=e("./edwards")},{"./base":88,"./edwards":89,"./mont":91,"./short":92}],91:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("inherits"),a=e("./base"),s=e("../utils");function o(e){a.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,i){a.BasePoint.call(this,e,"projective"),null===t&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(o,a),t.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),r=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},n(l,a.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},o.prototype.point=function(e,t){return new l(this,e,t)},o.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),r=e.redMul(t),n=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(i),s=n.redMul(r),o=t.z.redMul(a.redAdd(s).redSqr()),l=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,l)},l.prototype.mul=function(e){for(var t=e.clone(),i=this,r=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],92:[function(e,t,i){"use strict";var r=e("../utils"),n=e("bn.js"),a=e("inherits"),s=e("./base"),o=r.assert;function l(e){s.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=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 f(e,t,i,r){s.BasePoint.call(this,e,"affine"),null===t&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(i,16),r&&(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 u(e,t,i,r){s.BasePoint.call(this,e,"jacobian"),null===t&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(i,16),this.z=new n(r,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}a(l,s),t.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,i;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)i=new n(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?i=a[0]:(i=a[1],o(0===this.g.mul(i).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:i,basis:e.basis?e.basis.map((function(e){return{a:new n(e.a,16),b:new n(e.b,16)}})):this._getEndoBasis(i)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),i=new n(2).toRed(t).redInvm(),r=i.redNeg(),a=new n(3).toRed(t).redNeg().redSqrt().redMul(i);return[r.redAdd(a).fromRed(),r.redSub(a).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,i,r,a,s,o,l,f,u,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),_=new n(1),p=new n(0),m=new n(0),b=new n(1),v=0;0!==h.cmpn(0);){var y=d.div(h);f=d.sub(y.mul(h)),u=m.sub(y.mul(_));var g=b.sub(y.mul(p));if(!r&&f.cmp(c)<0)t=l.neg(),i=_,r=f.neg(),a=u;else if(r&&2==++v)break;l=f,d=h,h=f,m=_,_=u,b=p,p=g}s=f.neg(),o=u;var w=r.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(w)>=0&&(s=t,o=i),r.negative&&(r=r.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:r,b:a},{a:s,b:o}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],r=t[1],n=r.b.mul(e).divRound(this.n),a=i.b.neg().mul(e).divRound(this.n),s=n.mul(i.a),o=a.mul(r.a),l=n.mul(i.b),f=a.mul(r.b);return{k1:e.sub(s).sub(o),k2:l.add(f).neg()}},l.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,r=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,a=0;a":""},f.prototype.isInfinity=function(){return this.inf},f.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 i=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},f.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,i=this.x.redSqr(),r=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(r),a=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new n(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},f.prototype.jmulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},f.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))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(u,s.BasePoint),l.prototype.jpoint=function(e,t,i){return new u(this,e,t,i)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(i,r)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(i),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(i.redMul(this.z)),o=r.redSub(n),l=a.redSub(s);if(0===o.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),c=r.redMul(f),h=l.redSqr().redIAdd(u).redISub(c).redISub(c),d=l.redMul(c.redISub(h)).redISub(a.redMul(u)),_=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(h,d,_)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,r=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),s=i.redSub(r),o=n.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),f=l.redMul(s),u=i.redMul(l),c=o.redSqr().redIAdd(f).redISub(u).redISub(u),h=o.redMul(u.redISub(c)).redISub(n.redMul(f)),d=this.z.redMul(s);return this.curve.jpoint(c,h,d)},u.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,i=0;i=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],93:[function(e,t,i){"use strict";var r,n=i,a=e("hash.js"),s=e("./curve"),o=e("./utils").assert;function l(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var i=new l(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:i}),i}})}n.PresetCurve=l,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=e("./precomputed/secp256k1")}catch(e){r=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},{"./curve":90,"./precomputed/secp256k1":100,"./utils":101,"hash.js":122}],94:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("hmac-drbg"),a=e("../utils"),s=e("../curves"),o=e("brorand"),l=a.assert,f=e("./key"),u=e("./signature");function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(l(s.hasOwnProperty(e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=c,c.prototype.keyPair=function(e){return new f(this,e)},c.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},c.prototype.genKeyPair=function(e){e||(e={});for(var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),a=this.n.sub(new r(2));;){var s=new r(t.generate(i));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(e,t){var i=8*e.byteLength()-this.n.bitLength();return i>0&&(e=e.ushrn(i)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},c.prototype.sign=function(e,t,i,a){"object"==typeof i&&(a=i,i=null),a||(a={}),t=this.keyFromPrivate(t,i),e=this._truncateToN(new r(e,16));for(var s=this.n.byteLength(),o=t.getPrivate().toArray("be",s),l=e.toArray("be",s),f=new n({hash:this.hash,entropy:o,nonce:l,pers:a.pers,persEnc:a.persEnc||"utf8"}),c=this.n.sub(new r(1)),h=0;;h++){var d=a.k?a.k(h):new r(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(c)>=0)){var _=this.g.mul(d);if(!_.isInfinity()){var p=_.getX(),m=p.umod(this.n);if(0!==m.cmpn(0)){var b=d.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(_.getY().isOdd()?1:0)|(0!==p.cmp(m)?2:0);return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new u({r:m,s:b,recoveryParam:v})}}}}}},c.prototype.verify=function(e,t,i,n){e=this._truncateToN(new r(e,16)),i=this.keyFromPublic(i,n);var a=(t=new u(t,"hex")).r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,l=s.invm(this.n),f=l.mul(e).umod(this.n),c=l.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(f,i.getPublic(),c)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(f,i.getPublic(),c)).isInfinity()&&0===o.getX().umod(this.n).cmp(a)},c.prototype.recoverPubKey=function(e,t,i,n){l((3&i)===i,"The recovery param is more than two bits"),t=new u(t,n);var a=this.n,s=new r(e),o=t.r,f=t.s,c=1&i,h=i>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");o=h?this.curve.pointFromX(o.add(this.curve.n),c):this.curve.pointFromX(o,c);var d=t.r.invm(a),_=a.sub(s).mul(d).umod(a),p=f.mul(d).umod(a);return this.g.mulAdd(_,o,p)},c.prototype.getKeyRecoveryParam=function(e,t,i,r){if(null!==(t=new u(t,r)).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(i))return n}throw new Error("Unable to find valid recovery factor")}},{"../curves":93,"../utils":101,"./key":95,"./signature":96,"bn.js":102,brorand:19,"hmac-drbg":134}],95:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils").assert;function a(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)}t.exports=a,a.fromPublic=function(e,t,i){return t instanceof a?t:new a(e,{pub:t,pubEnc:i})},a.fromPrivate=function(e,t,i){return t instanceof a?t:new a(e,{priv:t,privEnc:i})},a.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"}},a.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},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(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)},a.prototype.derive=function(e){return e.mul(this.priv).getX()},a.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i)},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},a.prototype.inspect=function(){return""}},{"../utils":101,"bn.js":102}],96:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(a(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function o(){this.place=0}function l(e,t){var i=e[t.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,a=0,s=t.place;a>>=0;return!(n<=127)&&(t.place=s,n)}function f(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|i);--i;)e.push(t>>>(i<<3)&255);e.push(t)}}t.exports=s,s.prototype._importDER=function(e,t){e=n.toArray(e,t);var i=new o;if(48!==e[i.place++])return!1;var a=l(e,i);if(!1===a)return!1;if(a+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var s=l(e,i);if(!1===s)return!1;var f=e.slice(i.place,s+i.place);if(i.place+=s,2!==e[i.place++])return!1;var u=l(e,i);if(!1===u)return!1;if(e.length!==u+i.place)return!1;var c=e.slice(i.place,u+i.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new r(f),this.s=new r(c),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&i[0]&&(i=[0].concat(i)),t=f(t),i=f(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];u(r,t.length),(r=r.concat(t)).push(2),u(r,i.length);var a=r.concat(i),s=[48];return u(s,a.length),s=s.concat(a),n.encode(s,e)}},{"../utils":101,"bn.js":102}],97:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("../curves"),a=e("../utils"),s=a.assert,o=a.parseBytes,l=e("./key"),f=e("./signature");function u(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=n[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}t.exports=u,u.prototype.sign=function(e,t){e=o(e);var i=this.keyFromSecret(t),r=this.hashInt(i.messagePrefix(),e),n=this.g.mul(r),a=this.encodePoint(n),s=this.hashInt(a,i.pubBytes(),e).mul(i.priv()),l=r.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:l,Rencoded:a})},u.prototype.verify=function(e,t,i){e=o(e),t=this.makeSignature(t);var r=this.keyFromPublic(i),n=this.hashInt(t.Rencoded(),r.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(r.pub().mul(n)).eq(a)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(n>>1)-1?(n>>1)-l:l,a.isubn(o)):o=0,r[s]=o,a.iushrn(1)}return r},r.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var r=0,n=0;e.cmpn(-r)>0||t.cmpn(-n)>0;){var a,s,o,l=e.andln(3)+r&3,f=t.andln(3)+n&3;if(3===l&&(l=-1),3===f&&(f=-1),0==(1&l))a=0;else a=3!==(o=e.andln(7)+r&7)&&5!==o||2!==f?l:-l;if(i[0].push(a),0==(1&f))s=0;else s=3!==(o=t.andln(7)+n&7)&&5!==o||2!==l?f:-f;i[1].push(s),2*r===a+1&&(r=1-r),2*n===s+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return i},r.cachedProperty=function(e,t,i){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new n(e,"hex","le")}},{"bn.js":102,"minimalistic-assert":142,"minimalistic-crypto-utils":143}],102:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],103:[function(e,t,i){t.exports={_args:[["elliptic@6.5.3","/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer"]],_from:"elliptic@6.5.3",_id:"elliptic@6.5.3",_inBundle:!1,_integrity:"sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.5.3",name:"elliptic",escapedName:"elliptic",rawSpec:"6.5.3",saveSpec:null,fetchSpec:"6.5.3"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",_spec:"6.5.3",_where:"/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},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"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^3.0.8",grunt:"^1.0.4","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":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.10.3",mocha:"^6.2.2"},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.5.3"}},{}],104:[function(e,t,i){var r=Object.create||function(e){var t=function(){};return t.prototype=e,new t},n=Object.keys||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return i},a=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var o,l=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),o=0===f.x}catch(e){o=!1}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,i){if(t)e.call(i);else for(var r=e.length,n=w(e,r),a=0;a0&&o.length>a){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,"object"==typeof console&&console.warn&&(l.name,l.message)}}else o=s[t]=i,++e._eventsCount;return e}function b(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(i=s[e]))return!1;var f="function"==typeof i;switch(r=arguments.length){case 1:c(i,f,this);break;case 2:h(i,f,this,arguments[1]);break;case 3:d(i,f,this,arguments[1],arguments[2]);break;case 4:_(i,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),a=1;a=0;s--)if(i[s]===t||i[s].listener===t){o=i[s].listener,a=s;break}if(a<0)return this;0===a?i.shift():function(e,t){for(var i=t,r=i+1,n=e.length;r=0;a--)this.removeListener(e,t[a]);return this},s.prototype.listeners=function(e){return y(this,e,!0)},s.prototype.rawListeners=function(e){return y(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],105:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("md5.js");t.exports=function(e,t,i,a){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=i/8,o=r.alloc(s),l=r.alloc(a||0),f=r.alloc(0);s>0||a>0;){var u=new n;u.update(f),u.update(e),t&&u.update(t),f=u.digest();var c=0;if(s>0){var h=o.length-s;c=Math.min(s,f.length),f.copy(o,h,0,c),s-=c}if(c0){var d=l.length-a,_=Math.min(a,f.length-c);f.copy(l,d,c,c+_),a-=_}}return f.fill(0),{key:o,iv:l}}},{"md5.js":139,"safe-buffer":184}],106:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("readable-stream").Transform;function a(e){n.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(a,n),a.prototype._transform=function(e,t,i){var r=null;try{this.update(e,t)}catch(e){r=e}i(r)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},a.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var i=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var a=this._blockOffset;a0;++s)this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.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 i=0;i<4;++i)this._length[i]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},{inherits:136,"readable-stream":121,"safe-buffer":184}],107:[function(e,t,i){arguments[4][49][0].apply(i,arguments)},{dup:49}],108:[function(e,t,i){arguments[4][50][0].apply(i,arguments)},{"./_stream_readable":110,"./_stream_writable":112,_process:158,dup:50,inherits:136}],109:[function(e,t,i){arguments[4][51][0].apply(i,arguments)},{"./_stream_transform":111,dup:51,inherits:136}],110:[function(e,t,i){arguments[4][52][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,"./internal/streams/async_iterator":113,"./internal/streams/buffer_list":114,"./internal/streams/destroy":115,"./internal/streams/from":117,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:52,events:104,inherits:136,"string_decoder/":195,util:20}],111:[function(e,t,i){arguments[4][53][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,dup:53,inherits:136}],112:[function(e,t,i){arguments[4][54][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,"./internal/streams/destroy":115,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:54,inherits:136,"util-deprecate":197}],113:[function(e,t,i){arguments[4][55][0].apply(i,arguments)},{"./end-of-stream":116,_process:158,dup:55}],114:[function(e,t,i){arguments[4][56][0].apply(i,arguments)},{buffer:66,dup:56,util:20}],115:[function(e,t,i){arguments[4][57][0].apply(i,arguments)},{_process:158,dup:57}],116:[function(e,t,i){arguments[4][58][0].apply(i,arguments)},{"../../../errors":107,dup:58}],117:[function(e,t,i){arguments[4][59][0].apply(i,arguments)},{dup:59}],118:[function(e,t,i){arguments[4][60][0].apply(i,arguments)},{"../../../errors":107,"./end-of-stream":116,dup:60}],119:[function(e,t,i){arguments[4][61][0].apply(i,arguments)},{"../../../errors":107,dup:61}],120:[function(e,t,i){arguments[4][62][0].apply(i,arguments)},{dup:62,events:104}],121:[function(e,t,i){arguments[4][63][0].apply(i,arguments)},{"./lib/_stream_duplex.js":108,"./lib/_stream_passthrough.js":109,"./lib/_stream_readable.js":110,"./lib/_stream_transform.js":111,"./lib/_stream_writable.js":112,"./lib/internal/streams/end-of-stream.js":116,"./lib/internal/streams/pipeline.js":118,dup:63}],122:[function(e,t,i){var r=i;r.utils=e("./hash/utils"),r.common=e("./hash/common"),r.sha=e("./hash/sha"),r.ripemd=e("./hash/ripemd"),r.hmac=e("./hash/hmac"),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},{"./hash/common":123,"./hash/hmac":124,"./hash/ripemd":125,"./hash/sha":126,"./hash/utils":133}],123:[function(e,t,i){"use strict";var r=e("./utils"),n=e("minimalistic-assert");function a(){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}i.BlockHash=a,a.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-i,this.endian);for(var n=0;n>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,a=8;athis.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t>>3},i.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},{"../utils":133}],133:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits");function a(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function l(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}i.inherits=n,i.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>6|192,i[r++]=63&s|128):a(e,n)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++n)),i[r++]=s>>18|240,i[r++]=s>>12&63|128,i[r++]=s>>6&63|128,i[r++]=63&s|128):(i[r++]=s>>12|224,i[r++]=s>>6&63|128,i[r++]=63&s|128)}else for(n=0;n>>0}return s},i.split32=function(e,t){for(var i=new Array(4*e.length),r=0,n=0;r>>24,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=255&a):(i[n+3]=a>>>24,i[n+2]=a>>>16&255,i[n+1]=a>>>8&255,i[n]=255&a)}return i},i.rotr32=function(e,t){return e>>>t|e<<32-t},i.rotl32=function(e,t){return e<>>32-t},i.sum32=function(e,t){return e+t>>>0},i.sum32_3=function(e,t,i){return e+t+i>>>0},i.sum32_4=function(e,t,i,r){return e+t+i+r>>>0},i.sum32_5=function(e,t,i,r,n){return e+t+i+r+n>>>0},i.sum64=function(e,t,i,r){var n=e[t],a=r+e[t+1]>>>0,s=(a>>0,e[t+1]=a},i.sum64_hi=function(e,t,i,r){return(t+r>>>0>>0},i.sum64_lo=function(e,t,i,r){return t+r>>>0},i.sum64_4_hi=function(e,t,i,r,n,a,s,o){var l=0,f=t;return l+=(f=f+r>>>0)>>0)>>0)>>0},i.sum64_4_lo=function(e,t,i,r,n,a,s,o){return t+r+a+o>>>0},i.sum64_5_hi=function(e,t,i,r,n,a,s,o,l,f){var u=0,c=t;return u+=(c=c+r>>>0)>>0)>>0)>>0)>>0},i.sum64_5_lo=function(e,t,i,r,n,a,s,o,l,f){return t+r+a+o+f>>>0},i.rotr64_hi=function(e,t,i){return(t<<32-i|e>>>i)>>>0},i.rotr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0},i.shr64_hi=function(e,t,i){return e>>>i},i.shr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0}},{inherits:136,"minimalistic-assert":142}],134:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("minimalistic-crypto-utils"),a=e("minimalistic-assert");function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex"),i=n.toArray(e.nonce,e.nonceEnc||"hex"),r=n.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,i,r)}t.exports=s,s.prototype._init=function(e,t,i){var r=e.concat(t).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},s.prototype.generate=function(e,t,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=i,i=t,t=null),i&&(i=n.toArray(i,r||"hex"),this._update(i));for(var a=[];a.length>1,u=-7,c=i?n-1:0,h=i?-1:1,d=e[t+c];for(c+=h,a=d&(1<<-u)-1,d>>=-u,u+=o;u>0;a=256*a+e[t+c],c+=h,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=r;u>0;s=256*s+e[t+c],c+=h,u-=8);if(0===a)a=1-f;else{if(a===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),a-=f}return(d?-1:1)*s*Math.pow(2,a-r)},i.write=function(e,t,i,r,n,a){var s,o,l,f=8*a-n-1,u=(1<>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,_=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+c>=1?h/l:h*Math.pow(2,1-c))*l>=2&&(s++,l/=2),s+c>=u?(o=0,s=u):s+c>=1?(o=(t*l-1)*Math.pow(2,n),s+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,n),s=0));n>=8;e[i+d]=255&o,d+=_,o/=256,n-=8);for(s=s<0;e[i+d]=255&s,d+=_,s/=256,f-=8);e[i+d-_]|=128*p}},{}],136:[function(e,t,i){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},{}],137:[function(e,t,i){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh - * @license MIT - */ -t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],138:[function(e,t,i){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],139:[function(e,t,i){"use strict";var r=e("inherits"),n=e("hash-base"),a=e("safe-buffer").Buffer,s=new Array(16);function o(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<>>32-t}function f(e,t,i,r,n,a,s){return l(e+(t&i|~t&r)+n+a|0,s)+t|0}function u(e,t,i,r,n,a,s){return l(e+(t&r|i&~r)+n+a|0,s)+t|0}function c(e,t,i,r,n,a,s){return l(e+(t^i^r)+n+a|0,s)+t|0}function h(e,t,i,r,n,a,s){return l(e+(i^(t|~r))+n+a|0,s)+t|0}r(o,n),o.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var i=this._a,r=this._b,n=this._c,a=this._d;i=f(i,r,n,a,e[0],3614090360,7),a=f(a,i,r,n,e[1],3905402710,12),n=f(n,a,i,r,e[2],606105819,17),r=f(r,n,a,i,e[3],3250441966,22),i=f(i,r,n,a,e[4],4118548399,7),a=f(a,i,r,n,e[5],1200080426,12),n=f(n,a,i,r,e[6],2821735955,17),r=f(r,n,a,i,e[7],4249261313,22),i=f(i,r,n,a,e[8],1770035416,7),a=f(a,i,r,n,e[9],2336552879,12),n=f(n,a,i,r,e[10],4294925233,17),r=f(r,n,a,i,e[11],2304563134,22),i=f(i,r,n,a,e[12],1804603682,7),a=f(a,i,r,n,e[13],4254626195,12),n=f(n,a,i,r,e[14],2792965006,17),i=u(i,r=f(r,n,a,i,e[15],1236535329,22),n,a,e[1],4129170786,5),a=u(a,i,r,n,e[6],3225465664,9),n=u(n,a,i,r,e[11],643717713,14),r=u(r,n,a,i,e[0],3921069994,20),i=u(i,r,n,a,e[5],3593408605,5),a=u(a,i,r,n,e[10],38016083,9),n=u(n,a,i,r,e[15],3634488961,14),r=u(r,n,a,i,e[4],3889429448,20),i=u(i,r,n,a,e[9],568446438,5),a=u(a,i,r,n,e[14],3275163606,9),n=u(n,a,i,r,e[3],4107603335,14),r=u(r,n,a,i,e[8],1163531501,20),i=u(i,r,n,a,e[13],2850285829,5),a=u(a,i,r,n,e[2],4243563512,9),n=u(n,a,i,r,e[7],1735328473,14),i=c(i,r=u(r,n,a,i,e[12],2368359562,20),n,a,e[5],4294588738,4),a=c(a,i,r,n,e[8],2272392833,11),n=c(n,a,i,r,e[11],1839030562,16),r=c(r,n,a,i,e[14],4259657740,23),i=c(i,r,n,a,e[1],2763975236,4),a=c(a,i,r,n,e[4],1272893353,11),n=c(n,a,i,r,e[7],4139469664,16),r=c(r,n,a,i,e[10],3200236656,23),i=c(i,r,n,a,e[13],681279174,4),a=c(a,i,r,n,e[0],3936430074,11),n=c(n,a,i,r,e[3],3572445317,16),r=c(r,n,a,i,e[6],76029189,23),i=c(i,r,n,a,e[9],3654602809,4),a=c(a,i,r,n,e[12],3873151461,11),n=c(n,a,i,r,e[15],530742520,16),i=h(i,r=c(r,n,a,i,e[2],3299628645,23),n,a,e[0],4096336452,6),a=h(a,i,r,n,e[7],1126891415,10),n=h(n,a,i,r,e[14],2878612391,15),r=h(r,n,a,i,e[5],4237533241,21),i=h(i,r,n,a,e[12],1700485571,6),a=h(a,i,r,n,e[3],2399980690,10),n=h(n,a,i,r,e[10],4293915773,15),r=h(r,n,a,i,e[1],2240044497,21),i=h(i,r,n,a,e[8],1873313359,6),a=h(a,i,r,n,e[15],4264355552,10),n=h(n,a,i,r,e[6],2734768916,15),r=h(r,n,a,i,e[13],1309151649,21),i=h(i,r,n,a,e[4],4149444226,6),a=h(a,i,r,n,e[11],3174756917,10),n=h(n,a,i,r,e[2],718787259,15),r=h(r,n,a,i,e[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+a|0},o.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=a.allocUnsafe(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=o},{"hash-base":106,inherits:136,"safe-buffer":184}],140:[function(e,t,i){var r=e("bn.js"),n=e("brorand");function a(e){this.rand=e||new n.Rand}t.exports=a,a.create=function(e){return new a(e)},a.prototype._randbelow=function(e){var t=e.bitLength(),i=Math.ceil(t/8);do{var n=new r(this.rand.generate(i))}while(n.cmp(e)>=0);return n},a.prototype._randrange=function(e,t){var i=t.sub(e);return e.add(this._randbelow(i))},a.prototype.test=function(e,t,i){var n=e.bitLength(),a=r.mont(e),s=new r(1).toRed(a);t||(t=Math.max(1,n/48|0));for(var o=e.subn(1),l=0;!o.testn(l);l++);for(var f=e.shrn(l),u=o.toRed(a);t>0;t--){var c=this._randrange(new r(2),o);i&&i(c);var h=c.toRed(a).redPow(f);if(0!==h.cmp(s)&&0!==h.cmp(u)){for(var d=1;d0;t--){var u=this._randrange(new r(2),s),c=e.gcd(u);if(0!==c.cmpn(1))return c;var h=u.toRed(n).redPow(l);if(0!==h.cmp(a)&&0!==h.cmp(f)){for(var d=1;d>8,s=255&n;a?i.push(a,s):i.push(s)}return i},r.zero2=n,r.toHex=a,r.encode=function(e,t){return"hex"===t?a(e):e}},{}],144:[function(e,t,i){var r,n,a=(r=new Date,n=4,{setLogLevel:function(e){n=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=n&&console.info("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=n&&a.getDurationString(new Date-r,1e3)},error:function(e,t){4>=n&&console.error("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)}});a.getDurationString=function(e,t){var i;function r(e,t){for(var i=(""+e).split(".");i[0].length0){for(var i="",r=0;r0&&(i+=","),i+="["+a.getDurationString(e.start(r))+","+a.getDurationString(e.end(r))+"]";return i}return"(empty)"},void 0!==i&&(i.Log=a);var s=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};s.prototype.getPosition=function(){return this.position},s.prototype.getEndPosition=function(){return this.buffer.byteLength},s.prototype.getLength=function(){return this.buffer.byteLength},s.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0},s.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},s.prototype.readAnyInt=function(e,t){var i=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:i=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:i=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";i=this.dataview.getUint8(this.position)<<16,i|=this.dataview.getUint8(this.position)<<8,i|=this.dataview.getUint8(this.position);break;case 4:i=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";i=this.dataview.getUint32(this.position)<<32,i|=this.dataview.getUint32(this.position);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,i}throw"Not enough bytes in buffer"},s.prototype.readUint8=function(){return this.readAnyInt(1,!1)},s.prototype.readUint16=function(){return this.readAnyInt(2,!1)},s.prototype.readUint24=function(){return this.readAnyInt(3,!1)},s.prototype.readUint32=function(){return this.readAnyInt(4,!1)},s.prototype.readUint64=function(){return this.readAnyInt(8,!1)},s.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",i=0;ithis._byteLength&&(this._byteLength=t);else{for(i<1&&(i=1);t>i;)i*=2;var r=new ArrayBuffer(i),n=new Uint8Array(this._buffer);new Uint8Array(r,0,n.length).set(n),this.buffer=r,this._byteLength=t}}},o.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),i=new Uint8Array(this._buffer,0,t.length);t.set(i),this.buffer=e}},o.BIG_ENDIAN=!1,o.LITTLE_ENDIAN=!0,o.prototype._byteLength=0,Object.defineProperty(o.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(o.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),o.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},o.prototype.isEof=function(){return this.position>=this._byteLength},o.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},o.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Int32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Int16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},o.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Uint32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Uint16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},o.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var i=new Float64Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Float32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},o.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},o.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},o.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},o.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},o.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,o.memcpy=function(e,t,i,r,n){var a=new Uint8Array(e,t,n),s=new Uint8Array(i,r,n);a.set(s)},o.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},o.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},o.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i=0;in;r--,n++){var a=t[n];t[n]=t[r],t[r]=a}return e},o.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],i=0;i>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},o.prototype.adjustUint32=function(e,t){var i=this.position;this.seek(e),this.writeUint32(t),this.seek(i)},o.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var i=new Int32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},o.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var i=new Int16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},o.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},o.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},o.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},o.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var i=new Float64Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=8*e,i},o.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var i=new Float32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i};var f=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(f.prototype=new o(new ArrayBuffer,0,o.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),e.byteLength),i.buffer},f.prototype.reduceBuffer=function(e,t,i){var r;return(r=new Uint8Array(i)).set(new Uint8Array(e,t,i)),r.buffer.fileStart=e.fileStart+t,r.buffer.usedBytes=0,r.buffer},f.prototype.insertBuffer=function(e){for(var t=!0,i=0;ir.byteLength){this.buffers.splice(i,1),i--;continue}a.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=r.fileStart||(e=this.reduceBuffer(e,0,r.fileStart-e.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(i,0,e),0===i&&(this.buffer=e);t=!1;break}if(e.fileStart0)){t=!1;break}e=this.reduceBuffer(e,n,s)}}t&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===i&&(this.buffer=e))},f.prototype.logBufferLevel=function(e){var t,i,r,n,s,o=[],l="";for(r=0,n=0,t=0;t0&&(l+=s.end-1+"]");var f=e?a.info:a.debug;0===this.buffers.length?f("MultiBufferStream","No more buffer in memory"):f("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+r+"/"+n+" bytes): "+l)},f.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}return!1}return!1},f.prototype.findPosition=function(e,t,i){var r,n=null,s=-1;for(r=!0===e?0:this.bufferIndex;r=t?(a.debug("MultiBufferStream","Found position in existing buffer #"+s),s):-1},f.prototype.findEndContiguousBuf=function(e){var t,i,r,n=void 0!==e?e:this.bufferIndex;if(i=this.buffers[n],this.buffers.length>n+1)for(t=n+1;t>3;return 31===r&&i.data.length>=2&&(r=32+((7&i.data[0])<<3)+((224&i.data[1])>>5)),r}return null},i.DecoderConfigDescriptor=function(e){i.Descriptor.call(this,4,e)},i.DecoderConfigDescriptor.prototype=new i.Descriptor,i.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},i.DecoderSpecificInfo=function(e){i.Descriptor.call(this,5,e)},i.DecoderSpecificInfo.prototype=new i.Descriptor,i.SLConfigDescriptor=function(e){i.Descriptor.call(this,6,e)},i.SLConfigDescriptor.prototype=new i.Descriptor,this};void 0!==i&&(i.MPEG4DescriptorParser=u);var c={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){c.FullBox.prototype=new c.Box,c.ContainerBox.prototype=new c.Box,c.SampleEntry.prototype=new c.Box,c.TrackGroupTypeBox.prototype=new c.FullBox,c.BASIC_BOXES.forEach((function(e){c.createBoxCtor(e)})),c.FULL_BOXES.forEach((function(e){c.createFullBoxCtor(e)})),c.CONTAINER_BOXES.forEach((function(e){c.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,i){this.type=e,this.size=t,this.uuid=i},FullBox:function(e,t,i){c.Box.call(this,e,t,i),this.flags=0,this.version=0},ContainerBox:function(e,t,i){c.Box.call(this,e,t,i),this.boxes=[]},SampleEntry:function(e,t,i,r){c.ContainerBox.call(this,e,t),this.hdr_size=i,this.start=r},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){c.FullBox.call(this,e,t)},createBoxCtor:function(e,t){c.boxCodes.push(e),c[e+"Box"]=function(t){c.Box.call(this,e,t)},c[e+"Box"].prototype=new c.Box,t&&(c[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){c[e+"Box"]=function(t){c.FullBox.call(this,e,t)},c[e+"Box"].prototype=new c.FullBox,c[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,i=0;ii?(a.error("BoxParser","Box of type '"+u+"' has a size "+f+" greater than its container size "+i),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):o+f>e.getEndPosition()?(e.seek(o),a.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):t?{code:c.OK,type:u,size:f,hdr_size:l,start:o}:(c[u+"Box"]?r=new c[u+"Box"](f):"uuid"!==u?(a.warn("BoxParser","Unknown box type: '"+u+"'"),(r=new c.Box(u,f)).has_unparsed_data=!0):c.UUIDBoxes[s]?r=new c.UUIDBoxes[s](f):(a.warn("BoxParser","Unknown uuid type: '"+s+"'"),(r=new c.Box(u,f)).uuid=s,r.has_unparsed_data=!0),r.hdr_size=l,r.start=o,r.write===c.Box.prototype.write&&"mdat"!==r.type&&(a.info("BoxParser","'"+h+"' box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(e)),r.parse(e),(n=e.getPosition()-(r.start+r.size))<0?(a.warn("BoxParser","Parsing of box '"+h+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),e.seek(r.start+r.size)):n>0&&(a.error("BoxParser","Parsing of box '"+h+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),e.seek(r.start+r.size)),{code:c.OK,box:r,size:r.size})},c.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},c.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},c.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.ContainerBox.prototype.parse=function(e){for(var t,i;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)},c.SAMPLE_ENTRY_TYPE_VISUAL="Visual",c.SAMPLE_ENTRY_TYPE_AUDIO="Audio",c.SAMPLE_ENTRY_TYPE_HINT="Hint",c.SAMPLE_ENTRY_TYPE_METADATA="Metadata",c.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",c.SAMPLE_ENTRY_TYPE_SYSTEM="System",c.SAMPLE_ENTRY_TYPE_TEXT="Text",c.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},c.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},c.SampleEntry.prototype.parseFooter=function(e){c.ContainerBox.prototype.parse.call(this,e)},c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_HINT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)})),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT,"enct"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA,"encm"),c.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)a.error("av1C marker problem");else if(this.version=127&t,1===this.version)if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void a.error("av1C reserved_2 parsing problem");var i=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(i)}else a.error("av1C reserved_1 parsing problem");else a.error("av1C version "+this.version+" not supported")})),c.createBoxCtor("avcC",(function(e){var t,i;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),i=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(i))})),c.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),c.createBoxCtor("clap",(function(e){this.cleanApertureWidthN=e.readUint32(),this.cleanApertureWidthD=e.readUint32(),this.cleanApertureHeightN=e.readUint32(),this.cleanApertureHeightD=e.readUint32(),this.horizOffN=e.readUint32(),this.horizOffD=e.readUint32(),this.vertOffN=e.readUint32(),this.vertOffD=e.readUint32()})),c.createBoxCtor("clli",(function(e){this.max_content_light_level=e.readUint16(),this.max_pic_average_light_level=e.readUint16()})),c.createFullBoxCtor("co64",(function(e){var t,i;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(i=0;i>7}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4))})),c.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),c.createFullBoxCtor("cslg",(function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())})),c.createFullBoxCtor("ctts",(function(e){var t,i;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(i=0;i>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|i>>6&3,this.acmod=i>>3&7,this.lfeon=i>>2&1,this.bit_rate_code=3&i|r>>5&7})),c.createBoxCtor("dec3",(function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var i=0;i>6,r.bsid=n>>1&31,r.bsmod=(1&n)<<4|a>>4&15,r.acmod=a>>1&7,r.lfeon=1&a,r.num_dep_sub=s>>1&15,r.num_dep_sub>0&&(r.chan_loc=(1&s)<<8|e.readUint8())}})),c.createFullBoxCtor("dfLa",(function(e){var t=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var r=e.readUint8(),n=Math.min(127&r,i.length-1);if(n?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(i[n]),128&r)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),c.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),c.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),c.createFullBoxCtor("dref",(function(e){var t,i;this.entries=[];for(var r=e.readUint32(),n=0;n=4;)this.compatible_brands[i]=e.readString(4),t-=4,i++})),c.createFullBoxCtor("hdlr",(function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))})),c.createBoxCtor("hvcC",(function(e){var t,i,r,n;this.configurationVersion=e.readUint8(),n=e.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),n=e.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var a=e.readUint8();for(t=0;t>7,s.nalu_type=63&n;var o=e.readUint16();for(i=0;i>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var i=0;if(this.version<2)i=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";i=e.readUint32()}for(var r=0;r=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))})),c.createFullBoxCtor("ipma",(function(e){var t,i;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?s.property_index=(127&a)<<8|e.readUint8():s.property_index=127&a}}})),c.createFullBoxCtor("iref",(function(e){var t,i;for(this.references=[];e.getPosition()>7,r.assignment_type=127&n,r.assignment_type){case 0:r.grouping_type=e.readString(4);break;case 1:r.grouping_type=e.readString(4),r.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:r.sub_track_id=e.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type")}}})),c.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),c.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=e.readUint16(),this.display_primaries[0].y=e.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=e.readUint16(),this.display_primaries[1].y=e.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=e.readUint16(),this.display_primaries[2].y=e.readUint16(),this.white_point={},this.white_point.x=e.readUint16(),this.white_point.y=e.readUint16(),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),c.createFullBoxCtor("mdhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()})),c.createFullBoxCtor("mehd",(function(e){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()})),c.createFullBoxCtor("meta",(function(e){this.boxes=[],c.ContainerBox.prototype.parse.call(this,e)})),c.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),c.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),c.createFullBoxCtor("mvhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()})),c.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),c.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),c.createFullBoxCtor("padb",(function(e){var t=e.readUint32();this.padbits=[];for(var i=0;i0){var t=e.readUint32();this.kid=[];for(var i=0;i0&&(this.data=e.readUint8Array(r))})),c.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),c.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),c.createFullBoxCtor("saio",(function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var i=0;i>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var i=e.readUint8(),r=0;r>7,this.num_leading_samples=127&t})),c.createSampleGroupCtor("rash",(function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=c.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))})),c.createSampleGroupCtor("stsa",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),c.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),c.createSampleGroupCtor("tsas",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("tscl",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("vipr",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createFullBoxCtor("sbgp",(function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),i=0;i>6,this.sample_depends_on[r]=t>>4&3,this.sample_is_depended_on[r]=t>>2&3,this.sample_has_redundancy[r]=3&t})),c.createFullBoxCtor("senc"),c.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),i=0;i>31&1,r.referenced_size=2147483647&n,r.subsegment_duration=e.readUint32(),n=e.readUint32(),r.starts_with_SAP=n>>31&1,r.SAP_type=n>>28&7,r.SAP_delta_time=268435455&n}})),c.SingleItemTypeReferenceBox=function(e,t,i,r){c.Box.call(this,e,t),this.hdr_size=i,this.start=r},c.SingleItemTypeReferenceBox.prototype=new c.Box,c.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var i=0;i>4&15,this.sample_sizes[t+1]=15&r}else if(8===this.field_size)for(t=0;t0)for(i=0;i>4&15,this.default_skip_byte_block=15&t}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=c.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))})),c.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),c.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),c.createFullBoxCtor("tfra",(function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var i=e.readUint32(),r=0;r>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()})),c.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),c.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),c.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},c.createTrackGroupCtor("msrc"),c.TrackReferenceTypeBox=function(e,t,i,r){c.Box.call(this,e,t),this.hdr_size=i,this.start=r},c.TrackReferenceTypeBox.prototype=new c.Box,c.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},c.trefBox.prototype.parse=function(e){for(var t,i;e.getPosition()t&&this.flags&c.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var i=0;i0&&(this.location=e.readCString())})),c.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})),c.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=c.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),c.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),c.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=c.parseHex16(e)})),c.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))})),c.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),c.SampleEntry.prototype.isVideo=function(){return!1},c.SampleEntry.prototype.isAudio=function(){return!1},c.SampleEntry.prototype.isSubtitle=function(){return!1},c.SampleEntry.prototype.isMetadata=function(){return!1},c.SampleEntry.prototype.isHint=function(){return!1},c.SampleEntry.prototype.getCodec=function(){return this.type.replace(".","")},c.SampleEntry.prototype.getWidth=function(){return""},c.SampleEntry.prototype.getHeight=function(){return""},c.SampleEntry.prototype.getChannelCount=function(){return""},c.SampleEntry.prototype.getSampleRate=function(){return""},c.SampleEntry.prototype.getSampleSize=function(){return""},c.VisualSampleEntry.prototype.isVideo=function(){return!0},c.VisualSampleEntry.prototype.getWidth=function(){return this.width},c.VisualSampleEntry.prototype.getHeight=function(){return this.height},c.AudioSampleEntry.prototype.isAudio=function(){return!0},c.AudioSampleEntry.prototype.getChannelCount=function(){return this.channel_count},c.AudioSampleEntry.prototype.getSampleRate=function(){return this.samplerate},c.AudioSampleEntry.prototype.getSampleSize=function(){return this.samplesize},c.SubtitleSampleEntry.prototype.isSubtitle=function(){return!0},c.MetadataSampleEntry.prototype.isMetadata=function(){return!0},c.decimalToHex=function(e,t){var i=Number(e).toString(16);for(t=null==t?t=2:t;i.length>=1;t+=c.decimalToHex(r,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var n=!1,a="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||n)&&(a="."+c.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+a,n=!0);t+=a}return t},c.mp4aSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),i=this.esds.esd.getAudioConfig();return e+"."+c.decimalToHex(t)+(i?"."+i:"")}return e},c.stxtSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},c.av01SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this);return 2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+this.av1C.seq_level_idx_0+(this.av1C.seq_tier_0?"H":"M")+"."+e},c.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>l?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>l&&e.writeUint64(this.size)},c.FullBox.prototype.writeHeader=function(e){this.size+=4,c.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},c.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},c.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1-1||e[i]instanceof c.Box||t[i]instanceof c.Box||void 0===e[i]||void 0===t[i]||"function"==typeof e[i]||"function"==typeof t[i]||e.subBoxNames&&e.subBoxNames.indexOf(i.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(i.slice(0,4))>-1||"data"===i||"start"===i||"size"===i||"creation_time"===i||"modification_time"===i||c.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1||e[i]===t[i]))return!1;return!0},c.boxEqual=function(e,t){if(!c.boxEqualFields(e,t))return!1;for(var i=0;i=t?e:new Array(t-e.length+1).join(i)+e}function n(e){var t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),n=Math.floor(e-3600*t-60*i),a=Math.floor(1e3*(e-3600*t-60*i-n));return r(t,2)+":"+r(i,2)+":"+r(n,2)+"."+r(a,3)}for(var a=this.parseSample(i),s="",o=0;o1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1)},p.prototype.setExtractionOptions=function(e,t,i){var r=this.getTrackById(e);if(r){var n={};this.extractedTracks.push(n),n.id=e,n.user=t,n.trak=r,r.nextSample=0,n.nb_samples=1e3,n.samples=[],i&&i.nbSamples&&(n.nb_samples=i.nbSamples)}},p.prototype.unsetExtractionOptions=function(e){for(var t=-1,i=0;i-1&&this.extractedTracks.splice(t,1)},p.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this.saveParsePosition&&this.saveParsePosition(),(e=c.parseOneBox(this.stream,!1)).code===c.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var i;switch(i="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),i){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[i]&&a.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},p.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1))},p.prototype.appendBuffer=function(e,t){var i;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(i=this.nextSeekPosition,this.nextSeekPosition=void 0):i=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(i=this.stream.getEndFilePositionAfter(i))):i=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+i),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i},p.prototype.getInfo=function(){var e,t,i,r,n,a={},s=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(a.hasMoov=!0,a.duration=this.moov.mvhd.duration,a.timescale=this.moov.mvhd.timescale,a.isFragmented=null!=this.moov.mvex,a.isFragmented&&this.moov.mvex.mehd&&(a.fragment_duration=this.moov.mvex.mehd.fragment_duration),a.isProgressive=this.isProgressive,a.hasIOD=null!=this.moov.iods,a.brands=[],a.brands.push(this.ftyp.major_brand),a.brands=a.brands.concat(this.ftyp.compatible_brands),a.created=new Date(s+1e3*this.moov.mvhd.creation_time),a.modified=new Date(s+1e3*this.moov.mvhd.modification_time),a.tracks=[],a.audioTracks=[],a.videoTracks=[],a.subtitleTracks=[],a.metadataTracks=[],a.hintTracks=[],a.otherTracks=[],e=0;e0?a.mime+='video/mp4; codecs="':a.audioTracks&&a.audioTracks.length>0?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e=i.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+r.id+" for samples ["+Math.max(0,i.nextSample-r.nb_samples)+","+(i.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(r.id,r.user,r.segmentStream.buffer,i.nextSample,e||i.nextSample>=i.samples.length),r.segmentStream=null,r!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t=i.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+s.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(s.id,s.user,s.samples),s.samples=[],s!==this.extractedTracks[t]))break}}}},p.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},p.prototype.getBoxes=function(e,t){var i=[];return p._sweep.call(this,e,i,t),i},p._sweep=function(e,t,i){for(var r in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;p._sweep.call(this.boxes[r],e,t,i)}},p.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},p.prototype.getTrackSample=function(e,t){var i=this.getTrackById(e);return this.getSample(i,t)},p.prototype.releaseUsedSamples=function(e,t){var i=0,r=this.getTrackById(e);r.lastValidSample||(r.lastValidSample=0);for(var n=r.lastValidSample;ne*n.timescale){f=r-1;break}t&&n.is_sync&&(l=r)}for(t&&(f=l),e=i.samples[f].cts,i.nextSample=f;i.samples[f].alreadyRead===i.samples[f].size&&i.samples[f+1];)f++;return s=i.samples[f].offset+i.samples[f].alreadyRead,a.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+a.getDurationString(e,o)+" and offset: "+s),{offset:s,time:e/o}},p.prototype.seek=function(e,t){var i,r,n,s=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(n=0;n-1){s=o;break}switch(s){case"Visual":n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24);break;case"Audio":n.add("smhd").set("balance",t.balance||0),a.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":switch(n.add("sthd"),t.type){case"stpp":a.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"")}break;case"Metadata":case"System":default:n.add("nmhd")}t.description&&a.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){a.addBox(e)})),n.add("dinf").add("dref").addEntry((new c["url Box"]).set("flags",1));var u=n.add("stbl");return u.add("stsd").addEntry(a),u.add("stts").set("sample_counts",[]).set("sample_deltas",[]),u.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),u.add("stco").set("chunk_offsets",[]),u.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(i),t.id}},c.Box.prototype.computeSize=function(e){var t=e||new o;t.endianness=o.BIG_ENDIAN,this.write(t)},p.prototype.addSample=function(e,t,i){var r=i||{},n={},a=this.getTrackById(e);if(null!==a){n.number=a.samples.length,n.track_id=a.tkhd.track_id,n.timescale=a.mdia.mdhd.timescale,n.description_index=r.sample_description_index?r.sample_description_index-1:0,n.description=a.mdia.minf.stbl.stsd.entries[n.description_index],n.data=t,n.size=t.length,n.alreadyRead=n.size,n.duration=r.duration||1,n.cts=r.cts||0,n.dts=r.dts||0,n.is_sync=r.is_sync||!1,n.is_leading=r.is_leading||0,n.depends_on=r.depends_on||0,n.is_depended_on=r.is_depended_on||0,n.has_redundancy=r.has_redundancy||0,n.degradation_priority=r.degradation_priority||0,n.offset=0,n.subsamples=r.subsamples,a.samples.push(n),a.samples_size+=n.size,a.samples_duration+=n.duration,this.processSamples();var s=p.createSingleSampleMoof(n);return this.addBox(s),s.computeSize(),s.trafs[0].truns[0].data_offset=s.size+8,this.add("mdat").data=t,n}},p.createSingleSampleMoof=function(e){var t=new c.moofBox;t.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=t.add("traf");return i.add("tfhd").set("track_id",e.track_id).set("flags",c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts),i.add("trun").set("flags",c.TRUN_FLAGS_DATA_OFFSET|c.TRUN_FLAGS_DURATION|c.TRUN_FLAGS_SIZE|c.TRUN_FLAGS_FLAGS|c.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[0]).set("sample_composition_time_offset",[e.cts-e.dts]),t},p.prototype.lastMoofIndex=0,p.prototype.samplesDataSize=0,p.prototype.resetTables=function(){var e,t,i,r,n,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=n[s].grouping_type+"/0",(o=new f(n[s].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=o))}else for(s=0;s=2&&(l=r[s].grouping_type+"/0",o=new f(r[s].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=o))},p.setSampleGroupProperties=function(e,t,i,r){var n,a;for(n in t.sample_groups=[],r){var s;if(t.sample_groups[n]={},t.sample_groups[n].grouping_type=r[n].grouping_type,t.sample_groups[n].grouping_type_parameter=r[n].grouping_type_parameter,i>=r[n].last_sample_in_run&&(r[n].last_sample_in_run<0&&(r[n].last_sample_in_run=0),r[n].entry_index++,r[n].entry_index<=r[n].sbgp.entries.length-1&&(r[n].last_sample_in_run+=r[n].sbgp.entries[r[n].entry_index].sample_count)),r[n].entry_index<=r[n].sbgp.entries.length-1?t.sample_groups[n].group_description_index=r[n].sbgp.entries[r[n].entry_index].group_description_index:t.sample_groups[n].group_description_index=-1,0!==t.sample_groups[n].group_description_index)s=r[n].fragment_description?r[n].fragment_description:r[n].description,t.sample_groups[n].group_description_index>0?(a=t.sample_groups[n].group_description_index>65535?(t.sample_groups[n].group_description_index>>16)-1:t.sample_groups[n].group_description_index-1,s&&a>=0&&(t.sample_groups[n].description=s.entries[a])):s&&s.version>=2&&s.default_group_description_index>0&&(t.sample_groups[n].description=s.entries[s.default_group_description_index-1])}},p.process_sdtp=function(e,t,i){t&&(e?(t.is_leading=e.is_leading[i],t.depends_on=e.sample_depends_on[i],t.is_depended_on=e.sample_is_depended_on[i],t.has_redundancy=e.sample_has_redundancy[i]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},p.prototype.buildSampleLists=function(){var e,t;for(e=0;ey&&(g++,y<0&&(y=0),y+=a.sample_counts[g]),t>0?(e.samples[t-1].duration=a.sample_deltas[g],e.samples_duration+=e.samples[t-1].duration,T.dts=e.samples[t-1].dts+e.samples[t-1].duration):T.dts=0,s?(t>=w&&(E++,w<0&&(w=0),w+=s.sample_counts[E]),T.cts=e.samples[t].dts+s.sample_offsets[E]):T.cts=T.dts,o?(t==o.sample_numbers[C]-1?(T.is_sync=!0,C++):(T.is_sync=!1,T.degradation_priority=0),f&&f.entries[S].sample_delta+j==t+1&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta,S++)):T.is_sync=!0,p.process_sdtp(e.mdia.minf.stbl.sdtp,T,T.number),T.degradation_priority=h?h.priority[t]:0,f&&f.entries[S].sample_delta+j==t&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta),(u.length>0||c.length>0)&&p.setSampleGroupProperties(e,T,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},p.prototype.updateSampleLists=function(){var e,t,i,r,n,a,s,o,l,f,u,h,d,_,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&p.initSampleGroups(h,u,u.sbgps,h.mdia.minf.stbl.sgpds,u.sgpds),t=0;t0?_.dts=h.samples[h.samples.length-2].dts+h.samples[h.samples.length-2].duration:(u.tfdt?_.dts=u.tfdt.baseMediaDecodeTime:_.dts=0,h.first_traf_merged=!0),_.cts=_.dts,b.flags&c.TRUN_FLAGS_CTS_OFFSET&&(_.cts=_.dts+b.sample_composition_time_offset[i]),m=s,b.flags&c.TRUN_FLAGS_FLAGS?m=b.sample_flags[i]:0===i&&b.flags&c.TRUN_FLAGS_FIRST_FLAG&&(m=b.first_sample_flags),_.is_sync=!(m>>16&1),_.is_leading=m>>26&3,_.depends_on=m>>24&3,_.is_depended_on=m>>22&3,_.has_redundancy=m>>20&3,_.degradation_priority=65535&m;var v=!!(u.tfhd.flags&c.TFHD_FLAG_BASE_DATA_OFFSET),y=!!(u.tfhd.flags&c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),g=!!(b.flags&c.TRUN_FLAGS_DATA_OFFSET),w=0;w=v?u.tfhd.base_data_offset:y||0===t?f.start:o,_.offset=0===t&&0===i?g?w+b.data_offset:w:o,o=_.offset+_.size,(u.sbgps.length>0||u.sgpds.length>0||h.mdia.minf.stbl.sbgps.length>0||h.mdia.minf.stbl.sgpds.length>0)&&p.setSampleGroupProperties(h,_,_.number_in_traf,u.sample_groups_info)}}if(u.subs){h.has_fragment_subsamples=!0;var E=u.first_sample_index;for(t=0;t-1))return null;var s=(i=this.stream.buffers[n]).byteLength-(r.offset+r.alreadyRead-i.fileStart);if(r.size-r.alreadyRead<=s)return a.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+(r.size-r.alreadyRead)+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,r.size-r.alreadyRead),i.usedBytes+=r.size-r.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead=r.size,r;if(0===s)return null;a.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+s+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,s),r.alreadyRead+=s,i.usedBytes+=s,this.stream.logBufferLevel()}},p.prototype.releaseSample=function(e,t){var i=e.samples[t];return i.data?(this.samplesDataSize-=i.size,i.data=null,i.alreadyRead=0,i.size):0},p.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},p.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec()}return t},p.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(i.protection=n.ipro.protections[n.iinf.item_infos[e].protection_index-1]),n.iinf.item_infos[e].item_type?i.type=n.iinf.item_infos[e].item_type:i.type="mime",i.content_type=n.iinf.item_infos[e].content_type,i.content_encoding=n.iinf.item_infos[e].content_encoding;if(n.iloc)for(e=0;e0){var h=n.iprp.ipco.boxes[c.property_index-1];i.properties[h.type]=h,i.properties.boxes.push(h)}}}}}},p.prototype.getItem=function(e){var t,i;if(!this.meta)return null;if(!(i=this.items[e]).data&&i.size)i.data=new Uint8Array(i.size),i.alreadyRead=0,this.itemsDataSize+=i.size,a.debug("ISOFile","Allocating item #"+e+" of size "+i.size+" (total: "+this.itemsDataSize+")");else if(i.alreadyRead===i.size)return i;for(var r=0;r-1))return null;var l=(t=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-t.fileStart);if(!(n.length-n.alreadyRead<=l))return a.debug("ISOFile","Getting item #"+e+" extent #"+r+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+l+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,l),n.alreadyRead+=l,i.alreadyRead+=l,t.usedBytes+=l,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+e+" extent #"+r+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,n.length-n.alreadyRead),t.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length}}return i.alreadyRead===i.size?i:null},p.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var i=0;i0?this.moov.traks[e].samples[0].duration:0),t.push(r)}return t},c.Box.prototype.printHeader=function(e){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},c.FullBox.prototype.printHeader=function(e){this.size+=4,c.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},c.Box.prototype.print=function(e){this.printHeader(e)},c.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},c.tkhdBox.prototype.print=function(e){c.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var m={createFile:function(e,t){var i=void 0===e||e,r=new p(t);return r.discardMdatData=!i,r}};void 0!==i&&(i.createFile=m.createFile)},{}],145:[function(e,t,i){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"}},{}],146:[function(e,t,i){"use strict";var r=e("asn1.js");i.certificate=e("./certificate");var n=r.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())}));i.RSAPrivateKey=n;var a=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));i.RSAPublicKey=a;var s=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}));i.PublicKey=s;var o=r.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())})),l=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())}));i.PrivateKey=l;var f=r.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())}));i.EncryptedPrivateKey=f;var u=r.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())}));i.DSAPrivateKey=u,i.DSAparam=r.define("DSAparam",(function(){this.int()}));var c=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));i.ECPrivateKey=c;var h=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));i.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":147,"asn1.js":2}],147:[function(e,t,i){"use strict";var r=e("asn1.js"),n=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),o=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),l=r.define("RelativeDistinguishedName",(function(){this.setof(a)})),f=r.define("RDNSequence",(function(){this.seqof(l)})),u=r.define("Name",(function(){this.choice({rdnSequence:this.use(f)})})),c=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),h=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(u),this.key("validity").use(c),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),_=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=_},{"asn1.js":2}],148:[function(e,t,i){var r=/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,s=e("evp_bytestokey"),o=e("browserify-aes"),l=e("safe-buffer").Buffer;t.exports=function(e,t){var i,f=e.toString(),u=f.match(r);if(u){var c="aes"+u[1],h=l.from(u[2],"hex"),d=l.from(u[3].replace(/[\r\n]/g,""),"base64"),_=s(t,h.slice(0,8),parseInt(u[1],10)).key,p=[],m=o.createDecipheriv(c,_,h);p.push(m.update(d)),p.push(m.final()),i=l.concat(p)}else{var b=f.match(a);i=l.from(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:f.match(n)[1],data:i}}},{"browserify-aes":23,evp_bytestokey:105,"safe-buffer":184}],149:[function(e,t,i){var r=e("./asn1"),n=e("./aesid.json"),a=e("./fixProc"),s=e("browserify-aes"),o=e("pbkdf2"),l=e("safe-buffer").Buffer;function f(e){var t;"object"!=typeof e||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var i,f,u=a(e,t),c=u.tag,h=u.data;switch(c){case"CERTIFICATE":f=r.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=r.PublicKey.decode(h,"der")),i=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=r.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=n[e.algorithm.decrypt.cipher.algo.join(".")],f=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,c=parseInt(a.split("-")[1],10)/8,h=o.pbkdf2Sync(t,i,r,c,"sha1"),d=s.createDecipheriv(a,h,f),_=[];return _.push(d.update(u)),_.push(d.final()),l.concat(_)}(h=r.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(i=(f=r.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:r.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=r.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=r.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+c)}}t.exports=f,f.signature=r.signature},{"./aesid.json":145,"./asn1":146,"./fixProc":148,"browserify-aes":23,pbkdf2:151,"safe-buffer":184}],150:[function(e,t,i){(function(e){function t(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],r=0;r=-1&&!n;a--){var s=a>=0?arguments[a]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(i=s+"/"+i,n="/"===s.charAt(0))}return(n?"/":"")+(i=t(r(i.split("/"),(function(e){return!!e})),!n).join("/"))||"."},i.normalize=function(e){var a=i.isAbsolute(e),s="/"===n(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!a).join("/"))||a||(e="."),e&&s&&(e+="/"),(a?"/":"")+e},i.isAbsolute=function(e){return"/"===e.charAt(0)},i.join=function(){var e=Array.prototype.slice.call(arguments,0);return i.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},i.relative=function(e,t){function r(e){for(var t=0;t=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=i.resolve(e).substr(1),t=i.resolve(t).substr(1);for(var n=r(e.split("/")),a=r(t.split("/")),s=Math.min(n.length,a.length),o=s,l=0;l=1;--a)if(47===(t=e.charCodeAt(a))){if(!n){r=a;break}}else n=!1;return-1===r?i?"/":".":i&&1===r?"/":e.slice(0,r)},i.basename=function(e,t){var i=function(e){"string"!=typeof e&&(e+="");var t,i=0,r=-1,n=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!n){i=t+1;break}}else-1===r&&(n=!1,r=t+1);return-1===r?"":e.slice(i,r)}(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},i.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,i=0,r=-1,n=!0,a=0,s=e.length-1;s>=0;--s){var o=e.charCodeAt(s);if(47!==o)-1===r&&(n=!1,r=s+1),46===o?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!n){i=s+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===i+1?"":e.slice(t,r)};var n="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,e("_process"))},{_process:158}],151:[function(e,t,i){i.pbkdf2=e("./lib/async"),i.pbkdf2Sync=e("./lib/sync")},{"./lib/async":152,"./lib/sync":155}],152:[function(e,t,i){(function(i,r){var n,a=e("safe-buffer").Buffer,s=e("./precondition"),o=e("./default-encoding"),l=e("./sync"),f=e("./to-buffer"),u=r.crypto&&r.crypto.subtle,c={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function d(e,t,i,r,n){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:i,hash:{name:n}},e,r<<3)})).then((function(e){return a.from(e)}))}t.exports=function(e,t,_,p,m,b){"function"==typeof m&&(b=m,m=void 0);var v=c[(m=m||"sha1").toLowerCase()];if(!v||"function"!=typeof r.Promise)return i.nextTick((function(){var i;try{i=l(e,t,_,p,m)}catch(e){return b(e)}b(null,i)}));if(s(_,p),e=f(e,o,"Password"),t=f(t,o,"Salt"),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){i.nextTick((function(){t(null,e)}))}),(function(e){i.nextTick((function(){t(e)}))}))}(function(e){if(r.process&&!r.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var t=d(n=n||a.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return h[e]=t,t}(v).then((function(i){return i?d(e,t,_,p,v):l(e,t,_,p,m)})),b)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":153,"./precondition":154,"./sync":155,"./to-buffer":156,_process:158,"safe-buffer":184}],153:[function(e,t,i){(function(e){var i;if(e.browser)i="utf-8";else if(e.version){i=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else i="utf-8";t.exports=i}).call(this,e("_process"))},{_process:158}],154:[function(e,t,i){var r=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>r||t!=t)throw new TypeError("Bad key length")}},{}],155:[function(e,t,i){var r=e("create-hash/md5"),n=e("ripemd160"),a=e("sha.js"),s=e("safe-buffer").Buffer,o=e("./precondition"),l=e("./default-encoding"),f=e("./to-buffer"),u=s.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,i){var o=function(e){function t(t){return a(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?function(e){return(new n).update(e).digest()}:"md5"===e?r:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=o(t):t.length1)for(var i=1;i_||new s(t).cmp(d.modulus)>=0)throw new Error("decryption error");h=i?f(new s(t),d):o(t,d);var p=u.alloc(_-h.length);if(h=u.concat([p,h],_),4===c)return function(e,t){var i=e.modulus.byteLength(),r=l("sha1").update(u.alloc(0)).digest(),s=r.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,s+1),f=t.slice(s+1),c=a(o,n(f,s)),h=a(f,n(c,i-s-1));if(function(e,t){e=u.from(e),t=u.from(t);var i=0,r=e.length;e.length!==t.length&&(i++,r=Math.min(e.length,t.length));var n=-1;for(;++n=t.length){a++;break}var s=t.slice(2,n-1);("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&a++;s.length<8&&a++;if(a)throw new Error("decryption error");return t.slice(n)}(0,h,i);if(3===c)return h;throw new Error("unknown padding")}},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,"safe-buffer":184}],163:[function(e,t,i){var r=e("parse-asn1"),n=e("randombytes"),a=e("create-hash"),s=e("./mgf"),o=e("./xor"),l=e("bn.js"),f=e("./withPublic"),u=e("browserify-rsa"),c=e("safe-buffer").Buffer;t.exports=function(e,t,i){var h;h=e.padding?e.padding:i?1:4;var d,_=r(e);if(4===h)d=function(e,t){var i=e.modulus.byteLength(),r=t.length,f=a("sha1").update(c.alloc(0)).digest(),u=f.length,h=2*u;if(r>i-h-2)throw new Error("message too long");var d=c.alloc(i-r-h-2),_=i-u-1,p=n(u),m=o(c.concat([f,d,c.alloc(1,1),t],_),s(p,_)),b=o(p,s(m,u));return new l(c.concat([c.alloc(1),b,m],i))}(_,t);else if(1===h)d=function(e,t,i){var r,a=t.length,s=e.modulus.byteLength();if(a>s-11)throw new Error("message too long");r=i?c.alloc(s-a-3,255):function(e){var t,i=c.allocUnsafe(e),r=0,a=n(2*e),s=0;for(;r=0)throw new Error("data too long for modulus")}return i?u(d,_):f(d,_)}},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,randombytes:166,"safe-buffer":184}],164:[function(e,t,i){var r=e("bn.js"),n=e("safe-buffer").Buffer;t.exports=function(e,t){return n.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},{"bn.js":161,"safe-buffer":184}],165:[function(e,t,i){t.exports=function(e,t){for(var i=e.length,r=-1;++r4294967295)throw new RangeError("requested too many random bytes");var r=n.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;su||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function h(e,t,i){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>i||e>l)throw new RangeError("buffer too small")}function d(e,i,r,n){if(t.browser){var a=e.buffer,o=new Uint8Array(a,i,r);return f.getRandomValues(o),n?void t.nextTick((function(){n(null,e)})):e}if(!n)return s(r).copy(e,i),e;s(r,(function(t,r){if(t)return n(t);r.copy(e,i),n(null,e)}))}f&&f.getRandomValues||!t.browser?(i.randomFill=function(e,t,i,n){if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)n=t,t=0,i=e.length;else if("function"==typeof i)n=i,i=e.length-t;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return c(t,e.length),h(i,t,e.length),d(e,t,i,n)},i.randomFillSync=function(e,t,i){void 0===t&&(t=0);if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');c(t,e.length),void 0===i&&(i=e.length-t);return h(i,t,e.length),d(e,t,i)}):(i.randomFill=n,i.randomFillSync=n)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:158,randombytes:166,"safe-buffer":184}],168:[function(e,t,i){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":169}],169:[function(e,t,i){"use strict";var r=e("process-nextick-args"),n=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=c;var a=Object.create(e("core-util-is"));a.inherits=e("inherits");var s=e("./_stream_readable"),o=e("./_stream_writable");a.inherits(c,s);for(var l=n(o.prototype),f=0;f0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):j(e,s)):w(e,s,t,!1))):r||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(S,e):S(e))}function S(e){d("emit readable"),e.emit("readable"),M(e)}function j(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(T,e,t))}function T(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;ea.length?a.length:e;if(s===a.length?n+=a:n+=a.slice(0,e),0===(e-=s)){s===a.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(s));break}++r}return t.length-=r,n}(e,t):function(e,t){var i=f.allocUnsafe(e),r=t.head,n=1;r.data.copy(i),e-=r.data.length;for(;r=r.next;){var a=r.data,s=e>a.length?a.length:e;if(a.copy(i,i.length-e,0,s),0===(e-=s)){s===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break}++n}return t.length-=n,i}(e,t);return r}(e,t.buffer,t.decoder),i);var i}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(I,t,e))}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function R(e,t){for(var i=0,r=e.length;i=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):C(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&P(this),null;var r,n=t.needReadable;return d("need readable",n),(0===t.length||t.length-e0?k(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&P(this)),null!==r&&this.emit("data",r),r},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,t);var l=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:y;function f(t,i){d("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",c),e.removeListener("error",m),e.removeListener("unpipe",f),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",p),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function u(){d("onend"),e.end()}a.endEmitted?n.nextTick(l):r.once("end",l),e.on("unpipe",f);var c=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",c);var h=!1;var _=!1;function p(t){d("ondata"),_=!1,!1!==e.write(t)||_||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==R(a.pipes,e))&&!h&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,_=!0),r.pause())}function m(t){d("onerror",t),y(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),y()}function v(){d("onfinish"),e.removeListener("close",b),y()}function y(){d("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",m),e.once("close",b),e.once("finish",v),e.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a-1?n:a.nextTick;v.WritableState=b;var f=Object.create(e("core-util-is"));f.inherits=e("inherits");var u={deprecate:e("util-deprecate")},c=e("./internal/streams/stream"),h=e("safe-buffer").Buffer,d=r.Uint8Array||function(){};var _,p=e("./internal/streams/destroy");function m(){}function b(t,i){o=o||e("./_stream_duplex"),t=t||{};var r=i instanceof o;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,f=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(f||0===f)?f:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?(a.nextTick(n,r),a.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(n(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t))}(e,i,r,t,n);else{var s=E(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||w(e,i),r?l(g,e,i,s,n):g(e,i,s,n)}}(i,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 s(this)}function v(t){if(o=o||e("./_stream_duplex"),!(_.call(v,this)||this instanceof o))return new v(t);this._writableState=new b(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)),c.call(this)}function y(e,t,i,r,n,a,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function g(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),a=t.corkedRequestsFree;a.entry=i;for(var o=0,l=!0;i;)n[o]=i,i.isBuf||(l=!1),i=i.next,o+=1;n.allBuffers=l,y(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;i;){var f=i.chunk,u=i.encoding,c=i.callback;if(y(e,t,!1,t.objectMode?1:f.length,f,u,c),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var i=E(t);return i&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}f.inherits(v,c),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!_.call(this,e)||this===v&&(e&&e._writableState instanceof b)}})):_=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,i){var r,n=this._writableState,s=!1,o=!n.objectMode&&(r=e,h.isBuffer(r)||r instanceof d);return o&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(i=t,t=null),o?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof i&&(i=m),n.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),a.nextTick(t,i)}(this,i):(o||function(e,t,i,r){var n=!0,s=!1;return null===i?s=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),a.nextTick(r,s),n=!1),n}(this,n,e,i))&&(n.pendingcb++,s=function(e,t,i,r,n,a){if(!i){var s=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,i));return t}(t,r,n);r!==s&&(i=!0,n="buffer",r=s)}var o=t.objectMode?1:r.length;t.length+=o;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,S(e,t),i&&(t.finished?a.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,r,i)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=p.destroy,v.prototype._undestroy=p.undestroy,v.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":169,"./internal/streams/destroy":175,"./internal/streams/stream":176,_process:158,"core-util-is":68,inherits:136,"process-nextick-args":157,"safe-buffer":177,timers:196,"util-deprecate":197}],174:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,i,n,a=r.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,i=a,n=o,t.copy(i,n),o+=s.data.length,s=s.next;return a},e}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":177,util:20}],175:[function(e,t,i){"use strict";var r=e("process-nextick-args");function n(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var i=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(n,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(n,i,e),i._writableState&&(i._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":157}],176:[function(e,t,i){arguments[4][62][0].apply(i,arguments)},{dup:62,events:104}],177:[function(e,t,i){var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:66}],178:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=r.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}};function a(e){var t;switch(this.encoding=function(e){var t=function(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}}(e);if("string"!=typeof t&&(r.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=f,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=u,this.end=c,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,i=function(e,t,i){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,"�"}}(this,e);return void 0!==i?i: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 l(e,t){if((e.length-t)%2==0){var i=e.toString("utf16le",t);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function u(e,t){var i=(e.length-t)%3;return 0===i?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?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-i))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}i.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i=0)return n>0&&(e.lastNeed=n-1),n;if(--r=0)return n>0&&(e.lastNeed=n-2),n;if(--r=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var r=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},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":177}],179:[function(e,t,i){t.exports=e("./readable").PassThrough},{"./readable":180}],180:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":169,"./lib/_stream_passthrough.js":170,"./lib/_stream_readable.js":171,"./lib/_stream_transform.js":172,"./lib/_stream_writable.js":173}],181:[function(e,t,i){t.exports=e("./readable").Transform},{"./readable":180}],182:[function(e,t,i){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":173}],183:[function(e,t,i){"use strict";var r=e("buffer").Buffer,n=e("inherits"),a=e("hash-base"),s=new Array(16),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],c=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function _(e,t){return e<>>32-t}function p(e,t,i,r,n,a,s,o){return _(e+(t^i^r)+a+s|0,o)+n|0}function m(e,t,i,r,n,a,s,o){return _(e+(t&i|~t&r)+a+s|0,o)+n|0}function b(e,t,i,r,n,a,s,o){return _(e+((t|~i)^r)+a+s|0,o)+n|0}function v(e,t,i,r,n,a,s,o){return _(e+(t&r|i&~r)+a+s|0,o)+n|0}function y(e,t,i,r,n,a,s,o){return _(e+(t^(i|~r))+a+s|0,o)+n|0}n(d,a),d.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var i=0|this._a,r=0|this._b,n=0|this._c,a=0|this._d,d=0|this._e,g=0|this._a,w=0|this._b,E=0|this._c,C=0|this._d,S=0|this._e,j=0;j<80;j+=1){var T,A;j<16?(T=p(i,r,n,a,d,e[o[j]],c[0],f[j]),A=y(g,w,E,C,S,e[l[j]],h[0],u[j])):j<32?(T=m(i,r,n,a,d,e[o[j]],c[1],f[j]),A=v(g,w,E,C,S,e[l[j]],h[1],u[j])):j<48?(T=b(i,r,n,a,d,e[o[j]],c[2],f[j]),A=b(g,w,E,C,S,e[l[j]],h[2],u[j])):j<64?(T=v(i,r,n,a,d,e[o[j]],c[3],f[j]),A=m(g,w,E,C,S,e[l[j]],h[3],u[j])):(T=y(i,r,n,a,d,e[o[j]],c[4],f[j]),A=p(g,w,E,C,S,e[l[j]],h[4],u[j])),i=d,d=a,a=_(n,10),n=r,r=T,g=S,S=C,C=_(E,10),E=w,w=A}var x=this._b+n+C|0;this._b=this._c+a+S|0,this._c=this._d+d+g|0,this._d=this._e+i+w|0,this._e=this._a+r+E|0,this._a=x},d.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=r.alloc?r.alloc(20):new r(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=d},{buffer:66,"hash-base":106,inherits:136}],184:[function(e,t,i){ -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),s.prototype=Object.create(n.prototype),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:66}],185:[function(e,t,i){(function(i){"use strict";var r,n=e("buffer"),a=n.Buffer,s={};for(r in n)n.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(s[r]=n[r]);var o=s.Buffer={};for(r in a)a.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(o[r]=a[r]);if(s.Buffer.prototype=a.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(e,t,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return a(e,t,i)}),o.alloc||(o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=a(e);return t&&0!==t.length?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r}),!s.kStringMaxLength)try{s.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),t.exports=s}).call(this,e("_process"))},{_process:158,buffer:66}],186:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var i=this._block,n=this._blockSize,a=e.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},{"safe-buffer":184}],187:[function(e,t,i){(i=t.exports=function(e){e=e.toLowerCase();var t=i[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),i.sha1=e("./sha1"),i.sha224=e("./sha224"),i.sha256=e("./sha256"),i.sha384=e("./sha384"),i.sha512=e("./sha512")},{"./sha":188,"./sha1":189,"./sha224":190,"./sha256":191,"./sha384":192,"./sha512":193}],188:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e){return e<<30|e>>>2}function u(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,c=0;c<16;++c)i[c]=e.readInt32BE(4*c);for(;c<80;++c)i[c]=i[c-3]^i[c-8]^i[c-14]^i[c-16];for(var h=0;h<80;++h){var d=~~(h/20),_=0|((t=r)<<5|t>>>27)+u(d,n,a,o)+l+i[h]+s[d];l=o,o=a,a=f(n),n=r,r=_}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],189:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function c(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,h=0;h<16;++h)i[h]=e.readInt32BE(4*h);for(;h<80;++h)i[h]=(t=i[h-3]^i[h-8]^i[h-14]^i[h-16])<<1|t>>>31;for(var d=0;d<80;++d){var _=~~(d/20),p=f(r)+c(_,n,a,o)+l+i[d]+s[_]|0;l=o,o=a,a=u(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],190:[function(e,t,i){var r=e("inherits"),n=e("./sha256"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(64);function l(){this.init(),this._w=o,a.call(this,64,56)}r(l,n),l.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},l.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=l},{"./hash":186,"./sha256":191,inherits:136,"safe-buffer":184}],191:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],o=new Array(64);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e,t,i){return i^e&(t^i)}function u(e,t,i){return e&t|i&(e|t)}function c(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(l,n),l.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},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,_=0|this._f,p=0|this._g,m=0|this._h,b=0;b<16;++b)i[b]=e.readInt32BE(4*b);for(;b<64;++b)i[b]=0|(((t=i[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+i[b-7]+d(i[b-15])+i[b-16];for(var v=0;v<64;++v){var y=m+h(l)+f(l,_,p)+s[v]+i[v]|0,g=c(r)+u(r,n,a)|0;m=p,p=_,_=l,l=o+y|0,o=a,a=n,n=r,r=y+g|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0,this._f=_+this._f|0,this._g=p+this._g|0,this._h=m+this._h|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],192:[function(e,t,i){var r=e("inherits"),n=e("./sha512"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(160);function l(){this.init(),this._w=o,a.call(this,128,112)}r(l,n),l.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},l.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=l},{"./hash":186,"./sha512":193,inherits:136,"safe-buffer":184}],193:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=new Array(160);function l(){this.init(),this._w=o,n.call(this,128,112)}function f(e,t,i){return i^e&(t^i)}function u(e,t,i){return e&t|i&(e|t)}function c(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function _(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function b(e,t){return e>>>0>>0?1:0}r(l,n),l.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},l.prototype._update=function(e){for(var t=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,a=0|this._dh,o=0|this._eh,l=0|this._fh,v=0|this._gh,y=0|this._hh,g=0|this._al,w=0|this._bl,E=0|this._cl,C=0|this._dl,S=0|this._el,j=0|this._fl,T=0|this._gl,A=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var M=t[x-30],k=t[x-30+1],P=d(M,k),I=_(k,M),R=p(M=t[x-4],k=t[x-4+1]),U=m(k,M),D=t[x-14],F=t[x-14+1],O=t[x-32],L=t[x-32+1],B=I+F|0,N=P+D+b(B,I)|0;N=(N=N+R+b(B=B+U|0,U)|0)+O+b(B=B+L|0,L)|0,t[x]=N,t[x+1]=B}for(var z=0;z<160;z+=2){N=t[z],B=t[z+1];var H=u(i,r,n),V=u(g,w,E),Y=c(i,g),q=c(g,i),X=h(o,S),W=h(S,o),G=s[z],K=s[z+1],Q=f(o,l,v),Z=f(S,j,T),J=A+W|0,$=y+X+b(J,A)|0;$=($=($=$+Q+b(J=J+Z|0,Z)|0)+G+b(J=J+K|0,K)|0)+N+b(J=J+B|0,B)|0;var ee=q+V|0,te=Y+H+b(ee,q)|0;y=v,A=T,v=l,T=j,l=o,j=S,o=a+$+b(S=C+J|0,C)|0,a=n,C=E,n=r,E=w,r=i,w=g,i=$+te+b(g=J+ee|0,J)|0}this._al=this._al+g|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+C|0,this._el=this._el+S|0,this._fl=this._fl+j|0,this._gl=this._gl+T|0,this._hl=this._hl+A|0,this._ah=this._ah+i+b(this._al,g)|0,this._bh=this._bh+r+b(this._bl,w)|0,this._ch=this._ch+n+b(this._cl,E)|0,this._dh=this._dh+a+b(this._dl,C)|0,this._eh=this._eh+o+b(this._el,S)|0,this._fh=this._fh+l+b(this._fl,j)|0,this._gh=this._gh+v+b(this._gl,T)|0,this._hh=this._hh+y+b(this._hl,A)|0},l.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=l},{"./hash":186,inherits:136,"safe-buffer":184}],194:[function(e,t,i){t.exports=n;var r=e("events").EventEmitter;function n(){r.call(this)}e("inherits")(n,r),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function a(){i.readable&&i.resume&&i.resume()}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",o),i.on("close",l));var s=!1;function o(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",o),i.removeListener("close",l),i.removeListener("error",f),e.removeListener("error",f),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",f),e.on("error",f),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e}},{events:104,inherits:136,"readable-stream/duplex.js":168,"readable-stream/passthrough.js":179,"readable-stream/readable.js":180,"readable-stream/transform.js":181,"readable-stream/writable.js":182}],195:[function(e,t,i){arguments[4][178][0].apply(i,arguments)},{dup:178,"safe-buffer":184}],196:[function(e,t,i){(function(t,r){var n=e("process/browser.js").nextTick,a=Function.prototype.apply,s=Array.prototype.slice,o={},l=0;function f(e,t){this._id=e,this._clearFn=t}i.setTimeout=function(){return new f(a.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new f(a.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(e){e.close()},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},i.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},i._unrefActive=i.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},i.setImmediate="function"==typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&s.call(arguments,1);return o[t]=!0,n((function(){o[t]&&(r?e.apply(null,r):e.call(null),i.clearImmediate(t))})),t},i.clearImmediate="function"==typeof r?r:function(e){delete o[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":158,timers:196}],197:[function(e,t,i){(function(e){function i(t){try{if(!e.localStorage)return!1}catch(e){return!1}var i=e.localStorage[t];return null!=i&&"true"===String(i).toLowerCase()}t.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")&&console.trace(t),r=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],198:[function(e,t,i){"use strict";t.exports={DEFAILT_WEBGL_PLAY_ID:"glplayer",PLAYER_IN_TYPE_MP4:"mp4",PLAYER_IN_TYPE_FLV:"flv",PLAYER_IN_TYPE_HTTPFLV:"httpflv",PLAYER_IN_TYPE_RAW_265:"raw265",PLAYER_IN_TYPE_TS:"ts",PLAYER_IN_TYPE_MPEGTS:"mpegts",PLAYER_IN_TYPE_M3U8:"hls",PLAYER_IN_TYPE_M3U8_VOD:"m3u8",PLAYER_IN_TYPE_M3U8_LIVE:"hls",APPEND_TYPE_STREAM:0,APPEND_TYPE_FRAME:1,APPEND_TYPE_SEQUENCE:2,DEFAULT_WIDTH:600,DEFAULT_HEIGHT:600,DEFAULT_FPS:25,DEFAULT_FRAME_DUR:40,DEFAULT_FIXED:!1,DEFAULT_SAMPLERATE:44100,DEFAULT_CHANNELS:2,DEFAULT_CONSU_SAMPLE_LEN:20,PLAYER_MODE_VOD:"vod",PLAYER_MODE_NOTIME_LIVE:"live",AUDIO_MODE_ONCE:"ONCE",AUDIO_MODE_SWAP:"SWAP",DEFAULT_STRING_LIVE:"LIVE",CODEC_H265:0,CODEC_H264:1,PLAYER_CORE_TYPE_DEFAULT:0,PLAYER_CORE_TYPE_CNATIVE:1,V_CODEC_NAME_HEVC:265,V_CODEC_NAME_AVC:264,V_CODEC_NAME_UNKN:500,A_CODEC_NAME_AAC:112,A_CODEC_NAME_MP3:113,A_CODEC_NAME_UNKN:500,CACHE_NO_LOADCACHE:192,CACHE_WITH_PLAY_SIGN:193,CACHE_WITH_NOPLAY_SIGN:194}},{}],199:[function(e,t,i){"use strict";var r=window.AudioContext||window.webkitAudioContext,n=e("../consts"),a=function(){return(new Date).getTime()};t.exports=function(e){var t={options:{sampleRate:e.sampleRate||n.DEFAULT_SAMPLERATE,appendType:e.appendType||n.APPEND_TYPE_STREAM,playMode:e.playMode||n.AUDIO_MODE_SWAP},sourceChannel:-1,audioCtx:new r({latencyHint:"interactive",sampleRate:e.sampleRate}),gainNode:null,sourceList:[],startStatus:!1,sampleQueue:[],nextBuffer:null,playTimestamp:0,playStartTime:0,durationMs:-1,voice:1,onLoadCache:null,resetStartParam:function(){t.playTimestamp=0,t.playStartTime=0},setOnLoadCache:function(e){t.onLoadCache=e},setDurationMs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e},setVoice:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.voice=e,t.gainNode.gain.value=e},getAlignVPTS:function(){return t.playTimestamp+(a()-t.playStartTime)/1e3},swapSource:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==t.startStatus)return null;if(e<0||e>=t.sourceList.length)return null;if(i<0||i>=t.sourceList.length)return null;try{t.sourceChannel===e&&null!==t.sourceList[e]&&(t.sourceList[e].disconnect(t.gainNode),t.sourceList[e]=null)}catch(e){}t.sourceChannel=i;var r=t.decodeSample(i,e);-2==r&&(t.getAlignVPTS()>=t.durationMs/1e3-.04?t.pause():null!==t.onLoadCache&&t.onLoadCache())},addSample:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!(null==e||!e||null==e)&&(0==t.sampleQueue.length&&(t.seekPos=e.pts),t.sampleQueue.push(e),!0)},runNextBuffer:function(){window.setInterval((function(){if(!(null!=t.nextBuffer||t.sampleQueue.length0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){t.swapSource(e,i)}),0==t.sampleQueue.length)return-2;if(t.sourceList[e].buffer)return t.sourceList[e],t.sourceList[i],t.gainNode,t.swapSource(e,i),0;if(null==t.nextBuffer||t.nextBuffer.data.length<1)return t.sourceList[e].context.state,t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0,t.sourceList[e].stop(),t.sourceList[e].context.state,1;var r=t.nextBuffer.data.buffer;t.playTimestamp=t.nextBuffer.pts,t.playStartTime=a();try{t.audioCtx.decodeAudioData(r,(function(i){null!==t.sourceList[e]&&(t.sourceList[e].buffer=i,t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0)}),(function(e){}))}catch(e){return t.nextBuffer=null,-3}return t.nextBuffer=null,0},decodeWholeSamples:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(t.sourceChannel=e,e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){}),0==t.sampleQueue.length)return-2;for(var i=null,r=null,a=0;a=2){var s=i.length/2;a=new Float32Array(s);for(var o=0,l=0;l0&&s()-this._start_time>=this._now_seg_dur&&(s(),this._start_time,this._now_seg_dur,this._start_time=-1,this._now_seg_dur=-1),s(),this._start_time<0)if(new Date,null!==this._pcm_array_buf&&this._pcm_array_buf.length>this._push_start_idx){this._swapStartPlay=!1;var e=this._push_start_idx+this._once_pop_len;e>this._pcm_array_buf.length&&(e=this._pcm_array_buf.length);var t=this._pcm_array_buf.slice(this._push_start_idx,e);this._push_start_idx+=t.length,this._now_seg_dur=1*t.length/this._sample_rate*1e3,t.length,this._sample_rate,this._now_seg_dur;var i=this._ctx.createBuffer(1,t.length,this._sample_rate);t.length,new Date,i.copyToChannel(t,0),this._active_node=this._ctx.createBufferSource(),this._active_node.buffer=i,this._active_node.connect(this._gain),this._start_time=s(),this._active_node.start(0)}else setTimeout(this.readingLoopWithF32,1)}}])&&r(t.prototype,i),o&&r(t,o),e}();i.AudioPcmPlayer=o},{"../consts":198}],201:[function(e,t,i){"use strict";var r=e("../consts"),n=[{format:"mp4",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"mov",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"flv",value:"flv",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"m3u8",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"m3u",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"ts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"mpegts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"hevc",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"h265",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT}];t.exports={frameDataAlignCrop:function(e,t,i,r,n,a,s,o){if(0==e-r)return[a,s,o];for(var l=r*n,f=l/4,u=new Uint8Array(l),c=new Uint8Array(f),h=new Uint8Array(f),d=r,_=r/2,p=0;p=0)return i.value}return n[0].value},GetFormatPlayCore:function(e){for(var t=0;t0&&void 0!==arguments[0]&&arguments[0];this.showScreen=e,this.canvas&&(e?this.canvas.setAttribute("hidden",!0):this.canvas.removeAttribute("hidden"))}},{key:"getCachePTS",value:function(){return 1!==this.config.ignoreAudio&&this.audioWAudio?Math.max(this.vCachePTS,this.aCachePTS):this.vCachePTS}},{key:"getMaxPTS",value:function(){return Math.max(this.vCachePTS,this.aCachePTS)}},{key:"isPlayingState",value:function(){return this.isPlaying}},{key:"pushDone",value:function(){this.pushEOF=!0}},{key:"_clearDecInterval",value:function(){this.decVFrameInterval&&window.clearInterval(this.decVFrameInterval),this.decVFrameInterval=null}},{key:"_checkPlayFinished",value:function(){return!(this.config.playMode!==u.PLAYER_MODE_VOD||!(!0===this.bufRecvStat&&(this.playPTS>=this.bufLastVDTS||this.audioWAudio&&this.playPTS>=this.bufLastADTS)||this.duration-this.playPTS0&&(this.isPlaying=!0);var t=0,i=0,r=0;this.config.playMode===u.PLAYER_MODE_NOTIME_LIVE?this.playFrameInterval=window.setInterval((function(){if(e._videoQueue.length>0){var t=e._videoQueue.shift();t.pts,l.renderFrame(e.yuv,t.data_y,t.data_u,t.data_v,t.line1,t.height)}}),1e3*this.frameDur):this.playFrameInterval=window.setInterval((function(){if(i=h(),e._videoQueue.length>0&&i-t>=e.frameTime-r){var n=e._videoQueue.shift(),a=0;if(e.isNewSeek||null===e.audioWAudio||void 0===e.audioWAudio||(a=1e3*(n.pts-e.audioWAudio.getAlignVPTS()),e.playPTS=Math.max(e.audioWAudio.getAlignVPTS(),e.playPTS)),t=i,h(),e.playPTS=Math.max(n.pts,e.playPTS),e.isNewSeek&&e.seekTarget-e.frameDur>n.pts)return void(r=e.frameTime);if(e.isNewSeek&&(e.audioWAudio&&e.audioWAudio.setVoice(e.audioVoice),e.audioWAudio&&e.audioWAudio.play(),r=0,e.isNewSeek=!1,e.seekTarget=0),e.showScreen?e.onRender&&e.onRender(n.line1,n.height,n.data_y,n.data_u,n.data_v):(n.pts,l.renderFrame(e.yuv,n.data_y,n.data_u,n.data_v,n.line1,n.height)),e.onPlayingTime&&e.onPlayingTime(n.pts),!e.isNewSeek&&e.audioWAudio&&(a<0&&-1*a<=e.frameTime||a>=0)){if(e.config.playMode===u.PLAYER_MODE_VOD)if(n.pts>=e.duration)e.onLoadCacheFinshed&&e.onLoadCacheFinshed(),e.onPlayingFinish&&e.onPlayingFinish(),e._clearDecInterval(),e.pause();else if(e._checkPlayFinished())return;r=h()-i}else!e.isNewSeek&&e.audioWAudio&&(a<0&&e.frameTime,r=e.frameTime)}e._checkPlayFinished()}),1)}this.isNewSeek||this.audioWAudio&&this.audioWAudio.play()}},{key:"pause",value:function(){this.isPlaying=!1,this._pause()}},{key:"_pause",value:function(){this.playFrameInterval&&window.clearInterval(this.playFrameInterval),this.playFrameInterval=null,this.audioWAudio&&this.audioWAudio.pause()}},{key:"seek",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.openFrameCall=!1,this.pause(),this._clearDecInterval(),null!==this.avFeedVideoInterval&&(window.clearInterval(this.avFeedVideoInterval),this.avFeedVideoInterval=null),null!==this.avFeedAudioInterval&&(window.clearInterval(this.avFeedAudioInterval),this.avFeedAudioInterval=null),this.yuvMaxTime=0,this.playVPipe.length=0,this._videoQueue.length=0,this.audioWAudio&&this.audioWAudio.stop(),e&&e(),this.isNewSeek=!0,this.avSeekVState=!0,this.seekTarget=i.seekTime,null!==this.audioWAudio&&void 0!==this.audioWAudio&&(this.audioWAudio.setVoice(0),this.audioWAudio.resetStartParam(),this.audioWAudio.stop()),this._avFeedData(i.seekTime),setTimeout((function(){t.yuvMaxTime=0,t._videoQueue.length=0,t.openFrameCall=!0,t.frameCallTag+=1,t._decVFrameIntervalFunc()}),1e3)}},{key:"setVoice",value:function(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e)}},{key:"cacheIsFull",value:function(){return this._videoQueue.length>=50}},{key:"_checkDisplaySize",value:function(e,t,i){var r=t-e,n=this.config.width+Math.ceil(r/2),a=t/this.config.width>i/this.config.height,s=(n/t).toFixed(2),o=(this.config.height/i).toFixed(2),l=a?s:o,f=this.config.fixed,u=f?n:parseInt(t*l),c=f?this.config.height:parseInt(i*l);if(this.canvas.offsetWidth!=u||this.canvas.offsetHeight!=c){var h=parseInt((this.canvasBox.offsetHeight-c)/2),d=parseInt((this.canvasBox.offsetWidth-u)/2);h=h<0?0:h,d=d<0?0:d,this.canvas.style.marginTop=h+"px",this.canvas.style.marginLeft=d+"px",this.canvas.style.width=u+"px",this.canvas.style.height=c+"px"}return this.isCheckDisplay=!0,[u,c]}},{key:"_createYUVCanvas",value:function(){this.canvasBox=document.querySelector("#"+this.config.playerId),this.canvasBox.style.overflow="hidden",this.canvas=document.createElement("canvas"),this.canvas.style.width=this.canvasBox.clientWidth+"px",this.canvas.style.height=this.canvasBox.clientHeight+"px",this.canvas.style.top="0px",this.canvas.style.left="0px",this.canvasBox.appendChild(this.canvas),this.yuv=l.setupCanvas(this.canvas,{preserveDrawingBuffer:!1})}},{key:"_avRecvPackets",value:function(){var e=this;this.bufObject.cleanPipeline(),null!==this.avRecvInterval&&(window.clearInterval(this.avRecvInterval),this.avRecvInterval=null),!0===this.config.checkProbe?this.avRecvInterval=window.setInterval((function(){a.cwrap("getSniffStreamPkg","number",["number"])(e.corePtr),e._avCheckRecvFinish()}),5):this.avRecvInterval=window.setInterval((function(){a.cwrap("getSniffStreamPkgNoCheckProbe","number",["number"])(e.corePtr),e._avCheckRecvFinish()}),5),this._avFeedData(0,!1)}},{key:"_avCheckRecvFinish",value:function(){this.config.playMode===u.PLAYER_MODE_VOD&&this.duration-this.getMaxPTS()=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),t.play(),window.clearInterval(i),i=null)}),10);return!0}},{key:"_afterAvFeedSeekToStartWithUnFinBuffer",value:function(e){var t=this,i=window.setInterval((function(){t._videoQueue.length,t._videoQueue.length>=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),!1===t.reFull?t.play():t.reFull=!1,window.clearInterval(i),i=null)}),10);return!0}},{key:"_avFeedData",value:function(e){var t=this;if(this.playVPipe.length=0,this.audioWAudio&&this.audioWAudio.cleanQueue(),e<=0&&!1===this.bufOK){var i=0;if(this.avFeedVideoInterval=window.setInterval((function(){var r=t.bufObject.videoBuffer.length;if(r-1>i||t.duration-t.getMaxPTS()0){for(var a=0;a0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.bufLastVDTS,t.bufObject.videoBuffer,t.playVPipe)}else t.config.playMode===u.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.duration,t.bufObject.videoBuffer,t.playVPipe);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===u.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithFinishedBuffer(e),t.avSeekVState=!1))}),5),void 0!==this.audioWAudio&&null!==this.audioWAudio&&this.config.ignoreAudio<1){var r=0;this.avFeedAudioInterval=window.setInterval((function(){var e=t.bufObject.audioBuffer.length;if(e-1>r||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer)}else t.config.playMode===u.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer)}),5)}}else{var n=this.bufObject.seekIDR(e),a=parseInt(n,10);this.playPTS=0;var o=a;if(this.avFeedVideoInterval=window.setInterval((function(){var i=t.bufObject.videoBuffer.length;if(i-1>o||t.duration-t.getMaxPTS()0){for(var n=0;n0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null)}else t.config.playMode===u.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===u.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithUnFinBuffer(e),t.avSeekVState=!1))}),5),this.audioWAudio&&this.config.ignoreAudio<1){var l=parseInt(e,10);this.avFeedAudioInterval=window.setInterval((function(){var e=t.bufObject.audioBuffer.length;if(e-1>l||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null)}else t.config.playMode===u.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null)}),5)}}}},{key:"_probeFinCallback",value:function(e,t,i,r,n,s,o,l,c){var h=this;this._createYUVCanvas(),u.V_CODEC_NAME_HEVC,this.config.fps=1*r,this.frameTime=1e3/this.config.fps,this.width=t,this.height=i,this.frameDur=1/this.config.fps,this.duration=e-this.frameDur,this.vCodecID=l,this.config.sampleRate=s,this.channels=o,this.audioIdx=n,this.duration<0&&(this.config.playMode=u.PLAYER_MODE_NOTIME_LIVE,this.frameTime,this.frameDur);for(var d=a.HEAPU8.subarray(c,c+10),_=0;_=0&&this.config.ignoreAudio<1?(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.audioWAudio=f({sampleRate:s,appendType:u.APPEND_TYPE_FRAME}),this.audioWAudio.setDurationMs(1e3*e),this.onLoadCache&&this.audioWAudio.setOnLoadCache((function(){if(h.retryAuSampleNo,h.retryAuSampleNo<=5){h.pause(),h.onLoadCache&&h.onLoadCache();var e=window.setInterval((function(){return h.retryAuSampleNo,h.audioWAudio.sampleQueue.length,h.audioWAudio.sampleQueue.length>2?(h.onLoadCacheFinshed&&h.onLoadCacheFinshed(),h.play(),h.retryAuSampleNo=0,window.clearInterval(e),void(e=null)):(h.retryAuSampleNo+=1,h.retryAuSampleNo>5?(h.play(),h.onLoadCacheFinshed&&h.onLoadCacheFinshed(),window.clearInterval(e),void(e=null)):void 0)}),1e3)}}))):this.audioNone=!0,this._avRecvPackets(),this._decVFrameIntervalFunc()),this.onProbeFinish&&this.onProbeFinish()}},{key:"_ptsFixed2",value:function(e){return Math.ceil(100*e)/100}},{key:"_naluCallback",value:function(e,t,i,r,n,s,o){var l=this._ptsFixed2(s),f=a.HEAPU8.subarray(e,e+t),u=new Uint8Array(f);this.bufObject.appendFrameWithDts(l,o,u,!0,i),this.bufLastVDTS=Math.max(o,this.bufLastVDTS),this.vCachePTS=Math.max(l,this.vCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS())}},{key:"_samplesCallback",value:function(e,t,i,r){}},{key:"_aacFrameCallback",value:function(e,t,i,r,n){var s=this._ptsFixed2(n);if(this.audioWAudio){var o=new Uint8Array(7+i),l=a.HEAPU8.subarray(e,e+7);o.set(l,0);var f=a.HEAPU8.subarray(t,t+i);o.set(f,7),this.bufObject.appendFrame(s,o,!1,!0),this.bufLastADTS=Math.max(s,this.bufLastADTS),this.aCachePTS=Math.max(s,this.aCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS())}}},{key:"_decVFrameIntervalFunc",value:function(){var e=this;null==this.decVFrameInterval&&(this.decVFrameInterval=window.setInterval((function(){if(e._videoQueue.length<50&&e.playVPipe.length>0){var t=e.playVPipe.shift(),i=t.data,r=a._malloc(i.length);a.HEAP8.set(i,r);var n=parseInt(1e3*t.pts,10),s=parseInt(1e3*t.dts,10);e.yuvMaxTime=Math.max(t.pts,e.yuvMaxTime),a.cwrap("decodeVideoFrame","number",["number","number","number","number","number"])(e.corePtr,r,i.length,n,s,e.frameCallTag),a._free(r),r=null}}),10))}},{key:"_frameCallback",value:function(e,t,i,r,n,s,o,f,u,c){if(this._videoQueue.length,!(!1===this.openFrameCall||c!==this.frameCallTag||u>this.yuvMaxTime+this.frameDur||this.isNewSeek&&this.seekTarget-u>3*this.frameDur)){var h=this._videoQueue.length;if(this.canvas.width==r&&this.canvas.height==f||(this.canvas.width=r,this.canvas.height=f,this.isCheckDisplay)||this._checkDisplaySize(o,r,f),!(this.playPTS>u)){var _=a.HEAPU8.subarray(e,e+r*f),p=a.HEAPU8.subarray(t,t+n*f/2),m=a.HEAPU8.subarray(i,i+s*f/2),b=new Uint8Array(_),v=new Uint8Array(p),y=new Uint8Array(m);this.config.readyShow&&(l.renderFrame(this.yuv,b,v,y,r,f),this.config.readyShow=!1,this.onReadyShowDone&&this.onReadyShowDone());var g=new d(b,v,y,r,n,s,o,f,u);if(h<=0||u>this._videoQueue[h-1].pts)this._videoQueue.push(g);else if(uthis._videoQueue[w].pts&&w+10&&void 0!==arguments[0]?arguments[0]:60,t={limit:e,yuvCache:[],appendCacheByCacheYuv:function(e){e.pts;return t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.OVERFLOW:(t.yuvCache.push(e),t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL)},getState:function(){return t.yuvCache.length<=0?CACHE_APPEND_STATUS_CODE.NULL:t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL},cleanPipeline:function(){t.yuvCache.length=0},vYuv:function(){return t.yuvCache.length<=0?null:t.yuvCache.shift()}};return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./cacheYuv":204}],204:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i>1;return n.indexOf(t)},GET_NALU_TYPE:function(e){var t=(126&e)>>1;if(t>=1&&t<=9)return r.DEFINE_P_FRAME;if(t>=16&&t<=21)return r.DEFINE_KEY_FRAME;var i=n.indexOf(t);return i>=0?n[i]:r.DEFINE_OTHERS_FRAME},PACK_NALU:function(e){var t=e.nalu,i=e.vlc.vlc;null==t.vps&&(t.vps=new Uint8Array);var r=new Uint8Array(t.vps.length+t.sps.length+t.pps.length+t.sei.length+i.length);return r.set(t.vps,0),r.set(t.sps,t.vps.length),r.set(t.pps,t.vps.length+t.sps.length),r.set(t.sei,t.vps.length+t.sps.length+t.pps.length),r.set(i,t.vps.length+t.sps.length+t.pps.length+t.sei.length),r}}},{"./hevc-header":205}],207:[function(e,t,i){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t0&&void 0!==arguments[0]&&arguments[0];null!=t&&(t.showScreen=e,t.canvas&&(e?t.canvas.setAttribute("hidden",!0):t.canvas.removeAttribute("hidden")))},setSize:function(e,i){t.config.width=e||f.DEFAULT_WIDTH,t.config.height=i||f.DEFAULT_HEIGHT},setFrameRate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:25;t.config.fps=e,t.config.frameDurMs=1e3/e},setDurationMs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e,0==t.config.audioNone&&t.audio.setDurationMs(e)},setPlayingCall:function(e){t.onPlayingTime=e},setVoice:function(e){t.realVolume=e,0==t.config.audioNone&&t.audio.setVoice(t.realVolume)},isPlayingState:function(){return t.isPlaying||t.isCaching===f.CACHE_WITH_PLAY_SIGN},appendAACFrame:function(e){t.audio.addSample(e),t.aCachePTS=Math.max(e.pts,t.aCachePTS)},appendHevcFrame:function(e){var i;t.config.appendHevcType==f.APPEND_TYPE_STREAM?t.stream=new Uint8Array((i=r(t.stream)).concat.apply(i,r(e))):t.config.appendHevcType==f.APPEND_TYPE_FRAME&&(t.frameList.push(e),t.vCachePTS=Math.max(e.pts,t.vCachePTS))},getCachePTS:function(){return Math.max(t.vCachePTS,t.aCachePTS)},endAudio:function(){0==t.config.audioNone&&t.audio.stop()},cleanSample:function(){0==t.config.audioNone&&t.audio.cleanQueue()},cleanVideoQueue:function(){t.config.appendHevcType==f.APPEND_TYPE_STREAM?t.stream=new Uint8Array:t.config.appendHevcType==f.APPEND_TYPE_FRAME&&(t.frameList=[],t.frameList.length=0)},cleanCacheYUV:function(){t.cacheYuvBuf.cleanPipeline()},pause:function(){t.loop&&window.clearInterval(t.loop),t.loop=null,0==t.config.audioNone&&t.audio.pause(),t.isPlaying=!1,t.isCaching===f.CACHE_WITH_PLAY_SIGN&&(t.isCaching=f.CACHE_WITH_NOPLAY_SIGN)},checkFinished:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.PLAYER_MODE_VOD;return e==f.PLAYER_MODE_VOD&&t.cacheYuvBuf.yuvCache.length<=0&&(t.videoPTS.toFixed(1)>=(t.durationMs-t.config.frameDurMs)/1e3||t.noCacheFrame>=10)&&(null!=t.onPlayingFinish&&(f.PLAYER_MODE_VOD,t.frameList.length,t.cacheYuvBuf.yuvCache.length,t.videoPTS.toFixed(1),t.durationMs,t.config.frameDurMs,t.noCacheFrame,t.onPlayingFinish()),!0)},clearAllCache:function(){t.nowPacket=null,t.vCachePTS=0,t.aCachePTS=0,t.cleanSample(),t.cleanVideoQueue(),t.cleanCacheYUV()},seek:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.isPlaying;t.pause(),t.stopCacheThread(),t.clearAllCache(),e&&e(),t.isNewSeek=!0,t.flushDecoder=1,t.videoPTS=parseInt(i.seekTime);var n={seekPos:i.seekTime||-1,mode:i.mode||f.PLAYER_MODE_VOD,accurateSeek:i.accurateSeek||!0,seekEvent:i.seekEvent||!0,realPlay:r};t.cacheThread(),t.play(n)},getNalu1Packet:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=null,r=-1;if(t.config.appendHevcType==f.APPEND_TYPE_STREAM)i=t.nextNalu();else{if(t.config.appendHevcType!=f.APPEND_TYPE_FRAME)return null;var n=t.frameList.shift();if(!n)return null;i=n.data,r=n.pts,e&&(t.videoPTS=r)}return{nalBuf:i,pts:r}},decodeNalu1Frame:function(e,i){var r=n._malloc(e.length);n.HEAP8.set(e,r);var a=parseInt(1e3*i);n.cwrap("decodeCodecContext","number",["number","number","number","number","number"])(t.vcodecerPtr,r,e.length,a,t.flushDecoder);return t.flushDecoder=0,n._free(r),!1},cacheThread:function(){t.cacheLoop=window.setInterval((function(){if(t.cacheYuvBuf.getState()!=CACHE_APPEND_STATUS_CODE.FULL){var e=t.getNalu1Packet(!1);if(null!=e){var i=e.nalBuf,r=e.pts;t.decodeNalu1Frame(i,r,!0)}}}),10)},stopCacheThread:function(){null!==t.cacheLoop&&(window.clearInterval(t.cacheLoop),t.cacheLoop=null)},loadCache:function(){if(!(t.frameList.length<=3)){var e=t.isPlaying;if(t.cacheYuvBuf.yuvCache.length<=3){t.pause(),null!=t.onLoadCache&&t.onLoadCache(),t.isCaching=e?f.CACHE_WITH_PLAY_SIGN:f.CACHE_WITH_NOPLAY_SIGN;var i=t.frameList.length>30?30:t.frameList.length;null===t.cacheInterval&&(t.cacheInterval=window.setInterval((function(){t.cacheYuvBuf.yuvCache.length>=i&&(null!=t.onLoadCacheFinshed&&t.onLoadCacheFinshed(),window.clearInterval(t.cacheInterval),t.cacheInterval=null,t.isCaching===f.CACHE_WITH_PLAY_SIGN&&t.play(t.playParams),t.isCaching=f.CACHE_NO_LOADCACHE)}),40))}}},playFunc:function(){var e=!1;if(t.playParams.seekEvent||c()-t.calcuteStartTime>=t.frameTime-t.preCostTime){e=!0;var i=!0;if(t.calcuteStartTime=c(),t.config.audioNone)t.playFrameYUV(i,t.playParams.accurateSeek);else{t.fix_poc_err_skip>0&&(t.fix_poc_err_skip--,i=!1);var r=t.videoPTS-t.audio.getAlignVPTS();if(r>0)return void(t.playParams.seekEvent&&!t.config.audioNone&&t.audio.setVoice(0));if(i){if(!(i=-1*r<=1*t.frameTimeSec)){for(var n=parseInt(r/t.frameTimeSec),a=0;a=i&&(t.playFrameYUV(!0,t.playParams.accurateSeek),i+=1)}),1)}else t.videoPTS>=t.playParams.seekPos&&!t.isNewSeek||0===t.playParams.seekPos||0===t.playParams.seekPos?(t.frameTime=1e3/t.config.fps,t.frameTimeSec=t.frameTime/1e3,0==t.config.audioNone&&t.audio.play(),t.realVolume=t.config.audioNone?0:t.audio.voice,t.playParams.seekEvent&&(t.fix_poc_err_skip=10),t.loop=window.setInterval((function(){var e=c();t.playFunc(),t.preCostTime=c()-e}),1)):(t.loop=window.setInterval((function(){t.playFrameYUV(!1,t.playParams.accurateSeek),t.checkFinished(t.playParams.mode)?(window.clearInterval(t.loop),t.loop=null):t.videoPTS>=t.playParams.seekPos&&(window.clearInterval(t.loop),t.loop=null,t.play(t.playParams))}),1),t.isNewSeek=!1)},stop:function(){t.release(),n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr),t.stream=new Uint8Array},release:function(){return t.endAudio(),t.cacheLoop&&window.clearInterval(t.cacheLoop),t.cacheLoop=null,t.loop&&window.clearInterval(t.loop),t.loop=null,t.pause(),n.cwrap("release","number",["number"])(t.vcodecerPtr),t.stream=null,t.frameList.length=0,t.durationMs=-1,t.videoPTS=0,t.isPlaying=!1,!0},nextNalu:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(t.stream.length<=4)return!1;for(var i=-1,r=0;r=t.stream.length){if(-1==i)return!1;var n=t.stream.subarray(i);return t.stream=new Uint8Array,n}var a="0 0 1"==t.stream.slice(0,3).join(" "),s="0 0 0 1"==t.stream.slice(0,4).join(" ");if(a||s){if(-1==i)i=r;else{if(e<=1){var o=t.stream.subarray(i,r);return t.stream=t.stream.subarray(r),o}e-=1}r+=3}}return!1},decodeSendPacket:function(e){var i=n._malloc(e.length);n.HEAP8.set(e,i);var r=n.cwrap("decodeSendPacket","number",["number","number","number"])(t.vcodecerPtr,i,e.length);return n._free(i),r},decodeRecvFrame:function(){return n.cwrap("decodeRecv","number",["number"])(t.vcodecerPtr)},playFrameYUV:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.cacheYuvBuf.vYuv();if(null==r)return t.noCacheFrame+=1,e&&!t.playParams.seekEvent&&t.loadCache(),!1;t.noCacheFrame=0;var n=r.pts;return t.videoPTS=n,(!e&&i||e)&&e&&t.drawImage(r.width,r.height,r.imageBufferY,r.imageBufferB,r.imageBufferR),e&&!t.playParams.seekEvent&&t.isPlaying&&t.loadCache(),!0},drawImage:function(e,i,r,n,a){if(t.canvas.width===e&&t.canvas.height==i||(t.canvas.width=e,t.canvas.height=i),t.showScreen&&null!=t.onRender)t.onRender(e,i,r,n,a);else{if(!t.isCheckDisplay)t.checkDisplaySize(e,i);var s=e*i,o=e/2*(i/2),f=new Uint8Array(s+2*o);f.set(r,0),f.set(n,s),f.set(a,s+o),l.renderFrame(t.yuv,r,n,a,e,i)}},debugYUV:function(e){t.debugYUVSwitch=!0,t.debugID=e},checkDisplaySize:function(e,i){var r=e/t.config.width>i/t.config.height,n=(t.config.width/e).toFixed(2),a=(t.config.height/i).toFixed(2),s=r?n:a,o=t.config.fixed,l=o?t.config.width:parseInt(e*s),f=o?t.config.height:parseInt(i*s);if(t.canvas.offsetWidth!=l||t.canvas.offsetHeight!=f){var u=parseInt((t.canvasBox.offsetHeight-f)/2),c=parseInt((t.canvasBox.offsetWidth-l)/2);t.canvas.style.marginTop=u+"px",t.canvas.style.marginLeft=c+"px",t.canvas.style.width=l+"px",t.canvas.style.height=f+"px"}return t.isCheckDisplay=!0,[l,f]},makeWasm:function(){if(null!=t.config.token){t.vcodecerPtr=n.cwrap("registerPlayer","number",["string","string"])(t.config.token,u.PLAYER_VERSION);var e=n.addFunction((function(e,i,r,a,s,l,f,u,c){var h=n.HEAPU8.subarray(e,e+a*u),d=n.HEAPU8.subarray(i,i+s*u/2),_=n.HEAPU8.subarray(r,r+l*u/2),p=new Uint8Array(h),m=new Uint8Array(d),b=new Uint8Array(_),v=1*c/1e3,y=new o.CacheYuvStruct(v,a,u,p,m,b);t.cacheYuvBuf.appendCacheByCacheYuv(y)}));n.cwrap("setCodecType","number",["number","number","number"])(t.vcodecerPtr,t.config.videoCodec,e);n.cwrap("initMissile","number",["number"])(t.vcodecerPtr);n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr)}},makeIt:function(){var e=document.querySelector("div#"+t.config.playerId),i=document.createElement("canvas");i.style.width=e.clientWidth+"px",i.style.height=e.clientHeight+"px",i.style.top="0px",i.style.left="0px",e.appendChild(i),t.canvasBox=e,t.canvas=i,t.yuv=l.setupCanvas(i,{preserveDrawingBuffer:!1}),0==t.config.audioNone&&(t.audio=a({sampleRate:t.config.sampleRate,appendType:t.config.appendHevcType})),t.isPlayLoadingFinish=1}};return t.makeWasm(),t.makeIt(),t.cacheThread(),t}},{"../consts":198,"../render-engine/webgl-420p":219,"../version":222,"./audio-core":199,"./cache":203,"./cacheYuv":204,"./missile.js":1}],208:[function(e,t,i){"use strict";var r=e("./bufferFrame");t.exports=function(){var e={videoBuffer:[],audioBuffer:[],idrIdxBuffer:[],appendFrame:function(t,i){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=new r.BufferFrame(t,a,i,n),o=parseInt(t);return n?(e.videoBuffer.length-1>=o?e.videoBuffer[o].push(s):e.videoBuffer.push([s]),a&&!e.idrIdxBuffer.includes(t)&&e.idrIdxBuffer.push(t)):e.audioBuffer.length-1>=o&&null!=e.audioBuffer[o]&&null!=e.audioBuffer[o]?e.audioBuffer[o]&&e.audioBuffer[o].push(s):e.audioBuffer.push([s]),!0},appendFrameWithDts:function(t,i,n){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=r.ConstructWithDts(t,i,s,n,a),l=parseInt(i);return a?(e.videoBuffer.length-1>=l?e.videoBuffer[l].push(o):e.videoBuffer.push([o]),s&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=l&&null!=e.audioBuffer[l]&&null!=e.audioBuffer[l]?e.audioBuffer[l]&&e.audioBuffer[l].push(o):e.audioBuffer.push([o]),!0},appendFrameByBufferFrame:function(t){var i=t.pts,r=parseInt(i);return t.video?(e.videoBuffer.length-1>=r?e.videoBuffer[r].push(t):e.videoBuffer.push([t]),isKey&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=r?e.audioBuffer[r].push(t):e.audioBuffer.push([t]),!0},cleanPipeline:function(){e.videoBuffer.length=0,e.audioBuffer.length=0},vFrame:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.videoBuffer.length-1))return e.videoBuffer[t]},aFrame:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.audioBuffer.length-1))return e.audioBuffer[t]},seekIDR:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e.idrIdxBuffer,e.videoBuffer,t<0)return null;if(e.idrIdxBuffer.includes(t))return t;for(var i=0;it||0===i&&e.idrIdxBuffer[i]>=t){for(var r=1;r>=0;r--){var n=i-r;if(n>=0)return e.idrIdxBuffer[n],e.idrIdxBuffer[n]}return e.idrIdxBuffer[i],j,e.idrIdxBuffer[i]}}};return e}},{"./bufferFrame":209}],209:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&i.extensionInfo.vHeight>0&&(i.size.width=i.extensionInfo.vWidth,i.size.height=i.extensionInfo.vHeight)),i.mediaInfo.duration,null!=i.onDemuxed&&i.onDemuxed(i.onReadyOBJ);for(var e=!1;;){var r=i.mpegTsObj.readPacket();if(r.size<=0)break;var n=r.dtime>0?r.dtime:r.ptime;if(!(n<0)){if(0==r.type){n<=i.vPreFramePTS&&(e=!0);var a=l.PACK_NALU(r.layer),o=1==r.keyframe,f=1==e?n+i.vStartTime:n,u=new s.BufferFrame(f,o,a,!0);i.bufObject.appendFrame(u.pts,u.data,!0,u.isKey),i.vPreFramePTS=f,null!=i.onSamples&&i.onSamples(i.onReadyOBJ,u)}else if(n<=i.aPreFramePTS&&(e=!0),"aac"==i.mediaInfo.aCodec)for(var c=r.data,h=0;h=3?(i._onTsReady(e),window.clearInterval(i.timerTsWasm),i.timerTsWasm=null):(i.mpegTsWasmRetryLoadTimes+=1,i.mpegTsObj.initDemuxer())}),3e3)}},{key:"_onTsReady",value:function(e){var t=this;t.hls.fetchM3u8(e),t.mpegTsWasmState=!0,t.timerFeed=window.setInterval((function(){if(t.tsList.length>0&&0==t.lockWait.state)try{var e=t.tsList.shift();if(null!=e){var i=e.streamURI,r=e.streamDur;t.lockWait.state=!0,t.lockWait.lockMember.dur=r,t.mpegTsObj.isLive=t.hls.isLive(),t.mpegTsObj.demuxURL(i)}else console.error("_onTsReady need wait ")}catch(e){console.error("onTsReady ERROR:",e),t.lockWait.state=!1}}),50)}},{key:"release",value:function(){this.timerFeed&&window.clearInterval(this.timerFeed),this.timerTsWasm&&window.clearInterval(this.timerTsWasm)}},{key:"bindReady",value:function(e){this.onReadyOBJ=e}},{key:"popBuffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1===e?t+1>this.bufObject.videoBuffer.length?null:this.bufObject.vFrame(t):2===e?t+1>this.bufObject.audioBuffer.length?null:this.bufObject.aFrame(t):void 0}},{key:"getVLen",value:function(){return this.bufObject.videoBuffer.length}},{key:"getALen",value:function(){return this.bufObject.audioBuffer.length}},{key:"getLastIdx",value:function(){return this.bufObject.videoBuffer.length-1}},{key:"getALastIdx",value:function(){return this.bufObject.audioBuffer.length-1}},{key:"getACodec",value:function(){return this.aCodec}},{key:"getDurationMs",value:function(){return this.durationMs}},{key:"getFPS",value:function(){return this.fps}},{key:"getSampleRate",value:function(){return this.sampleRate}},{key:"getSampleChannel",value:function(){return this.aChannel}},{key:"getSize",value:function(){return this.size}},{key:"seek",value:function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}}}])&&r(t.prototype,i),u&&r(t,u),e}();i.M3u8=u},{"../consts":198,"../decoder/hevc-imp":206,"./buffer":208,"./bufferFrame":209,"./m3u8base":211,"./mpegts/mpeg.js":215}],211:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i ",t),setTimeout((function(){i.fetchM3u8(e)}),500)}))}},{key:"_uriParse",value:function(e){this._preURI="";var t=e.split("//"),i=null,r=null;if(t.length<1)return!1;t.length>1?(i=t[0],r=t[1].split("/"),this._preURI=i+"//"):r=t[0].split("/");for(var n=0;n_&&(o=_);var p=r[f+=1],m=null;m=p.indexOf("http")>=0?p:this._preURI+p,this._slices.indexOf(m)<0&&(this._slices.push(m),this._slices[this._slices.length-1],null!=this.onTransportStream&&this.onTransportStream(m,_))}}}if(this._slices.length>s.hlsSliceLimit&&this._type==n.PLAYER_IN_TYPE_M3U8_LIVE&&(this._slices=this._slices.slice(-1*s.hlsSliceLimit)),null!=this.onFinished){var b={type:this._type,duration:-1};this.onFinished(b)}return o}},{key:"_readTag",value:function(e){var t=s.tagParse.exec(e);return null!==t?{key:t[1],value:t[3]}:null}}])&&r(t.prototype,i),o&&r(t,o),e}();i.M3u8Base=o},{"../consts":198}],212:[function(e,t,i){"use strict";var r=e("mp4box"),n=e("../decoder/hevc-header"),a=e("../decoder/hevc-imp"),s=e("./buffer"),o=e("../consts"),l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12,Reserved:13,"frequency is written explictly":15},f=function(e){for(var t=[],i=0;i1&&void 0!==arguments[1]&&arguments[1],i=null;return t?((i=e)[0]=n.DEFINE_STARTCODE[0],i[1]=n.DEFINE_STARTCODE[1],i[2]=n.DEFINE_STARTCODE[2],i[3]=n.DEFINE_STARTCODE[3]):((i=new Uint8Array(n.DEFINE_STARTCODE.length+e.length)).set(n.DEFINE_STARTCODE,0),i.set(e,n.DEFINE_STARTCODE.length)),i},u.prototype.setAACAdts=function(e){var t=null,i=this.aacProfile,r=l[this.sampleRate],n=new Uint8Array(7),a=n.length+e.length;return n[0]=255,n[1]=241,n[2]=(i-1<<6)+(r<<2)+0,n[3]=128+(a>>11),n[4]=(2047&a)>>3,n[5]=31+((7&a)<<5),n[6]=252,(t=new Uint8Array(a)).set(n,0),t.set(e,n.length),t},u.prototype.demux=function(){var e=this;e.seekPos=-1,e.mp4boxfile=r.createFile(),e.movieInfo=null,e.videoCodec=null,e.durationMs=-1,e.fps=-1,e.sampleRate=-1,e.aacProfile=2,e.size={width:-1,height:-1},e.bufObject=s(),e.audioNone=!1,e.naluHeader={vps:null,sps:null,pps:null,sei:null},e.mp4boxfile.onError=function(e){},this.mp4boxfile.onReady=function(t){for(var i in e.movieInfo=t,t.tracks)"VideoHandler"!==t.tracks[i].name&&"video"!==t.tracks[i].type||(t.tracks[i].codec,t.tracks[i].codec.indexOf("hev")>=0||t.tracks[i].codec.indexOf("hvc")>=0?e.videoCodec=o.CODEC_H265:t.tracks[i].codec.indexOf("avc")>=0&&(e.videoCodec=o.CODEC_H264));var r=-1;if(r=t.videoTracks[0].samples_duration/t.videoTracks[0].timescale,e.durationMs=1e3*r,e.fps=t.videoTracks[0].nb_samples/r,e.seekDiffTime=1/e.fps,e.size.width=t.videoTracks[0].track_width,e.size.height=t.videoTracks[0].track_height,t.audioTracks.length>0){e.sampleRate=t.audioTracks[0].audio.sample_rate;var n=t.audioTracks[0].codec.split(".");e.aacProfile=n[n.length-1]}else e.audioNone=!0;null!=e.onMp4BoxReady&&e.onMp4BoxReady(e.videoCodec),e.videoCodec===o.CODEC_H265?(e.initializeAllSourceBuffers(),e.mp4boxfile.start()):(e.videoCodec,o.CODEC_H264)},e.mp4boxfile.onSamples=function(t,i,r){var s=window.setInterval((function(){for(var i=0;i3?e.naluHeader.sei=e.setStartCode(m[3][0].data,!1):e.naluHeader.sei=new Uint8Array,e.naluHeader}else e.videoCodec==o.CODEC_H264&&(e.naluHeader.vps=new Uint8Array,e.naluHeader.sps=e.setStartCode(d.SPS[0].nalu,!1),e.naluHeader.pps=e.setStartCode(d.PPS[0].nalu,!1),e.naluHeader.sei=new Uint8Array);u[4].toString(16),e.naluHeader.vps[4].toString(16),f(e.naluHeader.vps),f(u);var b=e.setStartCode(u.subarray(0,e.naluHeader.vps.length),!0);if(f(b),u[4]===e.naluHeader.vps[4]){var v=e.naluHeader.vps.length+4,y=e.naluHeader.vps.length+e.naluHeader.sps.length+4,g=e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4;if(e.naluHeader.sei.length<=0&&e.naluHeader.sps.length>0&&u[v]===e.naluHeader.sps[4]&&e.naluHeader.pps.length>0&&u[y]===e.naluHeader.pps[4]&&78===u[g]){u[e.naluHeader.vps.length+4],e.naluHeader.sps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+4],e.naluHeader.pps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4];for(var w=0,E=0;E4&&u[4]===e.naluHeader.sei[4]){var C=u.subarray(0,10),S=new Uint8Array(e.naluHeader.vps.length+C.length);S.set(C,0),S.set(e.naluHeader.vps,C.length),S[3]=1,e.naluHeader.vps=null,e.naluHeader.vps=new Uint8Array(S),S=null,C=null,(u=u.subarray(10))[4],e.naluHeader.vps[4],e.naluHeader.vps}else if(0===e.naluHeader.sei.length&&78===u[4]){u=e.setStartCode(u,!0);for(var j=0,T=0;T1&&void 0!==arguments[1]?arguments[1]:0;return e.fileStart=t,this.mp4boxfile.appendBuffer(e)},u.prototype.finishBuffer=function(){this.mp4boxfile.flush()},u.prototype.play=function(){},u.prototype.getVideoCoder=function(){return this.videoCodec},u.prototype.getDurationMs=function(){return this.durationMs},u.prototype.getFPS=function(){return this.fps},u.prototype.getSampleRate=function(){return this.sampleRate},u.prototype.getSize=function(){return this.size},u.prototype.seek=function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}},u.prototype.popBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0},u.prototype.addBuffer=function(e){var t=e.id;this.mp4boxfile.setExtractionOptions(t)},u.prototype.initializeAllSourceBuffers=function(){if(this.movieInfo){for(var e=this.movieInfo,t=0;t>5)}},{key:"sliceAACFrames",value:function(e,t){for(var i=[],r=e,n=0;n>4==15){var a=this._getPktLen(t[n+3],t[n+4],t[n+5]);if(a<=0)continue;var s=t.subarray(n,n+a),o=new Uint8Array(a);o.set(s,0),i.push({ptime:r,data:o}),r+=this.frameDurSec,n+=a}else n+=1;return i}}])&&r(t.prototype,i),n&&r(t,n),e}();i.AACDecoder=n},{}],215:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i ",e),r=null})).catch((function(i){console.error("_demuxerTsInit ERROR fetch ERROR ==> ",i),t._releaseOffset(),t.onDemuxedFailed&&t.onDemuxedFailed(i,e)}))}},{key:"_releaseOffset",value:function(){void 0!==this.offsetDemux&&null!==this.offsetDemux&&(n._free(this.offsetDemux),this.offsetDemux=null)}},{key:"_demuxCore",value:function(e){this._releaseOffset(),this._refreshDemuxer(),this.offsetDemux=n._malloc(e.length),n.HEAP8.set(e,this.offsetDemux);var t=n.cwrap("demuxBox","number",["number","number","number"])(this.offsetDemux,e.length,this.isLive);n._free(this.offsetDemux),this.offsetDemux=null,t>=0&&(this._setMediaInfo(),this._setExtensionInfo(),null!=this.onDemuxed&&this.onDemuxed())}},{key:"_setMediaInfo",value:function(){var e=n.cwrap("getMediaInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],o=n.HEAPF64[e/8+1+1],l=n.HEAPF64[e/8+1+1+1],f=n.HEAPF64[e/8+1+1+1+1],u=n.HEAPU32[e/4+2+2+2+2+2];this.mediaAttr.vFps=r,this.mediaAttr.vGop=u,this.mediaAttr.vDuration=o,this.mediaAttr.aDuration=l,this.mediaAttr.duration=f;var c=n.cwrap("getAudioCodecID","number",[])();c>=0?(this.mediaAttr.aCodec=s.CODEC_OFFSET_TABLE[c],this.mediaAttr.sampleRate=t>0?t:s.DEFAULT_SAMPLERATE,this.mediaAttr.sampleChannel=i>=0?i:s.DEFAULT_CHANNEL):(this.mediaAttr.sampleRate=0,this.mediaAttr.sampleChannel=0,this.mediaAttr.audioNone=!0);var h=n.cwrap("getVideoCodecID","number",[])();h>=0&&(this.mediaAttr.vCodec=s.CODEC_OFFSET_TABLE[h]),null==this.aacDec?this.aacDec=new a.AACDecoder(this.mediaAttr):this.aacDec.updateConfig(this.mediaAttr)}},{key:"_setExtensionInfo",value:function(){var e=n.cwrap("getExtensionInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1];this.extensionInfo.vWidth=t,this.extensionInfo.vHeight=i}},{key:"readMediaInfo",value:function(){return this.mediaAttr}},{key:"readExtensionInfo",value:function(){return this.extensionInfo}},{key:"readAudioNone",value:function(){return this.mediaAttr.audioNone}},{key:"_readLayer",value:function(){var e={vps:null,sps:null,pps:null,sei:null},t={vlc:null},i=n.cwrap("getSPSLen","number",[])(),r=n.cwrap("getSPS","number",[])();e.sps=new Uint8Array(i),e.sps.set(n.HEAPU8.subarray(r,r+i),0);var a=n.cwrap("getPPSLen","number",[])(),o=n.cwrap("getPPS","number",[])();e.pps=new Uint8Array(a),e.pps.set(n.HEAPU8.subarray(o,o+a),0);var l=n.cwrap("getSEILen","number",[])(),f=n.cwrap("getSEI","number",[])();e.sei=new Uint8Array(l),e.sei.set(n.HEAPU8.subarray(f,f+l),0);var u=n.cwrap("getVLCLen","number",[])(),c=n.cwrap("getVLC","number",[])();if(t.vlc=new Uint8Array(u),t.vlc.set(n.HEAPU8.subarray(c,c+u),0),this.mediaAttr.vCodec==s.DEF_HEVC||this.mediaAttr.vCodec==s.DEF_H265){var h=n.cwrap("getVPSLen","number",[])(),d=n.cwrap("getVPS","number",[])();e.vps=new Uint8Array(h),e.vps.set(n.HEAPU8.subarray(d,d+h),0)}else this.mediaAttr.vCodec==s.DEF_AVC||(this.mediaAttr.vCodec,s.DEF_H264);return{nalu:e,vlc:t}}},{key:"readPacket",value:function(){var e=n.cwrap("getPacket","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],a=n.HEAPF64[e/8+1+1],o=n.HEAPU32[e/4+1+1+2+2],l=n.HEAPU32[e/4+1+1+2+2+1],f=n.HEAPU8.subarray(l,l+i),u=this._readLayer();return{type:t,size:i,ptime:r,dtime:a,keyframe:o,src:f,data:1==t&&this.mediaAttr.aCodec==s.DEF_AAC?this.aacDec.sliceAACFrames(r,f):f,layer:u}}},{key:"_refreshDemuxer",value:function(){this._releaseDemuxer(),this._initDemuxer()}},{key:"_initDemuxer",value:function(){n.cwrap("initTsMissile","number",[])(),n.cwrap("initializeDemuxer","number",[])()}},{key:"_releaseDemuxer",value:function(){n.cwrap("exitTsMissile","number",[])()}}])&&r(i.prototype,o),l&&r(i,l),e}();i.MPEG_JS=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../decoder/missile.js":1,"./consts":213,"./decoder/aac":214}],216:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&e.extensionInfo.vHeight>0&&(e.size.width=e.extensionInfo.vWidth,e.size.height=e.extensionInfo.vHeight);for(var t=null;!((t=e.mpegTsObj.readPacket()).size<=0);){var i=t.dtime;if(0==t.type){var r=s.PACK_NALU(t.layer),n=1==t.keyframe;e.bufObject.appendFrame(i,r,!0,n)}else if("aac"==e.mediaInfo.aCodec)for(var a=t.data,o=0;o0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0}},{key:"getACodec",value:function(){return this.aCodec}},{key:"getAudioNone",value:function(){return this.mpegTsObj.mediaAttr.audioNone}},{key:"getDurationMs",value:function(){return this.durationMs}},{key:"getFPS",value:function(){return this.fps}},{key:"getSampleRate",value:function(){return this.sampleRate}},{key:"getSize",value:function(){return this.size}},{key:"seek",value:function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}}}])&&r(t.prototype,i),o&&r(t,o),e}();i.MpegTs=o},{"../decoder/hevc-imp":206,"./buffer":208,"./mpegts/mpeg.js":215}],217:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];this.player.setScreen(e)}},{key:"play",value:function(){if(this.playParam.videoCodec===c.CODEC_H265){var e={seekPos:this._getSeekTarget(),mode:this.playMode,accurateSeek:this.configFormat.accurateSeek,seekEvent:!1,realPlay:!0};this.player.play(e)}else this.player.play();return!0}},{key:"pause",value:function(){return this.player.pause(),!0}},{key:"isPlaying",value:function(){return this.player.isPlayingState()}},{key:"setVoice",value:function(e){if(e<0)return!1;this.volume=e,this.player.setVoice(e)}},{key:"getVolume",value:function(){return this.volume}},{key:"mediaInfo",value:function(){return{meta:this.playParam,videoType:this.playMode}}},{key:"_seekHLS",value:function(e,t,i){setTimeout((function(){t.player.getCachePTS(),t.player.getCachePTS()>e?i():t._seekHLS(e,t,i)}),100)}},{key:"seek",value:function(e){var t=this;this.seekTarget=e,this.onSeekStart&&this.onSeekStart(e),this.timerFeed&&(window.clearInterval(this.timerFeed),this.timerFeed=null);var i=this._getSeekTarget();return this.playParam.videoCodec===c.CODEC_H264&&this.configFormat.type==c.PLAYER_IN_TYPE_MP4?(this.player.seek(e),this.onSeekFinish&&this.onSeekFinish()):this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?this.player.seek((function(){}),{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek}):this._seekHLS(e,this,(function(){t.player.seek((function(){t.configFormat.type==c.PLAYER_IN_TYPE_MP4?t.mp4Obj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_TS||t.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?t.mpegTsObj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(t.hlsObj.onSamples=null,t.hlsObj.seek(e));var i,r=(i=0,i=t.configFormat.accurateSeek?e:t._getBoxBufSeekIDR(),parseInt(i)),n=parseInt(t._getBoxBufSeekIDR())||0;t._avFeedMP4Data(n,r)}),{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek})})),!0}},{key:"fullScreen",value:function(){this.autoScreenClose=!0;var e=document.querySelector("#"+this.configFormat.playerId),t=e.getElementsByTagName("canvas")[0];e.style.width=this.screenW+"px",e.style.height=this.screenH+"px";var i=this._checkScreenDisplaySize(this.screenW,this.screenH,this.playParam.size.width,this.playParam.size.height);t.style.marginTop=i[0]+"px",t.style.marginLeft=i[1]+"px",t.style.width=i[2]+"px",t.style.height=i[3]+"px",this._requestFullScreen(e)}},{key:"closeFullScreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!1===e&&(this.autoScreenClose=!1,this._exitFull());var t=document.querySelector("#"+this.configFormat.playerId),i=t.getElementsByTagName("canvas")[0];t.style.width=this.configFormat.playerW+"px",t.style.height=this.configFormat.playerH+"px";var r=this._checkScreenDisplaySize(this.configFormat.playerW,this.configFormat.playerH,this.playParam.size.width,this.playParam.size.height);i.style.marginTop=r[0]+"px",i.style.marginLeft=r[1]+"px",i.style.width=r[2]+"px",i.style.height=r[3]+"px"}},{key:"_checkScreenDisplaySize",value:function(e,t,i,r){var n=i/e>r/t,a=(e/i).toFixed(2),s=(t/r).toFixed(2),o=n?a:s,l=this.fixed?e:parseInt(i*o),f=this.fixed?t:parseInt(r*o);return[parseInt((t-f)/2),parseInt((e-l)/2),l,f]}},{key:"_isFullScreen",value:function(){var e=document.fullscreenElement||document.mozFullscreenElement||document.webkitFullscreenElement;return document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled,null!=e}},{key:"_requestFullScreen",value:function(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullScreen()}},{key:"_exitFull",value:function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}},{key:"_durationText",value:function(e){if(e<0)return"Play";var t=Math.round(e);return Math.floor(t/3600)+":"+Math.floor(t%3600/60)+":"+Math.floor(t%60)}},{key:"_getSeekTarget",value:function(){return this.configFormat.accurateSeek?this.seekTarget:this._getBoxBufSeekIDR()}},{key:"_getBoxBufSeekIDR",value:function(){return this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.mp4Obj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this.mpegTsObj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this.hlsObj.seekPos:void 0}},{key:"_playControl",value:function(){this.isPlaying()?this.pause():this.play()}},{key:"_avFeedMP4Data",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=parseInt(this.playParam.durationMs/1e3);this.player.clearAllCache(),this.timerFeed=window.setInterval((function(){var a=null,s=null,o=!0,l=!0;if(e.configFormat.type==c.PLAYER_IN_TYPE_MP4?(a=e.mp4Obj.popBuffer(1,t),s=e.mp4Obj.audioNone?null:e.mp4Obj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_TS||e.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?(a=e.mpegTsObj.popBuffer(1,t),s=e.mpegTsObj.getAudioNone()?null:e.mpegTsObj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(a=e.hlsObj.popBuffer(1,t),s=e.hlsObj.audioNone?null:e.hlsObj.popBuffer(2,i),t=e.hlsObj.getLastIdx()&&(o=!1),i=e.hlsObj.getALastIdx()&&(l=!1)),!0===o&&null!=a)for(var f=0;fn)return window.clearInterval(e.timerFeed),e.timerFeed=null,e.player.vCachePTS,e.player.aCachePTS,void(null!=r&&r())}),5)}},{key:"_makeMP4Player",value:function(){null!=this.configFormat.extInfo.core&&null!==this.configFormat.extInfo.core&&this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?this._cDemuxDecoderEntry():this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.configFormat.extInfo.moovStartFlag?this._mp4EntryVodStream():this._mp4Entry():this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this._mpegTsEntry():this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this._m3u8Entry():this.configFormat.type===c.PLAYER_IN_TYPE_RAW_265&&this._raw265Entry()}},{key:"_makeMP4PlayerViewEvent",value:function(e,t,i,r){var a=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=this;if(this.playParam.durationMs=e,this.playParam.fps=t,this.playParam.sampleRate=i,this.playParam.size=r,this.playParam.audioNone=s,this.playParam.videoCodec=o||c.CODEC_H265,this.playParam,(this.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&this.hlsConf.hlsType==c.PLAYER_IN_TYPE_M3U8_LIVE||this.configFormat.type==c.PLAYER_IN_TYPE_RAW_265)&&(this.playMode=c.PLAYER_MODE_NOTIME_LIVE),l.configFormat.extInfo.autoCrop){var f=document.querySelector("#"+this.configFormat.playerId),u=r.width/r.height,h=this.configFormat.playerW/this.configFormat.playerH;u>h?f.style.height=this.configFormat.playerW/u+"px":u>1,a>>1,i),e.v.fill(n>>1,a>>1,r),e.drawArrays(e.TRIANGLE_STRIP,0,4)},setupCanvas:function(e,t){var i=e.getContext("webgl")||e.getContext("experimental-webgl");if(!i)return i;var n=i.createProgram(),a=["attribute highp vec4 aVertexPosition;","attribute vec2 aTextureCoord;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = aVertexPosition;"," vTextureCoord = aTextureCoord;","}"].join("\n"),s=i.createShader(i.VERTEX_SHADER);i.shaderSource(s,a),i.compileShader(s);var o=["precision highp float;","varying lowp vec2 vTextureCoord;","uniform sampler2D YTexture;","uniform sampler2D UTexture;","uniform sampler2D VTexture;","const mat4 YUV2RGB = mat4","("," 1.1643828125, 0, 1.59602734375, -.87078515625,"," 1.1643828125, -.39176171875, -.81296875, .52959375,"," 1.1643828125, 2.017234375, 0, -1.081390625,"," 0, 0, 0, 1",");","void main(void) {"," gl_FragColor = vec4( texture2D(YTexture, vTextureCoord).x, texture2D(UTexture, vTextureCoord).x, texture2D(VTexture, vTextureCoord).x, 1) * YUV2RGB;","}"].join("\n"),l=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(l,o),i.compileShader(l),i.attachShader(n,s),i.attachShader(n,l),i.linkProgram(n),i.useProgram(n),i.getProgramParameter(n,i.LINK_STATUS);var f=i.getAttribLocation(n,"aVertexPosition");i.enableVertexAttribArray(f);var u=i.getAttribLocation(n,"aTextureCoord");i.enableVertexAttribArray(u);var c=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,c),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0]),i.STATIC_DRAW),i.vertexAttribPointer(f,3,i.FLOAT,!1,0,0);var h=i.createBuffer();return i.bindBuffer(i.ARRAY_BUFFER,h),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),i.STATIC_DRAW),i.vertexAttribPointer(u,2,i.FLOAT,!1,0,0),i.y=new r(i),i.u=new r(i),i.v=new r(i),i.y.bind(0,n,"YTexture"),i.u.bind(1,n,"UTexture"),i.v.bind(2,n,"VTexture"),i}}},{}],220:[function(e,t,i){(function(e){"use strict";e.STATIC_MEM_wasmDecoderState=-1,e.STATICE_MEM_playerCount=-1,e.STATICE_MEM_playerIndexPtr=0}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],221:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i1&&(m=i.argv[1].replace(/\\/g,"/")),p=i.argv.slice(2),void 0!==t&&(t.exports=d),i.on("uncaughtException",(function(e){if(!(e instanceof Sa))throw e})),i.on("unhandledRejection",at),b=function(e){i.exit(e)},d.inspect=function(){return"[Emscripten Module object]"};else if(E)"undefined"!=typeof read&&(C=function(e){return read(e)}),S=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(W("object"===u(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?p=scriptArgs:void 0!==arguments&&(p=arguments),"function"==typeof quit&&(b=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print);else{if(!v&&!y)throw new Error("environment detection error");y?A=self.location.href:document.currentScript&&(A=document.currentScript.src),A=0!==A.indexOf("blob:")?A.substr(0,A.lastIndexOf("/")+1):"",C=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},y&&(S=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),function(e,t,i){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?t(r.response):i()},r.onerror=i,r.send(null)},function(e){document.title=e}}var M=d.print||console.log.bind(console),k=d.printErr||console.warn.bind(console);for(h in _)_.hasOwnProperty(h)&&(d[h]=_[h]);function P(e){W(Te);var t=pe[Te>>2],i=t+e+15&-16;return i>ei()&&at("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly"),pe[Te>>2]=i,t}function I(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 W(t%8==0,"getNativeTypeSize invalid bits "+t+", type "+e),t/8}return 0}}function R(e){R.shown||(R.shown={}),R.shown[e]||(R.shown[e]=1,k(e))}_=null,d.arguments&&(p=d.arguments),Object.getOwnPropertyDescriptor(d,"arguments")||Object.defineProperty(d,"arguments",{configurable:!0,get:function(){at("Module.arguments has been replaced with plain arguments_")}}),d.thisProgram&&(m=d.thisProgram),Object.getOwnPropertyDescriptor(d,"thisProgram")||Object.defineProperty(d,"thisProgram",{configurable:!0,get:function(){at("Module.thisProgram has been replaced with plain thisProgram")}}),d.quit&&(b=d.quit),Object.getOwnPropertyDescriptor(d,"quit")||Object.defineProperty(d,"quit",{configurable:!0,get:function(){at("Module.quit has been replaced with plain quit_")}}),W(void 0===d.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),W(void 0===d.read,"Module.read option was removed (modify read_ in JS)"),W(void 0===d.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),W(void 0===d.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),W(void 0===d.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),Object.getOwnPropertyDescriptor(d,"read")||Object.defineProperty(d,"read",{configurable:!0,get:function(){at("Module.read has been replaced with plain read_")}}),Object.getOwnPropertyDescriptor(d,"readAsync")||Object.defineProperty(d,"readAsync",{configurable:!0,get:function(){at("Module.readAsync has been replaced with plain readAsync")}}),Object.getOwnPropertyDescriptor(d,"readBinary")||Object.defineProperty(d,"readBinary",{configurable:!0,get:function(){at("Module.readBinary has been replaced with plain readBinary")}}),Ea=wa=ga=function(){at("cannot use the stack before compiled code is ready to run, and has provided stack access")};var U={"f64-rem":function(e,t){return e%t},debugger:function(){}},D=1,F=new Array(35);function O(e,t){W(void 0!==e);for(var i=0;i<35;i++)if(!F[i])return F[i]=e,D+i;throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."}var L,B,N,z=0,H=function(){return z};function V(e,t,i,r){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":he[e>>0]=t;break;case"i16":de[e>>1]=t;break;case"i32":pe[e>>2]=t;break;case"i64":ft=[t>>>0,(lt=t,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[e>>2]=ft[0],pe[e+4>>2]=ft[1];break;case"float":be[e>>2]=t;break;case"double":ve[e>>3]=t;break;default:at("invalid type for setValue: "+i)}}d.wasmBinary&&(L=d.wasmBinary),Object.getOwnPropertyDescriptor(d,"wasmBinary")||Object.defineProperty(d,"wasmBinary",{configurable:!0,get:function(){at("Module.wasmBinary has been replaced with plain wasmBinary")}}),d.noExitRuntime&&(B=d.noExitRuntime),Object.getOwnPropertyDescriptor(d,"noExitRuntime")||Object.defineProperty(d,"noExitRuntime",{configurable:!0,get:function(){at("Module.noExitRuntime has been replaced with plain noExitRuntime")}}),"object"!==("undefined"==typeof WebAssembly?"undefined":u(WebAssembly))&&at("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Y=new WebAssembly.Table({initial:4416,element:"anyfunc"}),q=!1;function W(e,t){e||at("Assertion failed: "+t)}function X(e){var t=d["_"+e];return W(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function G(e,t,i,r,n){var a={string:function(e){var t=0;if(null!=e&&0!==e){var i=1+(e.length<<2);ne(e,t=ga(i),i)}return t},array:function(e){var t=ga(e.length);return le(e,t),t}};var s=X(e),o=[],l=0;if(W("array"!==t,'Return type should not be "array".'),r)for(var f=0;f>2]=0;for(l=s+a;r>0]=0;return s}if("i8"===o)return e.subarray||e.slice?ce.set(e,s):ce.set(new Uint8Array(e),s),s;for(var f,u,h,c=0;c=r);)++n;if(n-t>16&&e.subarray&&ee)return ee.decode(e.subarray(t,n));for(var a="";t>10,56320|1023&f)}}else a+=String.fromCharCode((31&s)<<6|o)}else a+=String.fromCharCode(s)}return a}function ie(e,t){return e?te(ce,e,t):""}function re(e,t,i,r){if(!(r>0))return 0;for(var n=i,a=i+r-1,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(o<=127){if(i>=a)break;t[i++]=o}else if(o<=2047){if(i+1>=a)break;t[i++]=192|o>>6,t[i++]=128|63&o}else if(o<=65535){if(i+2>=a)break;t[i++]=224|o>>12,t[i++]=128|o>>6&63,t[i++]=128|63&o}else{if(i+3>=a)break;o>=2097152&&R("Invalid Unicode code point 0x"+o.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[i++]=240|o>>18,t[i++]=128|o>>12&63,t[i++]=128|o>>6&63,t[i++]=128|63&o}}return t[i]=0,i-n}function ne(e,t,i){return W("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),re(e,ce,t,i)}function ae(e){for(var t=0,i=0;i=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++i)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function se(e){var t=ae(e)+1,i=ya(t);return i&&re(e,he,i,t),i}function oe(e){var t=ae(e)+1,i=ga(t);return re(e,he,i,t),i}function le(e,t){W(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),he.set(e,t)}function fe(e,t,i){for(var r=0;r>0]=e.charCodeAt(r);i||(he[t>>0]=0)}var ue,he,ce,de,_e,pe,me,be,ve,ye=16384,ge=65536;function we(e,t){return e%t>0&&(e+=t-e%t),e}function Ee(e){ue=e,d.HEAP8=he=new Int8Array(e),d.HEAP16=de=new Int16Array(e),d.HEAP32=pe=new Int32Array(e),d.HEAPU8=ce=new Uint8Array(e),d.HEAPU16=_e=new Uint16Array(e),d.HEAPU32=me=new Uint32Array(e),d.HEAPF32=be=new Float32Array(e),d.HEAPF64=ve=new Float64Array(e)}var Ce=1127056,Se=6369936,je=6369936,Te=1126832;W(Ce%16==0,"stack must start aligned"),W(je%16==0,"heap must start aligned");var Ae=5242880;d.TOTAL_STACK&&W(Ae===d.TOTAL_STACK,"the stack size can no longer be determined at runtime");var xe=d.TOTAL_MEMORY||1073741824;function Me(){W(0==(3&Se)),me[(Se>>2)-1]=34821223,me[(Se>>2)-2]=2310721022,pe[0]=1668509029}function ke(){var e=me[(Se>>2)-1],t=me[(Se>>2)-2];34821223==e&&2310721022==t||at("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==pe[0]&&at("Runtime error: The application has corrupted its heap memory area (address zero)!")}function Pe(e){at("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(Se-Ea()+e)+" bytes available!")}function Ie(e,t){var i="";for(var r in kr){var n=kr[r];n[e]&&(i+='as sig "'+r+'" pointing to function '+n[e]+", ")}at("Invalid function pointer "+e+" called with signature '"+t+"'. 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). This pointer might make sense in another type signature: "+i)}function Re(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?d.dynCall_v(i):d.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg)}else t()}}Object.getOwnPropertyDescriptor(d,"TOTAL_MEMORY")||Object.defineProperty(d,"TOTAL_MEMORY",{configurable:!0,get:function(){at("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY")}}),W(xe>=Ae,"TOTAL_MEMORY should be larger than TOTAL_STACK, was "+xe+"! (TOTAL_STACK="+Ae+")"),W("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"),(N=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:xe/ge}))&&(ue=N.buffer),W((xe=ue.byteLength)%ge==0),Ee(ue),pe[Te>>2]=je,function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!"}();var Ue=[],De=[],Fe=[],Oe=[],Le=!1,Be=!1;function Ne(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)qe(d.preRun.shift());Re(Ue)}function ze(){ke(),W(!Le),Le=!0,d.noFSInit||Ut.init.initialized||Ut.init(),At.init(),Re(De)}function He(){ke(),Ut.ignorePermissions=!1,Re(Fe)}function Ve(){ke(),Be=!0}function Ye(){if(ke(),d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)We(d.postRun.shift());Re(Oe)}function qe(e){Ue.unshift(e)}function We(e){Oe.unshift(e)}W(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),W(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),W(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),W(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var Xe=Math.abs,Ge=Math.ceil,Ke=Math.floor,Qe=Math.min,Ze=Math.trunc,Je=0,$e=null,et=null,tt={};function it(e){for(var t=e;;){if(!tt[e])return e;e=t+Math.random()}return e}function rt(e){Je++,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(W(!tt[e]),tt[e]=1,null===$e&&"undefined"!=typeof setInterval&&($e=setInterval((function(){if(q)return clearInterval($e),void($e=null);var e=!1;for(var t in tt)e||(e=!0,k("still waiting on run dependencies:")),k("dependency: "+t);e&&k("(end of list)")}),1e4))):k("warning: run dependency added without ID")}function nt(e){if(Je--,d.monitorRunDependencies&&d.monitorRunDependencies(Je),e?(W(tt[e]),delete tt[e]):k("warning: run dependency removed without ID"),0==Je&&(null!==$e&&(clearInterval($e),$e=null),et)){var t=et;et=null,t()}}function at(e){d.onAbort&&d.onAbort(e),M(e+=""),k(e),q=!0,1;throw"abort("+e+") at "+gt()}d.preloadedImages={},d.preloadedAudios={},c||qe((function(){"undefined"!=typeof SharedArrayBuffer&&(rt("pthreads"),PThread.allocateUnusedWorkers(5,(function(){nt("pthreads")})))}));var st="data:application/octet-stream;base64,";function ot(e){return String.prototype.startsWith?e.startsWith(st):0===e.indexOf(st)}var lt,ft,ut="missile-v20211009.wasm";function ht(){try{if(L)return new Uint8Array(L);if(S)return S(ut);throw"both async and sync fetching of the wasm failed"}catch(e){at(e)}}function ct(){return L||!v&&!y||"function"!=typeof fetch?new Promise((function(e,t){e(ht())})):fetch(ut,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ut+"'";return e.arrayBuffer()})).catch((function(){return ht()}))}function dt(){var e={env:ha,wasi_unstable:ha,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:U};function t(e,t){var i=e.exports;d.asm=i,nt("wasm-instantiate")}rt("wasm-instantiate");var i=d;function r(e){W(d===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,t(e.instance)}function n(t){return ct().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){k("failed to asynchronously prepare wasm: "+e),at(e)}))}if(d.instantiateWasm)try{return d.instantiateWasm(e,t)}catch(e){return k("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(L||"function"!=typeof WebAssembly.instantiateStreaming||ot(ut)||"function"!=typeof fetch)return n(r);fetch(ut,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){k("wasm streaming compile failed: "+e),k("falling back to ArrayBuffer instantiation"),n(r)}))}))}(),{}}ot(ut)||(ut=x(ut)),d.asm=dt;var _t=[function(){"undefined"!=typeof window?window.dispatchEvent(new CustomEvent("wasmLoaded")):r.onWASMLoaded&&r.onWASMLoaded()}];function pt(e){return _t[e]()}De.push({func:function(){_a()}});var mt=1127040;function bt(e){return R("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function vt(e){return e.replace(/\b__Z[\w\d_]+/g,(function(e){var t=bt(e);return e===t?e:t+" ["+e+"]"}))}function yt(){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 gt(){var e=yt();return d.extraStackTrace&&(e+="\n"+d.extraStackTrace()),vt(e)}W(mt%8==0);var wt={};function Et(e){var t,i;Et.called?(i=pe[e>>2],t=pe[i>>2]):(Et.called=!0,wt.USER="web_user",wt.LOGNAME="web_user",wt.PATH="/",wt.PWD="/",wt.HOME="/home/web_user",wt.LANG=("object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",wt._=m,t=$(1024),i=$(256),pe[i>>2]=t,pe[e>>2]=i);var r=[],n=0;for(var a in wt)if("string"==typeof wt[a]){var s=a+"="+wt[a];r.push(s),n+=s.length}if(n>1024)throw new Error("Environment size exceeded TOTAL_ENV_SIZE!");for(var o=0;o>2]=t,t+=s.length+1}pe[i+4*r.length>>2]=0}function Ct(){}function St(e){return d.___errno_location?pe[d.___errno_location()>>2]=e:k("failed to set errno from JS"),e}var jt={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i;i--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),i="/"===e.substr(-1);return(e=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&i&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=jt.splitPath(e),i=t[0],r=t[1];return i||r?(r&&(r=r.substr(0,r.length-1)),i+r):"."},basename:function(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return jt.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return jt.normalize(e.join("/"))},join2:function(e,t){return jt.normalize(e+"/"+t)}},Tt={resolve:function(){for(var e="",t=!1,i=arguments.length-1;i>=-1&&!t;i--){var r=i>=0?arguments[i]:Ut.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t="/"===r.charAt(0)}return(t?"/":"")+(e=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function i(e){for(var t=0;t=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=Tt.resolve(e).substr(1),t=Tt.resolve(t).substr(1);for(var r=i(e.split("/")),n=i(t.split("/")),a=Math.min(r.length,n.length),s=a,o=0;o0?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=Ni(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(M(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(M(te(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(k(te(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(k(te(e.output,0)),e.output=[])}}},xt={ops_table:null,mount:function(e){return xt.createNode(null,"/",16895,0)},createNode:function(e,t,i,r){if(Ut.isBlkdev(i)||Ut.isFIFO(i))throw new Ut.ErrnoError(63);xt.ops_table||(xt.ops_table={dir:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,lookup:xt.node_ops.lookup,mknod:xt.node_ops.mknod,rename:xt.node_ops.rename,unlink:xt.node_ops.unlink,rmdir:xt.node_ops.rmdir,readdir:xt.node_ops.readdir,symlink:xt.node_ops.symlink},stream:{llseek:xt.stream_ops.llseek}},file:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:{llseek:xt.stream_ops.llseek,read:xt.stream_ops.read,write:xt.stream_ops.write,allocate:xt.stream_ops.allocate,mmap:xt.stream_ops.mmap,msync:xt.stream_ops.msync}},link:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,readlink:xt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:Ut.chrdev_stream_ops}});var n=Ut.createNode(e,t,i,r);return Ut.isDir(n.mode)?(n.node_ops=xt.ops_table.dir.node,n.stream_ops=xt.ops_table.dir.stream,n.contents={}):Ut.isFile(n.mode)?(n.node_ops=xt.ops_table.file.node,n.stream_ops=xt.ops_table.file.stream,n.usedBytes=0,n.contents=null):Ut.isLink(n.mode)?(n.node_ops=xt.ops_table.link.node,n.stream_ops=xt.ops_table.link.stream):Ut.isChrdev(n.mode)&&(n.node_ops=xt.ops_table.chrdev.node,n.stream_ops=xt.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=[],i=0;i=t)){t=Math.max(t,i*(i<1048576?2:1.125)|0),0!=i&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),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 i=e.contents;return e.contents=new Uint8Array(new ArrayBuffer(t)),i&&e.contents.set(i.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=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-n,r);if(W(s>=0),s>8&&a.subarray)t.set(a.subarray(n,n+s),i);else for(var o=0;o0||n+rs.timestamp)&&(n.push(i),r++)}));var a=[];if(Object.keys(t.entries).forEach((function(i){t.entries[i];e.entries[i]||(a.push(i),r++)})),!r)return i(null);var s=!1,o=("remote"===e.type?e.db:t.db).transaction([Mt.DB_STORE_NAME],"readwrite"),l=o.objectStore(Mt.DB_STORE_NAME);function f(e){if(e&&!s)return s=!0,i(e)}o.onerror=function(e){f(this.error),e.preventDefault()},o.oncomplete=function(e){s||i(null)},n.sort().forEach((function(e){"local"===t.type?Mt.loadRemoteEntry(l,e,(function(t,i){if(t)return f(t);Mt.storeLocalEntry(e,i,f)})):Mt.loadLocalEntry(e,(function(t,i){if(t)return f(t);Mt.storeRemoteEntry(l,e,i,f)}))})),a.sort().reverse().forEach((function(e){"local"===t.type?Mt.removeLocalEntry(e,f):Mt.removeRemoteEntry(l,e,f)}))}},kt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Pt={isWindows:!1,staticInit:function(){Pt.isWindows=!!i.platform.match(/^win/);var e=i.binding("constants");e.fs&&(e=e.fs),Pt.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)},convertNodeCode:function(e){var t=e.code;return W(t in kt),kt[t]},mount:function(e){return W(w),Pt.createNode(null,"/",Pt.getMode(e.opts.root),0)},createNode:function(e,t,i,r){if(!Ut.isDir(i)&&!Ut.isFile(i)&&!Ut.isLink(i))throw new Ut.ErrnoError(28);var n=Ut.createNode(e,t,i);return n.node_ops=Pt.node_ops,n.stream_ops=Pt.stream_ops,n},getMode:function(e){var t;try{t=Li.lstatSync(e),Pt.isWindows&&(t.mode=t.mode|(292&t.mode)>>2)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}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(),jt.join.apply(null,t)},flagsForNode:function(e){e&=-2097153,e&=-2049,e&=-32769,e&=-524289;var t=0;for(var i in Pt.flagsForNodeMap)e&i&&(t|=Pt.flagsForNodeMap[i],e^=i);if(e)throw new Ut.ErrnoError(28);return t},node_ops:{getattr:function(e){var t,i=Pt.realPath(e);try{t=Li.lstatSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}return Pt.isWindows&&!t.blksize&&(t.blksize=4096),Pt.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 i=Pt.realPath(e);try{if(void 0!==t.mode&&(Li.chmodSync(i,t.mode),e.mode=t.mode),void 0!==t.timestamp){var r=new Date(t.timestamp);Li.utimesSync(i,r,r)}void 0!==t.size&&Li.truncateSync(i,t.size)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},lookup:function(e,t){var i=jt.join2(Pt.realPath(e),t),r=Pt.getMode(i);return Pt.createNode(e,t,r)},mknod:function(e,t,i,r){var n=Pt.createNode(e,t,i,r),a=Pt.realPath(n);try{Ut.isDir(n.mode)?Li.mkdirSync(a,n.mode):Li.writeFileSync(a,"",{mode:n.mode})}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}return n},rename:function(e,t,i){var r=Pt.realPath(e),n=jt.join2(Pt.realPath(t),i);try{Li.renameSync(r,n)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},unlink:function(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.unlinkSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},rmdir:function(e,t){var i=jt.join2(Pt.realPath(e),t);try{Li.rmdirSync(i)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},readdir:function(e){var t=Pt.realPath(e);try{return Li.readdirSync(t)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},symlink:function(e,t,i){var r=jt.join2(Pt.realPath(e),t);try{Li.symlinkSync(i,r)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},readlink:function(e){var t=Pt.realPath(e);try{return t=Li.readlinkSync(t),t=Bi.relative(Bi.resolve(e.mount.opts.root),t)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}}},stream_ops:{open:function(e){var t=Pt.realPath(e.node);try{Ut.isFile(e.node.mode)&&(e.nfd=Li.openSync(t,Pt.flagsForNode(e.flags)))}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},close:function(e){try{Ut.isFile(e.node.mode)&&e.nfd&&Li.closeSync(e.nfd)}catch(e){if(!e.code)throw e;throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},read:function(e,t,i,r,n){if(0===r)return 0;try{return Li.readSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n)}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},write:function(e,t,i,r,n){try{return Li.writeSync(e.nfd,Pt.bufferFrom(t.buffer),i,r,n)}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}},llseek:function(e,t,i){var r=t;if(1===i)r+=e.position;else if(2===i&&Ut.isFile(e.node.mode))try{r+=Li.fstatSync(e.nfd).size}catch(e){throw new Ut.ErrnoError(Pt.convertNodeCode(e))}if(r<0)throw new Ut.ErrnoError(28);return r}}},It={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(e){W(y),It.reader||(It.reader=new FileReaderSync);var t=It.createNode(null,"/",It.DIR_MODE,0),i={};function r(e){for(var r=e.split("/"),n=t,a=0;a=e.node.size)return 0;var a=e.node.contents.slice(n,n+r),s=It.reader.readAsArrayBuffer(a);return t.set(new Uint8Array(s),i),a.size},write:function(e,t,i,r,n){throw new Ut.ErrnoError(29)},llseek:function(e,t,i){var r=t;if(1===i?r+=e.position:2===i&&Ut.isFile(e.node.mode)&&(r+=e.node.size),r<0)throw new Ut.ErrnoError(28);return r}}},Rt={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Ut={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 Ut.ErrnoError))throw e+" : "+gt();return St(e.errno)},lookupPath:function(e,t){if(t=t||{},!(e=Tt.resolve(Ut.cwd(),e)))return{path:"",node:null};var i={follow_mount:!0,recurse_count:0};for(var r in i)void 0===t[r]&&(t[r]=i[r]);if(t.recurse_count>8)throw new Ut.ErrnoError(32);for(var n=jt.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),a=Ut.root,s="/",o=0;o40)throw new Ut.ErrnoError(32)}}return{path:s,node:a}},getPath:function(e){for(var t;;){if(Ut.isRoot(e)){var i=e.mount.mountpoint;return t?"/"!==i[i.length-1]?i+"/"+t:i+t:i}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var i=0,r=0;r>>0)%Ut.nameTable.length},hashAddNode:function(e){var t=Ut.hashName(e.parent.id,e.name);e.name_next=Ut.nameTable[t],Ut.nameTable[t]=e},hashRemoveNode:function(e){var t=Ut.hashName(e.parent.id,e.name);if(Ut.nameTable[t]===e)Ut.nameTable[t]=e.name_next;else for(var i=Ut.nameTable[t];i;){if(i.name_next===e){i.name_next=e.name_next;break}i=i.name_next}},lookupNode:function(e,t){var i=Ut.mayLookup(e);if(i)throw new Ut.ErrnoError(i,e);for(var r=Ut.hashName(e.id,t),n=Ut.nameTable[r];n;n=n.name_next){var a=n.name;if(n.parent.id===e.id&&a===t)return n}return Ut.lookup(e,t)},createNode:function(e,t,i,r){if(!Ut.FSNode){Ut.FSNode=function(e,t,i,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ut.nextInode++,this.name=t,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=r},Ut.FSNode.prototype={};Object.defineProperties(Ut.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 Ut.isDir(this.mode)}},isDevice:{get:function(){return Ut.isChrdev(this.mode)}}})}var n=new Ut.FSNode(e,t,i,r);return Ut.hashAddNode(n),n},destroyNode:function(e){Ut.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=Ut.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 Ut.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){var t=Ut.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{Ut.lookupNode(e,t);return 20}catch(e){}return Ut.nodePermissions(e,"wx")},mayDelete:function(e,t,i){var r;try{r=Ut.lookupNode(e,t)}catch(e){return e.errno}var n=Ut.nodePermissions(e,"wx");if(n)return n;if(i){if(!Ut.isDir(r.mode))return 54;if(Ut.isRoot(r)||Ut.getPath(r)===Ut.cwd())return 10}else if(Ut.isDir(r.mode))return 31;return 0},mayOpen:function(e,t){return e?Ut.isLink(e.mode)?32:Ut.isDir(e.mode)&&("r"!==Ut.flagsToPermissionString(t)||512&t)?31:Ut.nodePermissions(e,Ut.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||Ut.MAX_OPEN_FDS;for(var i=e;i<=t;i++)if(!Ut.streams[i])return i;throw new Ut.ErrnoError(33)},getStream:function(e){return Ut.streams[e]},createStream:function(e,t,i){Ut.FSStream||(Ut.FSStream=function(){},Ut.FSStream.prototype={},Object.defineProperties(Ut.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 r=new Ut.FSStream;for(var n in e)r[n]=e[n];e=r;var a=Ut.nextfd(t,i);return e.fd=a,Ut.streams[a]=e,e},closeStream:function(e){Ut.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=Ut.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new Ut.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){Ut.devices[e]={stream_ops:t}},getDevice:function(e){return Ut.devices[e]},getMounts:function(e){for(var t=[],i=[e];i.length;){var r=i.pop();t.push(r),i.push.apply(i,r.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),Ut.syncFSRequests++,Ut.syncFSRequests>1&&Ut.syncFSRequests;var i=Ut.getMounts(Ut.root.mount),r=0;function n(e){return W(Ut.syncFSRequests>0),Ut.syncFSRequests--,t(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,n(e));++r>=i.length&&n(null)}i.forEach((function(t){if(!t.type.syncfs)return a(null);t.type.syncfs(t,e,a)}))},mount:function(e,t,i){var r,n="/"===i,a=!i;if(n&&Ut.root)throw new Ut.ErrnoError(10);if(!n&&!a){var s=Ut.lookupPath(i,{follow_mount:!1});if(i=s.path,r=s.node,Ut.isMountpoint(r))throw new Ut.ErrnoError(10);if(!Ut.isDir(r.mode))throw new Ut.ErrnoError(54)}var o={type:e,opts:t,mountpoint:i,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,n?Ut.root=l:r&&(r.mounted=o,r.mount&&r.mount.mounts.push(o)),l},unmount:function(e){var t=Ut.lookupPath(e,{follow_mount:!1});if(!Ut.isMountpoint(t.node))throw new Ut.ErrnoError(28);var i=t.node,r=i.mounted,n=Ut.getMounts(r);Object.keys(Ut.nameTable).forEach((function(e){for(var t=Ut.nameTable[e];t;){var i=t.name_next;-1!==n.indexOf(t.mount)&&Ut.destroyNode(t),t=i}})),i.mounted=null;var a=i.mount.mounts.indexOf(r);W(-1!==a),i.mount.mounts.splice(a,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,i){var r=Ut.lookupPath(e,{parent:!0}).node,n=jt.basename(e);if(!n||"."===n||".."===n)throw new Ut.ErrnoError(28);var a=Ut.mayCreate(r,n);if(a)throw new Ut.ErrnoError(a);if(!r.node_ops.mknod)throw new Ut.ErrnoError(63);return r.node_ops.mknod(r,n,t,i)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Ut.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Ut.mknod(e,t,0)},mkdirTree:function(e,t){for(var i=e.split("/"),r="",n=0;nthis.length-1||e<0)){var t=e%this.chunkSize,i=e/this.chunkSize|0;return this.getter(i)[t]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,s=1048576;n||(s=r);var o=this;o.setDataGetter((function(e){var t=e*s,n=(e+1)*s-1;if(n=Math.min(n,r-1),void 0===o.chunks[e]&&(o.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",i,!1),r!==s&&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 "+i+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):Ni(n.responseText||"",!0)}(t,n)),void 0===o.chunks[e])throw new Error("doXHR failed!");return o.chunks[e]})),!a&&r||(s=r=1,r=this.getter(0).length,s=r),this._length=r,this._chunkSize=s,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!y)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var o={isDevice:!1,contents:s}}else o={isDevice:!1,url:i};var l=Ut.createFile(e,t,o,r,n);o.contents?l.contents=o.contents:o.url&&(l.contents=null,l.url=o.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var f={};return Object.keys(l.stream_ops).forEach((function(e){var t=l.stream_ops[e];f[e]=function(){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);return t.apply(null,arguments)}})),f.read=function(e,t,i,r,n){if(!Ut.forceLoadFile(l))throw new Ut.ErrnoError(29);var a=e.node.contents;if(n>=a.length)return 0;var s=Math.min(a.length-n,r);if(W(s>=0),a.slice)for(var o=0;o>2]=r.dev,pe[i+4>>2]=0,pe[i+8>>2]=r.ino,pe[i+12>>2]=r.mode,pe[i+16>>2]=r.nlink,pe[i+20>>2]=r.uid,pe[i+24>>2]=r.gid,pe[i+28>>2]=r.rdev,pe[i+32>>2]=0,ft=[r.size>>>0,(lt=r.size,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+40>>2]=ft[0],pe[i+44>>2]=ft[1],pe[i+48>>2]=4096,pe[i+52>>2]=r.blocks,pe[i+56>>2]=r.atime.getTime()/1e3|0,pe[i+60>>2]=0,pe[i+64>>2]=r.mtime.getTime()/1e3|0,pe[i+68>>2]=0,pe[i+72>>2]=r.ctime.getTime()/1e3|0,pe[i+76>>2]=0,ft=[r.ino>>>0,(lt=r.ino,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[i+80>>2]=ft[0],pe[i+84>>2]=ft[1],0},doMsync:function(e,t,i,r){var n=new Uint8Array(ce.subarray(e,e+i));Ut.msync(t,n,0,i,r)},doMkdir:function(e,t){return"/"===(e=jt.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),Ut.mkdir(e,t,0),0},doMknod:function(e,t,i){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Ut.mknod(e,t,i),0},doReadlink:function(e,t,i){if(i<=0)return-28;var r=Ut.readlink(e),n=Math.min(i,ae(r)),a=he[t+n];return ne(r,t,i+1),he[t+n]=a,n},doAccess:function(e,t){if(-8&t)return-28;var i;if(!(i=Ut.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&Ut.nodePermissions(i,r)?-2:0},doDup:function(e,t,i){var r=Ut.getStream(i);return r&&Ut.close(r),Ut.open(e,t,0,i,i).fd},doReadv:function(e,t,i,r){for(var n=0,a=0;a>2],o=pe[t+(8*a+4)>>2],l=Ut.read(e,he,s,o,r);if(l<0)return-1;if(n+=l,l>2],o=pe[t+(8*a+4)>>2],l=Ut.write(e,he,s,o,r);if(l<0)return-1;n+=l}return n},varargs:0,get:function(e){return Dt.varargs+=4,pe[Dt.varargs-4>>2]},getStr:function(){return ie(Dt.get())},getStreamFromFD:function(e){void 0===e&&(e=Dt.get());var t=Ut.getStream(e);if(!t)throw new Ut.ErrnoError(8);return t},get64:function(){var e=Dt.get(),t=Dt.get();return W(e>=0?0===t:-1===t),e},getZero:function(){W(0===Dt.get())}};function Ft(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD();switch(Dt.get()){case 0:return(r=Dt.get())<0?-28:Ut.open(i.path,i.flags,0,r).fd;case 1:case 2:return 0;case 3:return i.flags;case 4:var r=Dt.get();return i.flags|=r,0;case 12:r=Dt.get();return de[r+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return St(28),-1;default:return-28}}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Ot(e,t){Dt.varargs=t;try{var i=Dt.getStreamFromFD(),r=Dt.get(),n=Dt.get();return Ut.read(i,he,r,n)}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Lt(e,t){Dt.varargs=t;try{var i=Dt.getStr(),r=Dt.get(),n=Dt.get();return Ut.open(i,r,n).fd}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),-e.errno}}function Bt(){}function Nt(e){try{var t=Dt.getStreamFromFD(e);return Ut.close(t),0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function zt(){return Nt.apply(null,arguments)}function Ht(e,t){try{var i=Dt.getStreamFromFD(e),r=i.tty?2:Ut.isDir(i.mode)?3:Ut.isLink(i.mode)?7:4;return he[t>>0]=r,0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function Vt(){return Ht.apply(null,arguments)}function Yt(e,t,i,r,n){try{var a=Dt.getStreamFromFD(e),s=4294967296*i+(t>>>0);return s<=-9007199254740992||s>=9007199254740992?-61:(Ut.llseek(a,s,r),ft=[a.position>>>0,(lt=a.position,+Xe(lt)>=1?lt>0?(0|Qe(+Ke(lt/4294967296),4294967295))>>>0:~~+Ge((lt-+(~~lt>>>0))/4294967296)>>>0:0)],pe[n>>2]=ft[0],pe[n+4>>2]=ft[1],a.getdents&&0===s&&0===r&&(a.getdents=null),0)}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function qt(){return Yt.apply(null,arguments)}function Wt(e,t,i,r){try{var n=Dt.getStreamFromFD(e),a=Dt.doWritev(n,t,i);return pe[r>>2]=a,0}catch(e){return void 0!==Ut&&e instanceof Ut.ErrnoError||at(e),e.errno}}function Xt(){return Wt.apply(null,arguments)}function Gt(e){delete ni.xhrs[e-1]}function Kt(){at()}function Qt(){return void 0===Qt.start&&(Qt.start=Date.now()),1e3*(Date.now()-Qt.start)|0}function Zt(){at()}function Jt(){return g||"undefined"!=typeof dateNow||"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now}function $t(e,t){var i;if(0===e)i=Date.now();else{if(1!==e||!Jt())return St(28),-1;i=Zt()}return pe[t>>2]=i/1e3|0,pe[t+4>>2]=i%1e3*1e3*1e3|0,0}function ei(){return he.length}function ti(){return!y}function ii(e){try{return N.grow(e-ue.byteLength+65535>>16),Ee(N.buffer),1}catch(t){console.error("emscripten_realloc_buffer: Attempted to grow heap from "+ue.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function ri(e){var t=ei();W(e>t);if(e>2147418112)return k("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147418112 bytes!"),!1;for(var i=Math.max(t,16777216);i>2]=t,me[e+4>>2]=t/4294967296|0},openDatabase:function(e,t,i,r){try{var n=indexedDB.open(e,t)}catch(e){return r(e)}n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains("FILES")&&t.deleteObjectStore("FILES"),t.createObjectStore("FILES")},n.onsuccess=function(e){i(e.target.result)},n.onerror=function(e){r(e)}},staticInit:function(){var e="undefined"==typeof ENVIRONMENT_IS_FETCH_WORKER;ni.openDatabase("emscripten_filesystem",1,(function(t){ni.dbInstance=t,e&&nt("library_fetch_init")}),(function(){ni.dbInstance=!1,e&&nt("library_fetch_init")})),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||rt("library_fetch_init")}};function ai(e,t,i,r,n){var a=me[e+8>>2];if(a){var s=ie(a),o=e+112,l=ie(o);l||(l="GET");me[o+32>>2];var f=me[o+52>>2],u=me[o+56>>2],h=!!me[o+60>>2],c=(me[o+64>>2],me[o+68>>2]),d=me[o+72>>2],_=me[o+76>>2],p=me[o+80>>2],m=me[o+84>>2],b=me[o+88>>2],v=!!(1&f),y=!!(2&f),g=!!(64&f),w=c?ie(c):void 0,E=d?ie(d):void 0,C=p?ie(p):void 0,S=new XMLHttpRequest;if(S.withCredentials=h,S.open(l,s,!g,w,E),g||(S.timeout=u),S.url_=s,W(!y,"streaming uses moz-chunked-arraybuffer which is no longer supported; TODO: rewrite using fetch()"),S.responseType="arraybuffer",p&&S.overrideMimeType(C),_)for(;;){var j=me[_>>2];if(!j)break;var T=me[_+4>>2];if(!T)break;_+=8;var A=ie(j),x=ie(T);S.setRequestHeader(A,x)}ni.xhrs.push(S);var M=ni.xhrs.length;me[e+0>>2]=M;var k=m&&b?ce.slice(m,m+b):null;S.onload=function(r){var n=S.response?S.response.byteLength:0,a=0,s=0;v&&!y&&(a=ya(s=n),ce.set(new Uint8Array(S.response),a)),me[e+12>>2]=a,ni.setu64(e+16,s),ni.setu64(e+24,0),n&&ni.setu64(e+32,n),_e[e+40>>1]=S.readyState,4===S.readyState&&0===S.status&&(S.status=n>0?200:404),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),S.status>=200&&S.status<300?t&&t(e,S,r):i&&i(e,S,r)},S.onerror=function(t){var r=S.status;4===S.readyState&&0===r&&(r=404),me[e+12>>2]=0,ni.setu64(e+16,0),ni.setu64(e+24,0),ni.setu64(e+32,0),_e[e+40>>1]=S.readyState,_e[e+42>>1]=r,i&&i(e,S,t)},S.ontimeout=function(t){i&&i(e,S,t)},S.onprogress=function(t){var i=v&&y&&S.response?S.response.byteLength:0,n=0;v&&y&&(n=ya(i),ce.set(new Uint8Array(S.response),n)),me[e+12>>2]=n,ni.setu64(e+16,i),ni.setu64(e+24,t.loaded-i),ni.setu64(e+32,t.total),_e[e+40>>1]=S.readyState,S.readyState>=3&&0===S.status&&t.loaded>0&&(S.status=200),_e[e+42>>1]=S.status,S.statusText&&ne(S.statusText,e+44,64),r&&r(e,S,t)},S.onreadystatechange=function(t){_e[e+40>>1]=S.readyState,S.readyState>=2&&(_e[e+42>>1]=S.status),n&&n(e,S,t)};try{S.send(k)}catch(t){i&&i(e,S,t)}}else i(e,0,"no url specified!")}function si(e,t,i,r,n){if(e){var a=me[t+112+64>>2];a||(a=me[t+8>>2]);var s=ie(a);try{var o=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(i,s);o.onsuccess=function(e){_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),r(t,0,s)},o.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=413,ne("Payload Too Large",t+44,64),n(t,0,e)}}catch(e){n(t,0,e)}}else n(t,0,"IndexedDB not available!")}function oi(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readonly").objectStore("FILES").get(a);s.onsuccess=function(e){if(e.target.result){var n=e.target.result,a=n.byteLength||n.length,s=ya(a);ce.set(new Uint8Array(n),s),me[t+12>>2]=s,ni.setu64(t+16,a),ni.setu64(t+24,0),ni.setu64(t+32,a),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,n)}else _e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,"no data")},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e)}}catch(e){r(t,0,e)}}else r(t,0,"IndexedDB not available!")}function li(e,t,i,r){if(e){var n=me[t+112+64>>2];n||(n=me[t+8>>2]);var a=ie(n);try{var s=e.transaction(["FILES"],"readwrite").objectStore("FILES").delete(a);s.onsuccess=function(e){var r=e.target.result;me[t+12>>2]=0,ni.setu64(t+16,0),ni.setu64(t+24,0),ni.setu64(t+32,0),_e[t+40>>1]=4,_e[t+42>>1]=200,ne("OK",t+44,64),i(t,0,r)},s.onerror=function(e){_e[t+40>>1]=4,_e[t+42>>1]=404,ne("Not Found",t+44,64),r(t,0,e)}}catch(e){r(t,0,e)}}else r(t,0,"IndexedDB not available!")}function fi(e,t,i,r,n){void 0!==B&&(B=!0);var a=e+112,s=ie(a),o=me[a+36>>2],l=me[a+40>>2],f=me[a+44>>2],u=me[a+48>>2],h=me[a+52>>2],c=!!(4&h),d=!!(32&h),_=!!(16&h),p=function(e,i,r){o?Ca(o,e):t&&t(e)},m=function(e,t,i){f?Ca(f,e):r&&r(e)},b=function(e,t,r){l?Ca(l,e):i&&i(e)},v=function(e,t,i){u?Ca(u,e):n&&n(e)},y=function(e,i,r){si(ni.dbInstance,e,i.response,(function(e,i,r){o?Ca(o,e):t&&t(e)}),(function(e,i,r){o?Ca(o,e):t&&t(e)}))};if("EM_IDB_STORE"===s){var g=me[a+84>>2];si(ni.dbInstance,e,ce.slice(g,g+me[a+88>>2]),p,b)}else if("EM_IDB_DELETE"===s)li(ni.dbInstance,e,p,b);else if(_){if(d)return 0;ai(e,c?y:p,b,m,v)}else oi(ni.dbInstance,e,p,d?b:c?function(e,t,i){ai(e,y,b,m,v)}:function(e,t,i){ai(e,p,b,m,v)});return e}var ui=Xe;function hi(e){return 0===e?0:(e=ie(e),wt.hasOwnProperty(e)?(hi.ret&&va(hi.ret),hi.ret=se(wt[e]),hi.ret):0)}function ci(e){var t=Date.now();return pe[e>>2]=t/1e3|0,pe[e+4>>2]=t%1e3*1e3|0,0}var di=(ne("GMT",1126928,4),1126928);function _i(e,t){var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getUTCSeconds(),pe[t+4>>2]=i.getUTCMinutes(),pe[t+8>>2]=i.getUTCHours(),pe[t+12>>2]=i.getUTCDate(),pe[t+16>>2]=i.getUTCMonth(),pe[t+20>>2]=i.getUTCFullYear()-1900,pe[t+24>>2]=i.getUTCDay(),pe[t+36>>2]=0,pe[t+32>>2]=0;var r=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),n=(i.getTime()-r)/864e5|0;return pe[t+28>>2]=n,pe[t+40>>2]=di,t}function pi(e){return Math.pow(2,e)}function mi(e){return pi(e)}function bi(e){return Math.log(e)/Math.LN2}function vi(e){var t=yi,i=t.LLVM_SAVEDSTACKS[e];t.LLVM_SAVEDSTACKS.splice(e,1),wa(i)}function yi(){var e=yi;return e.LLVM_SAVEDSTACKS||(e.LLVM_SAVEDSTACKS=[]),e.LLVM_SAVEDSTACKS.push(Ea()),e.LLVM_SAVEDSTACKS.length-1}var gi=Ze;function wi(){if(!wi.called){wi.called=!0,pe[ma()>>2]=60*(new Date).getTimezoneOffset();var e=(new Date).getFullYear(),t=new Date(e,0,1),i=new Date(e,6,1);pe[pa()>>2]=Number(t.getTimezoneOffset()!=i.getTimezoneOffset());var r=o(t),n=o(i),a=J(Ni(r),"i8",Q),s=J(Ni(n),"i8",Q);i.getTimezoneOffset()>2]=a,pe[ba()+4>>2]=s):(pe[ba()>>2]=s,pe[ba()+4>>2]=a)}function o(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}}function Ei(e,t){wi();var i=new Date(1e3*pe[e>>2]);pe[t>>2]=i.getSeconds(),pe[t+4>>2]=i.getMinutes(),pe[t+8>>2]=i.getHours(),pe[t+12>>2]=i.getDate(),pe[t+16>>2]=i.getMonth(),pe[t+20>>2]=i.getFullYear()-1900,pe[t+24>>2]=i.getDay();var r=new Date(i.getFullYear(),0,1),n=(i.getTime()-r.getTime())/864e5|0;pe[t+28>>2]=n,pe[t+36>>2]=-60*i.getTimezoneOffset();var a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),s=r.getTimezoneOffset(),o=0|(a!=s&&i.getTimezoneOffset()==Math.min(s,a));pe[t+32>>2]=o;var l=pe[ba()+(o?4:0)>>2];return pe[t+40>>2]=l,t}function Ci(e,t,i){ce.set(ce.subarray(t,t+i),e)}function Si(e){var t=e/1e3;if((v||y)&&self.performance&&self.performance.now)for(var i=self.performance.now();self.performance.now()-i>2],r=pe[e+4>>2];return r<0||r>999999999||i<0?(St(28),-1):(0!==t&&(pe[t>>2]=0,pe[t+4>>2]=0),Si(1e6*i+r/1e3))}function Ti(){return 0}function Ai(){return 0}function xi(){return 6}function Mi(){}function ki(e){return e%4==0&&(e%100!=0||e%400==0)}function Pi(e,t){for(var i=0,r=0;r<=t;i+=e[r++]);return i}var Ii=[31,29,31,30,31,30,31,31,30,31,30,31],Ri=[31,28,31,30,31,30,31,31,30,31,30,31];function Ui(e,t){for(var i=new Date(e.getTime());t>0;){var r=ki(i.getFullYear()),n=i.getMonth(),a=(r?Ii:Ri)[n];if(!(t>a-i.getDate()))return i.setDate(i.getDate()+t),i;t-=a-i.getDate()+1,i.setDate(1),n<11?i.setMonth(n+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1))}return i}function Di(e,t,i,r){var n=pe[r+40>>2],a={tm_sec:pe[r>>2],tm_min:pe[r+4>>2],tm_hour:pe[r+8>>2],tm_mday:pe[r+12>>2],tm_mon:pe[r+16>>2],tm_year:pe[r+20>>2],tm_wday:pe[r+24>>2],tm_yday:pe[r+28>>2],tm_isdst:pe[r+32>>2],tm_gmtoff:pe[r+36>>2],tm_zone:n?ie(n):""},s=ie(i),o={"%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","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in o)s=s.replace(new RegExp(l,"g"),o[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(e,t,i){for(var r="number"==typeof e?e.toString():e||"";r.length0?1:0}var r;return 0===(r=i(e.getFullYear()-t.getFullYear()))&&0===(r=i(e.getMonth()-t.getMonth()))&&(r=i(e.getDate()-t.getDate())),r}function _(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 p(e){var t=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday),i=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),n=_(i),a=_(r);return d(n,t)<=0?d(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return f[e.tm_wday].substring(0,3)},"%A":function(e){return f[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return c((e.tm_year+1900)/100|0,2)},"%d":function(e){return c(e.tm_mday,2)},"%e":function(e){return h(e.tm_mday,2," ")},"%g":function(e){return p(e).toString().substring(2)},"%G":function(e){return p(e)},"%H":function(e){return c(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),c(t,2)},"%j":function(e){return c(e.tm_mday+Pi(ki(e.tm_year+1900)?Ii:Ri,e.tm_mon-1),3)},"%m":function(e){return c(e.tm_mon+1,2)},"%M":function(e){return c(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 c(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),i=0===t.getDay()?t:Ui(t,7-t.getDay()),r=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(d(i,r)<0){var n=Pi(ki(r.getFullYear())?Ii:Ri,r.getMonth()-1)-31,a=31-i.getDate()+n+r.getDate();return c(Math.ceil(a/7),2)}return 0===d(i,t)?"01":"00"},"%V":function(e){var t,i=new Date(e.tm_year+1900,0,4),r=new Date(e.tm_year+1901,0,4),n=_(i),a=_(r),s=Ui(new Date(e.tm_year+1900,0,1),e.tm_yday);return d(s,n)<0?"53":d(a,s)<=0?"01":(t=n.getFullYear()=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(i?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in m)s.indexOf(l)>=0&&(s=s.replace(new RegExp(l,"g"),m[l](a)));var b=Ni(s,!1);return b.length>t?0:(le(b,e),b.length-1)}function Fi(e){switch(e){case 30:return ye;case 85:return 2147418112/ye;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===("undefined"==typeof navigator?"undefined":u(navigator))&&navigator.hardwareConcurrency||1}return St(28),-1}function Oi(e){var t=Date.now()/1e3|0;return e&&(pe[e>>2]=t),t}if(Ut.staticInit(),w){var Li=e("fs"),Bi=e("path");Pt.staticInit()}function Ni(e,t,i){var r=i>0?i:ae(e)+1,n=new Array(r),a=re(e,n,0,n.length);return t&&(n.length=a),n}Zt=g?function(){var e=i.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof dateNow?dateNow:"object"===("undefined"==typeof performance?"undefined":u(performance))&&performance&&"function"==typeof performance.now?function(){return performance.now()}:Date.now,ni.staticInit();var zi=[0,"jsCall_dd_0","jsCall_dd_1","jsCall_dd_2","jsCall_dd_3","jsCall_dd_4","jsCall_dd_5","jsCall_dd_6","jsCall_dd_7","jsCall_dd_8","jsCall_dd_9","jsCall_dd_10","jsCall_dd_11","jsCall_dd_12","jsCall_dd_13","jsCall_dd_14","jsCall_dd_15","jsCall_dd_16","jsCall_dd_17","jsCall_dd_18","jsCall_dd_19","jsCall_dd_20","jsCall_dd_21","jsCall_dd_22","jsCall_dd_23","jsCall_dd_24","jsCall_dd_25","jsCall_dd_26","jsCall_dd_27","jsCall_dd_28","jsCall_dd_29","jsCall_dd_30","jsCall_dd_31","jsCall_dd_32","jsCall_dd_33","jsCall_dd_34","_sinh","_cosh","_tanh","_sin","_cos","_tan","_atan","_asin","_acos","_exp","_log","_fabs","_etime",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Hi=[0,"jsCall_did_0","jsCall_did_1","jsCall_did_2","jsCall_did_3","jsCall_did_4","jsCall_did_5","jsCall_did_6","jsCall_did_7","jsCall_did_8","jsCall_did_9","jsCall_did_10","jsCall_did_11","jsCall_did_12","jsCall_did_13","jsCall_did_14","jsCall_did_15","jsCall_did_16","jsCall_did_17","jsCall_did_18","jsCall_did_19","jsCall_did_20","jsCall_did_21","jsCall_did_22","jsCall_did_23","jsCall_did_24","jsCall_did_25","jsCall_did_26","jsCall_did_27","jsCall_did_28","jsCall_did_29","jsCall_did_30","jsCall_did_31","jsCall_did_32","jsCall_did_33","jsCall_did_34",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,0],Vi=[0,"jsCall_didd_0","jsCall_didd_1","jsCall_didd_2","jsCall_didd_3","jsCall_didd_4","jsCall_didd_5","jsCall_didd_6","jsCall_didd_7","jsCall_didd_8","jsCall_didd_9","jsCall_didd_10","jsCall_didd_11","jsCall_didd_12","jsCall_didd_13","jsCall_didd_14","jsCall_didd_15","jsCall_didd_16","jsCall_didd_17","jsCall_didd_18","jsCall_didd_19","jsCall_didd_20","jsCall_didd_21","jsCall_didd_22","jsCall_didd_23","jsCall_didd_24","jsCall_didd_25","jsCall_didd_26","jsCall_didd_27","jsCall_didd_28","jsCall_didd_29","jsCall_didd_30","jsCall_didd_31","jsCall_didd_32","jsCall_didd_33","jsCall_didd_34",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,0],Yi=[0,"jsCall_fii_0","jsCall_fii_1","jsCall_fii_2","jsCall_fii_3","jsCall_fii_4","jsCall_fii_5","jsCall_fii_6","jsCall_fii_7","jsCall_fii_8","jsCall_fii_9","jsCall_fii_10","jsCall_fii_11","jsCall_fii_12","jsCall_fii_13","jsCall_fii_14","jsCall_fii_15","jsCall_fii_16","jsCall_fii_17","jsCall_fii_18","jsCall_fii_19","jsCall_fii_20","jsCall_fii_21","jsCall_fii_22","jsCall_fii_23","jsCall_fii_24","jsCall_fii_25","jsCall_fii_26","jsCall_fii_27","jsCall_fii_28","jsCall_fii_29","jsCall_fii_30","jsCall_fii_31","jsCall_fii_32","jsCall_fii_33","jsCall_fii_34","_sbr_sum_square_c",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],qi=[0,"jsCall_fiii_0","jsCall_fiii_1","jsCall_fiii_2","jsCall_fiii_3","jsCall_fiii_4","jsCall_fiii_5","jsCall_fiii_6","jsCall_fiii_7","jsCall_fiii_8","jsCall_fiii_9","jsCall_fiii_10","jsCall_fiii_11","jsCall_fiii_12","jsCall_fiii_13","jsCall_fiii_14","jsCall_fiii_15","jsCall_fiii_16","jsCall_fiii_17","jsCall_fiii_18","jsCall_fiii_19","jsCall_fiii_20","jsCall_fiii_21","jsCall_fiii_22","jsCall_fiii_23","jsCall_fiii_24","jsCall_fiii_25","jsCall_fiii_26","jsCall_fiii_27","jsCall_fiii_28","jsCall_fiii_29","jsCall_fiii_30","jsCall_fiii_31","jsCall_fiii_32","jsCall_fiii_33","jsCall_fiii_34","_avpriv_scalarproduct_float_c",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],Wi=[0,"jsCall_ii_0","jsCall_ii_1","jsCall_ii_2","jsCall_ii_3","jsCall_ii_4","jsCall_ii_5","jsCall_ii_6","jsCall_ii_7","jsCall_ii_8","jsCall_ii_9","jsCall_ii_10","jsCall_ii_11","jsCall_ii_12","jsCall_ii_13","jsCall_ii_14","jsCall_ii_15","jsCall_ii_16","jsCall_ii_17","jsCall_ii_18","jsCall_ii_19","jsCall_ii_20","jsCall_ii_21","jsCall_ii_22","jsCall_ii_23","jsCall_ii_24","jsCall_ii_25","jsCall_ii_26","jsCall_ii_27","jsCall_ii_28","jsCall_ii_29","jsCall_ii_30","jsCall_ii_31","jsCall_ii_32","jsCall_ii_33","jsCall_ii_34","_av_default_item_name","_ff_avio_child_class_next","_flv_probe","_flv_read_header","_flv_read_close","_live_flv_probe","_mov_probe","_mov_read_header","_mov_read_close","_mpegts_probe","_mpegts_read_header","_mpegts_read_close","_format_to_name","_format_child_class_next","_get_category","_urlcontext_to_name","_ff_urlcontext_child_class_next","_sws_context_to_name","_ff_bsf_child_class_next","_hevc_mp4toannexb_init","_hevc_init_thread_copy","_hevc_decode_init","_hevc_decode_free","_context_to_name","_codec_child_class_next","_get_category_2282","_aac_decode_init","_aac_decode_close","_init","___stdio_close","___emscripten_stdout_close","_releaseSniffStreamFunc","_hflv_releaseFunc","_hflv_getBufferLength","_initializeDecoderFunc","__getFrame","_closeVideoFunc","_releaseFunc","_initializeDemuxerFunc","_getPacketFunc","_releaseDemuxerFunc","_io_short_seek","_avio_rb16","_avio_rl16","_av_buffer_allocz","_frame_worker_thread","_av_buffer_alloc","_thread_worker",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Xi=[0,"jsCall_iid_0","jsCall_iid_1","jsCall_iid_2","jsCall_iid_3","jsCall_iid_4","jsCall_iid_5","jsCall_iid_6","jsCall_iid_7","jsCall_iid_8","jsCall_iid_9","jsCall_iid_10","jsCall_iid_11","jsCall_iid_12","jsCall_iid_13","jsCall_iid_14","jsCall_iid_15","jsCall_iid_16","jsCall_iid_17","jsCall_iid_18","jsCall_iid_19","jsCall_iid_20","jsCall_iid_21","jsCall_iid_22","jsCall_iid_23","jsCall_iid_24","jsCall_iid_25","jsCall_iid_26","jsCall_iid_27","jsCall_iid_28","jsCall_iid_29","jsCall_iid_30","jsCall_iid_31","jsCall_iid_32","jsCall_iid_33","jsCall_iid_34","_seekBufferFunc",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],Gi=[0,"jsCall_iidiiii_0","jsCall_iidiiii_1","jsCall_iidiiii_2","jsCall_iidiiii_3","jsCall_iidiiii_4","jsCall_iidiiii_5","jsCall_iidiiii_6","jsCall_iidiiii_7","jsCall_iidiiii_8","jsCall_iidiiii_9","jsCall_iidiiii_10","jsCall_iidiiii_11","jsCall_iidiiii_12","jsCall_iidiiii_13","jsCall_iidiiii_14","jsCall_iidiiii_15","jsCall_iidiiii_16","jsCall_iidiiii_17","jsCall_iidiiii_18","jsCall_iidiiii_19","jsCall_iidiiii_20","jsCall_iidiiii_21","jsCall_iidiiii_22","jsCall_iidiiii_23","jsCall_iidiiii_24","jsCall_iidiiii_25","jsCall_iidiiii_26","jsCall_iidiiii_27","jsCall_iidiiii_28","jsCall_iidiiii_29","jsCall_iidiiii_30","jsCall_iidiiii_31","jsCall_iidiiii_32","jsCall_iidiiii_33","jsCall_iidiiii_34","_fmt_fp",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],Ki=[0,"jsCall_iii_0","jsCall_iii_1","jsCall_iii_2","jsCall_iii_3","jsCall_iii_4","jsCall_iii_5","jsCall_iii_6","jsCall_iii_7","jsCall_iii_8","jsCall_iii_9","jsCall_iii_10","jsCall_iii_11","jsCall_iii_12","jsCall_iii_13","jsCall_iii_14","jsCall_iii_15","jsCall_iii_16","jsCall_iii_17","jsCall_iii_18","jsCall_iii_19","jsCall_iii_20","jsCall_iii_21","jsCall_iii_22","jsCall_iii_23","jsCall_iii_24","jsCall_iii_25","jsCall_iii_26","jsCall_iii_27","jsCall_iii_28","jsCall_iii_29","jsCall_iii_30","jsCall_iii_31","jsCall_iii_32","jsCall_iii_33","jsCall_iii_34","_ff_avio_child_next","_flv_read_packet","_mov_read_packet","_mpegts_read_packet","_mpegts_raw_read_packet","_format_child_next","_urlcontext_child_next","_bsf_child_next","_hevc_mp4toannexb_filter","_hevc_update_thread_context","_null_filter","_codec_child_next","_initSniffStreamFunc","_hflv_initFunc","_hflv_getPacketFunc","_io_read_pause","_descriptor_compare","_hls_decode_entry","_avcodec_default_get_format","_ff_startcode_find_candidate_c","_color_table_compare",0,0,0,0,0,0,0],Qi=[0,"jsCall_iiii_0","jsCall_iiii_1","jsCall_iiii_2","jsCall_iiii_3","jsCall_iiii_4","jsCall_iiii_5","jsCall_iiii_6","jsCall_iiii_7","jsCall_iiii_8","jsCall_iiii_9","jsCall_iiii_10","jsCall_iiii_11","jsCall_iiii_12","jsCall_iiii_13","jsCall_iiii_14","jsCall_iiii_15","jsCall_iiii_16","jsCall_iiii_17","jsCall_iiii_18","jsCall_iiii_19","jsCall_iiii_20","jsCall_iiii_21","jsCall_iiii_22","jsCall_iiii_23","jsCall_iiii_24","jsCall_iiii_25","jsCall_iiii_26","jsCall_iiii_27","jsCall_iiii_28","jsCall_iiii_29","jsCall_iiii_30","jsCall_iiii_31","jsCall_iiii_32","jsCall_iiii_33","jsCall_iiii_34","_mov_read_aclr","_mov_read_avid","_mov_read_ares","_mov_read_avss","_mov_read_av1c","_mov_read_chpl","_mov_read_stco","_mov_read_colr","_mov_read_ctts","_mov_read_default","_mov_read_dpxe","_mov_read_dref","_mov_read_elst","_mov_read_enda","_mov_read_fiel","_mov_read_adrm","_mov_read_ftyp","_mov_read_glbl","_mov_read_hdlr","_mov_read_ilst","_mov_read_jp2h","_mov_read_mdat","_mov_read_mdhd","_mov_read_meta","_mov_read_moof","_mov_read_moov","_mov_read_mvhd","_mov_read_svq3","_mov_read_alac","_mov_read_pasp","_mov_read_sidx","_mov_read_stps","_mov_read_strf","_mov_read_stsc","_mov_read_stsd","_mov_read_stss","_mov_read_stsz","_mov_read_stts","_mov_read_tkhd","_mov_read_tfdt","_mov_read_tfhd","_mov_read_trak","_mov_read_tmcd","_mov_read_chap","_mov_read_trex","_mov_read_trun","_mov_read_wave","_mov_read_esds","_mov_read_dac3","_mov_read_dec3","_mov_read_ddts","_mov_read_wide","_mov_read_wfex","_mov_read_cmov","_mov_read_chan","_mov_read_dvc1","_mov_read_sbgp","_mov_read_uuid","_mov_read_targa_y216","_mov_read_free","_mov_read_custom","_mov_read_frma","_mov_read_senc","_mov_read_saiz","_mov_read_saio","_mov_read_pssh","_mov_read_schm","_mov_read_tenc","_mov_read_dfla","_mov_read_st3d","_mov_read_sv3d","_mov_read_dops","_mov_read_smdm","_mov_read_coll","_mov_read_vpcc","_mov_read_mdcv","_mov_read_clli","_h264_split","_hevc_split","___stdio_write","_sn_write","_read_stream_live","_read_stream_vod","_getSniffStreamPacketFunc","_hflv_read_stream_live","_setCodecTypeFunc","_read_packet","_io_write_packet","_io_read_packet","_dyn_buf_write","_mov_read_keys","_mov_read_udta_string","_avcodec_default_get_buffer2","_do_read",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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Zi=[0,"jsCall_iiiii_0","jsCall_iiiii_1","jsCall_iiiii_2","jsCall_iiiii_3","jsCall_iiiii_4","jsCall_iiiii_5","jsCall_iiiii_6","jsCall_iiiii_7","jsCall_iiiii_8","jsCall_iiiii_9","jsCall_iiiii_10","jsCall_iiiii_11","jsCall_iiiii_12","jsCall_iiiii_13","jsCall_iiiii_14","jsCall_iiiii_15","jsCall_iiiii_16","jsCall_iiiii_17","jsCall_iiiii_18","jsCall_iiiii_19","jsCall_iiiii_20","jsCall_iiiii_21","jsCall_iiiii_22","jsCall_iiiii_23","jsCall_iiiii_24","jsCall_iiiii_25","jsCall_iiiii_26","jsCall_iiiii_27","jsCall_iiiii_28","jsCall_iiiii_29","jsCall_iiiii_30","jsCall_iiiii_31","jsCall_iiiii_32","jsCall_iiiii_33","jsCall_iiiii_34","_hevc_decode_frame","_aac_decode_frame","_hflv_pushBufferFunc","_demuxBoxFunc","_mov_metadata_int8_no_padding","_mov_metadata_track_or_disc_number","_mov_metadata_gnre","_mov_metadata_int8_bypass_padding","_lum_planar_vscale","_chr_planar_vscale","_any_vscale","_packed_vscale","_gamma_convert","_lum_convert","_lum_h_scale","_chr_convert","_chr_h_scale","_no_chr_scale","_hls_decode_entry_wpp",0,0,0,0,0,0,0,0,0],Ji=[0,"jsCall_iiiiii_0","jsCall_iiiiii_1","jsCall_iiiiii_2","jsCall_iiiiii_3","jsCall_iiiiii_4","jsCall_iiiiii_5","jsCall_iiiiii_6","jsCall_iiiiii_7","jsCall_iiiiii_8","jsCall_iiiiii_9","jsCall_iiiiii_10","jsCall_iiiiii_11","jsCall_iiiiii_12","jsCall_iiiiii_13","jsCall_iiiiii_14","jsCall_iiiiii_15","jsCall_iiiiii_16","jsCall_iiiiii_17","jsCall_iiiiii_18","jsCall_iiiiii_19","jsCall_iiiiii_20","jsCall_iiiiii_21","jsCall_iiiiii_22","jsCall_iiiiii_23","jsCall_iiiiii_24","jsCall_iiiiii_25","jsCall_iiiiii_26","jsCall_iiiiii_27","jsCall_iiiiii_28","jsCall_iiiiii_29","jsCall_iiiiii_30","jsCall_iiiiii_31","jsCall_iiiiii_32","jsCall_iiiiii_33","jsCall_iiiiii_34","_pushBufferFunc","_decodeCodecContextFunc","_io_open_default","_avcodec_default_execute2","_thread_execute2","_sbr_lf_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],$i=[0,"jsCall_iiiiiii_0","jsCall_iiiiiii_1","jsCall_iiiiiii_2","jsCall_iiiiiii_3","jsCall_iiiiiii_4","jsCall_iiiiiii_5","jsCall_iiiiiii_6","jsCall_iiiiiii_7","jsCall_iiiiiii_8","jsCall_iiiiiii_9","jsCall_iiiiiii_10","jsCall_iiiiiii_11","jsCall_iiiiiii_12","jsCall_iiiiiii_13","jsCall_iiiiiii_14","jsCall_iiiiiii_15","jsCall_iiiiiii_16","jsCall_iiiiiii_17","jsCall_iiiiiii_18","jsCall_iiiiiii_19","jsCall_iiiiiii_20","jsCall_iiiiiii_21","jsCall_iiiiiii_22","jsCall_iiiiiii_23","jsCall_iiiiiii_24","jsCall_iiiiiii_25","jsCall_iiiiiii_26","jsCall_iiiiiii_27","jsCall_iiiiiii_28","jsCall_iiiiiii_29","jsCall_iiiiiii_30","jsCall_iiiiiii_31","jsCall_iiiiiii_32","jsCall_iiiiiii_33","jsCall_iiiiiii_34","_h264_parse","_hevc_parse","_hflv_decodeVideoFrameFunc","_avcodec_default_execute","_thread_execute","_sbr_x_gen",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],er=[0,"jsCall_iiiiiiii_0","jsCall_iiiiiiii_1","jsCall_iiiiiiii_2","jsCall_iiiiiiii_3","jsCall_iiiiiiii_4","jsCall_iiiiiiii_5","jsCall_iiiiiiii_6","jsCall_iiiiiiii_7","jsCall_iiiiiiii_8","jsCall_iiiiiiii_9","jsCall_iiiiiiii_10","jsCall_iiiiiiii_11","jsCall_iiiiiiii_12","jsCall_iiiiiiii_13","jsCall_iiiiiiii_14","jsCall_iiiiiiii_15","jsCall_iiiiiiii_16","jsCall_iiiiiiii_17","jsCall_iiiiiiii_18","jsCall_iiiiiiii_19","jsCall_iiiiiiii_20","jsCall_iiiiiiii_21","jsCall_iiiiiiii_22","jsCall_iiiiiiii_23","jsCall_iiiiiiii_24","jsCall_iiiiiiii_25","jsCall_iiiiiiii_26","jsCall_iiiiiiii_27","jsCall_iiiiiiii_28","jsCall_iiiiiiii_29","jsCall_iiiiiiii_30","jsCall_iiiiiiii_31","jsCall_iiiiiiii_32","jsCall_iiiiiiii_33","jsCall_iiiiiiii_34","_decodeVideoFrameFunc","_setSniffStreamCodecTypeFunc","_hflv_setSniffStreamCodecTypeFunc","_swscale","_ff_sws_alphablendaway","_yuv2rgb_c_32","_yuva2rgba_c","_yuv2rgb_c_bgr48","_yuv2rgb_c_48","_yuva2argb_c","_yuv2rgb_c_24_rgb","_yuv2rgb_c_24_bgr","_yuv2rgb_c_16_ordered_dither","_yuv2rgb_c_15_ordered_dither","_yuv2rgb_c_12_ordered_dither","_yuv2rgb_c_8_ordered_dither","_yuv2rgb_c_4_ordered_dither","_yuv2rgb_c_4b_ordered_dither","_yuv2rgb_c_1_ordered_dither","_planarToP01xWrapper","_planar8ToP01xleWrapper","_yvu9ToYv12Wrapper","_bgr24ToYv12Wrapper","_rgbToRgbWrapper","_planarRgbToplanarRgbWrapper","_planarRgbToRgbWrapper","_planarRgbaToRgbWrapper","_Rgb16ToPlanarRgb16Wrapper","_planarRgb16ToRgb16Wrapper","_rgbToPlanarRgbWrapper","_bayer_to_rgb24_wrapper","_bayer_to_yv12_wrapper","_bswap_16bpc","_palToRgbWrapper","_yuv422pToYuy2Wrapper","_yuv422pToUyvyWrapper","_uint_y_to_float_y_wrapper","_float_y_to_uint_y_wrapper","_planarToYuy2Wrapper","_planarToUyvyWrapper","_yuyvToYuv420Wrapper","_uyvyToYuv420Wrapper","_yuyvToYuv422Wrapper","_uyvyToYuv422Wrapper","_packedCopyWrapper","_planarCopyWrapper","_planarToNv12Wrapper","_planarToNv24Wrapper","_nv12ToPlanarWrapper","_nv24ToPlanarWrapper",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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],tr=[0,"jsCall_iiiiij_0","jsCall_iiiiij_1","jsCall_iiiiij_2","jsCall_iiiiij_3","jsCall_iiiiij_4","jsCall_iiiiij_5","jsCall_iiiiij_6","jsCall_iiiiij_7","jsCall_iiiiij_8","jsCall_iiiiij_9","jsCall_iiiiij_10","jsCall_iiiiij_11","jsCall_iiiiij_12","jsCall_iiiiij_13","jsCall_iiiiij_14","jsCall_iiiiij_15","jsCall_iiiiij_16","jsCall_iiiiij_17","jsCall_iiiiij_18","jsCall_iiiiij_19","jsCall_iiiiij_20","jsCall_iiiiij_21","jsCall_iiiiij_22","jsCall_iiiiij_23","jsCall_iiiiij_24","jsCall_iiiiij_25","jsCall_iiiiij_26","jsCall_iiiiij_27","jsCall_iiiiij_28","jsCall_iiiiij_29","jsCall_iiiiij_30","jsCall_iiiiij_31","jsCall_iiiiij_32","jsCall_iiiiij_33","jsCall_iiiiij_34","_mpegts_push_data",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],ir=[0,"jsCall_iiiji_0","jsCall_iiiji_1","jsCall_iiiji_2","jsCall_iiiji_3","jsCall_iiiji_4","jsCall_iiiji_5","jsCall_iiiji_6","jsCall_iiiji_7","jsCall_iiiji_8","jsCall_iiiji_9","jsCall_iiiji_10","jsCall_iiiji_11","jsCall_iiiji_12","jsCall_iiiji_13","jsCall_iiiji_14","jsCall_iiiji_15","jsCall_iiiji_16","jsCall_iiiji_17","jsCall_iiiji_18","jsCall_iiiji_19","jsCall_iiiji_20","jsCall_iiiji_21","jsCall_iiiji_22","jsCall_iiiji_23","jsCall_iiiji_24","jsCall_iiiji_25","jsCall_iiiji_26","jsCall_iiiji_27","jsCall_iiiji_28","jsCall_iiiji_29","jsCall_iiiji_30","jsCall_iiiji_31","jsCall_iiiji_32","jsCall_iiiji_33","jsCall_iiiji_34","_flv_read_seek","_mov_read_seek",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],rr=[0,"jsCall_iiijjji_0","jsCall_iiijjji_1","jsCall_iiijjji_2","jsCall_iiijjji_3","jsCall_iiijjji_4","jsCall_iiijjji_5","jsCall_iiijjji_6","jsCall_iiijjji_7","jsCall_iiijjji_8","jsCall_iiijjji_9","jsCall_iiijjji_10","jsCall_iiijjji_11","jsCall_iiijjji_12","jsCall_iiijjji_13","jsCall_iiijjji_14","jsCall_iiijjji_15","jsCall_iiijjji_16","jsCall_iiijjji_17","jsCall_iiijjji_18","jsCall_iiijjji_19","jsCall_iiijjji_20","jsCall_iiijjji_21","jsCall_iiijjji_22","jsCall_iiijjji_23","jsCall_iiijjji_24","jsCall_iiijjji_25","jsCall_iiijjji_26","jsCall_iiijjji_27","jsCall_iiijjji_28","jsCall_iiijjji_29","jsCall_iiijjji_30","jsCall_iiijjji_31","jsCall_iiijjji_32","jsCall_iiijjji_33","jsCall_iiijjji_34",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,0],nr=[0,"jsCall_jiiij_0","jsCall_jiiij_1","jsCall_jiiij_2","jsCall_jiiij_3","jsCall_jiiij_4","jsCall_jiiij_5","jsCall_jiiij_6","jsCall_jiiij_7","jsCall_jiiij_8","jsCall_jiiij_9","jsCall_jiiij_10","jsCall_jiiij_11","jsCall_jiiij_12","jsCall_jiiij_13","jsCall_jiiij_14","jsCall_jiiij_15","jsCall_jiiij_16","jsCall_jiiij_17","jsCall_jiiij_18","jsCall_jiiij_19","jsCall_jiiij_20","jsCall_jiiij_21","jsCall_jiiij_22","jsCall_jiiij_23","jsCall_jiiij_24","jsCall_jiiij_25","jsCall_jiiij_26","jsCall_jiiij_27","jsCall_jiiij_28","jsCall_jiiij_29","jsCall_jiiij_30","jsCall_jiiij_31","jsCall_jiiij_32","jsCall_jiiij_33","jsCall_jiiij_34","_mpegts_get_dts",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],ar=[0,"jsCall_jiiji_0","jsCall_jiiji_1","jsCall_jiiji_2","jsCall_jiiji_3","jsCall_jiiji_4","jsCall_jiiji_5","jsCall_jiiji_6","jsCall_jiiji_7","jsCall_jiiji_8","jsCall_jiiji_9","jsCall_jiiji_10","jsCall_jiiji_11","jsCall_jiiji_12","jsCall_jiiji_13","jsCall_jiiji_14","jsCall_jiiji_15","jsCall_jiiji_16","jsCall_jiiji_17","jsCall_jiiji_18","jsCall_jiiji_19","jsCall_jiiji_20","jsCall_jiiji_21","jsCall_jiiji_22","jsCall_jiiji_23","jsCall_jiiji_24","jsCall_jiiji_25","jsCall_jiiji_26","jsCall_jiiji_27","jsCall_jiiji_28","jsCall_jiiji_29","jsCall_jiiji_30","jsCall_jiiji_31","jsCall_jiiji_32","jsCall_jiiji_33","jsCall_jiiji_34","_io_read_seek",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],sr=[0,"jsCall_jiji_0","jsCall_jiji_1","jsCall_jiji_2","jsCall_jiji_3","jsCall_jiji_4","jsCall_jiji_5","jsCall_jiji_6","jsCall_jiji_7","jsCall_jiji_8","jsCall_jiji_9","jsCall_jiji_10","jsCall_jiji_11","jsCall_jiji_12","jsCall_jiji_13","jsCall_jiji_14","jsCall_jiji_15","jsCall_jiji_16","jsCall_jiji_17","jsCall_jiji_18","jsCall_jiji_19","jsCall_jiji_20","jsCall_jiji_21","jsCall_jiji_22","jsCall_jiji_23","jsCall_jiji_24","jsCall_jiji_25","jsCall_jiji_26","jsCall_jiji_27","jsCall_jiji_28","jsCall_jiji_29","jsCall_jiji_30","jsCall_jiji_31","jsCall_jiji_32","jsCall_jiji_33","jsCall_jiji_34","___stdio_seek","___emscripten_stdout_seek","_seek_in_buffer","_io_seek","_dyn_buf_seek",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],or=[0,"jsCall_v_0","jsCall_v_1","jsCall_v_2","jsCall_v_3","jsCall_v_4","jsCall_v_5","jsCall_v_6","jsCall_v_7","jsCall_v_8","jsCall_v_9","jsCall_v_10","jsCall_v_11","jsCall_v_12","jsCall_v_13","jsCall_v_14","jsCall_v_15","jsCall_v_16","jsCall_v_17","jsCall_v_18","jsCall_v_19","jsCall_v_20","jsCall_v_21","jsCall_v_22","jsCall_v_23","jsCall_v_24","jsCall_v_25","jsCall_v_26","jsCall_v_27","jsCall_v_28","jsCall_v_29","jsCall_v_30","jsCall_v_31","jsCall_v_32","jsCall_v_33","jsCall_v_34","_init_ff_cos_tabs_16","_init_ff_cos_tabs_32","_init_ff_cos_tabs_64","_init_ff_cos_tabs_128","_init_ff_cos_tabs_256","_init_ff_cos_tabs_512","_init_ff_cos_tabs_1024","_init_ff_cos_tabs_2048","_init_ff_cos_tabs_4096","_init_ff_cos_tabs_8192","_init_ff_cos_tabs_16384","_init_ff_cos_tabs_32768","_init_ff_cos_tabs_65536","_init_ff_cos_tabs_131072","_introduce_mine","_introduceMineFunc","_av_format_init_next","_av_codec_init_static","_av_codec_init_next","_aac_static_table_init","_AV_CRC_8_ATM_init_table_once","_AV_CRC_8_EBU_init_table_once","_AV_CRC_16_ANSI_init_table_once","_AV_CRC_16_CCITT_init_table_once","_AV_CRC_24_IEEE_init_table_once","_AV_CRC_32_IEEE_init_table_once","_AV_CRC_32_IEEE_LE_init_table_once","_AV_CRC_16_ANSI_LE_init_table_once"],lr=[0,"jsCall_vdiidiiiii_0","jsCall_vdiidiiiii_1","jsCall_vdiidiiiii_2","jsCall_vdiidiiiii_3","jsCall_vdiidiiiii_4","jsCall_vdiidiiiii_5","jsCall_vdiidiiiii_6","jsCall_vdiidiiiii_7","jsCall_vdiidiiiii_8","jsCall_vdiidiiiii_9","jsCall_vdiidiiiii_10","jsCall_vdiidiiiii_11","jsCall_vdiidiiiii_12","jsCall_vdiidiiiii_13","jsCall_vdiidiiiii_14","jsCall_vdiidiiiii_15","jsCall_vdiidiiiii_16","jsCall_vdiidiiiii_17","jsCall_vdiidiiiii_18","jsCall_vdiidiiiii_19","jsCall_vdiidiiiii_20","jsCall_vdiidiiiii_21","jsCall_vdiidiiiii_22","jsCall_vdiidiiiii_23","jsCall_vdiidiiiii_24","jsCall_vdiidiiiii_25","jsCall_vdiidiiiii_26","jsCall_vdiidiiiii_27","jsCall_vdiidiiiii_28","jsCall_vdiidiiiii_29","jsCall_vdiidiiiii_30","jsCall_vdiidiiiii_31","jsCall_vdiidiiiii_32","jsCall_vdiidiiiii_33","jsCall_vdiidiiiii_34",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,0],fr=[0,"jsCall_vi_0","jsCall_vi_1","jsCall_vi_2","jsCall_vi_3","jsCall_vi_4","jsCall_vi_5","jsCall_vi_6","jsCall_vi_7","jsCall_vi_8","jsCall_vi_9","jsCall_vi_10","jsCall_vi_11","jsCall_vi_12","jsCall_vi_13","jsCall_vi_14","jsCall_vi_15","jsCall_vi_16","jsCall_vi_17","jsCall_vi_18","jsCall_vi_19","jsCall_vi_20","jsCall_vi_21","jsCall_vi_22","jsCall_vi_23","jsCall_vi_24","jsCall_vi_25","jsCall_vi_26","jsCall_vi_27","jsCall_vi_28","jsCall_vi_29","jsCall_vi_30","jsCall_vi_31","jsCall_vi_32","jsCall_vi_33","jsCall_vi_34","_free_geobtag","_free_apic","_free_chapter","_free_priv","_hevc_decode_flush","_flush","_h264_close","_hevc_parser_close","_fft4","_fft8","_fft16","_fft32","_fft64","_fft128","_fft256","_fft512","_fft1024","_fft2048","_fft4096","_fft8192","_fft16384","_fft32768","_fft65536","_fft131072","_logRequest_downloadSucceeded","_logRequest_downloadFailed","_downloadSucceeded","_downloadFailed","_transform_4x4_luma_9","_idct_4x4_dc_9","_idct_8x8_dc_9","_idct_16x16_dc_9","_idct_32x32_dc_9","_transform_4x4_luma_10","_idct_4x4_dc_10","_idct_8x8_dc_10","_idct_16x16_dc_10","_idct_32x32_dc_10","_transform_4x4_luma_12","_idct_4x4_dc_12","_idct_8x8_dc_12","_idct_16x16_dc_12","_idct_32x32_dc_12","_transform_4x4_luma_8","_idct_4x4_dc_8","_idct_8x8_dc_8","_idct_16x16_dc_8","_idct_32x32_dc_8","_main_function","_sbr_sum64x5_c","_sbr_neg_odd_64_c","_sbr_qmf_pre_shuffle_c",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,0,0,0,0,0,0,0,0,0,0,0,0,0],ur=[0,"jsCall_vii_0","jsCall_vii_1","jsCall_vii_2","jsCall_vii_3","jsCall_vii_4","jsCall_vii_5","jsCall_vii_6","jsCall_vii_7","jsCall_vii_8","jsCall_vii_9","jsCall_vii_10","jsCall_vii_11","jsCall_vii_12","jsCall_vii_13","jsCall_vii_14","jsCall_vii_15","jsCall_vii_16","jsCall_vii_17","jsCall_vii_18","jsCall_vii_19","jsCall_vii_20","jsCall_vii_21","jsCall_vii_22","jsCall_vii_23","jsCall_vii_24","jsCall_vii_25","jsCall_vii_26","jsCall_vii_27","jsCall_vii_28","jsCall_vii_29","jsCall_vii_30","jsCall_vii_31","jsCall_vii_32","jsCall_vii_33","jsCall_vii_34","_io_close_default","_lumRangeFromJpeg_c","_lumRangeToJpeg_c","_lumRangeFromJpeg16_c","_lumRangeToJpeg16_c","_decode_data_free","_dequant_9","_idct_4x4_9","_idct_8x8_9","_idct_16x16_9","_idct_32x32_9","_dequant_10","_idct_4x4_10","_idct_8x8_10","_idct_16x16_10","_idct_32x32_10","_dequant_12","_idct_4x4_12","_idct_8x8_12","_idct_16x16_12","_idct_32x32_12","_dequant_8","_idct_4x4_8","_idct_8x8_8","_idct_16x16_8","_idct_32x32_8","_imdct_and_windowing","_apply_ltp","_update_ltp","_imdct_and_windowing_ld","_imdct_and_windowing_eld","_imdct_and_windowing_960","_ff_h264_chroma_dc_dequant_idct_9_c","_ff_h264_chroma422_dc_dequant_idct_9_c","_ff_h264_chroma_dc_dequant_idct_10_c","_ff_h264_chroma422_dc_dequant_idct_10_c","_ff_h264_chroma_dc_dequant_idct_12_c","_ff_h264_chroma422_dc_dequant_idct_12_c","_ff_h264_chroma_dc_dequant_idct_14_c","_ff_h264_chroma422_dc_dequant_idct_14_c","_ff_h264_chroma_dc_dequant_idct_8_c","_ff_h264_chroma422_dc_dequant_idct_8_c","_hevc_pps_free","_sbr_qmf_post_shuffle_c","_sbr_qmf_deint_neg_c","_sbr_autocorrelate_c","_fft_permute_c","_fft_calc_c","_av_buffer_default_free","_pool_release_buffer","_sha1_transform","_sha256_transform","_pop_arg_long_double",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,0,0,0,0,0,0,0,0,0,0,0,0],hr=[0,"jsCall_viidi_0","jsCall_viidi_1","jsCall_viidi_2","jsCall_viidi_3","jsCall_viidi_4","jsCall_viidi_5","jsCall_viidi_6","jsCall_viidi_7","jsCall_viidi_8","jsCall_viidi_9","jsCall_viidi_10","jsCall_viidi_11","jsCall_viidi_12","jsCall_viidi_13","jsCall_viidi_14","jsCall_viidi_15","jsCall_viidi_16","jsCall_viidi_17","jsCall_viidi_18","jsCall_viidi_19","jsCall_viidi_20","jsCall_viidi_21","jsCall_viidi_22","jsCall_viidi_23","jsCall_viidi_24","jsCall_viidi_25","jsCall_viidi_26","jsCall_viidi_27","jsCall_viidi_28","jsCall_viidi_29","jsCall_viidi_30","jsCall_viidi_31","jsCall_viidi_32","jsCall_viidi_33","jsCall_viidi_34","_vector_dmac_scalar_c","_vector_dmul_scalar_c",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],cr=[0,"jsCall_viifi_0","jsCall_viifi_1","jsCall_viifi_2","jsCall_viifi_3","jsCall_viifi_4","jsCall_viifi_5","jsCall_viifi_6","jsCall_viifi_7","jsCall_viifi_8","jsCall_viifi_9","jsCall_viifi_10","jsCall_viifi_11","jsCall_viifi_12","jsCall_viifi_13","jsCall_viifi_14","jsCall_viifi_15","jsCall_viifi_16","jsCall_viifi_17","jsCall_viifi_18","jsCall_viifi_19","jsCall_viifi_20","jsCall_viifi_21","jsCall_viifi_22","jsCall_viifi_23","jsCall_viifi_24","jsCall_viifi_25","jsCall_viifi_26","jsCall_viifi_27","jsCall_viifi_28","jsCall_viifi_29","jsCall_viifi_30","jsCall_viifi_31","jsCall_viifi_32","jsCall_viifi_33","jsCall_viifi_34","_vector_fmac_scalar_c","_vector_fmul_scalar_c",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],dr=[0,"jsCall_viii_0","jsCall_viii_1","jsCall_viii_2","jsCall_viii_3","jsCall_viii_4","jsCall_viii_5","jsCall_viii_6","jsCall_viii_7","jsCall_viii_8","jsCall_viii_9","jsCall_viii_10","jsCall_viii_11","jsCall_viii_12","jsCall_viii_13","jsCall_viii_14","jsCall_viii_15","jsCall_viii_16","jsCall_viii_17","jsCall_viii_18","jsCall_viii_19","jsCall_viii_20","jsCall_viii_21","jsCall_viii_22","jsCall_viii_23","jsCall_viii_24","jsCall_viii_25","jsCall_viii_26","jsCall_viii_27","jsCall_viii_28","jsCall_viii_29","jsCall_viii_30","jsCall_viii_31","jsCall_viii_32","jsCall_viii_33","jsCall_viii_34","_avcHandleFrame","_handleFrame","_sdt_cb","_pat_cb","_pmt_cb","_scte_data_cb","_m4sl_cb","_chrRangeFromJpeg_c","_chrRangeToJpeg_c","_chrRangeFromJpeg16_c","_chrRangeToJpeg16_c","_rgb15to16_c","_rgb15tobgr24_c","_rgb15to32_c","_rgb16tobgr24_c","_rgb16to32_c","_rgb16to15_c","_rgb24tobgr16_c","_rgb24tobgr15_c","_rgb24tobgr32_c","_rgb32to16_c","_rgb32to15_c","_rgb32tobgr24_c","_rgb24to15_c","_rgb24to16_c","_rgb24tobgr24_c","_shuffle_bytes_0321_c","_shuffle_bytes_2103_c","_shuffle_bytes_1230_c","_shuffle_bytes_3012_c","_shuffle_bytes_3210_c","_rgb32tobgr16_c","_rgb32tobgr15_c","_rgb48tobgr48_bswap","_rgb48tobgr64_bswap","_rgb48to64_bswap","_rgb64to48_bswap","_rgb48tobgr48_nobswap","_rgb48tobgr64_nobswap","_rgb48to64_nobswap","_rgb64tobgr48_nobswap","_rgb64tobgr48_bswap","_rgb64to48_nobswap","_rgb12to15","_rgb15to24","_rgb16to24","_rgb32to24","_rgb24to32","_rgb12tobgr12","_rgb15tobgr15","_rgb16tobgr15","_rgb15tobgr16","_rgb16tobgr16","_rgb15tobgr32","_rgb16tobgr32","_add_residual4x4_9","_add_residual8x8_9","_add_residual16x16_9","_add_residual32x32_9","_transform_rdpcm_9","_add_residual4x4_10","_add_residual8x8_10","_add_residual16x16_10","_add_residual32x32_10","_transform_rdpcm_10","_add_residual4x4_12","_add_residual8x8_12","_add_residual16x16_12","_add_residual32x32_12","_transform_rdpcm_12","_add_residual4x4_8","_add_residual8x8_8","_add_residual16x16_8","_add_residual32x32_8","_transform_rdpcm_8","_just_return","_bswap_buf","_bswap16_buf","_ff_h264_add_pixels4_16_c","_ff_h264_add_pixels4_8_c","_ff_h264_add_pixels8_16_c","_ff_h264_add_pixels8_8_c","_ff_h264_idct_add_9_c","_ff_h264_idct8_add_9_c","_ff_h264_idct_dc_add_9_c","_ff_h264_idct8_dc_add_9_c","_ff_h264_luma_dc_dequant_idct_9_c","_ff_h264_idct_add_10_c","_ff_h264_idct8_add_10_c","_ff_h264_idct_dc_add_10_c","_ff_h264_idct8_dc_add_10_c","_ff_h264_luma_dc_dequant_idct_10_c","_ff_h264_idct_add_12_c","_ff_h264_idct8_add_12_c","_ff_h264_idct_dc_add_12_c","_ff_h264_idct8_dc_add_12_c","_ff_h264_luma_dc_dequant_idct_12_c","_ff_h264_idct_add_14_c","_ff_h264_idct8_add_14_c","_ff_h264_idct_dc_add_14_c","_ff_h264_idct8_dc_add_14_c","_ff_h264_luma_dc_dequant_idct_14_c","_ff_h264_idct_add_8_c","_ff_h264_idct8_add_8_c","_ff_h264_idct_dc_add_8_c","_ff_h264_idct8_dc_add_8_c","_ff_h264_luma_dc_dequant_idct_8_c","_sbr_qmf_deint_bfly_c","_ps_add_squares_c","_ff_imdct_calc_c","_ff_imdct_half_c","_ff_mdct_calc_c","_butterflies_float_c",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,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,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,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],_r=[0,"jsCall_viiii_0","jsCall_viiii_1","jsCall_viiii_2","jsCall_viiii_3","jsCall_viiii_4","jsCall_viiii_5","jsCall_viiii_6","jsCall_viiii_7","jsCall_viiii_8","jsCall_viiii_9","jsCall_viiii_10","jsCall_viiii_11","jsCall_viiii_12","jsCall_viiii_13","jsCall_viiii_14","jsCall_viiii_15","jsCall_viiii_16","jsCall_viiii_17","jsCall_viiii_18","jsCall_viiii_19","jsCall_viiii_20","jsCall_viiii_21","jsCall_viiii_22","jsCall_viiii_23","jsCall_viiii_24","jsCall_viiii_25","jsCall_viiii_26","jsCall_viiii_27","jsCall_viiii_28","jsCall_viiii_29","jsCall_viiii_30","jsCall_viiii_31","jsCall_viiii_32","jsCall_viiii_33","jsCall_viiii_34","_planar_rgb9le_to_y","_planar_rgb10le_to_a","_planar_rgb10le_to_y","_planar_rgb12le_to_a","_planar_rgb12le_to_y","_planar_rgb14le_to_y","_planar_rgb16le_to_a","_planar_rgb16le_to_y","_planar_rgb9be_to_y","_planar_rgb10be_to_a","_planar_rgb10be_to_y","_planar_rgb12be_to_a","_planar_rgb12be_to_y","_planar_rgb14be_to_y","_planar_rgb16be_to_a","_planar_rgb16be_to_y","_planar_rgb_to_a","_planar_rgb_to_y","_gray8aToPacked32","_gray8aToPacked32_1","_gray8aToPacked24","_sws_convertPalette8ToPacked32","_sws_convertPalette8ToPacked24","_intra_pred_2_9","_intra_pred_3_9","_intra_pred_4_9","_intra_pred_5_9","_pred_planar_0_9","_pred_planar_1_9","_pred_planar_2_9","_pred_planar_3_9","_intra_pred_2_10","_intra_pred_3_10","_intra_pred_4_10","_intra_pred_5_10","_pred_planar_0_10","_pred_planar_1_10","_pred_planar_2_10","_pred_planar_3_10","_intra_pred_2_12","_intra_pred_3_12","_intra_pred_4_12","_intra_pred_5_12","_pred_planar_0_12","_pred_planar_1_12","_pred_planar_2_12","_pred_planar_3_12","_intra_pred_2_8","_intra_pred_3_8","_intra_pred_4_8","_intra_pred_5_8","_pred_planar_0_8","_pred_planar_1_8","_pred_planar_2_8","_pred_planar_3_8","_apply_tns","_windowing_and_mdct_ltp","_h264_v_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_intra_9_c","_h264_h_loop_filter_luma_mbaff_intra_9_c","_h264_v_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma_intra_9_c","_h264_h_loop_filter_chroma422_intra_9_c","_h264_h_loop_filter_chroma_mbaff_intra_9_c","_h264_h_loop_filter_chroma422_mbaff_intra_9_c","_h264_v_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_intra_10_c","_h264_h_loop_filter_luma_mbaff_intra_10_c","_h264_v_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma_intra_10_c","_h264_h_loop_filter_chroma422_intra_10_c","_h264_h_loop_filter_chroma_mbaff_intra_10_c","_h264_h_loop_filter_chroma422_mbaff_intra_10_c","_h264_v_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_intra_12_c","_h264_h_loop_filter_luma_mbaff_intra_12_c","_h264_v_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma_intra_12_c","_h264_h_loop_filter_chroma422_intra_12_c","_h264_h_loop_filter_chroma_mbaff_intra_12_c","_h264_h_loop_filter_chroma422_mbaff_intra_12_c","_h264_v_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_intra_14_c","_h264_h_loop_filter_luma_mbaff_intra_14_c","_h264_v_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma_intra_14_c","_h264_h_loop_filter_chroma422_intra_14_c","_h264_h_loop_filter_chroma_mbaff_intra_14_c","_h264_h_loop_filter_chroma422_mbaff_intra_14_c","_h264_v_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_intra_8_c","_h264_h_loop_filter_luma_mbaff_intra_8_c","_h264_v_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma_intra_8_c","_h264_h_loop_filter_chroma422_intra_8_c","_h264_h_loop_filter_chroma_mbaff_intra_8_c","_h264_h_loop_filter_chroma422_mbaff_intra_8_c","_fft15_c","_mdct15","_imdct15_half","_ps_mul_pair_single_c","_ps_hybrid_analysis_ileave_c","_ps_hybrid_synthesis_deint_c","_vector_fmul_c","_vector_dmul_c","_vector_fmul_reverse_c","_av_log_default_callback",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,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,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,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,0,0,0,0,0],pr=[0,"jsCall_viiiid_0","jsCall_viiiid_1","jsCall_viiiid_2","jsCall_viiiid_3","jsCall_viiiid_4","jsCall_viiiid_5","jsCall_viiiid_6","jsCall_viiiid_7","jsCall_viiiid_8","jsCall_viiiid_9","jsCall_viiiid_10","jsCall_viiiid_11","jsCall_viiiid_12","jsCall_viiiid_13","jsCall_viiiid_14","jsCall_viiiid_15","jsCall_viiiid_16","jsCall_viiiid_17","jsCall_viiiid_18","jsCall_viiiid_19","jsCall_viiiid_20","jsCall_viiiid_21","jsCall_viiiid_22","jsCall_viiiid_23","jsCall_viiiid_24","jsCall_viiiid_25","jsCall_viiiid_26","jsCall_viiiid_27","jsCall_viiiid_28","jsCall_viiiid_29","jsCall_viiiid_30","jsCall_viiiid_31","jsCall_viiiid_32","jsCall_viiiid_33","jsCall_viiiid_34",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,0],mr=[0,"jsCall_viiiifii_0","jsCall_viiiifii_1","jsCall_viiiifii_2","jsCall_viiiifii_3","jsCall_viiiifii_4","jsCall_viiiifii_5","jsCall_viiiifii_6","jsCall_viiiifii_7","jsCall_viiiifii_8","jsCall_viiiifii_9","jsCall_viiiifii_10","jsCall_viiiifii_11","jsCall_viiiifii_12","jsCall_viiiifii_13","jsCall_viiiifii_14","jsCall_viiiifii_15","jsCall_viiiifii_16","jsCall_viiiifii_17","jsCall_viiiifii_18","jsCall_viiiifii_19","jsCall_viiiifii_20","jsCall_viiiifii_21","jsCall_viiiifii_22","jsCall_viiiifii_23","jsCall_viiiifii_24","jsCall_viiiifii_25","jsCall_viiiifii_26","jsCall_viiiifii_27","jsCall_viiiifii_28","jsCall_viiiifii_29","jsCall_viiiifii_30","jsCall_viiiifii_31","jsCall_viiiifii_32","jsCall_viiiifii_33","jsCall_viiiifii_34","_sbr_hf_gen_c",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],br=[0,"jsCall_viiiii_0","jsCall_viiiii_1","jsCall_viiiii_2","jsCall_viiiii_3","jsCall_viiiii_4","jsCall_viiiii_5","jsCall_viiiii_6","jsCall_viiiii_7","jsCall_viiiii_8","jsCall_viiiii_9","jsCall_viiiii_10","jsCall_viiiii_11","jsCall_viiiii_12","jsCall_viiiii_13","jsCall_viiiii_14","jsCall_viiiii_15","jsCall_viiiii_16","jsCall_viiiii_17","jsCall_viiiii_18","jsCall_viiiii_19","jsCall_viiiii_20","jsCall_viiiii_21","jsCall_viiiii_22","jsCall_viiiii_23","jsCall_viiiii_24","jsCall_viiiii_25","jsCall_viiiii_26","jsCall_viiiii_27","jsCall_viiiii_28","jsCall_viiiii_29","jsCall_viiiii_30","jsCall_viiiii_31","jsCall_viiiii_32","jsCall_viiiii_33","jsCall_viiiii_34","_planar_rgb9le_to_uv","_planar_rgb10le_to_uv","_planar_rgb12le_to_uv","_planar_rgb14le_to_uv","_planar_rgb16le_to_uv","_planar_rgb9be_to_uv","_planar_rgb10be_to_uv","_planar_rgb12be_to_uv","_planar_rgb14be_to_uv","_planar_rgb16be_to_uv","_planar_rgb_to_uv","_yuv2p010l1_LE_c","_yuv2p010l1_BE_c","_yuv2plane1_16LE_c","_yuv2plane1_16BE_c","_yuv2plane1_9LE_c","_yuv2plane1_9BE_c","_yuv2plane1_10LE_c","_yuv2plane1_10BE_c","_yuv2plane1_12LE_c","_yuv2plane1_12BE_c","_yuv2plane1_14LE_c","_yuv2plane1_14BE_c","_yuv2plane1_floatBE_c","_yuv2plane1_floatLE_c","_yuv2plane1_8_c","_bayer_bggr8_to_rgb24_copy","_bayer_bggr8_to_rgb24_interpolate","_bayer_bggr16le_to_rgb24_copy","_bayer_bggr16le_to_rgb24_interpolate","_bayer_bggr16be_to_rgb24_copy","_bayer_bggr16be_to_rgb24_interpolate","_bayer_rggb8_to_rgb24_copy","_bayer_rggb8_to_rgb24_interpolate","_bayer_rggb16le_to_rgb24_copy","_bayer_rggb16le_to_rgb24_interpolate","_bayer_rggb16be_to_rgb24_copy","_bayer_rggb16be_to_rgb24_interpolate","_bayer_gbrg8_to_rgb24_copy","_bayer_gbrg8_to_rgb24_interpolate","_bayer_gbrg16le_to_rgb24_copy","_bayer_gbrg16le_to_rgb24_interpolate","_bayer_gbrg16be_to_rgb24_copy","_bayer_gbrg16be_to_rgb24_interpolate","_bayer_grbg8_to_rgb24_copy","_bayer_grbg8_to_rgb24_interpolate","_bayer_grbg16le_to_rgb24_copy","_bayer_grbg16le_to_rgb24_interpolate","_bayer_grbg16be_to_rgb24_copy","_bayer_grbg16be_to_rgb24_interpolate","_hevc_h_loop_filter_chroma_9","_hevc_v_loop_filter_chroma_9","_hevc_h_loop_filter_chroma_10","_hevc_v_loop_filter_chroma_10","_hevc_h_loop_filter_chroma_12","_hevc_v_loop_filter_chroma_12","_hevc_h_loop_filter_chroma_8","_hevc_v_loop_filter_chroma_8","_worker_func","_sbr_hf_assemble","_sbr_hf_inverse_filter","_ff_h264_idct_add16_9_c","_ff_h264_idct8_add4_9_c","_ff_h264_idct_add8_9_c","_ff_h264_idct_add8_422_9_c","_ff_h264_idct_add16intra_9_c","_h264_v_loop_filter_luma_9_c","_h264_h_loop_filter_luma_9_c","_h264_h_loop_filter_luma_mbaff_9_c","_h264_v_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma_9_c","_h264_h_loop_filter_chroma422_9_c","_h264_h_loop_filter_chroma_mbaff_9_c","_h264_h_loop_filter_chroma422_mbaff_9_c","_ff_h264_idct_add16_10_c","_ff_h264_idct8_add4_10_c","_ff_h264_idct_add8_10_c","_ff_h264_idct_add8_422_10_c","_ff_h264_idct_add16intra_10_c","_h264_v_loop_filter_luma_10_c","_h264_h_loop_filter_luma_10_c","_h264_h_loop_filter_luma_mbaff_10_c","_h264_v_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma_10_c","_h264_h_loop_filter_chroma422_10_c","_h264_h_loop_filter_chroma_mbaff_10_c","_h264_h_loop_filter_chroma422_mbaff_10_c","_ff_h264_idct_add16_12_c","_ff_h264_idct8_add4_12_c","_ff_h264_idct_add8_12_c","_ff_h264_idct_add8_422_12_c","_ff_h264_idct_add16intra_12_c","_h264_v_loop_filter_luma_12_c","_h264_h_loop_filter_luma_12_c","_h264_h_loop_filter_luma_mbaff_12_c","_h264_v_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma_12_c","_h264_h_loop_filter_chroma422_12_c","_h264_h_loop_filter_chroma_mbaff_12_c","_h264_h_loop_filter_chroma422_mbaff_12_c","_ff_h264_idct_add16_14_c","_ff_h264_idct8_add4_14_c","_ff_h264_idct_add8_14_c","_ff_h264_idct_add8_422_14_c","_ff_h264_idct_add16intra_14_c","_h264_v_loop_filter_luma_14_c","_h264_h_loop_filter_luma_14_c","_h264_h_loop_filter_luma_mbaff_14_c","_h264_v_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma_14_c","_h264_h_loop_filter_chroma422_14_c","_h264_h_loop_filter_chroma_mbaff_14_c","_h264_h_loop_filter_chroma422_mbaff_14_c","_ff_h264_idct_add16_8_c","_ff_h264_idct8_add4_8_c","_ff_h264_idct_add8_8_c","_ff_h264_idct_add8_422_8_c","_ff_h264_idct_add16intra_8_c","_h264_v_loop_filter_luma_8_c","_h264_h_loop_filter_luma_8_c","_h264_h_loop_filter_luma_mbaff_8_c","_h264_v_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma_8_c","_h264_h_loop_filter_chroma422_8_c","_h264_h_loop_filter_chroma_mbaff_8_c","_h264_h_loop_filter_chroma422_mbaff_8_c","_postrotate_c","_sbr_hf_g_filt_c","_ps_hybrid_analysis_c","_ps_stereo_interpolate_c","_ps_stereo_interpolate_ipdopd_c","_vector_fmul_window_c","_vector_fmul_add_c",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,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,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,0,0,0,0,0,0],vr=[0,"jsCall_viiiiidd_0","jsCall_viiiiidd_1","jsCall_viiiiidd_2","jsCall_viiiiidd_3","jsCall_viiiiidd_4","jsCall_viiiiidd_5","jsCall_viiiiidd_6","jsCall_viiiiidd_7","jsCall_viiiiidd_8","jsCall_viiiiidd_9","jsCall_viiiiidd_10","jsCall_viiiiidd_11","jsCall_viiiiidd_12","jsCall_viiiiidd_13","jsCall_viiiiidd_14","jsCall_viiiiidd_15","jsCall_viiiiidd_16","jsCall_viiiiidd_17","jsCall_viiiiidd_18","jsCall_viiiiidd_19","jsCall_viiiiidd_20","jsCall_viiiiidd_21","jsCall_viiiiidd_22","jsCall_viiiiidd_23","jsCall_viiiiidd_24","jsCall_viiiiidd_25","jsCall_viiiiidd_26","jsCall_viiiiidd_27","jsCall_viiiiidd_28","jsCall_viiiiidd_29","jsCall_viiiiidd_30","jsCall_viiiiidd_31","jsCall_viiiiidd_32","jsCall_viiiiidd_33","jsCall_viiiiidd_34",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,0],yr=[0,"jsCall_viiiiii_0","jsCall_viiiiii_1","jsCall_viiiiii_2","jsCall_viiiiii_3","jsCall_viiiiii_4","jsCall_viiiiii_5","jsCall_viiiiii_6","jsCall_viiiiii_7","jsCall_viiiiii_8","jsCall_viiiiii_9","jsCall_viiiiii_10","jsCall_viiiiii_11","jsCall_viiiiii_12","jsCall_viiiiii_13","jsCall_viiiiii_14","jsCall_viiiiii_15","jsCall_viiiiii_16","jsCall_viiiiii_17","jsCall_viiiiii_18","jsCall_viiiiii_19","jsCall_viiiiii_20","jsCall_viiiiii_21","jsCall_viiiiii_22","jsCall_viiiiii_23","jsCall_viiiiii_24","jsCall_viiiiii_25","jsCall_viiiiii_26","jsCall_viiiiii_27","jsCall_viiiiii_28","jsCall_viiiiii_29","jsCall_viiiiii_30","jsCall_viiiiii_31","jsCall_viiiiii_32","jsCall_viiiiii_33","jsCall_viiiiii_34","_read_geobtag","_read_apic","_read_chapter","_read_priv","_ff_hyscale_fast_c","_bswap16Y_c","_read_ya16le_gray_c","_read_ya16be_gray_c","_read_ayuv64le_Y_c","_yuy2ToY_c","_uyvyToY_c","_bgr24ToY_c","_bgr16leToY_c","_bgr16beToY_c","_bgr15leToY_c","_bgr15beToY_c","_bgr12leToY_c","_bgr12beToY_c","_rgb24ToY_c","_rgb16leToY_c","_rgb16beToY_c","_rgb15leToY_c","_rgb15beToY_c","_rgb12leToY_c","_rgb12beToY_c","_palToY_c","_monoblack2Y_c","_monowhite2Y_c","_bgr32ToY_c","_bgr321ToY_c","_rgb32ToY_c","_rgb321ToY_c","_rgb48BEToY_c","_rgb48LEToY_c","_bgr48BEToY_c","_bgr48LEToY_c","_rgb64BEToY_c","_rgb64LEToY_c","_bgr64BEToY_c","_bgr64LEToY_c","_p010LEToY_c","_p010BEToY_c","_grayf32ToY16_c","_grayf32ToY16_bswap_c","_rgba64leToA_c","_rgba64beToA_c","_rgbaToA_c","_abgrToA_c","_read_ya16le_alpha_c","_read_ya16be_alpha_c","_read_ayuv64le_A_c","_palToA_c","_put_pcm_9","_hevc_h_loop_filter_luma_9","_hevc_v_loop_filter_luma_9","_put_pcm_10","_hevc_h_loop_filter_luma_10","_hevc_v_loop_filter_luma_10","_put_pcm_12","_hevc_h_loop_filter_luma_12","_hevc_v_loop_filter_luma_12","_put_pcm_8","_hevc_h_loop_filter_luma_8","_hevc_v_loop_filter_luma_8","_pred_dc_9","_pred_angular_0_9","_pred_angular_1_9","_pred_angular_2_9","_pred_angular_3_9","_pred_dc_10","_pred_angular_0_10","_pred_angular_1_10","_pred_angular_2_10","_pred_angular_3_10","_pred_dc_12","_pred_angular_0_12","_pred_angular_1_12","_pred_angular_2_12","_pred_angular_3_12","_pred_dc_8","_pred_angular_0_8","_pred_angular_1_8","_pred_angular_2_8","_pred_angular_3_8","_weight_h264_pixels16_9_c","_weight_h264_pixels8_9_c","_weight_h264_pixels4_9_c","_weight_h264_pixels2_9_c","_weight_h264_pixels16_10_c","_weight_h264_pixels8_10_c","_weight_h264_pixels4_10_c","_weight_h264_pixels2_10_c","_weight_h264_pixels16_12_c","_weight_h264_pixels8_12_c","_weight_h264_pixels4_12_c","_weight_h264_pixels2_12_c","_weight_h264_pixels16_14_c","_weight_h264_pixels8_14_c","_weight_h264_pixels4_14_c","_weight_h264_pixels2_14_c","_weight_h264_pixels16_8_c","_weight_h264_pixels8_8_c","_weight_h264_pixels4_8_c","_weight_h264_pixels2_8_c","_sbr_hf_apply_noise_0","_sbr_hf_apply_noise_1","_sbr_hf_apply_noise_2","_sbr_hf_apply_noise_3","_aes_decrypt","_aes_encrypt","_image_copy_plane",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,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,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,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,0],gr=[0,"jsCall_viiiiiifi_0","jsCall_viiiiiifi_1","jsCall_viiiiiifi_2","jsCall_viiiiiifi_3","jsCall_viiiiiifi_4","jsCall_viiiiiifi_5","jsCall_viiiiiifi_6","jsCall_viiiiiifi_7","jsCall_viiiiiifi_8","jsCall_viiiiiifi_9","jsCall_viiiiiifi_10","jsCall_viiiiiifi_11","jsCall_viiiiiifi_12","jsCall_viiiiiifi_13","jsCall_viiiiiifi_14","jsCall_viiiiiifi_15","jsCall_viiiiiifi_16","jsCall_viiiiiifi_17","jsCall_viiiiiifi_18","jsCall_viiiiiifi_19","jsCall_viiiiiifi_20","jsCall_viiiiiifi_21","jsCall_viiiiiifi_22","jsCall_viiiiiifi_23","jsCall_viiiiiifi_24","jsCall_viiiiiifi_25","jsCall_viiiiiifi_26","jsCall_viiiiiifi_27","jsCall_viiiiiifi_28","jsCall_viiiiiifi_29","jsCall_viiiiiifi_30","jsCall_viiiiiifi_31","jsCall_viiiiiifi_32","jsCall_viiiiiifi_33","jsCall_viiiiiifi_34","_ps_decorrelate_c",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],wr=[0,"jsCall_viiiiiii_0","jsCall_viiiiiii_1","jsCall_viiiiiii_2","jsCall_viiiiiii_3","jsCall_viiiiiii_4","jsCall_viiiiiii_5","jsCall_viiiiiii_6","jsCall_viiiiiii_7","jsCall_viiiiiii_8","jsCall_viiiiiii_9","jsCall_viiiiiii_10","jsCall_viiiiiii_11","jsCall_viiiiiii_12","jsCall_viiiiiii_13","jsCall_viiiiiii_14","jsCall_viiiiiii_15","jsCall_viiiiiii_16","jsCall_viiiiiii_17","jsCall_viiiiiii_18","jsCall_viiiiiii_19","jsCall_viiiiiii_20","jsCall_viiiiiii_21","jsCall_viiiiiii_22","jsCall_viiiiiii_23","jsCall_viiiiiii_24","jsCall_viiiiiii_25","jsCall_viiiiiii_26","jsCall_viiiiiii_27","jsCall_viiiiiii_28","jsCall_viiiiiii_29","jsCall_viiiiiii_30","jsCall_viiiiiii_31","jsCall_viiiiiii_32","jsCall_viiiiiii_33","jsCall_viiiiiii_34","_hScale8To15_c","_hScale8To19_c","_hScale16To19_c","_hScale16To15_c","_yuy2ToUV_c","_yvy2ToUV_c","_uyvyToUV_c","_nv12ToUV_c","_nv21ToUV_c","_palToUV_c","_bswap16UV_c","_read_ayuv64le_UV_c","_p010LEToUV_c","_p010BEToUV_c","_p016LEToUV_c","_p016BEToUV_c","_gbr24pToUV_half_c","_rgb64BEToUV_half_c","_rgb64LEToUV_half_c","_bgr64BEToUV_half_c","_bgr64LEToUV_half_c","_rgb48BEToUV_half_c","_rgb48LEToUV_half_c","_bgr48BEToUV_half_c","_bgr48LEToUV_half_c","_bgr32ToUV_half_c","_bgr321ToUV_half_c","_bgr24ToUV_half_c","_bgr16leToUV_half_c","_bgr16beToUV_half_c","_bgr15leToUV_half_c","_bgr15beToUV_half_c","_bgr12leToUV_half_c","_bgr12beToUV_half_c","_rgb32ToUV_half_c","_rgb321ToUV_half_c","_rgb24ToUV_half_c","_rgb16leToUV_half_c","_rgb16beToUV_half_c","_rgb15leToUV_half_c","_rgb15beToUV_half_c","_rgb12leToUV_half_c","_rgb12beToUV_half_c","_rgb64BEToUV_c","_rgb64LEToUV_c","_bgr64BEToUV_c","_bgr64LEToUV_c","_rgb48BEToUV_c","_rgb48LEToUV_c","_bgr48BEToUV_c","_bgr48LEToUV_c","_bgr32ToUV_c","_bgr321ToUV_c","_bgr24ToUV_c","_bgr16leToUV_c","_bgr16beToUV_c","_bgr15leToUV_c","_bgr15beToUV_c","_bgr12leToUV_c","_bgr12beToUV_c","_rgb32ToUV_c","_rgb321ToUV_c","_rgb24ToUV_c","_rgb16leToUV_c","_rgb16beToUV_c","_rgb15leToUV_c","_rgb15beToUV_c","_rgb12leToUV_c","_rgb12beToUV_c","_yuv2p010lX_LE_c","_yuv2p010lX_BE_c","_yuv2p010cX_c","_yuv2planeX_16LE_c","_yuv2planeX_16BE_c","_yuv2p016cX_c","_yuv2planeX_9LE_c","_yuv2planeX_9BE_c","_yuv2planeX_10LE_c","_yuv2planeX_10BE_c","_yuv2planeX_12LE_c","_yuv2planeX_12BE_c","_yuv2planeX_14LE_c","_yuv2planeX_14BE_c","_yuv2planeX_floatBE_c","_yuv2planeX_floatLE_c","_yuv2planeX_8_c","_yuv2nv12cX_c","_sao_edge_filter_9","_put_hevc_pel_pixels_9","_put_hevc_qpel_h_9","_put_hevc_qpel_v_9","_put_hevc_qpel_hv_9","_put_hevc_epel_h_9","_put_hevc_epel_v_9","_put_hevc_epel_hv_9","_sao_edge_filter_10","_put_hevc_pel_pixels_10","_put_hevc_qpel_h_10","_put_hevc_qpel_v_10","_put_hevc_qpel_hv_10","_put_hevc_epel_h_10","_put_hevc_epel_v_10","_put_hevc_epel_hv_10","_sao_edge_filter_12","_put_hevc_pel_pixels_12","_put_hevc_qpel_h_12","_put_hevc_qpel_v_12","_put_hevc_qpel_hv_12","_put_hevc_epel_h_12","_put_hevc_epel_v_12","_put_hevc_epel_hv_12","_sao_edge_filter_8","_put_hevc_pel_pixels_8","_put_hevc_qpel_h_8","_put_hevc_qpel_v_8","_put_hevc_qpel_hv_8","_put_hevc_epel_h_8","_put_hevc_epel_v_8","_put_hevc_epel_hv_8",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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Er=[0,"jsCall_viiiiiiii_0","jsCall_viiiiiiii_1","jsCall_viiiiiiii_2","jsCall_viiiiiiii_3","jsCall_viiiiiiii_4","jsCall_viiiiiiii_5","jsCall_viiiiiiii_6","jsCall_viiiiiiii_7","jsCall_viiiiiiii_8","jsCall_viiiiiiii_9","jsCall_viiiiiiii_10","jsCall_viiiiiiii_11","jsCall_viiiiiiii_12","jsCall_viiiiiiii_13","jsCall_viiiiiiii_14","jsCall_viiiiiiii_15","jsCall_viiiiiiii_16","jsCall_viiiiiiii_17","jsCall_viiiiiiii_18","jsCall_viiiiiiii_19","jsCall_viiiiiiii_20","jsCall_viiiiiiii_21","jsCall_viiiiiiii_22","jsCall_viiiiiiii_23","jsCall_viiiiiiii_24","jsCall_viiiiiiii_25","jsCall_viiiiiiii_26","jsCall_viiiiiiii_27","jsCall_viiiiiiii_28","jsCall_viiiiiiii_29","jsCall_viiiiiiii_30","jsCall_viiiiiiii_31","jsCall_viiiiiiii_32","jsCall_viiiiiiii_33","jsCall_viiiiiiii_34","_ff_hcscale_fast_c","_bayer_bggr8_to_yv12_copy","_bayer_bggr8_to_yv12_interpolate","_bayer_bggr16le_to_yv12_copy","_bayer_bggr16le_to_yv12_interpolate","_bayer_bggr16be_to_yv12_copy","_bayer_bggr16be_to_yv12_interpolate","_bayer_rggb8_to_yv12_copy","_bayer_rggb8_to_yv12_interpolate","_bayer_rggb16le_to_yv12_copy","_bayer_rggb16le_to_yv12_interpolate","_bayer_rggb16be_to_yv12_copy","_bayer_rggb16be_to_yv12_interpolate","_bayer_gbrg8_to_yv12_copy","_bayer_gbrg8_to_yv12_interpolate","_bayer_gbrg16le_to_yv12_copy","_bayer_gbrg16le_to_yv12_interpolate","_bayer_gbrg16be_to_yv12_copy","_bayer_gbrg16be_to_yv12_interpolate","_bayer_grbg8_to_yv12_copy","_bayer_grbg8_to_yv12_interpolate","_bayer_grbg16le_to_yv12_copy","_bayer_grbg16le_to_yv12_interpolate","_bayer_grbg16be_to_yv12_copy","_bayer_grbg16be_to_yv12_interpolate","_sao_band_filter_9","_put_hevc_pel_uni_pixels_9","_put_hevc_qpel_uni_h_9","_put_hevc_qpel_uni_v_9","_put_hevc_qpel_uni_hv_9","_put_hevc_epel_uni_h_9","_put_hevc_epel_uni_v_9","_put_hevc_epel_uni_hv_9","_sao_band_filter_10","_put_hevc_pel_uni_pixels_10","_put_hevc_qpel_uni_h_10","_put_hevc_qpel_uni_v_10","_put_hevc_qpel_uni_hv_10","_put_hevc_epel_uni_h_10","_put_hevc_epel_uni_v_10","_put_hevc_epel_uni_hv_10","_sao_band_filter_12","_put_hevc_pel_uni_pixels_12","_put_hevc_qpel_uni_h_12","_put_hevc_qpel_uni_v_12","_put_hevc_qpel_uni_hv_12","_put_hevc_epel_uni_h_12","_put_hevc_epel_uni_v_12","_put_hevc_epel_uni_hv_12","_sao_band_filter_8","_put_hevc_pel_uni_pixels_8","_put_hevc_qpel_uni_h_8","_put_hevc_qpel_uni_v_8","_put_hevc_qpel_uni_hv_8","_put_hevc_epel_uni_h_8","_put_hevc_epel_uni_v_8","_put_hevc_epel_uni_hv_8","_biweight_h264_pixels16_9_c","_biweight_h264_pixels8_9_c","_biweight_h264_pixels4_9_c","_biweight_h264_pixels2_9_c","_biweight_h264_pixels16_10_c","_biweight_h264_pixels8_10_c","_biweight_h264_pixels4_10_c","_biweight_h264_pixels2_10_c","_biweight_h264_pixels16_12_c","_biweight_h264_pixels8_12_c","_biweight_h264_pixels4_12_c","_biweight_h264_pixels2_12_c","_biweight_h264_pixels16_14_c","_biweight_h264_pixels8_14_c","_biweight_h264_pixels4_14_c","_biweight_h264_pixels2_14_c","_biweight_h264_pixels16_8_c","_biweight_h264_pixels8_8_c","_biweight_h264_pixels4_8_c","_biweight_h264_pixels2_8_c",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Cr=[0,"jsCall_viiiiiiiid_0","jsCall_viiiiiiiid_1","jsCall_viiiiiiiid_2","jsCall_viiiiiiiid_3","jsCall_viiiiiiiid_4","jsCall_viiiiiiiid_5","jsCall_viiiiiiiid_6","jsCall_viiiiiiiid_7","jsCall_viiiiiiiid_8","jsCall_viiiiiiiid_9","jsCall_viiiiiiiid_10","jsCall_viiiiiiiid_11","jsCall_viiiiiiiid_12","jsCall_viiiiiiiid_13","jsCall_viiiiiiiid_14","jsCall_viiiiiiiid_15","jsCall_viiiiiiiid_16","jsCall_viiiiiiiid_17","jsCall_viiiiiiiid_18","jsCall_viiiiiiiid_19","jsCall_viiiiiiiid_20","jsCall_viiiiiiiid_21","jsCall_viiiiiiiid_22","jsCall_viiiiiiiid_23","jsCall_viiiiiiiid_24","jsCall_viiiiiiiid_25","jsCall_viiiiiiiid_26","jsCall_viiiiiiiid_27","jsCall_viiiiiiiid_28","jsCall_viiiiiiiid_29","jsCall_viiiiiiiid_30","jsCall_viiiiiiiid_31","jsCall_viiiiiiiid_32","jsCall_viiiiiiiid_33","jsCall_viiiiiiiid_34",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,0],Sr=[0,"jsCall_viiiiiiiidi_0","jsCall_viiiiiiiidi_1","jsCall_viiiiiiiidi_2","jsCall_viiiiiiiidi_3","jsCall_viiiiiiiidi_4","jsCall_viiiiiiiidi_5","jsCall_viiiiiiiidi_6","jsCall_viiiiiiiidi_7","jsCall_viiiiiiiidi_8","jsCall_viiiiiiiidi_9","jsCall_viiiiiiiidi_10","jsCall_viiiiiiiidi_11","jsCall_viiiiiiiidi_12","jsCall_viiiiiiiidi_13","jsCall_viiiiiiiidi_14","jsCall_viiiiiiiidi_15","jsCall_viiiiiiiidi_16","jsCall_viiiiiiiidi_17","jsCall_viiiiiiiidi_18","jsCall_viiiiiiiidi_19","jsCall_viiiiiiiidi_20","jsCall_viiiiiiiidi_21","jsCall_viiiiiiiidi_22","jsCall_viiiiiiiidi_23","jsCall_viiiiiiiidi_24","jsCall_viiiiiiiidi_25","jsCall_viiiiiiiidi_26","jsCall_viiiiiiiidi_27","jsCall_viiiiiiiidi_28","jsCall_viiiiiiiidi_29","jsCall_viiiiiiiidi_30","jsCall_viiiiiiiidi_31","jsCall_viiiiiiiidi_32","jsCall_viiiiiiiidi_33","jsCall_viiiiiiiidi_34",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,0],jr=[0,"jsCall_viiiiiiiii_0","jsCall_viiiiiiiii_1","jsCall_viiiiiiiii_2","jsCall_viiiiiiiii_3","jsCall_viiiiiiiii_4","jsCall_viiiiiiiii_5","jsCall_viiiiiiiii_6","jsCall_viiiiiiiii_7","jsCall_viiiiiiiii_8","jsCall_viiiiiiiii_9","jsCall_viiiiiiiii_10","jsCall_viiiiiiiii_11","jsCall_viiiiiiiii_12","jsCall_viiiiiiiii_13","jsCall_viiiiiiiii_14","jsCall_viiiiiiiii_15","jsCall_viiiiiiiii_16","jsCall_viiiiiiiii_17","jsCall_viiiiiiiii_18","jsCall_viiiiiiiii_19","jsCall_viiiiiiiii_20","jsCall_viiiiiiiii_21","jsCall_viiiiiiiii_22","jsCall_viiiiiiiii_23","jsCall_viiiiiiiii_24","jsCall_viiiiiiiii_25","jsCall_viiiiiiiii_26","jsCall_viiiiiiiii_27","jsCall_viiiiiiiii_28","jsCall_viiiiiiiii_29","jsCall_viiiiiiiii_30","jsCall_viiiiiiiii_31","jsCall_viiiiiiiii_32","jsCall_viiiiiiiii_33","jsCall_viiiiiiiii_34","_yuv2rgba32_full_1_c","_yuv2rgbx32_full_1_c","_yuv2argb32_full_1_c","_yuv2xrgb32_full_1_c","_yuv2bgra32_full_1_c","_yuv2bgrx32_full_1_c","_yuv2abgr32_full_1_c","_yuv2xbgr32_full_1_c","_yuv2rgba64le_full_1_c","_yuv2rgbx64le_full_1_c","_yuv2rgba64be_full_1_c","_yuv2rgbx64be_full_1_c","_yuv2bgra64le_full_1_c","_yuv2bgrx64le_full_1_c","_yuv2bgra64be_full_1_c","_yuv2bgrx64be_full_1_c","_yuv2rgb24_full_1_c","_yuv2bgr24_full_1_c","_yuv2rgb48le_full_1_c","_yuv2bgr48le_full_1_c","_yuv2rgb48be_full_1_c","_yuv2bgr48be_full_1_c","_yuv2bgr4_byte_full_1_c","_yuv2rgb4_byte_full_1_c","_yuv2bgr8_full_1_c","_yuv2rgb8_full_1_c","_yuv2rgbx64le_1_c","_yuv2rgba64le_1_c","_yuv2rgbx64be_1_c","_yuv2rgba64be_1_c","_yuv2bgrx64le_1_c","_yuv2bgra64le_1_c","_yuv2bgrx64be_1_c","_yuv2bgra64be_1_c","_yuv2rgba32_1_c","_yuv2rgbx32_1_c","_yuv2rgba32_1_1_c","_yuv2rgbx32_1_1_c","_yuv2rgb16_1_c","_yuv2rgb15_1_c","_yuv2rgb12_1_c","_yuv2rgb8_1_c","_yuv2rgb4_1_c","_yuv2rgb4b_1_c","_yuv2rgb48le_1_c","_yuv2rgb48be_1_c","_yuv2bgr48le_1_c","_yuv2bgr48be_1_c","_yuv2rgb24_1_c","_yuv2bgr24_1_c","_yuv2monowhite_1_c","_yuv2monoblack_1_c","_yuv2yuyv422_1_c","_yuv2yvyu422_1_c","_yuv2uyvy422_1_c","_yuv2ya8_1_c","_yuv2ya16le_1_c","_yuv2ya16be_1_c","_yuy2toyv12_c","_put_hevc_pel_bi_pixels_9","_put_hevc_qpel_bi_h_9","_put_hevc_qpel_bi_v_9","_put_hevc_qpel_bi_hv_9","_put_hevc_epel_bi_h_9","_put_hevc_epel_bi_v_9","_put_hevc_epel_bi_hv_9","_put_hevc_pel_bi_pixels_10","_put_hevc_qpel_bi_h_10","_put_hevc_qpel_bi_v_10","_put_hevc_qpel_bi_hv_10","_put_hevc_epel_bi_h_10","_put_hevc_epel_bi_v_10","_put_hevc_epel_bi_hv_10","_put_hevc_pel_bi_pixels_12","_put_hevc_qpel_bi_h_12","_put_hevc_qpel_bi_v_12","_put_hevc_qpel_bi_hv_12","_put_hevc_epel_bi_h_12","_put_hevc_epel_bi_v_12","_put_hevc_epel_bi_hv_12","_put_hevc_pel_bi_pixels_8","_put_hevc_qpel_bi_h_8","_put_hevc_qpel_bi_v_8","_put_hevc_qpel_bi_hv_8","_put_hevc_epel_bi_h_8","_put_hevc_epel_bi_v_8","_put_hevc_epel_bi_hv_8",0,0,0,0,0],Tr=[0,"jsCall_viiiiiiiiii_0","jsCall_viiiiiiiiii_1","jsCall_viiiiiiiiii_2","jsCall_viiiiiiiiii_3","jsCall_viiiiiiiiii_4","jsCall_viiiiiiiiii_5","jsCall_viiiiiiiiii_6","jsCall_viiiiiiiiii_7","jsCall_viiiiiiiiii_8","jsCall_viiiiiiiiii_9","jsCall_viiiiiiiiii_10","jsCall_viiiiiiiiii_11","jsCall_viiiiiiiiii_12","jsCall_viiiiiiiiii_13","jsCall_viiiiiiiiii_14","jsCall_viiiiiiiiii_15","jsCall_viiiiiiiiii_16","jsCall_viiiiiiiiii_17","jsCall_viiiiiiiiii_18","jsCall_viiiiiiiiii_19","jsCall_viiiiiiiiii_20","jsCall_viiiiiiiiii_21","jsCall_viiiiiiiiii_22","jsCall_viiiiiiiiii_23","jsCall_viiiiiiiiii_24","jsCall_viiiiiiiiii_25","jsCall_viiiiiiiiii_26","jsCall_viiiiiiiiii_27","jsCall_viiiiiiiiii_28","jsCall_viiiiiiiiii_29","jsCall_viiiiiiiiii_30","jsCall_viiiiiiiiii_31","jsCall_viiiiiiiiii_32","jsCall_viiiiiiiiii_33","jsCall_viiiiiiiiii_34","_yuv2rgba32_full_2_c","_yuv2rgbx32_full_2_c","_yuv2argb32_full_2_c","_yuv2xrgb32_full_2_c","_yuv2bgra32_full_2_c","_yuv2bgrx32_full_2_c","_yuv2abgr32_full_2_c","_yuv2xbgr32_full_2_c","_yuv2rgba64le_full_2_c","_yuv2rgbx64le_full_2_c","_yuv2rgba64be_full_2_c","_yuv2rgbx64be_full_2_c","_yuv2bgra64le_full_2_c","_yuv2bgrx64le_full_2_c","_yuv2bgra64be_full_2_c","_yuv2bgrx64be_full_2_c","_yuv2rgb24_full_2_c","_yuv2bgr24_full_2_c","_yuv2rgb48le_full_2_c","_yuv2bgr48le_full_2_c","_yuv2rgb48be_full_2_c","_yuv2bgr48be_full_2_c","_yuv2bgr4_byte_full_2_c","_yuv2rgb4_byte_full_2_c","_yuv2bgr8_full_2_c","_yuv2rgb8_full_2_c","_yuv2rgbx64le_2_c","_yuv2rgba64le_2_c","_yuv2rgbx64be_2_c","_yuv2rgba64be_2_c","_yuv2bgrx64le_2_c","_yuv2bgra64le_2_c","_yuv2bgrx64be_2_c","_yuv2bgra64be_2_c","_yuv2rgba32_2_c","_yuv2rgbx32_2_c","_yuv2rgba32_1_2_c","_yuv2rgbx32_1_2_c","_yuv2rgb16_2_c","_yuv2rgb15_2_c","_yuv2rgb12_2_c","_yuv2rgb8_2_c","_yuv2rgb4_2_c","_yuv2rgb4b_2_c","_yuv2rgb48le_2_c","_yuv2rgb48be_2_c","_yuv2bgr48le_2_c","_yuv2bgr48be_2_c","_yuv2rgb24_2_c","_yuv2bgr24_2_c","_yuv2monowhite_2_c","_yuv2monoblack_2_c","_yuv2yuyv422_2_c","_yuv2yvyu422_2_c","_yuv2uyvy422_2_c","_yuv2ya8_2_c","_yuv2ya16le_2_c","_yuv2ya16be_2_c","_vu9_to_vu12_c","_yvu9_to_yuy2_c","_ff_emulated_edge_mc_8","_ff_emulated_edge_mc_16",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,0,0,0],Ar=[0,"jsCall_viiiiiiiiiii_0","jsCall_viiiiiiiiiii_1","jsCall_viiiiiiiiiii_2","jsCall_viiiiiiiiiii_3","jsCall_viiiiiiiiiii_4","jsCall_viiiiiiiiiii_5","jsCall_viiiiiiiiiii_6","jsCall_viiiiiiiiiii_7","jsCall_viiiiiiiiiii_8","jsCall_viiiiiiiiiii_9","jsCall_viiiiiiiiiii_10","jsCall_viiiiiiiiiii_11","jsCall_viiiiiiiiiii_12","jsCall_viiiiiiiiiii_13","jsCall_viiiiiiiiiii_14","jsCall_viiiiiiiiiii_15","jsCall_viiiiiiiiiii_16","jsCall_viiiiiiiiiii_17","jsCall_viiiiiiiiiii_18","jsCall_viiiiiiiiiii_19","jsCall_viiiiiiiiiii_20","jsCall_viiiiiiiiiii_21","jsCall_viiiiiiiiiii_22","jsCall_viiiiiiiiiii_23","jsCall_viiiiiiiiiii_24","jsCall_viiiiiiiiiii_25","jsCall_viiiiiiiiiii_26","jsCall_viiiiiiiiiii_27","jsCall_viiiiiiiiiii_28","jsCall_viiiiiiiiiii_29","jsCall_viiiiiiiiiii_30","jsCall_viiiiiiiiiii_31","jsCall_viiiiiiiiiii_32","jsCall_viiiiiiiiiii_33","jsCall_viiiiiiiiiii_34","_put_hevc_pel_uni_w_pixels_9","_put_hevc_qpel_uni_w_h_9","_put_hevc_qpel_uni_w_v_9","_put_hevc_qpel_uni_w_hv_9","_put_hevc_epel_uni_w_h_9","_put_hevc_epel_uni_w_v_9","_put_hevc_epel_uni_w_hv_9","_put_hevc_pel_uni_w_pixels_10","_put_hevc_qpel_uni_w_h_10","_put_hevc_qpel_uni_w_v_10","_put_hevc_qpel_uni_w_hv_10","_put_hevc_epel_uni_w_h_10","_put_hevc_epel_uni_w_v_10","_put_hevc_epel_uni_w_hv_10","_put_hevc_pel_uni_w_pixels_12","_put_hevc_qpel_uni_w_h_12","_put_hevc_qpel_uni_w_v_12","_put_hevc_qpel_uni_w_hv_12","_put_hevc_epel_uni_w_h_12","_put_hevc_epel_uni_w_v_12","_put_hevc_epel_uni_w_hv_12","_put_hevc_pel_uni_w_pixels_8","_put_hevc_qpel_uni_w_h_8","_put_hevc_qpel_uni_w_v_8","_put_hevc_qpel_uni_w_hv_8","_put_hevc_epel_uni_w_h_8","_put_hevc_epel_uni_w_v_8","_put_hevc_epel_uni_w_hv_8"],xr=[0,"jsCall_viiiiiiiiiiii_0","jsCall_viiiiiiiiiiii_1","jsCall_viiiiiiiiiiii_2","jsCall_viiiiiiiiiiii_3","jsCall_viiiiiiiiiiii_4","jsCall_viiiiiiiiiiii_5","jsCall_viiiiiiiiiiii_6","jsCall_viiiiiiiiiiii_7","jsCall_viiiiiiiiiiii_8","jsCall_viiiiiiiiiiii_9","jsCall_viiiiiiiiiiii_10","jsCall_viiiiiiiiiiii_11","jsCall_viiiiiiiiiiii_12","jsCall_viiiiiiiiiiii_13","jsCall_viiiiiiiiiiii_14","jsCall_viiiiiiiiiiii_15","jsCall_viiiiiiiiiiii_16","jsCall_viiiiiiiiiiii_17","jsCall_viiiiiiiiiiii_18","jsCall_viiiiiiiiiiii_19","jsCall_viiiiiiiiiiii_20","jsCall_viiiiiiiiiiii_21","jsCall_viiiiiiiiiiii_22","jsCall_viiiiiiiiiiii_23","jsCall_viiiiiiiiiiii_24","jsCall_viiiiiiiiiiii_25","jsCall_viiiiiiiiiiii_26","jsCall_viiiiiiiiiiii_27","jsCall_viiiiiiiiiiii_28","jsCall_viiiiiiiiiiii_29","jsCall_viiiiiiiiiiii_30","jsCall_viiiiiiiiiiii_31","jsCall_viiiiiiiiiiii_32","jsCall_viiiiiiiiiiii_33","jsCall_viiiiiiiiiiii_34","_yuv2rgba32_full_X_c","_yuv2rgbx32_full_X_c","_yuv2argb32_full_X_c","_yuv2xrgb32_full_X_c","_yuv2bgra32_full_X_c","_yuv2bgrx32_full_X_c","_yuv2abgr32_full_X_c","_yuv2xbgr32_full_X_c","_yuv2rgba64le_full_X_c","_yuv2rgbx64le_full_X_c","_yuv2rgba64be_full_X_c","_yuv2rgbx64be_full_X_c","_yuv2bgra64le_full_X_c","_yuv2bgrx64le_full_X_c","_yuv2bgra64be_full_X_c","_yuv2bgrx64be_full_X_c","_yuv2rgb24_full_X_c","_yuv2bgr24_full_X_c","_yuv2rgb48le_full_X_c","_yuv2bgr48le_full_X_c","_yuv2rgb48be_full_X_c","_yuv2bgr48be_full_X_c","_yuv2bgr4_byte_full_X_c","_yuv2rgb4_byte_full_X_c","_yuv2bgr8_full_X_c","_yuv2rgb8_full_X_c","_yuv2gbrp_full_X_c","_yuv2gbrp16_full_X_c","_yuv2rgbx64le_X_c","_yuv2rgba64le_X_c","_yuv2rgbx64be_X_c","_yuv2rgba64be_X_c","_yuv2bgrx64le_X_c","_yuv2bgra64le_X_c","_yuv2bgrx64be_X_c","_yuv2bgra64be_X_c","_yuv2rgba32_X_c","_yuv2rgbx32_X_c","_yuv2rgba32_1_X_c","_yuv2rgbx32_1_X_c","_yuv2rgb16_X_c","_yuv2rgb15_X_c","_yuv2rgb12_X_c","_yuv2rgb8_X_c","_yuv2rgb4_X_c","_yuv2rgb4b_X_c","_yuv2rgb48le_X_c","_yuv2rgb48be_X_c","_yuv2bgr48le_X_c","_yuv2bgr48be_X_c","_yuv2rgb24_X_c","_yuv2bgr24_X_c","_yuv2monowhite_X_c","_yuv2ayuv64le_X_c","_yuv2monoblack_X_c","_yuv2yuyv422_X_c","_yuv2yvyu422_X_c","_yuv2uyvy422_X_c","_yuv2ya8_X_c","_yuv2ya16le_X_c","_yuv2ya16be_X_c","_sao_edge_restore_0_9","_sao_edge_restore_1_9","_sao_edge_restore_0_10","_sao_edge_restore_1_10","_sao_edge_restore_0_12","_sao_edge_restore_1_12","_sao_edge_restore_0_8","_sao_edge_restore_1_8",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Mr=[0,"jsCall_viiiiiiiiiiiiii_0","jsCall_viiiiiiiiiiiiii_1","jsCall_viiiiiiiiiiiiii_2","jsCall_viiiiiiiiiiiiii_3","jsCall_viiiiiiiiiiiiii_4","jsCall_viiiiiiiiiiiiii_5","jsCall_viiiiiiiiiiiiii_6","jsCall_viiiiiiiiiiiiii_7","jsCall_viiiiiiiiiiiiii_8","jsCall_viiiiiiiiiiiiii_9","jsCall_viiiiiiiiiiiiii_10","jsCall_viiiiiiiiiiiiii_11","jsCall_viiiiiiiiiiiiii_12","jsCall_viiiiiiiiiiiiii_13","jsCall_viiiiiiiiiiiiii_14","jsCall_viiiiiiiiiiiiii_15","jsCall_viiiiiiiiiiiiii_16","jsCall_viiiiiiiiiiiiii_17","jsCall_viiiiiiiiiiiiii_18","jsCall_viiiiiiiiiiiiii_19","jsCall_viiiiiiiiiiiiii_20","jsCall_viiiiiiiiiiiiii_21","jsCall_viiiiiiiiiiiiii_22","jsCall_viiiiiiiiiiiiii_23","jsCall_viiiiiiiiiiiiii_24","jsCall_viiiiiiiiiiiiii_25","jsCall_viiiiiiiiiiiiii_26","jsCall_viiiiiiiiiiiiii_27","jsCall_viiiiiiiiiiiiii_28","jsCall_viiiiiiiiiiiiii_29","jsCall_viiiiiiiiiiiiii_30","jsCall_viiiiiiiiiiiiii_31","jsCall_viiiiiiiiiiiiii_32","jsCall_viiiiiiiiiiiiii_33","jsCall_viiiiiiiiiiiiii_34","_put_hevc_pel_bi_w_pixels_9","_put_hevc_qpel_bi_w_h_9","_put_hevc_qpel_bi_w_v_9","_put_hevc_qpel_bi_w_hv_9","_put_hevc_epel_bi_w_h_9","_put_hevc_epel_bi_w_v_9","_put_hevc_epel_bi_w_hv_9","_put_hevc_pel_bi_w_pixels_10","_put_hevc_qpel_bi_w_h_10","_put_hevc_qpel_bi_w_v_10","_put_hevc_qpel_bi_w_hv_10","_put_hevc_epel_bi_w_h_10","_put_hevc_epel_bi_w_v_10","_put_hevc_epel_bi_w_hv_10","_put_hevc_pel_bi_w_pixels_12","_put_hevc_qpel_bi_w_h_12","_put_hevc_qpel_bi_w_v_12","_put_hevc_qpel_bi_w_hv_12","_put_hevc_epel_bi_w_h_12","_put_hevc_epel_bi_w_v_12","_put_hevc_epel_bi_w_hv_12","_put_hevc_pel_bi_w_pixels_8","_put_hevc_qpel_bi_w_h_8","_put_hevc_qpel_bi_w_v_8","_put_hevc_qpel_bi_w_hv_8","_put_hevc_epel_bi_w_h_8","_put_hevc_epel_bi_w_v_8","_put_hevc_epel_bi_w_hv_8"],kr={dd:zi,did:Hi,didd:Vi,fii:Yi,fiii:qi,ii:Wi,iid:Xi,iidiiii:Gi,iii:Ki,iiii:Qi,iiiii:Zi,iiiiii:Ji,iiiiiii:$i,iiiiiiii:er,iiiiij:tr,iiiji:ir,iiijjji:rr,jiiij:nr,jiiji:ar,jiji:sr,v:or,vdiidiiiii:lr,vi:fr,vii:ur,viidi:hr,viifi:cr,viii:dr,viiii:_r,viiiid:pr,viiiifii:mr,viiiii:br,viiiiidd:vr,viiiiii:yr,viiiiiifi:gr,viiiiiii:wr,viiiiiiii:Er,viiiiiiiid:Cr,viiiiiiiidi:Sr,viiiiiiiii:jr,viiiiiiiiii:Tr,viiiiiiiiiii:Ar,viiiiiiiiiiii:xr,viiiiiiiiiiiiii:Mr};function Pr(e){Ie(e,"dd")}function Ir(e){Ie(e,"did")}function Rr(e){Ie(e,"didd")}function Ur(e){Ie(e,"fii")}function Dr(e){Ie(e,"fiii")}function Fr(e){Ie(e,"ii")}function Or(e){Ie(e,"iid")}function Lr(e){Ie(e,"iidiiii")}function Br(e){Ie(e,"iii")}function Nr(e){Ie(e,"iiii")}function zr(e){Ie(e,"iiiii")}function Hr(e){Ie(e,"iiiiii")}function Vr(e){Ie(e,"iiiiiii")}function Yr(e){Ie(e,"iiiiiiii")}function qr(e){Ie(e,"iiiiij")}function Wr(e){Ie(e,"iiiji")}function Xr(e){Ie(e,"iiijjji")}function Gr(e){Ie(e,"jiiij")}function Kr(e){Ie(e,"jiiji")}function Qr(e){Ie(e,"jiji")}function Zr(e){Ie(e,"v")}function Jr(e){Ie(e,"vdiidiiiii")}function $r(e){Ie(e,"vi")}function en(e){Ie(e,"vii")}function tn(e){Ie(e,"viidi")}function rn(e){Ie(e,"viifi")}function nn(e){Ie(e,"viii")}function an(e){Ie(e,"viiii")}function sn(e){Ie(e,"viiiid")}function on(e){Ie(e,"viiiifii")}function ln(e){Ie(e,"viiiii")}function fn(e){Ie(e,"viiiiidd")}function un(e){Ie(e,"viiiiii")}function hn(e){Ie(e,"viiiiiifi")}function cn(e){Ie(e,"viiiiiii")}function dn(e){Ie(e,"viiiiiiii")}function _n(e){Ie(e,"viiiiiiiid")}function pn(e){Ie(e,"viiiiiiiidi")}function mn(e){Ie(e,"viiiiiiiii")}function bn(e){Ie(e,"viiiiiiiiii")}function vn(e){Ie(e,"viiiiiiiiiii")}function yn(e){Ie(e,"viiiiiiiiiiii")}function gn(e){Ie(e,"viiiiiiiiiiiiii")}function wn(e,t){return F[e](t)}function En(e,t,i){return F[e](t,i)}function Cn(e,t,i,r){return F[e](t,i,r)}function Sn(e,t,i){return F[e](t,i)}function jn(e,t,i,r){return F[e](t,i,r)}function Tn(e,t){return F[e](t)}function An(e,t,i){return F[e](t,i)}function xn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Mn(e,t,i){return F[e](t,i)}function kn(e,t,i,r){return F[e](t,i,r)}function Pn(e,t,i,r,n){return F[e](t,i,r,n)}function In(e,t,i,r,n,a){return F[e](t,i,r,n,a)}function Rn(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Un(e,t,i,r,n,a,s,o){return F[e](t,i,r,n,a,s,o)}function Dn(e,t,i,r,n,a){return F[e](t,i,r,n,a)}function Fn(e,t,i,r,n){return F[e](t,i,r,n)}function On(e,t,i,r,n,a,s){return F[e](t,i,r,n,a,s)}function Ln(e,t,i,r,n){return F[e](t,i,r,n)}function Bn(e,t,i,r,n){return F[e](t,i,r,n)}function Nn(e,t,i,r){return F[e](t,i,r)}function zn(e){F[e]()}function Hn(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function Vn(e,t){F[e](t)}function Yn(e,t,i){F[e](t,i)}function qn(e,t,i,r,n){F[e](t,i,r,n)}function Wn(e,t,i,r,n){F[e](t,i,r,n)}function Xn(e,t,i,r){F[e](t,i,r)}function Gn(e,t,i,r,n){F[e](t,i,r,n)}function Kn(e,t,i,r,n,a){F[e](t,i,r,n,a)}function Qn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function Zn(e,t,i,r,n,a){F[e](t,i,r,n,a)}function Jn(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function $n(e,t,i,r,n,a,s){F[e](t,i,r,n,a,s)}function ea(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l)}function ta(e,t,i,r,n,a,s,o){F[e](t,i,r,n,a,s,o)}function ia(e,t,i,r,n,a,s,o,l){F[e](t,i,r,n,a,s,o,l)}function ra(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function na(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u)}function aa(e,t,i,r,n,a,s,o,l,f){F[e](t,i,r,n,a,s,o,l,f)}function sa(e,t,i,r,n,a,s,o,l,f,u){F[e](t,i,r,n,a,s,o,l,f,u)}function oa(e,t,i,r,n,a,s,o,l,f,u,h){F[e](t,i,r,n,a,s,o,l,f,u,h)}function la(e,t,i,r,n,a,s,o,l,f,u,h,c){F[e](t,i,r,n,a,s,o,l,f,u,h,c)}function fa(e,t,i,r,n,a,s,o,l,f,u,h,c,d,_){F[e](t,i,r,n,a,s,o,l,f,u,h,c,d,_)}var ua={},ha={___buildEnvironment:Et,___lock:Ct,___syscall221:Ft,___syscall3:Ot,___syscall5:Lt,___unlock:Bt,___wasi_fd_close:zt,___wasi_fd_fdstat_get:Vt,___wasi_fd_seek:qt,___wasi_fd_write:Xt,__emscripten_fetch_free:Gt,__memory_base:1024,__table_base:0,_abort:Kt,_clock:Qt,_clock_gettime:$t,_emscripten_asm_const_i:pt,_emscripten_get_heap_size:ei,_emscripten_is_main_browser_thread:ti,_emscripten_memcpy_big:Ci,_emscripten_resize_heap:ri,_emscripten_start_fetch:fi,_fabs:ui,_getenv:hi,_gettimeofday:ci,_gmtime_r:_i,_llvm_exp2_f64:mi,_llvm_log2_f32:bi,_llvm_stackrestore:vi,_llvm_stacksave:yi,_llvm_trunc_f64:gi,_localtime_r:Ei,_nanosleep:ji,_pthread_cond_destroy:Ti,_pthread_cond_init:Ai,_pthread_create:xi,_pthread_join:Mi,_strftime:Di,_sysconf:Fi,_time:Oi,abortStackOverflow:Pe,getTempRet0:H,jsCall_dd:wn,jsCall_did:En,jsCall_didd:Cn,jsCall_fii:Sn,jsCall_fiii:jn,jsCall_ii:Tn,jsCall_iid:An,jsCall_iidiiii:xn,jsCall_iii:Mn,jsCall_iiii:kn,jsCall_iiiii:Pn,jsCall_iiiiii:In,jsCall_iiiiiii:Rn,jsCall_iiiiiiii:Un,jsCall_iiiiij:Dn,jsCall_iiiji:Fn,jsCall_iiijjji:On,jsCall_jiiij:Ln,jsCall_jiiji:Bn,jsCall_jiji:Nn,jsCall_v:zn,jsCall_vdiidiiiii:Hn,jsCall_vi:Vn,jsCall_vii:Yn,jsCall_viidi:qn,jsCall_viifi:Wn,jsCall_viii:Xn,jsCall_viiii:Gn,jsCall_viiiid:Kn,jsCall_viiiifii:Qn,jsCall_viiiii:Zn,jsCall_viiiiidd:Jn,jsCall_viiiiii:$n,jsCall_viiiiiifi:ea,jsCall_viiiiiii:ta,jsCall_viiiiiiii:ia,jsCall_viiiiiiiid:ra,jsCall_viiiiiiiidi:na,jsCall_viiiiiiiii:aa,jsCall_viiiiiiiiii:sa,jsCall_viiiiiiiiiii:oa,jsCall_viiiiiiiiiiii:la,jsCall_viiiiiiiiiiiiii:fa,memory:N,nullFunc_dd:Pr,nullFunc_did:Ir,nullFunc_didd:Rr,nullFunc_fii:Ur,nullFunc_fiii:Dr,nullFunc_ii:Fr,nullFunc_iid:Or,nullFunc_iidiiii:Lr,nullFunc_iii:Br,nullFunc_iiii:Nr,nullFunc_iiiii:zr,nullFunc_iiiiii:Hr,nullFunc_iiiiiii:Vr,nullFunc_iiiiiiii:Yr,nullFunc_iiiiij:qr,nullFunc_iiiji:Wr,nullFunc_iiijjji:Xr,nullFunc_jiiij:Gr,nullFunc_jiiji:Kr,nullFunc_jiji:Qr,nullFunc_v:Zr,nullFunc_vdiidiiiii:Jr,nullFunc_vi:$r,nullFunc_vii:en,nullFunc_viidi:tn,nullFunc_viifi:rn,nullFunc_viii:nn,nullFunc_viiii:an,nullFunc_viiiid:sn,nullFunc_viiiifii:on,nullFunc_viiiii:ln,nullFunc_viiiiidd:fn,nullFunc_viiiiii:un,nullFunc_viiiiiifi:hn,nullFunc_viiiiiii:cn,nullFunc_viiiiiiii:dn,nullFunc_viiiiiiiid:_n,nullFunc_viiiiiiiidi:pn,nullFunc_viiiiiiiii:mn,nullFunc_viiiiiiiiii:bn,nullFunc_viiiiiiiiiii:vn,nullFunc_viiiiiiiiiiii:yn,nullFunc_viiiiiiiiiiiiii:gn,table:Y},ca=d.asm(ua,ha,ue);d.asm=ca;d._AVSniffHttpFlvInit=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffHttpFlvInit.apply(null,arguments)},d._AVSniffStreamInit=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._AVSniffStreamInit.apply(null,arguments)};var da,_a=d.___emscripten_environ_constructor=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___emscripten_environ_constructor.apply(null,arguments)},pa=(d.___errno_location=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.___errno_location.apply(null,arguments)},d.__get_daylight=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_daylight.apply(null,arguments)}),ma=d.__get_timezone=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_timezone.apply(null,arguments)},ba=d.__get_tzname=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.__get_tzname.apply(null,arguments)},va=(d._closeVideo=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._closeVideo.apply(null,arguments)},d._decodeCodecContext=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeCodecContext.apply(null,arguments)},d._decodeHttpFlvVideoFrame=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeHttpFlvVideoFrame.apply(null,arguments)},d._decodeVideoFrame=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._decodeVideoFrame.apply(null,arguments)},d._demuxBox=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._demuxBox.apply(null,arguments)},d._exitMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitMissile.apply(null,arguments)},d._exitTsMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._exitTsMissile.apply(null,arguments)},d._fflush=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._fflush.apply(null,arguments)},d._free=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._free.apply(null,arguments)}),ya=(d._getAudioCodecID=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getAudioCodecID.apply(null,arguments)},d._getBufferLengthApi=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getBufferLengthApi.apply(null,arguments)},d._getExtensionInfo=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getExtensionInfo.apply(null,arguments)},d._getMediaInfo=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getMediaInfo.apply(null,arguments)},d._getPPS=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPS.apply(null,arguments)},d._getPPSLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPPSLen.apply(null,arguments)},d._getPacket=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getPacket.apply(null,arguments)},d._getSEI=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEI.apply(null,arguments)},d._getSEILen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSEILen.apply(null,arguments)},d._getSPS=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPS.apply(null,arguments)},d._getSPSLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSPSLen.apply(null,arguments)},d._getSniffHttpFlvPkg=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkg.apply(null,arguments)},d._getSniffHttpFlvPkgNoCheckProbe=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffHttpFlvPkgNoCheckProbe.apply(null,arguments)},d._getSniffStreamPkg=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkg.apply(null,arguments)},d._getSniffStreamPkgNoCheckProbe=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getSniffStreamPkgNoCheckProbe.apply(null,arguments)},d._getVLC=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLC.apply(null,arguments)},d._getVLCLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVLCLen.apply(null,arguments)},d._getVPS=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPS.apply(null,arguments)},d._getVPSLen=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVPSLen.apply(null,arguments)},d._getVideoCodecID=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._getVideoCodecID.apply(null,arguments)},d._initMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initMissile.apply(null,arguments)},d._initTsMissile=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initTsMissile.apply(null,arguments)},d._initializeDecoder=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDecoder.apply(null,arguments)},d._initializeDemuxer=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeDemuxer.apply(null,arguments)},d._initializeSniffHttpFlvModule=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModule.apply(null,arguments)},d._initializeSniffHttpFlvModuleWithAOpt=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffHttpFlvModuleWithAOpt.apply(null,arguments)},d._initializeSniffStreamModule=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModule.apply(null,arguments)},d._initializeSniffStreamModuleWithAOpt=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._initializeSniffStreamModuleWithAOpt.apply(null,arguments)},d._main=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._main.apply(null,arguments)},d._malloc=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._malloc.apply(null,arguments)}),ga=(d._pushSniffHttpFlvData=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffHttpFlvData.apply(null,arguments)},d._pushSniffStreamData=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._pushSniffStreamData.apply(null,arguments)},d._registerPlayer=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._registerPlayer.apply(null,arguments)},d._release=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._release.apply(null,arguments)},d._releaseHttpFLV=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseHttpFLV.apply(null,arguments)},d._releaseSniffHttpFlv=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffHttpFlv.apply(null,arguments)},d._releaseSniffStream=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._releaseSniffStream.apply(null,arguments)},d._setCodecType=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm._setCodecType.apply(null,arguments)},d.establishStackSpace=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.establishStackSpace.apply(null,arguments)},d.stackAlloc=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackAlloc.apply(null,arguments)}),wa=d.stackRestore=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackRestore.apply(null,arguments)},Ea=d.stackSave=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.stackSave.apply(null,arguments)},Ca=(d.dynCall_v=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_v.apply(null,arguments)},d.dynCall_vi=function(){return W(Le,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),W(!Be,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),d.asm.dynCall_vi.apply(null,arguments)});function Sa(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}d.asm=ca,Object.getOwnPropertyDescriptor(d,"intArrayFromString")||(d.intArrayFromString=function(){at("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"intArrayToString")||(d.intArrayToString=function(){at("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),d.ccall=G,d.cwrap=K,Object.getOwnPropertyDescriptor(d,"setValue")||(d.setValue=function(){at("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getValue")||(d.getValue=function(){at("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"allocate")||(d.allocate=function(){at("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getMemory")||(d.getMemory=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"AsciiToString")||(d.AsciiToString=function(){at("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToAscii")||(d.stringToAscii=function(){at("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF8ArrayToString")||(d.UTF8ArrayToString=function(){at("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF8ToString")||(d.UTF8ToString=function(){at("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF8Array")||(d.stringToUTF8Array=function(){at("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF8")||(d.stringToUTF8=function(){at("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF8")||(d.lengthBytesUTF8=function(){at("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF16ToString")||(d.UTF16ToString=function(){at("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF16")||(d.stringToUTF16=function(){at("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF16")||(d.lengthBytesUTF16=function(){at("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"UTF32ToString")||(d.UTF32ToString=function(){at("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stringToUTF32")||(d.stringToUTF32=function(){at("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"lengthBytesUTF32")||(d.lengthBytesUTF32=function(){at("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"allocateUTF8")||(d.allocateUTF8=function(){at("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackTrace")||(d.stackTrace=function(){at("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPreRun")||(d.addOnPreRun=function(){at("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnInit")||(d.addOnInit=function(){at("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPreMain")||(d.addOnPreMain=function(){at("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnExit")||(d.addOnExit=function(){at("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addOnPostRun")||(d.addOnPostRun=function(){at("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeStringToMemory")||(d.writeStringToMemory=function(){at("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeArrayToMemory")||(d.writeArrayToMemory=function(){at("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"writeAsciiToMemory")||(d.writeAsciiToMemory=function(){at("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"addRunDependency")||(d.addRunDependency=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"removeRunDependency")||(d.removeRunDependency=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"ENV")||(d.ENV=function(){at("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"FS")||(d.FS=function(){at("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"FS_createFolder")||(d.FS_createFolder=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createPath")||(d.FS_createPath=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createDataFile")||(d.FS_createDataFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createPreloadedFile")||(d.FS_createPreloadedFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createLazyFile")||(d.FS_createLazyFile=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createLink")||(d.FS_createLink=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_createDevice")||(d.FS_createDevice=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"FS_unlink")||(d.FS_unlink=function(){at("'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")}),Object.getOwnPropertyDescriptor(d,"GL")||(d.GL=function(){at("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"dynamicAlloc")||(d.dynamicAlloc=function(){at("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"loadDynamicLibrary")||(d.loadDynamicLibrary=function(){at("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"loadWebAssemblyModule")||(d.loadWebAssemblyModule=function(){at("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getLEB")||(d.getLEB=function(){at("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getFunctionTables")||(d.getFunctionTables=function(){at("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"alignFunctionTables")||(d.alignFunctionTables=function(){at("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"registerFunctions")||(d.registerFunctions=function(){at("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),d.addFunction=O,Object.getOwnPropertyDescriptor(d,"removeFunction")||(d.removeFunction=function(){at("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getFuncWrapper")||(d.getFuncWrapper=function(){at("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"prettyPrint")||(d.prettyPrint=function(){at("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"makeBigInt")||(d.makeBigInt=function(){at("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"dynCall")||(d.dynCall=function(){at("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getCompilerSetting")||(d.getCompilerSetting=function(){at("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackSave")||(d.stackSave=function(){at("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackRestore")||(d.stackRestore=function(){at("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"stackAlloc")||(d.stackAlloc=function(){at("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"establishStackSpace")||(d.establishStackSpace=function(){at("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"print")||(d.print=function(){at("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"printErr")||(d.printErr=function(){at("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"getTempRet0")||(d.getTempRet0=function(){at("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"setTempRet0")||(d.setTempRet0=function(){at("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"callMain")||(d.callMain=function(){at("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"abort")||(d.abort=function(){at("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"Pointer_stringify")||(d.Pointer_stringify=function(){at("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"warnOnce")||(d.warnOnce=function(){at("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(d,"ALLOC_NORMAL")||Object.defineProperty(d,"ALLOC_NORMAL",{configurable:!0,get:function(){at("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_STACK")||Object.defineProperty(d,"ALLOC_STACK",{configurable:!0,get:function(){at("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_DYNAMIC")||Object.defineProperty(d,"ALLOC_DYNAMIC",{configurable:!0,get:function(){at("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"ALLOC_NONE")||Object.defineProperty(d,"ALLOC_NONE",{configurable:!0,get:function(){at("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(d,"calledRun")||Object.defineProperty(d,"calledRun",{configurable:!0,get:function(){at("'calledRun' 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")}});function ja(e){W(0==Je,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),W(0==Ue.length,"cannot call main when preRun functions remain to be called");var t=(e=e||[]).length+1,i=ga(4*(t+1));pe[i>>2]=oe(m);for(var r=1;r>2)+r]=oe(e[r-1]);pe[(i>>2)+t]=0;try{xa(d._main(t,i),!0)}catch(e){if(e instanceof Sa)return;if("SimulateInfiniteLoop"==e)return void(B=!0);var n=e;e&&"object"===u(e)&&e.stack&&(n=[e,e.stack]),k("exception thrown: "+n),b(1,e)}finally{!0}}function Ta(e){function t(){da||(da=!0,q||(ze(),He(),d.onRuntimeInitialized&&d.onRuntimeInitialized(),Ma&&ja(e),Ye()))}e=e||p,Je>0||(Me(),Ne(),Je>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),t()}),1)):t(),ke()))}function Aa(){var e=M,t=k,i=!1;M=k=function(e){i=!0};try{var r=d._fflush;r&&r(0),["stdout","stderr"].forEach((function(e){var t=Ut.analyzePath("/dev/"+e);if(t){var r=t.object.rdev,n=At.ttys[r];n&&n.output&&n.output.length&&(i=!0)}}))}catch(e){}M=e,k=t,i&&R("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.")}function xa(e,t){Aa(),t&&B&&0===e||(B?t||k("exit("+e+") called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)"):(q=!0,e,Ve(),d.onExit&&d.onExit(e)),b(e,new Sa(e)))}if(et=function e(){da||Ta(),da||(et=e)},d.run=Ta,d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();var Ma=!0;d.noInitialRun&&(Ma=!1),B=!0,Ta(),t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/src/decoder")},{_process:158,buffer:66,crypto:75,fs:64,path:150}],2:[function(e,t,i){"use strict";const r=i;r.bignum=e("bn.js"),r.define=e("./asn1/api").define,r.base=e("./asn1/base"),r.constants=e("./asn1/constants"),r.decoders=e("./asn1/decoders"),r.encoders=e("./asn1/encoders")},{"./asn1/api":3,"./asn1/base":5,"./asn1/constants":9,"./asn1/decoders":11,"./asn1/encoders":14,"bn.js":16}],3:[function(e,t,i){"use strict";const r=e("./encoders"),n=e("./decoders"),a=e("inherits");function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}i.define=function(e,t){return new s(e,t)},s.prototype._createNamed=function(e){const t=this.name;function i(e){this._initNamed(e,t)}return a(i,e),i.prototype._initNamed=function(t,i){e.call(this,t,i)},new i(this)},s.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n[e])),this.decoders[e]},s.prototype.decode=function(e,t,i){return this._getDecoder(t).decode(e,i)},s.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},s.prototype.encode=function(e,t,i){return this._getEncoder(t).encode(e,i)}},{"./decoders":11,"./encoders":14,inherits:136}],4:[function(e,t,i){"use strict";const r=e("inherits"),n=e("../base/reporter").Reporter,a=e("safer-buffer").Buffer;function s(e,t){n.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return o.isEncoderBuffer(e)||(e=new o(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=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(s,n),i.DecoderBuffer=s,s.isDecoderBuffer=function(e){if(e instanceof s)return!0;return"object"==typeof e&&a.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const i=new s(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},i.EncoderBuffer=o,o.isEncoderBuffer=function(e){if(e instanceof o)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},o.prototype.join=function(e,t){return e||(e=a.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(e,t),t+=i.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},{"../base/reporter":7,inherits:136,"safer-buffer":185}],5:[function(e,t,i){"use strict";const r=i;r.Reporter=e("./reporter").Reporter,r.DecoderBuffer=e("./buffer").DecoderBuffer,r.EncoderBuffer=e("./buffer").EncoderBuffer,r.Node=e("./node")},{"./buffer":4,"./node":6,"./reporter":7}],6:[function(e,t,i){"use strict";const r=e("../base/reporter").Reporter,n=e("../base/buffer").EncoderBuffer,a=e("../base/buffer").DecoderBuffer,s=e("minimalistic-assert"),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function f(e,t,i){const r={};this._baseState=r,r.name=i,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())}t.exports=f;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(i){t[i]=e[i]}));const i=new this.constructor(t.parent);return i._baseState=t,i},f.prototype._wrap=function(){const e=this._baseState;l.forEach((function(t){this[t]=function(){const i=new this.constructor(this);return e.children.push(i),i[t].apply(i,arguments)}}),this)},f.prototype._init=function(e){const 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")},f.prototype._useArgs=function(e){const t=this._baseState,i=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==i.length&&(s(null===t.children),t.children=i,i.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;const t={};return Object.keys(e).forEach((function(i){i==(0|i)&&(i|=0);const r=e[i];t[r]=i})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){f.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),o.forEach((function(e){f.prototype[e]=function(){const t=this._baseState,i=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(i),this}})),f.prototype.use=function(e){s(e);const t=this._baseState;return s(null===t.use),t.use=e,this},f.prototype.optional=function(){return this._baseState.optional=!0,this},f.prototype.def=function(e){const t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},f.prototype.explicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},f.prototype.implicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},f.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},f.prototype.key=function(e){const t=this._baseState;return s(null===t.key),t.key=e,this},f.prototype.any=function(){return this._baseState.any=!0,this},f.prototype.choice=function(e){const t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},f.prototype.contains=function(e){const t=this._baseState;return s(null===t.use),t.contains=e,this},f.prototype._decode=function(e,t){const i=this._baseState;if(null===i.parent)return e.wrapResult(i.children[0]._decode(e,t));let r,n=i.default,s=!0,o=null;if(null!==i.key&&(o=e.enterKey(i.key)),i.optional){let r=null;if(null!==i.explicit?r=i.explicit:null!==i.implicit?r=i.implicit:null!==i.tag&&(r=i.tag),null!==r||i.any){if(s=this._peekTag(e,r,i.any),e.isError(s))return s}else{const r=e.save();try{null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(r)}}if(i.obj&&s&&(r=e.enterObject()),s){if(null!==i.explicit){const t=this._decodeTag(e,i.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===i.use&&null===i.choice){let t;i.any&&(t=e.save());const r=this._decodeTag(e,null!==i.implicit?i.implicit:i.tag,i.any);if(e.isError(r))return r;i.any?n=e.raw(t):e=r}if(t&&t.track&&null!==i.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==i.tag&&t.track(e.path(),e.offset,e.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(i){i._decode(e,t)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){const r=new a(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(r,t)}}return i.obj&&s&&(n=e.leaveObject(r)),null===i.key||null===n&&!0!==s?null!==o&&e.exitKey(o):e.leaveKey(o,i.key,n),n},f.prototype._decodeGeneric=function(e,t,i){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],i):/str$/.test(e)?this._decodeStr(t,e,i):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],i):"objid"===e?this._decodeObjid(t,null,null,i):"gentime"===e||"utctime"===e?this._decodeTime(t,e,i):"null_"===e?this._decodeNull(t,i):"bool"===e?this._decodeBool(t,i):"objDesc"===e?this._decodeStr(t,e,i):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,i):t.error("unknown tag: "+e)},f.prototype._getUse=function(e,t){const i=this._baseState;return i.useDecoder=this._use(e,t),s(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},f.prototype._decodeChoice=function(e,t){const i=this._baseState;let r=null,n=!1;return Object.keys(i.choice).some((function(a){const s=e.save(),o=i.choice[a];try{const i=o._decode(e,t);if(e.isError(i))return!1;r={type:a,value:i},n=!0}catch(t){return e.restore(s),!1}return!0}),this),n?r:e.error("Choice not matched")},f.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},f.prototype._encode=function(e,t,i){const r=this._baseState;if(null!==r.default&&r.default===e)return;const n=this._encodeValue(e,t,i);return void 0===n||this._skipDefault(n,t,i)?void 0:n},f.prototype._encodeValue=function(e,t,i){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new r);let a=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}let s=null,o=!1;if(n.any)a=this._createEncoderBuffer(e);else if(n.choice)a=this._encodeChoice(e,t);else if(n.contains)s=this._getUse(n.contains,i)._encode(e,t),o=!0;else if(n.children)s=n.children.map((function(i){if("null_"===i._baseState.tag)return i._encode(null,t,e);if(null===i._baseState.key)return t.error("Child should have a key");const r=t.enterKey(i._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const n=i._encode(e[i._baseState.key],t,e);return t.leaveKey(r),n}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const i=this.clone();i._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(i){const r=this._baseState;return this._getUse(r.args[0],e)._encode(i,t)}),i))}else null!==n.use?a=this._getUse(n.use,i)._encode(e,t):(s=this._encodePrimitive(n.tag,e),o=!0);if(!n.any&&null===n.choice){const e=null!==n.implicit?n.implicit:n.tag,i=null===n.implicit?"universal":"context";null===e?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(a=this._encodeComposite(e,o,i,s))}return null!==n.explicit&&(a=this._encodeComposite(n.explicit,!1,"context",a)),a},f.prototype._encodeChoice=function(e,t){const i=this._baseState,r=i.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(e.value,t)},f.prototype._encodePrimitive=function(e,t){const i=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&i.args)return this._encodeObjid(t,i.reverseArgs[0],i.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,i.args&&i.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},f.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},f.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},{"../base/buffer":4,"../base/reporter":7,"minimalistic-assert":142}],7:[function(e,t,i){"use strict";const r=e("inherits");function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function a(e,t){this.path=e,this.rethrow(t)}i.Reporter=n,n.prototype.isError=function(e){return e instanceof a},n.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,i){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=i)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){const t=this._reporterState,i=t.obj;return t.obj=e,i},n.prototype.error=function(e){let t;const i=this._reporterState,r=e instanceof a;if(t=r?e:new a(i.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!i.options.partial)throw t;return r||i.errors.push(t),t},n.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(a,Error),a.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:136}],8:[function(e,t,i){"use strict";function r(e){const t={};return Object.keys(e).forEach((function(i){(0|i)==i&&(i|=0);const r=e[i];t[r]=i})),t}i.tagClass={0:"universal",1:"application",2:"context",3:"private"},i.tagClassByName=r(i.tagClass),i.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"},i.tagByName=r(i.tag)},{}],9:[function(e,t,i){"use strict";const r=i;r._reverse=function(e){const t={};return Object.keys(e).forEach((function(i){(0|i)==i&&(i|=0);const r=e[i];t[r]=i})),t},r.der=e("./der")},{"./der":8}],10:[function(e,t,i){"use strict";const r=e("inherits"),n=e("bn.js"),a=e("../base/buffer").DecoderBuffer,s=e("../base/node"),o=e("../constants/der");function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){s.call(this,"der",e)}function u(e,t){let i=e.readUInt8(t);if(e.isError(i))return i;const r=o.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){let r=i;for(i=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;i<<=7,i|=127&r}}else i&=31;return{cls:r,primitive:n,tag:i,tagStr:o.tag[i]}}function h(e,t,i){let r=e.readUInt8(i);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const n=127&r;if(n>4)return e.error("length octect is too long");r=0;for(let t=0;t=31)return r.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=s.tagClassByName[i||"universal"]<<6,n}(e,t,i,this.reporter);if(r.length<128){const e=n.alloc(2);return e[0]=a,e[1]=r.length,this._createEncoderBuffer([e,r])}let o=1;for(let e=r.length;e>=256;e>>=8)o++;const l=n.alloc(2+o);l[0]=a,l[1]=128|o;for(let e=1+o,t=r.length;t>0;e--,t>>=8)l[e]=255&t;return this._createEncoderBuffer([l,r])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=n.alloc(2*e.length);for(let i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let t=0;t=128;i>>=7)r++}const a=n.alloc(r);let s=a.length-1;for(let t=e.length-1;t>=0;t--){let i=e[t];for(a[s--]=127&i;(i>>=7)>0;)a[s--]=128|127&i}return this._createEncoderBuffer(a)},l.prototype._encodeTime=function(e,t){let i;const r=new Date(e);return"gentime"===t?i=[f(r.getUTCFullYear()),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?i=[f(r.getUTCFullYear()%100),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(i,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.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&&!n.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=n.from(t)}if(n.isBuffer(e)){let t=e.length;0===e.length&&t++;const i=n.alloc(t);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let i=1;for(let t=e;t>=256;t>>=8)i++;const r=new Array(i);for(let t=r.length-1;t>=0;t--)r[t]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(n.from(r))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,i){const r=this._baseState;let n;if(null===r.default)return!1;const a=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,i).join()),a.length!==r.defaultBuffer.length)return!1;for(n=0;n=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function l(e,t,i,r){for(var n=0,a=Math.min(e.length,i),s=t;s=49?o-49+10:o>=17?o-17+10:o}return n}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,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6)n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,h=67108863&l,c=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=c;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+h)/67108864|0,h=67108863&s}i.words[f]=0|h,l=0|u}return 0!==l?i.words[f]=0|l:i.length--,i.strip()}a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?f[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--)}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=u[e],d=h[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modn(d).toString(e);i=(_=_.idivn(d)).isZero()?p+i:f[c-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!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&&r(!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 r(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var s,o,l="le"===t,f=new e(a),u=this.clone();if(l){for(o=0;!u.isZero();o++)s=u.andln(255),u.iushrn(8),f[o]=s;for(;o=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;for(;0!==n&&a>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==a&&s>26,this.words[s]=67108863&t;if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,W=0|o[2],X=8191&W,G=W>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],he=8191&ue,ce=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(h,z))|0)+((8191&(n=(n=Math.imul(h,H))+Math.imul(c,z)|0))<<13)|0;f=((a=Math.imul(c,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(h,Y)|0)|0)+((8191&(n=(n=n+Math.imul(h,q)|0)+Math.imul(c,Y)|0))<<13)|0;f=((a=a+Math.imul(c,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(h,X)|0)|0)+((8191&(n=(n=n+Math.imul(h,G)|0)+Math.imul(c,X)|0))<<13)|0;f=((a=a+Math.imul(c,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,X)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(h,Q)|0)|0)+((8191&(n=(n=n+Math.imul(h,Z)|0)+Math.imul(c,Q)|0))<<13)|0;f=((a=a+Math.imul(c,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,X)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(h,$)|0)|0)+((8191&(n=(n=n+Math.imul(h,ee)|0)+Math.imul(c,$)|0))<<13)|0;f=((a=a+Math.imul(c,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,X)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(h,ie)|0)|0)+((8191&(n=(n=n+Math.imul(h,re)|0)+Math.imul(c,ie)|0))<<13)|0;f=((a=a+Math.imul(c,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,X)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(h,ae)|0)|0)+((8191&(n=(n=n+Math.imul(h,se)|0)+Math.imul(c,ae)|0))<<13)|0;f=((a=a+Math.imul(c,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,X)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,X)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(h,le)|0)|0)+((8191&(n=(n=n+Math.imul(h,fe)|0)+Math.imul(c,le)|0))<<13)|0;f=((a=a+Math.imul(c,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,X)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(h,he)|0)|0)+((8191&(n=(n=n+Math.imul(h,ce)|0)+Math.imul(c,he)|0))<<13)|0;f=((a=a+Math.imul(c,ce)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,he)|0,n=(n=n+Math.imul(_,ce)|0)+Math.imul(p,he)|0,a=a+Math.imul(p,ce)|0;var je=(f+(r=r+Math.imul(h,_e)|0)|0)+((8191&(n=(n=n+Math.imul(h,pe)|0)+Math.imul(c,_e)|0))<<13)|0;f=((a=a+Math.imul(c,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,X)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,X)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,he)|0,n=(n=n+Math.imul(b,ce)|0)+Math.imul(v,he)|0,a=a+Math.imul(v,ce)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,X),n=(n=Math.imul(L,G))+Math.imul(B,X)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,he)|0,n=(n=n+Math.imul(g,ce)|0)+Math.imul(w,he)|0,a=a+Math.imul(w,ce)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,he)|0,n=(n=n+Math.imul(C,ce)|0)+Math.imul(S,he)|0,a=a+Math.imul(S,ce)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,he)|0,n=(n=n+Math.imul(T,ce)|0)+Math.imul(A,he)|0,a=a+Math.imul(A,ce)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,he)|0,n=(n=n+Math.imul(M,ce)|0)+Math.imul(k,he)|0,a=a+Math.imul(k,ce)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,he)|0,n=(n=n+Math.imul(I,ce)|0)+Math.imul(R,he)|0,a=a+Math.imul(R,ce)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,he)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(F,he)|0,a=a+Math.imul(F,ce)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,he),n=(n=Math.imul(L,ce))+Math.imul(B,he)|0,a=Math.imul(B,ce);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i};function _(e,t,i){return(new p).mulp(e,t,i)}function p(e,t){this.x=e,this.y=t}Math.imul||(d=c),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):i<63?c(this,e,t):i<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863}i.words[a]=o,r=s,s=n}return 0!==r?i.words[a]=r:i.length--,i.strip()}(this,e,t):_(this,e,t)},p.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;return r},p.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;for(s=2*t;s>=26,t+=n/67108864|0,t+=a>>>26,this.words[i]=67108863&a}return 0!==t&&(this.words[i]=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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n}return t}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var h=0|this.words[f];this.words[f]=u<<26-a|h>>>a,u=h&o}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a}for(;n>26,this.words[n+i]=67108863&a;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;h--){var c=67108864*(0|r.words[n.length+h])+(0|r.words[n.length+h-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,h);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(n,1,h),r.isZero()||(r.negative^=1);o&&(o.words[h]=c)}return o&&o.strip(),r.strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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);var n,s,o},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);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){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},a.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++f;for(var u=i.clone(),h=t.clone();!t.isZero();){for(var c=0,d=1;0==(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(h)),n.iushrn(1),s.iushrn(1);for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1);if(_>0)for(i.iushrn(_);_-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(h)),o.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s))}return{a:o,b:l,gcd:i.iushln(f)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,c=1;0==(i.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(i.iushrn(h);h-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s))}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var a=t;t=i,i=a}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 E(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){E.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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},n(v,b),v.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new g;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,n),c=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++)p=p.redSqr();r(m<_);var b=this.pow(h,new a(1).iushln(_-m-1));c=c.redMul(b),h=b.redSqr(),d=d.redMul(h),_=m}return c},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var h=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==h||0!==s?(s<<=1,s|=h,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0}l=26}return n},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new C(e)},n(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:20}],17:[function(e,t,i){"use strict";i.byteLength=function(e){var t=f(e),i=t[0],r=t[1];return 3*(i+r)/4-r},i.toByteArray=function(e){var t,i,r=f(e),s=r[0],o=r[1],l=new a(function(e,t,i){return 3*(t+i)/4-i}(0,s,o)),u=0,h=o>0?s-4:s;for(i=0;i>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===o&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,l[u++]=255&t);1===o&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},i.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],s=0,o=i-n;so?o:s+16383));1===n?(t=e[i-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[i-2]<<8)+e[i-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function u(e,t,i){for(var n,a,s=[],o=t;o>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],18:[function(e,t,i){!function(t,i){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function a(e,t,i){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var s;"object"==typeof t?t.exports=a:i.BN=a,a.BN=a,a.wordSize=26;try{s=e("buffer").Buffer}catch(e){}function o(e,t,i){for(var n=0,a=Math.min(e.length,i),s=0,o=t;o=49&&f<=54?f-49+10:f>=17&&f<=22?f-17+10:f,s|=l}return r(!(240&s),"Invalid character in "+e),n}function l(e,t,i,n){for(var a=0,s=0,o=Math.min(e.length,i),l=t;l=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&s0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this._strip(),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initNumber=function(e,t,i){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},a.prototype._initArray=function(e,t,i){if(r("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=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===i)for(n=0,a=0;n>>26-o&67108863,(o+=24)>=26&&(o-=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 i=0;i=t;i-=6)n=o(e,i,i+6),this.words[r]|=n<>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<>>26-a&4194303),this._strip()},a.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var a=e.length-i,s=a%r,o=Math.min(a,a-s)+i,f=0,u=i;u1&&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},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){a.prototype.inspect=u}else a.prototype.inspect=u;function u(){return(this.red?""}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,a=0,s=0;s>>24-n&16777215)||s!==this.length-1?h[6-l.length]+l+i:l+i,(n+=2)>=26&&(n-=26,s--)}for(0!==a&&(i=a.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var f=c[e],u=d[e];i="";var _=this.clone();for(_.negative=0;!_.isZero();){var p=_.modrn(u).toString(e);i=(_=_.idivn(u)).isZero()?p+i:h[f-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function _(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],a=0|t.words[0],s=n*a,o=67108863&s,l=s/67108864|0;i.words[0]=o;for(var f=1;f>>26,h=67108863&l,c=Math.min(f,t.length-1),d=Math.max(0,f-e.length+1);d<=c;d++){var _=f-d|0;u+=(s=(n=0|e.words[_])*(a=0|t.words[d])+h)/67108864|0,h=67108863&s}i.words[f]=0|h,l=0|u}return 0!==l?i.words[f]=0|l:i.length--,i._strip()}a.prototype.toArrayLike=function(e,t,i){this._strip();var n=this.byteLength(),a=i||Math.max(1,n);r(n<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,n),s},a.prototype._toArrayLikeLE=function(e,t){for(var i=0,r=0,n=0,a=0;n>8&255),i>16&255),6===a?(i>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(i=0&&(e[i--]=s>>8&255),i>=0&&(e[i--]=s>>16&255),6===a?(i>=0&&(e[i--]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(i>=0)for(e[i--]=r;i>=0;)e[i--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},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;te.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 i=0;ie.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,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.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){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a>>26;for(;0!==n&&a>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ae.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==a&&s>26,this.words[s]=67108863&t;if(0===a&&s>>13,d=0|s[1],_=8191&d,p=d>>>13,m=0|s[2],b=8191&m,v=m>>>13,y=0|s[3],g=8191&y,w=y>>>13,E=0|s[4],C=8191&E,S=E>>>13,j=0|s[5],T=8191&j,A=j>>>13,x=0|s[6],M=8191&x,k=x>>>13,P=0|s[7],I=8191&P,R=P>>>13,U=0|s[8],D=8191&U,F=U>>>13,O=0|s[9],L=8191&O,B=O>>>13,N=0|o[0],z=8191&N,H=N>>>13,V=0|o[1],Y=8191&V,q=V>>>13,W=0|o[2],X=8191&W,G=W>>>13,K=0|o[3],Q=8191&K,Z=K>>>13,J=0|o[4],$=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],ae=8191&ne,se=ne>>>13,oe=0|o[7],le=8191&oe,fe=oe>>>13,ue=0|o[8],he=8191&ue,ce=ue>>>13,de=0|o[9],_e=8191&de,pe=de>>>13;i.negative=e.negative^t.negative,i.length=19;var me=(f+(r=Math.imul(h,z))|0)+((8191&(n=(n=Math.imul(h,H))+Math.imul(c,z)|0))<<13)|0;f=((a=Math.imul(c,H))+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(_,z),n=(n=Math.imul(_,H))+Math.imul(p,z)|0,a=Math.imul(p,H);var be=(f+(r=r+Math.imul(h,Y)|0)|0)+((8191&(n=(n=n+Math.imul(h,q)|0)+Math.imul(c,Y)|0))<<13)|0;f=((a=a+Math.imul(c,q)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),n=(n=Math.imul(b,H))+Math.imul(v,z)|0,a=Math.imul(v,H),r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,q)|0)+Math.imul(p,Y)|0,a=a+Math.imul(p,q)|0;var ve=(f+(r=r+Math.imul(h,X)|0)|0)+((8191&(n=(n=n+Math.imul(h,G)|0)+Math.imul(c,X)|0))<<13)|0;f=((a=a+Math.imul(c,G)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(g,z),n=(n=Math.imul(g,H))+Math.imul(w,z)|0,a=Math.imul(w,H),r=r+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,q)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,q)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(p,X)|0,a=a+Math.imul(p,G)|0;var ye=(f+(r=r+Math.imul(h,Q)|0)|0)+((8191&(n=(n=n+Math.imul(h,Z)|0)+Math.imul(c,Q)|0))<<13)|0;f=((a=a+Math.imul(c,Z)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(C,z),n=(n=Math.imul(C,H))+Math.imul(S,z)|0,a=Math.imul(S,H),r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,q)|0)+Math.imul(w,Y)|0,a=a+Math.imul(w,q)|0,r=r+Math.imul(b,X)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(p,Q)|0,a=a+Math.imul(p,Z)|0;var ge=(f+(r=r+Math.imul(h,$)|0)|0)+((8191&(n=(n=n+Math.imul(h,ee)|0)+Math.imul(c,$)|0))<<13)|0;f=((a=a+Math.imul(c,ee)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(T,z),n=(n=Math.imul(T,H))+Math.imul(A,z)|0,a=Math.imul(A,H),r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,q)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,q)|0,r=r+Math.imul(g,X)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(p,$)|0,a=a+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(h,ie)|0)|0)+((8191&(n=(n=n+Math.imul(h,re)|0)+Math.imul(c,ie)|0))<<13)|0;f=((a=a+Math.imul(c,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,z),n=(n=Math.imul(M,H))+Math.imul(k,z)|0,a=Math.imul(k,H),r=r+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,q)|0)+Math.imul(A,Y)|0,a=a+Math.imul(A,q)|0,r=r+Math.imul(C,X)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,G)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(w,Q)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(p,ie)|0,a=a+Math.imul(p,re)|0;var Ee=(f+(r=r+Math.imul(h,ae)|0)|0)+((8191&(n=(n=n+Math.imul(h,se)|0)+Math.imul(c,ae)|0))<<13)|0;f=((a=a+Math.imul(c,se)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,z),n=(n=Math.imul(I,H))+Math.imul(R,z)|0,a=Math.imul(R,H),r=r+Math.imul(M,Y)|0,n=(n=n+Math.imul(M,q)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,q)|0,r=r+Math.imul(T,X)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(A,X)|0,a=a+Math.imul(A,G)|0,r=r+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,Z)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,ee)|0,r=r+Math.imul(b,ie)|0,n=(n=n+Math.imul(b,re)|0)+Math.imul(v,ie)|0,a=a+Math.imul(v,re)|0,r=r+Math.imul(_,ae)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(p,ae)|0,a=a+Math.imul(p,se)|0;var Ce=(f+(r=r+Math.imul(h,le)|0)|0)+((8191&(n=(n=n+Math.imul(h,fe)|0)+Math.imul(c,le)|0))<<13)|0;f=((a=a+Math.imul(c,fe)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(D,z),n=(n=Math.imul(D,H))+Math.imul(F,z)|0,a=Math.imul(F,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,q)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(k,X)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(w,ie)|0,a=a+Math.imul(w,re)|0,r=r+Math.imul(b,ae)|0,n=(n=n+Math.imul(b,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,r=r+Math.imul(_,le)|0,n=(n=n+Math.imul(_,fe)|0)+Math.imul(p,le)|0,a=a+Math.imul(p,fe)|0;var Se=(f+(r=r+Math.imul(h,he)|0)|0)+((8191&(n=(n=n+Math.imul(h,ce)|0)+Math.imul(c,he)|0))<<13)|0;f=((a=a+Math.imul(c,ce)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,z),n=(n=Math.imul(L,H))+Math.imul(B,z)|0,a=Math.imul(B,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(F,Y)|0,a=a+Math.imul(F,q)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(T,$)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,r=r+Math.imul(C,ie)|0,n=(n=n+Math.imul(C,re)|0)+Math.imul(S,ie)|0,a=a+Math.imul(S,re)|0,r=r+Math.imul(g,ae)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,r=r+Math.imul(b,le)|0,n=(n=n+Math.imul(b,fe)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,r=r+Math.imul(_,he)|0,n=(n=n+Math.imul(_,ce)|0)+Math.imul(p,he)|0,a=a+Math.imul(p,ce)|0;var je=(f+(r=r+Math.imul(h,_e)|0)|0)+((8191&(n=(n=n+Math.imul(h,pe)|0)+Math.imul(c,_e)|0))<<13)|0;f=((a=a+Math.imul(c,pe)|0)+(n>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,Y),n=(n=Math.imul(L,q))+Math.imul(B,Y)|0,a=Math.imul(B,q),r=r+Math.imul(D,X)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(F,X)|0,a=a+Math.imul(F,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,ee)|0,r=r+Math.imul(T,ie)|0,n=(n=n+Math.imul(T,re)|0)+Math.imul(A,ie)|0,a=a+Math.imul(A,re)|0,r=r+Math.imul(C,ae)|0,n=(n=n+Math.imul(C,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,r=r+Math.imul(g,le)|0,n=(n=n+Math.imul(g,fe)|0)+Math.imul(w,le)|0,a=a+Math.imul(w,fe)|0,r=r+Math.imul(b,he)|0,n=(n=n+Math.imul(b,ce)|0)+Math.imul(v,he)|0,a=a+Math.imul(v,ce)|0;var Te=(f+(r=r+Math.imul(_,_e)|0)|0)+((8191&(n=(n=n+Math.imul(_,pe)|0)+Math.imul(p,_e)|0))<<13)|0;f=((a=a+Math.imul(p,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,X),n=(n=Math.imul(L,G))+Math.imul(B,X)|0,a=Math.imul(B,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(F,Q)|0,a=a+Math.imul(F,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(k,ie)|0,a=a+Math.imul(k,re)|0,r=r+Math.imul(T,ae)|0,n=(n=n+Math.imul(T,se)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,se)|0,r=r+Math.imul(C,le)|0,n=(n=n+Math.imul(C,fe)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,fe)|0,r=r+Math.imul(g,he)|0,n=(n=n+Math.imul(g,ce)|0)+Math.imul(w,he)|0,a=a+Math.imul(w,ce)|0;var Ae=(f+(r=r+Math.imul(b,_e)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(v,_e)|0))<<13)|0;f=((a=a+Math.imul(v,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,Q),n=(n=Math.imul(L,Z))+Math.imul(B,Q)|0,a=Math.imul(B,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(R,ie)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,se)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,se)|0,r=r+Math.imul(T,le)|0,n=(n=n+Math.imul(T,fe)|0)+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,r=r+Math.imul(C,he)|0,n=(n=n+Math.imul(C,ce)|0)+Math.imul(S,he)|0,a=a+Math.imul(S,ce)|0;var xe=(f+(r=r+Math.imul(g,_e)|0)|0)+((8191&(n=(n=n+Math.imul(g,pe)|0)+Math.imul(w,_e)|0))<<13)|0;f=((a=a+Math.imul(w,pe)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(B,$)|0,a=Math.imul(B,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(F,ie)|0,a=a+Math.imul(F,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(M,le)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,fe)|0,r=r+Math.imul(T,he)|0,n=(n=n+Math.imul(T,ce)|0)+Math.imul(A,he)|0,a=a+Math.imul(A,ce)|0;var Me=(f+(r=r+Math.imul(C,_e)|0)|0)+((8191&(n=(n=n+Math.imul(C,pe)|0)+Math.imul(S,_e)|0))<<13)|0;f=((a=a+Math.imul(S,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,re))+Math.imul(B,ie)|0,a=Math.imul(B,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(F,ae)|0,a=a+Math.imul(F,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,fe)|0,r=r+Math.imul(M,he)|0,n=(n=n+Math.imul(M,ce)|0)+Math.imul(k,he)|0,a=a+Math.imul(k,ce)|0;var ke=(f+(r=r+Math.imul(T,_e)|0)|0)+((8191&(n=(n=n+Math.imul(T,pe)|0)+Math.imul(A,_e)|0))<<13)|0;f=((a=a+Math.imul(A,pe)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,se))+Math.imul(B,ae)|0,a=Math.imul(B,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(F,le)|0,a=a+Math.imul(F,fe)|0,r=r+Math.imul(I,he)|0,n=(n=n+Math.imul(I,ce)|0)+Math.imul(R,he)|0,a=a+Math.imul(R,ce)|0;var Pe=(f+(r=r+Math.imul(M,_e)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(k,_e)|0))<<13)|0;f=((a=a+Math.imul(k,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,le),n=(n=Math.imul(L,fe))+Math.imul(B,le)|0,a=Math.imul(B,fe),r=r+Math.imul(D,he)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(F,he)|0,a=a+Math.imul(F,ce)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(R,_e)|0))<<13)|0;f=((a=a+Math.imul(R,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(L,he),n=(n=Math.imul(L,ce))+Math.imul(B,he)|0,a=Math.imul(B,ce);var Re=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(F,_e)|0))<<13)|0;f=((a=a+Math.imul(F,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ue=(f+(r=Math.imul(L,_e))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(B,_e)|0))<<13)|0;return f=((a=Math.imul(B,pe))+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,l[0]=me,l[1]=be,l[2]=ve,l[3]=ye,l[4]=ge,l[5]=we,l[6]=Ee,l[7]=Ce,l[8]=Se,l[9]=je,l[10]=Te,l[11]=Ae,l[12]=xe,l[13]=Me,l[14]=ke,l[15]=Pe,l[16]=Ie,l[17]=Re,l[18]=Ue,0!==f&&(l[19]=f,i.length++),i};function m(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,a=0;a>>26)|0)>>>26,s&=67108863}i.words[a]=o,r=s,s=n}return 0!==r?i.words[a]=r:i.length--,i._strip()}function b(e,t,i){return m(e,t,i)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=_),a.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):i<63?_(this,e,t):i<1024?m(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),i=a.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&a,a>>>=13;for(s=2*t;s>=26,i+=a/67108864|0,i+=s>>>26,this.words[n]=67108863&s}return 0!==i&&(this.words[n]=i,this.length++),t?this.ineg():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=function(e){for(var t=new Array(e.bitLength()),i=0;i>>n&1}return t}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,a=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,f=0;f=0&&(0!==u||f>=n);f--){var h=0|this.words[f];this.words[f]=u<<26-a|h>>>a,u=h&o}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},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){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[n+i]=67108863&a}for(;n>26,this.words[n+i]=67108863&a;if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!==(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var o,l=r.length-n.length;if("mod"!==t){(o=new a(null)).length=l+1,o.words=new Array(o.length);for(var f=0;f=0;h--){var c=67108864*(0|r.words[n.length+h])+(0|r.words[n.length+h-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,h);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(n,1,h),r.isZero()||(r.negative^=1);o&&(o.words[h]=c)}return o&&o._strip(),r._strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:o||null,mod:r}},a.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):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.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,s,o},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 i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),a=i.cmp(r);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=(1<<26)%e,n=0,a=this.length-1;a>=0;a--)n=(i*n+(0|this.words[a]))%e;return t?-n:n},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var a=(0|this.words[n])+67108864*i;this.words[n]=a/e|0,i=a%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),s=new a(0),o=new a(0),l=new a(1),f=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++f;for(var u=i.clone(),h=t.clone();!t.isZero();){for(var c=0,d=1;0==(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(u),s.isub(h)),n.iushrn(1),s.iushrn(1);for(var _=0,p=1;0==(i.words[0]&p)&&_<26;++_,p<<=1);if(_>0)for(i.iushrn(_);_-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(u),l.isub(h)),o.iushrn(1),l.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(o),s.isub(l)):(i.isub(t),o.isub(n),l.isub(s))}return{a:o,b:l,gcd:i.iushln(f)}},a.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new a(1),o=new a(0),l=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,c=1;0==(i.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(i.iushrn(h);h-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(o)):(i.isub(t),o.isub(s))}return(n=0===t.cmpn(1)?s:o).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var a=t;t=i,i=a}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},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){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){rn&&(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 j(e)},a.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(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 w(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){j.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)}g.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},n(w,g),w.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r>>22,n=a}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new E;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},j.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},j.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},j.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},j.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},j.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},j.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},j.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},j.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},j.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},j.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},j.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},j.prototype.isqr=function(e){return this.imul(e,e.clone())},j.prototype.sqr=function(e){return this.mul(e,e)},j.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new a(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var o=new a(1).toRed(this),l=o.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,f).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,n),c=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),_=s;0!==d.cmp(o);){for(var p=d,m=0;0!==p.cmp(o);m++)p=p.redSqr();r(m<_);var b=this.pow(h,new a(1).iushln(_-m-1));c=c.redMul(b),h=b.redSqr(),d=d.redMul(h),_=m}return c},j.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},j.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new a(1).toRed(this),i[1]=e;for(var r=2;r=0;r--){for(var f=t.words[r],u=l-1;u>=0;u--){var h=f>>u&1;n!==i[0]&&(n=this.sqr(n)),0!==h||0!==s?(s<<=1,s|=h,(4===++o||0===r&&0===u)&&(n=this.mul(n,i[s]),o=0,s=0)):o=0}l=26}return n},j.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},j.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new T(e)},n(T,j),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).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)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:20}],19:[function(e,t,i){var r;function n(e){this.rand=e}if(t.exports=function(e){return r||(r=new n(null)),r.generate(e)},t.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i>>24]^u[_>>>16&255]^h[p>>>8&255]^c[255&m]^t[b++],s=f[_>>>24]^u[p>>>16&255]^h[m>>>8&255]^c[255&d]^t[b++],o=f[p>>>24]^u[m>>>16&255]^h[d>>>8&255]^c[255&_]^t[b++],l=f[m>>>24]^u[d>>>16&255]^h[_>>>8&255]^c[255&p]^t[b++],d=a,_=s,p=o,m=l;return a=(r[d>>>24]<<24|r[_>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[b++],s=(r[_>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&d])^t[b++],o=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[d>>>8&255]<<8|r[255&_])^t[b++],l=(r[m>>>24]<<24|r[d>>>16&255]<<16|r[_>>>8&255]<<8|r[255&p])^t[b++],[a>>>=0,s>>>=0,o>>>=0,l>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var i=[],r=[],n=[[],[],[],[]],a=[[],[],[],[]],s=0,o=0,l=0;l<256;++l){var f=o^o<<1^o<<2^o<<3^o<<4;f=f>>>8^255&f^99,i[s]=f,r[f]=s;var u=e[s],h=e[u],c=e[h],d=257*e[f]^16843008*f;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*c^65537*h^257*u^16843008*s,a[0][f]=d<<24|d>>>8,a[1][f]=d<<16|d>>>16,a[2][f]=d<<8|d>>>24,a[3][f]=d,0===s?s=o=1:(s=u^e[e[e[c^u]]],o^=e[e[o]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:a}}();function f(e){this._key=n(e),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var e=this._key,t=e.length,i=t+6,r=4*(i+1),n=[],a=0;a>>24,s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s],s^=o[a/t|0]<<24):t>6&&a%t==4&&(s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s]),n[a]=n[a-t]^s}for(var f=[],u=0;u>>24]]^l.INV_SUB_MIX[1][l.SBOX[c>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[c>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&c]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(e){return s(e=n(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},f.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),i=r.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[1],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[3],12),i},f.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var i=s(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),a=r.allocUnsafe(16);return a.writeUInt32BE(i[0],0),a.writeUInt32BE(i[3],4),a.writeUInt32BE(i[2],8),a.writeUInt32BE(i[1],12),a},f.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=f},{"safe-buffer":184}],22:[function(e,t,i){var r=e("./aes"),n=e("safe-buffer").Buffer,a=e("cipher-base"),s=e("inherits"),o=e("./ghash"),l=e("buffer-xor"),f=e("./incr32");function u(e,t,i,s){a.call(this);var l=n.alloc(4,0);this._cipher=new r.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new o(u),i=function(e,t,i){if(12===t.length)return e._finID=n.concat([t,n.from([0,0,0,1])]),n.concat([t,n.from([0,0,0,2])]);var r=new o(i),a=t.length,s=a%16;r.update(t),s&&(s=16-s,r.update(n.alloc(s,0))),r.update(n.alloc(8,0));var l=8*a,u=n.alloc(8);u.writeUIntBE(l,0,8),r.update(u),e._finID=r.state;var h=n.from(e._finID);return f(h),h}(this,i,u),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(u,a),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=n.alloc(t,0),this._ghash.update(t))}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var i=0;e.length!==t.length&&i++;for(var r=Math.min(e.length,t.length),n=0;n16)throw new Error("unable to decrypt data");var i=-1;for(;++i16)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},h.prototype.flush=function(){if(this.cache.length)return this.cache},i.createDecipher=function(e,t){var i=a[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=f(t,!1,i.key,i.iv);return c(e,r.key,r.iv)},i.createDecipheriv=c},{"./aes":21,"./authCipher":22,"./modes":34,"./streamCipher":37,"cipher-base":67,evp_bytestokey:105,inherits:136,"safe-buffer":184}],25:[function(e,t,i){var r=e("./modes"),n=e("./authCipher"),a=e("safe-buffer").Buffer,s=e("./streamCipher"),o=e("cipher-base"),l=e("./aes"),f=e("evp_bytestokey");function u(e,t,i){o.call(this),this._cache=new c,this._cipher=new l.AES(t),this._prev=a.from(i),this._mode=e,this._autopadding=!0}e("inherits")(u,o),u.prototype._update=function(e){var t,i;this._cache.add(e);for(var r=[];t=this._cache.get();)i=this._mode.encrypt(this,t),r.push(i);return a.concat(r)};var h=a.alloc(16,16);function c(){this.cache=a.allocUnsafe(0)}function d(e,t,i){var o=r[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=a.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof i&&(i=a.from(i)),"GCM"!==o.mode&&i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new s(o.module,t,i):"auth"===o.type?new n(o.module,t,i):new u(o.module,t,i)}u.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(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},c.prototype.add=function(e){this.cache=a.concat([this.cache,e])},c.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},c.prototype.flush=function(){for(var e=16-this.cache.length,t=a.allocUnsafe(e),i=-1;++i>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=a(n)},s.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(a([0,e,0,t])),this.state},t.exports=s},{"safe-buffer":184}],27:[function(e,t,i){t.exports=function(e){for(var t,i=e.length;i--;){if(255!==(t=e.readUInt8(i))){t++,e.writeUInt8(t,i);break}e.writeUInt8(0,i)}}},{}],28:[function(e,t,i){var r=e("buffer-xor");i.encrypt=function(e,t){var i=r(t,e._prev);return e._prev=e._cipher.encryptBlock(i),e._prev},i.decrypt=function(e,t){var i=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return r(n,i)}},{"buffer-xor":65}],29:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("buffer-xor");function a(e,t,i){var a=t.length,s=n(t,e._cache);return e._cache=e._cache.slice(a),e._prev=r.concat([e._prev,i?t:s]),s}i.encrypt=function(e,t,i){for(var n,s=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){s=r.concat([s,a(e,t,i)]);break}n=e._cache.length,s=r.concat([s,a(e,t.slice(0,n),i)]),t=t.slice(n)}return s}},{"buffer-xor":65,"safe-buffer":184}],30:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t,i){for(var r,n,s=-1,o=0;++s<8;)r=t&1<<7-s?128:0,o+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^r))>>s%8,e._prev=a(e._prev,i?r:n);return o}function a(e,t){var i=e.length,n=-1,a=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++n>7;return a}i.encrypt=function(e,t,i){for(var a=t.length,s=r.allocUnsafe(a),o=-1;++o=0||!i.umod(e.prime1)||!i.umod(e.prime2);)i=new r(n(t));return i}t.exports=a,a.getr=s}).call(this,e("buffer").Buffer)},{"bn.js":42,buffer:66,randombytes:166}],42:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],43:[function(e,t,i){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":44}],44:[function(e,t,i){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"}}},{}],45:[function(e,t,i){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"}},{}],46:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hash"),a=e("readable-stream"),s=e("inherits"),o=e("./sign"),l=e("./verify"),f=e("./algorithms.json");function u(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){a.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function c(e){return new u(e)}function d(e){return new h(e)}Object.keys(f).forEach((function(e){f[e].id=r.from(f[e].id,"hex"),f[e.toLowerCase()]=f[e]})),s(u,a.Writable),u.prototype._write=function(e,t,i){this._hash.update(e),i()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var i=this._hash.digest(),r=o(i,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},s(h,a.Writable),h.prototype._write=function(e,t,i){this._hash.update(e),i()},h.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},h.prototype.verify=function(e,t,i){"string"==typeof t&&(t=r.from(t,i)),this.end();var n=this._hash.digest();return l(t,n,e,this._signType,this._tag)},t.exports={Sign:c,Verify:d,createSign:c,createVerify:d}},{"./algorithms.json":44,"./sign":47,"./verify":48,"create-hash":71,inherits:136,"readable-stream":63,"safe-buffer":184}],47:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("create-hmac"),a=e("browserify-rsa"),s=e("elliptic").ec,o=e("bn.js"),l=e("parse-asn1"),f=e("./curves.json");function u(e,t,i,a){if((e=r.from(e.toArray())).length0&&i.ishrn(r),i}function c(e,t,i){var a,s;do{for(a=r.alloc(0);8*a.length=t)throw new Error("invalid sig")}t.exports=function(e,t,i,f,u){var h=s(i);if("ec"===h.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=o[i.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var n=new a(r),s=i.data.subjectPrivateKey.data;return n.verify(t,e,s)}(e,t,h)}if("dsa"===h.type){if("dsa"!==f)throw new Error("wrong public key type");return function(e,t,i){var r=i.data.p,a=i.data.q,o=i.data.g,f=i.data.pub_key,u=s.signature.decode(e,"der"),h=u.s,c=u.r;l(h,a),l(c,a);var d=n.mont(r),_=h.invm(a);return 0===o.toRed(d).redPow(new n(t).mul(_).mod(a)).fromRed().mul(f.toRed(d).redPow(c.mul(_).mod(a)).fromRed()).mod(r).mod(a).cmp(c)}(e,t,h)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");t=r.concat([u,t]);for(var c=h.modulus.byteLength(),d=[1],_=0;t.length+d.length+22?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,n,s,o;if("string"==typeof t&&(n="not ",t.substr(!s||s<0?0:+s,n.length)===n)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t}(e," argument"))o="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,i){return"number"!=typeof i&&(i=0),!(i+t.length>e.length)&&-1!==e.indexOf(t,i)}(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return o+=". Received type ".concat(typeof i)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},{}],50:[function(e,t,i){(function(i){"use strict";var r=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=f;var n=e("./_stream_readable"),a=e("./_stream_writable");e("inherits")(f,n);for(var s=r(a.prototype),o=0;o0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),r)s.endEmitted?E(e,new w):A(e,s,t,!0);else if(s.ended)E(e,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):P(e,s)):A(e,s,t,!1)}else r||(s.reading=!1,P(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(k,e))}function k(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,F(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function U(e){f("readable nexttick read 0"),e.read(0)}function D(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0)}function F(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):i=t.buffer.consume(e,t.decoder),i);var i}function L(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(B,t,e))}function B(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var i=t._writableState;(!i||i.autoDestroy&&i.finished)&&t.destroy()}}function N(e,t){for(var i=0,r=e.length;i=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):M(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&L(this),null;var r,n=t.needReadable;return f("need readable",n),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&L(this)),null!==r&&this.emit("data",r),r},j.prototype._read=function(e){E(this,new g("_read()"))},j.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,f("pipe count=%d opts=%j",n.pipesCount,t);var s=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?l:m;function o(t,i){f("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f("cleanup"),e.removeListener("close",_),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",d),e.removeListener("unpipe",o),r.removeListener("end",l),r.removeListener("end",m),r.removeListener("data",c),h=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){f("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",o);var u=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,F(e))}}(r);e.on("drain",u);var h=!1;function c(t){f("ondata");var i=e.write(t);f("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==N(n.pipes,e))&&!h&&(f("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(t){f("onerror",t),m(),e.removeListener("error",d),0===a(e,"error")&&E(e,t)}function _(){e.removeListener("finish",p),m()}function p(){f("onfinish"),e.removeListener("close",_),m()}function m(){f("unpipe"),r.unpipe(e)}return r.on("data",c),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",d),e.once("close",_),e.once("finish",p),e.emit("pipe",r),n.flowing||(f("pipe resume"),r.resume()),e},j.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,f("on readable",n.length,n.reading),n.length?M(this):n.reading||i.nextTick(U,this))),r},j.prototype.addListener=j.prototype.on,j.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(R,this),r},j.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(R,this),t},j.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(D,e,t))}(this,e)),e.paused=!1,this},j.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},j.prototype.wrap=function(e){var t=this,i=this._readableState,r=!1;for(var n in e.on("end",(function(){if(f("wrapped end"),i.decoder&&!i.ended){var e=i.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(f("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(t.push(n)||(r=!0,e.pause()))})),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-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(j.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),j.prototype._write=function(e,t,i){i(new p("_write()"))},j.prototype._writev=null,j.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(j.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),j.prototype.destroy=h.destroy,j.prototype._undestroy=h.undestroy,j.prototype._destroy=function(e,t){t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":49,"./_stream_duplex":50,"./internal/streams/destroy":57,"./internal/streams/state":61,"./internal/streams/stream":62,_process:158,buffer:66,inherits:136,"util-deprecate":197}],55:[function(e,t,i){(function(i){"use strict";var r;function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var a=e("./end-of-stream"),s=Symbol("lastResolve"),o=Symbol("lastReject"),l=Symbol("error"),f=Symbol("ended"),u=Symbol("lastPromise"),h=Symbol("handlePromise"),c=Symbol("stream");function d(e,t){return{value:e,done:t}}function _(e){var t=e[s];if(null!==t){var i=e[c].read();null!==i&&(e[u]=null,e[s]=null,e[o]=null,t(d(i,!1)))}}function p(e){i.nextTick(_,e)}var m=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((n(r={get stream(){return this[c]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[c].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[l]?r(e[l]):t(d(void 0,!0))}))}));var r,n=this[u];if(n)r=new Promise(function(e,t){return function(i,r){e.then((function(){t[f]?i(d(void 0,!0)):t[h](i,r)}),r)}}(n,this));else{var a=this[c].read();if(null!==a)return Promise.resolve(d(a,!1));r=new Promise(this[h])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),n(r,"return",(function(){var e=this;return new Promise((function(t,i){e[c].destroy(null,(function(e){e?i(e):t(d(void 0,!0))}))}))})),r),m);t.exports=function(e){var t,i=Object.create(b,(n(t={},c,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,o,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,f,{value:e._readableState.endEmitted,writable:!0}),n(t,h,{value:function(e,t){var r=i[c].read();r?(i[u]=null,i[s]=null,i[o]=null,e(d(r,!1))):(i[s]=e,i[o]=t)},writable:!0}),t));return i[u]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=i[o];return null!==t&&(i[u]=null,i[s]=null,i[o]=null,t(e)),void(i[l]=e)}var r=i[s];null!==r&&(i[u]=null,i[s]=null,i[o]=null,r(d(void 0,!0))),i[f]=!0})),e.on("readable",p.bind(null,i)),i}}).call(this,e("_process"))},{"./end-of-stream":58,_process:158}],56:[function(e,t,i){"use strict";function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t){for(var i=0;i0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,i,r,n=s.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,i=n,r=o,s.prototype.copy.call(t,i,r),o+=a.data.length,a=a.next;return n}},{key:"consume",value:function(e,t){var i;return en.length?n.length:e;if(a===n.length?r+=n:r+=n.slice(0,e),0==(e-=a)){a===n.length?(++i,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(a));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),i=this.head,r=1;for(i.data.copy(t),e-=i.data.length;i=i.next;){var n=i.data,a=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,a),0==(e-=a)){a===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return o(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&s.forEach(f),a||(s.forEach(f),n(r))}))}));return t.reduce(u)}},{"../../../errors":49,"./end-of-stream":58}],61:[function(e,t,i){"use strict";var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,i,n){var a=function(e,t,i){return null!=e.highWaterMark?e.highWaterMark:t?e[i]:null}(t,n,i);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(n?i:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},{"../../../errors":49}],62:[function(e,t,i){t.exports=e("events").EventEmitter},{events:104}],63:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js"),i.finished=e("./lib/internal/streams/end-of-stream.js"),i.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":50,"./lib/_stream_passthrough.js":51,"./lib/_stream_readable.js":52,"./lib/_stream_transform.js":53,"./lib/_stream_writable.js":54,"./lib/internal/streams/end-of-stream.js":58,"./lib/internal/streams/pipeline.js":60}],64:[function(e,t,i){arguments[4][20][0].apply(i,arguments)},{dup:20}],65:[function(e,t,i){(function(e){t.exports=function(t,i){for(var r=Math.min(t.length,i.length),n=new e(r),a=0;a + * @license MIT + */ +"use strict";var r=e("base64-js"),n=e("ieee754");i.Buffer=t,i.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},i.INSPECT_MAX_BYTES=50;function a(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=new Uint8Array(e);return i.__proto__=t.prototype,i}function t(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return s(e,t,i)}function s(e,i,r){if("string"==typeof e)return function(e,i){"string"==typeof i&&""!==i||(i="utf8");if(!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var r=0|h(e,i),n=a(r),s=n.write(e,i);s!==r&&(n=n.slice(0,s));return n}(e,i);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(L(e,ArrayBuffer)||e&&L(e.buffer,ArrayBuffer))return function(e,i,r){if(i<0||e.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function h(e,i){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||L(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var a=!1;;)switch(i){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(a)return n?-1:D(e).length;i=(""+i).toLowerCase(),a=!0}}function c(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,i);case"utf8":case"utf-8":return C(this,t,i);case"ascii":return S(this,t,i);case"latin1":case"binary":return j(this,t,i);case"base64":return E(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function d(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function _(e,i,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),B(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof i&&(i=t.from(i,n)),t.isBuffer(i))return 0===i.length?-1:p(e,i,r,n,a);if("number"==typeof i)return i&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,i,r):Uint8Array.prototype.lastIndexOf.call(e,i,r):p(e,[i],r,n,a);throw new TypeError("val must be string, number or Buffer")}function p(e,t,i,r,n){var a,s=1,o=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,l/=2,i/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){var u=-1;for(a=i;ao&&(i=o-l),a=i;a>=0;a--){for(var h=!0,c=0;cn&&(r=n):r=n;var a=t.length;r>a/2&&(r=a/2);for(var s=0;s>8,n=i%256,a.push(n),a.push(r);return a}(t,e.length-i),e,i,r)}function E(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i))}function C(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n239?4:f>223?3:f>191?2:1;if(n+h<=i)switch(h){case 1:f<128&&(u=f);break;case 2:128==(192&(a=e[n+1]))&&(l=(31&f)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],s=e[n+2],128==(192&a)&&128==(192&s)&&(l=(15&f)<<12|(63&a)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],s=e[n+2],o=e[n+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(l=(15&f)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var i="",r=0;for(;rt&&(e+=" ... "),""},t.prototype.compare=function(e,i,r,n,a){if(L(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===i&&(i=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),i<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&i>=r)return 0;if(n>=a)return-1;if(i>=r)return 1;if(this===e)return 0;for(var s=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(i>>>=0),l=Math.min(s,o),f=this.slice(n,a),u=e.slice(i,r),h=0;h>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return m(this,e,t,i);case"utf8":case"utf-8":return b(this,e,t,i);case"ascii":return v(this,e,t,i);case"latin1":case"binary":return y(this,e,t,i);case"base64":return g(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;nr)&&(i=r);for(var n="",a=t;ai)throw new RangeError("Trying to access beyond buffer length")}function M(e,i,r,n,a,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>a||ie.length)throw new RangeError("Index out of range")}function k(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function P(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,4),n.write(e,t,i,r,23,4),i+4}function I(e,t,i,r,a){return t=+t,i>>>=0,a||k(e,0,i,8),n.write(e,t,i,r,52,8),i+8}t.prototype.slice=function(e,i){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(i=void 0===i?r:~~i)<0?(i+=r)<0&&(i=0):i>r&&(i=r),i>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},t.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a=(n*=128)&&(r-=Math.pow(2,8*t)),r},t.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=t,n=1,a=this[e+--r];r>0&&(n*=256);)a+=this[e+--r]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},t.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),n.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),n.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,i,r){(e=+e,t>>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=1,a=0;for(this[t]=255&e;++a>>=0,i>>>=0,r)||M(this,e,t,i,Math.pow(2,8*i)-1,0);var n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+i},t.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n)}var a=0,s=1,o=0;for(this[t]=255&e;++a>0)-o&255;return t+i},t.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*i-1);M(this,e,t,i,n-1,-n)}var a=i-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+i},t.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,i){return P(this,e,t,!0,i)},t.prototype.writeFloatBE=function(e,t,i){return P(this,e,t,!1,i)},t.prototype.writeDoubleLE=function(e,t,i){return I(this,e,t,!0,i)},t.prototype.writeDoubleBE=function(e,t,i){return I(this,e,t,!1,i)},t.prototype.copy=function(e,i,r,n){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),i>=e.length&&(i=e.length),i||(i=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-i=0;--s)e[s+i]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),i);return a},t.prototype.fill=function(e,i,r,n){if("string"==typeof e){if("string"==typeof i?(n=i,i=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var a=e.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(e=a)}}else"number"==typeof e&&(e&=255);if(i<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=i;s55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function F(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,i,r){for(var n=0;n=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function L(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function B(e){return e!=e}}).call(this,e("buffer").Buffer)},{"base64-js":17,buffer:66,ieee754:135}],67:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("stream").Transform,a=e("string_decoder").StringDecoder;function s(e){n.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}e("inherits")(s,n),s.prototype.update=function(e,t,i){"string"==typeof e&&(e=r.from(e,t));var n=this._update(e);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,i){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{i(r)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,i){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return i&&(r+=this._decoder.end()),r},t.exports=s},{inherits:136,"safe-buffer":184,stream:194,string_decoder:195}],68:[function(e,t,i){(function(e){function t(e){return Object.prototype.toString.call(e)}i.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},i.isBoolean=function(e){return"boolean"==typeof e},i.isNull=function(e){return null===e},i.isNullOrUndefined=function(e){return null==e},i.isNumber=function(e){return"number"==typeof e},i.isString=function(e){return"string"==typeof e},i.isSymbol=function(e){return"symbol"==typeof e},i.isUndefined=function(e){return void 0===e},i.isRegExp=function(e){return"[object RegExp]"===t(e)},i.isObject=function(e){return"object"==typeof e&&null!==e},i.isDate=function(e){return"[object Date]"===t(e)},i.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},i.isFunction=function(e){return"function"==typeof e},i.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},i.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":137}],69:[function(e,t,i){(function(i){var r=e("elliptic"),n=e("bn.js");t.exports=function(e){return new s(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function o(e,t,r){Array.isArray(e)||(e=e.toArray());var n=new i(e);if(r&&n.lengthi)?t=("rmd160"===e?new l:f(e)).update(t).digest():t.length64?t=e(t):t.length<64&&(t=n.concat([t,s],64));for(var i=this._ipad=n.allocUnsafe(64),r=this._opad=n.allocUnsafe(64),o=0;o<64;o++)i[o]=54^t[o],r[o]=92^t[o];this._hash=[i]}r(o,a),o.prototype._update=function(e){this._hash.push(e)},o.prototype._final=function(){var e=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,e]))},t.exports=o},{"cipher-base":67,inherits:136,"safe-buffer":184}],75:[function(e,t,i){"use strict";i.randomBytes=i.rng=i.pseudoRandomBytes=i.prng=e("randombytes"),i.createHash=i.Hash=e("create-hash"),i.createHmac=i.Hmac=e("create-hmac");var r=e("browserify-sign/algos"),n=Object.keys(r),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);i.getHashes=function(){return a};var s=e("pbkdf2");i.pbkdf2=s.pbkdf2,i.pbkdf2Sync=s.pbkdf2Sync;var o=e("browserify-cipher");i.Cipher=o.Cipher,i.createCipher=o.createCipher,i.Cipheriv=o.Cipheriv,i.createCipheriv=o.createCipheriv,i.Decipher=o.Decipher,i.createDecipher=o.createDecipher,i.Decipheriv=o.Decipheriv,i.createDecipheriv=o.createDecipheriv,i.getCiphers=o.getCiphers,i.listCiphers=o.listCiphers;var l=e("diffie-hellman");i.DiffieHellmanGroup=l.DiffieHellmanGroup,i.createDiffieHellmanGroup=l.createDiffieHellmanGroup,i.getDiffieHellman=l.getDiffieHellman,i.createDiffieHellman=l.createDiffieHellman,i.DiffieHellman=l.DiffieHellman;var f=e("browserify-sign");i.createSign=f.createSign,i.Sign=f.Sign,i.createVerify=f.createVerify,i.Verify=f.Verify,i.createECDH=e("create-ecdh");var u=e("public-encrypt");i.publicEncrypt=u.publicEncrypt,i.privateEncrypt=u.privateEncrypt,i.publicDecrypt=u.publicDecrypt,i.privateDecrypt=u.privateDecrypt;var h=e("randomfill");i.randomFill=h.randomFill,i.randomFillSync=h.randomFillSync,i.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},i.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":38,"browserify-sign":46,"browserify-sign/algos":43,"create-ecdh":69,"create-hash":71,"create-hmac":73,"diffie-hellman":82,pbkdf2:151,"public-encrypt":159,randombytes:166,randomfill:167}],76:[function(e,t,i){"use strict";i.utils=e("./des/utils"),i.Cipher=e("./des/cipher"),i.DES=e("./des/des"),i.CBC=e("./des/cbc"),i.EDE=e("./des/ede")},{"./des/cbc":77,"./des/cipher":78,"./des/des":79,"./des/ede":80,"./des/utils":81}],77:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a={};function s(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t0;r--)t+=this._buffer(e,t),i+=this._flushBuffer(n,i);return t+=this._buffer(e,t),n},n.prototype.final=function(e){var t,i;return e&&(t=this.update(e)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(i):i},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];i=a.r28shl(i,o),n=a.r28shl(n,o),a.pc2(i,n,e.keys,s)}},l.prototype._update=function(e,t,i,r){var n=this._desState,s=a.readUInt32BE(e,t),o=a.readUInt32BE(e,t+4);a.ip(s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],"encrypt"===this.type?this._encrypt(n,s,o,n.tmp,0):this._decrypt(n,s,o,n.tmp,0),s=n.tmp[0],o=n.tmp[1],a.writeUInt32BE(i,s,r),a.writeUInt32BE(i,o,r+4)},l.prototype._pad=function(e,t){for(var i=e.length-t,r=t;r>>0,s=c}a.rip(o,s,r,n)},l.prototype._decrypt=function(e,t,i,r,n){for(var s=i,o=t,l=e.keys.length-2;l>=0;l-=2){var f=e.keys[l],u=e.keys[l+1];a.expand(s,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1];var h=a.substitute(f,u),c=s;s=(o^a.permute(h))>>>0,o=c}a.rip(s,o,r,n)}},{"./cipher":78,"./utils":81,inherits:136,"minimalistic-assert":142}],80:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a=e("./cipher"),s=e("./des");function o(e,t){r.equal(t.length,24,"Invalid key length");var i=t.slice(0,8),n=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i})]}function l(e){a.call(this,e);var t=new o(this.type,this.options.key);this._edeState=t}n(l,a),t.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,i,r){var n=this._edeState;n.ciphers[0]._update(e,t,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r)},l.prototype._pad=s.prototype._pad,l.prototype._unpad=s.prototype._unpad},{"./cipher":78,"./des":79,inherits:136,"minimalistic-assert":142}],81:[function(e,t,i){"use strict";i.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},i.writeUInt32BE=function(e,t,i){e[0+i]=t>>>24,e[1+i]=t>>>16&255,e[2+i]=t>>>8&255,e[3+i]=255&t},i.ip=function(e,t,i,r){for(var n=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8)n<<=1,n|=t>>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=e>>>o+s&1}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8)a<<=1,a|=t>>>o+s&1;for(o=1;o<=25;o+=8)a<<=1,a|=e>>>o+s&1}i[r+0]=n>>>0,i[r+1]=a>>>0},i.rip=function(e,t,i,r){for(var n=0,a=0,s=0;s<4;s++)for(var o=24;o>=0;o-=8)n<<=1,n|=t>>>o+s&1,n<<=1,n|=e>>>o+s&1;for(s=4;s<8;s++)for(o=24;o>=0;o-=8)a<<=1,a|=t>>>o+s&1,a<<=1,a|=e>>>o+s&1;i[r+0]=n>>>0,i[r+1]=a>>>0},i.pc1=function(e,t,i,r){for(var n=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8)n<<=1,n|=t>>o+s&1;for(o=0;o<=24;o+=8)n<<=1,n|=e>>o+s&1}for(o=0;o<=24;o+=8)n<<=1,n|=t>>o+s&1;for(s=1;s<=3;s++){for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1;for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1}for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1;i[r+0]=n>>>0,i[r+1]=a>>>0},i.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];i.pc2=function(e,t,i,n){for(var a=0,s=0,o=r.length>>>1,l=0;l>>r[l]&1;for(l=o;l>>r[l]&1;i[n+0]=a>>>0,i[n+1]=s>>>0},i.expand=function(e,t,i){var r=0,n=0;r=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)r<<=6,r|=e>>>a&63;for(a=11;a>=3;a-=4)n|=e>>>a&63,n<<=6;n|=(31&e)<<1|e>>>31,t[i+0]=r>>>0,t[i+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];i.substitute=function(e,t){for(var i=0,r=0;r<4;r++){i<<=4,i|=n[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){i<<=4,i|=n[256+64*r+(t>>>18-6*r&63)]}return i>>>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];i.permute=function(e){for(var t=0,i=0;i>>a[i]&1;return t>>>0},i.padSplit=function(e,t,i){for(var r=e.toString(2);r.lengthe;)i.ishrn(1);if(i.isEven()&&i.iadd(o),i.testn(1)||i.iadd(l),t.cmp(l)){if(!t.cmp(f))for(;i.mod(u).cmp(h);)i.iadd(d)}else for(;i.mod(a).cmp(c);)i.iadd(d);if(m(_=i.shrn(1))&&m(i)&&b(_)&&b(i)&&s.test(_)&&s.test(i))return i}}},{"bn.js":86,"miller-rabin":140,randombytes:166}],85:[function(e,t,i){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"}}},{}],86:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],87:[function(e,t,i){"use strict";var r=i;r.version=e("../package.json").version,r.utils=e("./elliptic/utils"),r.rand=e("brorand"),r.curve=e("./elliptic/curve"),r.curves=e("./elliptic/curves"),r.ec=e("./elliptic/ec"),r.eddsa=e("./elliptic/eddsa")},{"../package.json":103,"./elliptic/curve":90,"./elliptic/curves":93,"./elliptic/ec":94,"./elliptic/eddsa":97,"./elliptic/utils":101,brorand:19}],88:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.getNAF,s=n.getJSF,o=n.assert;function l(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}t.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){o(e.precomputed);var i=e._getDoubles(),r=a(t,1,this._bitLength),n=(1<=l;t--)f=(f<<1)+r[t];s.push(f)}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),c=n;c>0;c--){for(l=0;l=0;f--){for(t=0;f>=0&&0===s[f];f--)t++;if(f>=0&&t++,l=l.dblp(t),f<0)break;var u=s[f];o(0!==u),l="affine"===e.type?u>0?l.mixedAdd(n[u-1>>1]):l.mixedAdd(n[-u-1>>1].neg()):u>0?l.add(n[u-1>>1]):l.add(n[-u-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,i,r,n){for(var o=this._wnafT1,l=this._wnafT2,f=this._wnafT3,u=0,h=0;h=1;h-=2){var d=h-1,_=h;if(1===o[d]&&1===o[_]){var p=[t[d],null,null,t[_]];0===t[d].y.cmp(t[_].y)?(p[1]=t[d].add(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg())):0===t[d].y.cmp(t[_].y.redNeg())?(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].add(t[_].neg())):(p[1]=t[d].toJ().mixedAdd(t[_]),p[2]=t[d].toJ().mixedAdd(t[_].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],b=s(i[d],i[_]);u=Math.max(b[0].length,u),f[d]=new Array(u),f[_]=new Array(u);for(var v=0;v=0;h--){for(var C=0;h>=0;){var S=!0;for(v=0;v=0&&C++,w=w.dblp(C),h<0)break;for(v=0;v0?j=l[v][T-1>>1]:T<0&&(j=l[v][-T-1>>1].neg()),w="affine"===j.type?w.mixedAdd(j):w.add(j))}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),s=a.redSub(i),o=r.redSub(t),l=n.redMul(s),f=a.redMul(o),u=n.redMul(o),h=s.redMul(a);return this.curve.point(l,f,h,u)},f.prototype._projDbl=function(){var e,t,i,r=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var s=(f=this.curve._mulA(n)).redAdd(a);if(this.zOne)e=r.redSub(n).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(f.redSub(a)),i=s.redSqr().redSub(s).redSub(s);else{var o=this.z.redSqr(),l=s.redSub(o).redISub(o);e=r.redSub(n).redISub(a).redMul(l),t=s.redMul(f.redSub(a)),i=s.redMul(l)}}else{var f=n.redAdd(a);o=this.curve._mulC(this.z).redSqr(),l=f.redSub(o).redSub(o);e=this.curve._mulC(r.redISub(f)).redMul(l),t=this.curve._mulC(f).redMul(n.redISub(a)),i=f.redMul(l)}return this.curve.point(e,t,i)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=i.redSub(t),s=n.redSub(r),o=n.redAdd(r),l=i.redAdd(t),f=a.redMul(s),u=o.redMul(l),h=a.redMul(l),c=s.redMul(o);return this.curve.point(f,u,c,h)},f.prototype._projAdd=function(e){var t,i,r=this.z.redMul(e.z),n=r.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(s),l=n.redSub(o),f=n.redAdd(o),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),h=r.redMul(l).redMul(u);return this.curve.twisted?(t=r.redMul(f).redMul(s.redSub(this.curve._mulA(a))),i=l.redMul(f)):(t=r.redMul(f).redMul(s.redSub(a)),i=this.curve._mulC(l).redMul(f)),this.curve.point(h,t,i)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!1)},f.prototype.jmulAdd=function(e,t,i){return this.curve._wnafMulAdd(1,[this,t],[e,i],2,!0)},f.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},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var i=e.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],90:[function(e,t,i){"use strict";var r=i;r.base=e("./base"),r.short=e("./short"),r.mont=e("./mont"),r.edwards=e("./edwards")},{"./base":88,"./edwards":89,"./mont":91,"./short":92}],91:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("inherits"),a=e("./base"),s=e("../utils");function o(e){a.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,i){a.BasePoint.call(this,e,"projective"),null===t&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(o,a),t.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,i=t.redSqr(),r=i.redMul(t).redAdd(i.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},n(l,a.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},o.prototype.point=function(e,t){return new l(this,e,t)},o.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),i=e.redSub(t),r=e.redMul(t),n=i.redMul(t.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(i),s=n.redMul(r),o=t.z.redMul(a.redAdd(s).redSqr()),l=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,l)},l.prototype.mul=function(e){for(var t=e.clone(),i=this,r=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],92:[function(e,t,i){"use strict";var r=e("../utils"),n=e("bn.js"),a=e("inherits"),s=e("./base"),o=r.assert;function l(e){s.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=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 f(e,t,i,r){s.BasePoint.call(this,e,"affine"),null===t&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(i,16),r&&(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 u(e,t,i,r){s.BasePoint.call(this,e,"jacobian"),null===t&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(i,16),this.z=new n(r,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}a(l,s),t.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,i;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)i=new n(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?i=a[0]:(i=a[1],o(0===this.g.mul(i).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:i,basis:e.basis?e.basis.map((function(e){return{a:new n(e.a,16),b:new n(e.b,16)}})):this._getEndoBasis(i)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),i=new n(2).toRed(t).redInvm(),r=i.redNeg(),a=new n(3).toRed(t).redNeg().redSqrt().redMul(i);return[r.redAdd(a).fromRed(),r.redSub(a).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,i,r,a,s,o,l,f,u,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),c=e,d=this.n.clone(),_=new n(1),p=new n(0),m=new n(0),b=new n(1),v=0;0!==c.cmpn(0);){var y=d.div(c);f=d.sub(y.mul(c)),u=m.sub(y.mul(_));var g=b.sub(y.mul(p));if(!r&&f.cmp(h)<0)t=l.neg(),i=_,r=f.neg(),a=u;else if(r&&2==++v)break;l=f,d=c,c=f,m=_,_=u,b=p,p=g}s=f.neg(),o=u;var w=r.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(w)>=0&&(s=t,o=i),r.negative&&(r=r.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:r,b:a},{a:s,b:o}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,i=t[0],r=t[1],n=r.b.mul(e).divRound(this.n),a=i.b.neg().mul(e).divRound(this.n),s=n.mul(i.a),o=a.mul(r.a),l=n.mul(i.b),f=a.mul(r.b);return{k1:e.sub(s).sub(o),k2:l.add(f).neg()}},l.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var a=r.fromRed().isOdd();return(t&&!a||!t&&a)&&(r=r.redNeg()),this.point(e,r)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,i=e.y,r=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,a=0;a":""},f.prototype.isInfinity=function(){return this.inf},f.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 i=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},f.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,i=this.x.redSqr(),r=e.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(t).redMul(r),a=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new n(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},f.prototype.jmulAdd=function(e,t,i){var r=[this,t],n=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},f.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))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(u,s.BasePoint),l.prototype.jpoint=function(e,t,i){return new u(this,e,t,i)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),i=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(i,r)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(i),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(i.redMul(this.z)),o=r.redSub(n),l=a.redSub(s);if(0===o.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),h=r.redMul(f),c=l.redSqr().redIAdd(u).redISub(h).redISub(h),d=l.redMul(h.redISub(c)).redISub(a.redMul(u)),_=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(c,d,_)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),i=this.x,r=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),s=i.redSub(r),o=n.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),f=l.redMul(s),u=i.redMul(l),h=o.redSqr().redIAdd(f).redISub(u).redISub(u),c=o.redMul(u.redISub(h)).redISub(n.redMul(f)),d=this.z.redMul(s);return this.curve.jpoint(h,c,d)},u.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,i=0;i=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":101,"./base":88,"bn.js":102,inherits:136}],93:[function(e,t,i){"use strict";var r,n=i,a=e("hash.js"),s=e("./curve"),o=e("./utils").assert;function l(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var i=new l(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:i}),i}})}n.PresetCurve=l,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=e("./precomputed/secp256k1")}catch(e){r=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},{"./curve":90,"./precomputed/secp256k1":100,"./utils":101,"hash.js":122}],94:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("hmac-drbg"),a=e("../utils"),s=e("../curves"),o=e("brorand"),l=a.assert,f=e("./key"),u=e("./signature");function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(l(s.hasOwnProperty(e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=h,h.prototype.keyPair=function(e){return new f(this,e)},h.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),a=this.n.sub(new r(2));;){var s=new r(t.generate(i));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},h.prototype._truncateToN=function(e,t){var i=8*e.byteLength()-this.n.bitLength();return i>0&&(e=e.ushrn(i)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,i,a){"object"==typeof i&&(a=i,i=null),a||(a={}),t=this.keyFromPrivate(t,i),e=this._truncateToN(new r(e,16));for(var s=this.n.byteLength(),o=t.getPrivate().toArray("be",s),l=e.toArray("be",s),f=new n({hash:this.hash,entropy:o,nonce:l,pers:a.pers,persEnc:a.persEnc||"utf8"}),h=this.n.sub(new r(1)),c=0;;c++){var d=a.k?a.k(c):new r(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(h)>=0)){var _=this.g.mul(d);if(!_.isInfinity()){var p=_.getX(),m=p.umod(this.n);if(0!==m.cmpn(0)){var b=d.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(_.getY().isOdd()?1:0)|(0!==p.cmp(m)?2:0);return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new u({r:m,s:b,recoveryParam:v})}}}}}},h.prototype.verify=function(e,t,i,n){e=this._truncateToN(new r(e,16)),i=this.keyFromPublic(i,n);var a=(t=new u(t,"hex")).r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,l=s.invm(this.n),f=l.mul(e).umod(this.n),h=l.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(f,i.getPublic(),h)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(f,i.getPublic(),h)).isInfinity()&&0===o.getX().umod(this.n).cmp(a)},h.prototype.recoverPubKey=function(e,t,i,n){l((3&i)===i,"The recovery param is more than two bits"),t=new u(t,n);var a=this.n,s=new r(e),o=t.r,f=t.s,h=1&i,c=i>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");o=c?this.curve.pointFromX(o.add(this.curve.n),h):this.curve.pointFromX(o,h);var d=t.r.invm(a),_=a.sub(s).mul(d).umod(a),p=f.mul(d).umod(a);return this.g.mulAdd(_,o,p)},h.prototype.getKeyRecoveryParam=function(e,t,i,r){if(null!==(t=new u(t,r)).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(i))return n}throw new Error("Unable to find valid recovery factor")}},{"../curves":93,"../utils":101,"./key":95,"./signature":96,"bn.js":102,brorand:19,"hmac-drbg":134}],95:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils").assert;function a(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)}t.exports=a,a.fromPublic=function(e,t,i){return t instanceof a?t:new a(e,{pub:t,pubEnc:i})},a.fromPrivate=function(e,t,i){return t instanceof a?t:new a(e,{priv:t,privEnc:i})},a.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"}},a.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},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(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)},a.prototype.derive=function(e){return e.mul(this.priv).getX()},a.prototype.sign=function(e,t,i){return this.ec.sign(e,this,t,i)},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},a.prototype.inspect=function(){return""}},{"../utils":101,"bn.js":102}],96:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(a(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function o(){this.place=0}function l(e,t){var i=e[t.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,a=0,s=t.place;a>>=0;return!(n<=127)&&(t.place=s,n)}function f(e){for(var t=0,i=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|i);--i;)e.push(t>>>(i<<3)&255);e.push(t)}}t.exports=s,s.prototype._importDER=function(e,t){e=n.toArray(e,t);var i=new o;if(48!==e[i.place++])return!1;var a=l(e,i);if(!1===a)return!1;if(a+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var s=l(e,i);if(!1===s)return!1;var f=e.slice(i.place,s+i.place);if(i.place+=s,2!==e[i.place++])return!1;var u=l(e,i);if(!1===u)return!1;if(e.length!==u+i.place)return!1;var h=e.slice(i.place,u+i.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new r(f),this.s=new r(h),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),i=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&i[0]&&(i=[0].concat(i)),t=f(t),i=f(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];u(r,t.length),(r=r.concat(t)).push(2),u(r,i.length);var a=r.concat(i),s=[48];return u(s,a.length),s=s.concat(a),n.encode(s,e)}},{"../utils":101,"bn.js":102}],97:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("../curves"),a=e("../utils"),s=a.assert,o=a.parseBytes,l=e("./key"),f=e("./signature");function u(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=n[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}t.exports=u,u.prototype.sign=function(e,t){e=o(e);var i=this.keyFromSecret(t),r=this.hashInt(i.messagePrefix(),e),n=this.g.mul(r),a=this.encodePoint(n),s=this.hashInt(a,i.pubBytes(),e).mul(i.priv()),l=r.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:l,Rencoded:a})},u.prototype.verify=function(e,t,i){e=o(e),t=this.makeSignature(t);var r=this.keyFromPublic(i),n=this.hashInt(t.Rencoded(),r.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(r.pub().mul(n)).eq(a)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(n>>1)-1?(n>>1)-l:l,a.isubn(o)):o=0,r[s]=o,a.iushrn(1)}return r},r.getJSF=function(e,t){var i=[[],[]];e=e.clone(),t=t.clone();for(var r=0,n=0;e.cmpn(-r)>0||t.cmpn(-n)>0;){var a,s,o,l=e.andln(3)+r&3,f=t.andln(3)+n&3;if(3===l&&(l=-1),3===f&&(f=-1),0==(1&l))a=0;else a=3!==(o=e.andln(7)+r&7)&&5!==o||2!==f?l:-l;if(i[0].push(a),0==(1&f))s=0;else s=3!==(o=t.andln(7)+n&7)&&5!==o||2!==l?f:-f;i[1].push(s),2*r===a+1&&(r=1-r),2*n===s+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return i},r.cachedProperty=function(e,t,i){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new n(e,"hex","le")}},{"bn.js":102,"minimalistic-assert":142,"minimalistic-crypto-utils":143}],102:[function(e,t,i){arguments[4][16][0].apply(i,arguments)},{buffer:20,dup:16}],103:[function(e,t,i){t.exports={_args:[["elliptic@6.5.3","/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer"]],_from:"elliptic@6.5.3",_id:"elliptic@6.5.3",_inBundle:!1,_integrity:"sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.5.3",name:"elliptic",escapedName:"elliptic",rawSpec:"6.5.3",saveSpec:null,fetchSpec:"6.5.3"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",_spec:"6.5.3",_where:"/Users/numberwolf/Documents/webroot/VideoMissile/VideoMissilePlayer",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},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"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^3.0.8",grunt:"^1.0.4","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":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.10.3",mocha:"^6.2.2"},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.5.3"}},{}],104:[function(e,t,i){var r=Object.create||function(e){var t=function(){};return t.prototype=e,new t},n=Object.keys||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return i},a=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var o,l=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),o=0===f.x}catch(e){o=!1}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function h(e,t,i){if(t)e.call(i);else for(var r=e.length,n=w(e,r),a=0;a0&&o.length>a){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,"object"==typeof console&&console.warn&&(l.name,l.message)}}else o=s[t]=i,++e._eventsCount;return e}function b(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(i=s[e]))return!1;var f="function"==typeof i;switch(r=arguments.length){case 1:h(i,f,this);break;case 2:c(i,f,this,arguments[1]);break;case 3:d(i,f,this,arguments[1],arguments[2]);break;case 4:_(i,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(r-1),a=1;a=0;s--)if(i[s]===t||i[s].listener===t){o=i[s].listener,a=s;break}if(a<0)return this;0===a?i.shift():function(e,t){for(var i=t,r=i+1,n=e.length;r=0;a--)this.removeListener(e,t[a]);return this},s.prototype.listeners=function(e){return y(this,e,!0)},s.prototype.rawListeners=function(e){return y(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],105:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("md5.js");t.exports=function(e,t,i,a){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=i/8,o=r.alloc(s),l=r.alloc(a||0),f=r.alloc(0);s>0||a>0;){var u=new n;u.update(f),u.update(e),t&&u.update(t),f=u.digest();var h=0;if(s>0){var c=o.length-s;h=Math.min(s,f.length),f.copy(o,c,0,h),s-=h}if(h0){var d=l.length-a,_=Math.min(a,f.length-h);f.copy(l,d,h,h+_),a-=_}}return f.fill(0),{key:o,iv:l}}},{"md5.js":139,"safe-buffer":184}],106:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("readable-stream").Transform;function a(e){n.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(a,n),a.prototype._transform=function(e,t,i){var r=null;try{this.update(e,t)}catch(e){r=e}i(r)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},a.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var i=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var a=this._blockOffset;a0;++s)this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.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 i=0;i<4;++i)this._length[i]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},{inherits:136,"readable-stream":121,"safe-buffer":184}],107:[function(e,t,i){arguments[4][49][0].apply(i,arguments)},{dup:49}],108:[function(e,t,i){arguments[4][50][0].apply(i,arguments)},{"./_stream_readable":110,"./_stream_writable":112,_process:158,dup:50,inherits:136}],109:[function(e,t,i){arguments[4][51][0].apply(i,arguments)},{"./_stream_transform":111,dup:51,inherits:136}],110:[function(e,t,i){arguments[4][52][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,"./internal/streams/async_iterator":113,"./internal/streams/buffer_list":114,"./internal/streams/destroy":115,"./internal/streams/from":117,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:52,events:104,inherits:136,"string_decoder/":195,util:20}],111:[function(e,t,i){arguments[4][53][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,dup:53,inherits:136}],112:[function(e,t,i){arguments[4][54][0].apply(i,arguments)},{"../errors":107,"./_stream_duplex":108,"./internal/streams/destroy":115,"./internal/streams/state":119,"./internal/streams/stream":120,_process:158,buffer:66,dup:54,inherits:136,"util-deprecate":197}],113:[function(e,t,i){arguments[4][55][0].apply(i,arguments)},{"./end-of-stream":116,_process:158,dup:55}],114:[function(e,t,i){arguments[4][56][0].apply(i,arguments)},{buffer:66,dup:56,util:20}],115:[function(e,t,i){arguments[4][57][0].apply(i,arguments)},{_process:158,dup:57}],116:[function(e,t,i){arguments[4][58][0].apply(i,arguments)},{"../../../errors":107,dup:58}],117:[function(e,t,i){arguments[4][59][0].apply(i,arguments)},{dup:59}],118:[function(e,t,i){arguments[4][60][0].apply(i,arguments)},{"../../../errors":107,"./end-of-stream":116,dup:60}],119:[function(e,t,i){arguments[4][61][0].apply(i,arguments)},{"../../../errors":107,dup:61}],120:[function(e,t,i){arguments[4][62][0].apply(i,arguments)},{dup:62,events:104}],121:[function(e,t,i){arguments[4][63][0].apply(i,arguments)},{"./lib/_stream_duplex.js":108,"./lib/_stream_passthrough.js":109,"./lib/_stream_readable.js":110,"./lib/_stream_transform.js":111,"./lib/_stream_writable.js":112,"./lib/internal/streams/end-of-stream.js":116,"./lib/internal/streams/pipeline.js":118,dup:63}],122:[function(e,t,i){var r=i;r.utils=e("./hash/utils"),r.common=e("./hash/common"),r.sha=e("./hash/sha"),r.ripemd=e("./hash/ripemd"),r.hmac=e("./hash/hmac"),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},{"./hash/common":123,"./hash/hmac":124,"./hash/ripemd":125,"./hash/sha":126,"./hash/utils":133}],123:[function(e,t,i){"use strict";var r=e("./utils"),n=e("minimalistic-assert");function a(){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}i.BlockHash=a,a.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-i,this.endian);for(var n=0;n>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,a=8;athis.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t>>3},i.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},{"../utils":133}],133:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits");function a(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function l(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}i.inherits=n,i.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>6|192,i[r++]=63&s|128):a(e,n)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++n)),i[r++]=s>>18|240,i[r++]=s>>12&63|128,i[r++]=s>>6&63|128,i[r++]=63&s|128):(i[r++]=s>>12|224,i[r++]=s>>6&63|128,i[r++]=63&s|128)}else for(n=0;n>>0}return s},i.split32=function(e,t){for(var i=new Array(4*e.length),r=0,n=0;r>>24,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=255&a):(i[n+3]=a>>>24,i[n+2]=a>>>16&255,i[n+1]=a>>>8&255,i[n]=255&a)}return i},i.rotr32=function(e,t){return e>>>t|e<<32-t},i.rotl32=function(e,t){return e<>>32-t},i.sum32=function(e,t){return e+t>>>0},i.sum32_3=function(e,t,i){return e+t+i>>>0},i.sum32_4=function(e,t,i,r){return e+t+i+r>>>0},i.sum32_5=function(e,t,i,r,n){return e+t+i+r+n>>>0},i.sum64=function(e,t,i,r){var n=e[t],a=r+e[t+1]>>>0,s=(a>>0,e[t+1]=a},i.sum64_hi=function(e,t,i,r){return(t+r>>>0>>0},i.sum64_lo=function(e,t,i,r){return t+r>>>0},i.sum64_4_hi=function(e,t,i,r,n,a,s,o){var l=0,f=t;return l+=(f=f+r>>>0)>>0)>>0)>>0},i.sum64_4_lo=function(e,t,i,r,n,a,s,o){return t+r+a+o>>>0},i.sum64_5_hi=function(e,t,i,r,n,a,s,o,l,f){var u=0,h=t;return u+=(h=h+r>>>0)>>0)>>0)>>0)>>0},i.sum64_5_lo=function(e,t,i,r,n,a,s,o,l,f){return t+r+a+o+f>>>0},i.rotr64_hi=function(e,t,i){return(t<<32-i|e>>>i)>>>0},i.rotr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0},i.shr64_hi=function(e,t,i){return e>>>i},i.shr64_lo=function(e,t,i){return(e<<32-i|t>>>i)>>>0}},{inherits:136,"minimalistic-assert":142}],134:[function(e,t,i){"use strict";var r=e("hash.js"),n=e("minimalistic-crypto-utils"),a=e("minimalistic-assert");function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex"),i=n.toArray(e.nonce,e.nonceEnc||"hex"),r=n.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,i,r)}t.exports=s,s.prototype._init=function(e,t,i){var r=e.concat(t).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},s.prototype.generate=function(e,t,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=i,i=t,t=null),i&&(i=n.toArray(i,r||"hex"),this._update(i));for(var a=[];a.length>1,u=-7,h=i?n-1:0,c=i?-1:1,d=e[t+h];for(h+=c,a=d&(1<<-u)-1,d>>=-u,u+=o;u>0;a=256*a+e[t+h],h+=c,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=r;u>0;s=256*s+e[t+h],h+=c,u-=8);if(0===a)a=1-f;else{if(a===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),a-=f}return(d?-1:1)*s*Math.pow(2,a-r)},i.write=function(e,t,i,r,n,a){var s,o,l,f=8*a-n-1,u=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,_=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?c/l:c*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=u?(o=0,s=u):s+h>=1?(o=(t*l-1)*Math.pow(2,n),s+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,n),s=0));n>=8;e[i+d]=255&o,d+=_,o/=256,n-=8);for(s=s<0;e[i+d]=255&s,d+=_,s/=256,f-=8);e[i+d-_]|=128*p}},{}],136:[function(e,t,i){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},{}],137:[function(e,t,i){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ +t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],138:[function(e,t,i){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],139:[function(e,t,i){"use strict";var r=e("inherits"),n=e("hash-base"),a=e("safe-buffer").Buffer,s=new Array(16);function o(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<>>32-t}function f(e,t,i,r,n,a,s){return l(e+(t&i|~t&r)+n+a|0,s)+t|0}function u(e,t,i,r,n,a,s){return l(e+(t&r|i&~r)+n+a|0,s)+t|0}function h(e,t,i,r,n,a,s){return l(e+(t^i^r)+n+a|0,s)+t|0}function c(e,t,i,r,n,a,s){return l(e+(i^(t|~r))+n+a|0,s)+t|0}r(o,n),o.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var i=this._a,r=this._b,n=this._c,a=this._d;i=f(i,r,n,a,e[0],3614090360,7),a=f(a,i,r,n,e[1],3905402710,12),n=f(n,a,i,r,e[2],606105819,17),r=f(r,n,a,i,e[3],3250441966,22),i=f(i,r,n,a,e[4],4118548399,7),a=f(a,i,r,n,e[5],1200080426,12),n=f(n,a,i,r,e[6],2821735955,17),r=f(r,n,a,i,e[7],4249261313,22),i=f(i,r,n,a,e[8],1770035416,7),a=f(a,i,r,n,e[9],2336552879,12),n=f(n,a,i,r,e[10],4294925233,17),r=f(r,n,a,i,e[11],2304563134,22),i=f(i,r,n,a,e[12],1804603682,7),a=f(a,i,r,n,e[13],4254626195,12),n=f(n,a,i,r,e[14],2792965006,17),i=u(i,r=f(r,n,a,i,e[15],1236535329,22),n,a,e[1],4129170786,5),a=u(a,i,r,n,e[6],3225465664,9),n=u(n,a,i,r,e[11],643717713,14),r=u(r,n,a,i,e[0],3921069994,20),i=u(i,r,n,a,e[5],3593408605,5),a=u(a,i,r,n,e[10],38016083,9),n=u(n,a,i,r,e[15],3634488961,14),r=u(r,n,a,i,e[4],3889429448,20),i=u(i,r,n,a,e[9],568446438,5),a=u(a,i,r,n,e[14],3275163606,9),n=u(n,a,i,r,e[3],4107603335,14),r=u(r,n,a,i,e[8],1163531501,20),i=u(i,r,n,a,e[13],2850285829,5),a=u(a,i,r,n,e[2],4243563512,9),n=u(n,a,i,r,e[7],1735328473,14),i=h(i,r=u(r,n,a,i,e[12],2368359562,20),n,a,e[5],4294588738,4),a=h(a,i,r,n,e[8],2272392833,11),n=h(n,a,i,r,e[11],1839030562,16),r=h(r,n,a,i,e[14],4259657740,23),i=h(i,r,n,a,e[1],2763975236,4),a=h(a,i,r,n,e[4],1272893353,11),n=h(n,a,i,r,e[7],4139469664,16),r=h(r,n,a,i,e[10],3200236656,23),i=h(i,r,n,a,e[13],681279174,4),a=h(a,i,r,n,e[0],3936430074,11),n=h(n,a,i,r,e[3],3572445317,16),r=h(r,n,a,i,e[6],76029189,23),i=h(i,r,n,a,e[9],3654602809,4),a=h(a,i,r,n,e[12],3873151461,11),n=h(n,a,i,r,e[15],530742520,16),i=c(i,r=h(r,n,a,i,e[2],3299628645,23),n,a,e[0],4096336452,6),a=c(a,i,r,n,e[7],1126891415,10),n=c(n,a,i,r,e[14],2878612391,15),r=c(r,n,a,i,e[5],4237533241,21),i=c(i,r,n,a,e[12],1700485571,6),a=c(a,i,r,n,e[3],2399980690,10),n=c(n,a,i,r,e[10],4293915773,15),r=c(r,n,a,i,e[1],2240044497,21),i=c(i,r,n,a,e[8],1873313359,6),a=c(a,i,r,n,e[15],4264355552,10),n=c(n,a,i,r,e[6],2734768916,15),r=c(r,n,a,i,e[13],1309151649,21),i=c(i,r,n,a,e[4],4149444226,6),a=c(a,i,r,n,e[11],3174756917,10),n=c(n,a,i,r,e[2],718787259,15),r=c(r,n,a,i,e[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+a|0},o.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=a.allocUnsafe(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=o},{"hash-base":106,inherits:136,"safe-buffer":184}],140:[function(e,t,i){var r=e("bn.js"),n=e("brorand");function a(e){this.rand=e||new n.Rand}t.exports=a,a.create=function(e){return new a(e)},a.prototype._randbelow=function(e){var t=e.bitLength(),i=Math.ceil(t/8);do{var n=new r(this.rand.generate(i))}while(n.cmp(e)>=0);return n},a.prototype._randrange=function(e,t){var i=t.sub(e);return e.add(this._randbelow(i))},a.prototype.test=function(e,t,i){var n=e.bitLength(),a=r.mont(e),s=new r(1).toRed(a);t||(t=Math.max(1,n/48|0));for(var o=e.subn(1),l=0;!o.testn(l);l++);for(var f=e.shrn(l),u=o.toRed(a);t>0;t--){var h=this._randrange(new r(2),o);i&&i(h);var c=h.toRed(a).redPow(f);if(0!==c.cmp(s)&&0!==c.cmp(u)){for(var d=1;d0;t--){var u=this._randrange(new r(2),s),h=e.gcd(u);if(0!==h.cmpn(1))return h;var c=u.toRed(n).redPow(l);if(0!==c.cmp(a)&&0!==c.cmp(f)){for(var d=1;d>8,s=255&n;a?i.push(a,s):i.push(s)}return i},r.zero2=n,r.toHex=a,r.encode=function(e,t){return"hex"===t?a(e):e}},{}],144:[function(e,t,i){var r,n,a=(r=new Date,n=4,{setLogLevel:function(e){n=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=n&&console.info("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=n&&a.getDurationString(new Date-r,1e3)},error:function(e,t){4>=n&&console.error("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)}});a.getDurationString=function(e,t){var i;function r(e,t){for(var i=(""+e).split(".");i[0].length0){for(var i="",r=0;r0&&(i+=","),i+="["+a.getDurationString(e.start(r))+","+a.getDurationString(e.end(r))+"]";return i}return"(empty)"},void 0!==i&&(i.Log=a);var s=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};s.prototype.getPosition=function(){return this.position},s.prototype.getEndPosition=function(){return this.buffer.byteLength},s.prototype.getLength=function(){return this.buffer.byteLength},s.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0},s.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},s.prototype.readAnyInt=function(e,t){var i=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:i=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:i=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";i=this.dataview.getUint8(this.position)<<16,i|=this.dataview.getUint8(this.position)<<8,i|=this.dataview.getUint8(this.position);break;case 4:i=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";i=this.dataview.getUint32(this.position)<<32,i|=this.dataview.getUint32(this.position);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,i}throw"Not enough bytes in buffer"},s.prototype.readUint8=function(){return this.readAnyInt(1,!1)},s.prototype.readUint16=function(){return this.readAnyInt(2,!1)},s.prototype.readUint24=function(){return this.readAnyInt(3,!1)},s.prototype.readUint32=function(){return this.readAnyInt(4,!1)},s.prototype.readUint64=function(){return this.readAnyInt(8,!1)},s.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",i=0;ithis._byteLength&&(this._byteLength=t);else{for(i<1&&(i=1);t>i;)i*=2;var r=new ArrayBuffer(i),n=new Uint8Array(this._buffer);new Uint8Array(r,0,n.length).set(n),this.buffer=r,this._byteLength=t}}},o.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),i=new Uint8Array(this._buffer,0,t.length);t.set(i),this.buffer=e}},o.BIG_ENDIAN=!1,o.LITTLE_ENDIAN=!0,o.prototype._byteLength=0,Object.defineProperty(o.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(o.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),o.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},o.prototype.isEof=function(){return this.position>=this._byteLength},o.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},o.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Int32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Int16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},o.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Uint32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Uint16Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},o.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var i=new Float64Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Float32Array(e);return o.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),o.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},o.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},o.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},o.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},o.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},o.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},o.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},o.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,o.memcpy=function(e,t,i,r,n){var a=new Uint8Array(e,t,n),s=new Uint8Array(i,r,n);a.set(s)},o.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},o.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},o.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i=0;in;r--,n++){var a=t[n];t[n]=t[r],t[r]=a}return e},o.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],i=0;i>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},o.prototype.adjustUint32=function(e,t){var i=this.position;this.seek(e),this.writeUint32(t),this.seek(i)},o.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var i=new Int32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},o.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var i=new Int16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},o.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},o.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},o.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},o.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var i=new Float64Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=8*e,i},o.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var i=new Float32Array(this._buffer,this.byteOffset+this.position,e);return o.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i};var f=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(f.prototype=new o(new ArrayBuffer,0,o.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),e.byteLength),i.buffer},f.prototype.reduceBuffer=function(e,t,i){var r;return(r=new Uint8Array(i)).set(new Uint8Array(e,t,i)),r.buffer.fileStart=e.fileStart+t,r.buffer.usedBytes=0,r.buffer},f.prototype.insertBuffer=function(e){for(var t=!0,i=0;ir.byteLength){this.buffers.splice(i,1),i--;continue}a.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=r.fileStart||(e=this.reduceBuffer(e,0,r.fileStart-e.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(i,0,e),0===i&&(this.buffer=e);t=!1;break}if(e.fileStart0)){t=!1;break}e=this.reduceBuffer(e,n,s)}}t&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===i&&(this.buffer=e))},f.prototype.logBufferLevel=function(e){var t,i,r,n,s,o=[],l="";for(r=0,n=0,t=0;t0&&(l+=s.end-1+"]");var f=e?a.info:a.debug;0===this.buffers.length?f("MultiBufferStream","No more buffer in memory"):f("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+r+"/"+n+" bytes): "+l)},f.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}return!1}return!1},f.prototype.findPosition=function(e,t,i){var r,n=null,s=-1;for(r=!0===e?0:this.bufferIndex;r=t?(a.debug("MultiBufferStream","Found position in existing buffer #"+s),s):-1},f.prototype.findEndContiguousBuf=function(e){var t,i,r,n=void 0!==e?e:this.bufferIndex;if(i=this.buffers[n],this.buffers.length>n+1)for(t=n+1;t>3;return 31===r&&i.data.length>=2&&(r=32+((7&i.data[0])<<3)+((224&i.data[1])>>5)),r}return null},i.DecoderConfigDescriptor=function(e){i.Descriptor.call(this,4,e)},i.DecoderConfigDescriptor.prototype=new i.Descriptor,i.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},i.DecoderSpecificInfo=function(e){i.Descriptor.call(this,5,e)},i.DecoderSpecificInfo.prototype=new i.Descriptor,i.SLConfigDescriptor=function(e){i.Descriptor.call(this,6,e)},i.SLConfigDescriptor.prototype=new i.Descriptor,this};void 0!==i&&(i.MPEG4DescriptorParser=u);var h={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){h.FullBox.prototype=new h.Box,h.ContainerBox.prototype=new h.Box,h.SampleEntry.prototype=new h.Box,h.TrackGroupTypeBox.prototype=new h.FullBox,h.BASIC_BOXES.forEach((function(e){h.createBoxCtor(e)})),h.FULL_BOXES.forEach((function(e){h.createFullBoxCtor(e)})),h.CONTAINER_BOXES.forEach((function(e){h.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,i){this.type=e,this.size=t,this.uuid=i},FullBox:function(e,t,i){h.Box.call(this,e,t,i),this.flags=0,this.version=0},ContainerBox:function(e,t,i){h.Box.call(this,e,t,i),this.boxes=[]},SampleEntry:function(e,t,i,r){h.ContainerBox.call(this,e,t),this.hdr_size=i,this.start=r},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){h.FullBox.call(this,e,t)},createBoxCtor:function(e,t){h.boxCodes.push(e),h[e+"Box"]=function(t){h.Box.call(this,e,t)},h[e+"Box"].prototype=new h.Box,t&&(h[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){h[e+"Box"]=function(t){h.FullBox.call(this,e,t)},h[e+"Box"].prototype=new h.FullBox,h[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,i=0;ii?(a.error("BoxParser","Box of type '"+u+"' has a size "+f+" greater than its container size "+i),{code:h.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):o+f>e.getEndPosition()?(e.seek(o),a.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:h.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):t?{code:h.OK,type:u,size:f,hdr_size:l,start:o}:(h[u+"Box"]?r=new h[u+"Box"](f):"uuid"!==u?(a.warn("BoxParser","Unknown box type: '"+u+"'"),(r=new h.Box(u,f)).has_unparsed_data=!0):h.UUIDBoxes[s]?r=new h.UUIDBoxes[s](f):(a.warn("BoxParser","Unknown uuid type: '"+s+"'"),(r=new h.Box(u,f)).uuid=s,r.has_unparsed_data=!0),r.hdr_size=l,r.start=o,r.write===h.Box.prototype.write&&"mdat"!==r.type&&(a.info("BoxParser","'"+c+"' box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(e)),r.parse(e),(n=e.getPosition()-(r.start+r.size))<0?(a.warn("BoxParser","Parsing of box '"+c+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),e.seek(r.start+r.size)):n>0&&(a.error("BoxParser","Parsing of box '"+c+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),e.seek(r.start+r.size)),{code:h.OK,box:r,size:r.size})},h.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},h.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},h.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},h.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},h.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},h.ContainerBox.prototype.parse=function(e){for(var t,i;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)},h.SAMPLE_ENTRY_TYPE_VISUAL="Visual",h.SAMPLE_ENTRY_TYPE_AUDIO="Audio",h.SAMPLE_ENTRY_TYPE_HINT="Hint",h.SAMPLE_ENTRY_TYPE_METADATA="Metadata",h.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",h.SAMPLE_ENTRY_TYPE_SYSTEM="System",h.SAMPLE_ENTRY_TYPE_TEXT="Text",h.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},h.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},h.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},h.SampleEntry.prototype.parseFooter=function(e){h.ContainerBox.prototype.parse.call(this,e)},h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_HINT),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_METADATA),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SUBTITLE),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SYSTEM),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_TEXT),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)})),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_TEXT,"enct"),h.createEncryptedSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_METADATA,"encm"),h.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)a.error("av1C marker problem");else if(this.version=127&t,1===this.version)if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void a.error("av1C reserved_2 parsing problem");var i=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(i)}else a.error("av1C reserved_1 parsing problem");else a.error("av1C version "+this.version+" not supported")})),h.createBoxCtor("avcC",(function(e){var t,i;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),i=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(i))})),h.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),h.createBoxCtor("clap",(function(e){this.cleanApertureWidthN=e.readUint32(),this.cleanApertureWidthD=e.readUint32(),this.cleanApertureHeightN=e.readUint32(),this.cleanApertureHeightD=e.readUint32(),this.horizOffN=e.readUint32(),this.horizOffD=e.readUint32(),this.vertOffN=e.readUint32(),this.vertOffD=e.readUint32()})),h.createBoxCtor("clli",(function(e){this.max_content_light_level=e.readUint16(),this.max_pic_average_light_level=e.readUint16()})),h.createFullBoxCtor("co64",(function(e){var t,i;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(i=0;i>7}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4))})),h.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),h.createFullBoxCtor("cslg",(function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())})),h.createFullBoxCtor("ctts",(function(e){var t,i;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(i=0;i>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|i>>6&3,this.acmod=i>>3&7,this.lfeon=i>>2&1,this.bit_rate_code=3&i|r>>5&7})),h.createBoxCtor("dec3",(function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var i=0;i>6,r.bsid=n>>1&31,r.bsmod=(1&n)<<4|a>>4&15,r.acmod=a>>1&7,r.lfeon=1&a,r.num_dep_sub=s>>1&15,r.num_dep_sub>0&&(r.chan_loc=(1&s)<<8|e.readUint8())}})),h.createFullBoxCtor("dfLa",(function(e){var t=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var r=e.readUint8(),n=Math.min(127&r,i.length-1);if(n?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(i[n]),128&r)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),h.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),h.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),h.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),h.createFullBoxCtor("dref",(function(e){var t,i;this.entries=[];for(var r=e.readUint32(),n=0;n=4;)this.compatible_brands[i]=e.readString(4),t-=4,i++})),h.createFullBoxCtor("hdlr",(function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))})),h.createBoxCtor("hvcC",(function(e){var t,i,r,n;this.configurationVersion=e.readUint8(),n=e.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),n=e.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var a=e.readUint8();for(t=0;t>7,s.nalu_type=63&n;var o=e.readUint16();for(i=0;i>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var i=0;if(this.version<2)i=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";i=e.readUint32()}for(var r=0;r=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))})),h.createFullBoxCtor("ipma",(function(e){var t,i;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?s.property_index=(127&a)<<8|e.readUint8():s.property_index=127&a}}})),h.createFullBoxCtor("iref",(function(e){var t,i;for(this.references=[];e.getPosition()>7,r.assignment_type=127&n,r.assignment_type){case 0:r.grouping_type=e.readString(4);break;case 1:r.grouping_type=e.readString(4),r.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:r.sub_track_id=e.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type")}}})),h.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),h.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]={},this.display_primaries[0].x=e.readUint16(),this.display_primaries[0].y=e.readUint16(),this.display_primaries[1]={},this.display_primaries[1].x=e.readUint16(),this.display_primaries[1].y=e.readUint16(),this.display_primaries[2]={},this.display_primaries[2].x=e.readUint16(),this.display_primaries[2].y=e.readUint16(),this.white_point={},this.white_point.x=e.readUint16(),this.white_point.y=e.readUint16(),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),h.createFullBoxCtor("mdhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()})),h.createFullBoxCtor("mehd",(function(e){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()})),h.createFullBoxCtor("meta",(function(e){this.boxes=[],h.ContainerBox.prototype.parse.call(this,e)})),h.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),h.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),h.createFullBoxCtor("mvhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()})),h.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),h.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),h.createFullBoxCtor("padb",(function(e){var t=e.readUint32();this.padbits=[];for(var i=0;i0){var t=e.readUint32();this.kid=[];for(var i=0;i0&&(this.data=e.readUint8Array(r))})),h.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),h.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),h.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),h.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),h.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),h.createFullBoxCtor("saio",(function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var i=0;i>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var i=e.readUint8(),r=0;r>7,this.num_leading_samples=127&t})),h.createSampleGroupCtor("rash",(function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=h.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))})),h.createSampleGroupCtor("stsa",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),h.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),h.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),h.createSampleGroupCtor("tsas",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),h.createSampleGroupCtor("tscl",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),h.createSampleGroupCtor("vipr",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),h.createFullBoxCtor("sbgp",(function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),i=0;i>6,this.sample_depends_on[r]=t>>4&3,this.sample_is_depended_on[r]=t>>2&3,this.sample_has_redundancy[r]=3&t})),h.createFullBoxCtor("senc"),h.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),i=0;i>31&1,r.referenced_size=2147483647&n,r.subsegment_duration=e.readUint32(),n=e.readUint32(),r.starts_with_SAP=n>>31&1,r.SAP_type=n>>28&7,r.SAP_delta_time=268435455&n}})),h.SingleItemTypeReferenceBox=function(e,t,i,r){h.Box.call(this,e,t),this.hdr_size=i,this.start=r},h.SingleItemTypeReferenceBox.prototype=new h.Box,h.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var i=0;i>4&15,this.sample_sizes[t+1]=15&r}else if(8===this.field_size)for(t=0;t0)for(i=0;i>4&15,this.default_skip_byte_block=15&t}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=h.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))})),h.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),h.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&h.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),h.createFullBoxCtor("tfra",(function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var i=e.readUint32(),r=0;r>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()})),h.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),h.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),h.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),h.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),h.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),h.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},h.createTrackGroupCtor("msrc"),h.TrackReferenceTypeBox=function(e,t,i,r){h.Box.call(this,e,t),this.hdr_size=i,this.start=r},h.TrackReferenceTypeBox.prototype=new h.Box,h.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},h.trefBox.prototype.parse=function(e){for(var t,i;e.getPosition()t&&this.flags&h.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&h.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var i=0;i0&&(this.location=e.readCString())})),h.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})),h.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=h.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),h.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),h.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=h.parseHex16(e)})),h.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))})),h.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),h.SampleEntry.prototype.isVideo=function(){return!1},h.SampleEntry.prototype.isAudio=function(){return!1},h.SampleEntry.prototype.isSubtitle=function(){return!1},h.SampleEntry.prototype.isMetadata=function(){return!1},h.SampleEntry.prototype.isHint=function(){return!1},h.SampleEntry.prototype.getCodec=function(){return this.type.replace(".","")},h.SampleEntry.prototype.getWidth=function(){return""},h.SampleEntry.prototype.getHeight=function(){return""},h.SampleEntry.prototype.getChannelCount=function(){return""},h.SampleEntry.prototype.getSampleRate=function(){return""},h.SampleEntry.prototype.getSampleSize=function(){return""},h.VisualSampleEntry.prototype.isVideo=function(){return!0},h.VisualSampleEntry.prototype.getWidth=function(){return this.width},h.VisualSampleEntry.prototype.getHeight=function(){return this.height},h.AudioSampleEntry.prototype.isAudio=function(){return!0},h.AudioSampleEntry.prototype.getChannelCount=function(){return this.channel_count},h.AudioSampleEntry.prototype.getSampleRate=function(){return this.samplerate},h.AudioSampleEntry.prototype.getSampleSize=function(){return this.samplesize},h.SubtitleSampleEntry.prototype.isSubtitle=function(){return!0},h.MetadataSampleEntry.prototype.isMetadata=function(){return!0},h.decimalToHex=function(e,t){var i=Number(e).toString(16);for(t=null==t?t=2:t;i.length>=1;t+=h.decimalToHex(r,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var n=!1,a="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||n)&&(a="."+h.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+a,n=!0);t+=a}return t},h.mp4aSampleEntry.prototype.getCodec=function(){var e=h.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),i=this.esds.esd.getAudioConfig();return e+"."+h.decimalToHex(t)+(i?"."+i:"")}return e},h.stxtSampleEntry.prototype.getCodec=function(){var e=h.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},h.av01SampleEntry.prototype.getCodec=function(){var e,t=h.SampleEntry.prototype.getCodec.call(this);return 2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+this.av1C.seq_level_idx_0+(this.av1C.seq_tier_0?"H":"M")+"."+e},h.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>l?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>l&&e.writeUint64(this.size)},h.FullBox.prototype.writeHeader=function(e){this.size+=4,h.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},h.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},h.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1-1||e[i]instanceof h.Box||t[i]instanceof h.Box||void 0===e[i]||void 0===t[i]||"function"==typeof e[i]||"function"==typeof t[i]||e.subBoxNames&&e.subBoxNames.indexOf(i.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(i.slice(0,4))>-1||"data"===i||"start"===i||"size"===i||"creation_time"===i||"modification_time"===i||h.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1||e[i]===t[i]))return!1;return!0},h.boxEqual=function(e,t){if(!h.boxEqualFields(e,t))return!1;for(var i=0;i=t?e:new Array(t-e.length+1).join(i)+e}function n(e){var t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),n=Math.floor(e-3600*t-60*i),a=Math.floor(1e3*(e-3600*t-60*i-n));return r(t,2)+":"+r(i,2)+":"+r(n,2)+"."+r(a,3)}for(var a=this.parseSample(i),s="",o=0;o1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1)},p.prototype.setExtractionOptions=function(e,t,i){var r=this.getTrackById(e);if(r){var n={};this.extractedTracks.push(n),n.id=e,n.user=t,n.trak=r,r.nextSample=0,n.nb_samples=1e3,n.samples=[],i&&i.nbSamples&&(n.nb_samples=i.nbSamples)}},p.prototype.unsetExtractionOptions=function(e){for(var t=-1,i=0;i-1&&this.extractedTracks.splice(t,1)},p.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this.saveParsePosition&&this.saveParsePosition(),(e=h.parseOneBox(this.stream,!1)).code===h.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var i;switch(i="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),i){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[i]&&a.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},p.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1))},p.prototype.appendBuffer=function(e,t){var i;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(i=this.nextSeekPosition,this.nextSeekPosition=void 0):i=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(i=this.stream.getEndFilePositionAfter(i))):i=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+i),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i},p.prototype.getInfo=function(){var e,t,i,r,n,a={},s=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(a.hasMoov=!0,a.duration=this.moov.mvhd.duration,a.timescale=this.moov.mvhd.timescale,a.isFragmented=null!=this.moov.mvex,a.isFragmented&&this.moov.mvex.mehd&&(a.fragment_duration=this.moov.mvex.mehd.fragment_duration),a.isProgressive=this.isProgressive,a.hasIOD=null!=this.moov.iods,a.brands=[],a.brands.push(this.ftyp.major_brand),a.brands=a.brands.concat(this.ftyp.compatible_brands),a.created=new Date(s+1e3*this.moov.mvhd.creation_time),a.modified=new Date(s+1e3*this.moov.mvhd.modification_time),a.tracks=[],a.audioTracks=[],a.videoTracks=[],a.subtitleTracks=[],a.metadataTracks=[],a.hintTracks=[],a.otherTracks=[],e=0;e0?a.mime+='video/mp4; codecs="':a.audioTracks&&a.audioTracks.length>0?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e=i.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+r.id+" for samples ["+Math.max(0,i.nextSample-r.nb_samples)+","+(i.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(r.id,r.user,r.segmentStream.buffer,i.nextSample,e||i.nextSample>=i.samples.length),r.segmentStream=null,r!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t=i.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+s.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(s.id,s.user,s.samples),s.samples=[],s!==this.extractedTracks[t]))break}}}},p.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},p.prototype.getBoxes=function(e,t){var i=[];return p._sweep.call(this,e,i,t),i},p._sweep=function(e,t,i){for(var r in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;p._sweep.call(this.boxes[r],e,t,i)}},p.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},p.prototype.getTrackSample=function(e,t){var i=this.getTrackById(e);return this.getSample(i,t)},p.prototype.releaseUsedSamples=function(e,t){var i=0,r=this.getTrackById(e);r.lastValidSample||(r.lastValidSample=0);for(var n=r.lastValidSample;ne*n.timescale){f=r-1;break}t&&n.is_sync&&(l=r)}for(t&&(f=l),e=i.samples[f].cts,i.nextSample=f;i.samples[f].alreadyRead===i.samples[f].size&&i.samples[f+1];)f++;return s=i.samples[f].offset+i.samples[f].alreadyRead,a.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+a.getDurationString(e,o)+" and offset: "+s),{offset:s,time:e/o}},p.prototype.seek=function(e,t){var i,r,n,s=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(n=0;n-1){s=o;break}switch(s){case"Visual":n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24);break;case"Audio":n.add("smhd").set("balance",t.balance||0),a.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":switch(n.add("sthd"),t.type){case"stpp":a.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"")}break;case"Metadata":case"System":default:n.add("nmhd")}t.description&&a.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){a.addBox(e)})),n.add("dinf").add("dref").addEntry((new h["url Box"]).set("flags",1));var u=n.add("stbl");return u.add("stsd").addEntry(a),u.add("stts").set("sample_counts",[]).set("sample_deltas",[]),u.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),u.add("stco").set("chunk_offsets",[]),u.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(i),t.id}},h.Box.prototype.computeSize=function(e){var t=e||new o;t.endianness=o.BIG_ENDIAN,this.write(t)},p.prototype.addSample=function(e,t,i){var r=i||{},n={},a=this.getTrackById(e);if(null!==a){n.number=a.samples.length,n.track_id=a.tkhd.track_id,n.timescale=a.mdia.mdhd.timescale,n.description_index=r.sample_description_index?r.sample_description_index-1:0,n.description=a.mdia.minf.stbl.stsd.entries[n.description_index],n.data=t,n.size=t.length,n.alreadyRead=n.size,n.duration=r.duration||1,n.cts=r.cts||0,n.dts=r.dts||0,n.is_sync=r.is_sync||!1,n.is_leading=r.is_leading||0,n.depends_on=r.depends_on||0,n.is_depended_on=r.is_depended_on||0,n.has_redundancy=r.has_redundancy||0,n.degradation_priority=r.degradation_priority||0,n.offset=0,n.subsamples=r.subsamples,a.samples.push(n),a.samples_size+=n.size,a.samples_duration+=n.duration,this.processSamples();var s=p.createSingleSampleMoof(n);return this.addBox(s),s.computeSize(),s.trafs[0].truns[0].data_offset=s.size+8,this.add("mdat").data=t,n}},p.createSingleSampleMoof=function(e){var t=new h.moofBox;t.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=t.add("traf");return i.add("tfhd").set("track_id",e.track_id).set("flags",h.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts),i.add("trun").set("flags",h.TRUN_FLAGS_DATA_OFFSET|h.TRUN_FLAGS_DURATION|h.TRUN_FLAGS_SIZE|h.TRUN_FLAGS_FLAGS|h.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[0]).set("sample_composition_time_offset",[e.cts-e.dts]),t},p.prototype.lastMoofIndex=0,p.prototype.samplesDataSize=0,p.prototype.resetTables=function(){var e,t,i,r,n,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=n[s].grouping_type+"/0",(o=new f(n[s].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=o))}else for(s=0;s=2&&(l=r[s].grouping_type+"/0",o=new f(r[s].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=o))},p.setSampleGroupProperties=function(e,t,i,r){var n,a;for(n in t.sample_groups=[],r){var s;if(t.sample_groups[n]={},t.sample_groups[n].grouping_type=r[n].grouping_type,t.sample_groups[n].grouping_type_parameter=r[n].grouping_type_parameter,i>=r[n].last_sample_in_run&&(r[n].last_sample_in_run<0&&(r[n].last_sample_in_run=0),r[n].entry_index++,r[n].entry_index<=r[n].sbgp.entries.length-1&&(r[n].last_sample_in_run+=r[n].sbgp.entries[r[n].entry_index].sample_count)),r[n].entry_index<=r[n].sbgp.entries.length-1?t.sample_groups[n].group_description_index=r[n].sbgp.entries[r[n].entry_index].group_description_index:t.sample_groups[n].group_description_index=-1,0!==t.sample_groups[n].group_description_index)s=r[n].fragment_description?r[n].fragment_description:r[n].description,t.sample_groups[n].group_description_index>0?(a=t.sample_groups[n].group_description_index>65535?(t.sample_groups[n].group_description_index>>16)-1:t.sample_groups[n].group_description_index-1,s&&a>=0&&(t.sample_groups[n].description=s.entries[a])):s&&s.version>=2&&s.default_group_description_index>0&&(t.sample_groups[n].description=s.entries[s.default_group_description_index-1])}},p.process_sdtp=function(e,t,i){t&&(e?(t.is_leading=e.is_leading[i],t.depends_on=e.sample_depends_on[i],t.is_depended_on=e.sample_is_depended_on[i],t.has_redundancy=e.sample_has_redundancy[i]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},p.prototype.buildSampleLists=function(){var e,t;for(e=0;ey&&(g++,y<0&&(y=0),y+=a.sample_counts[g]),t>0?(e.samples[t-1].duration=a.sample_deltas[g],e.samples_duration+=e.samples[t-1].duration,T.dts=e.samples[t-1].dts+e.samples[t-1].duration):T.dts=0,s?(t>=w&&(E++,w<0&&(w=0),w+=s.sample_counts[E]),T.cts=e.samples[t].dts+s.sample_offsets[E]):T.cts=T.dts,o?(t==o.sample_numbers[C]-1?(T.is_sync=!0,C++):(T.is_sync=!1,T.degradation_priority=0),f&&f.entries[S].sample_delta+j==t+1&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta,S++)):T.is_sync=!0,p.process_sdtp(e.mdia.minf.stbl.sdtp,T,T.number),T.degradation_priority=c?c.priority[t]:0,f&&f.entries[S].sample_delta+j==t&&(T.subsamples=f.entries[S].subsamples,j+=f.entries[S].sample_delta),(u.length>0||h.length>0)&&p.setSampleGroupProperties(e,T,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},p.prototype.updateSampleLists=function(){var e,t,i,r,n,a,s,o,l,f,u,c,d,_,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&p.initSampleGroups(c,u,u.sbgps,c.mdia.minf.stbl.sgpds,u.sgpds),t=0;t0?_.dts=c.samples[c.samples.length-2].dts+c.samples[c.samples.length-2].duration:(u.tfdt?_.dts=u.tfdt.baseMediaDecodeTime:_.dts=0,c.first_traf_merged=!0),_.cts=_.dts,b.flags&h.TRUN_FLAGS_CTS_OFFSET&&(_.cts=_.dts+b.sample_composition_time_offset[i]),m=s,b.flags&h.TRUN_FLAGS_FLAGS?m=b.sample_flags[i]:0===i&&b.flags&h.TRUN_FLAGS_FIRST_FLAG&&(m=b.first_sample_flags),_.is_sync=!(m>>16&1),_.is_leading=m>>26&3,_.depends_on=m>>24&3,_.is_depended_on=m>>22&3,_.has_redundancy=m>>20&3,_.degradation_priority=65535&m;var v=!!(u.tfhd.flags&h.TFHD_FLAG_BASE_DATA_OFFSET),y=!!(u.tfhd.flags&h.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),g=!!(b.flags&h.TRUN_FLAGS_DATA_OFFSET),w=0;w=v?u.tfhd.base_data_offset:y||0===t?f.start:o,_.offset=0===t&&0===i?g?w+b.data_offset:w:o,o=_.offset+_.size,(u.sbgps.length>0||u.sgpds.length>0||c.mdia.minf.stbl.sbgps.length>0||c.mdia.minf.stbl.sgpds.length>0)&&p.setSampleGroupProperties(c,_,_.number_in_traf,u.sample_groups_info)}}if(u.subs){c.has_fragment_subsamples=!0;var E=u.first_sample_index;for(t=0;t-1))return null;var s=(i=this.stream.buffers[n]).byteLength-(r.offset+r.alreadyRead-i.fileStart);if(r.size-r.alreadyRead<=s)return a.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+(r.size-r.alreadyRead)+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,r.size-r.alreadyRead),i.usedBytes+=r.size-r.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead=r.size,r;if(0===s)return null;a.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-i.fileStart)+" read size: "+s+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,i,r.offset+r.alreadyRead-i.fileStart,s),r.alreadyRead+=s,i.usedBytes+=s,this.stream.logBufferLevel()}},p.prototype.releaseSample=function(e,t){var i=e.samples[t];return i.data?(this.samplesDataSize-=i.size,i.data=null,i.alreadyRead=0,i.size):0},p.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},p.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec()}return t},p.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(i.protection=n.ipro.protections[n.iinf.item_infos[e].protection_index-1]),n.iinf.item_infos[e].item_type?i.type=n.iinf.item_infos[e].item_type:i.type="mime",i.content_type=n.iinf.item_infos[e].content_type,i.content_encoding=n.iinf.item_infos[e].content_encoding;if(n.iloc)for(e=0;e0){var c=n.iprp.ipco.boxes[h.property_index-1];i.properties[c.type]=c,i.properties.boxes.push(c)}}}}}},p.prototype.getItem=function(e){var t,i;if(!this.meta)return null;if(!(i=this.items[e]).data&&i.size)i.data=new Uint8Array(i.size),i.alreadyRead=0,this.itemsDataSize+=i.size,a.debug("ISOFile","Allocating item #"+e+" of size "+i.size+" (total: "+this.itemsDataSize+")");else if(i.alreadyRead===i.size)return i;for(var r=0;r-1))return null;var l=(t=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-t.fileStart);if(!(n.length-n.alreadyRead<=l))return a.debug("ISOFile","Getting item #"+e+" extent #"+r+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+l+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,l),n.alreadyRead+=l,i.alreadyRead+=l,t.usedBytes+=l,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+e+" extent #"+r+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+i.size+")"),o.memcpy(i.data.buffer,i.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,n.length-n.alreadyRead),t.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length}}return i.alreadyRead===i.size?i:null},p.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var i=0;i0?this.moov.traks[e].samples[0].duration:0),t.push(r)}return t},h.Box.prototype.printHeader=function(e){this.size+=8,this.size>l&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},h.FullBox.prototype.printHeader=function(e){this.size+=4,h.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},h.Box.prototype.print=function(e){this.printHeader(e)},h.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},h.tkhdBox.prototype.print=function(e){h.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var m={createFile:function(e,t){var i=void 0===e||e,r=new p(t);return r.discardMdatData=!i,r}};void 0!==i&&(i.createFile=m.createFile)},{}],145:[function(e,t,i){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"}},{}],146:[function(e,t,i){"use strict";var r=e("asn1.js");i.certificate=e("./certificate");var n=r.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())}));i.RSAPrivateKey=n;var a=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));i.RSAPublicKey=a;var s=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}));i.PublicKey=s;var o=r.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())})),l=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())}));i.PrivateKey=l;var f=r.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())}));i.EncryptedPrivateKey=f;var u=r.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())}));i.DSAPrivateKey=u,i.DSAparam=r.define("DSAparam",(function(){this.int()}));var h=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(c),this.key("publicKey").optional().explicit(1).bitstr())}));i.ECPrivateKey=h;var c=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));i.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":147,"asn1.js":2}],147:[function(e,t,i){"use strict";var r=e("asn1.js"),n=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),o=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),l=r.define("RelativeDistinguishedName",(function(){this.setof(a)})),f=r.define("RDNSequence",(function(){this.seqof(l)})),u=r.define("Name",(function(){this.choice({rdnSequence:this.use(f)})})),h=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),c=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(u),this.key("validity").use(h),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(c).optional())})),_=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=_},{"asn1.js":2}],148:[function(e,t,i){var r=/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,s=e("evp_bytestokey"),o=e("browserify-aes"),l=e("safe-buffer").Buffer;t.exports=function(e,t){var i,f=e.toString(),u=f.match(r);if(u){var h="aes"+u[1],c=l.from(u[2],"hex"),d=l.from(u[3].replace(/[\r\n]/g,""),"base64"),_=s(t,c.slice(0,8),parseInt(u[1],10)).key,p=[],m=o.createDecipheriv(h,_,c);p.push(m.update(d)),p.push(m.final()),i=l.concat(p)}else{var b=f.match(a);i=l.from(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:f.match(n)[1],data:i}}},{"browserify-aes":23,evp_bytestokey:105,"safe-buffer":184}],149:[function(e,t,i){var r=e("./asn1"),n=e("./aesid.json"),a=e("./fixProc"),s=e("browserify-aes"),o=e("pbkdf2"),l=e("safe-buffer").Buffer;function f(e){var t;"object"!=typeof e||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var i,f,u=a(e,t),h=u.tag,c=u.data;switch(h){case"CERTIFICATE":f=r.certificate.decode(c,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=r.PublicKey.decode(c,"der")),i=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=r.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":c=function(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=n[e.algorithm.decrypt.cipher.algo.join(".")],f=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,h=parseInt(a.split("-")[1],10)/8,c=o.pbkdf2Sync(t,i,r,h,"sha1"),d=s.createDecipheriv(a,c,f),_=[];return _.push(d.update(u)),_.push(d.final()),l.concat(_)}(c=r.EncryptedPrivateKey.decode(c,"der"),t);case"PRIVATE KEY":switch(i=(f=r.PrivateKey.decode(c,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:r.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=r.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(c,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(c,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(c,"der")};case"EC PRIVATE KEY":return{curve:(c=r.ECPrivateKey.decode(c,"der")).parameters.value,privateKey:c.privateKey};default:throw new Error("unknown key type "+h)}}t.exports=f,f.signature=r.signature},{"./aesid.json":145,"./asn1":146,"./fixProc":148,"browserify-aes":23,pbkdf2:151,"safe-buffer":184}],150:[function(e,t,i){(function(e){function t(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],r=0;r=-1&&!n;a--){var s=a>=0?arguments[a]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(i=s+"/"+i,n="/"===s.charAt(0))}return(n?"/":"")+(i=t(r(i.split("/"),(function(e){return!!e})),!n).join("/"))||"."},i.normalize=function(e){var a=i.isAbsolute(e),s="/"===n(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!a).join("/"))||a||(e="."),e&&s&&(e+="/"),(a?"/":"")+e},i.isAbsolute=function(e){return"/"===e.charAt(0)},i.join=function(){var e=Array.prototype.slice.call(arguments,0);return i.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},i.relative=function(e,t){function r(e){for(var t=0;t=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=i.resolve(e).substr(1),t=i.resolve(t).substr(1);for(var n=r(e.split("/")),a=r(t.split("/")),s=Math.min(n.length,a.length),o=s,l=0;l=1;--a)if(47===(t=e.charCodeAt(a))){if(!n){r=a;break}}else n=!1;return-1===r?i?"/":".":i&&1===r?"/":e.slice(0,r)},i.basename=function(e,t){var i=function(e){"string"!=typeof e&&(e+="");var t,i=0,r=-1,n=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!n){i=t+1;break}}else-1===r&&(n=!1,r=t+1);return-1===r?"":e.slice(i,r)}(e);return t&&i.substr(-1*t.length)===t&&(i=i.substr(0,i.length-t.length)),i},i.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,i=0,r=-1,n=!0,a=0,s=e.length-1;s>=0;--s){var o=e.charCodeAt(s);if(47!==o)-1===r&&(n=!1,r=s+1),46===o?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!n){i=s+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===i+1?"":e.slice(t,r)};var n="b"==="ab".substr(-1)?function(e,t,i){return e.substr(t,i)}:function(e,t,i){return t<0&&(t=e.length+t),e.substr(t,i)}}).call(this,e("_process"))},{_process:158}],151:[function(e,t,i){i.pbkdf2=e("./lib/async"),i.pbkdf2Sync=e("./lib/sync")},{"./lib/async":152,"./lib/sync":155}],152:[function(e,t,i){(function(i,r){var n,a=e("safe-buffer").Buffer,s=e("./precondition"),o=e("./default-encoding"),l=e("./sync"),f=e("./to-buffer"),u=r.crypto&&r.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"},c=[];function d(e,t,i,r,n){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:i,hash:{name:n}},e,r<<3)})).then((function(e){return a.from(e)}))}t.exports=function(e,t,_,p,m,b){"function"==typeof m&&(b=m,m=void 0);var v=h[(m=m||"sha1").toLowerCase()];if(!v||"function"!=typeof r.Promise)return i.nextTick((function(){var i;try{i=l(e,t,_,p,m)}catch(e){return b(e)}b(null,i)}));if(s(_,p),e=f(e,o,"Password"),t=f(t,o,"Salt"),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){i.nextTick((function(){t(null,e)}))}),(function(e){i.nextTick((function(){t(e)}))}))}(function(e){if(r.process&&!r.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==c[e])return c[e];var t=d(n=n||a.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return c[e]=t,t}(v).then((function(i){return i?d(e,t,_,p,v):l(e,t,_,p,m)})),b)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":153,"./precondition":154,"./sync":155,"./to-buffer":156,_process:158,"safe-buffer":184}],153:[function(e,t,i){(function(e){var i;if(e.browser)i="utf-8";else if(e.version){i=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else i="utf-8";t.exports=i}).call(this,e("_process"))},{_process:158}],154:[function(e,t,i){var r=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>r||t!=t)throw new TypeError("Bad key length")}},{}],155:[function(e,t,i){var r=e("create-hash/md5"),n=e("ripemd160"),a=e("sha.js"),s=e("safe-buffer").Buffer,o=e("./precondition"),l=e("./default-encoding"),f=e("./to-buffer"),u=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function c(e,t,i){var o=function(e){function t(t){return a(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?function(e){return(new n).update(e).digest()}:"md5"===e?r:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=o(t):t.length1)for(var i=1;i_||new s(t).cmp(d.modulus)>=0)throw new Error("decryption error");c=i?f(new s(t),d):o(t,d);var p=u.alloc(_-c.length);if(c=u.concat([p,c],_),4===h)return function(e,t){var i=e.modulus.byteLength(),r=l("sha1").update(u.alloc(0)).digest(),s=r.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,s+1),f=t.slice(s+1),h=a(o,n(f,s)),c=a(f,n(h,i-s-1));if(function(e,t){e=u.from(e),t=u.from(t);var i=0,r=e.length;e.length!==t.length&&(i++,r=Math.min(e.length,t.length));var n=-1;for(;++n=t.length){a++;break}var s=t.slice(2,n-1);("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&a++;s.length<8&&a++;if(a)throw new Error("decryption error");return t.slice(n)}(0,c,i);if(3===h)return c;throw new Error("unknown padding")}},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,"safe-buffer":184}],163:[function(e,t,i){var r=e("parse-asn1"),n=e("randombytes"),a=e("create-hash"),s=e("./mgf"),o=e("./xor"),l=e("bn.js"),f=e("./withPublic"),u=e("browserify-rsa"),h=e("safe-buffer").Buffer;t.exports=function(e,t,i){var c;c=e.padding?e.padding:i?1:4;var d,_=r(e);if(4===c)d=function(e,t){var i=e.modulus.byteLength(),r=t.length,f=a("sha1").update(h.alloc(0)).digest(),u=f.length,c=2*u;if(r>i-c-2)throw new Error("message too long");var d=h.alloc(i-r-c-2),_=i-u-1,p=n(u),m=o(h.concat([f,d,h.alloc(1,1),t],_),s(p,_)),b=o(p,s(m,u));return new l(h.concat([h.alloc(1),b,m],i))}(_,t);else if(1===c)d=function(e,t,i){var r,a=t.length,s=e.modulus.byteLength();if(a>s-11)throw new Error("message too long");r=i?h.alloc(s-a-3,255):function(e){var t,i=h.allocUnsafe(e),r=0,a=n(2*e),s=0;for(;r=0)throw new Error("data too long for modulus")}return i?u(d,_):f(d,_)}},{"./mgf":160,"./withPublic":164,"./xor":165,"bn.js":161,"browserify-rsa":41,"create-hash":71,"parse-asn1":149,randombytes:166,"safe-buffer":184}],164:[function(e,t,i){var r=e("bn.js"),n=e("safe-buffer").Buffer;t.exports=function(e,t){return n.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},{"bn.js":161,"safe-buffer":184}],165:[function(e,t,i){t.exports=function(e,t){for(var i=e.length,r=-1;++r4294967295)throw new RangeError("requested too many random bytes");var r=n.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;su||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function c(e,t,i){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>i||e>l)throw new RangeError("buffer too small")}function d(e,i,r,n){if(t.browser){var a=e.buffer,o=new Uint8Array(a,i,r);return f.getRandomValues(o),n?void t.nextTick((function(){n(null,e)})):e}if(!n)return s(r).copy(e,i),e;s(r,(function(t,r){if(t)return n(t);r.copy(e,i),n(null,e)}))}f&&f.getRandomValues||!t.browser?(i.randomFill=function(e,t,i,n){if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)n=t,t=0,i=e.length;else if("function"==typeof i)n=i,i=e.length-t;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return h(t,e.length),c(i,t,e.length),d(e,t,i,n)},i.randomFillSync=function(e,t,i){void 0===t&&(t=0);if(!(o.isBuffer(e)||e instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(t,e.length),void 0===i&&(i=e.length-t);return c(i,t,e.length),d(e,t,i)}):(i.randomFill=n,i.randomFillSync=n)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:158,randombytes:166,"safe-buffer":184}],168:[function(e,t,i){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":169}],169:[function(e,t,i){"use strict";var r=e("process-nextick-args"),n=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=h;var a=Object.create(e("core-util-is"));a.inherits=e("inherits");var s=e("./_stream_readable"),o=e("./_stream_writable");a.inherits(h,s);for(var l=n(o.prototype),f=0;f0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!i?(t=s.decoder.write(t),s.objectMode||0!==t.length?w(e,s,t,!1):j(e,s)):w(e,s,t,!1))):r||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(S,e):S(e))}function S(e){d("emit readable"),e.emit("readable"),M(e)}function j(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(T,e,t))}function T(e,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;ea.length?a.length:e;if(s===a.length?n+=a:n+=a.slice(0,e),0===(e-=s)){s===a.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(s));break}++r}return t.length-=r,n}(e,t):function(e,t){var i=f.allocUnsafe(e),r=t.head,n=1;r.data.copy(i),e-=r.data.length;for(;r=r.next;){var a=r.data,s=e>a.length?a.length:e;if(a.copy(i,i.length-e,0,s),0===(e-=s)){s===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(s));break}++n}return t.length-=n,i}(e,t);return r}(e,t.buffer,t.decoder),i);var i}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(I,t,e))}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function R(e,t){for(var i=0,r=e.length;i=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):C(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&P(this),null;var r,n=t.needReadable;return d("need readable",n),(0===t.length||t.length-e0?k(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),i!==e&&t.ended&&P(this)),null!==r&&this.emit("data",r),r},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,t);var l=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:y;function f(t,i){d("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",h),e.removeListener("error",m),e.removeListener("unpipe",f),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",p),c=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){d("onend"),e.end()}a.endEmitted?n.nextTick(l):r.once("end",l),e.on("unpipe",f);var h=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",h);var c=!1;var _=!1;function p(t){d("ondata"),_=!1,!1!==e.write(t)||_||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==R(a.pipes,e))&&!c&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,_=!0),r.pause())}function m(t){d("onerror",t),y(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),y()}function v(){d("onfinish"),e.removeListener("close",b),y()}function y(){d("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(e,"error",m),e.once("close",b),e.once("finish",v),e.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState,i={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,i)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a-1?n:a.nextTick;v.WritableState=b;var f=Object.create(e("core-util-is"));f.inherits=e("inherits");var u={deprecate:e("util-deprecate")},h=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,d=r.Uint8Array||function(){};var _,p=e("./internal/streams/destroy");function m(){}function b(t,i){o=o||e("./_stream_duplex"),t=t||{};var r=i instanceof o;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,f=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(f||0===f)?f:u,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 h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?(a.nextTick(n,r),a.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(n(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t))}(e,i,r,t,n);else{var s=E(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||w(e,i),r?l(g,e,i,s,n):g(e,i,s,n)}}(i,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 s(this)}function v(t){if(o=o||e("./_stream_duplex"),!(_.call(v,this)||this instanceof o))return new v(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function y(e,t,i,r,n,a,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function g(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),a=t.corkedRequestsFree;a.entry=i;for(var o=0,l=!0;i;)n[o]=i,i.isBuf||(l=!1),i=i.next,o+=1;n.allBuffers=l,y(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;i;){var f=i.chunk,u=i.encoding,h=i.callback;if(y(e,t,!1,t.objectMode?1:f.length,f,u,h),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var i=E(t);return i&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}f.inherits(v,h),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!_.call(this,e)||this===v&&(e&&e._writableState instanceof b)}})):_=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,i){var r,n=this._writableState,s=!1,o=!n.objectMode&&(r=e,c.isBuffer(r)||r instanceof d);return o&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(i=t,t=null),o?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof i&&(i=m),n.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),a.nextTick(t,i)}(this,i):(o||function(e,t,i,r){var n=!0,s=!1;return null===i?s=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),a.nextTick(r,s),n=!1),n}(this,n,e,i))&&(n.pendingcb++,s=function(e,t,i,r,n,a){if(!i){var s=function(e,t,i){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,i));return t}(t,r,n);r!==s&&(i=!0,n="buffer",r=s)}var o=t.objectMode?1:r.length;t.length+=o;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,S(e,t),i&&(t.finished?a.nextTick(i):e.once("finish",i));t.ended=!0,e.writable=!1}(this,r,i)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=p.destroy,v.prototype._undestroy=p.undestroy,v.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":169,"./internal/streams/destroy":175,"./internal/streams/stream":176,_process:158,"core-util-is":68,inherits:136,"process-nextick-args":157,"safe-buffer":177,timers:196,"util-deprecate":197}],174:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=e+t.data;return i},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,i,n,a=r.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,i=a,n=o,t.copy(i,n),o+=s.data.length,s=s.next;return a},e}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":177,util:20}],175:[function(e,t,i){"use strict";var r=e("process-nextick-args");function n(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var i=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(n,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(n,i,e),i._writableState&&(i._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":157}],176:[function(e,t,i){arguments[4][62][0].apply(i,arguments)},{dup:62,events:104}],177:[function(e,t,i){var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:66}],178:[function(e,t,i){"use strict";var r=e("safe-buffer").Buffer,n=r.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}};function a(e){var t;switch(this.encoding=function(e){var t=function(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}}(e);if("string"!=typeof t&&(r.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=f,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=c,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,i=function(e,t,i){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,"�"}}(this,e);return void 0!==i?i: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 l(e,t){if((e.length-t)%2==0){var i=e.toString("utf16le",t);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function u(e,t){var i=(e.length-t)%3;return 0===i?e.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?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-i))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function c(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}i.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i=0)return n>0&&(e.lastNeed=n-1),n;if(--r=0)return n>0&&(e.lastNeed=n-2),n;if(--r=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var r=e.length-(i-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},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":177}],179:[function(e,t,i){t.exports=e("./readable").PassThrough},{"./readable":180}],180:[function(e,t,i){(i=t.exports=e("./lib/_stream_readable.js")).Stream=i,i.Readable=i,i.Writable=e("./lib/_stream_writable.js"),i.Duplex=e("./lib/_stream_duplex.js"),i.Transform=e("./lib/_stream_transform.js"),i.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":169,"./lib/_stream_passthrough.js":170,"./lib/_stream_readable.js":171,"./lib/_stream_transform.js":172,"./lib/_stream_writable.js":173}],181:[function(e,t,i){t.exports=e("./readable").Transform},{"./readable":180}],182:[function(e,t,i){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":173}],183:[function(e,t,i){"use strict";var r=e("buffer").Buffer,n=e("inherits"),a=e("hash-base"),s=new Array(16),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[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],h=[0,1518500249,1859775393,2400959708,2840853838],c=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function _(e,t){return e<>>32-t}function p(e,t,i,r,n,a,s,o){return _(e+(t^i^r)+a+s|0,o)+n|0}function m(e,t,i,r,n,a,s,o){return _(e+(t&i|~t&r)+a+s|0,o)+n|0}function b(e,t,i,r,n,a,s,o){return _(e+((t|~i)^r)+a+s|0,o)+n|0}function v(e,t,i,r,n,a,s,o){return _(e+(t&r|i&~r)+a+s|0,o)+n|0}function y(e,t,i,r,n,a,s,o){return _(e+(t^(i|~r))+a+s|0,o)+n|0}n(d,a),d.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var i=0|this._a,r=0|this._b,n=0|this._c,a=0|this._d,d=0|this._e,g=0|this._a,w=0|this._b,E=0|this._c,C=0|this._d,S=0|this._e,j=0;j<80;j+=1){var T,A;j<16?(T=p(i,r,n,a,d,e[o[j]],h[0],f[j]),A=y(g,w,E,C,S,e[l[j]],c[0],u[j])):j<32?(T=m(i,r,n,a,d,e[o[j]],h[1],f[j]),A=v(g,w,E,C,S,e[l[j]],c[1],u[j])):j<48?(T=b(i,r,n,a,d,e[o[j]],h[2],f[j]),A=b(g,w,E,C,S,e[l[j]],c[2],u[j])):j<64?(T=v(i,r,n,a,d,e[o[j]],h[3],f[j]),A=m(g,w,E,C,S,e[l[j]],c[3],u[j])):(T=y(i,r,n,a,d,e[o[j]],h[4],f[j]),A=p(g,w,E,C,S,e[l[j]],c[4],u[j])),i=d,d=a,a=_(n,10),n=r,r=T,g=S,S=C,C=_(E,10),E=w,w=A}var x=this._b+n+C|0;this._b=this._c+a+S|0,this._c=this._d+d+g|0,this._d=this._e+i+w|0,this._e=this._a+r+E|0,this._a=x},d.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=r.alloc?r.alloc(20):new r(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=d},{buffer:66,"hash-base":106,inherits:136}],184:[function(e,t,i){ +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ +var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=s),s.prototype=Object.create(n.prototype),a(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:66}],185:[function(e,t,i){(function(i){"use strict";var r,n=e("buffer"),a=n.Buffer,s={};for(r in n)n.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(s[r]=n[r]);var o=s.Buffer={};for(r in a)a.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(o[r]=a[r]);if(s.Buffer.prototype=a.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(e,t,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return a(e,t,i)}),o.alloc||(o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=a(e);return t&&0!==t.length?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r}),!s.kStringMaxLength)try{s.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),t.exports=s}).call(this,e("_process"))},{_process:158,buffer:66}],186:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var i=this._block,n=this._blockSize,a=e.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},{"safe-buffer":184}],187:[function(e,t,i){(i=t.exports=function(e){e=e.toLowerCase();var t=i[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),i.sha1=e("./sha1"),i.sha224=e("./sha224"),i.sha256=e("./sha256"),i.sha384=e("./sha384"),i.sha512=e("./sha512")},{"./sha":188,"./sha1":189,"./sha224":190,"./sha256":191,"./sha384":192,"./sha512":193}],188:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e){return e<<30|e>>>2}function u(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,h=0;h<16;++h)i[h]=e.readInt32BE(4*h);for(;h<80;++h)i[h]=i[h-3]^i[h-8]^i[h-14]^i[h-16];for(var c=0;c<80;++c){var d=~~(c/20),_=0|((t=r)<<5|t>>>27)+u(d,n,a,o)+l+i[c]+s[d];l=o,o=a,a=f(n),n=r,r=_}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],189:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function h(e,t,i,r){return 0===e?t&i|~t&r:2===e?t&i|t&r|i&r:t^i^r}r(l,n),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,c=0;c<16;++c)i[c]=e.readInt32BE(4*c);for(;c<80;++c)i[c]=(t=i[c-3]^i[c-8]^i[c-14]^i[c-16])<<1|t>>>31;for(var d=0;d<80;++d){var _=~~(d/20),p=f(r)+h(_,n,a,o)+l+i[d]+s[_]|0;l=o,o=a,a=u(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],190:[function(e,t,i){var r=e("inherits"),n=e("./sha256"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(64);function l(){this.init(),this._w=o,a.call(this,64,56)}r(l,n),l.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},l.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=l},{"./hash":186,"./sha256":191,inherits:136,"safe-buffer":184}],191:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],o=new Array(64);function l(){this.init(),this._w=o,n.call(this,64,56)}function f(e,t,i){return i^e&(t^i)}function u(e,t,i){return e&t|i&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function c(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(l,n),l.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},l.prototype._update=function(e){for(var t,i=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,_=0|this._f,p=0|this._g,m=0|this._h,b=0;b<16;++b)i[b]=e.readInt32BE(4*b);for(;b<64;++b)i[b]=0|(((t=i[b-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+i[b-7]+d(i[b-15])+i[b-16];for(var v=0;v<64;++v){var y=m+c(l)+f(l,_,p)+s[v]+i[v]|0,g=h(r)+u(r,n,a)|0;m=p,p=_,_=l,l=o+y|0,o=a,a=n,n=r,r=y+g|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0,this._f=_+this._f|0,this._g=p+this._g|0,this._h=m+this._h|0},l.prototype._hash=function(){var e=a.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=l},{"./hash":186,inherits:136,"safe-buffer":184}],192:[function(e,t,i){var r=e("inherits"),n=e("./sha512"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(160);function l(){this.init(),this._w=o,a.call(this,128,112)}r(l,n),l.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},l.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=l},{"./hash":186,"./sha512":193,inherits:136,"safe-buffer":184}],193:[function(e,t,i){var r=e("inherits"),n=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=new Array(160);function l(){this.init(),this._w=o,n.call(this,128,112)}function f(e,t,i){return i^e&(t^i)}function u(e,t,i){return e&t|i&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function c(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function _(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function b(e,t){return e>>>0>>0?1:0}r(l,n),l.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},l.prototype._update=function(e){for(var t=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,a=0|this._dh,o=0|this._eh,l=0|this._fh,v=0|this._gh,y=0|this._hh,g=0|this._al,w=0|this._bl,E=0|this._cl,C=0|this._dl,S=0|this._el,j=0|this._fl,T=0|this._gl,A=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var M=t[x-30],k=t[x-30+1],P=d(M,k),I=_(k,M),R=p(M=t[x-4],k=t[x-4+1]),U=m(k,M),D=t[x-14],F=t[x-14+1],O=t[x-32],L=t[x-32+1],B=I+F|0,N=P+D+b(B,I)|0;N=(N=N+R+b(B=B+U|0,U)|0)+O+b(B=B+L|0,L)|0,t[x]=N,t[x+1]=B}for(var z=0;z<160;z+=2){N=t[z],B=t[z+1];var H=u(i,r,n),V=u(g,w,E),Y=h(i,g),q=h(g,i),W=c(o,S),X=c(S,o),G=s[z],K=s[z+1],Q=f(o,l,v),Z=f(S,j,T),J=A+X|0,$=y+W+b(J,A)|0;$=($=($=$+Q+b(J=J+Z|0,Z)|0)+G+b(J=J+K|0,K)|0)+N+b(J=J+B|0,B)|0;var ee=q+V|0,te=Y+H+b(ee,q)|0;y=v,A=T,v=l,T=j,l=o,j=S,o=a+$+b(S=C+J|0,C)|0,a=n,C=E,n=r,E=w,r=i,w=g,i=$+te+b(g=J+ee|0,J)|0}this._al=this._al+g|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+C|0,this._el=this._el+S|0,this._fl=this._fl+j|0,this._gl=this._gl+T|0,this._hl=this._hl+A|0,this._ah=this._ah+i+b(this._al,g)|0,this._bh=this._bh+r+b(this._bl,w)|0,this._ch=this._ch+n+b(this._cl,E)|0,this._dh=this._dh+a+b(this._dl,C)|0,this._eh=this._eh+o+b(this._el,S)|0,this._fh=this._fh+l+b(this._fl,j)|0,this._gh=this._gh+v+b(this._gl,T)|0,this._hh=this._hh+y+b(this._hl,A)|0},l.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,i,r){e.writeInt32BE(t,r),e.writeInt32BE(i,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=l},{"./hash":186,inherits:136,"safe-buffer":184}],194:[function(e,t,i){t.exports=n;var r=e("events").EventEmitter;function n(){r.call(this)}e("inherits")(n,r),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function a(){i.readable&&i.resume&&i.resume()}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",o),i.on("close",l));var s=!1;function o(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",o),i.removeListener("close",l),i.removeListener("error",f),e.removeListener("error",f),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",f),e.on("error",f),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e}},{events:104,inherits:136,"readable-stream/duplex.js":168,"readable-stream/passthrough.js":179,"readable-stream/readable.js":180,"readable-stream/transform.js":181,"readable-stream/writable.js":182}],195:[function(e,t,i){arguments[4][178][0].apply(i,arguments)},{dup:178,"safe-buffer":184}],196:[function(e,t,i){(function(t,r){var n=e("process/browser.js").nextTick,a=Function.prototype.apply,s=Array.prototype.slice,o={},l=0;function f(e,t){this._id=e,this._clearFn=t}i.setTimeout=function(){return new f(a.call(setTimeout,window,arguments),clearTimeout)},i.setInterval=function(){return new f(a.call(setInterval,window,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(e){e.close()},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},i.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},i.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},i._unrefActive=i.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},i.setImmediate="function"==typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&s.call(arguments,1);return o[t]=!0,n((function(){o[t]&&(r?e.apply(null,r):e.call(null),i.clearImmediate(t))})),t},i.clearImmediate="function"==typeof r?r:function(e){delete o[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":158,timers:196}],197:[function(e,t,i){(function(e){function i(t){try{if(!e.localStorage)return!1}catch(e){return!1}var i=e.localStorage[t];return null!=i&&"true"===String(i).toLowerCase()}t.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")&&console.trace(t),r=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],198:[function(e,t,i){"use strict";t.exports={DEFAILT_WEBGL_PLAY_ID:"glplayer",PLAYER_IN_TYPE_MP4:"mp4",PLAYER_IN_TYPE_FLV:"flv",PLAYER_IN_TYPE_HTTPFLV:"httpflv",PLAYER_IN_TYPE_RAW_265:"raw265",PLAYER_IN_TYPE_TS:"ts",PLAYER_IN_TYPE_MPEGTS:"mpegts",PLAYER_IN_TYPE_M3U8:"hls",PLAYER_IN_TYPE_M3U8_VOD:"m3u8",PLAYER_IN_TYPE_M3U8_LIVE:"hls",APPEND_TYPE_STREAM:0,APPEND_TYPE_FRAME:1,APPEND_TYPE_SEQUENCE:2,DEFAULT_WIDTH:600,DEFAULT_HEIGHT:600,DEFAULT_FPS:25,DEFAULT_FRAME_DUR:40,DEFAULT_FIXED:!1,DEFAULT_SAMPLERATE:44100,DEFAULT_CHANNELS:2,DEFAULT_CONSU_SAMPLE_LEN:20,PLAYER_MODE_VOD:"vod",PLAYER_MODE_NOTIME_LIVE:"live",AUDIO_MODE_ONCE:"ONCE",AUDIO_MODE_SWAP:"SWAP",DEFAULT_STRING_LIVE:"LIVE",CODEC_H265:0,CODEC_H264:1,PLAYER_CORE_TYPE_DEFAULT:0,PLAYER_CORE_TYPE_CNATIVE:1,V_CODEC_NAME_HEVC:265,V_CODEC_NAME_AVC:264,V_CODEC_NAME_UNKN:500,A_CODEC_NAME_AAC:112,A_CODEC_NAME_MP3:113,A_CODEC_NAME_UNKN:500,CACHE_NO_LOADCACHE:192,CACHE_WITH_PLAY_SIGN:193,CACHE_WITH_NOPLAY_SIGN:194}},{}],199:[function(e,t,i){"use strict";var r=window.AudioContext||window.webkitAudioContext,n=e("../consts"),a=e("./av-common");t.exports=function(e){var t={options:{sampleRate:e.sampleRate||n.DEFAULT_SAMPLERATE,appendType:e.appendType||n.APPEND_TYPE_STREAM,playMode:e.playMode||n.AUDIO_MODE_SWAP},sourceChannel:-1,audioCtx:new r({latencyHint:"interactive",sampleRate:e.sampleRate}),gainNode:null,sourceList:[],startStatus:!1,sampleQueue:[],nextBuffer:null,playTimestamp:0,playStartTime:0,durationMs:-1,isLIVE:!1,voice:1,onLoadCache:null,resetStartParam:function(){t.playTimestamp=0,t.playStartTime=0},setOnLoadCache:function(e){t.onLoadCache=e},setDurationMs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e},setVoice:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.voice=e,t.gainNode.gain.value=e},getAlignVPTS:function(){return t.playTimestamp+(a.GetMsTime()-t.playStartTime)/1e3},swapSource:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==t.startStatus)return null;if(e<0||e>=t.sourceList.length)return null;if(i<0||i>=t.sourceList.length)return null;try{t.sourceChannel===e&&null!==t.sourceList[e]&&(t.sourceList[e].disconnect(t.gainNode),t.sourceList[e]=null)}catch(t){console.error("[DEFINE ERROR] audioModule disconnect source Index:"+e+" error happened!",t)}t.sourceChannel=i;var r=t.decodeSample(i,e);-2==r&&t.isLIVE&&(t.getAlignVPTS()>=t.durationMs/1e3-.04?t.pause():null!==t.onLoadCache&&t.onLoadCache())},addSample:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!(null==e||!e||null==e)&&(0==t.sampleQueue.length&&(t.seekPos=e.pts),t.sampleQueue.push(e),!0)},runNextBuffer:function(){window.setInterval((function(){if(!(null!=t.nextBuffer||t.sampleQueue.length0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){t.swapSource(e,i)}),0==t.sampleQueue.length)return t.isLIVE?(t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].onended=function(){t.swapSource(e,i)},t.sourceList[e].stop(),0):-2;if(t.sourceList[e].buffer)return t.sourceList[e],t.sourceList[i],t.gainNode,t.swapSource(e,i),0;if(null==t.nextBuffer||t.nextBuffer.data.length<1)return t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0,t.sourceList[e].stop(),1;var r=t.nextBuffer.data.buffer;t.playTimestamp=t.nextBuffer.pts,t.playStartTime=a.GetMsTime();try{t.audioCtx.decodeAudioData(r,(function(i){null!==t.sourceList[e]&&(t.sourceList[e].buffer=i,t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0)}),(function(e){}))}catch(e){return t.nextBuffer=null,-3}return t.nextBuffer=null,0},decodeWholeSamples:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(t.sourceChannel=e,e<0||e>=t.sourceList.length)return-1;if(null!=t.sourceList[e]&&null!=t.sourceList[e]&&t.sourceList[e]||(t.sourceList[e]=t.audioCtx.createBufferSource(),t.sourceList[e].onended=function(){}),0==t.sampleQueue.length)return-2;for(var i=null,r=null,a=0;a=2){var s=i.length/2;a=new Float32Array(s);for(var o=0,l=0;l0&&s()-this._start_time>=this._now_seg_dur&&(s(),this._start_time,this._now_seg_dur,this._start_time=-1,this._now_seg_dur=-1),s(),this._start_time<0)if(new Date,null!==this._pcm_array_buf&&this._pcm_array_buf.length>this._push_start_idx){this._swapStartPlay=!1;var e=this._push_start_idx+this._once_pop_len;e>this._pcm_array_buf.length&&(e=this._pcm_array_buf.length);var t=this._pcm_array_buf.slice(this._push_start_idx,e);this._push_start_idx+=t.length,this._now_seg_dur=1*t.length/this._sample_rate*1e3,t.length,this._sample_rate,this._now_seg_dur;var i=this._ctx.createBuffer(1,t.length,this._sample_rate);t.length,new Date,i.copyToChannel(t,0),this._active_node=this._ctx.createBufferSource(),this._active_node.buffer=i,this._active_node.connect(this._gain),this._start_time=s(),this._active_node.start(0)}else setTimeout(this.readingLoopWithF32,1)}}])&&r(t.prototype,i),o&&r(t,o),e}();i.AudioPcmPlayer=o},{"../consts":198}],201:[function(e,t,i){"use strict";var r=e("../consts"),n=[{format:"mp4",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"mov",value:"mp4",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"flv",value:"flv",core:r.PLAYER_CORE_TYPE_CNATIVE},{format:"m3u8",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"m3u",value:"hls",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"ts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"mpegts",value:"ts",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"hevc",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT},{format:"h265",value:"raw265",core:r.PLAYER_CORE_TYPE_DEFAULT}];t.exports={frameDataAlignCrop:function(e,t,i,r,n,a,s,o){if(0==e-r)return[a,s,o];for(var l=r*n,f=l/4,u=new Uint8Array(l),h=new Uint8Array(f),c=new Uint8Array(f),d=r,_=r/2,p=0;p=0)return i.value}return n[0].value},GetFormatPlayCore:function(e){for(var t=0;tt.config.probeSize&&(n.cwrap("getSniffHttpFlvPkg","number",["number"])(t.AVSniffPtr),t.pushPkg-=1)}),5));break;case"fetch-fin":break;case"fetch-error":t.onNetworkError&&t.onNetworkError(i.data)}}},{key:"_checkDisplaySize",value:function(e,t,i){var r=t-e,n=this.config.width+Math.ceil(r/2),a=t/this.config.width>i/this.config.height,s=(n/t).toFixed(2),o=(this.config.height/i).toFixed(2),l=a?s:o,f=this.config.fixed,u=f?n:parseInt(t*l),h=f?this.config.height:parseInt(i*l);if(this.CanvasObj.offsetWidth!=u||this.CanvasObj.offsetHeight!=h){var c=parseInt((this.canvasBox.offsetHeight-h)/2),d=parseInt((this.canvasBox.offsetWidth-u)/2);c=c<0?0:c,d=d<0?0:d,this.CanvasObj.style.marginTop=c+"px",this.CanvasObj.style.marginLeft=d+"px",this.CanvasObj.style.width=u+"px",this.CanvasObj.style.height=h+"px"}return this.isCheckDisplay=!0,[u,h]}},{key:"_ptsFixed2",value:function(e){return Math.ceil(100*e)/100}},{key:"_callbackProbe",value:function(e,t,i,r,a,s,f,u,h){for(var c=n.HEAPU8.subarray(h,h+10),d=0;d=0&&(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.config.sampleRate=s,this.mediaInfo.sampleRate=s,this.audioWAudio=o({sampleRate:s,appendType:l.APPEND_TYPE_FRAME}),this.audioWAudio.isLIVE=!0),this.onProbeFinish&&this.onProbeFinish()}},{key:"_callbackYUV",value:function(e,t,i,r,a,s,o,l,f){var u=n.HEAPU8.subarray(e,e+r*l),h=new Uint8Array(u),c=n.HEAPU8.subarray(t,t+a*l/2),d=new Uint8Array(c),_=n.HEAPU8.subarray(i,i+s*l/2),p={bufY:h,bufU:d,bufV:new Uint8Array(_),line_y:r,h:l,pts:f};this.YuvBuf.push(p),this.checkCacheState(),n._free(u),u=null,n._free(c),c=null,n._free(_),_=null,!1===this.readyShowDone&&(this.playYUV(),this.readyShowDone=!0,this.onReadyShowDone&&this.onReadyShowDone())}},{key:"_callbackNALU",value:function(e,t,i,r,a,s,o){if(!1===this.readyKeyFrame){if(i<=0)return;this.readyKeyFrame=!0}var l=n.HEAPU8.subarray(e,e+t),f=new Uint8Array(l);this.NaluBuf.push({bufData:f,len:t,isKey:i,w:r,h:a,pts:1e3*s,dts:1e3*o}),n._free(l),l=null}},{key:"_callbackPCM",value:function(e){}},{key:"_callbackAAC",value:function(e,t,i,r,a){var s=this._ptsFixed2(a);if(this.audioWAudio){var o=new Uint8Array(7+i),l=n.HEAPU8.subarray(e,e+7);o.set(l,0);var f=n.HEAPU8.subarray(t,t+i);o.set(f,7);var u={pts:s,data:o};this.audioWAudio.addSample(u),this.checkCacheState()}}},{key:"_decode",value:function(){var e=this;setTimeout((function(){if(null!==e.workerFetch){var t=e.NaluBuf.shift();if(null!=t){var i=n._malloc(t.bufData.length);n.HEAP8.set(t.bufData,i),n.cwrap("decodeHttpFlvVideoFrame","number",["number","number","number","number","number"])(e.AVSniffPtr,i,t.bufData.length,t.pts,t.dts,0),n._free(i),i=null}e._decode()}}),1)}},{key:"checkCacheState",value:function(){var e=this.YuvBuf.length>=50&&this.audioWAudio.sampleQueue.length>=50;return!1===this.cache_status&&e&&(this.playInterval&&this.audioWAudio.play(),this.onLoadCacheFinshed&&this.onLoadCacheFinshed(),this.cache_status=!0),e}},{key:"setVoice",value:function(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e)}},{key:"release",value:function(){this.pause(),this.NaluBuf.length=0,this.YuvBuf.length=0,void 0!==this.workerFetch&&null!==this.workerFetch&&this.workerFetch.postMessage({cmd:"stop",data:"stop",msg:"stop"}),this.workerFetch=null,n.cwrap("releaseHttpFLV","number",["number"])(this.AVSniffPtr),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null,this.audioWAudio&&this.audioWAudio.stop(),this.audioWAudio=null}},{key:"isPlayingState",value:function(){return null!==this.playInterval&&void 0!==this.playInterval}},{key:"pause",value:function(){this.audioWAudio&&this.audioWAudio.pause(),this.playInterval&&clearInterval(this.playInterval),this.playInterval=null}},{key:"playYUV",value:function(){if(this.YuvBuf.length>0){var e=this.YuvBuf.shift();return a.renderFrame(this.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h),!0}return!1}},{key:"play",value:function(){var e=this,t=this;if(!1===this.checkCacheState())return this.onLoadCache&&this.onLoadCache(),setTimeout((function(){e.play()}),100),!1;if(void 0===this.playInterval||null===this.playInterval){var i=0,r=0,n=0;this.playInterval=setInterval((function(){if(r=s.GetMsTime(),t.cache_status){if(r-i>=t.frameTime-n){var e=t.YuvBuf.shift();if(null!=e&&null!==e){var o=0;null!==t.audioWAudio&&void 0!==t.audioWAudio&&(o=1e3*(e.pts-t.audioWAudio.getAlignVPTS())),n=t.audioWAudio?o<0&&-1*o<=t.frameTime||o>=0?s.GetMsTime()-r+1:t.frameTime:s.GetMsTime()-r+1,a.renderFrame(t.AVGLObj,e.bufY,e.bufU,e.bufV,e.line_y,e.h)}(t.YuvBuf.length<=0||t.audioWAudio.sampleQueue.length<=0)&&(t.cache_status=!1,t.onLoadCache&&t.onLoadCache(),t.audioWAudio.pause()),i=r}}else n=t.frameTime}),1),this.audioWAudio&&this.audioWAudio.play()}}},{key:"start",value:function(e){var t,i,r,s=this;this.workerFetch=new Worker((t=function(){var e=new AbortController,t=e.signal;self,self.onmessage=function(i){var r=i.data;switch(void 0===r.cmd||null===r.cmd?"":r.cmd){case"start":!function(e){var i=!1;i||(i=!0,fetch(e,{signal:t}).then((function(e){return function e(t){return t.read().then((function(i){if(!i.done){var r=i.value;return self.postMessage({cmd:"fetch-chunk",data:r,msg:"fetch-chunk"}),e(t)}self.postMessage({cmd:"fetch-fin",data:null,msg:"fetch-fin"})}))}(e.body.getReader())})).catch((function(e){e.toString().includes("user aborted")||(console.error("httplive error",e),self.postMessage({cmd:"fetch-error",data:e,msg:"fetch-error"}))})))}(r.data),self.postMessage({cmd:"default",data:"WORKER STARTED",msg:"default"});break;case"stop":e.abort(),self.close()}}}.toString(),i=t.match(/^\s*function\s*\(\s*\)\s*\{(([\s\S](?!\}$))*[\s\S])/),r=[i[1]],window.URL.createObjectURL(new Blob(r,{type:"text/javascript"})))),this.workerFetch.onmessage=function(e){s._workerFetch_onmessage(e,s)},this.workerFetch,this.AVSniffPtr=n.cwrap("AVSniffHttpFlvInit","number",["string","string"])("base64:QXV0aG9yOmNoYW5neWFubG9uZ3xudW1iZXJ3b2xmLEdpdGh1YjpodHRwczovL2dpdGh1Yi5jb20vbnVtYmVyd29sZixFbWFpbDpwb3JzY2hlZ3QyM0Bmb3htYWlsLmNvbSxRUTo1MzEzNjU4NzIsSG9tZVBhZ2U6aHR0cDovL3h2aWRlby52aWRlbyxEaXNjb3JkOm51bWJlcndvbGYjODY5NCx3ZWNoYXI6bnVtYmVyd29sZjExLEJlaWppbmcsV29ya0luOkJhaWR1","0.0.0"),this.AVSniffPtr;var o=n.addFunction(this._callbackProbe.bind(this)),l=n.addFunction(this._callbackYUV.bind(this)),f=n.addFunction(this._callbackNALU.bind(this)),u=n.addFunction(this._callbackPCM.bind(this)),h=n.addFunction(this._callbackAAC.bind(this));n.cwrap("initializeSniffHttpFlvModule","number",["number","number","number","number","number","number"])(this.AVSniffPtr,o,l,f,u,h),this.AVGLObj=a.setupCanvas(this.CanvasObj,{preserveDrawingBuffer:!1}),this.workerFetch.postMessage({cmd:"start",data:e,msg:"start"}),this._decode()}}])&&r(t.prototype,i),f&&r(t,f),e}();i.CHttpLiveCore=f},{"../consts":198,"../demuxer/buffer":209,"../demuxer/bufferFrame":210,"../render-engine/webgl-420p":220,"../version":223,"./audio-core":199,"./audio-native-core":200,"./av-common":201,"./cache":204,"./cacheYuv":205,"./missile.js":1}],203:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];this.showScreen=e,this.canvas&&(e?this.canvas.setAttribute("hidden",!0):this.canvas.removeAttribute("hidden"))}},{key:"getCachePTS",value:function(){return 1!==this.config.ignoreAudio&&this.audioWAudio?Math.max(this.vCachePTS,this.aCachePTS):this.vCachePTS}},{key:"getMaxPTS",value:function(){return Math.max(this.vCachePTS,this.aCachePTS)}},{key:"isPlayingState",value:function(){return this.isPlaying}},{key:"pushDone",value:function(){this.pushEOF=!0}},{key:"_clearDecInterval",value:function(){this.decVFrameInterval&&window.clearInterval(this.decVFrameInterval),this.decVFrameInterval=null}},{key:"_checkPlayFinished",value:function(){return!(this.config.playMode!==h.PLAYER_MODE_VOD||!(!0===this.bufRecvStat&&(this.playPTS>=this.bufLastVDTS||this.audioWAudio&&this.playPTS>=this.bufLastADTS)||this.duration-this.playPTS0&&(this.isPlaying=!0);var t=0,i=0,r=0;this.config.playMode===h.PLAYER_MODE_NOTIME_LIVE?this.playFrameInterval=window.setInterval((function(){if(e._videoQueue.length>0){var t=e._videoQueue.shift();t.pts,l.renderFrame(e.yuv,t.data_y,t.data_u,t.data_v,t.line1,t.height)}}),1e3*this.frameDur):this.playFrameInterval=window.setInterval((function(){if(i=f.GetMsTime(),e._videoQueue.length>0&&i-t>=e.frameTime-r){var n=e._videoQueue.shift(),a=0;if(e.isNewSeek||null===e.audioWAudio||void 0===e.audioWAudio||(a=1e3*(n.pts-e.audioWAudio.getAlignVPTS()),e.playPTS=Math.max(e.audioWAudio.getAlignVPTS(),e.playPTS)),t=i,f.GetMsTime(),e.playPTS=Math.max(n.pts,e.playPTS),e.isNewSeek&&e.seekTarget-e.frameDur>n.pts)return void(r=e.frameTime);if(e.isNewSeek&&(e.audioWAudio&&e.audioWAudio.setVoice(e.audioVoice),e.audioWAudio&&e.audioWAudio.play(),r=0,e.isNewSeek=!1,e.seekTarget=0),e.showScreen?e.onRender&&e.onRender(n.line1,n.height,n.data_y,n.data_u,n.data_v):(n.pts,l.renderFrame(e.yuv,n.data_y,n.data_u,n.data_v,n.line1,n.height)),e.onPlayingTime&&e.onPlayingTime(n.pts),!e.isNewSeek&&e.audioWAudio&&(a<0&&-1*a<=e.frameTime||a>=0)){if(e.config.playMode===h.PLAYER_MODE_VOD)if(n.pts>=e.duration)e.onLoadCacheFinshed&&e.onLoadCacheFinshed(),e.onPlayingFinish&&e.onPlayingFinish(),e._clearDecInterval(),e.pause();else if(e._checkPlayFinished())return;r=f.GetMsTime()-i}else!e.isNewSeek&&e.audioWAudio&&(a<0&&e.frameTime,r=e.frameTime)}e._checkPlayFinished()}),1)}this.isNewSeek||this.audioWAudio&&this.audioWAudio.play()}},{key:"pause",value:function(){this.isPlaying=!1,this._pause()}},{key:"_pause",value:function(){this.playFrameInterval&&window.clearInterval(this.playFrameInterval),this.playFrameInterval=null,this.audioWAudio&&this.audioWAudio.pause()}},{key:"seek",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.openFrameCall=!1,this.pause(),this._clearDecInterval(),null!==this.avFeedVideoInterval&&(window.clearInterval(this.avFeedVideoInterval),this.avFeedVideoInterval=null),null!==this.avFeedAudioInterval&&(window.clearInterval(this.avFeedAudioInterval),this.avFeedAudioInterval=null),this.yuvMaxTime=0,this.playVPipe.length=0,this._videoQueue.length=0,this.audioWAudio&&this.audioWAudio.stop(),e&&e(),this.isNewSeek=!0,this.avSeekVState=!0,this.seekTarget=i.seekTime,null!==this.audioWAudio&&void 0!==this.audioWAudio&&(this.audioWAudio.setVoice(0),this.audioWAudio.resetStartParam(),this.audioWAudio.stop()),this._avFeedData(i.seekTime),setTimeout((function(){t.yuvMaxTime=0,t._videoQueue.length=0,t.openFrameCall=!0,t.frameCallTag+=1,t._decVFrameIntervalFunc()}),1e3)}},{key:"setVoice",value:function(e){this.audioVoice=e,this.audioWAudio&&this.audioWAudio.setVoice(e)}},{key:"cacheIsFull",value:function(){return this._videoQueue.length>=50}},{key:"_checkDisplaySize",value:function(e,t,i){var r=t-e,n=this.config.width+Math.ceil(r/2),a=t/this.config.width>i/this.config.height,s=(n/t).toFixed(2),o=(this.config.height/i).toFixed(2),l=a?s:o,f=this.config.fixed,u=f?n:parseInt(t*l),h=f?this.config.height:parseInt(i*l);if(this.canvas.offsetWidth!=u||this.canvas.offsetHeight!=h){var c=parseInt((this.canvasBox.offsetHeight-h)/2),d=parseInt((this.canvasBox.offsetWidth-u)/2);c=c<0?0:c,d=d<0?0:d,this.canvas.style.marginTop=c+"px",this.canvas.style.marginLeft=d+"px",this.canvas.style.width=u+"px",this.canvas.style.height=h+"px"}return this.isCheckDisplay=!0,[u,h]}},{key:"_createYUVCanvas",value:function(){this.canvasBox=document.querySelector("#"+this.config.playerId),this.canvasBox.style.overflow="hidden",this.canvas=document.createElement("canvas"),this.canvas.style.width=this.canvasBox.clientWidth+"px",this.canvas.style.height=this.canvasBox.clientHeight+"px",this.canvas.style.top="0px",this.canvas.style.left="0px",this.canvasBox.appendChild(this.canvas),this.yuv=l.setupCanvas(this.canvas,{preserveDrawingBuffer:!1})}},{key:"_avRecvPackets",value:function(){var e=this;this.bufObject.cleanPipeline(),null!==this.avRecvInterval&&(window.clearInterval(this.avRecvInterval),this.avRecvInterval=null),!0===this.config.checkProbe?this.avRecvInterval=window.setInterval((function(){a.cwrap("getSniffStreamPkg","number",["number"])(e.corePtr),e._avCheckRecvFinish()}),5):this.avRecvInterval=window.setInterval((function(){a.cwrap("getSniffStreamPkgNoCheckProbe","number",["number"])(e.corePtr),e._avCheckRecvFinish()}),5),this._avFeedData(0,!1)}},{key:"_avCheckRecvFinish",value:function(){this.config.playMode===h.PLAYER_MODE_VOD&&this.duration-this.getMaxPTS()=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),t.play(),window.clearInterval(i),i=null)}),10);return!0}},{key:"_afterAvFeedSeekToStartWithUnFinBuffer",value:function(e){var t=this,i=window.setInterval((function(){t._videoQueue.length,t._videoQueue.length>=50&&(t.onSeekFinish&&t.onSeekFinish(),t.onPlayingTime&&t.onPlayingTime(e),!1===t.reFull?t.play():t.reFull=!1,window.clearInterval(i),i=null)}),10);return!0}},{key:"_avFeedData",value:function(e){var t=this;if(this.playVPipe.length=0,this.audioWAudio&&this.audioWAudio.cleanQueue(),e<=0&&!1===this.bufOK){var i=0;if(this.avFeedVideoInterval=window.setInterval((function(){var r=t.bufObject.videoBuffer.length;if(r-1>i||t.duration-t.getMaxPTS()0){for(var a=0;a0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.bufLastVDTS,t.bufObject.videoBuffer,t.playVPipe)}else t.config.playMode===h.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null,t.playVPipe[t.playVPipe.length-1].pts,t.duration,t.bufObject.videoBuffer,t.playVPipe);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===h.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithFinishedBuffer(e),t.avSeekVState=!1))}),5),void 0!==this.audioWAudio&&null!==this.audioWAudio&&this.config.ignoreAudio<1){var r=0;this.avFeedAudioInterval=window.setInterval((function(){var e=t.bufObject.audioBuffer.length;if(e-1>r||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer)}else t.config.playMode===h.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null,t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts,t.bufObject.audioBuffer)}),5)}}else{var n=this.bufObject.seekIDR(e),a=parseInt(n,10);this.playPTS=0;var o=a;if(this.avFeedVideoInterval=window.setInterval((function(){var i=t.bufObject.videoBuffer.length;if(i-1>o||t.duration-t.getMaxPTS()0){for(var n=0;n0&&t.playVPipe[t.playVPipe.length-1].pts>=t.bufLastVDTS&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null)}else t.config.playMode===h.PLAYER_MODE_VOD&&t.playVPipe.length>0&&t.playVPipe[t.playVPipe.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedVideoInterval),t.avFeedVideoInterval=null);t.avSeekVState&&(t.getMaxPTS(),t.duration,t.config.playMode===h.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStartWithUnFinBuffer(e),t.avSeekVState=!1))}),5),this.audioWAudio&&this.config.ignoreAudio<1){var l=parseInt(e,10);this.avFeedAudioInterval=window.setInterval((function(){var e=t.bufObject.audioBuffer.length;if(e-1>l||t.duration-t.getMaxPTS()0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.bufLastADTS&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null)}else t.config.playMode===h.PLAYER_MODE_VOD&&t.audioWAudio.sampleQueue.length>0&&t.audioWAudio.sampleQueue[t.audioWAudio.sampleQueue.length-1].pts>=t.duration&&(window.clearInterval(t.avFeedAudioInterval),t.avFeedAudioInterval=null)}),5)}}}},{key:"_probeFinCallback",value:function(e,t,i,r,n,s,o,l,f){var c=this;this._createYUVCanvas(),h.V_CODEC_NAME_HEVC,this.config.fps=1*r,this.frameTime=1e3/this.config.fps,this.width=t,this.height=i,this.frameDur=1/this.config.fps,this.duration=e-this.frameDur,this.vCodecID=l,this.config.sampleRate=s,this.channels=o,this.audioIdx=n,this.duration<0&&(this.config.playMode=h.PLAYER_MODE_NOTIME_LIVE,this.frameTime,this.frameDur);for(var d=a.HEAPU8.subarray(f,f+10),_=0;_=0&&this.config.ignoreAudio<1?(void 0!==this.audioWAudio&&null!==this.audioWAudio&&(this.audioWAudio.stop(),this.audioWAudio=null),this.audioWAudio=u({sampleRate:s,appendType:h.APPEND_TYPE_FRAME}),this.audioWAudio.setDurationMs(1e3*e),this.onLoadCache&&this.audioWAudio.setOnLoadCache((function(){if(c.retryAuSampleNo,c.retryAuSampleNo<=5){c.pause(),c.onLoadCache&&c.onLoadCache();var e=window.setInterval((function(){return c.retryAuSampleNo,c.audioWAudio.sampleQueue.length,c.audioWAudio.sampleQueue.length>2?(c.onLoadCacheFinshed&&c.onLoadCacheFinshed(),c.play(),c.retryAuSampleNo=0,window.clearInterval(e),void(e=null)):(c.retryAuSampleNo+=1,c.retryAuSampleNo>5?(c.play(),c.onLoadCacheFinshed&&c.onLoadCacheFinshed(),window.clearInterval(e),void(e=null)):void 0)}),1e3)}}))):this.audioNone=!0,this._avRecvPackets(),this._decVFrameIntervalFunc()),this.onProbeFinish&&this.onProbeFinish()}},{key:"_ptsFixed2",value:function(e){return Math.ceil(100*e)/100}},{key:"_naluCallback",value:function(e,t,i,r,n,s,o){var l=this._ptsFixed2(s),f=a.HEAPU8.subarray(e,e+t),u=new Uint8Array(f);this.bufObject.appendFrameWithDts(l,o,u,!0,i),this.bufLastVDTS=Math.max(o,this.bufLastVDTS),this.vCachePTS=Math.max(l,this.vCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS())}},{key:"_samplesCallback",value:function(e,t,i,r){}},{key:"_aacFrameCallback",value:function(e,t,i,r,n){var s=this._ptsFixed2(n);if(this.audioWAudio){var o=new Uint8Array(7+i),l=a.HEAPU8.subarray(e,e+7);o.set(l,0);var f=a.HEAPU8.subarray(t,t+i);o.set(f,7),this.bufObject.appendFrame(s,o,!1,!0),this.bufLastADTS=Math.max(s,this.bufLastADTS),this.aCachePTS=Math.max(s,this.aCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS())}}},{key:"_decVFrameIntervalFunc",value:function(){var e=this;null==this.decVFrameInterval&&(this.decVFrameInterval=window.setInterval((function(){if(e._videoQueue.length<50&&e.playVPipe.length>0){var t=e.playVPipe.shift(),i=t.data,r=a._malloc(i.length);a.HEAP8.set(i,r);var n=parseInt(1e3*t.pts,10),s=parseInt(1e3*t.dts,10);e.yuvMaxTime=Math.max(t.pts,e.yuvMaxTime),a.cwrap("decodeVideoFrame","number",["number","number","number","number","number"])(e.corePtr,r,i.length,n,s,e.frameCallTag),a._free(r),r=null}}),10))}},{key:"_frameCallback",value:function(e,t,i,r,n,s,o,f,u,h){if(this._videoQueue.length,!(!1===this.openFrameCall||h!==this.frameCallTag||u>this.yuvMaxTime+this.frameDur||this.isNewSeek&&this.seekTarget-u>3*this.frameDur)){var c=this._videoQueue.length;if(this.canvas.width==r&&this.canvas.height==f||(this.canvas.width=r,this.canvas.height=f,this.isCheckDisplay)||this._checkDisplaySize(o,r,f),!(this.playPTS>u)){var _=a.HEAPU8.subarray(e,e+r*f),p=a.HEAPU8.subarray(t,t+n*f/2),m=a.HEAPU8.subarray(i,i+s*f/2),b=new Uint8Array(_),v=new Uint8Array(p),y=new Uint8Array(m);this.config.readyShow&&(l.renderFrame(this.yuv,b,v,y,r,f),this.config.readyShow=!1,this.onReadyShowDone&&this.onReadyShowDone());var g=new d(b,v,y,r,n,s,o,f,u);if(c<=0||u>this._videoQueue[c-1].pts)this._videoQueue.push(g);else if(uthis._videoQueue[w].pts&&w+10&&void 0!==arguments[0]?arguments[0]:60,t={limit:e,yuvCache:[],appendCacheByCacheYuv:function(e){e.pts;return t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.OVERFLOW:(t.yuvCache.push(e),t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL)},getState:function(){return t.yuvCache.length<=0?CACHE_APPEND_STATUS_CODE.NULL:t.yuvCache.length>=t.limit?CACHE_APPEND_STATUS_CODE.FULL:CACHE_APPEND_STATUS_CODE.NOT_FULL},cleanPipeline:function(){t.yuvCache.length=0},vYuv:function(){return t.yuvCache.length<=0?null:t.yuvCache.shift()}};return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./cacheYuv":205}],205:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i>1;return n.indexOf(t)},GET_NALU_TYPE:function(e){var t=(126&e)>>1;if(t>=1&&t<=9)return r.DEFINE_P_FRAME;if(t>=16&&t<=21)return r.DEFINE_KEY_FRAME;var i=n.indexOf(t);return i>=0?n[i]:r.DEFINE_OTHERS_FRAME},PACK_NALU:function(e){var t=e.nalu,i=e.vlc.vlc;null==t.vps&&(t.vps=new Uint8Array);var r=new Uint8Array(t.vps.length+t.sps.length+t.pps.length+t.sei.length+i.length);return r.set(t.vps,0),r.set(t.sps,t.vps.length),r.set(t.pps,t.vps.length+t.sps.length),r.set(t.sei,t.vps.length+t.sps.length+t.pps.length),r.set(i,t.vps.length+t.sps.length+t.pps.length+t.sei.length),r}}},{"./hevc-header":206}],208:[function(e,t,i){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t0&&void 0!==arguments[0]&&arguments[0];null!=t&&(t.showScreen=e,t.canvas&&(e?t.canvas.setAttribute("hidden",!0):t.canvas.removeAttribute("hidden")))},setSize:function(e,i){t.config.width=e||u.DEFAULT_WIDTH,t.config.height=i||u.DEFAULT_HEIGHT},setFrameRate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:25;t.config.fps=e,t.config.frameDurMs=1e3/e},setDurationMs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;t.durationMs=e,0==t.config.audioNone&&t.audio.setDurationMs(e)},setPlayingCall:function(e){t.onPlayingTime=e},setVoice:function(e){t.realVolume=e,0==t.config.audioNone&&t.audio.setVoice(t.realVolume)},isPlayingState:function(){return t.isPlaying||t.isCaching===u.CACHE_WITH_PLAY_SIGN},appendAACFrame:function(e){t.audio.addSample(e),t.aCachePTS=Math.max(e.pts,t.aCachePTS)},appendHevcFrame:function(e){var i;t.config.appendHevcType==u.APPEND_TYPE_STREAM?t.stream=new Uint8Array((i=r(t.stream)).concat.apply(i,r(e))):t.config.appendHevcType==u.APPEND_TYPE_FRAME&&(t.frameList.push(e),t.vCachePTS=Math.max(e.pts,t.vCachePTS))},getCachePTS:function(){return Math.max(t.vCachePTS,t.aCachePTS)},endAudio:function(){0==t.config.audioNone&&t.audio.stop()},cleanSample:function(){0==t.config.audioNone&&t.audio.cleanQueue()},cleanVideoQueue:function(){t.config.appendHevcType==u.APPEND_TYPE_STREAM?t.stream=new Uint8Array:t.config.appendHevcType==u.APPEND_TYPE_FRAME&&(t.frameList=[],t.frameList.length=0)},cleanCacheYUV:function(){t.cacheYuvBuf.cleanPipeline()},pause:function(){t.loop&&window.clearInterval(t.loop),t.loop=null,0==t.config.audioNone&&t.audio.pause(),t.isPlaying=!1,t.isCaching===u.CACHE_WITH_PLAY_SIGN&&(t.isCaching=u.CACHE_WITH_NOPLAY_SIGN)},checkFinished:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.PLAYER_MODE_VOD;return e==u.PLAYER_MODE_VOD&&t.cacheYuvBuf.yuvCache.length<=0&&(t.videoPTS.toFixed(1)>=(t.durationMs-t.config.frameDurMs)/1e3||t.noCacheFrame>=10)&&(null!=t.onPlayingFinish&&(u.PLAYER_MODE_VOD,t.frameList.length,t.cacheYuvBuf.yuvCache.length,t.videoPTS.toFixed(1),t.durationMs,t.config.frameDurMs,t.noCacheFrame,t.onPlayingFinish()),!0)},clearAllCache:function(){t.nowPacket=null,t.vCachePTS=0,t.aCachePTS=0,t.cleanSample(),t.cleanVideoQueue(),t.cleanCacheYUV()},seek:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.isPlaying;t.pause(),t.stopCacheThread(),t.clearAllCache(),e&&e(),t.isNewSeek=!0,t.flushDecoder=1,t.videoPTS=parseInt(i.seekTime);var n={seekPos:i.seekTime||-1,mode:i.mode||u.PLAYER_MODE_VOD,accurateSeek:i.accurateSeek||!0,seekEvent:i.seekEvent||!0,realPlay:r};t.cacheThread(),t.play(n)},getNalu1Packet:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=null,r=-1;if(t.config.appendHevcType==u.APPEND_TYPE_STREAM)i=t.nextNalu();else{if(t.config.appendHevcType!=u.APPEND_TYPE_FRAME)return null;var n=t.frameList.shift();if(!n)return null;i=n.data,r=n.pts,e&&(t.videoPTS=r)}return{nalBuf:i,pts:r}},decodeNalu1Frame:function(e,i){var r=n._malloc(e.length);n.HEAP8.set(e,r);var a=parseInt(1e3*i);n.cwrap("decodeCodecContext","number",["number","number","number","number","number"])(t.vcodecerPtr,r,e.length,a,t.flushDecoder);return t.flushDecoder=0,n._free(r),!1},cacheThread:function(){t.cacheLoop=window.setInterval((function(){if(t.cacheYuvBuf.getState()!=CACHE_APPEND_STATUS_CODE.FULL){var e=t.getNalu1Packet(!1);if(null!=e){var i=e.nalBuf,r=e.pts;t.decodeNalu1Frame(i,r,!0)}}}),10)},stopCacheThread:function(){null!==t.cacheLoop&&(window.clearInterval(t.cacheLoop),t.cacheLoop=null)},loadCache:function(){if(!(t.frameList.length<=3)){var e=t.isPlaying;if(t.cacheYuvBuf.yuvCache.length<=3){t.pause(),null!=t.onLoadCache&&t.onLoadCache(),t.isCaching=e?u.CACHE_WITH_PLAY_SIGN:u.CACHE_WITH_NOPLAY_SIGN;var i=t.frameList.length>30?30:t.frameList.length;null===t.cacheInterval&&(t.cacheInterval=window.setInterval((function(){t.cacheYuvBuf.yuvCache.length>=i&&(null!=t.onLoadCacheFinshed&&t.onLoadCacheFinshed(),window.clearInterval(t.cacheInterval),t.cacheInterval=null,t.isCaching===u.CACHE_WITH_PLAY_SIGN&&t.play(t.playParams),t.isCaching=u.CACHE_NO_LOADCACHE)}),40))}}},playFunc:function(){var e=!1;if(t.playParams.seekEvent||a.GetMsTime()-t.calcuteStartTime>=t.frameTime-t.preCostTime){e=!0;var i=!0;if(t.calcuteStartTime=a.GetMsTime(),t.config.audioNone)t.playFrameYUV(i,t.playParams.accurateSeek);else{t.fix_poc_err_skip>0&&(t.fix_poc_err_skip--,i=!1);var r=t.videoPTS-t.audio.getAlignVPTS();if(r>0)return void(t.playParams.seekEvent&&!t.config.audioNone&&t.audio.setVoice(0));if(i){if(!(i=-1*r<=1*t.frameTimeSec)){for(var n=parseInt(r/t.frameTimeSec),s=0;s=i&&(t.playFrameYUV(!0,t.playParams.accurateSeek),i+=1)}),1)}else t.videoPTS>=t.playParams.seekPos&&!t.isNewSeek||0===t.playParams.seekPos||0===t.playParams.seekPos?(t.frameTime=1e3/t.config.fps,t.frameTimeSec=t.frameTime/1e3,0==t.config.audioNone&&t.audio.play(),t.realVolume=t.config.audioNone?0:t.audio.voice,t.playParams.seekEvent&&(t.fix_poc_err_skip=10),t.loop=window.setInterval((function(){var e=a.GetMsTime();t.playFunc(),t.preCostTime=a.GetMsTime()-e}),1)):(t.loop=window.setInterval((function(){t.playFrameYUV(!1,t.playParams.accurateSeek),t.checkFinished(t.playParams.mode)?(window.clearInterval(t.loop),t.loop=null):t.videoPTS>=t.playParams.seekPos&&(window.clearInterval(t.loop),t.loop=null,t.play(t.playParams))}),1),t.isNewSeek=!1)},stop:function(){t.release(),n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr),t.stream=new Uint8Array},release:function(){return t.endAudio(),t.cacheLoop&&window.clearInterval(t.cacheLoop),t.cacheLoop=null,t.loop&&window.clearInterval(t.loop),t.loop=null,t.pause(),n.cwrap("release","number",["number"])(t.vcodecerPtr),t.stream=null,t.frameList.length=0,t.durationMs=-1,t.videoPTS=0,t.isPlaying=!1,!0},nextNalu:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(t.stream.length<=4)return!1;for(var i=-1,r=0;r=t.stream.length){if(-1==i)return!1;var n=t.stream.subarray(i);return t.stream=new Uint8Array,n}var a="0 0 1"==t.stream.slice(0,3).join(" "),s="0 0 0 1"==t.stream.slice(0,4).join(" ");if(a||s){if(-1==i)i=r;else{if(e<=1){var o=t.stream.subarray(i,r);return t.stream=t.stream.subarray(r),o}e-=1}r+=3}}return!1},decodeSendPacket:function(e){var i=n._malloc(e.length);n.HEAP8.set(e,i);var r=n.cwrap("decodeSendPacket","number",["number","number","number"])(t.vcodecerPtr,i,e.length);return n._free(i),r},decodeRecvFrame:function(){return n.cwrap("decodeRecv","number",["number"])(t.vcodecerPtr)},playFrameYUV:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.cacheYuvBuf.vYuv();if(null==r)return t.noCacheFrame+=1,e&&!t.playParams.seekEvent&&t.loadCache(),!1;t.noCacheFrame=0;var n=r.pts;return t.videoPTS=n,(!e&&i||e)&&e&&t.drawImage(r.width,r.height,r.imageBufferY,r.imageBufferB,r.imageBufferR),e&&!t.playParams.seekEvent&&t.isPlaying&&t.loadCache(),!0},drawImage:function(e,i,r,n,a){if(t.canvas.width===e&&t.canvas.height==i||(t.canvas.width=e,t.canvas.height=i),t.showScreen&&null!=t.onRender)t.onRender(e,i,r,n,a);else{if(!t.isCheckDisplay)t.checkDisplaySize(e,i);var s=e*i,o=e/2*(i/2),l=new Uint8Array(s+2*o);l.set(r,0),l.set(n,s),l.set(a,s+o),f.renderFrame(t.yuv,r,n,a,e,i)}},debugYUV:function(e){t.debugYUVSwitch=!0,t.debugID=e},checkDisplaySize:function(e,i){var r=e/t.config.width>i/t.config.height,n=(t.config.width/e).toFixed(2),a=(t.config.height/i).toFixed(2),s=r?n:a,o=t.config.fixed,l=o?t.config.width:parseInt(e*s),f=o?t.config.height:parseInt(i*s);if(t.canvas.offsetWidth!=l||t.canvas.offsetHeight!=f){var u=parseInt((t.canvasBox.offsetHeight-f)/2),h=parseInt((t.canvasBox.offsetWidth-l)/2);t.canvas.style.marginTop=u+"px",t.canvas.style.marginLeft=h+"px",t.canvas.style.width=l+"px",t.canvas.style.height=f+"px"}return t.isCheckDisplay=!0,[l,f]},makeWasm:function(){if(null!=t.config.token){t.vcodecerPtr=n.cwrap("registerPlayer","number",["string","string"])(t.config.token,h.PLAYER_VERSION);var e=n.addFunction((function(e,i,r,a,s,o,f,u,h){var c=n.HEAPU8.subarray(e,e+a*u),d=n.HEAPU8.subarray(i,i+s*u/2),_=n.HEAPU8.subarray(r,r+o*u/2),p=new Uint8Array(c),m=new Uint8Array(d),b=new Uint8Array(_),v=1*h/1e3,y=new l.CacheYuvStruct(v,a,u,p,m,b);t.cacheYuvBuf.appendCacheByCacheYuv(y)}));n.cwrap("setCodecType","number",["number","number","number"])(t.vcodecerPtr,t.config.videoCodec,e);n.cwrap("initMissile","number",["number"])(t.vcodecerPtr);n.cwrap("initializeDecoder","number",["number"])(t.vcodecerPtr)}},makeIt:function(){var e=document.querySelector("div#"+t.config.playerId),i=document.createElement("canvas");i.style.width=e.clientWidth+"px",i.style.height=e.clientHeight+"px",i.style.top="0px",i.style.left="0px",e.appendChild(i),t.canvasBox=e,t.canvas=i,t.yuv=f.setupCanvas(i,{preserveDrawingBuffer:!1}),0==t.config.audioNone&&(t.audio=s({sampleRate:t.config.sampleRate,appendType:t.config.appendHevcType})),t.isPlayLoadingFinish=1}};return t.makeWasm(),t.makeIt(),t.cacheThread(),t}},{"../consts":198,"../render-engine/webgl-420p":220,"../version":223,"./audio-core":199,"./av-common":201,"./cache":204,"./cacheYuv":205,"./missile.js":1}],209:[function(e,t,i){"use strict";var r=e("./bufferFrame");t.exports=function(){var e={videoBuffer:[],audioBuffer:[],idrIdxBuffer:[],appendFrame:function(t,i){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=new r.BufferFrame(t,a,i,n),o=parseInt(t);return n?(e.videoBuffer.length-1>=o?e.videoBuffer[o].push(s):e.videoBuffer.push([s]),a&&!e.idrIdxBuffer.includes(t)&&e.idrIdxBuffer.push(t)):e.audioBuffer.length-1>=o&&null!=e.audioBuffer[o]&&null!=e.audioBuffer[o]?e.audioBuffer[o]&&e.audioBuffer[o].push(s):e.audioBuffer.push([s]),!0},appendFrameWithDts:function(t,i,n){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=r.ConstructWithDts(t,i,s,n,a),l=parseInt(i);return a?(e.videoBuffer.length-1>=l?e.videoBuffer[l].push(o):e.videoBuffer.push([o]),s&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=l&&null!=e.audioBuffer[l]&&null!=e.audioBuffer[l]?e.audioBuffer[l]&&e.audioBuffer[l].push(o):e.audioBuffer.push([o]),!0},appendFrameByBufferFrame:function(t){var i=t.pts,r=parseInt(i);return t.video?(e.videoBuffer.length-1>=r?e.videoBuffer[r].push(t):e.videoBuffer.push([t]),isKey&&!e.idrIdxBuffer.includes(i)&&e.idrIdxBuffer.push(i)):e.audioBuffer.length-1>=r?e.audioBuffer[r].push(t):e.audioBuffer.push([t]),!0},cleanPipeline:function(){e.videoBuffer.length=0,e.audioBuffer.length=0},vFrame:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.videoBuffer.length-1))return e.videoBuffer[t]},aFrame:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(t<0||t>e.audioBuffer.length-1))return e.audioBuffer[t]},seekIDR:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e.idrIdxBuffer,e.videoBuffer,t<0)return null;if(e.idrIdxBuffer.includes(t))return t;for(var i=0;it||0===i&&e.idrIdxBuffer[i]>=t){for(var r=1;r>=0;r--){var n=i-r;if(n>=0)return e.idrIdxBuffer[n],e.idrIdxBuffer[n]}return e.idrIdxBuffer[i],j,e.idrIdxBuffer[i]}}};return e}},{"./bufferFrame":210}],210:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&i.extensionInfo.vHeight>0&&(i.size.width=i.extensionInfo.vWidth,i.size.height=i.extensionInfo.vHeight)),i.mediaInfo.duration,null!=i.onDemuxed&&i.onDemuxed(i.onReadyOBJ);for(var e=!1;;){var r=i.mpegTsObj.readPacket();if(r.size<=0)break;var n=r.dtime>0?r.dtime:r.ptime;if(!(n<0)){if(0==r.type){n<=i.vPreFramePTS&&(e=!0);var a=l.PACK_NALU(r.layer),o=1==r.keyframe,f=1==e?n+i.vStartTime:n,u=new s.BufferFrame(f,o,a,!0);i.bufObject.appendFrame(u.pts,u.data,!0,u.isKey),i.vPreFramePTS=f,null!=i.onSamples&&i.onSamples(i.onReadyOBJ,u)}else if(n<=i.aPreFramePTS&&(e=!0),"aac"==i.mediaInfo.aCodec)for(var h=r.data,c=0;c=3?(i._onTsReady(e),window.clearInterval(i.timerTsWasm),i.timerTsWasm=null):(i.mpegTsWasmRetryLoadTimes+=1,i.mpegTsObj.initDemuxer())}),3e3)}},{key:"_onTsReady",value:function(e){var t=this;t.hls.fetchM3u8(e),t.mpegTsWasmState=!0,t.timerFeed=window.setInterval((function(){if(t.tsList.length>0&&0==t.lockWait.state)try{var e=t.tsList.shift();if(null!=e){var i=e.streamURI,r=e.streamDur;t.lockWait.state=!0,t.lockWait.lockMember.dur=r,t.mpegTsObj.isLive=t.hls.isLive(),t.mpegTsObj.demuxURL(i)}else console.error("_onTsReady need wait ")}catch(e){console.error("onTsReady ERROR:",e),t.lockWait.state=!1}}),50)}},{key:"release",value:function(){this.timerFeed&&window.clearInterval(this.timerFeed),this.timerTsWasm&&window.clearInterval(this.timerTsWasm)}},{key:"bindReady",value:function(e){this.onReadyOBJ=e}},{key:"popBuffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1===e?t+1>this.bufObject.videoBuffer.length?null:this.bufObject.vFrame(t):2===e?t+1>this.bufObject.audioBuffer.length?null:this.bufObject.aFrame(t):void 0}},{key:"getVLen",value:function(){return this.bufObject.videoBuffer.length}},{key:"getALen",value:function(){return this.bufObject.audioBuffer.length}},{key:"getLastIdx",value:function(){return this.bufObject.videoBuffer.length-1}},{key:"getALastIdx",value:function(){return this.bufObject.audioBuffer.length-1}},{key:"getACodec",value:function(){return this.aCodec}},{key:"getDurationMs",value:function(){return this.durationMs}},{key:"getFPS",value:function(){return this.fps}},{key:"getSampleRate",value:function(){return this.sampleRate}},{key:"getSampleChannel",value:function(){return this.aChannel}},{key:"getSize",value:function(){return this.size}},{key:"seek",value:function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}}}])&&r(t.prototype,i),u&&r(t,u),e}();i.M3u8=u},{"../consts":198,"../decoder/hevc-imp":207,"./buffer":209,"./bufferFrame":210,"./m3u8base":212,"./mpegts/mpeg.js":216}],212:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i ",t),setTimeout((function(){i.fetchM3u8(e)}),500)}))}},{key:"_uriParse",value:function(e){this._preURI="";var t=e.split("//"),i=null,r=null;if(t.length<1)return!1;t.length>1?(i=t[0],r=t[1].split("/"),this._preURI=i+"//"):r=t[0].split("/");for(var n=0;n_&&(o=_);var p=r[f+=1],m=null;m=p.indexOf("http")>=0?p:this._preURI+p,this._slices.indexOf(m)<0&&(this._slices.push(m),this._slices[this._slices.length-1],null!=this.onTransportStream&&this.onTransportStream(m,_))}}}if(this._slices.length>s.hlsSliceLimit&&this._type==n.PLAYER_IN_TYPE_M3U8_LIVE&&(this._slices=this._slices.slice(-1*s.hlsSliceLimit)),null!=this.onFinished){var b={type:this._type,duration:-1};this.onFinished(b)}return o}},{key:"_readTag",value:function(e){var t=s.tagParse.exec(e);return null!==t?{key:t[1],value:t[3]}:null}}])&&r(t.prototype,i),o&&r(t,o),e}();i.M3u8Base=o},{"../consts":198}],213:[function(e,t,i){"use strict";var r=e("mp4box"),n=e("../decoder/hevc-header"),a=e("../decoder/hevc-imp"),s=e("./buffer"),o=e("../consts"),l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12,Reserved:13,"frequency is written explictly":15},f=function(e){for(var t=[],i=0;i1&&void 0!==arguments[1]&&arguments[1],i=null;return t?((i=e)[0]=n.DEFINE_STARTCODE[0],i[1]=n.DEFINE_STARTCODE[1],i[2]=n.DEFINE_STARTCODE[2],i[3]=n.DEFINE_STARTCODE[3]):((i=new Uint8Array(n.DEFINE_STARTCODE.length+e.length)).set(n.DEFINE_STARTCODE,0),i.set(e,n.DEFINE_STARTCODE.length)),i},u.prototype.setAACAdts=function(e){var t=null,i=this.aacProfile,r=l[this.sampleRate],n=new Uint8Array(7),a=n.length+e.length;return n[0]=255,n[1]=241,n[2]=(i-1<<6)+(r<<2)+0,n[3]=128+(a>>11),n[4]=(2047&a)>>3,n[5]=31+((7&a)<<5),n[6]=252,(t=new Uint8Array(a)).set(n,0),t.set(e,n.length),t},u.prototype.demux=function(){var e=this;e.seekPos=-1,e.mp4boxfile=r.createFile(),e.movieInfo=null,e.videoCodec=null,e.durationMs=-1,e.fps=-1,e.sampleRate=-1,e.aacProfile=2,e.size={width:-1,height:-1},e.bufObject=s(),e.audioNone=!1,e.naluHeader={vps:null,sps:null,pps:null,sei:null},e.mp4boxfile.onError=function(e){},this.mp4boxfile.onReady=function(t){for(var i in e.movieInfo=t,t.tracks)"VideoHandler"!==t.tracks[i].name&&"video"!==t.tracks[i].type||(t.tracks[i].codec,t.tracks[i].codec.indexOf("hev")>=0||t.tracks[i].codec.indexOf("hvc")>=0?e.videoCodec=o.CODEC_H265:t.tracks[i].codec.indexOf("avc")>=0&&(e.videoCodec=o.CODEC_H264));var r=-1;if(r=t.videoTracks[0].samples_duration/t.videoTracks[0].timescale,e.durationMs=1e3*r,e.fps=t.videoTracks[0].nb_samples/r,e.seekDiffTime=1/e.fps,e.size.width=t.videoTracks[0].track_width,e.size.height=t.videoTracks[0].track_height,t.audioTracks.length>0){e.sampleRate=t.audioTracks[0].audio.sample_rate;var n=t.audioTracks[0].codec.split(".");e.aacProfile=n[n.length-1]}else e.audioNone=!0;null!=e.onMp4BoxReady&&e.onMp4BoxReady(e.videoCodec),e.videoCodec===o.CODEC_H265?(e.initializeAllSourceBuffers(),e.mp4boxfile.start()):(e.videoCodec,o.CODEC_H264)},e.mp4boxfile.onSamples=function(t,i,r){var s=window.setInterval((function(){for(var i=0;i3?e.naluHeader.sei=e.setStartCode(m[3][0].data,!1):e.naluHeader.sei=new Uint8Array,e.naluHeader}else e.videoCodec==o.CODEC_H264&&(e.naluHeader.vps=new Uint8Array,e.naluHeader.sps=e.setStartCode(d.SPS[0].nalu,!1),e.naluHeader.pps=e.setStartCode(d.PPS[0].nalu,!1),e.naluHeader.sei=new Uint8Array);u[4].toString(16),e.naluHeader.vps[4].toString(16),f(e.naluHeader.vps),f(u);var b=e.setStartCode(u.subarray(0,e.naluHeader.vps.length),!0);if(f(b),u[4]===e.naluHeader.vps[4]){var v=e.naluHeader.vps.length+4,y=e.naluHeader.vps.length+e.naluHeader.sps.length+4,g=e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4;if(e.naluHeader.sei.length<=0&&e.naluHeader.sps.length>0&&u[v]===e.naluHeader.sps[4]&&e.naluHeader.pps.length>0&&u[y]===e.naluHeader.pps[4]&&78===u[g]){u[e.naluHeader.vps.length+4],e.naluHeader.sps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+4],e.naluHeader.pps[4],u[e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+4];for(var w=0,E=0;E4&&u[4]===e.naluHeader.sei[4]){var C=u.subarray(0,10),S=new Uint8Array(e.naluHeader.vps.length+C.length);S.set(C,0),S.set(e.naluHeader.vps,C.length),S[3]=1,e.naluHeader.vps=null,e.naluHeader.vps=new Uint8Array(S),S=null,C=null,(u=u.subarray(10))[4],e.naluHeader.vps[4],e.naluHeader.vps}else if(0===e.naluHeader.sei.length&&78===u[4]){u=e.setStartCode(u,!0);for(var j=0,T=0;T1&&void 0!==arguments[1]?arguments[1]:0;return e.fileStart=t,this.mp4boxfile.appendBuffer(e)},u.prototype.finishBuffer=function(){this.mp4boxfile.flush()},u.prototype.play=function(){},u.prototype.getVideoCoder=function(){return this.videoCodec},u.prototype.getDurationMs=function(){return this.durationMs},u.prototype.getFPS=function(){return this.fps},u.prototype.getSampleRate=function(){return this.sampleRate},u.prototype.getSize=function(){return this.size},u.prototype.seek=function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}},u.prototype.popBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0},u.prototype.addBuffer=function(e){var t=e.id;this.mp4boxfile.setExtractionOptions(t)},u.prototype.initializeAllSourceBuffers=function(){if(this.movieInfo){for(var e=this.movieInfo,t=0;t>5)}},{key:"sliceAACFrames",value:function(e,t){for(var i=[],r=e,n=0;n>4==15){var a=this._getPktLen(t[n+3],t[n+4],t[n+5]);if(a<=0)continue;var s=t.subarray(n,n+a),o=new Uint8Array(a);o.set(s,0),i.push({ptime:r,data:o}),r+=this.frameDurSec,n+=a}else n+=1;return i}}])&&r(t.prototype,i),n&&r(t,n),e}();i.AACDecoder=n},{}],216:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i ",e),r=null})).catch((function(i){console.error("_demuxerTsInit ERROR fetch ERROR ==> ",i),t._releaseOffset(),t.onDemuxedFailed&&t.onDemuxedFailed(i,e)}))}},{key:"_releaseOffset",value:function(){void 0!==this.offsetDemux&&null!==this.offsetDemux&&(n._free(this.offsetDemux),this.offsetDemux=null)}},{key:"_demuxCore",value:function(e){this._releaseOffset(),this._refreshDemuxer(),this.offsetDemux=n._malloc(e.length),n.HEAP8.set(e,this.offsetDemux);var t=n.cwrap("demuxBox","number",["number","number","number"])(this.offsetDemux,e.length,this.isLive);n._free(this.offsetDemux),this.offsetDemux=null,t>=0&&(this._setMediaInfo(),this._setExtensionInfo(),null!=this.onDemuxed&&this.onDemuxed())}},{key:"_setMediaInfo",value:function(){var e=n.cwrap("getMediaInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],o=n.HEAPF64[e/8+1+1],l=n.HEAPF64[e/8+1+1+1],f=n.HEAPF64[e/8+1+1+1+1],u=n.HEAPU32[e/4+2+2+2+2+2];this.mediaAttr.vFps=r,this.mediaAttr.vGop=u,this.mediaAttr.vDuration=o,this.mediaAttr.aDuration=l,this.mediaAttr.duration=f;var h=n.cwrap("getAudioCodecID","number",[])();h>=0?(this.mediaAttr.aCodec=s.CODEC_OFFSET_TABLE[h],this.mediaAttr.sampleRate=t>0?t:s.DEFAULT_SAMPLERATE,this.mediaAttr.sampleChannel=i>=0?i:s.DEFAULT_CHANNEL):(this.mediaAttr.sampleRate=0,this.mediaAttr.sampleChannel=0,this.mediaAttr.audioNone=!0);var c=n.cwrap("getVideoCodecID","number",[])();c>=0&&(this.mediaAttr.vCodec=s.CODEC_OFFSET_TABLE[c]),null==this.aacDec?this.aacDec=new a.AACDecoder(this.mediaAttr):this.aacDec.updateConfig(this.mediaAttr)}},{key:"_setExtensionInfo",value:function(){var e=n.cwrap("getExtensionInfo","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1];this.extensionInfo.vWidth=t,this.extensionInfo.vHeight=i}},{key:"readMediaInfo",value:function(){return this.mediaAttr}},{key:"readExtensionInfo",value:function(){return this.extensionInfo}},{key:"readAudioNone",value:function(){return this.mediaAttr.audioNone}},{key:"_readLayer",value:function(){var e={vps:null,sps:null,pps:null,sei:null},t={vlc:null},i=n.cwrap("getSPSLen","number",[])(),r=n.cwrap("getSPS","number",[])();e.sps=new Uint8Array(i),e.sps.set(n.HEAPU8.subarray(r,r+i),0);var a=n.cwrap("getPPSLen","number",[])(),o=n.cwrap("getPPS","number",[])();e.pps=new Uint8Array(a),e.pps.set(n.HEAPU8.subarray(o,o+a),0);var l=n.cwrap("getSEILen","number",[])(),f=n.cwrap("getSEI","number",[])();e.sei=new Uint8Array(l),e.sei.set(n.HEAPU8.subarray(f,f+l),0);var u=n.cwrap("getVLCLen","number",[])(),h=n.cwrap("getVLC","number",[])();if(t.vlc=new Uint8Array(u),t.vlc.set(n.HEAPU8.subarray(h,h+u),0),this.mediaAttr.vCodec==s.DEF_HEVC||this.mediaAttr.vCodec==s.DEF_H265){var c=n.cwrap("getVPSLen","number",[])(),d=n.cwrap("getVPS","number",[])();e.vps=new Uint8Array(c),e.vps.set(n.HEAPU8.subarray(d,d+c),0)}else this.mediaAttr.vCodec==s.DEF_AVC||(this.mediaAttr.vCodec,s.DEF_H264);return{nalu:e,vlc:t}}},{key:"readPacket",value:function(){var e=n.cwrap("getPacket","number",[])(),t=n.HEAPU32[e/4],i=n.HEAPU32[e/4+1],r=n.HEAPF64[e/8+1],a=n.HEAPF64[e/8+1+1],o=n.HEAPU32[e/4+1+1+2+2],l=n.HEAPU32[e/4+1+1+2+2+1],f=n.HEAPU8.subarray(l,l+i),u=this._readLayer();return{type:t,size:i,ptime:r,dtime:a,keyframe:o,src:f,data:1==t&&this.mediaAttr.aCodec==s.DEF_AAC?this.aacDec.sliceAACFrames(r,f):f,layer:u}}},{key:"_refreshDemuxer",value:function(){this._releaseDemuxer(),this._initDemuxer()}},{key:"_initDemuxer",value:function(){n.cwrap("initTsMissile","number",[])(),n.cwrap("initializeDemuxer","number",[])()}},{key:"_releaseDemuxer",value:function(){n.cwrap("exitTsMissile","number",[])()}}])&&r(i.prototype,o),l&&r(i,l),e}();i.MPEG_JS=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../decoder/missile.js":1,"./consts":214,"./decoder/aac":215}],217:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i0&&e.extensionInfo.vHeight>0&&(e.size.width=e.extensionInfo.vWidth,e.size.height=e.extensionInfo.vHeight);for(var t=null;!((t=e.mpegTsObj.readPacket()).size<=0);){var i=t.dtime;if(0==t.type){var r=s.PACK_NALU(t.layer),n=1==t.keyframe;e.bufObject.appendFrame(i,r,!0,n)}else if("aac"==e.mediaInfo.aCodec)for(var a=t.data,o=0;o0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t<0?null:1==e?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0}},{key:"getACodec",value:function(){return this.aCodec}},{key:"getAudioNone",value:function(){return this.mpegTsObj.mediaAttr.audioNone}},{key:"getDurationMs",value:function(){return this.durationMs}},{key:"getFPS",value:function(){return this.fps}},{key:"getSampleRate",value:function(){return this.sampleRate}},{key:"getSize",value:function(){return this.size}},{key:"seek",value:function(e){if(e>=0){var t=this.bufObject.seekIDR(e);this.seekPos=t}}}])&&r(t.prototype,i),o&&r(t,o),e}();i.MpegTs=o},{"../decoder/hevc-imp":207,"./buffer":209,"./mpegts/mpeg.js":216}],218:[function(e,t,i){(function(t){"use strict";function r(e,t){for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];this.player.setScreen(e)}},{key:"play",value:function(){if(this.playParam.videoCodec===c.CODEC_H265){var e={seekPos:this._getSeekTarget(),mode:this.playMode,accurateSeek:this.configFormat.accurateSeek,seekEvent:!1,realPlay:!0};this.player.play(e)}else this.player.play();return!0}},{key:"pause",value:function(){return this.player.pause(),!0}},{key:"isPlaying",value:function(){return this.player.isPlayingState()}},{key:"setVoice",value:function(e){if(e<0)return!1;this.volume=e,this.player.setVoice(e)}},{key:"getVolume",value:function(){return this.volume}},{key:"mediaInfo",value:function(){return{meta:this.playParam,videoType:this.playMode}}},{key:"_seekHLS",value:function(e,t,i){setTimeout((function(){t.player.getCachePTS(),t.player.getCachePTS()>e?i():t._seekHLS(e,t,i)}),100)}},{key:"seek",value:function(e){var t=this;this.seekTarget=e,this.onSeekStart&&this.onSeekStart(e),this.timerFeed&&(window.clearInterval(this.timerFeed),this.timerFeed=null);var i=this._getSeekTarget();return this.playParam.videoCodec===c.CODEC_H264&&this.configFormat.type==c.PLAYER_IN_TYPE_MP4?(this.player.seek(e),this.onSeekFinish&&this.onSeekFinish()):this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?(this.pause(),this._seekHLS(e,this,(function(){t.player.seek((function(){}),{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek})}))):this._seekHLS(e,this,(function(){t.player.seek((function(){t.configFormat.type==c.PLAYER_IN_TYPE_MP4?t.mp4Obj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_TS||t.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?t.mpegTsObj.seek(e):t.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(t.hlsObj.onSamples=null,t.hlsObj.seek(e));var i,r=(i=0,i=t.configFormat.accurateSeek?e:t._getBoxBufSeekIDR(),parseInt(i)),n=parseInt(t._getBoxBufSeekIDR())||0;t._avFeedMP4Data(n,r)}),{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek})})),!0}},{key:"fullScreen",value:function(){this.autoScreenClose=!0;var e=document.querySelector("#"+this.configFormat.playerId),t=e.getElementsByTagName("canvas")[0];e.style.width=this.screenW+"px",e.style.height=this.screenH+"px";var i=this._checkScreenDisplaySize(this.screenW,this.screenH,this.playParam.size.width,this.playParam.size.height);t.style.marginTop=i[0]+"px",t.style.marginLeft=i[1]+"px",t.style.width=i[2]+"px",t.style.height=i[3]+"px",this._requestFullScreen(e)}},{key:"closeFullScreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!1===e&&(this.autoScreenClose=!1,this._exitFull());var t=document.querySelector("#"+this.configFormat.playerId),i=t.getElementsByTagName("canvas")[0];t.style.width=this.configFormat.playerW+"px",t.style.height=this.configFormat.playerH+"px";var r=this._checkScreenDisplaySize(this.configFormat.playerW,this.configFormat.playerH,this.playParam.size.width,this.playParam.size.height);i.style.marginTop=r[0]+"px",i.style.marginLeft=r[1]+"px",i.style.width=r[2]+"px",i.style.height=r[3]+"px"}},{key:"_checkScreenDisplaySize",value:function(e,t,i,r){var n=i/e>r/t,a=(e/i).toFixed(2),s=(t/r).toFixed(2),o=n?a:s,l=this.fixed?e:parseInt(i*o),f=this.fixed?t:parseInt(r*o);return[parseInt((t-f)/2),parseInt((e-l)/2),l,f]}},{key:"_isFullScreen",value:function(){var e=document.fullscreenElement||document.mozFullscreenElement||document.webkitFullscreenElement;return document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled,null!=e}},{key:"_requestFullScreen",value:function(e){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullScreen()}},{key:"_exitFull",value:function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}},{key:"_durationText",value:function(e){if(e<0)return"Play";var t=Math.round(e);return Math.floor(t/3600)+":"+Math.floor(t%3600/60)+":"+Math.floor(t%60)}},{key:"_getSeekTarget",value:function(){return this.configFormat.accurateSeek?this.seekTarget:this._getBoxBufSeekIDR()}},{key:"_getBoxBufSeekIDR",value:function(){return this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.mp4Obj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this.mpegTsObj.seekPos:this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this.hlsObj.seekPos:void 0}},{key:"_playControl",value:function(){this.isPlaying()?this.pause():this.play()}},{key:"_avFeedMP4Data",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=parseInt(this.playParam.durationMs/1e3);this.player.clearAllCache(),this.timerFeed=window.setInterval((function(){var a=null,s=null,o=!0,l=!0;if(e.configFormat.type==c.PLAYER_IN_TYPE_MP4?(a=e.mp4Obj.popBuffer(1,t),s=e.mp4Obj.audioNone?null:e.mp4Obj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_TS||e.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?(a=e.mpegTsObj.popBuffer(1,t),s=e.mpegTsObj.getAudioNone()?null:e.mpegTsObj.popBuffer(2,i)):e.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&(a=e.hlsObj.popBuffer(1,t),s=e.hlsObj.audioNone?null:e.hlsObj.popBuffer(2,i),t=e.hlsObj.getLastIdx()&&(o=!1),i=e.hlsObj.getALastIdx()&&(l=!1)),!0===o&&null!=a)for(var f=0;fn)return window.clearInterval(e.timerFeed),e.timerFeed=null,e.player.vCachePTS,e.player.aCachePTS,void(null!=r&&r())}),5)}},{key:"_makeMP4Player",value:function(){null!=this.configFormat.extInfo.core&&null!==this.configFormat.extInfo.core&&this.configFormat.extInfo.core===c.PLAYER_CORE_TYPE_CNATIVE?this._cDemuxDecoderEntry():this.configFormat.type==c.PLAYER_IN_TYPE_MP4?this.configFormat.extInfo.moovStartFlag?this._mp4EntryVodStream():this._mp4Entry():this.configFormat.type==c.PLAYER_IN_TYPE_TS||this.configFormat.type==c.PLAYER_IN_TYPE_MPEGTS?this._mpegTsEntry():this.configFormat.type==c.PLAYER_IN_TYPE_M3U8?this._m3u8Entry():this.configFormat.type===c.PLAYER_IN_TYPE_RAW_265&&this._raw265Entry()}},{key:"_makeMP4PlayerViewEvent",value:function(e,t,i,r){var a=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=this;if(this.playParam.durationMs=e,this.playParam.fps=t,this.playParam.sampleRate=i,this.playParam.size=r,this.playParam.audioNone=s,this.playParam.videoCodec=o||c.CODEC_H265,this.playParam,(this.configFormat.type==c.PLAYER_IN_TYPE_M3U8&&this.hlsConf.hlsType==c.PLAYER_IN_TYPE_M3U8_LIVE||this.configFormat.type==c.PLAYER_IN_TYPE_RAW_265)&&(this.playMode=c.PLAYER_MODE_NOTIME_LIVE),l.configFormat.extInfo.autoCrop){var f=document.querySelector("#"+this.configFormat.playerId),u=r.width/r.height,h=this.configFormat.playerW/this.configFormat.playerH;u>h?f.style.height=this.configFormat.playerW/u+"px":u>1,a>>1,i),e.v.fill(n>>1,a>>1,r),e.drawArrays(e.TRIANGLE_STRIP,0,4)},setupCanvas:function(e,t){var i=e.getContext("webgl")||e.getContext("experimental-webgl");if(!i)return i;var n=i.createProgram(),a=["attribute highp vec4 aVertexPosition;","attribute vec2 aTextureCoord;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = aVertexPosition;"," vTextureCoord = aTextureCoord;","}"].join("\n"),s=i.createShader(i.VERTEX_SHADER);i.shaderSource(s,a),i.compileShader(s);var o=["precision highp float;","varying lowp vec2 vTextureCoord;","uniform sampler2D YTexture;","uniform sampler2D UTexture;","uniform sampler2D VTexture;","const mat4 YUV2RGB = mat4","("," 1.1643828125, 0, 1.59602734375, -.87078515625,"," 1.1643828125, -.39176171875, -.81296875, .52959375,"," 1.1643828125, 2.017234375, 0, -1.081390625,"," 0, 0, 0, 1",");","void main(void) {"," gl_FragColor = vec4( texture2D(YTexture, vTextureCoord).x, texture2D(UTexture, vTextureCoord).x, texture2D(VTexture, vTextureCoord).x, 1) * YUV2RGB;","}"].join("\n"),l=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(l,o),i.compileShader(l),i.attachShader(n,s),i.attachShader(n,l),i.linkProgram(n),i.useProgram(n),i.getProgramParameter(n,i.LINK_STATUS);var f=i.getAttribLocation(n,"aVertexPosition");i.enableVertexAttribArray(f);var u=i.getAttribLocation(n,"aTextureCoord");i.enableVertexAttribArray(u);var h=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,h),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0]),i.STATIC_DRAW),i.vertexAttribPointer(f,3,i.FLOAT,!1,0,0);var c=i.createBuffer();return i.bindBuffer(i.ARRAY_BUFFER,c),i.bufferData(i.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),i.STATIC_DRAW),i.vertexAttribPointer(u,2,i.FLOAT,!1,0,0),i.y=new r(i),i.u=new r(i),i.v=new r(i),i.y.bind(0,n,"YTexture"),i.u.bind(1,n,"UTexture"),i.v.bind(2,n,"VTexture"),i}}},{}],221:[function(e,t,i){(function(e){"use strict";e.STATIC_MEM_wasmDecoderState=-1,e.STATICE_MEM_playerCount=-1,e.STATICE_MEM_playerIndexPtr=0}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],222:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i h265web.js 播放器 Demo